/* ---------------------------------------------------------------------------
 * Selvette — marketing landing page
 *
 * Inherits DESIGN.md v2 for colour, type, elevation, radius and finish.
 *
 * ONE APPROVED DEVIATION (user decision, 2026-07-29): DESIGN.md's Motion section
 * bans scroll-triggered reveals, staggered entry and durations over 700ms. Those
 * rules are written for a surface merchants use daily ("impressive once,
 * infuriating daily"). This page is visited once, so the ban was lifted for the
 * marketing surface only. Everything sits behind prefers-reduced-motion, and the
 * FINISH rules (no gradients, no glassmorphism) are unchanged.
 * ------------------------------------------------------------------------- */

@import url("tokens.css");

/* --------------------------------------------------------------- reset --- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Geist, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.skip {
  position: absolute; left: var(--s-8); top: -64px;
  background: var(--surface); color: var(--text);
  padding: var(--s-8) var(--s-16);
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  z-index: 100; transition: top var(--t-short) var(--e-out);
}
.skip:focus { top: var(--s-8); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }

/* ---------------------------------------------------------- typography --- */

h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.display {                       /* marketing hero only */
  font-size: clamp(40px, 5.2vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.h1 { font-size: clamp(30px, 3vw, 38px); line-height: 1.14; letter-spacing: -0.03em; }
.h2 { font-size: 25px; line-height: 1.2;  letter-spacing: -0.03em; }
.h3 { font-size: 19px; line-height: 1.3;  letter-spacing: -0.02em; }

.lede { font-size: 17px; color: var(--text-secondary); }
.body { font-size: 15px; color: var(--text-secondary); }

.meta {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
}
.num { font-family: "Geist Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- layout --- */

.canvas  { width: 100%; max-width: var(--canvas);  margin-inline: auto; padding-inline: var(--s-32); }
.reading { width: 100%; max-width: var(--reading); margin-inline: auto; padding-inline: var(--s-32); }

section { padding-block: clamp(var(--s-48), 6vw, 76px); }
section[id] { scroll-margin-top: 92px; }        /* clears the sticky nav */
.band { background: var(--wall); border-block: 1px solid var(--line); }

.section-head { max-width: var(--measure); margin-bottom: var(--s-32); }
.section-head .meta { display: block; margin-bottom: var(--s-8); }
.section-head p { margin-top: var(--s-16); }

/* ------------------------------------------------------ legal prose --- */
/* Long-form policy pages (privacy.html / terms.html). The stubs used inline
   margins; real multi-section documents need a rhythm the cascade owns. */
.legal { margin-top: var(--s-8); }
.legal h2 { font-size: 19px; letter-spacing: -0.02em; margin-top: var(--s-48); }
.legal h3 { font-size: 15px; font-weight: 600; color: var(--text); margin-top: var(--s-24); }
.legal p { font-size: 15px; line-height: 1.65; color: var(--text-secondary); margin-top: var(--s-16); }
.legal ul { margin: var(--s-16) 0 0; padding-left: 22px; }
.legal li { font-size: 15px; line-height: 1.65; color: var(--text-secondary); margin-top: var(--s-8); }
.legal b, .legal strong { color: var(--text); font-weight: 600; }
.legal a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
.legal .legal-updated { margin-top: var(--s-8); }

/* ------------------------------------------------------------ buttons --- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-8);
  min-height: 46px; padding: var(--s-8) var(--s-24);
  font-size: 15px; font-weight: 500; border-radius: var(--r-md);
  text-decoration: none; cursor: pointer; border: none;
  transition: background var(--t-micro) var(--e-out),
              transform var(--t-micro) var(--e-out),
              box-shadow var(--t-micro) var(--e-out);
}
.btn-lg { min-height: 52px; padding-inline: var(--s-32); font-size: 16px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: inset 0 -1px 0 var(--accent-deep); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { background: var(--accent-deep); transform: translateY(1px); box-shadow: none; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); }
.btn-secondary:hover { background: #fbf8f3; }
.btn-secondary:active { transform: translateY(1px); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-16); align-items: center; }

.textlink {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 500; color: var(--accent-deep); text-decoration: none;
}
.textlink:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- nav --- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: var(--s-32); min-height: 78px; }

.wordmark {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-size: 24px; font-weight: 600; letter-spacing: -0.035em;
  text-decoration: none; margin-right: auto;
}
.wordmark::after {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); align-self: center;
}
.nav-links { display: flex; gap: var(--s-32); }
.nav-links a {
  font-size: 15px; font-weight: 500; color: var(--text-secondary); text-decoration: none;
  transition: color var(--t-micro) var(--e-out);
}
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; gap: var(--s-8); align-items: center; }

/* --------------------------------------------------------- framed print --- */

.print {
  position: relative; background: var(--surface); padding: var(--s-16);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--e2);
}
.print img { border-radius: var(--r-sm); }
.print::before, .print::after { content: ""; position: absolute; width: 9px; height: 9px; pointer-events: none; }
.print::before { top: 6px; left: 6px; border-top: 1.5px solid var(--accent); border-left: 1.5px solid var(--accent); }
.print::after { bottom: 6px; right: 6px; border-bottom: 1.5px solid var(--accent); border-right: 1.5px solid var(--accent); }
.print-caption { display: flex; justify-content: space-between; gap: var(--s-16); margin-top: var(--s-8); }

/* --------------------------------------------------------------- hero --- */

/* The hero fills the first screen. 100dvh (not vh) so iOS Safari's collapsing
 * toolbar doesn't leave a gap; minus the sticky nav so nothing is cut off. */
.hero {
  min-height: calc(100dvh - 79px);
  display: flex; align-items: center;
  padding-block: var(--s-32);
}
.hero-grid {
  width: 100%;
  display: grid; grid-template-columns: 1.02fr 1fr;
  gap: clamp(var(--s-32), 4vw, 56px); align-items: center;
}
.hero-copy { max-width: 620px; }
.hero-copy .display { margin-block: var(--s-16) var(--s-24); }
.hero-copy .lede { margin-bottom: var(--s-32); }
.hero-note { margin-top: var(--s-24); font-size: 14px; color: var(--text-muted); }

/* Capability chips — the four things, at a size that can actually be read */
.caps { display: flex; flex-wrap: wrap; gap: var(--s-8); margin-bottom: var(--s-16); }
.cap {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent-deep);
  font-size: 13px; font-weight: 500;
}

/* Hero shows the transformation the headline promises: in → out */
.hero-art { display: grid; grid-template-columns: 1fr 1.15fr; gap: var(--s-16); align-items: center; }
.hero-art .print img { aspect-ratio: 3 / 4; object-fit: cover; }
.hero-in  { margin-top: var(--s-32); }
.hero-arrow {
  grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s-8);
  justify-content: center; margin-top: calc(-1 * var(--s-8));
}
.hero-arrow span { color: var(--text-muted); }

