/* The app's stylesheet (src/app/globals.css) plus the coming-soon additions. Built by scripts/build-coming-soon.py */
/* MonkeyMedia "Wireframe" design language — taken from the monkey head mark (docs/PLAN.md §2.4).
   Line, not fill. Facets, not radii. The hexagon eye is the signature shape. Colour comes only from the videos. */

:root {
  --bg: #0b0b0d;
  --surface: #121215;
  --line-1: rgba(244, 244, 242, 0.14);
  --line-2: rgba(244, 244, 242, 0.26);
  --line-3: #f4f4f2;
  --text: #f4f4f2;
  --muted: #9a9aa1;
  --primary: #f4f4f2;
  --danger: #ff6b5e;
  --cs: 6px;
  --cm: 10px;
  --cl: 16px;
  --gutter: 16px;
  --header-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font-ui: var(--font-outfit), system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: var(--font-jbmono), ui-monospace, "SFMono-Regular", Menlo, monospace;
  --hex: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%);
  --hex-in: polygon(14.6px 1.5px, calc(100% - 14.6px) 1.5px, calc(100% - 1.6px) 50%, calc(100% - 14.6px) calc(100% - 1.5px), 14.6px calc(100% - 1.5px), 1.6px 50%);
  --hex-pointy: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  min-height: 100dvh; background: var(--bg); color: var(--text);
  font: 400 16px/1.45 var(--font-ui);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, video { display: block; max-width: 100%; }
input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--line-3); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.mono { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; line-height: 1.3; }
.muted { color: var(--muted); }
.danger { color: var(--danger); }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }

/* ── header ─────────────────────────────────────────── */
.hdr {
  position: sticky; top: 0; z-index: 30; height: var(--header-h);
  background: rgba(11, 11, 13, 0.92); backdrop-filter: none;
  border-bottom: 1px solid var(--line-1);
}
.hdr .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hdr-right { display: flex; align-items: center; gap: 14px; }
.hdr-logo { display: flex; align-items: center; min-height: 44px; }
.backbar { border-bottom: 1px solid var(--line-1); }
.backbar .back { min-height: 40px; color: var(--muted); }
.wordmark { display: block; overflow: hidden; position: relative; flex: none; }
.wordmark img { position: absolute; max-width: none; }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }

/* ── credit chip (hexagon) ──────────────────────────── */
.credit { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.hexnum { position: relative; min-width: 36px; height: 22px; padding: 0 9px; display: grid; place-items: center; background: var(--line-2);
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 7px 100%, 0 50%); }
.hexnum::before { content: ""; position: absolute; inset: 0; background: var(--bg);
  clip-path: polygon(7.6px 1.5px, calc(100% - 7.6px) 1.5px, calc(100% - 1.7px) 50%, calc(100% - 7.6px) calc(100% - 1.5px), 7.6px calc(100% - 1.5px), 1.7px 50%); }
.hexnum span { position: relative; font: 500 11px var(--font-mono); }

/* ── hexagon buttons (the eye) ──────────────────────── */
.btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  height: 52px; padding: 0 22px; background: var(--primary); color: var(--bg); clip-path: var(--hex);
  font: 500 13px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; text-align: center; white-space: nowrap;
  transition: opacity 120ms;
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: default; }
.btn:active:not(:disabled) { opacity: 0.85; }
.btn.ghost { background: var(--line-2); color: var(--text); }
.btn.ghost::before { content: ""; position: absolute; inset: 0; background: var(--bg); clip-path: var(--hex-in); }
.btn.ghost.on-surface::before { background: var(--surface); }
.btn.ghost > * { position: relative; }
.btn.small { height: 40px; font-size: 12px; padding: 0 18px; }
.btn.auto { width: auto; }
.btn:focus-visible { outline: none; filter: drop-shadow(0 0 0 var(--line-3)); }
.btn:focus-visible::after { content: ""; position: absolute; inset: 3px; clip-path: var(--hex); outline: 2px solid var(--bg); }
.linkish { text-decoration: underline; text-underline-offset: 3px; color: var(--muted); font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }

/* ── chips (chamfered tags) ─────────────────────────── */
.chips { display: flex; gap: 8px; padding: 12px var(--gutter); overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 36px; padding: 0 13px; display: inline-flex; align-items: center;
  border: 1px solid var(--line-2); color: var(--muted);
  clip-path: polygon(var(--cs) 0, 100% 0, 100% calc(100% - var(--cs)), calc(100% - var(--cs)) 100%, 0 100%, 0 var(--cs));
}
.chip[aria-pressed="true"] { background: var(--primary); color: var(--bg); border-color: var(--primary); }

