/* =========================================================
   Gus&Co — main stylesheet (v3)
   Light interface, full-bleed mountain photography.
   Fonts: Playfair Display (titles), Space Grotesk (text)
   ========================================================= */

:root {
    --bg: #ffffff;
    --soft: #f3f2ee;          /* panels, product backgrounds */
    --ink: #141414;
    --text: #141414;
    --muted: #66645e;
    --line: #dddbd4;
    --dark: #141414;          /* footer */
    --on-dark: #f3f2ee;
    --red: #d8232a;           /* brand accent, used sparingly */

    --font: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;

    --gutter: clamp(1rem, 2.8vw, 2.5rem);
    --gap: clamp(0.5rem, 1vw, 1rem);
    --max: 1440px;
    --header-h: 68px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
html, body { overflow-x: clip; }
body {
    background: var(--bg); color: var(--text);
    font-family: var(--font); font-size: 1rem; line-height: 1.6;
    font-variant-numeric: lining-nums;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
    position: fixed; left: var(--gutter); top: -4rem; z-index: 200;
    background: var(--ink); color: #fff; padding: 0.7rem 1rem; text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

/* ---------- Typography ---------- */
h1, h2, .display { font-family: var(--font-serif); font-weight: 400; line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.25rem); }
h3 { font-size: 1.1rem; font-weight: 500; line-height: 1.35; }
.meta { font-size: 0.85rem; color: var(--muted); }
.prose { max-width: 40em; color: #3a3935; }
.prose p + p { margin-top: 1em; }
.rule { width: 44px; height: 2px; background: var(--red); border: 0; margin-top: 1rem; }

/* Placeholder for facts still to be provided — must never reach production */
mark.todo { background: #ffe14d; color: #111; padding: 0 0.25em; font-size: 0.9em; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.75rem 2rem; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }

/* Photo treatment: cool, slightly muted landscapes; black and white product */
.scape { filter: saturate(0.82); }
.bw { filter: grayscale(1) sepia(0.06); }

/* ---------- Buttons and links ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 0.7em 1.6em;
    font-size: 0.95rem; font-weight: 500; text-decoration: none;
    border: 1px solid currentColor; transition: background 0.2s, color 0.2s;
}
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark:hover { background: #fff; color: var(--ink); }
.btn-ghost { color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.link { font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 3px; transition: color 0.2s; }
.link:hover { color: var(--red); }

/* ---------- Header ---------- */
.site-header {
    position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding-inline: var(--gutter);
    background: #fff; color: var(--ink); border-bottom: 1px solid var(--line);
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.brand img { width: clamp(104px, 11vw, 136px); transition: filter 0.3s; }
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.6vw, 2.25rem); }
.site-nav a { font-size: 0.95rem; text-decoration: none; padding-block: 0.4rem; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: currentColor; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--red); }
/* Home page: see-through over the photo until the page is scrolled (needs JS) */
.js .site-header[data-overlay]:not(.is-solid) { background: transparent; color: #fff; border-bottom-color: transparent; }
.js .site-header[data-overlay]:not(.is-solid) .brand img { filter: invert(1); }

/* ---------- Full-bleed photo with text ---------- */
.hero, .band, .tile { position: relative; overflow: hidden; background: #22272b; color: #fff; }
.hero { height: 100svh; min-height: 520px; }
.band { height: clamp(380px, 62vh, 680px); }
.hero picture, .hero img, .band picture, .band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after, .band::after, .tile--photo::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(to bottom, rgba(10,14,18,0.36), rgba(10,14,18,0) 28%, rgba(10,14,18,0.05) 52%, rgba(10,14,18,0.6));
}
.tile--photo::after { background: linear-gradient(to bottom, rgba(10,14,18,0) 45%, rgba(10,14,18,0.72)); }
.overlay {
    position: absolute; inset: auto 0 0 0; z-index: 1;
    padding: clamp(1.75rem, 4.5vw, 4rem) var(--gutter); padding-bottom: calc(clamp(1.75rem, 4.5vw, 4rem) + env(safe-area-inset-bottom, 0px));
    display: grid; justify-items: center; gap: 1.35rem; text-align: center;
}

/* ---------- Edge-to-edge duos ---------- */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: var(--gap); }
.tile { display: block; min-height: clamp(440px, 52vw, 820px); }
.tile > img:not(.emblem) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile--panel { background: var(--soft); color: var(--ink); display: grid; place-content: center; padding: clamp(2rem, 6vw, 5rem); }
.quote { font-family: var(--font-serif); font-size: clamp(1.35rem, 2.4vw, 2rem); line-height: 1.4; max-width: 22em; }
.tile--panel .meta { margin-top: 1.25rem; }
.tile--panel .link { justify-self: start; margin-top: 1.75rem; }
.emblem { width: 56px; margin-bottom: 1.5rem; }

/* ---------- Product cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(0.75rem, 1.6vw, 1.5rem); }
.card { display: block; text-decoration: none; }
.card-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--soft); }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-alt { opacity: 0; transition: opacity 0.35s; }
.card-info { display: grid; gap: 0.15rem; padding-top: 0.9rem; }
.card-info strong { font-weight: 500; }
@media (hover: hover) { .card:hover .card-alt { opacity: 1; } .card:hover h3 { text-decoration: underline; text-underline-offset: 4px; } }
.card:focus-visible .card-alt { opacity: 1; }

/* ---------- Editorial trio ---------- */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 1.8vw, 1.75rem); }
.trio img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--soft); }
.trio h3 { margin-top: 1.1rem; font-size: 1.3rem; }
.trio p { margin: 0.5rem 0 1rem; color: #3a3935; max-width: 32em; }

/* ---------- Film ---------- */
.film { background: #0e0f10; margin-top: var(--gap); }
.film video { width: 100%; aspect-ratio: 16 / 9; max-height: 86vh; object-fit: cover; }

/* ---------- Practical info ---------- */
.info-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 3rem); }
.info-grid h3 { margin-bottom: 0.4rem; }
.info-grid p { font-size: 0.95rem; color: #3a3935; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: var(--on-dark); padding-block: clamp(3rem, 6vw, 5rem) 2rem; }
.footer-mark { display: grid; justify-items: center; gap: 1.1rem; text-align: center; }
.footer-mark .emblem { filter: invert(1); margin: 0; }
.footer-mark .wordmark { width: 150px; filter: invert(1); }
.footer-mark p { color: #bdbab2; font-size: 0.95rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem clamp(1.25rem, 3vw, 2.5rem); margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid #33322f; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { margin-top: 2rem; text-align: center; font-size: 0.85rem; color: #9b988f; }

/* ---------- Inner pages ---------- */
.page { padding-top: var(--header-h); }
.page-head { padding-block: clamp(2.25rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-head .meta { margin-top: 0.6rem; }

/* ---------- Product page ---------- */
.product { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: clamp(1.5rem, 3vw, 3rem); align-items: start; padding-block: clamp(1.25rem, 2.5vw, 2.25rem) clamp(3rem, 6vw, 5rem); }
.product-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.product-gallery button { display: block; width: 100%; background: var(--soft); cursor: zoom-in; }
.product-gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.product-gallery .is-lead { grid-column: 1 / -1; }
.product-gallery .is-lead img { aspect-ratio: 1; }
.product-panel { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.product-panel > * + * { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.product-panel h1 { font-size: clamp(1.9rem, 3vw, 2.5rem); }
.product-panel .lede { margin-top: 0.75rem; color: #3a3935; }
.price { font-size: 1.2rem; font-weight: 500; }
.colorway-picker { border: 0; }
.colorway-picker legend { float: left; width: 100%; margin-bottom: 0.75rem; }
.swatches { clear: both; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.swatch { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 46px; padding: 0.5rem 1rem; border: 1px solid var(--line); font-size: 0.95rem; }
.swatch[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.swatch-dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--ink); }
.swatch-dot--white { background: linear-gradient(90deg, #fff 50%, var(--ink) 50%); }
.swatch-dot--black { background: linear-gradient(90deg, var(--ink) 50%, #fff 50%); }
.note { margin-top: 0.7rem; }
.product-panel .details { padding-top: 0; }
.details details { border-bottom: 1px solid var(--line); }
.details summary { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1rem; font-weight: 500; cursor: pointer; list-style: none; }
.details summary::-webkit-details-marker { display: none; }
.details summary::after { content: "+"; font-weight: 400; font-size: 1.25rem; line-height: 1; }
.details details[open] summary::after { content: "–"; }
.details details > p { padding-bottom: 1.1rem; color: #3a3935; font-size: 0.95rem; }

/* ---------- Story page ---------- */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split-media { position: relative; min-height: min(86vh, 900px); background: #22272b; }
.split-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split-text { display: grid; align-content: center; padding: clamp(2.5rem, 6vw, 6rem); }
.manifesto { margin-top: 1.75rem; }
.manifesto blockquote { font-size: 1.1rem; line-height: 1.7; max-width: 34em; }
.manifesto blockquote p + p { margin-top: 1em; }
.manifesto blockquote p:first-child { font-family: var(--font-serif); font-size: 1.45rem; line-height: 1.4; }
.manifesto figcaption { margin-top: 1.5rem; }
.identity { background: var(--soft); }
.identity-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.identity-mark img { width: min(100%, 260px); margin-inline: auto; }
.identity-list { margin-top: 1.75rem; border-top: 1px solid var(--line); }
.identity-list > div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.identity-list dt { font-family: var(--font-serif); font-size: 1.2rem; line-height: 1.35; }
.identity-list dd { color: #3a3935; }
.cta { text-align: center; display: grid; justify-items: center; gap: 1.5rem; }

.notfound { min-height: 70svh; align-content: center; }
.notfound .emblem { margin: 0; }

/* ---------- Legal page ---------- */
.legal { max-width: 50rem; padding-bottom: clamp(3rem, 7vw, 6rem); }
.legal h2 { font-size: 1.4rem; margin: 2.25rem 0 0.75rem; }
.legal p { color: #3a3935; }
.legal p + p { margin-top: 0.8em; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: #fff; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lightbox-bar { display: flex; justify-content: space-between; align-items: center; padding: 1rem var(--gutter); }
.lightbox-stage { min-height: 0; display: flex; align-items: center; justify-content: center; padding-inline: var(--gutter); }
.lightbox-stage img { max-height: 100%; max-width: 100%; object-fit: contain; }
.lightbox-nav { display: flex; justify-content: center; gap: 0.75rem; padding: 1rem; }
.lightbox button { min-height: 44px; padding: 0.5rem 1.1rem; border: 1px solid var(--line); font-size: 0.95rem; }
.lightbox button:hover { border-color: var(--ink); }

/* ---------- Reveal on scroll (only when JS is running) ---------- */
.js .reveal { opacity: 0; transition: opacity 0.8s var(--ease); }
.js .reveal.is-visible { opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .product { grid-template-columns: 1fr; }
    .product-panel { position: static; }
    .product-gallery {
        display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
        margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); scrollbar-width: none;
    }
    .product-gallery::-webkit-scrollbar { display: none; }
    .product-gallery > button { flex: 0 0 86%; scroll-snap-align: start; }
    .product-gallery img, .product-gallery .is-lead img { aspect-ratio: 4 / 5; }
    .split { grid-template-columns: 1fr; }
    .split-media { min-height: 0; aspect-ratio: 4 / 5; }
    .split-text { padding: clamp(2.5rem, 8vw, 4rem) var(--gutter); }
    .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .identity-grid { grid-template-columns: 1fr; }
    .identity-mark img { width: 150px; margin-inline: 0; }
}
@media (max-width: 700px) {
    .duo, .trio { grid-template-columns: 1fr; }
    .tile { min-height: 118vw; }
    .tile--panel { min-height: 0; padding-block: 4rem; }
    .trio { gap: 2.5rem; }
    .trio img { aspect-ratio: 4 / 5; }
    .film video { aspect-ratio: 4 / 5; }
    .site-nav a { font-size: 0.88rem; }
}
@media (max-width: 460px) {
    .info-grid { grid-template-columns: 1fr; }
    .card-info { font-size: 0.95rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transition: none; }
    .card-alt { transition: none; }
}

/* ---------- Stand-by screen (home page, before the drop; see assets/js/drop.js) ---------- */
.standby { display: none; }
.is-standby body > :not(.standby):not(script) { display: none !important; }
.is-standby .standby {
    position: relative; isolation: isolate; overflow: hidden;
    min-height: 100svh;
    display: grid; grid-template-rows: auto 1fr auto;
    padding: var(--gutter);
    background: #0b0b0b;
    color: #ece8e1;
}
.standby-video {
    position: absolute; inset: 0; z-index: -2;
    width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(0.35) brightness(0.55);
}
.standby::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0) 35%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.85));
}
.standby::after {
    content: ""; position: absolute; inset: -50%; z-index: 0; pointer-events: none; opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
    0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); }
    50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } 100% { transform: translate(1%, 3%); }
}
.standby > :not(.standby-video) { position: relative; z-index: 1; }
.standby-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.standby-logo { width: clamp(100px, 12vw, 140px); filter: invert(1); }
.standby-label { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: #a39f98; }
.standby-bottom { display: grid; gap: 1.5rem; }
.standby-title {
    font-family: var(--font-serif); font-style: italic; font-weight: 400;
    font-size: clamp(1.4rem, 3vw, 2.1rem); line-height: 1.2;
    font-variant-numeric: lining-nums;
}
.countdown { display: flex; gap: clamp(1rem, 4vw, 3rem); align-items: flex-start; }
.countdown div { display: grid; justify-items: center; gap: 0.4rem; min-width: 2.2ch; }
.countdown strong {
    font-family: var(--font-serif); font-weight: 400; line-height: 1;
    font-size: clamp(2.6rem, 9vw, 6.5rem);
    font-variant-numeric: lining-nums tabular-nums;
}
.countdown span { font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: #a39f98; }
.standby-foot {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem;
    border-top: 1px solid rgba(236, 232, 225, 0.2); padding-top: 1.25rem;
}
.standby-link {
    font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
    text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 3px;
}
@media (max-width: 520px) { .standby-top .standby-label { display: none; } }
@media (prefers-reduced-motion: reduce) { .standby::after { animation: none; } }