/* ------------------------------------------------------------- tabs --- */

.tabs-head { display: flex; flex-wrap: wrap; gap: var(--s-16); align-items: flex-end; justify-content: space-between; margin-bottom: var(--s-24); }

.tablist {
  position: relative; display: inline-flex; gap: var(--s-2);
  padding: var(--s-4); border-radius: var(--r-pill);
  background: var(--surface-strong);
}
.tab {
  position: relative; z-index: 1;
  padding: 10px 20px; border-radius: var(--r-pill); background: none; border: none;
  font-size: 15px; font-weight: 500; color: var(--text-muted); cursor: pointer;
  transition: color var(--t-short) var(--e-move);
  white-space: nowrap;
}
.tab[aria-selected="true"] { color: var(--text); font-weight: 600; }
.tab-thumb {
  position: absolute; top: var(--s-4); bottom: var(--s-4); left: 0; width: 0;
  background: var(--surface); border-radius: var(--r-pill); box-shadow: var(--e1);
  transition: left var(--t-short) var(--e-move), width var(--t-short) var(--e-move);
  pointer-events: none;
}

.tabpanel[hidden] { display: none; }
/* stretch + margin-top:auto on the foot keeps both columns bottoming out on the
 * same line. With `align-items: start` the art column ran 156px past the copy. */
.tabpanel {
  display: grid; grid-template-columns: 1fr 1.02fr;
  gap: clamp(var(--s-32), 4vw, 56px); align-items: stretch;
}
.tabpanel > div:first-child { display: flex; flex-direction: column; }
.tabpanel .panel-foot { margin-top: auto; }
.tabpanel .print img { aspect-ratio: 4 / 5; max-height: 430px; object-fit: cover; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step; position: relative;
  padding-left: 44px; margin-bottom: var(--s-24);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 1px;
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 11px; font-weight: 500;
  color: var(--accent-deep); background: var(--accent-soft);
  padding: 4px 7px; border-radius: var(--r-sm);
}
.steps strong { display: block; font-weight: 600; margin-bottom: 2px; }
.steps span { color: var(--text-secondary); font-size: 15px; }

.panel-foot {
  display: flex; flex-wrap: wrap; gap: var(--s-16); align-items: center; justify-content: space-between;
  margin-top: var(--s-24); padding-top: var(--s-16); border-top: 1px solid var(--line);
}

/* Placeholder frame — video + AR, until real captures exist */
.placeholder {
  display: grid; place-items: center; gap: var(--s-8);
  aspect-ratio: 4 / 5; max-height: 430px;      /* match .tabpanel .print img */
  background: var(--surface-strong);
  border: 1px dashed var(--line-strong); border-radius: var(--r-sm);
  text-align: center; padding: var(--s-24);
}

