/* Ultradub. One saturated color: the on-air red. Everything else is ink on paper,
   or light on studio navy in dark mode. Every color is a token so dark mode can't hide anything. */

:root {
  color-scheme: light dark;
  --paper:     #F4F6F9;
  --surface:   #FFFFFF;
  --ink:       #12151C;
  --ink-2:     #4A5160;
  --ink-3:     #6E7686;
  --line:      #DCE0E8;
  --line-2:    #C5CBD6;
  --onair:     #E03A33;
  --onair-soft:#FCE9E8;
  --ok:        #1F7A4D;
  --btn-bg:    #12151C;
  --btn-ink:   #FFFFFF;
  --focus:     #2F6FEB;
  --shadow:    0 1px 2px rgba(18, 21, 28, .06), 0 8px 24px rgba(18, 21, 28, .06);

  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', 'Noto Sans', 'Noto Sans Devanagari',
          'Noto Sans Bengali', 'Noto Sans Arabic', 'Noto Sans Tamil', 'Noto Sans Telugu',
          'Hiragino Sans', 'PingFang SC', 'Apple SD Gothic Neo', sans-serif;
  --measure: 44rem;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:     #0F1522;
    --surface:   #161E2E;
    --ink:       #ECEFF5;
    --ink-2:     #A9B0BF;
    --ink-3:     #858DA0;
    --line:      #273044;
    --line-2:    #37425A;
    --onair:     #FF5A52;
    --onair-soft:#3A1D25;
    --ok:        #55C98F;
    --btn-bg:    #ECEFF5;
    --btn-ink:   #0F1522;
    --focus:     #7FA8FF;
    --shadow:    0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
main, .top, .foot { width: min(100% - 2.5rem, var(--measure)); margin-inline: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.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; }
.drop:focus-within, .btn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.drop.is-locked { opacity: .6; pointer-events: none; }

/* ── Header ─────────────────────────────────────────────── */
.top { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 0; }
.mark {
  display: inline-flex; align-items: center; gap: .5rem; text-decoration: none;
  font-weight: 800; font-stretch: 118%; font-size: 1.25rem; letter-spacing: -.01em;
}
.dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--onair);
       box-shadow: 0 0 0 4px var(--onair-soft); }
.top-note { color: var(--ink-3); font-size: .9rem; }

/* ── Hero ───────────────────────────────────────────────── */
.hero { padding: clamp(2.5rem, 8vw, 5.5rem) 0 clamp(2rem, 6vw, 3.5rem); }
h1 {
  margin: 0 0 1.25rem;
  font-weight: 850; font-stretch: 122%;
  font-size: clamp(2.5rem, 8.2vw, 4.6rem);
  line-height: .98; letter-spacing: -.035em;
}
.lede { color: var(--ink-2); font-size: clamp(1.05rem, 2.2vw, 1.2rem); max-width: 36em; margin: 0 0 2rem; }
h2 { font-weight: 800; font-stretch: 112%; font-size: clamp(1.5rem, 3.6vw, 2rem); letter-spacing: -.02em; line-height: 1.1; margin: 0 0 .75rem; }
h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 .6rem; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: .5rem;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2;
  border-radius: 999px; padding: .95rem 1.5rem; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .08s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); }
.btn-primary:hover { opacity: .92; }
.btn-primary:disabled { background: var(--line); color: var(--ink-3); cursor: not-allowed; opacity: 1; }
.btn-secondary { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink-2); }
.btn-quiet { background: none; color: var(--ink-2); padding: .75rem 0; text-decoration: underline; text-underline-offset: 3px; }
.btn-wide { width: 100%; margin-top: .5rem; }

/* ── Demo ───────────────────────────────────────────────── */
.demo { padding: 1rem 0 2.5rem; }
.demo-cap { color: var(--ink-2); margin: 0 0 1rem; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.demo figure { margin: 0; }
.demo video { width: 100%; border-radius: var(--radius); background: #000; display: block; aspect-ratio: 9 / 16; object-fit: cover; }
.demo figcaption { font-size: .9rem; color: var(--ink-2); margin-top: .45rem; font-weight: 600; }
.demo figcaption.is-dub { color: var(--onair); }

/* ── Tool ───────────────────────────────────────────────── */
.tool, .panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: clamp(1.25rem, 4vw, 2.25rem); margin: 0 0 2rem; box-shadow: var(--shadow);
}
.notice { background: var(--onair-soft); color: var(--ink); border-radius: var(--radius); padding: .8rem 1rem; margin: 0 0 1rem; }
.steps { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.step { display: grid; grid-template-columns: 2rem 1fr; gap: .9rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; padding-top: .25rem; }
.num {
  width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line-2); color: var(--ink-2); font-weight: 700; font-size: .9rem;
}
.step-body { min-width: 0; }
.hint { color: var(--ink-3); font-size: .92rem; margin: -.3rem 0 .7rem; }

.drop {
  display: flex; flex-direction: column; gap: .15rem; cursor: pointer;
  border: 1.5px dashed var(--line-2); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; background: var(--paper); transition: border-color .15s ease, background-color .15s ease;
}
.drop:hover, .drop.is-over { border-color: var(--ink-2); }
.drop.has-file { border-style: solid; }
.drop-main { font-weight: 700; }
.drop-sub { color: var(--ink-3); font-size: .92rem; overflow-wrap: anywhere; }

.select {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line-2); border-radius: var(--radius); padding: .75rem .9rem;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) 50%, calc(100% - .8rem) 50%;
  background-size: .35rem .35rem; background-repeat: no-repeat;
}

