/* ═══════════════════════════════════════════════════════════
   DualCue — landing
   Concept: the page is itself subtitled. Every heading carries a
   faint cyan translation line beneath it, exactly like the product's
   output. The design furniture is subtitle furniture: timecode rulers,
   film perforations, letterbox bars, sodium-amber cue markers on a
   cinema-black grade.
   Motion follows Apple's fluid-interface rules: feedback on pointer
   down, 1:1 tracking, interruptible springs, momentum projection.
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=IBM+Plex+Mono:wght@400;500;600&family=Figtree:wght@400;500;600;700&display=swap');

:root {
  --ink: #08080a;
  --ink-2: #0d0d11;
  --panel: #13131a;
  --line: rgba(255, 255, 255, 0.085);
  --line-2: rgba(255, 255, 255, 0.17);
  --text: #efeae1;
  --dim: #918c83;
  --dimmer: #5f5b55;
  --amber: #ffc04a;
  --amber-deep: #b8781a;
  --cyan: #79ded2;
  --red: #ff8b6b;

  --display: 'Instrument Serif', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --body: 'Figtree', -apple-system, sans-serif;

  --gut: clamp(1.25rem, 4vw, 4.5rem);
  --max: 1240px;

  --sp-damped: 400ms cubic-bezier(0.32, 0.72, 0, 1);
  --sp-quick: 170ms cubic-bezier(0.32, 0.72, 0, 1);
  --sp-press: 100ms ease-out;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* film grain + faint scanlines — cinema grade, not a gradient wash */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 9997; pointer-events: none;
  opacity: 0.35;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0,0,0,0.5) 3px 4px);
  mix-blend-mode: multiply;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--amber); color: var(--ink); }

.wrap { width: min(var(--max), 100%); margin-inline: auto; padding-inline: var(--gut); }

/* ── type scale: tracking is size-specific, never one value ──── */
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; }
h1 {
  font-size: clamp(3.1rem, 9.5vw, 8.5rem);
  line-height: 0.9;
  letter-spacing: -0.032em;   /* the bigger it gets, the tighter it must be */
}
h2 {
  font-size: clamp(2rem, 5.2vw, 4.1rem);
  line-height: 0.98;
  letter-spacing: -0.024em;
}
h3 { font-size: 1.42rem; line-height: 1.18; letter-spacing: -0.012em; }
.ital { font-style: italic; color: var(--amber); }

.mono { font-family: var(--mono); }
.tag {
  font-family: var(--mono);
  font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.19em; text-transform: uppercase;
  color: var(--amber);
}
.lede { font-size: clamp(1.04rem, 1.5vw, 1.24rem); color: var(--dim); max-width: 48ch; }

/* ── the conceit: every heading is subtitled ─────────────────── */
.sub {
  display: block;
  font-family: var(--body);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--cyan);
  opacity: 0.52;
  margin-top: 0.85rem;
  transition: opacity var(--sp-damped);
}
h1 .sub { font-size: 0.95rem; margin-top: 1.5rem; }
section:hover .sub { opacity: 0.78; }

/* ── letterbox rails: thin timecode ruler down both edges ───── */
.rail {
  position: fixed; top: 0; bottom: 0; width: 34px; z-index: 20;
  pointer-events: none;
  display: none;
  background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 26px);
}
.rail.l { left: 0; }
.rail.r { right: 0; }
@media (min-width: 1100px) { .rail { display: block; } }

/* scroll counter — a film footage counter tied to scroll position */
.counter {
  position: fixed; bottom: 1.1rem; right: 1.3rem; z-index: 30;
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.13em;
  color: var(--dimmer);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  display: flex; align-items: center; gap: 0.5rem;
}
.counter i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--amber);
  animation: rec 2s ease-in-out infinite;
}
@keyframes rec { 0%,100% { opacity: 1 } 50% { opacity: 0.15 } }