/* --------------------------------------------------------- use cases --- */

/* 168px min keeps all six teaser cards on one row at canvas width; below that
 * they wrap cleanly rather than leaving a stranded single card. */
.uc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: var(--s-16); }
.uc {
  display: block; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--e1);
  transition: transform var(--t-short) var(--e-out), box-shadow var(--t-short) var(--e-out);
}
.uc:hover { transform: translateY(-2px); box-shadow: var(--e2); }
.uc img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 22%; width: 100%; }
.uc-body { padding: var(--s-16); }
.uc-body h3 { font-size: 16px; margin-bottom: 2px; }
.uc-body p { font-size: 14px; color: var(--text-muted); }

/* Larger variant for the dedicated use-cases page */
.uc-grid.lg { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: var(--s-24); }
.uc-grid.lg .uc { cursor: default; }
.uc-grid.lg .uc:hover { transform: none; box-shadow: var(--e1); }
/* Square, biased slightly up the frame. A landscape crop decapitates portrait
 * sources — and on the modest-wear card the head covering IS the point. */
.uc-grid.lg .uc img { aspect-ratio: 1 / 1; object-position: 50% 22%; }
.uc-grid.lg .uc-body { padding: var(--s-24); }
.uc-grid.lg .uc-body h3 { font-size: 19px; margin-bottom: var(--s-8); }
.uc-grid.lg .uc-body p { font-size: 15px; color: var(--text-secondary); }
.uc-grid.lg .caps { margin-top: var(--s-16); margin-bottom: 0; }
.uc-grid.lg .cap { font-size: 12px; padding: 4px 10px; }
.uc-grid.lg .uc { scroll-margin-top: 100px; }

/* ------------------------------------------------------- why it pays --- */

.pays { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(var(--s-32), 4vw, 56px); align-items: start; }

.vs { width: 100%; border-collapse: collapse; }
.vs caption { text-align: left; margin-bottom: var(--s-16); }
.vs th, .vs td { text-align: left; padding: var(--s-16) var(--s-8); border-bottom: 1px solid var(--line); }
.vs thead th { font-family: "Geist Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); font-weight: 400; padding-block: var(--s-8); }
.vs tbody th { font-weight: 500; font-size: 15px; width: 34%; }
.vs td { font-size: 15px; color: var(--text-secondary); }
.vs td.ours { color: var(--text); font-weight: 500; }
.vs tbody tr:last-child th, .vs tbody tr:last-child td { border-bottom: none; }

.stat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-24); box-shadow: var(--e1);
}
.stat-card + .stat-card { margin-top: var(--s-16); }
.stat-card h3 { margin-bottom: var(--s-8); }

/* ------------------------------------------------------- compare slider --- */

.compare-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); gap: var(--s-24); align-items: stretch; max-width: 940px; }

/* The three fidelity claims sit in a row, not a tall stack */
.points-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-32); }
.points-row li { padding-left: 0; margin-bottom: 0; }
.points-row li::before { display: none; }
.compare {
  position: relative; overflow: hidden; border-radius: var(--r-sm);
  aspect-ratio: 1 / 1; cursor: ew-resize; touch-action: none; user-select: none;
  background: var(--surface-strong);
}
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare .after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.compare-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px;
  background: var(--surface); box-shadow: 0 0 0 1px rgba(35, 22, 18, .18); pointer-events: none;
}
.compare-handle::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 40px; height: 40px; transform: translate(-50%, -50%);
  background: var(--surface); border-radius: 50%; box-shadow: var(--e2);
}
.compare-tag {
  position: absolute; bottom: var(--s-8); z-index: 3; padding: var(--s-4) var(--s-8);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-radius: var(--r-sm); pointer-events: none;
}
.compare-tag.left { left: var(--s-8); } .compare-tag.right { right: var(--s-8); }

/* ------------------------------------------------------------ pricing --- */

.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: var(--s-16); align-items: stretch; }
.tier {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-24); box-shadow: var(--e1);
}
.tier.featured { border-color: var(--accent); }
.tier-name { display: flex; align-items: center; gap: var(--s-8); min-height: 26px; }
.tier-badge {
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-deep); background: var(--accent-soft);
  padding: 2px 6px; border-radius: var(--r-pill);
}
.tier-price { min-height: 54px; margin-top: var(--s-8); }
.tier-price .amount { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; }
.tier-price .per { font-size: 14px; color: var(--text-muted); }
.tier ul { margin: var(--s-16) 0 var(--s-24); padding: 0; list-style: none; font-size: 14px; }
.tier li { color: var(--text-secondary); padding-block: var(--s-4); }
.tier li b { color: var(--text); font-weight: 600; }
.tier .btn { margin-top: auto; width: 100%; }

