/* ─────────────────────────────────────────────────────────────────────────────
   PREVISTO — public landing page. Director's Cut palette, standalone from the
   studio app styles. Motion: one-shot hero animatic + scroll reveals; fully
   disabled under prefers-reduced-motion.
   ───────────────────────────────────────────────────────────────────────────── */

:root {
  --bg: #0b0908;
  --bg-2: #121009;
  --surface: #16130f;
  --surface-2: #1d1914;
  --line: rgba(228, 209, 182, 0.12);
  --line-strong: rgba(234, 218, 192, 0.26);
  --ink: #f0e9dc;
  --muted: #a89e8c;
  --gold: #e3a94f;
  --gold-bright: #f4cd7e;
  --gold-deep: #b97f2e;
  --gold-soft: rgba(227, 169, 79, 0.13);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold-soft); color: var(--gold-bright); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

/* ── top bar ─────────────────────────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  background: rgba(11, 9, 8, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-brand {
  font-family: var(--serif);
  font-size: 22px; letter-spacing: 0.28em; padding-left: 0.28em;
  color: var(--ink); text-decoration: none;
}
.site-nav { display: flex; gap: 26px; align-items: center; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-size: 13.5px;
  letter-spacing: 0.02em; transition: color 0.15s;
}
.site-nav a:hover { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 22px; border-radius: 10px;
  font-family: var(--sans); font-weight: 600; font-size: 14.5px;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s;
}
.btn-gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #201505;
  box-shadow: 0 4px 24px rgba(227, 169, 79, 0.25);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 6px 30px rgba(227, 169, 79, 0.35); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.site-nav .btn { padding: 9px 18px; font-size: 13.5px; }

/* ── hero ────────────────────────────────────────────────────────────────── */
.hero { padding: 84px 0 40px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto;  height: 480px;
  background: radial-gradient(ellipse at 50% 0%, rgba(227, 169, 79, 0.08), transparent 65%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }

.hero-eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  color: var(--gold); text-transform: none;
}
.hero-eyebrow .dict { color: var(--muted); font-style: italic; letter-spacing: 0.02em; }
.hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(42px, 5.6vw, 64px); line-height: 1.06;
  margin: 18px 0 20px; letter-spacing: 0.005em;
}
.hero h1 em { font-style: italic; color: var(--gold-bright); }
.hero-sub { color: var(--muted); font-size: 17.5px; max-width: 46ch; margin: 0 0 30px; }
.hero-sub strong { color: var(--ink); font-weight: 600; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-note { margin-top: 18px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: 0.06em; }

/* ── hero animatic board ─────────────────────────────────────────────────── */
.board {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.board-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em;
  color: var(--muted); text-transform: uppercase; padding: 2px 4px 12px;
}
.board-tally { display: inline-flex; align-items: center; gap: 7px; color: var(--gold); }
.tally-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #e05545; box-shadow: 0 0 10px rgba(224, 85, 69, 0.8);
  animation: tallyBlink 2.2s ease-in-out infinite;
}
@keyframes tallyBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.board-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.panel {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  opacity: 0;
  transform: translateY(10px);
  animation: panelIn 0.7s ease forwards;
}
.panel:nth-child(1) { animation-delay: 0.3s; }
.panel:nth-child(2) { animation-delay: 1.5s; }
.panel:nth-child(3) { animation-delay: 2.7s; }
.panel:nth-child(4) { animation-delay: 3.9s; }
@keyframes panelIn { to { opacity: 1; transform: none; } }

.panel svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.panel svg path, .panel svg circle, .panel svg line {
  fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 1.6s ease forwards;
  opacity: 0.9;
}
.panel:nth-child(1) svg * { animation-delay: 0.55s; }
.panel:nth-child(2) svg * { animation-delay: 1.75s; }
.panel:nth-child(3) svg * { animation-delay: 2.95s; }
.panel:nth-child(4) svg * { animation-delay: 4.15s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.panel-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 6px 10px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em;
  color: var(--muted); background: rgba(11, 9, 8, 0.72);
  border-top: 1px solid var(--line);
  text-transform: uppercase;
}
.panel-gate {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: var(--gold-soft);
}
.gate-chip {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  color: var(--gold-bright); border: 1.5px solid var(--gold);
  border-radius: 8px; padding: 9px 14px; text-transform: uppercase;
  transform: rotate(-6deg) scale(1.4); opacity: 0;
  animation: stamp 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
  animation-delay: 5.1s;
  background: rgba(11, 9, 8, 0.65);
}
@keyframes stamp { to { transform: rotate(-6deg) scale(1); opacity: 1; } }

.board-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 4px 2px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em;
  color: var(--muted); text-transform: uppercase;
}
.board-foot .gate-status { color: var(--gold); opacity: 0; animation: fadeIn 0.6s ease forwards; animation-delay: 5.5s; }
@keyframes fadeIn { to { opacity: 1; } }