/* ── header ─────────────────────────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ink) 68%, transparent);
  backdrop-filter: blur(22px) saturate(170%);
  border-bottom: 1px solid var(--line);
}
nav.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.95rem 0;
}
.brand {
  font-family: var(--display); font-size: 1.5rem; letter-spacing: -0.02em;
  display: inline-flex; align-items: baseline; gap: 0.32rem;
}
.brand::after {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--amber); transform: translateY(-1px);
}
nav.top .links { display: flex; align-items: center; gap: clamp(0.9rem, 2.2vw, 1.9rem); }
nav.top .links a {
  font-family: var(--mono); font-size: 0.73rem; letter-spacing: 0.07em;
  color: var(--dim); transition: color var(--sp-quick);
}
nav.top .links a:hover { color: var(--text); }
.hide-sm { display: none; }
@media (min-width: 780px) { .hide-sm { display: inline; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.66rem 1.25rem; border-radius: 8px;
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.05em;
  border: 1px solid var(--line-2); cursor: pointer;
  background: none; color: var(--text);
  transition: transform var(--sp-press), background var(--sp-quick), border-color var(--sp-quick), color var(--sp-quick);
}
.btn:active { transform: scale(0.972); }   /* feedback on press, not release */
.btn-primary { background: var(--amber); color: var(--ink); border-color: var(--amber); font-weight: 600; }
.btn-primary:hover { background: #ffcf72; }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }

/* ── hero ───────────────────────────────────────────────────── */
.hero { padding: clamp(3.4rem, 9vw, 8rem) 0 clamp(2.5rem, 6vw, 5rem); position: relative; }
/* one big off-grid amber arc — the only decorative geometry, borrowed
   boldness of scale, kept in our palette */
.hero::before {
  content: '';
  position: absolute; top: -14vw; right: -20vw;
  width: 62vw; height: 62vw; border-radius: 50%;
  border: 1px solid rgba(255, 192, 74, 0.14);
  box-shadow: inset 0 0 140px rgba(255, 192, 74, 0.05);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 { max-width: 15ch; }
.hero .lede { margin: 1.9rem 0 2.2rem; }
.cta { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; }
.cta .note { font-family: var(--mono); font-size: 0.68rem; color: var(--dimmer); letter-spacing: 0.06em; }

/* staggered load-in */
.rv { opacity: 0; transform: translate3d(0, 18px, 0); animation: rise 800ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.d1 { animation-delay: 40ms } .d2 { animation-delay: 130ms } .d3 { animation-delay: 230ms }
.d4 { animation-delay: 340ms } .d5 { animation-delay: 460ms } .d6 { animation-delay: 590ms }
@keyframes rise { to { opacity: 1; transform: none } }

/* ── THE SCRUBBER — the centrepiece ─────────────────────────── */
.deck {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--panel), var(--ink-2));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.deck-bar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.72rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  font-family: var(--mono); font-size: 0.68rem; color: var(--dim);
}
.perf { display: flex; gap: 4px; }
.perf i { width: 7px; height: 10px; border-radius: 1.5px; background: var(--line-2); }
.deck-bar .fn { color: var(--text); letter-spacing: 0.02em; }
.deck-bar .pair {
  margin-left: auto; display: flex; gap: 0.3rem;
}
.chip {
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em;
  padding: 0.28rem 0.55rem; border-radius: 5px;
  border: 1px solid var(--line); color: var(--dim);
  background: none; cursor: pointer;
  transition: transform var(--sp-press), color var(--sp-quick), border-color var(--sp-quick), background var(--sp-quick);
}
.chip:active { transform: scale(0.94); }
.chip.on { background: var(--amber); border-color: var(--amber); color: var(--ink); font-weight: 600; }

/* caption stage */
.stage {
  position: relative;
  min-height: clamp(190px, 26vw, 270px);
  display: grid; place-items: center;
  padding: clamp(1.6rem, 4vw, 3rem) clamp(1.2rem, 4vw, 3.4rem);
  text-align: center;
  overflow: hidden;
}
/* soft vignette so captions sit in light, like a projected frame */
.stage::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 55%, rgba(255,192,74,0.045), transparent 70%);
  pointer-events: none;
}
.cap { position: relative; z-index: 1; }
.cap-o {
  font-size: clamp(1.15rem, 2.5vw, 1.85rem);
  line-height: 1.32; letter-spacing: -0.012em;
  margin: 0; color: var(--text);
}
.cap-t {
  font-size: clamp(0.92rem, 1.8vw, 1.28rem);
  line-height: 1.4; margin: 0.62rem 0 0; color: var(--cyan);
}
.cap.swap .cap-o, .cap.swap .cap-t { animation: capin 380ms cubic-bezier(0.32,0.72,0,1) both; }
.cap.swap .cap-t { animation-delay: 55ms; }
@keyframes capin { from { opacity: 0; transform: translate3d(0, 7px, 0) } to { opacity: 1; transform: none } }