.pricing-note {
  margin-top: var(--s-32); display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-24);
  padding-top: var(--s-32); border-top: 1px solid var(--line);
}
.pricing-note h3 { margin-bottom: var(--s-8); }

/* ---------------------------------------------------------------- faq --- *
 * Native <details> — aligned by construction, keyboard-operable, works
 * without JavaScript. */

.faq-list { max-width: 860px; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-16);
  padding: 18px 0; cursor: pointer; list-style: none;
  font-size: 18px; font-weight: 600; letter-spacing: -0.02em;
  transition: color var(--t-micro) var(--e-out);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { color: var(--accent-deep); }
.faq-list summary::after {
  content: ""; flex: none; width: 11px; height: 11px;
  border-right: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--t-short) var(--e-move);
}
.faq-list details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq-list .answer { padding-bottom: var(--s-24); max-width: 66ch; }

/* ----------------------------------------------------------- close/cta --- */

.close { text-align: center; }
.close .h1 { max-width: var(--measure); margin-inline: auto; }
.close p { max-width: var(--measure); margin: var(--s-16) auto var(--s-32); }
.close .btn-row { justify-content: center; }

footer { border-top: 1px solid var(--line); padding-block: var(--s-48); }
.foot { display: flex; flex-wrap: wrap; gap: var(--s-24); align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--s-24); }
.foot-links a { font-size: 15px; color: var(--text-muted); text-decoration: none; transition: color var(--t-micro) var(--e-out); }
.foot-links a:hover { color: var(--text); }

/* ------------------------------------------------------------- motion --- */

.reveal {
  opacity: 0; transform: translateY(16px); filter: blur(6px);
  transition: opacity var(--t-reveal) var(--e-reveal),
              transform var(--t-reveal) var(--e-reveal),
              filter var(--t-reveal) var(--e-reveal);
  transition-delay: var(--d, 0ms); will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; filter: none; }

/* Print "develops in" — the one motion that is ours (DESIGN.md signature 01) */
.print img { transition: filter var(--t-long) var(--e-out); }
.reveal .print img { filter: sepia(0.55) contrast(0.94); }
.reveal.in .print img { filter: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
  .reveal .print img { filter: none; }
}

/* --------------------------------------------------------- responsive --- */

@media (max-width: 1000px) {
  .hero-grid, .tabpanel, .pays { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .tabpanel .row-art, .pays .stat-col { order: -1; }
}

@media (max-width: 640px) {
  .canvas, .reading { padding-inline: var(--s-16); }
  .compare-pair { grid-template-columns: 1fr; }
  .foot { flex-direction: column; align-items: flex-start; }
  .nav-inner { gap: var(--s-16); min-height: 68px; }
  .wordmark { font-size: 21px; }
  .tablist { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border-radius: var(--r-lg); }
  .tab-thumb { display: none; }                 /* a sliding thumb makes no sense on a 2x2 grid */
  .tab[aria-selected="true"] { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--e1); }
  .hero-art { grid-template-columns: 1fr 1fr; }
  .hero-in { margin-top: 0; }
}

/* =========================================================== hero tiles ===
 * One input photo -> four outputs. The layout IS the headline. */

.hero-art { display: grid; grid-template-columns: 0.86fr 1.3fr; gap: var(--s-16); align-items: center; }
.hero-out { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); }

.tile {
  position: relative; background: var(--surface); padding: 6px;
  border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--e1);
}
.tile img { aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; width: 100%; }
.tile-tag { display: flex; justify-content: space-between; gap: var(--s-8); padding: 5px 2px 1px; }
.tile-tag .meta { font-size: 9.5px; letter-spacing: .1em; }
.tile.real .tile-tag .meta:last-child { color: var(--accent-deep); }
.hero-in { box-shadow: var(--e2); padding: var(--s-8); }
.hero-in img { aspect-ratio: 4 / 5; }

/* play glyph over the video tile — marks it as interface, not output */
.tile.ui::after {
  content: ""; position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--e2);
}
.tile.ui::before {
  content: ""; position: absolute; left: 50%; top: 42%; z-index: 2;
  transform: translate(-38%, -50%);
  border-left: 9px solid var(--accent); border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}
