/* DualCue — bilingual subtitle tooling
   Design language: the subtitle itself. Timecode rulers, stacked caption
   blocks, sodium-amber cue markers against a cinema-black grade. */

@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&display=swap');

:root {
  --ink: #0a0a0c;
  --ink-2: #101014;
  --panel: #15151b;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #ece7de;
  --dim: #918c83;
  --dimmer: #635f59;
  --amber: #ffc04a;
  --cyan: #79ded2;

  --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: 1180px;
}

*, *::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.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* film grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; }

::selection { background: var(--amber); color: var(--ink); }

/* ── type ─────────────────────────────────────────────── */

h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(2.9rem, 8vw, 6.2rem); line-height: 0.95; }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.05; }
h3 { font-size: 1.4rem; line-height: 1.2; }

.tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
}

.lede { font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: var(--dim); max-width: 46ch; }

.ital { font-style: italic; color: var(--amber); }

/* ── shell ────────────────────────────────────────────── */

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }

section { position: relative; padding: clamp(4.5rem, 11vw, 9rem) 0; }

/* timecode ruler divider */
.ruler {
  height: 22px;
  border-top: 1px solid var(--line);
  background-image: repeating-linear-gradient(
    to right,
    var(--line-2) 0 1px,
    transparent 1px 44px
  );
  background-size: 44px 8px;
  background-repeat: repeat-x;
  background-position: top left;
}

/* ── nav ──────────────────────────────────────────────── */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 12, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.95rem var(--gut);
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand {
  font-family: var(--display);
  font-size: 1.5rem;
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}
.brand::after {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--amber);
  border-radius: 50%;
  animation: blink 2.4s steps(1) infinite;
}
@keyframes blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: 0.25; } }

nav .links { margin-left: auto; display: flex; gap: 1.6rem; align-items: center; }
nav .links a {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--dim);
  transition: color 0.2s;
}
nav .links a:hover { color: var(--text); }
@media (max-width: 700px) { nav .links a.hide-sm { display: none; } }

/* ── buttons ──────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.78rem 1.35rem;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: var(--ink); border-color: var(--amber); font-weight: 600; }
.btn-primary:hover { background: #ffd07a; }
.btn-ghost:hover { border-color: var(--text); }

/* ── hero ─────────────────────────────────────────────── */

.hero { padding-top: clamp(3.5rem, 8vw, 6.5rem); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { margin: 1.1rem 0 1.5rem; }
.hero .cta { display: flex; gap: 0.8rem; margin-top: 2.2rem; flex-wrap: wrap; }
.hero .note {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--dimmer);
  margin-top: 1.4rem;
  letter-spacing: 0.03em;
}

/* reveal on load */
.rv { opacity: 0; animation: rise 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.d1 { animation-delay: 0.05s; } .d2 { animation-delay: 0.15s; }
.d3 { animation-delay: 0.25s; } .d4 { animation-delay: 0.35s; }
.d5 { animation-delay: 0.45s; }
@media (prefers-reduced-motion: reduce) {
  .rv { animation: none; opacity: 1; }
  .brand::after { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* ── caption player ───────────────────────────────────── */

.player {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9);
}
.player-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--dimmer);
  letter-spacing: 0.06em;
}
.player-bar .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.player-bar .fname { margin-left: 0.4rem; color: var(--dim); }
.player-bar .badge { margin-left: auto; color: var(--amber); }

.stage {
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 90% at 50% 0%, #1c1c24 0%, #0c0c10 60%, #08080a 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 1.2rem 1.6rem;
}
/* faint waveform bed */
.stage::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 42%;
  height: 46px;
  background-image: repeating-linear-gradient(
    to right,
    rgba(255, 255, 255, 0.13) 0 2px,
    transparent 2px 7px
  );
  mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
  opacity: 0.5;
}

.cue { position: relative; text-align: center; max-width: 34ch; }
.cue .tc {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--amber);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}
.cue .l1, .cue .l2 {
  font-size: clamp(1rem, 1.9vw, 1.32rem);
  line-height: 1.4;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95);
}
.cue .l1 { font-weight: 500; }
.cue .l2 { color: var(--cyan); margin-top: 0.2rem; }