/* ── template tiles ─────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 4px var(--gutter) 32px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1360px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.tile { position: relative; display: block; aspect-ratio: 9 / 16; background: var(--line-2); padding: 1.5px;
  clip-path: polygon(0 0, calc(100% - var(--cm)) 0, 100% var(--cm), 100% 100%, 0 100%); }
.tile:hover, .tile:focus-visible { background: var(--line-3); }
.tile-inner { position: absolute; inset: 1.5px; overflow: hidden; background: var(--surface);
  clip-path: polygon(0 0, calc(100% - var(--cm) + 0.6px) 0, 100% calc(var(--cm) - 0.6px), 100% 100%, 0 100%); }
.tile-inner img, .tile-inner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 9px; background: rgba(11, 11, 13, 0.8); border-top: 1px solid var(--line-1); }
.tile-title { font-weight: 500; font-size: 15px; line-height: 1.2; margin-bottom: 7px; }

/* CAD dimension line: |←— 5 S —→| */
.dim { display: flex; align-items: center; gap: 6px; color: var(--muted); white-space: nowrap; font-size: 10px; }
.dim { flex: none; }
.dim .rule { position: relative; flex: none; width: 40px; height: 7px; border-left: 1px solid currentColor; border-right: 1px solid currentColor; }
.dim .rule::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 1px solid currentColor; }
.dim .rule b { position: absolute; z-index: 1; left: 50%; top: -4px; transform: translateX(-50%); padding: 0 4px; background: #0b0b0d; color: var(--text); font-weight: 400; }
.dim .price { color: var(--text); }

/* ── template page ──────────────────────────────────
   Phone: the example fills the screen under the header and the details sit over its lower edge.
   Desktop (≥900px): two centred columns, the 9:16 example and the details beside it. */
.tpl { position: relative; }
.tpl-media { position: relative; height: calc(100dvh - var(--header-h)); min-height: 520px; background: var(--surface); overflow: hidden; }
.tpl-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tpl-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px var(--gutter) calc(20px + var(--safe-b)); background: rgba(11, 11, 13, 0.84); border-top: 1px solid var(--line-1); }
.tpl-info h1 { font-weight: 500; font-size: 28px; line-height: 1.1; letter-spacing: -0.01em; text-wrap: balance; }
.tpl-info p { color: var(--muted); margin: 6px 0 14px; }
.annot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; color: var(--muted); margin-bottom: 18px; }
.annot i { font-style: normal; color: var(--text); }
/* 5 s or 10 s (owner, 2026-10-14): two chamfered choices, the picked one filled */
.lengths { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: -4px 0 16px; }
.len {
  min-height: 48px; padding: 6px 12px; display: grid; justify-items: start; align-content: center; gap: 1px; text-align: left;
  border: 1px solid var(--line-2); color: var(--muted); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
  clip-path: polygon(var(--cs) 0, 100% 0, 100% calc(100% - var(--cs)), calc(100% - var(--cs)) 100%, 0 100%, 0 var(--cs));
}
.len b { font-weight: 500; font-size: 15px; color: var(--text); letter-spacing: 0.02em; }
.len[aria-checked="true"] { background: var(--primary); border-color: var(--primary); color: var(--bg); }
.len[aria-checked="true"] b { color: var(--bg); }
.sound-toggle, .hero-back { position: absolute; top: 14px; width: 44px; height: 44px; display: grid; place-items: center; background: rgba(11, 11, 13, 0.6); clip-path: var(--hex-pointy); z-index: 2; }
.sound-toggle { right: 14px; }
.hero-back { left: 14px; }
.tpl-extra { display: none; }
.tpl-more { padding: 22px var(--gutter) 36px; width: 100%; max-width: 1280px; margin: 0 auto; }
.tpl-more h2 { font-size: 11px; font-weight: 500; margin-bottom: 10px; }
.more-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(140px, 46%); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.more-row .tile { scroll-snap-align: start; }
@media (min-width: 720px) { .more-row { grid-auto-columns: minmax(160px, 1fr); grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; } }
@media (min-width: 1100px) { .more-row { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (min-width: 900px) {
  .tpl-extra { display: grid; gap: 4px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line-1); color: var(--text); font-size: 15px; }
  .tpl-extra ul { list-style: none; display: grid; gap: 4px; margin: 2px 0 12px; }
  .tpl-extra p { margin: 0; font-size: 15px; color: var(--text); }
  .tpl-extra p.mono { font-size: 11px; color: var(--muted); margin-top: 6px; }
  .tpl-extra li::before { content: ""; display: inline-block; width: 5px; height: 5px; border: 1px solid var(--line-3); transform: rotate(45deg); margin-right: 10px; vertical-align: middle; }
  .tpl {
    display: grid; grid-template-columns: auto minmax(0, 400px); gap: 56px;
    justify-content: center; align-items: center;
    min-height: calc(100dvh - var(--header-h)); padding: 32px var(--gutter);
  }
  .tpl-media { height: min(78dvh, 760px); min-height: 0; aspect-ratio: 9 / 16; width: auto; max-width: 100%; background: var(--line-2); padding: 1.5px;
    clip-path: polygon(0 0, calc(100% - var(--cl)) 0, 100% var(--cl), 100% 100%, 0 100%); }
  .tpl-media video { inset: 1.5px; width: calc(100% - 3px); height: calc(100% - 3px); clip-path: polygon(0 0, calc(100% - var(--cl) + 0.6px) 0, 100% calc(var(--cl) - 0.6px), 100% 100%, 0 100%); }
  .tpl-info { position: static; background: none; border: 0; padding: 0; }
  .tpl-info h1 { font-size: 40px; }
  .tpl-info p { font-size: 18px; margin: 10px 0 22px; }
}

/* ── sheet (bottom on phones, panel on desktop) ─────── */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(5, 5, 6, 0.6); animation: fade 160ms ease-out; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 92dvh; display: flex; flex-direction: column;
  background: var(--line-2); padding-top: 1.5px;
  clip-path: polygon(var(--cl) 0, calc(100% - var(--cl)) 0, 100% var(--cl), 100% 100%, 0 100%, 0 var(--cl));
  animation: rise 200ms ease-out;
}
.sheet-in { overflow-y: auto; overscroll-behavior: contain; background: var(--surface); padding: 12px var(--gutter) calc(20px + var(--safe-b));
  clip-path: polygon(calc(var(--cl) + 0.6px) 0, calc(100% - var(--cl) - 0.6px) 0, 100% calc(var(--cl) + 0.6px), 100% 100%, 0 100%, 0 calc(var(--cl) + 0.6px)); }