.tile.shades .dots { position: absolute; left: 10px; bottom: 42px; display: flex; gap: 5px; z-index: 2; }
.tile.shades .dot { width: 15px; height: 15px; border-radius: 50%; border: 2px solid #fff; box-shadow: var(--e1); }

/* ============================================================ storyboard ===
 * A faithful mock of our own surfaces. Plays through ONCE when its tab is
 * first opened, then rests on the last frame with a stepper. Never loops:
 * DESIGN.md is right that a repeating cascade is infuriating on a page you
 * are trying to read. */

.sb { display: flex; flex-direction: column; gap: var(--s-8); }
.sb-stage {
  position: relative; aspect-ratio: 4 / 3.4; max-height: 430px;
  background: var(--wall); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--e1);
}
.sb-frame {
  position: absolute; inset: 0; padding: var(--s-16);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-med) var(--e-out);
  display: flex; flex-direction: column; gap: var(--s-8);
}
.sb-frame.on { opacity: 1; visibility: visible; }
.sb-rail { display: flex; align-items: center; gap: var(--s-8); }
.sb-dots { display: flex; gap: 5px; margin-right: auto; }
.sb-dot {
  width: 22px; height: 3px; border-radius: 2px; border: none; padding: 0;
  background: var(--line-strong); cursor: pointer;
  transition: background var(--t-short) var(--e-move);
}
.sb-dot[aria-current="true"] { background: var(--accent); }
.sb-replay {
  background: none; border: none; cursor: pointer; padding: 2px 4px;
  font-family: "Geist Mono", ui-monospace, monospace; font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted);
}
.sb-replay:hover { color: var(--accent-deep); }

/* ---- mock chrome + product page ---- */
.mk { background: var(--surface); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--e2); flex: 1; display: flex; flex-direction: column; }
.mk-bar { display: flex; align-items: center; gap: 6px; padding: 7px 10px; background: var(--surface-strong); border-bottom: 1px solid var(--line); }
.mk-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.mk-url { margin-left: 6px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 9.5px; color: var(--text-muted); overflow: hidden; white-space: nowrap; }
.mk-body { flex: 1; display: grid; grid-template-columns: 0.82fr 1fr; gap: var(--s-16); padding: var(--s-16); min-height: 0; }
.mk-shot { border-radius: var(--r-sm); overflow: hidden; background: var(--surface-strong); }
.mk-shot img { width: 100%; height: 100%; object-fit: cover; }
.mk-col { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.mk-brand { font-family: "Geist Mono", ui-monospace, monospace; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.mk-title { font-size: 15px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.mk-price { font-size: 14px; color: var(--text-secondary); }
.mk-sizes { display: flex; gap: 4px; }
.mk-size { font-size: 11px; padding: 3px 9px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--text-muted); }
.mk-size.sel { border-color: var(--text); color: var(--text); font-weight: 600; }
.mk-btn { font-size: 12px; font-weight: 600; text-align: center; padding: 9px; border-radius: var(--r-md); }
.mk-btn.cart { background: var(--text); color: #fff; }
.mk-btn.tryon { border: 1px solid var(--accent); color: var(--accent); background: transparent; }
.mk-btn.ar { background: var(--accent); color: #fff; }
.mk-btn.pulse { animation: mkpulse 1.1s var(--e-out) 2; }
@keyframes mkpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(142,47,60,0); } 50% { box-shadow: 0 0 0 5px rgba(142,47,60,.16); } }

/* ---- the try-on panel ---- */
.mk-panel { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--e2); padding: var(--s-16); display: flex; flex-direction: column; gap: 9px; flex: 1; min-height: 0; }
.mk-panel h4 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.mk-panel .sub { font-size: 12px; color: var(--text-muted); }
.mk-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.mk-choice > div { border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 12px 8px; text-align: center; font-size: 12px; font-weight: 500; }
.mk-choice > div.hot { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); }
.mk-privacy { font-size: 10px; color: var(--text-muted); line-height: 1.4; }
.mk-media { flex: 1; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-strong); min-height: 0; position: relative; }
.mk-media img { width: 100%; height: 100%; object-fit: cover; }
.mk-strip { display: flex; gap: 5px; }
.mk-strip span { width: 30px; height: 30px; border-radius: var(--r-sm); background: var(--surface-strong); border: 1px solid var(--line); overflow: hidden; }
.mk-strip span.sel { border-color: var(--accent); }
.mk-strip img { width: 100%; height: 100%; object-fit: cover; }

/* loading skeleton — matches the final shape, never a spinner (DESIGN.md States) */
.mk-skel { position: absolute; inset: 0; background: linear-gradient(90deg, var(--surface-strong) 25%, #ece4d8 50%, var(--surface-strong) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.mk-note { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 11px; color: var(--text-muted); }

/* ---- studio controls (shoot tab) ---- */
.mk-well { flex: 1; border: 1px dashed var(--line-strong); border-radius: var(--r-md); display: grid; place-items: center; text-align: center; gap: 4px; color: var(--text-muted); font-size: 12px; min-height: 0; overflow: hidden; }
.mk-well img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-md); }
.mk-field { display: flex; flex-direction: column; gap: 3px; }
.mk-field .meta { font-size: 9px; }
.mk-select { border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 6px 8px; font-size: 11.5px; background: var(--surface); display: flex; justify-content: space-between; }
.mk-refine { border: 1px solid var(--accent); border-radius: var(--r-md); padding: 8px 10px; font-size: 12px; color: var(--text); background: var(--surface); }
.mk-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.mk-chip { font-size: 11px; padding: 4px 10px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); color: var(--text-muted); }
.mk-chip.sel { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); font-weight: 600; }

