/* dub.az — showcase landing. Dark, cinematic, no dependencies. */

:root {
  --bg: #05080f;
  --bg-soft: #0a1020;
  --surface: #0d1524;
  --surface-2: #101a2c;
  --line: rgba(148, 170, 210, 0.14);
  --line-strong: rgba(148, 170, 210, 0.28);
  --text: #e9eef8;
  --text-dim: #93a2bb;
  --accent: #f2a65a;
  --accent-ink: #1b1206;
  --accent-soft: rgba(242, 166, 90, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --gutter: 16px;
  --maxw: 1100px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(900px 480px at 78% -8%, rgba(242, 166, 90, 0.10), transparent 62%),
    radial-gradient(760px 420px at 6% 0%, rgba(78, 116, 200, 0.12), transparent 60%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--text); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; font-weight: 800; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- top bar ---------- */

.topbar {
  padding-top: 20px;
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.brand span { color: var(--accent); }

.langs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 21, 36, 0.7);
}
.langs a {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  text-decoration: none;
}
.langs a:hover { color: var(--text); }
.langs a[aria-current="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- hero ---------- */

.hero { padding: 48px 0 8px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 21, 36, 0.6);
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}
.badge:hover { border-color: var(--line-strong); color: var(--text); }
.badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero h1 {
  margin: 26px 0 0;
  font-size: clamp(2.1rem, 8.2vw, 4rem);
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p.lead {
  margin: 18px 0 0;
  max-width: 34ch;
  font-size: clamp(1.05rem, 3.6vw, 1.3rem);
  color: var(--text-dim);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: #ffb96d; }
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: transparent;
  font-weight: 600;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- sections ---------- */

section { padding: 64px 0; }

.sec-head { margin-bottom: 32px; }
.sec-head h2 { font-size: clamp(1.6rem, 5.5vw, 2.3rem); }
.sec-head p {
  margin: 12px 0 0;
  max-width: 56ch;
  color: var(--text-dim);
}

.eyebrow {
  display: block;
  margin-bottom: 12px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- demo cards ---------- */

.demos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  padding: 14px 14px 18px;
}

.stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
}
.stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  transition: opacity 0.18s ease;
}
.stage video[data-active="1"] { opacity: 1; z-index: 2; }
.stage video:not([data-active="1"]) {
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

/* AI label on the picture while a dubbed track plays (app.js adds the badge and
   sets data-ai on the stage; Law on Information, art. 13-2.7). Top-left, clear
   of the native controls along the bottom edge. */
.ai-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 20px);
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(5, 8, 15, 0.72);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  cursor: help;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.stage[data-ai="1"] .ai-badge { display: inline-flex; }
.ai-badge svg {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  fill: var(--accent);
}

.switch {
  display: inline-flex;
  flex-wrap: wrap;
  max-width: 100%;
  margin-top: 14px;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(5, 8, 15, 0.6);
}
.switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 8px 16px;
  min-height: 38px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.switch button:hover { color: var(--text); }
.switch button.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}
/* track whose file is not on the server yet */
.switch button.is-pending,
.switch button.is-pending:hover {
  color: var(--text-dim);
  opacity: 0.42;
  cursor: not-allowed;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.caption {
  margin: 14px 0 0;
  font-size: 0.95rem;
  color: var(--text);
}
.credit {
  margin: 8px 0 0;
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--text-dim);
}
.credit a { color: var(--text-dim); }

/* ---------- steps ---------- */

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  counter-reset: step;
}
.step {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px 22px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: block;
  margin-bottom: 14px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent);
  width: 30px; height: 30px;
  line-height: 29px;
  text-align: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}
.step h3 { font-size: 1.1rem; }
.step p { margin: 8px 0 0; color: var(--text-dim); font-size: 0.95rem; }

/* ---------- feature list ---------- */

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}
.feature {
  background: var(--surface);
  padding: 22px;
}
.feature h3 { font-size: 1rem; }
.feature p { margin: 6px 0 0; color: var(--text-dim); font-size: 0.93rem; }

/* ---------- price ---------- */

.price {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(242, 166, 90, 0.08), transparent 60%),
    var(--surface);
  padding: 36px 24px;
  text-align: center;
}
.price p.figure {
  margin: 0;
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.price .cta-row { justify-content: center; margin-top: 24px; }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 56px;
  font-size: 0.88rem;
  color: var(--text-dim);
}
footer .f-top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
footer a { color: var(--text-dim); }
footer a:hover { color: var(--text); }
footer .f-note {
  margin: 22px 0 0;
  max-width: 70ch;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #74839c;
}
footer .f-legal { margin: 10px 0 0; font-size: 0.8rem; color: #74839c; }

/* ---------- breakpoints ---------- */

@media (min-width: 620px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  body { font-size: 18px; }
  :root { --gutter: 28px; }
  .hero { padding: 72px 0 16px; }
  .hero p.lead { font-size: 1.35rem; }
  .demos { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(3, 1fr); }
  section { padding: 84px 0; }
  .price { padding: 52px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
