/* ==========================================================================
   Anvil & Pixel — site.css
   One stylesheet for every page. Sections:
   1. Font  2. Tokens (light + dark)  3. Base  4. Layout + header/footer
   5. Buttons, cards, chips  6. Hero + medal  7. Apps  8. Story (sticky)
   9. Awards + pricing  10. Shop  11. Order form  12. About  13. Doc pages
   14. Motion helpers  15. Reduced motion  16. Phones: section nav + swipe rows
   Colors match XC Dash (navy + one orange accent). Change colors only in
   section 2.
   ========================================================================== */

/* 1. Font: Archivo (SIL OFL 1.1, see /assets/fonts/OFL-Archivo.txt),
   self-hosted, subset to Latin, weights 400–800, widths 100–125. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 400 800;
  font-stretch: 100% 125%;
  src: url("/assets/fonts/archivo.woff2") format("woff2");
}

/* 2. Tokens ---------------------------------------------------------------- */
:root {
  color-scheme: light dark;

  /* Color (light): "Graphite and copper" (Matt, 2026-11-23). See claude/COLORS.md. */
  --bg: #F3F1EE;            /* warm off-white */
  --bg-raised: #FBFAF8;
  --surface: #FFFFFF;
  --text: #1E1F23;          /* graphite, 14.6:1 on --bg */
  --muted: #55565C;         /* 6.5:1 on --bg */
  --line: #D9D5CF;
  --line-strong: #1E1F23;
  --accent: #C8743A;        /* the one accent: brushed copper */
  --accent-hover: #D6854B;
  --on-accent: #1E1F23;     /* graphite on copper = 4.7:1 */
  --accent-text: #9E5B2C;   /* copper you can read on light bg (4.7:1) */
  --success: #17703F;
  --danger: #B3261E;
  --field-bg: #FFFFFF;
  --field-border: #BDB8B1;
  --shadow: 0 1px 0 rgba(30,31,35,.05), 0 24px 48px -28px rgba(30,31,35,.35);
  --shadow-lift: 0 1px 0 rgba(30,31,35,.05), 0 36px 60px -30px rgba(30,31,35,.45);
  --glow: rgba(200,116,58,.18);
  --glass: rgba(251,250,248,.78);

  /* Type: same scale as XC Dash */
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text-xs: .75rem;   /* 12 */
  --text-sm: .875rem;  /* 14 */
  --text-md: 1rem;     /* 16 */
  --text-lg: 1.125rem; /* 18 */
  --text-xl: 1.375rem; /* 22 */
  --text-2xl: 1.75rem; /* 28 */
  --display-1: clamp(2.6rem, 7vw, 5.25rem);
  --display-2: clamp(2rem, 4.4vw, 3.25rem);

  /* Space: 4 8 12 16 24 32 48 64 96 */
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem; --space-8: 4rem; --space-9: 6rem;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 28px);
  --header-h: 64px;
  --subnav-h: 48px;         /* phone section bar under the header */
  --control-h: 48px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* Dark: graphite night with a warm copper glow and glass cards. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0E10;
    --bg-raised: #17171A;
    --surface: rgba(255,255,255,.045);
    --text: #F3F2F0;
    --muted: #A9A7A3;
    --line: rgba(255,255,255,.12);
    --line-strong: rgba(255,255,255,.7);
    --accent-text: #E39A64;
    --success: #5BD08C;
    --danger: #FF8A80;
    --field-bg: rgba(255,255,255,.06);
    --field-border: rgba(255,255,255,.22);
    --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 24px 60px -30px rgba(0,0,0,.9);
    --shadow-lift: 0 1px 0 rgba(255,255,255,.06) inset, 0 36px 70px -30px rgba(0,0,0,.95);
    --glow: rgba(200,116,58,.22);
    --glass: rgba(14,14,16,.72);
  }
}

/* 3. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (prefers-color-scheme: dark) {
  body {
    background:
      radial-gradient(1100px 680px at 8% 0%, rgba(150,150,160,.10), transparent 62%),
      radial-gradient(900px 600px at 100% 40%, rgba(200,116,58,.10), transparent 60%),
      var(--bg);
  }
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
p { margin: 0 0 var(--space-4); }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; }
h1 { font-size: var(--display-1); font-weight: 800; font-stretch: 122%; letter-spacing: -0.035em; line-height: .98; }
h2 { font-size: var(--display-2); font-weight: 750; font-stretch: 118%; letter-spacing: -0.03em; line-height: 1.04; }
h3 { font-size: var(--text-xl); font-weight: 700; font-stretch: 108%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--on-accent); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 100;
  background: var(--text); color: var(--bg); padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--space-3); }

/* 4. Layout, header, footer -------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 10vw, 120px) 0; position: relative; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 44rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: var(--text-lg); margin-top: var(--space-4); }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: var(--space-4);
}
.eyebrow::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); align-self: flex-start; margin-top: .45em; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; text-decoration: none; border-radius: 6px; flex: none; }
.brand img { width: 200px; height: auto; }
.nav { display: flex; align-items: center; gap: var(--space-2); }
.nav-links { display: flex; gap: var(--space-1); list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-3);
  text-decoration: none; font-weight: 600; font-size: var(--text-sm); color: var(--muted);
  border-radius: var(--radius-pill); transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.menu-toggle { display: none; }
@media (max-width: 860px) {
  .brand img { width: 172px; }
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: var(--radius-pill);
    border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer;
  }
  .menu-toggle svg { width: 20px; height: 20px; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; padding: var(--space-2) var(--gutter) var(--space-5);
    background: var(--bg-raised); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav-links a { width: 100%; font-size: var(--text-md); padding: 0 var(--space-3); }
  html.js .nav-links:not(.is-open) { display: none; }
  .nav .button-sm { display: none; }
}

.site-footer { border-top: 1px solid var(--line); padding: var(--space-8) 0 var(--space-7); color: var(--muted); font-size: var(--text-sm); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-6); }
.footer-grid h2 { font-size: var(--text-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text); margin-bottom: var(--space-3); font-stretch: 100%; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.footer-grid a { display: inline-block; padding: var(--space-1) 0; text-decoration: none; }
.footer-grid a:hover { color: var(--text); text-decoration: underline; }
.footer-brand img { width: 170px; margin-bottom: var(--space-3); }
.footer-brand p { max-width: 24rem; }
.footer-brand .motto { color: var(--text); font-weight: 600; }
.footer-bottom { margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* 5. Buttons, cards, chips -------------------------------------------------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--control-h); padding: 0 var(--space-5);
  border-radius: var(--radius-pill); border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: var(--text-md); line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.button svg { width: 18px; height: 18px; flex: none; }
.button-primary { background: var(--text); color: var(--bg); }
.button-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.button-accent { background: var(--accent); color: var(--on-accent); }
.button-accent:hover { background: var(--accent-hover); transform: translateY(-1px); }
.button-quiet { background: transparent; color: var(--text); border-color: var(--line); }
.button-quiet:hover { background: var(--surface); border-color: var(--muted); }
.button-sm { min-height: 40px; padding: 0 var(--space-4); font-size: var(--text-sm); }
.button:disabled { opacity: .6; cursor: progress; transform: none; box-shadow: none; }
.button[aria-disabled="true"] { cursor: not-allowed; color: var(--muted); border-style: dashed; background: transparent; transform: none; box-shadow: none; }
.button-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
@media (prefers-color-scheme: dark) {
  .card { background: var(--surface); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
}
/* Keep absolutely positioned bits (e.g. screen-reader labels) inside their card,
   so off-screen cards in a swipe row never widen the page. */