/* ---- AR frame ---- */
.mk-cam { flex: 1; position: relative; border-radius: var(--r-sm); overflow: hidden; background: #241d18; min-height: 0; }
.mk-cam img { width: 100%; height: 100%; object-fit: cover; }
.mk-face { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); width: 44%; aspect-ratio: 3/4; border: 1.5px dashed rgba(255,255,255,.75); border-radius: 50%; }
.mk-shades { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 7px; }
.mk-shades i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; box-shadow: var(--e1); display: block; }
.mk-shades i.sel { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .mk-skel, .mk-btn.pulse { animation: none; }
  .sb-frame { transition: none; }
}

/* ========================================================== jobs / cases === */

.jobs { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: var(--s-16); }
.job {
  display: flex; flex-direction: column; gap: var(--s-8);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-24); box-shadow: var(--e1); text-decoration: none;
  transition: transform var(--t-short) var(--e-out), box-shadow var(--t-short) var(--e-out);
}
a.job:hover { transform: translateY(-2px); box-shadow: var(--e2); }
.job-said { font-size: 17px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.job-does { font-size: 14px; color: var(--text-secondary); }
.job-eg { margin-top: auto; padding-top: var(--s-8); }

/* ======================================================== commitments === */

.commits { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: var(--s-24); }
.commit { border-top: 2px solid var(--accent); padding-top: var(--s-16); }
.commit h3 { margin-bottom: var(--s-8); }

@media (max-width: 1000px) {
  .hero { min-height: 0; }
  .hero-art { grid-template-columns: 0.8fr 1.3fr; }
}
@media (max-width: 640px) {
  .hero-art { grid-template-columns: 1fr; }
  .mk-body { grid-template-columns: 1fr; }
  .sb-stage { aspect-ratio: 4 / 4.4; }
}

/* Grid items default to min-width:auto, so a wide child can force its track
 * wider than the container. This is the standard blowout fix — without it the
 * hero pushes ~26px of horizontal scroll at 390px. */
.hero-grid > *, .hero-art > *, .hero-out > *,
.tabpanel > *, .pays > *, .jobs > *, .tiers > * { min-width: 0; }
.hero-copy, .caps, .btn-row { max-width: 100%; }

/* The panel media box is wider than the portrait sources, so a centred cover
 * crop decapitates the model. Bias the crop up the frame. */
.mk-media img, .mk-shot img, .mk-cam img { object-position: 50% 16%; }

/* ---- hero tiles, corrected -------------------------------------------------
 * Was: stretched rows left dead space under each 4:5 image, and the two-part
 * caption wrapped onto a second line ("ON-  /  MODEL"), which then pushed the
 * tiles to different heights. Now: tiles size to their own content, the label
 * is one non-wrapping line, and the provenance tag is a corner badge on the
 * image so it can never collide with the label. */
.hero-out { align-items: start; gap: var(--s-16); }
.tile { padding: 5px; }
.tile img { aspect-ratio: 4 / 5; }
.tile-tag { flex-wrap: nowrap; padding: 6px 3px 1px; }
.tile-tag .meta { font-size: 9.5px; letter-spacing: .07em; white-space: nowrap; }

.tile-badge {
  position: absolute; top: 11px; left: 11px; z-index: 3;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 6px; border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text-muted);
}
.tile.real .tile-badge { color: var(--accent-deep); background: color-mix(in srgb, var(--accent-soft) 92%, transparent); }

/* Give the art the larger half. At the previous split each output tile rendered
 * a 93px-tall thumbnail — too small to read as proof of anything. */
.hero-grid { grid-template-columns: 1fr 1.38fr; gap: clamp(var(--s-24), 3vw, 40px); }
.hero-art { grid-template-columns: 0.7fr 1.6fr; gap: var(--s-16); }

/* ---- job cards with imagery ---- */
.job { padding: 0; overflow: hidden; }
.job img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; object-position: 50% 20%; }
.job-body { display: flex; flex-direction: column; gap: var(--s-8); padding: var(--s-24); flex: 1; }

@media (max-width: 1000px) { .hero-art { grid-template-columns: 0.8fr 1.35fr; } }
@media (max-width: 640px)  { .hero-art { grid-template-columns: 1fr; } }