.cue-a, .cue-b { animation: cueCycle 9s infinite; }
.cue-b { position: absolute; inset: 0; animation-delay: 4.5s; opacity: 0; }
@keyframes cueCycle {
  0%, 3% { opacity: 0; transform: translateY(6px); }
  8%, 45% { opacity: 1; transform: none; }
  50%, 100% { opacity: 0; transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  .cue-a, .cue-b { animation: none; }
  .cue-b { display: none; }
}

.player-track {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--dimmer);
}
.player-track .line { flex: 1; height: 2px; background: var(--line-2); position: relative; }
.player-track .line::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--amber);
  animation: scrub 9s linear infinite;
}
@keyframes scrub { from { width: 4%; } to { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .player-track .line::after { animation: none; width: 45%; }
}

/* ── steps ────────────────────────────────────────────── */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); margin-top: 3rem; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--ink); padding: 2rem 1.6rem 2.2rem; }
.step .n {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--amber);
  letter-spacing: 0.14em;
  display: block;
  margin-bottom: 1.1rem;
}
.step h3 { margin-bottom: 0.6rem; }
.step p { color: var(--dim); font-size: 0.95rem; margin: 0; }
.step code {
  font-family: var(--mono);
  font-size: 0.83em;
  color: var(--text);
  background: var(--panel);
  padding: 0.1em 0.4em;
  border-radius: 2px;
}

/* ── features ─────────────────────────────────────────── */

.feat-head { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: end; }
@media (max-width: 820px) { .feat-head { grid-template-columns: 1fr; } }

.feats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  margin-top: 3rem;
  border: 1px solid var(--line);
}
.feat { background: var(--ink); padding: 1.7rem 1.5rem; transition: background 0.25s; }
.feat:hover { background: var(--ink-2); }
.feat .k {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dimmer);
  display: block;
  margin-bottom: 0.85rem;
}
.feat strong { display: block; font-size: 1.02rem; font-weight: 600; margin-bottom: 0.4rem; }
.feat p { margin: 0; color: var(--dim); font-size: 0.92rem; line-height: 1.6; }

/* ── pricing ──────────────────────────────────────────── */

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin-top: 3rem;
  align-items: start;
}
@media (max-width: 880px) { .plans { grid-template-columns: 1fr; } }

.plan {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1.8rem 1.6rem 2rem;
  background: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.plan.pick { border-color: var(--amber); background: linear-gradient(180deg, rgba(255, 192, 74, 0.06), transparent 55%); }
.plan .pname { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
.plan.free .pname, .plan.studio .pname { color: var(--dim); }
.plan .price { font-family: var(--display); font-size: 3rem; line-height: 1; letter-spacing: -0.03em; }
.plan .price small { font-family: var(--mono); font-size: 0.72rem; color: var(--dimmer); letter-spacing: 0.04em; margin-left: 0.35rem; }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; font-size: 0.93rem; color: var(--dim); }
.plan li { display: flex; gap: 0.6rem; }
.plan li::before { content: '→'; color: var(--amber); font-family: var(--mono); flex: none; }
.plan .btn { justify-content: center; margin-top: auto; }
.pricing-note { font-family: var(--mono); font-size: 0.72rem; color: var(--dimmer); margin-top: 1.6rem; line-height: 1.8; }

/* ── support ──────────────────────────────────────────── */

.support {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: clamp(1.8rem, 4vw, 3rem);
  background: var(--ink-2);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}
@media (max-width: 780px) { .support { grid-template-columns: 1fr; } }
.support p { color: var(--dim); margin: 0.7rem 0 0; max-width: 52ch; font-size: 0.98rem; }
.mail {
  font-family: var(--mono);
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 192, 74, 0.35);
  padding-bottom: 2px;
  white-space: nowrap;
}
.mail:hover { border-bottom-color: var(--amber); }

/* ── footer ───────────────────────────────────────────── */

footer { border-top: 1px solid var(--line); padding: 2.6rem 0 3.4rem; }
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 2rem;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--dimmer);
  letter-spacing: 0.03em;
}
.foot nav { padding: 0; margin: 0 0 0 auto; display: flex; gap: 1.4rem; max-width: none; }
.foot a { color: var(--dim); text-decoration: none; }
.foot a:hover { color: var(--text); }
.foot .mor { flex-basis: 100%; color: var(--dimmer); line-height: 1.7; max-width: 70ch; }

/* ── legal pages ──────────────────────────────────────── */

.legal { max-width: 720px; padding-top: clamp(3rem, 7vw, 5rem); }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 0.7rem; }
.legal .eff { font-family: var(--mono); font-size: 0.72rem; color: var(--dimmer); letter-spacing: 0.06em; margin-bottom: 3rem; }
.legal h2 { font-size: 1.45rem; margin: 2.8rem 0 0.8rem; }
.legal p, .legal li { color: #c8c3ba; font-size: 0.98rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: 0.4rem; }
.legal a { color: var(--amber); }
.legal .back {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
  text-decoration: none;
  letter-spacing: 0.06em;
  display: inline-block;
  margin-bottom: 2.5rem;
}
.legal .back:hover { color: var(--text); }