@media (min-width: 720px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 440px; transform: translate(-50%, -50%); clip-path: polygon(var(--cl) 0, 100% 0, 100% calc(100% - var(--cl)), calc(100% - var(--cl)) 100%, 0 100%, 0 var(--cl)); animation: fade 160ms ease-out; }
  .sheet-in { clip-path: polygon(calc(var(--cl) + 0.6px) 0, 100% 0, 100% calc(100% - var(--cl) - 0.6px), calc(100% - var(--cl) - 0.6px) 100%, 0 100%, 0 calc(var(--cl) + 0.6px)); }
}
.grab { display: flex; align-items: center; justify-content: center; margin: 2px 0 16px; }
.grab .v { width: 5px; height: 5px; border: 1px solid var(--line-3); transform: rotate(45deg); }
.grab .l { width: 36px; border-top: 1px solid var(--line-3); }
.sheet h2 { font-weight: 500; font-size: 19px; line-height: 1.2; margin-bottom: 4px; }
.sheet .sub { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.stack { display: grid; gap: 10px; }
.fine { color: var(--muted); text-align: center; font-size: 13px; margin-top: 12px; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ── faces (hexagon avatars) ────────────────────────── */
.faces { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: none; }
.face { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); min-width: 60px; }
.face .hx { position: relative; width: 58px; height: 64px; background: var(--line-2); clip-path: var(--hex-pointy); }
.face[aria-pressed="true"] .hx { background: var(--line-3); }
.face[aria-pressed="true"] { color: var(--text); }
.face .hx > img, .face .hx > span { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); object-fit: cover; clip-path: var(--hex-pointy); background: var(--surface); display: grid; place-items: center; font-size: 26px; font-weight: 300; }
.face .dot { width: 5px; height: 5px; }
.face[aria-pressed="true"] .dot { background: var(--line-3); transform: rotate(45deg); }

.check { display: flex; align-items: center; gap: 8px; padding: 11px 0 13px; border-top: 1px solid var(--line-1); min-height: 44px; }
.check.bad { color: var(--danger); }