/* These must sit AFTER the .hero-grid / .hero-art widths above: a later plain
 * rule beats an earlier media query at equal specificity, which is what put the
 * two-column hero back at 390px and reintroduced horizontal scroll. */
@media (max-width: 1000px) { .hero-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px)  { .hero-art  { grid-template-columns: 1fr; } }

/* The UA stylesheet gives <figure> `margin: 1em 40px`. Every .print and .tile is
 * a figure, so each was losing 80px of width — which is why the hero tiles
 * rendered as 111px thumbnails inside a 203px track. */
figure { margin: 0; }

/* ---- pricing badge -------------------------------------------------------
 * "MOST PICKED" was wrapping to two lines, which grew the featured card's title
 * row and knocked its price + feature rows out of line with the other four. */
.tier-badge { white-space: nowrap; font-size: 9px; padding: 3px 7px; }
.tier-name { min-height: 30px; align-items: center; }

/* ---- hero: keep each sentence of the headline on its own line ---- */
.hero-grid { grid-template-columns: 1.08fr 1.18fr; }
.display { font-size: clamp(34px, 3.7vw, 50px); }

/* ---- the play glyph belongs to video only, never to AR ---- */
.tile.ui::before, .tile.ui::after { content: none; }
.tile.video::after {
  content: ""; position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  width: 38px; height: 38px; border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: var(--e2);
}
.tile.video::before {
  content: ""; position: absolute; left: 50%; top: 44%; z-index: 2;
  transform: translate(-36%, -50%);
  border-left: 10px solid var(--accent); border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}
.tile video, .mk-media video, .uc video {
  display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px;
}
.mk-media video { aspect-ratio: auto; height: 100%; border-radius: 0; object-position: 50% 16%; }
.uc video { aspect-ratio: 1 / 1; object-position: 50% 22%; }

/* ---- replay: an actual button, not a whisper ---- */
.sb-rail { justify-content: space-between; }
.sb-replay {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--surface); color: var(--text-secondary);
  font-family: Geist, sans-serif; font-size: 13px; font-weight: 500;
  letter-spacing: 0; text-transform: none;
  transition: background var(--t-micro) var(--e-out), color var(--t-micro) var(--e-out);
}
.sb-replay::before { content: "↺"; font-size: 14px; line-height: 1; }
.sb-replay:hover { background: var(--accent-soft); color: var(--accent-deep); border-color: var(--accent); }

/* ---- analytics mock ---- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-24); box-shadow: var(--e1);
}
.card + .card { margin-top: var(--s-16); }
.card h4 { margin: 0 0 var(--s-16); font-size: 13px; font-weight: 500; color: var(--text-muted);
  font-family: "Geist Mono", ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; }

.funnel { display: flex; flex-direction: column; gap: var(--s-16); }
.fstep { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; }
.fstep b { font-size: 15px; font-weight: 500; }
.fstep .num { font-size: 15px; color: var(--text-secondary); }
.fbar { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--surface-strong); overflow: hidden; }
.fbar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.fbar.soft i { background: var(--accent-soft); }

.kpi { display: flex; align-items: baseline; gap: var(--s-8); }
.kpi .big { font-size: 34px; font-weight: 600; letter-spacing: -.03em; font-family: "Geist Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.kpi .unit { font-size: 14px; color: var(--text-muted); }

.leads { width: 100%; border-collapse: collapse; font-size: 13px; }
.leads th { font-family: "Geist Mono", ui-monospace, monospace; font-size: 9.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted); font-weight: 400; text-align: left; padding-bottom: 8px; }
.leads td { padding: 7px 0; border-top: 1px solid var(--line); color: var(--text-secondary); }
.leads td:last-child { text-align: right; }
.pill-ok { font-family: "Geist Mono", ui-monospace, monospace; font-size: 9.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--success); background: var(--success-soft);
  padding: 2px 7px; border-radius: var(--r-pill); }


/* ======================================================= #how, realigned ===
 * The head + tabs used to sit in a half-width block with the storyboard
 * starting below them, which left a void top-right; and .panel-foot pinned to
 * the bottom left a second void under the steps. Now the whole section is one
 * grid: head/tabs/steps stack in column 1, and the storyboard spans all three
 * rows in column 2, vertically centred against them. */

.how-grid {
  display: grid; grid-template-columns: 1fr 1.02fr;
  column-gap: clamp(var(--s-32), 4vw, 56px); align-items: start;
}
.how-head { grid-column: 1; grid-row: 1; margin-bottom: var(--s-24); }
.how-tabs { grid-column: 1; grid-row: 2; margin-bottom: var(--s-32); }
.tabpanel { display: contents; }
.tabpanel[hidden] { display: none; }
.panel-copy { grid-column: 1; grid-row: 3; display: flex; flex-direction: column; }
.panel-copy .panel-foot { margin-top: var(--s-24); }
.sb { grid-column: 2; grid-row: 1 / 4; align-self: center; }

