  /* Black Ops One, SIL Open Font License, self-hosted (no third-party request) */
  @font-face {
    font-family: "Black Ops One";
    src: url("fonts/black-ops-one-latin.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
  }

  :root {
    --midnight: #0a0f1c;   /* banner night sky */
    --panel: #111a2e;
    --rule: #24314f;
    --field-edge: #647394; /* a field's resting border: 3.6:1 on the panel, 4:1 on the field fill (WCAG 1.4.11 needs 3:1) */
    --field-edge-lift: #8290b0; /* hover */
    --text: #e9ecf2;
    --muted: #a3adc2;
    --silver: #c7ccd4;     /* antique silver finish */
    --gold: #c99a3b;       /* coin gold */
    --blue: #2a63f0;       /* patrol blue, 5.07:1 under white text */
    --blue-deep: #245ad9;
    --error: #ff8a8a;
    --ok: #6fd69a;

    /* Bahnschrift is Windows' built-in DIN, the highway-sign face (281 / 83 on the coin). */
    --font-text: "Bahnschrift", "DIN Alternate", "Roboto Condensed", system-ui, sans-serif;
    --font-display: "Black Ops One", "Bahnschrift", system-ui, sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --gutter: clamp(16px, 4vw, 48px);
  }

  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  html { scroll-behavior: smooth; scrollbar-color: var(--rule) var(--midnight); accent-color: var(--blue); }
  body {
    margin: 0;
    background: var(--midnight);
    color: var(--text);
    font: 400 1.125rem/1.55 var(--font-text);
    -webkit-font-smoothing: antialiased;
  }
  img { max-width: 100%; display: block; }
  a { color: var(--silver); text-underline-offset: 3px; }
  ::selection { background: var(--gold); color: var(--midnight); }
  :focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

  h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; text-wrap: balance; margin: 0; }
  h1 { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.04; }
  h2 { font-size: clamp(1.9rem, 3.8vw, 2.75rem); line-height: 1.08; }
  h3 { font-size: 1.3125rem; font-weight: 600; line-height: 1.25; margin: 0; letter-spacing: .005em; }
  p { margin: 0; text-wrap: pretty; } /* no one-word last lines */
  .lede { color: var(--muted); max-width: 34em; }

  .page { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
  section { padding: clamp(72px, 10vw, 128px) 0; }

  /* ---------- Engraved labyrinth background ----------
     A fixed canvas behind everything; the page content stacks above it. */
  #engraving { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
  main, footer { position: relative; z-index: 1; }

  /* ---------- Header ---------- */
  header {
    position: sticky; top: 0; z-index: 20;
    background: rgba(10,15,28,.88); backdrop-filter: blur(10px);
    transition: box-shadow .3s var(--ease-out);
  }
  header.scrolled { box-shadow: 0 10px 24px -14px rgba(0,0,0,.9); }
  header .page { display: flex; align-items: center; gap: 24px; height: 68px; }
  .brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-family: var(--font-display); font-size: 1.125rem; margin-right: auto; }
  .brand img { width: 46px; height: 46px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.6)); }
  /* Full company name, stacked like the logo lockup. */
  .brand-name { display: grid; line-height: 1.05; }
  .brand-main { font-size: 1.125rem; }
  .brand-sub { font: 600 .8125rem/1.2 var(--font-text); color: var(--muted); letter-spacing: .02em; }
  .nav { display: flex; gap: 22px; }
  .nav a { color: var(--muted); text-decoration: none; font-size: 1rem; transition: color .15s; }
  .nav a:hover { color: var(--text); }

  /* ---------- Buttons ---------- */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
    padding: 12px 24px; border-radius: 4px; border: 1px solid transparent;
    font: 600 1.0625rem/1 var(--font-text); letter-spacing: .01em; text-decoration: none; cursor: pointer;
    transition: background-color .15s, border-color .15s, box-shadow .2s, transform .12s var(--ease-out), opacity .15s;
  }
  .btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 18px -10px rgba(0,0,0,.95); }
  .btn-primary:hover { background: var(--blue-deep); box-shadow: 0 12px 24px -10px rgba(0,0,0,1); }
  .btn-quiet { border-color: var(--rule); color: var(--text); background: transparent; }
  .btn-quiet:hover { border-color: var(--silver); }
  .btn-sm { min-height: 44px; padding: 10px 18px; font-size: 1rem; }
  .btn:active { transform: scale(.97); }
  /* The hero's main button: a lamplight glint sweeps across it every few seconds, like the light on the coins.
     Only with motion on (.motion is never set for reduced-motion visitors). */
  .btn-glimmer { position: relative; overflow: hidden; isolation: isolate; }
  .btn-glimmer::after {
    content: ""; position: absolute; inset: -2px; z-index: -1; pointer-events: none; /* behind the text, above the blue */
    background: linear-gradient(105deg, transparent 35%, rgba(255,236,190,.55) 50%, transparent 65%);
    transform: translateX(-130%);
  }
  .motion .btn-glimmer::after { animation: glimmer 4.5s ease-in-out 1.2s infinite; }
  @keyframes glimmer { 0% { transform: translateX(-130%); } 32%, 100% { transform: translateX(130%); } }
  /* Disabled (only while a form is sending): grey fill and ink, not just faded, and the busy cursor. */
  .btn:disabled, .btn:disabled:hover { background: var(--rule); border-color: var(--rule); color: var(--muted); box-shadow: none; cursor: progress; }
  .actions { display: flex; flex-wrap: wrap; gap: 12px; }

  /* ---------- Finish switch ---------- */
  .finish { display: inline-flex; padding: 3px; border: 1px solid var(--rule); border-radius: 999px; background: var(--panel); }
  .finish button {
    min-height: 40px; padding: 8px 18px; border: 0; border-radius: 999px; background: transparent;
    color: var(--muted); font: 600 1rem/1 var(--font-text); cursor: pointer; transition: background-color .25s, color .25s;
  }
  .finish button[aria-pressed="true"][data-finish="silver"] { background: var(--silver); color: var(--midnight); }
  .finish button[aria-pressed="true"][data-finish="color"],
  .finish button[aria-pressed="true"]:not([data-finish]) { background: var(--gold); color: var(--midnight); }

  /* ---------- Coin object ----------
     .coin tilts toward the pointer, .coin-inner flips, faces sit back to back.
     Finish layers cross-fade: hard-coded coins on their container's data-finish,
     coins from the admin by toggling .on on one image per finish. */
  .coin {
    position: relative; aspect-ratio: 1; border-radius: 50%;
    perspective: 1100px;
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform .6s var(--ease-out);
    filter: drop-shadow(0 28px 32px rgba(0,0,0,.7)) drop-shadow(0 6px 8px rgba(0,0,0,.6));
  }
  .coin.tracking { transition: transform .1s linear; }
  .coin-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .8s var(--ease-out); }
  .coin.flipped .coin-inner { transform: rotateY(180deg); }
  .face { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; backface-visibility: hidden; background: var(--midnight); }
  .face.back { transform: rotateY(180deg); }
  .face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .55s var(--ease-out); }
  [data-finish="silver"] .face img.color,
  [data-finish="color"] .face img.silver { opacity: 0; }
  .face img.fin:not(.on) { opacity: 0; }
  /* Light glinting across the relief: a gradient band moved by background-position, clipped round. */
  .coin::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
    background: linear-gradient(105deg, transparent 42%, rgba(255,236,190,.42) 50%, transparent 58%) no-repeat;
    background-size: 300% 100%;
    background-position: var(--gp, 100%) 0;
    opacity: var(--go, 0);
    transition: opacity .3s;
  }
  .motion .coin.glint::after { animation: glint 1.2s var(--ease-out); }
  @keyframes glint { from { background-position: 100% 0; opacity: 1; } to { background-position: 0% 0; opacity: 1; } }

  /* Coins that aren't round (coins.shape = 'other': rectangles, shields): the whole photo at its own proportions
     (coins.js sets the box's aspect-ratio, 3:4 to 2:1; contain fits a back photo of other proportions), no circle,
     no round shadow, and no glint (its light band would show on the background instead of the metal).
     #tg-black-key (an SVG filter on each page) makes a black background see-through: opacity = 1.6 x (R+G+B) - 0.08,
     so pure black vanishes and anything brighter than a deep shadow stays solid. The edge fade below softens
     what's left, such as a tabletop in a phone photo, which the key leaves alone. */
  .coin.shape-other { border-radius: 0; filter: none; }
  .coin.shape-other::after { display: none; }
  /* In the hero a round coin bleeds off the right edge on purpose; a tight-cropped plaque would lose its edge,
     so it stays inside the column (coins.js puts .shape-other on the figure). */
  .hero-coin.shape-other { margin-right: 0; }
  .hero-coin.shape-other figcaption { padding-right: 0; }
  @media (max-width: 900px) { .hero-coin.shape-other .coin { width: 100%; margin-right: 0; } }
  /* Desktop: a plaque fills its column and reaches into the page's side margin (never past the screen).
     The copy keeps the larger 6fr column at every width: giving the plaque 6fr wrapped the headline to 6 lines. */
  @media (min-width: 1440px) {
    .hero-coin.shape-other { margin-right: calc(var(--gutter) * -1); }
    .hero-coin.shape-other .coin { width: 100%; }
    .hero-coin.shape-other figcaption { padding-right: var(--gutter); }
  }
  .coin.shape-other .face img, .presale-photo.shape-other { filter: url(#tg-black-key); object-fit: contain; }
  .coin.shape-other .face, .presale-photo.shape-other {
    border-radius: 0; background: transparent;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent), linear-gradient(transparent, #000 4%, #000 96%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent), linear-gradient(transparent, #000 4%, #000 96%, transparent);
    mask-composite: intersect;
  }

  /* ---------- Hero ---------- */
  .hero { position: relative; overflow: hidden; overflow: clip; padding: clamp(40px, 7vw, 96px) 0 clamp(72px, 9vw, 120px); }
  .hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(60% 70% at 78% 45%, rgba(199,204,212,.09), transparent 70%);
  }
  .hero .page { position: relative; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: center; gap: clamp(24px, 4vw, 64px); }
  .hero-copy { display: grid; gap: 28px; justify-items: start; }
  .hero-copy .lede { font-size: 1.25rem; }
  .hero-coin { margin: 0; display: grid; gap: 20px; justify-items: center; margin-right: calc(var(--gutter) * -1 - 6vw); }
  .hero-coin .coin { width: min(100%, 640px); }
  /* The coin bleeds off the right edge; the padding keeps the caption (and long finish names) on screen. */
  .hero-coin figcaption { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; color: var(--muted); font-size: 1rem; padding-right: calc(var(--gutter) + 6vw); }

  /* ---------- Collection ---------- */
  .collection { background: linear-gradient(180deg, transparent, rgba(17,26,46,.55) 30%, rgba(17,26,46,.55) 70%, transparent); }
  .section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 40px; margin-bottom: clamp(48px, 6vw, 80px); }
  .section-head > div { display: grid; gap: 14px; max-width: 36em; }
  .tray { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 8vw, 128px); align-items: start; }
  /* width: 100% (up to 480px) so a card pushed right by the stagger below keeps its size instead of shrinking
     to its text: a coin with a short description used to come out small. scroll-margin clears the sticky header on #coin links. */
  .tray li { display: grid; gap: 14px; width: 100%; max-width: 480px; scroll-margin-top: 88px; }
  .tray li:nth-child(even) { margin-top: clamp(0px, 10vw, 150px); justify-self: end; }
  .tray .coin { width: 100%; margin-bottom: 10px; }
  .tray p { color: var(--muted); }
  .tray .coin-group { color: var(--gold); font-weight: 600; font-size: .95rem; }
  .tray .coin-soldout { color: var(--muted); font-weight: 600; font-size: .95rem; }
  .see-all { margin-top: clamp(40px, 6vw, 72px); display: flex; justify-content: center; }

  /* ---------- Spotlight: right after the hero, one stamped word the coin sits in (client request 2026-11-17) ----------
     Custom (default): "Your coin" in two lines, the Texas Ghost badge as the o, copy to the right.
     Presale (.is-presale, set by coins.js): "Presale" across the page, the live coin overlapping it, copy below left.
     --word sizes the stamped word; the badge and the overlap follow it, so the composition scales as one. */
  .spotlight { --word: clamp(4.5rem, 17vw, 18.75rem); overflow-x: clip; }
  .spotlight-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
  .spotlight .spotlight-word { font-size: var(--word); line-height: .86; letter-spacing: .005em; display: flex; flex-direction: column; text-wrap: nowrap; }
  .spotlight-line { display: flex; align-items: flex-end; }
  .spotlight-badge { width: .9em; height: auto; margin: 0 .02em .02em; flex: none; rotate: -6deg;
    filter: drop-shadow(0 28px 32px rgba(0,0,0,.75)) drop-shadow(0 6px 8px rgba(0,0,0,.6)); }
  .spotlight-copy { display: grid; gap: 18px; justify-items: start; }
  .spotlight-lead { margin: 0; font-size: 1.3125rem; font-weight: 600; line-height: 1.25; max-width: 22em; } /* DESIGN.md title step */
  .spotlight-lead::after { content: ""; display: block; width: 96px; height: 2px; margin-top: 18px; background: var(--gold); }
  .spotlight-copy .lede { margin: 0; }
  .spotlight-copy .actions { padding-top: 6px; }

  .spotlight.is-presale { --word: clamp(4rem, 17.5vw, 18.5rem); }
  .spotlight.is-presale .spotlight-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "word word" "copy coin"; align-items: start; }
  .spotlight.is-presale .spotlight-poster { display: contents; }
  .spotlight.is-presale .spotlight-word { grid-area: word; position: relative; z-index: 0; }
  .spotlight.is-presale .spotlight-copy { grid-area: copy; padding-top: clamp(0px, 4vw, 48px); }
  .spotlight-coin { grid-area: coin; justify-self: end; position: relative; z-index: 1; width: min(100%, 680px); height: auto;
    margin-top: calc(var(--word) * -.55); rotate: 4deg; filter: drop-shadow(0 28px 32px rgba(0,0,0,.75)) drop-shadow(0 6px 8px rgba(0,0,0,.6)); }
  .spotlight-coin:not(.shape-other) { width: min(100%, 520px); aspect-ratio: 1; object-fit: cover; border-radius: 50%; rotate: 0deg; }
  .spotlight-coin.shape-other { filter: url(#tg-black-key) drop-shadow(0 28px 32px rgba(0,0,0,.75)) drop-shadow(0 6px 8px rgba(0,0,0,.6)); }

  @media (max-width: 900px) {
    /* One column: the word can take the screen width ("c[badge]in" is about 2.7em wide, "Presale" about 4.4em). */
    .spotlight { --word: clamp(4.5rem, 31vw, 10rem); }
    .spotlight.is-presale { --word: 19vw; }
    .spotlight-grid, .spotlight.is-presale .spotlight-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; }
    .spotlight.is-presale .spotlight-word { grid-area: auto; }
    .spotlight.is-presale .spotlight-copy { grid-area: auto; order: 3; padding-top: 0; }
    .spotlight-coin { grid-area: auto; order: 2; width: min(92%, 520px); margin-top: calc(var(--word) * -.45); }
  }
  /* The gallery packs more coins: an even grid instead of the main page's staggered pairs. */
  .gallery .tray { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: clamp(32px, 4vw, 56px); }
  .gallery .tray li:nth-child(n) { margin-top: 0; justify-self: stretch; max-width: none; }
  .gallery .tray li:nth-child(n) .coin { width: 100%; }
  .gallery-tabs { flex-wrap: wrap; border-radius: 24px; }
  @media (max-width: 480px) { .gallery-tabs button { padding: 8px 11px; } } /* all five fit one row on a phone */
  .gallery-empty { color: var(--muted); }
  .flip-btn { justify-self: start; }

  /* ---------- Live presale lure (coins.js showPresaleLure) ----------
     On phones, a floating Reserve button once the hero scrolls away (the spotlight carries the presale on every screen). */
  .live-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--gold); }
  .motion .live-dot { animation: live-pulse 1.8s ease-out infinite; }
  @keyframes live-pulse { from { box-shadow: 0 0 0 0 rgba(201,154,59,.75); } to { box-shadow: 0 0 0 10px rgba(201,154,59,0); } }
  .presale-fab {
    position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30;
    display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 22px; border-radius: 999px;
    background: var(--blue); color: #fff; font-weight: 600; font-size: 1.0625rem; text-decoration: none;
    box-shadow: 0 12px 28px -8px rgba(0,0,0,.9);
    /* visibility (not display) so the hidden button also leaves the tab order; it flips after the fade. */
    opacity: 0; visibility: hidden; transform: translateY(16px);
    transition: opacity .25s, transform .3s var(--ease-out), visibility 0s .3s;
  }
  .presale-fab.show { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .3s var(--ease-out), visibility 0s; }
  .presale-fab .live-dot { background: #fff; }
  .motion .presale-fab .live-dot { animation-name: live-pulse-white; }
  @keyframes live-pulse-white { from { box-shadow: 0 0 0 0 rgba(255,255,255,.7); } to { box-shadow: 0 0 0 10px rgba(255,255,255,0); } }
  @media (min-width: 651px) { .presale-fab { display: none; } }

  .site-message { margin: 0; padding: 10px var(--gutter); background: var(--gold); color: var(--midnight); font-weight: 600; text-align: center; }

  /* ---------- Presale ---------- */
  .presale-list { list-style: none; margin: 0 0 32px; padding: 0; display: grid; }
  .presale-coin { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; align-items: center; padding: 22px 0; border-top: 1px solid var(--rule); }
  .presale-coin:last-child { border-bottom: 1px solid var(--rule); }
  .presale-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; background: var(--panel); filter: drop-shadow(0 10px 14px rgba(0,0,0,.6)); }
  .presale-info { display: grid; gap: 6px; }
  .presale-desc { color: var(--muted); max-width: 40em; }
  .presale-price { font-weight: 600; }
  .presale-ship { color: var(--muted); margin-top: -4px; }
  .presale-left { color: var(--gold); font-weight: 600; }
  .presale-countdown { font-variant-numeric: tabular-nums; }
  .is-sold-out .presale-left { color: var(--muted); }
  .is-sold-out .presale-photo { filter: grayscale(.8) brightness(.65); }
  .presale-choose { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; margin-top: 6px; }
  .presale-pick-label, .presale-qty-label { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
  .presale-pick { width: 22px; height: 22px; padding: 0; accent-color: var(--gold); }
  .presale-qty { width: auto; min-width: 76px; min-height: 44px; padding: 8px 12px; }
  .presale-limit { color: var(--muted); font-size: 1rem; }
  .presale-form { max-width: 680px; }
  .delivery { display: grid; gap: 4px; margin: 0; padding: 0; border: 0; min-width: 0; }
  .delivery legend { padding: 0; margin-bottom: 4px; font-weight: 600; }
  .delivery label { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 400; cursor: pointer; }
  .ship-fields, .pickup-fields { display: grid; gap: 18px; }
  .ship-fields[hidden], .pickup-fields[hidden] { display: none; }
  .row3 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; }
  .presale-total { font-weight: 600; font-size: 1.125rem; }
  .presale-terms { color: var(--muted); font-size: 1rem; }
  .presale-hold { color: var(--text); font-size: 1rem; }

  .presale-turnstile { margin-block: 1rem; max-width: 100%; overflow-x: auto; } /* the 300px widget fits 375px; scroll rather than overflow if narrower */
  .presale-turnstile:empty { display: none; }
  .presale-status { font-weight: 600; min-height: 1.6em; }
  .presale-status.err { color: var(--error); }
  .presale-confirm { display: grid; gap: 8px; max-width: 680px; margin-bottom: 24px; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--gold); border-radius: 8px; background: var(--panel); }

  /* ---------- Steps: little coins on one strike line ---------- */
  .steps { list-style: none; margin: clamp(40px, 5vw, 64px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; counter-reset: step; position: relative; }
  .steps::before { content: ""; position: absolute; top: 26px; left: 26px; right: 0; height: 1px; background: linear-gradient(90deg, var(--silver), var(--rule)); }
  .steps li { counter-increment: step; position: relative; display: grid; gap: 10px; }
  .steps li::before {
    content: counter(step); display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 14px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #2a3554, var(--midnight)); border: 1px solid var(--silver);
    color: var(--gold); font: 400 1.4rem/1 var(--font-display);
  }
  .steps p { color: var(--muted); max-width: 22em; }

  /* ---------- Valley band ---------- */
  .valley {
    position: relative; padding: clamp(72px, 10vw, 140px) 0;
    background: radial-gradient(ellipse 60% 70% at 75% 50%, rgba(42,99,240,.18), transparent 70%), var(--midnight);
  }
  /* The logo fills the band behind the words, faded so the text stays readable. */
  /* Valley band logo. Phones and tablets: the whole logo under the text (padding in the max-width: 900px rules).
     901px and up: the whole logo, unfaded, just to the right of the text, shrunk to fit. The text column is
     27.5rem (the paragraph; the headline breaks onto two lines), so the logo starts at the container's left edge
     + the gutter + 27.5rem + 32px and fits between there and the right edge, no taller than 300px. */
  .valley::before { content: ""; position: absolute; inset: 24px 16px; background: url("images/logo-wide.webp") center bottom / contain no-repeat; opacity: .32; }
  @media (min-width: 901px) {
    .valley::before {
      top: 50%; bottom: auto; height: min(300px, calc(100% - 48px)); translate: 0 -50%; right: 16px;
      left: calc(max(0px, (100% - 1240px) / 2) + var(--gutter) + 27.5rem + 32px);
      background-position: left center; opacity: .2;
    }
  }
  .valley h2, .valley p { text-shadow: 0 2px 12px var(--midnight), 0 0 4px var(--midnight); }
  .valley .page { position: relative; display: grid; gap: 18px; }
  .valley p { color: var(--text); max-width: 27.5rem; font-size: 1.25rem; }

  /* ---------- Contact ---------- */
  .contact .page { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: stretch; }
  .contact-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
  .prep { margin-top: 20px; display: grid; gap: 4px; width: 100%; max-width: 30em; }
  .prep ul { list-style: none; margin: 8px 0 0; padding: 0; }
  .prep li { position: relative; padding: 12px 0 12px 26px; border-top: 1px solid var(--rule); color: var(--muted); }
  .prep li::before { content: ""; position: absolute; left: 2px; top: 1.15em; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
  .contact-coin { margin-top: auto; align-self: center; padding-top: 32px; width: clamp(220px, 24vw, 340px); }
  .contact-logo { display: block; width: 100%; height: auto; filter: drop-shadow(0 28px 32px rgba(0,0,0,.7)) drop-shadow(0 6px 8px rgba(0,0,0,.6)); }
  .socials { display: flex; flex-wrap: wrap; gap: 12px; }
  .form-off, form { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: clamp(20px, 3vw, 36px); }
  .form-off { display: grid; gap: 20px; }
  .form-off p { color: var(--muted); }
  form { display: grid; gap: 18px; }
  label { display: grid; gap: 6px; font-size: 1rem; font-weight: 600; }
  .hint { font-weight: 400; color: var(--muted); }
  input, select, textarea {
    width: 100%; padding: 12px 14px; border-radius: 4px; border: 1px solid var(--field-edge);
    background: var(--midnight); color: var(--text); font: 400 1.0625rem/1.4 var(--font-text); caret-color: var(--gold);
    transition: border-color .15s, box-shadow .15s;
  }
  input:hover, select:hover, textarea:hover { border-color: var(--field-edge-lift); }
  input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); outline: none; }
  ::placeholder { color: #7d88a0; }
  textarea { min-height: 130px; resize: vertical; }
  input[type="file"] { padding: 8px; color: var(--muted); }
  input[type="file"]::file-selector-button { margin-right: 12px; padding: 8px 14px; border: 1px solid var(--silver); border-radius: 4px; background: transparent; color: var(--silver); font: 600 1rem/1 var(--font-text); cursor: pointer; transition: background-color .15s; }
  input[type="file"]::file-selector-button:hover { background: rgba(199,204,212,.12); }
  .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .hp { position: absolute; left: -9999px; }
  .form-status { font-weight: 600; min-height: 1.6em; }
  .form-status.ok { color: var(--ok); }
  .form-status.err { color: var(--error); }
  .form-status.ok, .form-status.err { animation: status-in .3s var(--ease-out); }
  @keyframes status-in { from { opacity: 0; transform: translateY(4px); } }

  footer { padding: 36px 0 44px; color: var(--muted); font-size: 1rem; border-top: 1px solid var(--rule); }
  /* Footer links are thumb-sized: 16px of text inside a 44px tall target. */
  footer a { display: inline-block; padding-block: 14px; }
  footer .page { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; justify-content: space-between; }

  /* ---------- Orchestrated entrance: the hero coin is struck ----------
     Content is visible by default; these only run once .motion is set in <head>. */
  .motion .hero-coin .coin { animation: strike 1s var(--ease-out) .1s backwards; }
  @keyframes strike {
    from { opacity: 0; transform: perspective(900px) scale(1.14) rotateY(-14deg); filter: blur(10px) brightness(.25); }
  }
  .motion .hero h1 { animation: lift-in .8s var(--ease-out) .25s backwards; }
  @keyframes lift-in { from { clip-path: inset(0 0 100% 0); transform: translateY(.35em); } to { clip-path: inset(-10% -5% -20% -5%); } }
  .motion .hero-copy .lede, .motion .hero-copy .actions, .motion .hero-coin figcaption { animation: fade-in .7s var(--ease-out) .55s backwards; }
  @keyframes fade-in { from { opacity: 0; } }

  /* The spotlight's coin or badge is struck in once, when the section scrolls into view (index.html's observer adds
     .struck). Hidden only while JS can strike it; without motion or IntersectionObserver it simply shows. A plaque keeps
     its black key through the strike so no dark box flashes over the word. */
  .motion.io .spotlight:not(.struck) .spotlight-object { opacity: 0; }
  .motion .spotlight.struck .spotlight-object { animation: strike 1s var(--ease-out) backwards; }
  .motion .spotlight.struck .spotlight-object.shape-other { animation-name: strike-keyed; }
  @keyframes strike-keyed {
    from { opacity: 0; transform: perspective(900px) scale(1.14) rotateY(-14deg); filter: url(#tg-black-key) blur(10px) brightness(.25); }
  }

  /* The strike line is drawn first, then each marker stamps onto it. */
  .motion.io .steps::before { scale: 0 1; transform-origin: left top; transition: scale .9s var(--ease-out); }
  .motion .steps.struck::before { scale: 1; }

  /* ---------- Scroll-linked light (CSS scroll timelines; browsers without them keep the still page) ----------
     Individual translate/rotate properties, so they stack under the pointer tilt (transform) instead of replacing it. */
  @supports (animation-timeline: view()) {
    /* Each coin in the tray turns up toward the light as it enters, settling flat a third of the way up the screen. */
    .motion .tray .coin { animation: turn-up linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
    @keyframes turn-up { from { translate: 0 48px; rotate: x 38deg; } }
    /* Leaving the hero, the coin falls behind the copy: it drifts down and turns slightly away. On the figure,
       so it never competes with the coin's own strike animation. */
    @media (min-width: 901px) { /* on phones the coin sits below the copy and would fade while still being read */
      .motion .hero-coin { animation: hero-recede linear both; animation-timeline: scroll(root); animation-range: 0 90vh; }
    }
    /* Opacity floor .8: the figure carries the caption (Dusk Blue-Gray), which a visitor can stop scrolling on;
       at .8 it still clears 5.77:1 (at .55 it fell to 3.32:1, under WCAG's 4.5:1). */
    @keyframes hero-recede { to { translate: 0 14vh; rotate: y -9deg; opacity: .8; } }
  }

  /* Touch screens have no pointer to tilt toward, so the light rolls across each round coin as it scrolls past,
     rising to full strength mid-screen and fading out. A one-shot glint (.glint, e.g. a finish switch) still wins. */
  @supports (animation-timeline: view()) {
    @media (hover: none) {
      .motion .tray .coin:not(.glint)::after, .motion .hero-coin .coin:not(.glint)::after {
        animation: sweep linear both; animation-timeline: view(); animation-range: cover 15% cover 85%;
      }
      @keyframes sweep { 0% { background-position: 100% 0; opacity: 0; } 50% { opacity: .9; } 100% { background-position: 0% 0; opacity: 0; } }
    }
  }

  /* Small phones: the two hero buttons wrap onto separate lines anyway, so they span the column as a matched pair
     instead of two ragged widths. */
  @media (max-width: 400px) { .hero-copy .actions { display: grid; width: 100%; } }

  /* Sold-out coins in the tray dim like they do in the presale list. On .face, because a plaque's img already
     carries the black-key filter. */
  .tray li:has(.coin-soldout) .face { filter: grayscale(.8) brightness(.65); }

  /* Current section in the nav: brighter text over a silver hairline (set by index.html's section watcher). */
  .nav a { text-decoration: underline 1px transparent; text-underline-offset: 8px; transition: color .15s, text-decoration-color .25s; }
  .nav a[aria-current]:not([aria-current="false"]) { color: var(--text); text-decoration-color: var(--silver); } /* "true" from the watcher, "page" on /gallery */

  .motion.io .steps li::before { transform: scale(1.6); opacity: 0; filter: blur(4px); transition: transform .45s var(--ease-out), opacity .3s, filter .45s var(--ease-out); }
  .motion .steps.struck li::before { transform: none; opacity: 1; filter: none; }
  .motion .steps.struck li:nth-child(2)::before { transition-delay: .12s; }
  .motion .steps.struck li:nth-child(3)::before { transition-delay: .24s; }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn:active { transform: none; }
    .coin { transform: none !important; }
    .coin-inner { transition: none; }
    .form-status.ok, .form-status.err { animation-name: fade-in; }
  }

  /* ---------- Ghost opening intro ----------
     Hidden unless the head script set .tg-intro-pending. .tg-playing runs the 6.2s sequence;
     .tg-hold pauses the hero's own entrance until the smoke starts to clear. */
  .tg-intro { display: none; }
  .tg-intro-pending .tg-intro {
    display: grid; place-items: center; position: fixed; inset: 0; z-index: 40; overflow: hidden;
    background: var(--midnight); pointer-events: none;
    /* Failsafe: if the control script never starts playback, the curtain lifts on its own. */
    animation: tg-wait-failsafe .3s linear 1.6s forwards;
  }
  @keyframes tg-wait-failsafe { to { opacity: 0; visibility: hidden; } }
  /* The intro film covers the screen; on a tall phone screen the sides are cropped toward the ghost and coin
     (object-position 42%). While it plays, the art, its 3D layer and the CSS smoke stand down, and the intro
     fades out over the film's last 0.8s (the script adds .tg-video-out). */
  .tg-intro__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 42% 50%; opacity: 0; pointer-events: none; }
  .tg-video-on .tg-intro { animation: none; opacity: 1; visibility: visible; transition: opacity .8s ease; }
  .tg-video-on .tg-intro__video { opacity: 1; }
  .tg-video-on .tg-intro__figure, .tg-video-on .tg-intro__mist { display: none; }
  .tg-video-on.tg-video-out .tg-intro { opacity: 0; }
  /* Portrait screens: a full-height crop shows only about 31-57% of the frame's width, losing the coin (2s) and
     then the eyes (3.5s) as the camera pushes in. Instead the film runs as a band 160% of the screen wide,
     showing about 18-80% of the frame, its top and bottom fading into the dark. */
  @media (max-aspect-ratio: 4/5) {
    .tg-intro__video {
      inset: auto; top: 50%; left: -28.8vw; width: 160vw; height: auto; aspect-ratio: 16 / 9; translate: 0 -50%;
      -webkit-mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent);
      mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent);
    }
  }
  .tg-intro__skip { position: absolute; bottom: 24px; right: var(--gutter); pointer-events: auto; z-index: 2; }
  .tg-intro__figure {
    height: min(85svh, 880px); max-width: 98vw; object-fit: contain;
    filter: brightness(0); opacity: 0;
    mask-image: linear-gradient(to top, transparent, black 18%);
    -webkit-mask-image: linear-gradient(to top, transparent, black 18%);
    transform-origin: 50% 60%;
  }
  /* Static turbulence shapes the smoke; transforms move the layers without regenerating noise. */
  .tg-intro__mist {
    position: absolute; width: min(1050px, 140vw); height: 80%; opacity: 0;
    border-radius: 46% 63% 38% 75%; mix-blend-mode: screen;
    filter: url(#tg-smoke-texture) blur(8px);
    background: radial-gradient(ellipse at 25% 72%, #a0c3d5b3, transparent 32%), radial-gradient(ellipse at 72% 60%, #5f9fceb3, transparent 35%), radial-gradient(ellipse at 48% 34%, #a6c8dc80, transparent 30%);
  }
  .tg-intro__mist::before, .tg-intro__mist::after {
    content: ""; position: absolute; inset: -10%; border-radius: 50%; filter: blur(12px);
    background: radial-gradient(ellipse at 24% 65%, #c3d5dfb3, transparent 24%), radial-gradient(ellipse at 70% 35%, #89b6d0b3, transparent 27%), radial-gradient(ellipse at 52% 80%, #478bcc99, transparent 34%);
  }
  .tg-intro__mist::after {
    inset: 0 -15%;
    background: radial-gradient(ellipse at 35% 30%, #b9d2e299, transparent 25%), radial-gradient(ellipse at 75% 75%, #80a9c3cc, transparent 30%), radial-gradient(ellipse at 45% 55%, #659dc599, transparent 32%);
  }
  .tg-playing { --tg-duration: 6.2s; }
  .tg-playing .tg-intro { animation: tg-curtain var(--tg-duration) linear both; }
  .tg-playing .tg-intro__figure { animation: tg-reveal var(--tg-duration) cubic-bezier(.4, 0, .2, 1) both; }
  .tg-playing .tg-intro__mist { animation: tg-smoke var(--tg-duration) linear both; }
  .tg-playing .tg-intro__mist::before { animation: tg-smoke-curl var(--tg-duration) ease-in-out both; }
  .tg-playing .tg-intro__mist::after { animation: tg-smoke-countercurl var(--tg-duration) ease-in-out both; }
  @keyframes tg-curtain { 0%, 44% { background: var(--midnight); } 90% { background: transparent; visibility: visible; } 100% { background: transparent; visibility: hidden; } }
  @keyframes tg-reveal {
    0% { opacity: 0; filter: brightness(.35) blur(8px); transform: translateY(12px) scale(.985); }
    24%, 44% { opacity: 1; filter: brightness(1) blur(0); transform: translateY(0) scale(1); }
    60% { opacity: .88; filter: brightness(1) blur(2px); transform: translateY(-4px) scale(1.005); }
    80% { opacity: .22; filter: brightness(1) blur(12px); transform: translateY(-14px) scale(1.025); }
    96%, 100% { opacity: 0; filter: brightness(1) blur(22px); transform: translateY(-24px) scale(1.04); }
  }
  @keyframes tg-smoke {
    0%, 28% { opacity: 0; transform: translateY(70px) scale(.85) rotate(-8deg); }
    48% { opacity: .55; transform: translateY(28px) scale(1) rotate(-3deg); }
    65% { opacity: .95; transform: translateY(-10px) scale(1.15) rotate(2deg); }
    82% { opacity: .55; transform: translateY(-60px) scale(1.35) rotate(7deg); }
    100% { opacity: 0; transform: translateY(-110px) scale(1.55) rotate(12deg); }
  }
  @keyframes tg-smoke-curl { 0%, 25% { transform: translate(-7%, 15%) rotate(-18deg) scale(.8); } 70% { transform: translate(5%, -5%) rotate(12deg) scale(1.15); } 100% { transform: translate(12%, -20%) rotate(28deg) scale(1.4); } }
  @keyframes tg-smoke-countercurl { 0%, 25% { transform: translate(10%, 18%) rotate(20deg) scale(.75); } 70% { transform: translate(-6%, -8%) rotate(-15deg) scale(1.2); } 100% { transform: translate(-15%, -25%) rotate(-30deg) scale(1.5); } }
  /* The hero's own entrance waits, paused at its first frame, until the intro releases it. */
  .tg-hold .hero-coin .coin, .tg-hold .hero h1, .tg-hold .hero-copy .lede, .tg-hold .hero-copy .actions, .tg-hold .hero-coin figcaption { animation-play-state: paused; }
  /* Phones keep layered smoke but skip the large turbulence surface and animated character blur. */
  @media (max-width: 650px) {
    .tg-intro__figure { height: auto; width: 100%; max-height: 78svh; }
    .tg-intro__mist { width: 100vw; height: 60%; filter: blur(8px); mix-blend-mode: normal; }
    .tg-intro__mist::before { display: none; }
    .tg-intro__mist::after { filter: none; inset: 0; }
    .tg-playing .tg-intro__figure { filter: none !important; }
  }
  @media (prefers-reduced-motion: reduce) {
    .tg-intro { display: none !important; }
    .tg-hold .hero-coin .coin, .tg-hold .hero h1, .tg-hold .hero-copy .lede, .tg-hold .hero-copy .actions, .tg-hold .hero-coin figcaption { animation-play-state: running; }
  }

  /* ---------- Narrow screens ---------- */
  @media (max-width: 900px) {
    .nav { display: none; }
    .hero .page { grid-template-columns: 1fr; }
    .hero-coin { margin-right: 0; justify-items: end; } /* after the copy, so the headline and Request a custom coin open the screen */
    .valley { padding-bottom: calc(26vw + 40px); }
    .hero-coin .coin { width: min(112vw, 560px); margin-right: -18vw; }
    .hero-coin figcaption { justify-self: start; justify-content: start; padding-right: 0; }
    .tray li:nth-child(even) { margin-top: 72px; }
    .contact .page { grid-template-columns: 1fr; }
    .contact-coin { display: none; }
  }
  @media (max-width: 600px) {
    .brand-main { font-size: 1rem; }
    .brand-sub { font-size: .75rem; }
    .tray { grid-template-columns: 1fr; }
    /* One column: every card spans the width. The desktop stagger (even cards justify-self: end) would
       otherwise shrink a card to its text, so a coin with a short description came out small. */
    .tray li:nth-child(n) { margin-top: 0; max-width: none; justify-self: stretch; }
    .tray li:nth-child(even) .coin { width: 82%; justify-self: end; }
    .tray li:nth-child(odd) .coin { width: 82%; }
    .steps { grid-template-columns: 1fr; gap: 28px; }
    .presale-coin { grid-template-columns: 84px minmax(0, 1fr); gap: 16px; }
    .presale-photo { width: 84px; height: 84px; }
    .steps::before { top: 26px; bottom: 26px; left: 26px; right: auto; width: 1px; height: auto; background: linear-gradient(180deg, var(--silver), var(--rule)); }
    .motion.io .steps:not(.struck)::before { scale: 1 0; }
    .steps li { grid-template-columns: 52px 1fr; column-gap: 18px; }
    .steps li::before { grid-row: span 2; margin: 0; }
    .row2 { grid-template-columns: 1fr; }
    .row3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .row3 > :first-child { grid-column: 1 / -1; }
  }

  /* ---------- Valley strip: a slanted band of names from the coins, scrolling sideways (moved from v2) ----------
     The list is repeated 6x in index.html so one half is wider than any screen; translateX(-50%) wraps seamlessly.
     Still without motion for reduced-motion visitors (.motion is never set). */
  .marquee {
    position: relative; z-index: 1; overflow: hidden; transform: rotate(-2deg); margin: 0 -2vw;
    background: var(--panel); border-block: 1px solid rgba(201,154,59,.45);
    box-shadow: 0 18px 40px -20px rgba(0,0,0,.9);
  }
  .marquee-track { display: flex; width: max-content; padding: 16px 0; }
  .marquee span { display: inline-flex; align-items: center; font: 400 clamp(1.1rem, 2.4vw, 1.6rem)/1 var(--font-display); text-transform: uppercase; color: var(--silver); white-space: nowrap; }
  .marquee span::after { content: "\2726"; color: var(--gold); margin: 0 clamp(18px, 3vw, 36px); font-size: .7em; }
  .motion .marquee-track { animation: marquee 80s linear infinite; /* ~42px/s across one 3-set copy */ }
  /* Anything that moves for more than 5 seconds can be paused: on hover, and with the control (the keyboard's way in;
     pausing on focus too would make its Play do nothing while it has focus). */
  .marquee-wrap { position: relative; }
  .marquee-wrap:hover .marquee-track, .marquee-wrap.paused .marquee-track { animation-play-state: paused; }
  .marquee-toggle {
    position: absolute; right: var(--gutter); top: 50%; z-index: 2; translate: 0 -50%;
    display: none; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 1px solid var(--gold); border-radius: 50%; background: var(--panel); cursor: pointer;
  }
  .motion .marquee-toggle { display: grid; } /* nothing moves without .motion, so no control */
  .marquee-toggle::before { content: ""; box-sizing: border-box; width: 12px; height: 14px; border-inline: 4px solid var(--silver); } /* pause bars */
  .marquee-toggle[aria-pressed="true"]::before { width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent var(--silver); } /* play triangle */
  .marquee-toggle:hover { background: var(--rule); }
  @keyframes marquee { to { transform: translateX(-50%); } }
  /* The slanted strip overhangs both edges. overflow-x: clip (not hidden) trims it without making <main> a
     scroll container, which would break position: sticky inside it. */
  main { overflow-x: clip; }

  /* ---------- 3D ghost (ghost3d.js) ----------
     The WebGL canvas stacks on the flat ghost img in the intro's grid cell and shares its reveal animation.
     The img hides only once WebGL has drawn, so any failure leaves the original intro. */
  .tg-intro__figure { grid-area: 1 / 1; }
  .tg-3d #tg-figure { visibility: hidden; }