/* ── inputs ─────────────────────────────────────────── */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { color: var(--muted); }
.input {
  width: 100%; height: 50px; padding: 0 14px; font-size: 17px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 0;
  clip-path: polygon(var(--cs) 0, 100% 0, 100% calc(100% - var(--cs)), calc(100% - var(--cs)) 100%, 0 100%, 0 var(--cs));
}
.input:focus { outline: none; border-color: var(--line-3); }
.input.code { font-family: var(--font-mono); letter-spacing: 0.4em; text-align: center; font-size: 22px; }
.counter { text-align: right; color: var(--muted); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); padding: 6px 0 14px; }
.consent input { width: 20px; height: 20px; margin-top: 1px; accent-color: #f4f4f2; flex: none; }
.err { color: var(--danger); font-size: 14px; margin: 4px 0 10px; }
.devnote { border: 1px dashed var(--line-2); padding: 8px 10px; margin: 6px 0 12px; color: var(--muted); }

/* ── generating ─────────────────────────────────────── */
.gen { position: relative; min-height: calc(100dvh - var(--header-h)); display: flex; flex-direction: column; align-items: center; padding: 40px var(--gutter) calc(32px + var(--safe-b)); overflow: hidden; }
.mesh { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.05; pointer-events: none; }
.scanhead { position: relative; width: min(250px, 64vw); aspect-ratio: 1148 / 895; margin-top: 12px; }
.scanhead img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.scanhead .dimmed { opacity: 0.16; }
.scanhead .lit { opacity: 0.95; animation: band 3.2s linear infinite; }
.scanhead .scan { position: absolute; left: -14px; right: -14px; height: 1px; background: var(--line-3); animation: scan 3.2s linear infinite; }
@keyframes scan { from { top: 0; } to { top: 100%; } }
@keyframes band { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(calc(100% - 14px) 0 0 0); } }
.gen h1 { position: relative; font-weight: 500; font-size: 22px; margin-top: 28px; text-align: center; }
.gen .elapsed { position: relative; margin-top: 6px; color: var(--muted); }
.steps { position: relative; margin-top: 26px; width: min(260px, 100%); list-style: none; }
.step { position: relative; display: flex; align-items: center; gap: 14px; height: 44px; color: var(--muted); }
.step .node { position: relative; width: 16px; height: 18px; flex: none; background: var(--line-2); clip-path: var(--hex-pointy); }
.step .node::before { content: ""; position: absolute; inset: 1.5px; clip-path: var(--hex-pointy); background: var(--bg); }
.step.done .node, .step.now .node { background: var(--line-3); }
.step.done .node::before { background: var(--line-3); }
.step.done, .step.now { color: var(--text); }
.step::after { content: ""; position: absolute; left: 7.5px; top: 31px; height: 26px; border-left: 1px solid var(--line-2); }
.step:last-child::after { display: none; }
.step.done::after { border-left-color: var(--line-3); }
.step.now::after { border: 0; width: 1px; background: var(--line-3); transform-origin: top; animation: draw 1.6s ease-in-out infinite; }
@keyframes draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.leave { position: relative; margin-top: auto; padding-top: 28px; text-align: center; color: var(--muted); font-size: 14px; max-width: 320px; }
.leave b { color: var(--text); font-weight: 500; }
.toggle-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; min-height: 44px; color: var(--muted); font-size: 14px; }
.toggle-row input { width: 20px; height: 20px; accent-color: #f4f4f2; }

/* ── result ─────────────────────────────────────────── */
.result { max-width: 460px; margin: 0 auto; padding: 16px var(--gutter) calc(28px + var(--safe-b)); }
.frame { position: relative; aspect-ratio: 9 / 16; max-height: 66dvh; margin: 0 auto 14px; background: var(--line-3); padding: 1.5px;
  clip-path: polygon(var(--cm) 0, 100% 0, 100% calc(100% - var(--cm)), calc(100% - var(--cm)) 100%, 0 100%, 0 var(--cm)); }
.frame-inner { position: absolute; inset: 1.5px; overflow: hidden; background: var(--surface);
  clip-path: polygon(var(--cm) 0, 100% 0, 100% calc(100% - var(--cm)), calc(100% - var(--cm)) 100%, 0 100%, 0 var(--cm)); }
.frame-inner video, .frame-inner img { width: 100%; height: 100%; object-fit: cover; }
.frame.draw { animation: outline 300ms ease-out; }
@keyframes outline { from { background: var(--line-1); } to { background: var(--line-3); } }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.escape { border: 1px solid var(--line-2); padding: 12px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.escape b { color: var(--text); font-weight: 500; }
.reasons { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }

/* ── lists (My Videos, ops) ─────────────────────────── */
.page { padding: 20px var(--gutter) calc(40px + var(--safe-b)); max-width: 1100px; margin: 0 auto; }
.page h1 { font-weight: 500; font-size: 24px; margin-bottom: 4px; }
.tabs { display: flex; gap: 8px; margin: 14px 0 18px; overflow-x: auto; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card-state { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 9px; background: rgba(11, 11, 13, 0.82); }
.panel { border: 1px solid var(--line-1); padding: 14px; margin-bottom: 14px;
  clip-path: polygon(var(--cs) 0, 100% 0, 100% calc(100% - var(--cs)), calc(100% - var(--cs)) 100%, 0 100%, 0 var(--cs)); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line-1); vertical-align: top; }
table.data th { color: var(--muted); font: 500 10px var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; }
.scroll-x { overflow-x: auto; }
.empty { position: relative; padding: 48px 16px; text-align: center; color: var(--muted); overflow: hidden; }
.empty img { width: 120px; margin: 0 auto 16px; opacity: 0.5; }
.legal { max-width: 720px; }
.legal h2 { font-weight: 500; font-size: 18px; margin: 22px 0 6px; }
.legal p, .legal li { color: var(--muted); margin-bottom: 8px; }
.legal ul { padding-left: 18px; }
.footer { border-top: 1px solid var(--line-1); padding: 18px var(--gutter) calc(18px + var(--safe-b)); display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); }
.footer a { min-height: 32px; display: inline-flex; align-items: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .scanhead .scan { display: none; }
  .scanhead .lit { clip-path: none; opacity: 0.4; }
}

/* accounts + plans (2026-10-13) */
.account-form .chips { padding: 0; }
.pw-row { position: relative; }
.pw-row .input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); min-height: 32px; font-size: 13px; }
.linkish.centered { width: 100%; justify-content: center; }
.plans { display: grid; gap: 10px; }
.plans-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 8px 0 0; font-weight: 400; }
.plan { position: relative; padding: 14px 14px 12px; border: 1px solid var(--line-1); background: var(--surface); }
.plan.best { border-color: var(--line-3); }
.plan.best::after { content: "Best value"; position: absolute; top: -9px; right: 12px; padding: 1px 8px; font: 10px/16px var(--font-mono, monospace); letter-spacing: 0.06em;
  text-transform: uppercase; background: var(--line-3); color: var(--bg); }
.plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.plan-head strong { font-weight: 500; font-size: 17px; }
.plan-blurb { font-size: 14px; margin: 0 0 12px; }

/* yearly plan: the one we want people on (owner, 2026-10-13) */
.plan.yearly { padding: 0; border-color: var(--line-3); overflow: hidden; min-height: 210px; isolation: isolate;
  background: radial-gradient(120% 90% at 85% 20%, rgba(244, 244, 242, 0.07), transparent 60%), var(--surface); }
.plan.yearly::after { content: none; }
.plan-art { position: absolute; right: -44px; top: -34px; width: 190px; height: 190px; z-index: -1; opacity: 0.8; pointer-events: none; }
.plan-flag { position: absolute; top: 12px; right: 12px; padding: 2px 9px; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--line-3); color: var(--bg); }
.plan-yearly-body { position: relative; padding: 18px 16px 14px; display: grid; gap: 6px; }
.plan-name { font-weight: 500; font-size: 18px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-price .big { font-size: 40px; line-height: 1; font-weight: 500; letter-spacing: -0.02em; }
.plan.yearly .plan-blurb { color: var(--text); opacity: 0.82; max-width: 34ch; }
@media (min-width: 640px) { .plan-art { width: 240px; height: 240px; right: -30px; top: -30px; } }

/* ── landing (2026-10-13): the front door. Line, facets, motion; colour only from the videos ─────────────────── */
.landing { overflow-x: clip; }
.landing h2 { font-weight: 500; font-size: clamp(28px, 7vw, 44px); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
.landing h3 { font-weight: 500; font-size: 19px; }
.eyebrow { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.section-head { padding: 0 var(--gutter); max-width: 1280px; margin: 0 auto 18px; }
.section-sub { margin-top: 10px; max-width: 56ch; font-size: 16px; }
.landing section { position: relative; padding: 56px 0; }
.anchor { position: absolute; top: -60px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* faceted divider that draws itself */
.facet-rule, .facet-rule.reveal { padding: 0 var(--gutter); max-width: 1280px; margin: 0 auto; opacity: 1; transform: none; }
.facet-rule svg { display: block; width: 100%; height: 28px; }
.facet-rule polyline { fill: none; stroke: var(--line-2); stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-dasharray: 1600; stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s ease; }
.facet-rule.reveal:not(.in) polyline { stroke-dashoffset: 1600; }

/* hero */
.landing .hero { padding: 14px 0 32px; }
.hero { display: grid; gap: 18px; isolation: isolate; grid-template-areas: "top" "reel" "copy"; }
.hero-top { grid-area: top; padding: 0 var(--gutter); }
.hero .reel { grid-area: reel; }
.hero-copy { grid-area: copy; }
.hero-field { position: absolute; inset: -10% -30% auto -30%; height: 120%; z-index: -1; opacity: 0.55; pointer-events: none; }
.hero-copy { padding: 0 var(--gutter); max-width: 640px; }
.hero-top .kicker { margin-bottom: 12px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line-1); padding: 6px 10px; margin-bottom: 18px; }
.kdot { width: 7px; height: 7px; background: var(--line-3); transform: rotate(45deg); animation: kpulse 2.4s ease-in-out infinite; }
@keyframes kpulse { 50% { opacity: 0.25; } }
.hero-h { font-weight: 500; font-size: clamp(36px, 10vw, 84px); line-height: 0.95; letter-spacing: -0.035em; text-wrap: balance; }
.hero-h span { display: block; opacity: 0; transform: translateY(18px); animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.hero-h .l2 { animation-delay: 0.12s; color: transparent; -webkit-text-stroke: 1.2px var(--line-3); }
.hero-br { display: none; }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero-lead { margin-top: 4px; font-size: 17px; line-height: 1.45; color: var(--text); opacity: 0.86; max-width: 34ch; animation: rise 0.9s 0.25s both; }
.hero-cta { display: grid; gap: 10px; margin-top: 24px; max-width: 420px; animation: rise 0.9s 0.35s both; }
.hero-fine { margin-top: 14px; font-size: 11px; letter-spacing: 0.04em; color: var(--muted); animation: rise 0.9s 0.45s both; }

/* the reel: a faceted phone frame */
.reel { position: relative; padding: 0 var(--gutter); justify-self: center; width: min(100%, 300px, 52dvh); animation: rise 1s 0.2s both; margin-top: 18px; }
.reel-frame { position: relative; aspect-ratio: 9 / 16; background: var(--line-2); padding: 1.5px;
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px); }
.reel-frame::before { content: ""; position: absolute; inset: 1.5px; background: var(--surface);
  clip-path: polygon(17.4px 0, calc(100% - 17.4px) 0, 100% 17.4px, 100% calc(100% - 17.4px), calc(100% - 17.4px) 100%, 17.4px 100%, 0 calc(100% - 17.4px), 0 17.4px); }
.reel-video { position: absolute; inset: 1.5px; width: calc(100% - 3px); height: calc(100% - 3px); object-fit: cover; opacity: 0; transition: opacity 0.6s ease;
  clip-path: polygon(17.4px 0, calc(100% - 17.4px) 0, 100% 17.4px, 100% calc(100% - 17.4px), calc(100% - 17.4px) 100%, 17.4px 100%, 0 calc(100% - 17.4px), 0 17.4px); }
.reel-video.on { opacity: 1; }
.reel-scan { position: absolute; left: 1.5px; right: 1.5px; height: 1px; background: rgba(244, 244, 242, 0.55); box-shadow: 0 0 12px rgba(244, 244, 242, 0.5);
  top: 0; animation: scan 4.8s linear infinite; pointer-events: none; }
@keyframes scan { 0% { top: 2%; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { top: 98%; opacity: 0; } }
.reel-photo { position: absolute; left: 14px; top: 14px; display: grid; justify-items: center; gap: 4px; }
.reel-photo .hx { position: relative; width: 72px; height: 80px; background: var(--line-3); clip-path: var(--hex-pointy); }
.reel-photo .hx img { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); object-fit: cover; clip-path: var(--hex-pointy); }
.reel-photo-label { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; background: rgba(11, 11, 13, 0.8); padding: 2px 6px; }
.reel-caption { position: absolute; left: 1.5px; right: 1.5px; bottom: 1.5px; padding: 30px 14px 14px; display: grid; gap: 2px;
  background: linear-gradient(to top, rgba(11, 11, 13, 0.92), rgba(11, 11, 13, 0)); }
.reel-caption strong { font-weight: 500; font-size: 18px; }
.reel-count { font-size: 10px; color: var(--muted); letter-spacing: 0.1em; }
.reel-line { font-size: 14px; opacity: 0.8; }
.reel-ticks { display: flex; gap: 6px; align-items: center; margin-top: 12px; }
.tick { flex: 1; height: 3px; background: var(--line-1); position: relative; overflow: hidden; min-width: 0; }
.tick.on { background: var(--line-2); }
.tick.on::after { content: ""; position: absolute; inset: 0; background: var(--line-3); transform-origin: left; animation: fill 4.8s linear forwards; }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.tick-pause { font-size: 10px; color: var(--muted); padding: 6px 4px; min-height: 32px; letter-spacing: 0.08em; text-transform: uppercase; }
.reel-dim { position: absolute; right: calc(var(--gutter) - 4px); top: -22px; display: flex; gap: 8px; align-items: center; font-size: 10px; color: var(--muted); }
.reel-dim .rule { position: relative; width: 48px; height: 7px; border-left: 1px solid currentColor; border-right: 1px solid currentColor; }
.reel-dim .rule::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 1px solid currentColor; }
.reel-dim .rule b { position: absolute; left: 50%; top: -5px; transform: translateX(-50%); padding: 0 4px; background: var(--bg); color: var(--text); font-weight: 400; }

/* scenes */
.landing .scenes { padding-top: 24px; }
.scenes .chips { position: sticky; top: var(--header-h); z-index: 5; background: rgba(11, 11, 13, 0.94); }

/* how */
.how-steps { list-style: none; display: grid; gap: 12px; padding: 0 var(--gutter); max-width: 1280px; margin: 0 auto; }
.how-step { border: 1px solid var(--line-1); padding: 18px; display: grid; gap: 10px; align-content: start; background: var(--surface); }
.how-step .hexnum { justify-self: start; }

/* pairs */
.pairs { display: grid; grid-auto-flow: column; grid-auto-columns: min(62%, 260px); gap: 12px; overflow-x: auto; padding: 4px var(--gutter) 10px;
  scroll-snap-type: x mandatory; scrollbar-width: none; max-width: 1280px; margin: 0 auto; }
.pairs::-webkit-scrollbar { display: none; }
.pair { scroll-snap-align: start; display: grid; gap: 10px; }
.pair-video { position: relative; aspect-ratio: 9 / 16; background: var(--surface); border: 1px solid var(--line-1); overflow: hidden; }
.pair-video > img, .pair-video > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pair-photo.hx { position: absolute; left: 10px; bottom: 10px; width: 58px; height: 64px; background: var(--line-3); clip-path: var(--hex-pointy); }
.pair-photo.hx img { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); object-fit: cover; clip-path: var(--hex-pointy); }
.pair-meta { display: grid; gap: 2px; font-size: 14px; }
.pair-meta strong { font-weight: 500; font-size: 16px; }

/* pricing */
.price-grid { display: grid; gap: 12px; padding: 0 var(--gutter); max-width: 1280px; margin: 0 auto; }
.price-card { position: relative; border: 1px solid var(--line-1); background: var(--surface); padding: 20px 18px 18px; display: grid; gap: 8px; align-content: start; overflow: hidden; isolation: isolate; }
.price-card .btn { margin-top: 8px; }
.price-card.yearly { border-color: var(--line-3); padding-top: 26px;
  background: radial-gradient(110% 80% at 90% 10%, rgba(244, 244, 242, 0.08), transparent 60%), var(--surface); }
.price-card.yearly p { max-width: 36ch; opacity: 0.86; }
.price-art { position: absolute; right: -60px; top: -50px; width: 260px; height: 260px; z-index: -1; opacity: 0.75; pointer-events: none; }
.plan-price .mid { font-size: 30px; line-height: 1; font-weight: 500; }
.packs-line { padding: 16px var(--gutter) 0; max-width: 1280px; margin: 0 auto; font-size: 15px; }

/* trust */
.trust-list { list-style: none; display: grid; gap: 1px; background: var(--line-1); border: 1px solid var(--line-1); margin: 0 var(--gutter); }
.trust-item { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 14px; background: var(--bg); font-size: 15px; align-items: baseline; }
.trust-k { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* faq */
.faq-list { padding: 0 var(--gutter); max-width: 820px; margin: 0 auto; display: grid; }
.faq-item { border-top: 1px solid var(--line-1); }
.faq-item:last-child { border-bottom: 1px solid var(--line-1); }
.faq-item summary { list-style: none; cursor: pointer; padding: 16px 28px 16px 0; font-size: 17px; position: relative; min-height: 44px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 9px; height: 9px; border-right: 1px solid var(--line-3); border-bottom: 1px solid var(--line-3);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.25s; }
.faq-item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-item p { padding: 0 0 16px; max-width: 64ch; }

/* final */
.landing .final { text-align: center; padding: 80px var(--gutter) 90px; display: grid; gap: 22px; justify-items: center; isolation: isolate; overflow: hidden; }
.final-field { position: absolute; inset: -20% -40%; z-index: -1; opacity: 0.4; pointer-events: none; }
.final .btn { width: auto; min-width: 240px; }

@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); grid-template-areas: "top reel" "copy reel"; align-content: center; column-gap: 32px;
    max-width: 1280px; margin: 0 auto; padding: 48px 0 64px; min-height: calc(100dvh - var(--header-h)); }
  .hero-top { align-self: end; padding-left: calc(var(--gutter) + 8px); }
  .hero-copy { align-self: start; padding-left: calc(var(--gutter) + 8px); }
  .hero-top .kicker { margin-bottom: 18px; }
  .hero-br { display: inline; }
  .hero-lead { margin-top: 18px; font-size: 18px; }
  .hero .reel { margin-top: 0; }
  .hero-cta { grid-template-columns: auto auto; justify-content: start; }
  .hero-cta .btn { width: auto; padding: 0 28px; }
  .hero .reel { width: min(380px, 70dvh); }
  .how-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .price-grid { grid-template-columns: 1.3fr 1fr 1fr; align-items: stretch; }
  .trust-list { grid-template-columns: 1fr 1fr; max-width: 1248px; margin: 0 auto; }
  .landing section { padding: 80px 0; }
  .landing .hero { padding: 48px 0 64px; }
}
/* phones and small tablets only: the desktop layout above stays exactly as it is */
.grid-more { display: none; }
@media (max-width: 899px) {
  /* the full catalog is ~6,000 px of tiles on a phone; show the first rows, the rest on request */
  .grid-more { display: flex; width: calc(100% - 2 * var(--gutter)); margin: -12px var(--gutter) 8px; }
  /* snapping aligned the first card to the screen edge; keep it on the page gutter */
  .pairs { scroll-padding-inline: var(--gutter); }
}
@media (max-width: 719px) { .grid.collapsed > .tile:nth-child(n+9) { display: none; } }   /* 4 rows of 2 */
@media (min-width: 720px) and (max-width: 899px) { .grid.collapsed > .tile:nth-child(n+10) { display: none; } } /* 3 rows of 3 */
@media (max-width: 639px) {
  /* the yearly card's gem sat under the copy; keep it in the corner, behind the flag */
  .price-art { width: 150px; height: 150px; right: -34px; top: -46px; opacity: 0.5; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-h span, .hero-lead, .hero-cta, .hero-fine, .reel { animation: none; opacity: 1; transform: none; }
  .reel-scan, .kdot, .tick.on::after { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .facet-rule polyline { stroke-dashoffset: 0; transition: none; }
}
.hdr-signin { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); min-height: 44px; display: inline-flex; align-items: center; padding: 0 4px; }

/* ── coming-soon page additions (static site; everything above is the app's own stylesheet) ───── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lb[hidden], .lb-backdrop[hidden], .grid-more[hidden] { display: none !important; }
button.tile, .reel-photo { cursor: pointer; }

/* waitlist form: an email field and the button, side by side once there is room */
.wl-form { display: grid; gap: 10px; width: 100%; max-width: 460px; margin-top: 24px; animation: rise 0.9s 0.35s both; }
.wl-form .input { height: 52px; color: var(--text); font-family: var(--font-ui); }
.wl-form .input::placeholder { color: var(--muted); }
@media (min-width: 560px) {
  .wl-form { grid-template-columns: minmax(0, 1fr) auto; }
  .wl-form .btn { width: auto; padding: 0 26px; }
}
.wl-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.wl-msg { min-height: 1.45em; margin-top: 12px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.wl-msg.ok { color: var(--text); }
.wl-msg.bad { color: var(--danger); }
.wl-note { font-size: 12px; color: var(--muted); }
.landing .final .wl-form { margin: 2px auto 0; text-align: left; }
.landing .final .wl-form .btn { min-width: 0; }
.landing .final .wl-msg { margin-top: -8px; }
.landing .final .section-sub { margin: -6px auto 0; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .wl-form { animation: none; } }

/* scene viewer: the app's bottom sheet (centred card on desktop) with the scene's video */
.lb:focus { outline: none; }
.lb .sheet-in { text-align: center; }
.lb-frame { position: relative; width: min(100%, 270px); aspect-ratio: 9 / 16; max-height: 54dvh; margin: 0 auto 16px; background: var(--line-2); padding: 1.5px;
  clip-path: polygon(0 0, calc(100% - var(--cm)) 0, 100% var(--cm), 100% 100%, 0 100%); }
.lb-frame video { position: absolute; inset: 1.5px; width: calc(100% - 3px); height: calc(100% - 3px); object-fit: cover; background: var(--bg);
  clip-path: polygon(0 0, calc(100% - var(--cm) + 0.6px) 0, 100% calc(var(--cm) - 0.6px), 100% 100%, 0 100%); }
.lb-sound { position: absolute; right: 10px; bottom: 10px; z-index: 1; font-size: 10px; padding: 6px 10px; background: rgba(11, 11, 13, 0.75); color: var(--text); }
.lb .lb-dim { font-size: 10px; color: var(--muted); margin: 0 0 16px; }
.lb .btn { margin-top: 2px; }
.lb .linkish { margin: 4px auto 0; justify-content: center; width: 100%; }
@media (max-height: 640px) { .lb-frame { width: min(100%, 210px); } }