/* timeline / waveform — the drag surface */
.track {
  position: relative;
  padding: 0.9rem clamp(1rem, 3vw, 2rem) 1.1rem;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.3);
  cursor: grab;
  touch-action: none;            /* we own the gesture */
  user-select: none;
}
.track:active { cursor: grabbing; }
.track .tc {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 0.63rem; color: var(--dimmer);
  letter-spacing: 0.1em; margin-bottom: 0.6rem;
  font-variant-numeric: tabular-nums;
}
.track .tc b { color: var(--amber); font-weight: 500; }
.wave {
  position: relative;
  display: flex; align-items: flex-end; gap: 2px;
  height: 46px;
}
.wave span {
  flex: 1; min-width: 1px; border-radius: 1px;
  background: var(--line-2);
  transition: background 260ms ease, opacity 260ms ease;
}
.wave span.past { background: var(--amber-deep); }
.wave span.here { background: var(--amber); }
/* cue boundaries as amber ticks under the waveform */
.cuebar { position: relative; height: 3px; margin-top: 7px; background: var(--line); border-radius: 2px; }
.cuebar i {
  position: absolute; top: -1px; width: 1px; height: 5px; background: var(--line-2);
}
.playhead {
  position: absolute; top: -52px; bottom: -6px; width: 1px;
  background: var(--amber);
  box-shadow: 0 0 12px rgba(255, 192, 74, 0.75);
  will-change: transform;
}
.playhead::before {
  content: ''; position: absolute; top: -4px; left: 50%; transform: translateX(-50%);
  width: 9px; height: 9px; border-radius: 50%; background: var(--amber);
  box-shadow: 0 0 14px rgba(255, 192, 74, 0.9);
}
.hint-drag {
  font-family: var(--mono); font-size: 0.63rem; color: var(--dimmer);
  letter-spacing: 0.1em; text-align: center; margin-top: 0.85rem;
  transition: opacity var(--sp-damped);
}
.track.touched .hint-drag { opacity: 0.25; }

/* ── generic section ────────────────────────────────────────── */
section { padding: clamp(3.6rem, 9vw, 7.5rem) 0; position: relative; }
.eyebrow { display: block; margin-bottom: 1rem; }

