/* TUFF TYMES demo: military palette (olive, black, sand), Anton + Barlow */
:root, .sw-root {
  --bg: #0b0c09; --panel: #14160f; --line: #2a2d1f; --ink: #efe9da; --soft: #a8a58f;
  --olive: #5b6332; --olive-2: #7d8746; --sand: #cdb88a;
  --display: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --cond: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --sw-bg: var(--bg); --sw-ink: var(--ink); --sw-ink-soft: var(--soft); --sw-accent: var(--sand);
  --sw-font-display: var(--display); --sw-font-body: 'Barlow', system-ui, sans-serif;
  --camo: url("camo.webp");   /* seamless woodland tile, work/tools/make_camo.py */
}
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Barlow', system-ui, -apple-system, sans-serif; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }   /* engine sets hidden on both = body becomes a scroller on iOS */
img { max-width: 100%; }

/* ── engine overrides (its CSS sits in @layer sw, so plain rules win) ── */
.sw-topbar, .sw-brand { display: none; }
.sw-scrollbar { z-index: 95; }
.sw-copy__title { font-weight: 400; text-transform: uppercase; letter-spacing: .01em; font-size: clamp(2.4rem, 5.2vw, 4.6rem); line-height: .98; }
.sw-copy__eyebrow { font-family: var(--cond); font-weight: 700; letter-spacing: .24em; }
.sw-copy__body { font-family: var(--cond); font-weight: 500; font-size: clamp(1rem, 1.3vw, 1.2rem); letter-spacing: .02em; }
.sw-copy__eyebrow, .sw-copy__num, .sw-copy__body { text-shadow: 0 1px 2px #000, 0 0 14px rgba(0,0,0,.9); }
.sw-btn { font-family: var(--cond); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sw-btn--primary { color: #14160f; background: var(--sand); }
.sw-btn--ghost { color: var(--ink); border-color: rgba(205,184,138,.5); }
.sw-route__label { color: var(--ink); background: rgba(11,12,9,.82); font-family: var(--cond); letter-spacing: .1em; text-transform: uppercase; }
.sw-hint { font-family: var(--cond); font-weight: 600; color: var(--ink); text-shadow: 0 1px 2px #000, 0 0 12px rgba(0,0,0,.85); }
@media (min-width: 861px) { .sw-copy { top: auto; bottom: clamp(40px, 8vh, 96px); } }   /* the engine's drift transform drops the -50% centring */
@media (max-width: 860px) {
  .sw-copy { right: 52px; bottom: calc(clamp(96px, 14dvh, 130px) + env(safe-area-inset-bottom)); }   /* clear of the progress rail and the scroll hint */
  .sw-copy__title { font-size: clamp(2.1rem, 9vw, 3rem); }
}
@media (max-width: 860px) and (orientation: portrait) and (max-height: 700px) { .sw-hint span { display: none; } .sw-copy__body { display: none; } }
@media (max-width: 860px) {   /* wide film: his soles sit at ~74-79% of a phone screen, so the copy + scrim stay below them */
  .sw-copylayer::before { height: 30%; }
  .sw-copy { bottom: calc(16px + env(safe-area-inset-bottom)); }
  .sw-copy__num { display: none; }
  .sw-copy__eyebrow { margin-top: 0; }
  .sw-copy__title { font-size: clamp(1.5rem, 6.6vw, 2.1rem); margin-top: 6px; }
  .sw-copy__cta { flex-wrap: nowrap; gap: 8px; margin-top: 12px; }
  .sw-btn { padding: 10px 14px; font-size: .85rem; white-space: nowrap; }
  .sw-hint { top: calc(72px + env(safe-area-inset-top)); bottom: auto; flex-direction: column-reverse; }   /* in the sky above him, not over the copy */
}
#world:empty ~ .tq { display: none; }   /* no layout jump before the engine mounts */

/* ── header ── */
.hdr { position: fixed; top: 0; left: 0; right: 0; z-index: 90; display: flex; align-items: center; justify-content: space-between; gap: 10px;
       padding: calc(8px + env(safe-area-inset-top)) clamp(14px, 4vw, 48px) 8px; background: rgba(11,12,9,.6);
       -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(205,184,138,.12); transition: background .4s; }
html.gated .hdr { background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.gated .hdr__logo { visibility: hidden; }
.hdr__logo { display: block; padding: 2px 0; }
.hdr__logo img { display: block; height: 42px; width: auto; }
.hdr__r { display: flex; align-items: center; gap: clamp(6px, 1.6vw, 16px); }
.hdr__link { color: var(--ink); text-decoration: none; font: 600 .95rem/1 var(--cond); letter-spacing: .14em; text-transform: uppercase; padding: 14px 4px; white-space: nowrap; }
.hdr__link:hover { color: var(--sand); }
.lang { display: flex; border: 1px solid rgba(205,184,138,.35); border-radius: 999px; padding: 2px; }
.lang button { min-width: 40px; min-height: 36px; border: 0; border-radius: 999px; background: none; color: var(--soft); cursor: pointer; font: 700 .85rem/1 var(--cond); letter-spacing: .1em; }
.lang button[aria-pressed="true"] { background: var(--sand); color: #14160f; }
.lang button:focus-visible, .hdr__link:focus-visible, .btn:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }
@media (max-width: 420px) { .hdr__logo img { height: 34px; } .hdr__link { font-size: .85rem; letter-spacing: .1em; } .lang button { min-width: 36px; } }
@media (max-width: 860px) {   /* phones: the header's middle is empty, so it stops painting over the film (hat logos sit up there) */
  .hdr { background: linear-gradient(rgba(11,12,9,.55), rgba(11,12,9,0)); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: 0; }
}

/* ── welcome gate: Enter opens a circle from the button into the film ── */
html.gated, html.gated body { overflow: hidden; }
.gate { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; text-align: center; overflow: hidden; touch-action: none;
        padding: calc(64px + env(safe-area-inset-top)) clamp(18px, 5vw, 64px) calc(28px + env(safe-area-inset-bottom));
        background: radial-gradient(ellipse at 50% 42%, #1c2010 0%, #050604 66%); }
.gate::before { content: ""; position: absolute; inset: -10%; opacity: .16; pointer-events: none; background: var(--camo) 0 0/360px 360px; animation: gate-bg 16s ease-out both; }
.gate__in { position: relative; display: grid; justify-items: center; gap: clamp(10px, 2.2vh, 22px); max-width: 760px; }
.gate__eyebrow { margin: 0; font: 700 .85rem/1 var(--cond); letter-spacing: .4em; padding-left: .4em; text-transform: uppercase; color: var(--sand); animation: gate-rise 1.2s cubic-bezier(.2,.8,.2,1) .15s both; }
.gate__title { margin: 0; display: grid; justify-items: center; gap: clamp(8px, 1.6vh, 16px); animation: gate-rise 1.4s cubic-bezier(.2,.8,.2,1) .3s both; }
.gate__title img { display: block; width: clamp(200px, min(40vw, 40vh), 380px); height: auto; filter: drop-shadow(0 12px 40px rgba(0,0,0,.6)); }
.gate__sub { font: 400 clamp(1.2rem, min(2.4vw, 3.4vh), 1.7rem)/1 var(--display); letter-spacing: .18em; padding-left: .18em; text-transform: uppercase; color: var(--ink); }
.enter { position: relative; margin-top: clamp(4px, 1.6vh, 16px); width: clamp(104px, min(12vw, 17vh), 140px); aspect-ratio: 1; padding: 0 0 0 .3em; border: 0; background: none; color: var(--ink); cursor: pointer;
         display: grid; place-items: center; font: 700 .95rem/1 var(--cond); letter-spacing: .3em; text-transform: uppercase; animation: gate-rise 1.4s cubic-bezier(.2,.8,.2,1) .6s both; }
.enter__ring { position: absolute; inset: 0; border: 1px solid rgba(205,184,138,.85); border-radius: 50%; background: rgba(91,99,50,.25); transition: transform .9s cubic-bezier(.2,.8,.2,1), background .4s; }
.enter::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(205,184,138,.5); animation: gate-pulse 3.2s ease-out infinite; }
.enter__text { position: relative; }
@media (hover: hover) { .enter:hover .enter__ring { transform: scale(.92); background: var(--sand); } .enter:hover { color: #14160f; } }
.enter:focus-visible { outline: 2px solid var(--sand); outline-offset: 10px; border-radius: 50%; }
.gate__alt { position: relative; z-index: 1; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; animation: gate-rise 1.4s cubic-bezier(.2,.8,.2,1) .8s both; }
.gate__alt a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; font: 600 .9rem/1 var(--cond); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; color: #d9d3c2;
               text-decoration: underline; text-decoration-color: rgba(205,184,138,.5); text-underline-offset: 5px; }
.gate__alt a:hover { color: var(--sand); }
.gate__alt a:focus-visible { outline: 2px solid var(--sand); outline-offset: -4px; }
.gate.is-opening { pointer-events: none; touch-action: auto; }
.gate.is-opening .gate__in { opacity: 0; transform: scale(.97); transition: opacity .5s ease, transform 1s cubic-bezier(.2,.8,.2,1); }
@keyframes gate-bg { from { transform: scale(1.12); } to { transform: scale(1.02); } }
@keyframes gate-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes gate-pulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .gate::before, .gate__eyebrow, .gate__title, .enter, .enter::after, .gate__alt { animation: none !important; } }
@media (max-height: 600px) { .gate__title img { width: min(170px, 36vw); } }
@media (max-height: 400px) { .gate { padding-top: calc(56px + env(safe-area-inset-top)); } .gate__eyebrow { display: none; } }

/* ── shared ── */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; white-space: nowrap;
       font: 700 1rem/1 var(--cond); letter-spacing: .1em; text-transform: uppercase; transition: transform .2s; }
.btn:hover { transform: translateY(-2px); }
.btn--sand { color: #14160f; background: var(--sand); }
.btn--ghost { color: var(--ink); background: transparent; border: 1.5px solid rgba(205,184,138,.45); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: .9rem; }
.tq { position: relative; z-index: 55; margin-top: -70vh; background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -30px 60px rgba(0,0,0,.55); overflow-x: clip; }
.sec { padding: clamp(56px, 8vw, 104px) clamp(16px, 5vw, 64px); scroll-margin-top: 60px; }
.sec--alt { background: #10120c; }
.in { max-width: 1160px; margin: 0 auto; }
.eyebrow { display: flex; align-items: center; gap: 14px; margin: 0; font: 700 .85rem/1 var(--cond); letter-spacing: .26em; text-transform: uppercase; color: var(--sand); }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--olive-2); }
h2 { margin: 14px 0 0; font: 400 clamp(2.2rem, 5vw, 3.6rem)/1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
h2 em { font-style: normal; color: var(--sand); }
.lead { max-width: 60ch; margin: 16px 0 0; color: #c4bfae; font-size: clamp(1rem, 1.3vw, 1.15rem); line-height: 1.6; }
.note { margin: 14px 0 0; color: var(--soft); font-size: .9rem; }

/* ── drop grid ── */
.grp { margin: 36px 0 0; font: 400 1.5rem/1 var(--display); text-transform: uppercase; letter-spacing: .04em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 170px), 1fr)); gap: 14px; margin: 16px 0 0; padding: 0; list-style: none; }
.prod { display: grid; gap: 4px; width: 100%; padding: 0 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: inherit; font: inherit; text-align: left; cursor: pointer; overflow: hidden; }
.prod__img { position: relative; display: block; aspect-ratio: 1; background: #efe9df; overflow: hidden; }
.prod__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1), opacity .35s; }
.prod__back { opacity: 0; }
.prod__name { padding: 10px 12px 0; font: 600 1.05rem/1.2 var(--cond); letter-spacing: .03em; }
.prod__soon { padding: 0 12px; font: 700 .72rem/1.3 var(--cond); letter-spacing: .2em; text-transform: uppercase; color: var(--sand); }
@media (hover: hover) {
  .prod:hover .prod__img img { transform: scale(1.04); }
  .prod:hover .prod__back { opacity: 1; }
}
.prod:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }

/* ── color picker ── */
.fit { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 3vw, 32px); max-width: 880px; margin: 34px 0 0; }
.pick { min-width: 0; }
.pick__k { margin: 0 0 10px; font: 700 .8rem/1 var(--cond); letter-spacing: .24em; text-transform: uppercase; color: var(--soft); }
.pick__img { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: #efe9df; cursor: pointer; overflow: hidden; aspect-ratio: 1; }
.pick__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pick__img:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }
.pick__name { margin: 12px 0 0; min-height: 2.4em; font: 600 clamp(1rem, 2.2vw, 1.25rem)/1.2 var(--cond); }
.pick__sw { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.swatch { width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 2px solid var(--line); background: var(--sw); cursor: pointer; }
.swatch[aria-pressed="true"] { border-color: var(--sand); box-shadow: 0 0 0 3px rgba(205,184,138,.3); }
.swatch:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }

/* ── drop list ── */
.list { position: relative; overflow: hidden; max-width: 880px; padding: clamp(28px, 5vw, 56px); border: 1px solid rgba(205,184,138,.3); border-radius: 20px; background: var(--panel); }
.list::before { content: ""; position: absolute; inset: 0; opacity: .1; background: var(--camo) 0 0/360px 360px; pointer-events: none; }
.list > * { position: relative; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.join { margin: 26px 0 0; }
.join__k { display: block; margin: 0 0 8px; font: 700 .8rem/1 var(--cond); letter-spacing: .2em; text-transform: uppercase; color: var(--soft); }
.join__row { display: flex; flex-wrap: wrap; gap: 10px; }
.join__in { flex: 1 1 220px; min-width: 0; min-height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: #0d0e0a; color: var(--ink); font: 500 1rem 'Barlow', sans-serif; }
.join__in:disabled, .join .btn:disabled { opacity: .55; cursor: not-allowed; }
.join .btn:disabled { transform: none; }

/* ── footer ── */
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; padding: 34px clamp(16px, 5vw, 64px) calc(34px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--line); color: #8d8a77; font-size: .9rem; }
.foot img { display: block; height: 56px; width: auto; }
.foot a { color: #bdb8a4; text-decoration: underline; text-underline-offset: 3px; }
.foot a:hover { color: var(--sand); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, .prod__img img { transition: none; } }

/* ── store under the film (MERGE.md): the header goes light + opaque over the store; store.js toggles html.in-store ── */
.hdr__logo .logo-dark { display: none; }
html.in-store .hdr { background: #f4eee8; border-bottom-color: rgba(22, 23, 15, .07); -webkit-backdrop-filter: none; backdrop-filter: none; }
html.in-store .hdr__logo .logo-light { display: none; }
html.in-store .hdr__logo .logo-dark { display: block; }
html.in-store .hdr__link { color: #16170f; }
html.in-store .lang { border-color: #d9d1c4; }
html.in-store .lang button { color: #6b685c; }
html.in-store .lang button[aria-pressed="true"], html.in-store .hdr .btn--sand { background: #16170f; color: #f4eee8; }
html.in-store .sw-scrollbar { visibility: hidden; }   /* the film's progress bar means nothing over the store */