.card { position: relative; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-xs); font-weight: 700; letter-spacing: .04em;
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
}
.chip-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.chip-soon::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.text-link { color: var(--accent-text); font-weight: 600; }

/* 6. Hero + medal ------------------------------------------------------------ */
.hero { position: relative; padding: clamp(32px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); overflow: hidden; }
.hero + .section { padding-top: clamp(40px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.hero h1 { margin-bottom: var(--space-5); font-size: clamp(2.5rem, 6.2vw, 4.6rem); }
.hero h1 span { display: block; }
.hero h1 .accent { color: var(--accent-text); }
.lede { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 33rem; margin-bottom: var(--space-6); }
.lede strong { color: var(--text); font-weight: 600; }
.hero-meta { margin-top: var(--space-6); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); color: var(--muted); font-size: var(--text-sm); list-style: none; padding: 0; }
.hero-meta li { display: inline-flex; align-items: center; gap: var(--space-2); }
.hero-meta svg { width: 16px; height: 16px; color: var(--accent-text); }

.hero-visual { position: relative; aspect-ratio: 1; max-width: 460px; width: 100%; justify-self: center; }
.hero-glow {
  position: absolute; inset: 6%; border-radius: 50%;
  background: radial-gradient(circle at 50% 55%, var(--glow), transparent 68%);
  filter: blur(8px);
}
.pixel {
  position: absolute; width: 14px; height: 14px; border-radius: 3px; background: var(--accent);
  will-change: transform;
}
.pixel.p1 { top: 12%; left: 8%; }
.pixel.p2 { top: 20%; right: 6%; width: 10px; height: 10px; background: var(--text); opacity: .8; }
.pixel.p3 { bottom: 16%; left: 2%; width: 9px; height: 9px; background: var(--text); opacity: .6; }
.pixel.p4 { bottom: 10%; right: 14%; width: 18px; height: 18px; }
.pixel.p5 { top: 46%; right: -2%; width: 7px; height: 7px; }

/* The medal: a ribbon (2D) and a disc that spins in 3D. Thickness comes from
   stacked edge layers, so it reads as solid metal while it turns. */
.medal-stage { position: absolute; inset: 0; }
/* The rig: a static V ribbon that ends in a jump ring, and the medal that spins
   beneath it. Measurements are % of the square stage. */
.medal-rig { position: absolute; inset: 4% 0 -4% 0; perspective: 1100px; }
.ribbon .rb-a { fill: #1E1F23; }
.ribbon .rb-b { fill: #C8743A; }
@media (prefers-color-scheme: dark) { .ribbon .rb-a { fill: #4A4B52; } }
.ribbon { position: absolute; top: 0; left: 27%; width: 46%; height: auto; }
/* The ring is centered under where the straps meet; its top stroke covers the
   strap ends and its bottom stroke runs through the medal's lug hole. */
.ring { position: absolute; top: 15%; left: 46%; width: 8%; height: auto; }
.medal {
  position: absolute; left: 21%; top: 28%; width: 58%; aspect-ratio: 1;
  transform-style: preserve-3d;
  transform: rotateY(-18deg);
}
/* The lug is a short solid slab with a hole; the ring passes through it. Its
   layers are stacked in Z like the disc edge so it keeps thickness edge-on. */
.medal-lug {
  position: absolute; left: 43.55%; width: 12.9%; top: -16.1%; height: 18%;
  transform-style: preserve-3d;
}
.medal-lug i {
  position: absolute; inset: 0; background: #9C5218;
  border-radius: 50% 50% 0 0 / 36% 36% 0 0;
  -webkit-mask: radial-gradient(ellipse 21.6% 15.6% at 50% 36%, transparent 98%, #000 100%);
  mask: radial-gradient(ellipse 21.6% 15.6% at 50% 36%, transparent 98%, #000 100%);
}
.medal-lug i:nth-child(1) { transform: translateZ(7px); background: #D9935A; }
.medal-lug i:nth-child(2) { transform: translateZ(5px); }
.medal-lug i:nth-child(3) { transform: translateZ(3px); background: #8F4A15; }
.medal-lug i:nth-child(4) { transform: translateZ(1px); background: #874613; }
.medal-lug i:nth-child(5) { transform: translateZ(-1px); background: #874613; }
.medal-lug i:nth-child(6) { transform: translateZ(-3px); background: #8F4A15; }
.medal-lug i:nth-child(7) { transform: translateZ(-5px); }
.medal-lug i:nth-child(8) { transform: translateZ(-7px); background: #D9935A; }
.medal-face, .medal-edge {
  position: absolute; inset: 0; border-radius: 50%;
  backface-visibility: hidden;
}
.medal-edge { backface-visibility: visible; background: #B8641F; }
.medal-face svg { width: 100%; height: 100%; }
.medal-mark { position: absolute; left: 50%; top: 50%; width: 64%; height: auto; transform: translate(-52%, -50%); }
.medal-face.back { transform: rotateY(180deg) translateZ(7px); }
.medal-face.front { transform: translateZ(7px); }
.medal-edge.e1 { transform: translateZ(5px); background: #9C5218; }
.medal-edge.e2 { transform: translateZ(3px); background: #8F4A15; }
.medal-edge.e3 { transform: translateZ(1px); background: #874613; }
.medal-edge.e4 { transform: translateZ(-1px); background: #874613; }
.medal-edge.e5 { transform: translateZ(-3px); background: #8F4A15; }
.medal-edge.e6 { transform: translateZ(-5px); background: #9C5218; }
.medal-shadow {
  position: absolute; bottom: 4%; left: 50%; width: 46%; height: 6%;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(30,31,35,.28), transparent);
  animation: shadow-breathe 7s ease-in-out infinite;
}
@media (prefers-color-scheme: dark) { .medal-shadow { background: radial-gradient(closest-side, rgba(0,0,0,.7), transparent); } }
@keyframes medal-spin { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }
/* Motion only when JS confirms it is wanted (html.motion). */
html.motion .medal { animation: medal-spin 14s linear infinite; }
@keyframes shadow-breathe { 50% { transform: translateX(-50%) scale(.85); opacity: .7; } }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { max-width: 250px; order: -1; margin: calc(var(--space-4) * -1) auto calc(var(--space-5) * -1); }
}

/* Two halves band */
.halves { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
.half { padding: clamp(24px, 4vw, 40px); position: relative; overflow: hidden; text-decoration: none; display: block; }
.half h3 { font-size: var(--text-2xl); margin: var(--space-2) 0 var(--space-3); }
.half p { color: var(--muted); margin: 0 0 var(--space-4); max-width: 28rem; }
.half .arrow { font-weight: 600; color: var(--accent-text); display: inline-flex; gap: 6px; align-items: center; }
.half .arrow svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.half:hover .arrow svg { transform: translateX(4px); }
.half-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--text); color: var(--bg); }
.half-icon svg { width: 26px; height: 26px; }
@media (max-width: 720px) { .halves { grid-template-columns: 1fr; } }

/* 7. Apps ------------------------------------------------------------------- */
.app-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--space-5); min-height: 420px; }
.app-card { grid-column: span 4; padding: clamp(24px, 3.4vw, 36px); display: flex; flex-direction: column; gap: var(--space-4); }
.app-card.is-featured { grid-column: span 8; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); align-items: center; }
.app-info { display: flex; flex-direction: column; gap: var(--space-4); height: 100%; }
.app-card .app-top { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.app-icon { width: 52px; height: 52px; border-radius: 14px; flex: none; }
.app-card h3 { font-size: var(--text-2xl); }
.app-tagline { color: var(--muted); margin: 0; }
.app-features { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); font-size: var(--text-sm); }
.app-features li { display: flex; gap: var(--space-2); align-items: flex-start; }
.app-features li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: .55em; border-radius: 2px; background: var(--accent); }
.app-card .button-row { margin-top: auto; padding-top: var(--space-2); }
.app-card.is-soon { border-style: dashed; background: transparent; box-shadow: none; justify-content: center; }
.shots { position: relative; display: flex; justify-content: center; gap: 0; min-height: 300px; }
.shot {
  width: 46%; max-width: 170px; aspect-ratio: 9 / 19; border-radius: 22px;
  background: var(--bg); border: 6px solid var(--text);
  box-shadow: var(--shadow-lift);
  display: flex; flex-direction: column; gap: 6px; padding: 14px 10px; overflow: hidden;
}
.shot:nth-child(1) { transform: rotate(-6deg) translateY(10px); margin-right: -8%; }
.shot:nth-child(2) { transform: rotate(5deg) translateY(-6px); z-index: 1; }
.shot i { display: block; height: 10px; border-radius: 4px; background: var(--line); }
.shot i.t { height: 16px; width: 70%; background: var(--text); opacity: .85; }
.shot i.a { width: 40%; background: var(--accent); }
.shot i.b { height: 56px; border-radius: 10px; }
.shot i.s { width: 60%; }
.shot-label { margin-top: auto; font-size: 10px; color: var(--muted); text-align: center; line-height: 1.3; }
@media (max-width: 960px) {
  .app-card, .app-card.is-featured { grid-column: 1 / -1; }
  .app-card.is-featured { grid-template-columns: 1fr; }
}
.loading-note { grid-column: 1 / -1; color: var(--muted); }

/* 8. Story: how a custom order works ------------------------------------------
   With motion (every screen size): ONE continuous scene in a sticky stage. JS (site.js, story code) turns scroll
   progress into numbers 0..1 and writes them as custom properties on .story-pin (--p, then one per part of the
   scene: --f1 field one fills in, --fly card flies, --win window opens, --lift plaque lifts, --pr print sweep ...).
   Everything below is only transform / opacity as a function of those numbers, so scrolling back plays it in
   reverse. The scene is drawn in a fixed 520 x 520 "world" that JS scales to the stage (--s).
   Without motion or JS: no stage, each step is a card with its own still frame (2 x 2 on wide screens). */
.story {
  /* Product colours for the plaque (wood is wood in light and dark). Everything else uses the site tokens. */
  --wood-1: #B07C45; --wood-2: #7A4E25; --wood-3: #5E3A19; --wood-edge: #4A2D12;
  --uv-1: #7C6CFF; --uv-2: #4FA3FF; --carriage: #2A2B30; --carriage-hi: #3B3C44;
  --mac-r: #E8635A; --mac-y: #EBB944; --mac-g: #5CB85C;
  --pin-top: var(--header-h);
  /* animation inputs (0..1 unless noted); JS overwrites these on .story-pin */
  --p: 0; --f1: 0; --f2: 0; --f3: 0; --ch1: 0; --ch2: 0; --snd: 0; --fly: 0; --cf: 0; --win: 0; --pl: 0; --sel: 0;
  --qt: 0; --an: 0; --cur: 0; --ab: 0; --ap: 0; --pay: 0; --rec: 0; --lift: 0; --pr: 1; --pv: 1; --sw: 0; --rd: 0;
  --ry: 0; --rx: 0; --cp1: 1; --cp2: 0; --cp3: 0; --cp4: 0; --r1: 0; --r2: 0; --r3: 0; --r4: 0; --s: 1;
}
.story-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.story-art, .rail { display: none; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-5); }
.step {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  padding: var(--space-5); background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow);
}
.step-num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: var(--text); color: var(--bg); font-weight: 800; margin-bottom: var(--space-4);
}
.step h3 { font-size: var(--text-xl); margin-bottom: var(--space-3); }
.step p { color: var(--muted); font-size: var(--text-md); margin: 0 0 var(--space-4); }
.step-scene { display: block; width: 100%; height: auto; margin-top: auto; border-radius: var(--radius-sm); background: radial-gradient(ellipse at 50% 40%, var(--glow), transparent 70%); }
@media (min-width: 721px) { .steps { grid-template-columns: 1fr 1fr; } }

/* Still-frame paint classes (the static cards): colours from the site tokens. */
.story svg text { font-family: var(--font); }
.story .b { font-weight: 800; }
.story .t-xs { font-size: 12px; } .story .t-sm { font-size: 14px; } .story .t-md { font-size: 17px; }
.story .t-lg { font-size: 22px; } .story .t-xl { font-size: 30px; }
.story .f-card { fill: var(--bg-raised); } .story .f-bg { fill: var(--bg); }
.story .f-text { fill: var(--text); } .story .f-muted { fill: var(--muted); }
.story .f-accent { fill: var(--accent); } .story .f-on { fill: var(--on-accent); }
.story .f-succ { fill: var(--success); } .story .f-line { fill: var(--line); }
.story .s-line { stroke: var(--line); } .story .s-text { stroke: var(--text); }
.story .s-muted { stroke: var(--muted); } .story .s-accent { stroke: var(--accent); }
.story .s-succ { stroke: var(--success); }
.story .chip-s { fill: var(--bg); stroke: var(--line); stroke-width: 2; }
.story .note { fill: var(--glow); stroke: var(--accent); stroke-width: 1.5; }
.story .wood { fill: url(#woodg); }
.story .carriage { fill: #2A2B30; } .story .carriage-head { fill: #3B3C44; stroke: #6B6C75; stroke-width: 1.5; }

/* ---- Motion: the scrubbed scene ---------------------------------------------------- */
html.motion .story-track { position: relative; height: 440svh; }
html.motion .story-pin {
  position: sticky; top: var(--pin-top); height: calc(100svh - var(--pin-top)); display: flex; align-items: center;
}
html.motion .story-grid {
  width: 100%; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center; gap: clamp(24px, 5vw, 72px);
}
html.motion .story-art { display: block; order: 2; justify-self: center; width: 100%; }
html.motion .story-text { order: 1; }
html.motion .stage {
  position: relative; margin: 0 auto; aspect-ratio: 1; overflow: clip;
  width: min(100%, 560px, calc(100svh - var(--pin-top) - 40px));
}
.world { position: absolute; left: 0; top: 0; width: 520px; height: 520px; transform: scale(var(--s)); transform-origin: 0 0; font-family: var(--font); }
.world > *, .w-persp > * { position: absolute; }
.w-persp { inset: 0; perspective: 1600px; perspective-origin: 50% 46%; }
.world b, .world small, .world span { font-family: inherit; }
.world i { font-style: normal; display: block; }
.world svg { display: block; }

/* Glow + ground shadow */
.w-glow {
  left: 40px; top: 40px; width: 440px; height: 440px; z-index: 0; border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 68%);
  opacity: calc(.45 + var(--lift) * .55); transform: scale(calc(.9 + var(--lift) * .15));
}
.w-ground {
  left: 120px; top: 392px; width: 280px; height: 40px; z-index: 1;
  background: radial-gradient(ellipse at center, rgba(20,16,12,.5), transparent 68%);
  opacity: calc(var(--lift) * .8); transform: scale(calc(.6 + var(--lift) * .4));
}

/* Step 1: the order request card */
.req {
  z-index: 8; left: 100px; top: 64px; width: 320px; height: 336px; padding: 0 16px 16px;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lift);
  display: flex; flex-direction: column; gap: 10px;
  transform: translate3d(calc(var(--fly) * -60px), calc(var(--fly) * 52px), 0) rotate(calc(var(--fly) * -5deg)) scale(calc(1 - var(--fly) * .7));
  opacity: calc(1 - var(--cf)); will-change: transform, opacity;
}
.req-head { display: flex; align-items: center; gap: 8px; height: 48px; margin: 0 -16px 2px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.req-head b { font-size: 15px; color: var(--text); font-weight: 800; flex: 1; }
.req-head span { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.pip { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.fld { min-width: 0; }
.fld small { display: block; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .04em; margin-bottom: 4px; }
.inp {
  position: relative; display: flex; align-items: center; height: 36px; padding: 0 10px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line); overflow: hidden;
}
.val { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; }
.val-1 { clip-path: inset(0 calc((1 - var(--f1)) * 100%) 0 0); }
.val-2 { clip-path: inset(0 calc((1 - var(--f2)) * 100%) 0 0); }
.val-3 { clip-path: inset(0 calc((1 - var(--f3)) * 100%) 0 0); }
.ok { position: absolute; right: 8px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--success); }
.ok::after { content: ""; position: absolute; left: 5px; top: 3px; width: 4px; height: 7px; border: solid var(--bg-raised); border-width: 0 2px 2px 0; transform: rotate(40deg); }
.ok-1 { opacity: calc((var(--f1) - .75) * 4); } .ok-2 { opacity: calc((var(--f2) - .75) * 4); } .ok-3 { opacity: calc((var(--f3) - .75) * 4); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tgs { display: flex; gap: 10px; }
.tg {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; font-size: 14px; font-weight: 800; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); box-shadow: 0 8px 14px -10px rgba(0,0,0,.4);
}
.tg svg { width: 20px; height: 20px; }
.tg-1 svg circle { fill: var(--accent); } .tg-1 svg path { fill: var(--on-accent); }
.tg-2 svg rect { fill: none; stroke: var(--muted); stroke-width: 1.6; } .tg-2 svg path { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tg-1 { opacity: var(--ch1); transform: translateY(calc((1 - var(--ch1)) * -40px)); }
.tg-2 { opacity: var(--ch2); transform: translateY(calc((1 - var(--ch2)) * -40px)); }
.send {
  margin-top: auto; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--accent); color: var(--on-accent);
  font-size: 14px; font-weight: 800; transform: scale(calc(1 - var(--snd) * .06));
}

/* Step 2: the app window */
.win {
  z-index: 2; left: 20px; top: 76px; width: 480px; height: 336px; border-radius: 14px; overflow: hidden;
  background: var(--bg-raised); border: 1px solid var(--line); box-shadow: var(--shadow-lift);
  transform-origin: 50% 100%; will-change: transform, opacity;
  opacity: calc(var(--win) * (1 - var(--rec)));
  transform: translate3d(0, calc((1 - var(--win)) * 70px - var(--rec) * 40px), calc(var(--rec) * -320px)) rotateX(calc((1 - var(--win)) * 55deg)) scale(calc(.92 + var(--win) * .08));
}
.win-bar { position: relative; display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; background: var(--bg); border-bottom: 1px solid var(--line); }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: var(--mac-r); } .dot-y { background: var(--mac-y); } .dot-g { background: var(--mac-g); }
.url {
  position: absolute; left: 50%; top: 9px; width: 230px; height: 22px; margin-left: -115px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--bg-raised); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted);
}
.url svg { width: 11px; height: 11px; } .url svg rect { fill: var(--muted); } .url svg path { stroke: var(--muted); stroke-width: 1.4; }
.win-tools { display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.tab { display: inline-grid; place-items: center; height: 24px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.tab.is-on { background: var(--text); color: var(--bg); }
.tool-sp { flex: 1; }
.tool-btn {
  display: inline-grid; place-items: center; height: 26px; width: 76px; border-radius: 8px; background: var(--accent); color: var(--on-accent);
  font-size: 12px; font-weight: 800; transform: scale(calc(1 - var(--ab) * .08));
}
.win-body { display: grid; grid-template-columns: 360px 1fr; height: calc(100% - 80px); }
.canvas { background: var(--bg); background-image: radial-gradient(var(--line) 1px, transparent 1.4px); background-size: 16px 16px; }
.insp { display: flex; flex-direction: column; gap: 12px; padding: 14px 12px; border-left: 1px solid var(--line); min-width: 0; }
.insp .row small { display: block; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .04em; margin-bottom: 2px; }
.insp .row b { display: block; font-size: 13px; font-weight: 800; color: var(--text); white-space: nowrap; }
.quote {
  margin-top: auto; padding: 10px 12px; border-radius: 12px; background: var(--accent); color: var(--on-accent);
  opacity: var(--qt); transform: translateX(calc((1 - var(--qt)) * 44px));
}
.quote small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.quote b { display: block; font-size: 30px; line-height: 1.05; font-weight: 800; }

/* The plaque: a wood blank in 3D. The artwork is UV-printed straight onto the wood (no extra layer). */
.sel {
  z-index: 3; left: 130px; top: 198px; width: 140px; height: 172px; border: 1.5px solid var(--accent); border-radius: 3px;
  opacity: calc(var(--sel) * (1 - var(--rec) * 3));
}
.h { position: absolute; width: 8px; height: 8px; background: var(--bg-raised); border: 1.5px solid var(--accent); border-radius: 2px; }
.h1 { left: -5px; top: -5px; } .h2 { right: -5px; top: -5px; } .h3 { left: -5px; bottom: -5px; } .h4 { right: -5px; bottom: -5px; }
.dim {
  position: absolute; left: 50%; bottom: -30px; margin-left: -36px; width: 72px; height: 20px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800;
}
.plaque {
  z-index: 4; left: 132px; top: 70px; width: 256px; height: 320px; transform-style: preserve-3d; opacity: var(--pl);
  transform: translate3d(calc((1 - var(--lift)) * -60px), calc((1 - var(--lift)) * 54px), calc(var(--lift) * 90px))
    rotateX(calc(var(--rx) * 1deg)) rotateY(calc(var(--ry) * 1deg)) scale(calc((.5 + .5 * var(--lift)) * (.88 + .12 * var(--pl))));
}
.plaque > * { position: absolute; }
.pl-edge, .pl-base { inset: 0; border-radius: 14px; }
.pl-edge { background: var(--wood-edge); transform: translateZ(-9px); }
.pl-base {
  background:
    linear-gradient(118deg, rgba(255,255,255,.16), transparent 38%),
    repeating-linear-gradient(91deg, rgba(60,32,10,.12) 0 2px, transparent 2px 11px),
    linear-gradient(160deg, var(--wood-1), var(--wood-2) 62%, var(--wood-3));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), inset 0 -2px 0 rgba(0,0,0,.25);
}
.pl-print { left: 7%; right: 7%; top: 5.6%; bottom: 5.6%; transform: translateZ(2px); border-radius: 5px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.4);
  /* Printed as the carriage passes: the artwork is uncovered from the left (phase 4); --pv hides the earlier mockup copy. */
  opacity: var(--pv); clip-path: inset(0 calc((1 - var(--pr)) * 100%) 0 0); }
.pl-print img { display: block; width: 100%; height: 100%; }
/* The UV printer carriage: a bar across the plaque with a small print head, sweeping left to right.
   Its x is the same --pr that uncovers the artwork. Everything is transform / opacity / clip-path. */
.pl-uv { inset: 5.6% 7%; overflow: hidden; border-radius: 5px; transform: translateZ(4px); pointer-events: none; opacity: min(1, calc(var(--pr) * 12), calc((1 - var(--pr)) * 5)); }
.uv-glow {
  position: absolute; top: -4%; bottom: -4%; left: -96px; width: 96px;
  background: linear-gradient(90deg, transparent, rgba(124,108,255,.32) 55%, rgba(79,163,255,.62));
  transform: translateX(calc(var(--pr) * 220px));
}
.uv-shadow { position: absolute; top: -4%; bottom: -4%; left: 4px; width: 20px; background: linear-gradient(90deg, rgba(0,0,0,.34), transparent); transform: translateX(calc(var(--pr) * 220px)); }
.pl-head { left: 7%; margin-left: -7px; top: -6%; bottom: -6%; width: 14px; transform: translate3d(calc(var(--pr) * 220px), 0, 18px); opacity: min(1, calc(var(--pr) * 14), calc((1 - var(--pr)) * 14)); pointer-events: none; }
.hd-bar { position: absolute; inset: 0; border-radius: 7px; background: linear-gradient(90deg, var(--carriage-hi), var(--carriage) 55%, #1B1C20); box-shadow: 0 6px 14px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.18); }
.hd-block { position: absolute; left: -11px; right: -11px; top: 38%; height: 17%; border-radius: 8px; background: linear-gradient(180deg, #4A4B54, var(--carriage-hi)); border: 1px solid #6B6C75; box-shadow: 0 5px 10px rgba(0,0,0,.35); }
.hd-led { position: absolute; left: 3px; right: 3px; bottom: 5px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--uv-1), var(--uv-2)); box-shadow: 0 0 8px 2px rgba(124,108,255,.75); }
.pl-sheen { inset: 5.6% 7%; border-radius: 5px; overflow: hidden; transform: translateZ(6px); pointer-events: none; }
.sheen { position: absolute; top: -10%; bottom: -10%; left: -70px; width: 70px; transform: translateX(calc(var(--sw) * 380px)) skewX(-16deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent); }

/* Step 2 and 3 extras */
.ann {
  z-index: 5; left: 270px; top: 268px; width: 110px; padding: 8px 10px; border-radius: 10px;
  background: var(--bg-raised); border: 1px solid var(--accent); box-shadow: var(--shadow);
  opacity: calc(var(--an) * (1 - var(--rec) * 3)); transform: translateX(calc((1 - var(--an)) * 30px));
}
.ann span { display: block; font-size: 12px; line-height: 1.3; font-weight: 700; color: var(--text); }
.ann .pin { position: absolute; left: -38px; top: 62px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--glow); }
.ann::before { content: ""; position: absolute; left: -26px; top: 66px; width: 26px; height: 1.5px; background: var(--accent); transform: rotate(-38deg); transform-origin: 0 50%; }
.stamp {
  z-index: 7; left: 118px; top: 318px; width: 164px; height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 12px;
  background: var(--bg-raised); border: 3px solid var(--success); color: var(--success); box-shadow: var(--shadow);
  opacity: calc(var(--ap) * 3 * (1 - var(--rec) * 3)); transform: rotate(-9deg) scale(calc(2 - var(--ap)));
}
.stamp svg { width: 22px; height: 22px; flex: none; stroke: var(--success); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.stamp b { font-size: 15px; font-weight: 800; letter-spacing: .08em; }
.cur { z-index: 9; left: 462px; top: 140px; width: 20px; height: 24px; opacity: calc(var(--cur) * (1 - var(--rec) * 3)); transform: translate(calc((1 - var(--cur)) * -130px), calc((1 - var(--cur)) * 120px)); }
.cur svg { width: 20px; height: 24px; fill: var(--text); stroke: var(--bg-raised); stroke-width: 1.5; stroke-linejoin: round; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.pay, .ready {
  z-index: 6; display: flex; align-items: center; justify-content: center; gap: 12px; height: 44px; border-radius: 22px;
  background: var(--bg-raised); border: 1px solid var(--line); box-shadow: var(--shadow-lift); color: var(--text);
}
.pay b, .ready b { font-size: 16px; font-weight: 800; }
.pay { left: 110px; top: 432px; width: 300px; opacity: calc(var(--pay) * (1 - var(--rec) * 3)); transform: translateY(calc((1 - var(--pay)) * 44px)); }
.pay svg { width: 16px; height: 18px; } .pay svg rect { fill: var(--text); } .pay svg path { stroke: var(--text); stroke-width: 2.2; }
.ready { left: 70px; top: 436px; width: 380px; opacity: var(--rd); transform: translateY(calc((1 - var(--rd)) * 44px)); }
.ready i { width: 22px; height: 22px; border-radius: 50%; background: var(--success); position: relative; }
.ready i::after { content: ""; position: absolute; left: 7px; top: 4px; width: 5px; height: 10px; border: solid var(--bg-raised); border-width: 0 2.5px 2.5px 0; transform: rotate(40deg); }

/* Captions: the four steps, stacked in one cell, crossfaded by phase (--cp1..4). Text sits beside / under the art, never on it. */
html.motion .steps { display: grid; gap: 0; }
html.motion .step {
  grid-area: 1 / 1; background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0; pointer-events: none;
  opacity: var(--cp); transform: translateY(calc((1 - var(--cp)) * 16px));
}
html.motion .step:nth-child(1) { --cp: var(--cp1); } html.motion .step:nth-child(2) { --cp: var(--cp2); }
html.motion .step:nth-child(3) { --cp: var(--cp3); } html.motion .step:nth-child(4) { --cp: var(--cp4); }
html.motion .step-scene { display: none; }
html.motion .step-num { width: 44px; height: 44px; background: var(--accent); color: var(--on-accent); font-size: var(--text-lg); }
html.motion .step h3 { font-size: var(--text-2xl); }
html.motion .step p { font-size: var(--text-lg); max-width: 28rem; margin: 0; }
html.motion .rail { display: flex; gap: 8px; margin-top: var(--space-6); max-width: 28rem; }
html.motion .rail span { position: relative; flex: 1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
html.motion .rail span::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--rv)); }
html.motion .rail span:nth-child(1) { --rv: var(--r1); } html.motion .rail span:nth-child(2) { --rv: var(--r2); }
html.motion .rail span:nth-child(3) { --rv: var(--r3); } html.motion .rail span:nth-child(4) { --rv: var(--r4); }

/* Phones and tablets: the stage on top, captions under it, a shorter total scroll (about 3.4 screens). */
@media (max-width: 860px) {
  html.motion .story-track { height: 350svh; }
  html.motion .story-pin { align-items: center; }
  html.motion .story-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  html.motion .story-art { order: 1; }
  html.motion .story-text { order: 2; max-width: 34rem; margin: 0 auto; width: 100%; }
  html.motion .stage { width: min(100%, 480px, calc(100svh - var(--pin-top) - 230px)); }
  html.motion .step { display: grid; grid-template-columns: auto 1fr; column-gap: var(--space-3); align-items: center; }
  html.motion .step-num { width: 36px; height: 36px; margin: 0; font-size: var(--text-md); }
  html.motion .step h3 { font-size: var(--text-xl); margin: 0; }
  html.motion .step p { grid-column: 1 / -1; font-size: var(--text-sm); margin-top: var(--space-3); }
  html.motion .rail { margin-top: var(--space-4); }
}
@media (max-width: 720px) {
  .story { --pin-top: calc(var(--header-h) + var(--subnav-h)); }
  html.motion .story-track { height: 340svh; }
}
@media (max-width: 380px) { html.motion .step p { font-size: var(--text-xs); } }

/* 9. Awards + pricing ------------------------------------------------------- */
.caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); list-style: none; padding: 0; margin: 0; }
.cap { padding: var(--space-6); }
.cap-swatch { width: 56px; height: 56px; border-radius: 16px; margin-bottom: var(--space-4); display: grid; place-items: center; }
.cap-swatch svg { width: 30px; height: 30px; }
.cap h3 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.cap p { color: var(--muted); font-size: var(--text-sm); margin: 0; }
.cap .chip { margin-top: var(--space-3); }
.sw-acrylic { background: linear-gradient(135deg, #DDE7F7, #A9C2EA); color: #1E1F23; }
.sw-wood { background: linear-gradient(135deg, #C08A52, #7A4E25); color: #FFF5E8; }
.sw-metal { background: linear-gradient(135deg, #F5D27A, #B8862B); color: #3A2A06; }
.sw-glass { background: linear-gradient(135deg, #E7F3F1, #9BCFC6); color: #10322D; }
.sw-decal { background: linear-gradient(135deg, #F0C9A8, #C8743A); color: #2A1405; }
.sw-shirt { background: linear-gradient(135deg, #3A3B42, #1E1F23); color: #FFFFFF; }
@media (max-width: 960px) { .caps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .caps { grid-template-columns: 1fr; } }

.pricing { margin-top: clamp(48px, 7vw, 80px); }
.pricing h3 { font-size: var(--text-2xl); margin-bottom: var(--space-2); }
.pricing > p { color: var(--muted); max-width: 40rem; }
.price-list { list-style: none; padding: 0; margin: var(--space-5) 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 var(--space-7); }
.price-list li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); padding: var(--space-4) 0; border-top: 1px solid var(--line); }
.price-list .what { font-weight: 600; }
.price-list .what small { display: block; font-weight: 400; color: var(--muted); font-size: var(--text-sm); }
.price-list .amt { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.price-list .amt small { font-weight: 400; color: var(--muted); font-size: var(--text-sm); margin-right: 4px; }
@media (max-width: 720px) { .price-list { grid-template-columns: 1fr; } }
.price-note { margin-top: var(--space-4); font-size: var(--text-sm); color: var(--muted); }
/* Reserve the list's height while /data/prices.json loads, so nothing below jumps (CLS 0). */
html.js .pricing.is-loading #price-intro { min-height: 51px; }
html.js .pricing.is-loading .price-list { min-height: 265px; }
html.js .pricing.is-loading .price-note { min-height: 22px; }
@media (max-width: 860px) { html.js .pricing.is-loading .price-list { min-height: 310px; } }

/* 10. Shop ------------------------------------------------------------------ */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-5); list-style: none; padding: 0; margin: 0; min-height: 420px; }
.product { overflow: hidden; display: flex; flex-direction: column; }
.product-media { aspect-ratio: 4 / 3; background: var(--bg); border-bottom: 1px solid var(--line); overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.product:hover .product-media img { transform: scale(1.04); }
.product-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.product h3 { font-size: var(--text-lg); }
.product p { color: var(--muted); font-size: var(--text-sm); margin: 0; }
.product-foot { margin-top: auto; padding-top: var(--space-4); display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.product-price { font-weight: 700; font-size: var(--text-lg); font-variant-numeric: tabular-nums; }
.product-price.tbd { font-size: var(--text-sm); color: var(--muted); font-weight: 600; }
.secure-note { display: flex; gap: var(--space-3); align-items: flex-start; margin-top: var(--space-6); color: var(--muted); font-size: var(--text-sm); max-width: 44rem; }
.secure-note svg { width: 20px; height: 20px; flex: none; color: var(--success); margin-top: 2px; }

/* 11. Order form ------------------------------------------------------------- */
.order { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.order-aside p:not(.eyebrow) { color: var(--muted); }
.order-aside h2 { margin-bottom: var(--space-5); }
.order-aside ul { padding-left: 1.1em; color: var(--muted); }
.order-aside li { margin-bottom: var(--space-2); }
.form-card { padding: clamp(20px, 4vw, 40px); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.field { display: grid; gap: var(--space-2); min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: var(--text-sm); font-weight: 600; }
.field .opt { font-weight: 400; color: var(--muted); }
.field .hint { font-size: var(--text-sm); color: var(--muted); margin: 0; }
.field input, .field select, .field textarea {
  font: inherit; font-size: var(--text-md); color: var(--text);
  background: var(--field-bg); border: 1.5px solid var(--field-border);
  border-radius: var(--radius-sm); padding: 0 var(--space-4); min-height: var(--control-h);
  width: 100%; min-width: 0; transition: border-color .2s, box-shadow .2s;
}
.field textarea { padding: var(--space-3) var(--space-4); min-height: 132px; resize: vertical; }
.field select { appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 21px) 52%, calc(100% - 15px) 52%; background-size: 6px 6px; background-repeat: no-repeat; }
.field select option { color: #1E1F23; background: #FFFFFF; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow);
}
.field [aria-invalid="true"] { border-color: var(--danger); }
.field .error { color: var(--danger); font-size: var(--text-sm); font-weight: 600; margin: 0; min-height: 0; }
.field .error:empty { display: none; }
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-foot { margin-top: var(--space-5); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.form-foot .fine { font-size: var(--text-sm); color: var(--muted); margin: 0; flex: 1 1 16rem; }
.form-status { margin-top: var(--space-4); padding: var(--space-4); border-radius: var(--radius-sm); font-size: var(--text-sm); border: 1px solid var(--line); }
.form-status:empty { display: none; }
.form-status.is-error { border-color: var(--danger); color: var(--text); }
.form-status.is-error strong { color: var(--danger); }
.form-status.is-info { border-color: var(--accent); }
.form-success { text-align: left; padding: var(--space-5) 0; }
.form-success .check { width: 56px; height: 56px; border-radius: 50%; background: var(--success); color: #fff; display: grid; place-items: center; margin-bottom: var(--space-4); }
.form-success .check svg { width: 28px; height: 28px; }
.form-success h3 { font-size: var(--text-2xl); margin-bottom: var(--space-3); }
.form-success p { color: var(--muted); }
.button .spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 860px) { .order { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* 12. About (rendered from data/about.json) --------------------------------- */
.about-body { min-height: 720px; }
.about-quote { max-width: 44rem; margin: 0 0 var(--space-6); padding-left: var(--space-5); border-left: 3px solid var(--accent); }
.about-quote blockquote { margin: 0; }
.about-quote blockquote p { margin: 0; font-size: clamp(1.25rem, 2.2vw, 1.625rem); line-height: 1.4; font-weight: 500; font-style: italic; color: var(--text); }
.about-quote figcaption { margin-top: var(--space-3); font-size: var(--text-sm); color: var(--muted); }
.about-quote .quote-by { font-weight: 700; color: var(--accent-text); }
.about-quote cite { font-style: normal; }
.about-quote cite::before { content: ", "; }
.about-intro { max-width: 44rem; margin-bottom: var(--space-7); }
.about-intro p { font-size: var(--text-lg); color: var(--muted); }
.about-intro p:first-child { color: var(--text); font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.45; font-weight: 500; }
.people { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
.person { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: var(--space-5); padding: var(--space-5); align-items: start; }
.portrait { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.person h3, .person h2 { font-size: var(--text-2xl); font-stretch: 108%; letter-spacing: -0.02em; margin-bottom: var(--space-1); }
.person-role { font-size: var(--text-sm); font-weight: 600; color: var(--accent-text); margin-bottom: var(--space-3); }
.person-body > p:not(.person-role) { color: var(--muted); }
.facts { list-style: none; padding: 0; margin: var(--space-4) 0 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.facts li { font-weight: 600; font-size: var(--text-xs); padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--bg); }
.about-closing { margin-top: var(--space-6); font-size: var(--text-lg); color: var(--text); font-weight: 500; }
@media (max-width: 960px) { .people { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .person { grid-template-columns: 1fr; } .portrait { max-width: 220px; } }

/* CTA band */
.cta-band { text-align: center; padding: clamp(40px, 7vw, 80px) var(--gutter); background: var(--text); color: var(--bg); border-radius: var(--radius-lg); position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: auto -10% -60% -10%; height: 120%; background: radial-gradient(closest-side, rgba(200,116,58,.35), transparent); pointer-events: none; }
.cta-band > * { position: relative; }
.cta-band h2 { margin-bottom: var(--space-4); }
.cta-band p { color: inherit; opacity: .8; max-width: 34rem; margin: 0 auto var(--space-6); font-size: var(--text-lg); }
.cta-band .button-row { justify-content: center; }
.cta-band .button-quiet { color: inherit; border-color: currentColor; }
@media (prefers-color-scheme: dark) {
  .cta-band { background: linear-gradient(160deg, #1C1C20, #111113); color: var(--text); border: 1px solid var(--line); }
}

/* 13. Doc pages (privacy, terms, shipping) ---------------------------------- */
.doc { max-width: 46rem; padding: var(--space-8) 0 var(--space-9); }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.25rem); margin-bottom: var(--space-4); }
.doc h2 { font-size: var(--text-xl); font-stretch: 108%; margin: var(--space-7) 0 var(--space-3); }
.doc p, .doc li { color: var(--muted); }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: var(--space-2); }
.doc .updated { font-size: var(--text-sm); color: var(--muted); }
.draft-banner {
  border: 1.5px solid var(--accent); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5);
  background: var(--bg-raised); margin: var(--space-5) 0 var(--space-6); font-size: var(--text-sm);
}
@media (prefers-color-scheme: dark) { .draft-banner { background: var(--surface); } }
.draft-banner strong { color: var(--accent-text); }
.ph { background: rgba(200,116,58,.14); border-radius: 4px; padding: 0 4px; color: var(--text); }

/* 14. Motion helpers --------------------------------------------------------- */
/* Content is visible by default. Only when JS confirms motion is wanted
   (html.motion) do .reveal elements start hidden and fade up into view. */
html.motion .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
html.motion .reveal.is-in { opacity: 1; transform: none; }
html.motion .reveal-stagger > * { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
html.motion .reveal-stagger.is-in > * { opacity: 1; transform: none; }
html.motion .reveal-stagger.is-in > *:nth-child(2) { transition-delay: .08s; }
html.motion .reveal-stagger.is-in > *:nth-child(3) { transition-delay: .16s; }
html.motion .reveal-stagger.is-in > *:nth-child(4) { transition-delay: .24s; }
html.motion .reveal-stagger.is-in > *:nth-child(5) { transition-delay: .32s; }
html.motion .reveal-stagger.is-in > *:nth-child(6) { transition-delay: .40s; }
html.motion .reveal-stagger.is-in > *:nth-child(n+7) { transition-delay: .48s; }
/* Parallax and the story read CSS variables set by site.js. */
[data-parallax] { transform: translate3d(0, var(--py, 0px), 0); }
.medal-stage { transform: translate3d(0, var(--py, 0px), 0) rotateX(var(--tilt, 0deg)); }

/* 15. Reduced motion: no animation, same content --------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .medal { transform: rotateY(-18deg); }
  [data-parallax], .medal-stage { transform: none; }
}

/* 16. Phones: section nav and swipe rows ------------------------------------
   Everything here applies at 720px and below only; desktop is untouched.
   Section chips replace the hamburger on the home page, long stacks become
   swipe rows (scroll-snap, next card peeking), spacing is tighter. */
.subnav { display: none; }
.swipe-dots, .price-toggle { display: none; }

@media (max-width: 720px) {
  :root { --header-h: 56px; --subnav-h: 44px; }
  html { scroll-padding-top: calc(var(--header-h) + 16px); }
  html:has(.subnav) { scroll-padding-top: calc(var(--header-h) + var(--subnav-h) + 12px); }

  /* Header: logo + "Get a quote"; the chip bar replaces the menu on the home page. */
  .site-header .wrap { min-height: var(--header-h); }
  .site-header.has-subnav .menu-toggle,
  html .site-header.has-subnav .nav-links { display: none; }
  .site-header.has-subnav .nav .button-sm { display: inline-flex; }

  .subnav { display: block; border-top: 1px solid var(--line); }
  .site-header:not(.is-scrolled) .subnav { border-top-color: transparent; }
  .subnav ul {
    display: flex; gap: var(--space-2); list-style: none; margin: 0; padding: 0 var(--space-6) 0 var(--gutter);
    height: var(--subnav-h); align-items: center;
    overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 20px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 20px), transparent 100%);
  }
  .subnav ul::-webkit-scrollbar { display: none; }
  .subnav a {
    display: inline-flex; align-items: center; min-height: 34px; padding: 0 var(--space-4);
    border-radius: var(--radius-pill); white-space: nowrap; text-decoration: none;
    font-size: var(--text-sm); font-weight: 600; color: var(--muted);
    transition: background .2s, color .2s;
  }
  @media (hover: hover) { .subnav a:hover { color: var(--text); background: var(--surface); } }
  .subnav a[aria-current="true"] { background: var(--text); color: var(--bg); }

  /* Vertical rhythm */
  .section { padding: 44px 0; }
  .hero { padding: 20px 0 28px; }
  .hero + .section { padding-top: 36px; }
  .section-head { margin-bottom: var(--space-5); }
  .section-head p:not(.eyebrow) { font-size: var(--text-md); margin-top: var(--space-3); }
  .eyebrow { margin-bottom: var(--space-3); }
  h2 { font-size: var(--text-2xl); }
  .hero h1 { margin-bottom: var(--space-4); font-size: clamp(2.1rem, 9.4vw, 2.5rem); }
  .hero-visual { max-width: 170px; margin: 0 auto calc(var(--space-2) * -1); }
  .hero .button-row { flex-wrap: nowrap; gap: var(--space-2); }
  .hero .button { padding: 0 var(--space-4); min-height: 46px; font-size: var(--text-sm); }
  .lede { font-size: var(--text-md); }
  .lede { margin-bottom: var(--space-5); }
  .hero-meta { margin-top: var(--space-4); }
  .pricing { margin-top: var(--space-7); }
  html.motion #prices.reveal { transform: none; } /* anchor target: fade only, so the jump lands exactly under the bars */
  .order { gap: var(--space-5); }
  .order-aside h2 { margin-bottom: var(--space-3); }
  .form-card { padding: var(--space-4); }
  .about-intro { margin-bottom: var(--space-5); }
  .about-quote { margin-bottom: var(--space-5); padding-left: var(--space-4); }
  .about-quote blockquote p { font-size: var(--text-lg); }
  .about-intro p { font-size: var(--text-md); }
  .about-intro p:first-child { font-size: var(--text-lg); }
  .form-grid { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
  .form-grid .field:not(.full):not(:has(#f-qty)):not(:has(#f-date)) { grid-column: 1 / -1; } /* quantity + date share a row */
  .field textarea { min-height: 96px; }
  .hero-meta { gap: var(--space-1) var(--space-4); }
  .about-closing { margin-top: var(--space-4); }
  .cta-band { padding: var(--space-7) var(--gutter); }
  .site-footer { padding: var(--space-6) 0 var(--space-5); }
  .footer-bottom { margin-top: var(--space-5); padding-top: var(--space-4); }

  /* Swipe rows: scroll-snap, the next card peeks so it reads as swipeable. */
  .halves, .app-grid, .caps, .product-grid, .people {
    display: flex; align-items: stretch; gap: var(--space-3);
    overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    scroll-snap-type: x mandatory;
    margin: -6px calc(var(--gutter) * -1) -20px;
    padding: 6px var(--gutter) 34px; scroll-padding-inline: var(--gutter);
    min-height: 0;
  }
  .halves::-webkit-scrollbar, .app-grid::-webkit-scrollbar, .caps::-webkit-scrollbar,
  .product-grid::-webkit-scrollbar, .people::-webkit-scrollbar { display: none; }
  .halves > *, .app-grid > *, .caps > *, .product-grid > *, .people > * {
    flex: 0 0 82%; min-width: 0; scroll-snap-align: start;
  }
  .caps > * { flex-basis: 76%; }
  .app-grid > .loading-note, .product-grid > .loading-note { flex-basis: 100%; }
  .halves:focus-visible, .app-grid:focus-visible, .caps:focus-visible,
  .product-grid:focus-visible, .people:focus-visible { outline-offset: -4px; border-radius: var(--radius-lg); }
  .app-grid { min-height: 380px; }
  .product-grid { min-height: 340px; }
  .about-body { min-height: 420px; }

  /* Tighter cards inside the rows */
  .half, .cap, .app-card { padding: var(--space-5); }
  .half h3 { margin: var(--space-3) 0 var(--space-2); }
  .half p { margin-bottom: var(--space-3); }
  .cap-swatch { margin-bottom: var(--space-3); width: 48px; height: 48px; }
  .app-card.is-featured { display: flex; flex-direction: column; gap: var(--space-4); }
  .shots { min-height: 0; }
  .shots:has(.shot[aria-hidden="true"]) { display: none; } /* drawn placeholders say nothing; real screenshots stay */
  .shot { max-width: 112px; }
  .person { grid-template-columns: 1fr; gap: var(--space-4); padding: var(--space-5); }
  .portrait { max-width: none; aspect-ratio: 16 / 10; }
  .product-body { padding: var(--space-4); }

  /* Position dots (added by JS) */
  .swipe-dots { display: flex; justify-content: center; gap: 6px; margin-top: var(--space-3); }
  .swipe-dots span { width: 6px; height: 6px; border-radius: var(--radius-pill); background: var(--muted); opacity: .35; transition: width .25s var(--ease), opacity .25s, background .25s; }
  .swipe-dots span.is-on { width: 18px; opacity: 1; background: var(--accent-text); }

  /* Starting prices: compact, first 3 rows then "See all" (JS adds the toggle). */
  .price-list { margin-top: var(--space-4); }
  .price-list li { padding: var(--space-3) 0; gap: var(--space-3); }
  .price-list .what { line-height: 1.3; }
  .price-list .what small { font-size: var(--text-xs); line-height: 1.4; margin-top: 2px; }
  .price-list.is-collapsed li:nth-child(n+4) { display: none; }
  .price-toggle {
    display: inline-flex; align-items: center; gap: var(--space-2); margin-top: var(--space-3);
    min-height: 44px; padding: 0 var(--space-4); border-radius: var(--radius-pill);
    border: 1px solid var(--line); background: transparent; color: var(--text);
    font: inherit; font-size: var(--text-sm); font-weight: 600; cursor: pointer;
  }
  .price-toggle:hover { background: var(--surface); }
  .price-toggle svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
  .price-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .price-note { font-size: var(--text-sm); }
  html.js .pricing.is-loading #price-intro { min-height: 77px; }
  html.js .pricing.is-loading .price-list { min-height: 220px; margin-bottom: 71px; }
  html.js .pricing.is-loading .price-note { min-height: 45px; }
}

/* 16b. Phones: swipe rows that behave on iPhone Safari (2026-11-24).
   Proximity snapping never fights a vertical flick; cards in a row skip the
   blur and the slide-up reveal (both make iOS scroll containers stutter);
   hover lifts only on devices that really hover. */
@media (max-width: 720px) {
  .halves, .app-grid, .caps, .product-grid, .people { scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .halves > .card, .app-grid > .card, .caps > .card, .product-grid > .card, .people > .card { -webkit-backdrop-filter: none; backdrop-filter: none; }
  html.motion :is(.halves, .app-grid, .caps, .product-grid, .people).reveal-stagger > * { transform: none; }
}
@media (hover: none) { .card-hover:hover { transform: none; box-shadow: var(--shadow); } }

/* 17. Shop extras ---------------------------------------------------------- */
.product-price-box { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--space-1); min-width: 0; }
.product-price-from, .product-price-note { color: var(--muted); font-size: var(--text-sm); font-weight: 600; }
.product-price-note { flex-basis: 100%; font-size: var(--text-xs); }

/* 18. About page (/about/) and the home-page teaser (2026-11-26) */
.about-teaser { max-width: 44rem; }
.about-teaser h2 { margin-bottom: var(--space-4); }
.about-teaser p:not(.eyebrow) { font-size: var(--text-lg); color: var(--muted); margin-bottom: var(--space-5); }
.page-about .about-page { padding: var(--space-8) 0 var(--space-9); }
.page-about .about-page h1 { font-size: var(--display-2); font-stretch: 118%; letter-spacing: -0.03em; margin-bottom: var(--space-6); }
.page-about .people { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.page-about .person { grid-template-columns: 1fr; }
.page-about .portrait { aspect-ratio: 4 / 3; max-width: none; }
@media (max-width: 720px) {
  .page-about .about-page { padding: var(--space-6) 0 var(--space-7); }
  .page-about .people { display: grid; grid-template-columns: 1fr; overflow: visible; margin: 0; padding: 0; scroll-snap-type: none; gap: var(--space-4); }
  .page-about .people > * { flex: none; }
  .page-about .portrait { aspect-ratio: 16 / 10; }
}
.about-actions { margin-top: var(--space-7); }
/* Reserve room while About loads so the buttons below never jump (CLS). */
.page-about .about-body { min-height: 100svh; }

/* Welcome note in the order section: businesses, schools and groups are welcome too */
.order-aside .order-welcome { border-left: 3px solid var(--accent); padding-left: var(--space-4); margin-block: var(--space-5); }
.order-aside .order-welcome strong { color: var(--text); }

/* 19. Shop: "Ready to ship" tag, bigger tap targets on phones (2026-11-26) */
.product-badge { align-self: flex-start; margin-bottom: var(--space-1); }
@media (max-width: 720px) {
  .subnav a { min-height: 40px; }
  .footer-grid a { padding: 8px 0; }
}