/* ── hero sketch frame (single board) ────────────────────────────────────── */
.sframe {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.sframe svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Hero 50/50: render left, sketch right, scan holding the seam — the product in one frozen frame.
   On load the seam draws from the right edge to center, then holds. */
.sframe-render {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.sframe-sketch {
  position: absolute; inset: 0;
  clip-path: inset(0 0 0 0);
  animation: heroSplit 1.9s cubic-bezier(0.6, 0, 0.3, 1) 0.5s forwards;
  will-change: clip-path;
}
.sframe-sketch img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.sframe-scan {
  position: absolute; top: 0; bottom: 0; width: 2px; left: 0; opacity: 0;
  background: linear-gradient(180deg, transparent, var(--gold-bright), transparent);
  box-shadow: 0 0 18px 3px rgba(244, 205, 126, 0.45);
  animation: heroScan 1.9s cubic-bezier(0.6, 0, 0.3, 1) 0.5s forwards;
}
.sframe { cursor: ew-resize; touch-action: pan-y; }
.scan-grip {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--gold-deep);
  background: rgba(11, 9, 8, 0.85); color: var(--gold-bright);
  font-size: 13px; user-select: none; pointer-events: none;
}
@keyframes heroSplit { to { clip-path: inset(0 0 0 42%); } }
@keyframes heroScan { 0% { left: 0; opacity: 0; } 12% { opacity: 1; } 100% { left: 42%; opacity: 1; } }
.sframe svg path, .sframe svg circle, .sframe svg line {
  fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 1.4s ease forwards;
  opacity: 0.92;
}
.sframe svg .faint, .sframe svg .faint * { stroke-width: 0.8; opacity: 0.32; }
.sframe svg path:nth-of-type(odd) { animation-delay: 0.5s; }
.sframe svg path:nth-of-type(even) { animation-delay: 1.1s; }
.sframe svg circle { animation-delay: 1.5s; }
.sframe svg .faint * { animation-delay: 1.8s; }
.sk-note {
  font-family: var(--mono); font-size: 7px; letter-spacing: 0.08em;
  fill: var(--muted); stroke: none !important;
  opacity: 0; animation: fadeIn 0.5s ease forwards; animation-delay: 2.3s;
}

/* ── develop: sketch → render scroll-scrub ───────────────────────────────── */
.develop { height: 280vh; padding: 0; border-top: 1px solid var(--line); }
.develop-sticky {
  position: sticky; top: 0; height: 100vh;
  display: grid; align-items: center;
}
.wrap-wide { max-width: 1440px; }
.dev-kicker { text-align: center; margin-bottom: 16px; }
.dev-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: min(100%, calc((100vh - 250px) * 16 / 9));
  margin: 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
}
.dev-frame > svg.dev-render, .dev-frame > img.dev-render {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover;
}
/* The take: second wipe — revealed left→right over the render, already in motion. */
.dev-take {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  clip-path: inset(0 100% 0 0);
  pointer-events: none;
  will-change: clip-path;
}
.dev-sketch {
  position: absolute; inset: 0; background: var(--bg-2);
  will-change: clip-path;
}
.dev-sketch svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dev-sketch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.dev-sketch svg path, .dev-sketch svg circle, .dev-sketch svg line {
  fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round; opacity: 0.92;
}
.dev-sketch svg .faint, .dev-sketch svg .faint * { stroke-width: 0.8; opacity: 0.32; }
.dev-sketch .sk-note { opacity: 1; animation: none; }
.dev-scan {
  position: absolute; top: 0; bottom: 0; width: 2px; left: 0; opacity: 0;
  background: linear-gradient(180deg, transparent, var(--gold-bright), transparent);
  box-shadow: 0 0 22px 4px rgba(244, 205, 126, 0.5);
  transition: opacity 0.3s;
  will-change: left;
}
.dev-stamp {
  position: absolute; top: 18px; right: 18px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold-bright);
  border: 1.5px solid var(--gold); border-radius: 8px; padding: 8px 13px;
  background: rgba(11, 9, 8, 0.65);
  transform: rotate(6deg) scale(1.4); opacity: 0;
  transition: transform 0.35s cubic-bezier(0.2, 1.4, 0.4, 1), opacity 0.35s;
}
.dev-stamp.on { transform: rotate(6deg) scale(1); opacity: 1; }
/* Lower third — the three stages live BELOW the frame, never over the picture. */
.dev-stages {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  width: min(100%, calc((100vh - 250px) * 16 / 9));
  margin: 14px auto 0;
}
.dev-stage {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  column-gap: 12px; align-items: baseline;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  opacity: 0.45;
  transition: opacity 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}