/* The language wall: 20 languages in their own scripts. This is the picker. */
.wall { display: flex; flex-wrap: wrap; gap: .1rem .35rem; margin: 0 -.35rem; }
.lang {
  font: inherit; font-size: clamp(1.15rem, 3.4vw, 1.55rem); font-weight: 600; line-height: 1.25;
  color: var(--ink-3); background: none; border: 0; border-radius: 8px;
  padding: .3rem .35rem; cursor: pointer; transition: color .12s ease, background-color .12s ease;
}
.lang:hover { color: var(--ink); }
.lang[aria-pressed="true"] { color: var(--ink); background: var(--onair-soft); box-shadow: inset 0 -3px 0 var(--onair); }
.lang:disabled { opacity: .45; cursor: not-allowed; }
.lang.is-source { opacity: .3; text-decoration: line-through; }
.lang .en { font-size: .7rem; font-weight: 500; color: var(--ink-3); display: block; letter-spacing: .01em; }

.option { display: flex; gap: .8rem; align-items: flex-start; margin-top: 1.1rem; cursor: pointer;
          padding: .9rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius); }
.option input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; accent-color: var(--onair); flex: none; }
.option-sub { display: block; color: var(--ink-3); font-size: .92rem; }
.option.is-disabled { opacity: .55; cursor: not-allowed; }

.price { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem;
         border-top: 1px solid var(--line); margin-top: .5rem; padding-top: 1.1rem; }
.price-label { font-weight: 700; }
.price-lines { color: var(--ink-3); font-size: .92rem; }
.price-value { font-weight: 850; font-stretch: 115%; font-size: clamp(1.8rem, 5vw, 2.3rem); letter-spacing: -.03em; line-height: 1; }
.turnstile:not(:empty) { margin-top: 1rem; }
.fineprint { color: var(--ink-3); font-size: .88rem; text-align: center; margin: .8rem 0 0; }
.field-error { color: var(--onair); font-weight: 600; margin: .6rem 0 0; }

/* ── Progress lists ─────────────────────────────────────── */
.progress { list-style: none; padding: 0; margin: 1rem 0; }
.progress li { display: grid; grid-template-columns: 1.4rem 1fr auto; gap: .6rem; align-items: baseline;
               padding: .55rem 0; border-top: 1px solid var(--line); color: var(--ink-3); }
.progress li:first-child { border-top: 0; }
.progress .ic { text-align: center; font-weight: 800; }
.progress li.active { color: var(--ink); font-weight: 600; }
.progress li.active .ic { color: var(--onair); animation: pulse 1.2s ease-in-out infinite; }
.progress li.done { color: var(--ink-2); }
.progress li.done .ic { color: var(--ok); }
.progress li.failed { color: var(--onair); }
.progress .pct { font-variant-numeric: tabular-nums; font-size: .9rem; color: var(--ink-3); }
@keyframes pulse { 50% { opacity: .35; } }

/* ── Preview ────────────────────────────────────────────── */
.player video { width: 100%; max-height: 70vh; border-radius: var(--radius); background: #000; display: block; }
.listen { display: flex; gap: .5rem; margin: .9rem 0 .4rem; }
.chip { font: inherit; font-weight: 600; font-size: .95rem; border-radius: 999px; padding: .45rem 1rem;
        border: 1.5px solid var(--line-2); background: none; color: var(--ink-2); cursor: pointer; }
.chip.is-on { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.bill { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .8rem; }
.bill-row { display: flex; justify-content: space-between; color: var(--ink-2); padding: .2rem 0; }
.bill-row.total { color: var(--ink); font-weight: 800; font-size: 1.15rem; border-top: 1px solid var(--line); margin-top: .4rem; padding-top: .6rem; }

/* ── Downloads ──────────────────────────────────────────── */
.downloads { display: grid; gap: .8rem; margin-top: 1rem; }
.dl { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; display: grid; gap: .6rem; }
.dl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.dl-name { font-weight: 800; font-stretch: 110%; font-size: 1.15rem; }
.dl-native { color: var(--ink-3); }
.dl-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--onair); transition: width .2s linear; }
.note { background: var(--paper); border-left: 3px solid var(--onair); padding: .7rem .9rem; border-radius: 6px; margin: .5rem 0; color: var(--ink-2); }
.resume { margin-top: 1rem; padding: 1rem; border: 1.5px dashed var(--line-2); border-radius: var(--radius); }
.resume p { margin: 0 0 .7rem; }
.keep-link { margin-top: 1.25rem; color: var(--ink-2); }
.keep-link summary { cursor: pointer; font-weight: 600; }
.keep-link input { width: 100%; font: inherit; font-size: .85rem; padding: .6rem; border-radius: 8px;
                   border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); }

/* ── Checkout dialog ────────────────────────────────────── */
dialog {
  width: min(100% - 1.5rem, 34rem); max-height: 92vh; padding: 3rem 1rem 1rem; border: 0;
  border-radius: 16px; background: #fff; color: #12151C; /* Stripe's checkout is light */
}
dialog::backdrop { background: rgba(9, 12, 20, .6); }
.dialog-close { position: absolute; top: .6rem; right: .8rem; font: inherit; font-weight: 600; background: none; border: 0; color: #4A5160; cursor: pointer; padding: .4rem; }

/* ── Footer ─────────────────────────────────────────────── */
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
        color: var(--ink-3); font-size: .88rem; padding: 1.5rem 0 3rem; border-top: 1px solid var(--line); margin-top: 1rem; }

@media (max-width: 520px) {
  .demo-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .step { grid-template-columns: 1fr; gap: .4rem; }
  .num { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