/* slower, and the replay control is now an actual button */
.sb-replay {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--text-secondary); font-size: 12px; font-weight: 500;
  font-family: Geist, sans-serif; letter-spacing: 0; text-transform: none;
  box-shadow: var(--e1); cursor: pointer;
  transition: background var(--t-micro) var(--e-out), color var(--t-micro) var(--e-out);
}
.sb-replay:hover { background: var(--accent-soft); color: var(--accent-deep); border-color: var(--accent); }
.sb-dot { width: 26px; height: 4px; }

/* real 360° footage, used wherever video is shown */
.sb-video, .tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-media video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%; }

/* the play glyph belongs on the video tile only — AR is live, not playback */
.tile.ui::after, .tile.ui::before { content: none; }
.tile.video::after {
  content: ""; position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  width: 38px; height: 38px; border-radius: 50%; z-index: 2;
  background: color-mix(in srgb, var(--surface) 90%, transparent); box-shadow: var(--e2);
}
.tile.video::before {
  content: ""; position: absolute; left: 50%; top: 42%; z-index: 3;
  transform: translate(-34%, -50%);
  border-left: 10px solid var(--accent); border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}

/* featured tier badge, centred on the card edge instead of crowding the name */
.tier { position: relative; }
.tier-name { min-height: 0; }
.tier.featured { padding-top: var(--s-32); }
.tier.featured .tier-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; padding: 4px 12px; font-size: 9.5px;
  background: var(--accent); color: #fff; box-shadow: var(--e1);
}

/* hero headline needs room — at the previous split "One product photo." broke
 * across two lines with "photo." stranded on its own */
.hero-grid { grid-template-columns: 1.12fr 1.2fr; }
.display { font-size: clamp(34px, 4.3vw, 50px); }
.hero-copy { max-width: 560px; }

/* ========================================================== analytics === */

.dash {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--e2); overflow: hidden;
}
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-16); padding: var(--s-16) var(--s-24); border-bottom: 1px solid var(--line); }
.dash-body { padding: var(--s-24); display: flex; flex-direction: column; gap: var(--s-24); }
.funnel { display: flex; flex-direction: column; gap: 9px; }
/* Labels live outside the bar. Inside, a white label on a short bar fell on the
 * pale track and became unreadable at the bottom of the funnel. */
.fn { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: var(--s-16); }
.fn-label { font-size: 13px; color: var(--text-secondary); }
.fn-bar { height: 26px; border-radius: var(--r-sm); background: var(--accent-soft); position: relative; overflow: hidden; }
.fn-bar i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: var(--r-sm); display: block; }
.fn-n { font-family: "Geist Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text-secondary); }
.leads { width: 100%; border-collapse: collapse; }
.leads th { font-family: "Geist Mono", ui-monospace, monospace; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); font-weight: 400; text-align: left; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.leads td { font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--text-secondary); }
.leads tr:last-child td { border-bottom: none; }

@media (max-width: 640px) { .fn { grid-template-columns: 1fr auto; } .fn-label { grid-column: 1 / -1; } }

@media (max-width: 1000px) {
  .how-grid { grid-template-columns: 1fr; }
  .how-head, .how-tabs, .panel-copy { grid-column: 1; }
  .how-head { grid-row: auto; } .how-tabs { grid-row: auto; }
  .panel-copy { grid-row: auto; order: 3; }
  .sb { grid-column: 1; grid-row: auto; order: 2; margin-bottom: var(--s-24); }
  .hero-grid { grid-template-columns: 1fr; }
}

/* Padding the featured card alone pushed its title/price/list below its
 * siblings. Every card gets the same top padding so the rows still line up. */
.tier { padding-top: var(--s-32); }
.tier.featured { padding-top: var(--s-32); }

/* ---- generating state -------------------------------------------------------
 * The bare shimmer with bottom-aligned text read as a broken panel. DESIGN.md
 * wants a skeleton rather than a lone spinner, so keep the skeleton and put a
 * spinner + label centred on top of it — legible as "working", not "failed". */
.mk-load {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}
.mk-load i {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2.5px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-top-color: var(--accent);
  animation: mkspin .9s linear infinite;
}
.mk-load em { font-style: normal; font-size: 12.5px; font-weight: 500; color: var(--text-secondary); text-align: center; }
@keyframes mkspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mk-load i { animation: none; border-top-color: var(--accent); } }

/* ---- fine-print second row --------------------------------------------------
 * Was a short paragraph beside two cards, which left a large void under the
 * paragraph. Now a 3-up row that rhymes with the commitments row above it. */
.pays-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: var(--s-16); align-items: stretch; }
.pays-3 .stat-card { margin-top: 0; }