/* ── steps ──────────────────────────────────────────────────── */
.steps3 { display: grid; gap: 1px; margin-top: 3rem; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
@media (min-width: 900px) { .steps3 { grid-template-columns: repeat(3, 1fr); } }
.st { padding: clamp(1.6rem, 3vw, 2.4rem); background: var(--ink-2); transition: background var(--sp-damped); }
.st:hover { background: var(--panel); }
.st .n {
  font-family: var(--mono); font-size: 0.68rem; color: var(--amber);
  letter-spacing: 0.16em; display: block; margin-bottom: 1.1rem;
}
.st h3 { margin-bottom: 0.6rem; }
.st p { color: var(--dim); font-size: 0.95rem; margin: 0; }

/* ── format switcher ────────────────────────────────────────── */
.fmt-grid { display: grid; gap: clamp(1.5rem, 4vw, 3rem); margin-top: 3rem; }
@media (min-width: 900px) { .fmt-grid { grid-template-columns: 0.85fr 1.15fr; align-items: start; } }
.fmt-tabs { display: flex; gap: 0.4rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.code {
  border: 1px solid var(--line); border-radius: 12px;
  background: #060608;
  font-family: var(--mono); font-size: clamp(0.7rem, 1.1vw, 0.8rem);
  line-height: 1.75;
  padding: 1.15rem 1.3rem;
  overflow-x: auto;
  min-height: 260px;
  white-space: pre;
  color: var(--dim);
  tab-size: 2;
}
.code .k { color: var(--amber); }         /* timecode */
.code .o { color: var(--text); }          /* original */
.code .t { color: var(--cyan); }          /* translation */
.code .c { color: var(--dimmer); }        /* index / meta */
.cursor { display: inline-block; width: 7px; background: var(--amber); animation: blink 1s steps(2) infinite; }
@keyframes blink { 0%,100% { opacity: 1 } 50% { opacity: 0 } }

/* ── features ───────────────────────────────────────────────── */
.feats { display: grid; gap: 1px; margin-top: 3rem; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
@media (min-width: 720px) { .feats { grid-template-columns: 1fr 1fr; } }
.ft { padding: clamp(1.5rem, 3vw, 2.2rem); background: var(--ink-2); }
.ft h3 { font-size: 1.18rem; margin-bottom: 0.5rem; }
.ft p { color: var(--dim); font-size: 0.92rem; margin: 0; }
.ft .ico { color: var(--amber); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; display: block; margin-bottom: 0.9rem; }

/* ── pricing ────────────────────────────────────────────────── */
.plans { display: grid; gap: 1.1rem; margin-top: 3rem; }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan {
  border: 1px solid var(--line); border-radius: 14px;
  padding: clamp(1.5rem, 3vw, 2.1rem);
  background: var(--ink-2);
  display: flex; flex-direction: column;
  transition: border-color var(--sp-damped), transform var(--sp-damped);
}
.plan:hover { border-color: var(--line-2); transform: translate3d(0, -3px, 0); }
.plan.pick { border-color: var(--amber); background: linear-gradient(180deg, rgba(255,192,74,0.055), var(--ink-2)); }
.pname { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); }
.price { font-family: var(--display); font-size: 3.1rem; line-height: 1; margin: 0.7rem 0 0.2rem; letter-spacing: -0.03em; }
.price small { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.13em; color: var(--dimmer); margin-left: 0.35rem; }
.plan ul { list-style: none; padding: 0; margin: 1.4rem 0 1.8rem; flex: 1; }
.plan li { font-size: 0.9rem; color: var(--dim); padding: 0.42rem 0 0.42rem 1.15rem; position: relative; }
.plan li::before { content: '·'; position: absolute; left: 0.2rem; color: var(--amber); }
.pay-note { font-family: var(--mono); font-size: 0.68rem; color: var(--dimmer); line-height: 1.9; margin-top: 1.8rem; }

/* ── about / company ────────────────────────────────────────── */
.about-grid { display: grid; gap: clamp(1.8rem, 4vw, 3.5rem); margin-top: 2.6rem; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1.15fr 0.85fr; } }
.about p { color: var(--dim); }
.about p + p { margin-top: 1.1rem; }
.factsheet {
  border: 1px solid var(--line); border-radius: 14px; background: var(--ink-2);
  padding: clamp(1.3rem, 3vw, 1.9rem);
}
.factsheet dl { margin: 0; display: grid; gap: 0.95rem; }
.factsheet dt {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--dimmer); margin-bottom: 0.2rem;
}
.factsheet dd { margin: 0; font-size: 0.92rem; }
.factsheet a { color: var(--amber); }

/* ── support ────────────────────────────────────────────────── */
.support {
  border: 1px solid var(--line); border-radius: 14px; background: var(--ink-2);
  padding: clamp(1.7rem, 4vw, 2.8rem);
  display: grid; gap: 1.6rem; align-items: center; margin-top: 2.6rem;
}
@media (min-width: 820px) { .support { grid-template-columns: 1fr auto; } }
.mail {
  font-family: var(--mono); font-size: clamp(0.95rem, 2vw, 1.3rem);
  color: var(--amber); border-bottom: 1px solid rgba(255,192,74,0.35);
  padding-bottom: 3px; transition: border-color var(--sp-quick);
}
.mail:hover { border-color: var(--amber); }

/* ── footer ─────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line); padding: 2.6rem 0 3.4rem; }
.foot { display: flex; flex-wrap: wrap; gap: 1rem 1.8rem; align-items: center; font-family: var(--mono); font-size: 0.7rem; color: var(--dimmer); }
.foot nav { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-left: auto; }
.foot nav a { transition: color var(--sp-quick); }
.foot nav a:hover { color: var(--amber); }
.mor { width: 100%; font-family: var(--mono); font-size: 0.68rem; color: var(--dimmer); line-height: 1.85; margin: 1.6rem 0 0; max-width: 74ch; }

/* ── accessibility: three independent signals ───────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .rv { opacity: 1; transform: none; }
  .cap.swap .cap-o, .cap.swap .cap-t { animation: none !important; }
  .plan:hover, .st:hover { transform: none; }
  body::after { display: none; }   /* scanlines are a moving-pattern risk */
  .btn:active, .chip:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  header { background: var(--ink); backdrop-filter: none; }
  body::before, body::after { display: none; }
}
@media (prefers-contrast: more) {
  :root { --dim: #cfc9c0; --dimmer: #a9a39a; --line: rgba(255,255,255,0.24); --line-2: rgba(255,255,255,0.4); }
  .sub { opacity: 0.9; }
  header { background: var(--ink); backdrop-filter: none; }
  body::before, body::after { display: none; }
}