.dev-stage .stage-num {
  grid-row: 1 / 3;
  font-family: var(--mono); font-size: 20px; color: var(--muted);
}
.dev-stage .stage-name {
  font-family: var(--serif); font-size: 19px; color: var(--ink); line-height: 1.15;
}
.dev-stage .stage-sub {
  grid-column: 2; font-size: 12.5px; color: var(--muted); margin-top: 2px;
}
.dev-stage.active {
  opacity: 1;
  border-color: var(--gold-deep);
  background: linear-gradient(180deg, rgba(227, 169, 79, 0.10), var(--surface));
}
.dev-stage.active .stage-num { color: var(--gold-bright); }
@media (max-width: 900px) {
  .dev-stages { grid-template-columns: 1fr; gap: 6px; }
  .dev-stage .stage-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .develop { height: auto; padding: 76px 0; }
  .develop-sticky { position: static; height: auto; }
  .dev-sketch { clip-path: inset(0 0 0 100%) !important; }
  .dev-scan { display: none; }
  .dev-stamp { opacity: 1; transform: rotate(6deg); }
  .sframe-sketch { clip-path: inset(0 0 0 42%) !important; }
  .sframe-scan { left: 42%; opacity: 1; }
}

@media (max-width: 900px) {
  .develop { height: 240vh; }
}

/* ── sections ────────────────────────────────────────────────────────────── */
section { padding: 76px 0; border-top: 1px solid var(--line); }
.sec-kicker {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 14px;
}
.sec-title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(30px, 3.6vw, 42px); line-height: 1.12; margin: 0 0 18px;
}
.sec-title em { font-style: italic; color: var(--gold-bright); }
.sec-lede { color: var(--muted); font-size: 17px; max-width: 62ch; margin: 0 0 40px; }
.sec-lede strong { color: var(--ink); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 26px 24px;
}
.card h3 {
  font-family: var(--serif); font-weight: 500; font-size: 22px; margin: 0 0 10px;
}
.card .card-tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold); display: block; margin-bottom: 12px;
}
.card p { color: var(--muted); font-size: 14.5px; margin: 0; }
.card p strong { color: var(--ink); font-weight: 600; }

/* pipeline */
.pipeline { display: grid; gap: 10px; max-width: 760px; }
.pipe-step {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 15px 18px;
}
.pipe-num {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 8px;
  width: 40px; height: 40px; display: grid; place-items: center;
}
.pipe-step h4 { margin: 0 0 3px; font-size: 15.5px; font-weight: 600; }
.pipe-step p { margin: 0; color: var(--muted); font-size: 13.5px; }
.pipe-gate-chip {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold-bright);
  border: 1px solid var(--gold-deep); background: var(--gold-soft);
  padding: 5px 10px; border-radius: 7px; white-space: nowrap;
}
.pipe-note { margin-top: 22px; font-size: 15px; color: var(--muted); max-width: 62ch; }
.pipe-note strong { color: var(--gold-bright); font-weight: 600; }

/* about + why */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; }
.split p { color: var(--muted); font-size: 15.5px; margin: 0 0 16px; }
.split p strong { color: var(--ink); }
.name-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 30px 28px;
}
.name-card .word { font-family: var(--serif); font-size: 38px; letter-spacing: 0.06em; }
.name-card .phon { font-family: var(--mono); color: var(--muted); font-size: 13px; margin: 6px 0 14px; }
.name-card .defn { color: var(--muted); font-size: 15px; }
.name-card .defn em { color: var(--gold-bright); }

.why-points { display: grid; gap: 14px; margin-top: 8px; }
.why-point {
  display: grid; grid-template-columns: 26px 1fr; gap: 14px;
  color: var(--muted); font-size: 15px;
}
.why-point b { color: var(--ink); display: block; margin-bottom: 2px; font-size: 15.5px; }
.why-point .tick { color: var(--gold); font-family: var(--mono); }

/* final cta */
.final-cta {
  text-align: center; padding: 90px 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(227, 169, 79, 0.07), transparent 60%);
}
.final-cta .sec-title { margin-bottom: 12px; }
.final-cta .sec-lede { margin: 0 auto 32px; }

/* footer */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 34px 28px 44px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.foot-brand { font-family: var(--serif); letter-spacing: 0.24em; font-size: 16px; color: var(--ink); }
.foot-tag { font-style: italic; font-family: var(--serif); }
.site-foot .legal { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; }

/* reveals */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* responsive */
@media (max-width: 900px) {
  .hero-grid, .split { grid-template-columns: 1fr; gap: 40px; }
  .cards { grid-template-columns: 1fr; }
  .site-nav a:not(.btn) { display: none; }
  .hero { padding-top: 56px; }
  section { padding: 60px 0; }
}

/* reduced motion: everything lands settled */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .panel, .gate-chip, .board-foot .gate-status { opacity: 1 !important; transform: rotate(-6deg) !important; }
  .panel { transform: none !important; }
  .panel svg path, .panel svg circle, .panel svg line { stroke-dashoffset: 0 !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
