/* diktor.az — showcase landing for the Voices.az text-to-speech service.
   Same visual system as dub.az (dark, cinematic, one warm accent, Manrope);
   the demo cards here carry audio players instead of video. */

: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, audio { 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: 36ch;
  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;
  text-align: center;
}
.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);
}

/* ---------- voice gallery ---------- */

.voice-group + .voice-group { margin-top: 40px; }

.group-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.group-head::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

.voices {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.voice {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  padding: 16px;
}

.portrait {
  width: 100%;
  /* the width/height attributes are there to reserve the box before the file
     arrives; height:auto hands the shape back to aspect-ratio */
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 50% 22%;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}

/* Featured row: the two flagship Azerbaijani voices (Sevda, Emin) sit above
   the rest of the gallery in two larger cards — owner, 2026-09-25. Same
   player, same data-attributes; only the frame and the portrait grow. */
.voices + .voices { margin-top: 18px; }

.voice--featured {
  padding: 18px;
  border-color: rgba(242, 166, 90, 0.32);
  background:
    radial-gradient(520px 260px at 100% 0%, rgba(242, 166, 90, 0.08), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
.voice--featured .portrait { aspect-ratio: 4 / 3; }
.voice--featured .v-body { margin-top: 18px; }
.voice--featured .v-name {
  /* h4's default 1.33em margins would balloon at this size */
  margin: 0.55em 0 0.4em;
  font-size: 1.5rem;
}

.v-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  margin-top: 14px;
}
.v-name { font-size: 1.15rem; }
.v-lang {
  margin: 5px 0 0;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.v-char {
  margin: 10px 0 4px;
  font-size: 0.93rem;
  color: var(--text-dim);
}

/* ---------- audio player ---------- */

.player {
  display: flex;
  align-items: center;
  gap: 12px;
  /* auto keeps the transports of a row of cards on the same line */
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* JS draws the transport; the native element is the no-script fallback
   (revealed by the <noscript> block in the page head). */
.player audio { display: none; }

.play {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}
.play:hover { border-color: var(--accent); background: var(--accent-soft); }
.play svg { width: 15px; height: 15px; fill: currentColor; display: block; }
.play .i-pause { display: none; }
.play[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.play[aria-pressed="true"] .i-play { display: none; }
.play[aria-pressed="true"] .i-pause { display: block; }

.bar {
  position: relative;
  flex: 1 1 auto;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 170, 210, 0.18);
  cursor: pointer;
}
.bar .fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 999px;
  background: var(--accent);
}

.time {
  flex: 0 0 auto;
  min-width: 4.2ch;
  text-align: right;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}

/* ---------- style switch (one voice, several styles) ---------- */

.switch {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  margin-top: 16px;
  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);
}

/* ---------- 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; }
.feature a { color: var(--text-dim); }
.feature a:hover { color: var(--accent); }

/* ---------- corporate offer ---------- */

.corp {
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background:
    radial-gradient(620px 320px at 88% 0%, rgba(242, 166, 90, 0.14), transparent 68%),
    var(--surface);
  padding: 30px 22px;
}
.corp .eyebrow { margin-bottom: 10px; }
.corp h2 { font-size: clamp(1.4rem, 4.8vw, 2rem); max-width: 24ch; }
.corp p {
  margin: 16px 0 0;
  max-width: 62ch;
  color: var(--text-dim);
}
.corp p.corp-lead {
  color: var(--text);
  font-size: clamp(1rem, 3.4vw, 1.12rem);
}
.corp .cta-row { margin-top: 26px; }

/* ---------- 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-legal { margin: 22px 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); }
  /* tablet: two per row, the featured pair included */
  .voices { 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; }
  .features { grid-template-columns: repeat(3, 1fr); }
  section { padding: 84px 0; }
  .price { padding: 52px 40px; }
  .corp { padding: 48px 40px; }
}

/* desktop: the featured pair on top, every other voice four per row
   (each language group holds exactly four) */
@media (min-width: 960px) {
  .voices { grid-template-columns: repeat(4, 1fr); }
  .voices--featured { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .voices--featured + .voices { margin-top: 22px; }
  .voice--featured { padding: 22px; }
  .voice--featured .v-name { font-size: 1.7rem; }
}

@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;
  }
}
