/* ONarrator marketing site. Static, Vercel-ready, no external assets. */

:root {
  color-scheme: light dark;
  --bg: #fbfdf9;
  --bg-soft: #eff8f2;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --text: #102018;
  --text-dim: #53635a;
  --text-muted: #728079;
  --accent: #024c33;
  --accent-bright: #0f7a51;
  --accent-soft: rgba(2, 76, 51, 0.11);
  --mint: #b9f4d1;
  --cyan: #b7eef3;
  --line: rgba(16, 32, 24, 0.11);
  --line-strong: rgba(16, 32, 24, 0.16);
  --shadow-sm: 0 1px 2px rgba(2, 20, 12, 0.07), 0 8px 22px rgba(2, 20, 12, 0.06);
  --shadow-md: 0 1px 2px rgba(2, 20, 12, 0.08), 0 18px 44px rgba(2, 20, 12, 0.11);
  --shadow-lg: 0 1px 2px rgba(2, 20, 12, 0.08), 0 28px 80px rgba(2, 20, 12, 0.17);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 34px;
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07110d;
    --bg-soft: #0b1b15;
    --surface: rgba(12, 27, 21, 0.64);
    --surface-strong: rgba(15, 32, 25, 0.88);
    --text: #edf9f1;
    --text-dim: #aac2b4;
    --text-muted: #83a092;
    --accent: #1e9e6a;
    --accent-bright: #52d18e;
    --accent-soft: rgba(30, 158, 106, 0.15);
    --mint: #2ccc85;
    --cyan: #33c5d1;
    --line: rgba(237, 249, 241, 0.12);
    --line-strong: rgba(237, 249, 241, 0.18);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.24), 0 8px 24px rgba(0, 0, 0, 0.22);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.28), 0 18px 52px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 1px 2px rgba(0, 0, 0, 0.3), 0 30px 90px rgba(0, 0, 0, 0.46);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font);
  background:
    radial-gradient(circle at 10% -8%, color-mix(in srgb, var(--cyan) 62%, transparent), transparent 30rem),
    radial-gradient(circle at 88% 10%, color-mix(in srgb, var(--mint) 58%, transparent), transparent 28rem),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 47%, var(--bg) 100%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(2, 76, 51, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2, 76, 51, 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

svg {
  display: block;
  width: 100%;
  height: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.05;
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

.wrap {
  width: min(100% - 40px, var(--maxw));
  margin-inline: auto;
}

.section-pad {
  padding: 92px 0;
}

#onboarding-carousel,
#how-it-works,
#faq {
  scroll-margin-top: 104px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 0;
}

.header-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: 58px;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: color-mix(in srgb, var(--surface-strong) 86%, transparent);
  box-shadow: var(--shadow-sm);
}

@supports ((backdrop-filter: blur(18px)) or (-webkit-backdrop-filter: blur(18px))) {
  .header-wrap,
  .glass-panel {
    -webkit-backdrop-filter: blur(22px) saturate(1.35);
    backdrop-filter: blur(22px) saturate(1.35);
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 760;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  display: block;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  overflow: hidden;
  background: var(--accent-deep);
  box-shadow:
    0 0 0 1px rgba(2, 76, 51, 0.16),
    0 12px 24px rgba(2, 76, 51, 0.24);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 0.93rem;
  font-weight: 620;
  transition-property: color, background-color;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.nav a:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.header-actions,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 720;
  line-height: 1;
  white-space: nowrap;
  transition-property: color, background-color, box-shadow, transform;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.button:active,
.round-button:active,
.play-button:active {
  transform: scale(0.96);
}

.button-primary {
  color: #ffffff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent-bright) 84%, white 16%), var(--accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 14px 28px rgba(2, 76, 51, 0.25);
}

.button-primary:hover {
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 18px 36px rgba(2, 76, 51, 0.3);
}

.button-secondary,
.button-quiet {
  color: var(--text);
  background: color-mix(in srgb, var(--surface-strong) 78%, transparent);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
}

.button-secondary:hover,
.button-quiet:hover {
  color: var(--text);
  background: var(--surface-strong);
  box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow-md);
}

.button-large {
  min-height: 50px;
  padding: 0 22px;
  font-size: 1rem;
}

.hero {
  padding-top: 44px;
  padding-bottom: 32px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.86fr);
  align-items: center;
  gap: 64px;
}

.eyebrow {
  margin-bottom: 13px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 700px;
  margin-bottom: 22px;
  font-size: clamp(2.9rem, 5.4vw, 4.85rem);
  font-weight: 850;
  letter-spacing: 0;
}

.lede {
  max-width: 690px;
  margin-bottom: 34px;
  color: var(--text-dim);
  font-size: clamp(1.12rem, 2vw, 1.32rem);
  line-height: 1.58;
}

.proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 22px;
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 650;
}

.proof-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.proof-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-bright);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.hero-visual {
  position: relative;
  min-height: 430px;
  display: grid;
  place-items: center;
}

.how {
  padding-top: 12px;
}

.glass-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 78%, transparent), var(--surface));
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.device-shell {
  width: min(100%, 390px);
  padding: 16px;
  border-radius: 42px;
  transform: rotate(1.4deg);
}

.reader-window {
  overflow: hidden;
  border-radius: 28px;
  background: color-mix(in srgb, var(--bg) 82%, white 18%);
  box-shadow: inset 0 0 0 1px var(--line), 0 18px 44px rgba(2, 20, 12, 0.12);
}

.window-bar {
  display: flex;
  gap: 7px;
  padding: 18px 18px 8px;
}

.window-bar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--line-strong);
}

.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 18px 16px;
}

.reader-toolbar p,
.progress-label,
.media-caption span {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.reader-toolbar strong {
  display: block;
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.22;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 760;
}

.reader-page {
  margin: 0 18px;
  padding: 24px;
  border-radius: 24px;
  background: color-mix(in srgb, #ffffff 90%, var(--bg) 10%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), 0 14px 28px rgba(2, 20, 12, 0.08);
}

@media (prefers-color-scheme: dark) {
  .reader-window {
    background: #0b1712;
  }

  .reader-page {
    background: #f6f4ed;
    color: #142017;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 14px 30px rgba(0, 0, 0, 0.34);
  }
}

.page-meta,
.text-line,
.word-row span {
  display: block;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.16;
}

.page-meta {
  width: 42%;
  height: 9px;
  margin-bottom: 18px;
  opacity: 0.42;
}

.text-line {
  height: 9px;
  margin-bottom: 11px;
}

.text-line.wide {
  width: 94%;
}

.text-line.mid {
  width: 68%;
}

.text-line.long {
  width: 84%;
}

.word-row {
  display: flex;
  gap: 8px;
  margin: 18px 0 16px;
}

.word-row span {
  width: 48px;
  height: 14px;
  opacity: 0.18;
}

.word-row span:nth-child(2) {
  width: 68px;
}

.word-row span:nth-child(4) {
  width: 58px;
}

.word-row .active-word {
  width: 76px;
  opacity: 1;
  background: var(--accent-bright);
  animation: active-word 2.2s cubic-bezier(0.2, 0, 0, 1) infinite;
}

.layout-preview {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 9px;
  margin-top: 22px;
}

.region {
  min-height: 44px;
  border-radius: 11px;
  background: rgba(32, 196, 86, 0.12);
  box-shadow: inset 0 0 0 1.5px rgba(32, 196, 86, 0.72);
}

.region.short {
  min-height: 58px;
}

.region.skipped {
  background: rgba(56, 157, 172, 0.08);
  box-shadow: inset 0 0 0 1.5px rgba(56, 157, 172, 0.62);
  background-image: linear-gradient(90deg, transparent 50%, rgba(56, 157, 172, 0.18) 50%);
  background-size: 10px 100%;
}

.region.small {
  min-height: 32px;
}

.player-card {
  display: grid;
  grid-template-columns: 44px 54px 1fr;
  align-items: center;
  gap: 12px;
  margin: 16px 18px 18px;
  padding: 13px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface-strong) 76%, transparent);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
}

.round-button,
.play-button {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--accent);
  cursor: pointer;
  transition-property: background-color, transform, box-shadow;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.round-button {
  width: 44px;
  height: 44px;
  background: var(--accent-soft);
}

.play-button {
  width: 54px;
  height: 54px;
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 12px 24px rgba(2, 76, 51, 0.26);
}

.round-button svg,
.play-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  stroke: currentColor;
  stroke-linejoin: round;
}

.play-button svg {
  width: 24px;
  height: 24px;
  transform: translateX(1px);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--accent-soft);
}

.progress-track span {
  display: block;
  width: 63%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
}

.floating-chip {
  position: absolute;
  min-height: 40px;
  padding: 9px 15px;
  border-radius: 999px;
  color: var(--accent);
  background: color-mix(in srgb, var(--surface-strong) 84%, transparent);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line);
  font-size: 0.9rem;
  font-weight: 780;
}

.chip-voice {
  top: 96px;
  right: 2px;
  animation: float-a 4.8s ease-in-out infinite;
}

.chip-cache {
  left: 2px;
  bottom: 94px;
  animation: float-b 5.2s ease-in-out infinite;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 36px;
}

.section-heading h2,
.media-copy h2,
.privacy-panel h2,
.faq-heading h2,
.doc h1 {
  margin-bottom: 14px;
  font-size: clamp(2.05rem, 5vw, 4rem);
  font-weight: 830;
}

.section-heading p:not(.eyebrow),
.media-copy p,
.privacy-panel p,
.faq-list p {
  color: var(--text-dim);
  font-size: 1.05rem;
}

.onboarding-tour {
  padding-top: 58px;
}

.tour-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(440px, 1fr);
  align-items: center;
  gap: 48px;
}

.tour-heading {
  margin-bottom: 0;
}

.onboarding-carousel {
  display: grid;
  gap: 18px;
  overflow: hidden;
  min-height: 560px;
  padding: 16px 16px 18px;
  border-radius: 38px;
}

.carousel-viewport {
  position: relative;
  min-height: 484px;
  overflow: hidden;
  border-radius: 26px;
  background: color-mix(in srgb, var(--surface-strong) 64%, transparent);
  box-shadow: inset 0 0 0 1px var(--line);
}

.tour-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  gap: 20px;
  padding: 28px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.985);
  transition-property: opacity, transform;
  transition-duration: 360ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.tour-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.tour-illustration {
  width: min(100%, 330px);
  min-height: 280px;
  display: grid;
  place-items: center;
  align-self: center;
}

.tour-copy {
  max-width: 390px;
  text-align: center;
}

.tour-copy h3 {
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.tour-copy p {
  margin-bottom: 0;
  color: var(--text-dim);
  font-size: 1rem;
}

.feature-chips {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.feature-chips span,
.tour-tabs span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--text) 6%, transparent);
  font-size: 0.78rem;
  font-weight: 720;
}

.feature-chips .prominent,
.tour-tabs span:first-child {
  color: var(--accent);
  background: var(--accent-soft);
}

.waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 116px;
}

.waveform span {
  width: 7px;
  height: var(--h);
  border-radius: 999px;
  background: var(--accent-bright);
  animation: waveform-pulse 1.8s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 80ms);
  transform-origin: center;
}

.waveform span:nth-child(1) { --i: 0; }
.waveform span:nth-child(2) { --i: 1; }
.waveform span:nth-child(3) { --i: 2; }
.waveform span:nth-child(4) { --i: 3; }
.waveform span:nth-child(5) { --i: 4; }
.waveform span:nth-child(6) { --i: 5; }
.waveform span:nth-child(7) { --i: 6; }
.waveform span:nth-child(8) { --i: 7; }
.waveform span:nth-child(9) { --i: 8; }
.waveform span:nth-child(10) { --i: 9; }
.waveform span:nth-child(11) { --i: 10; }
.waveform span:nth-child(12) { --i: 11; }
.waveform span:nth-child(13) { --i: 12; }
.waveform span:nth-child(14) { --i: 13; }

.voice-illustration,
.playback-illustration,
.appearance-illustration,
.library-illustration,
.annotations-illustration,
.smart-illustration {
  align-content: center;
  gap: 22px;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: min(100%, 270px);
}

.file-grid span {
  display: grid;
  place-items: center;
  min-height: 92px;
  border-radius: 18px;
  color: var(--text-dim);
  background: color-mix(in srgb, var(--text) 5%, transparent);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 780;
  transition-property: color, background-color, box-shadow, transform;
  transition-duration: 260ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.tour-slide.is-active .file-grid span {
  animation: file-focus 4s ease-in-out infinite;
}

.file-grid span:nth-child(2) { animation-delay: 1s; }
.file-grid span:nth-child(3) { animation-delay: 2s; }
.file-grid span:nth-child(4) { animation-delay: 3s; }

.tour-word-lines {
  display: grid;
  gap: 10px;
  width: 250px;
}

.tour-word-lines div {
  display: flex;
  gap: 8px;
}

.tour-word-lines span {
  width: var(--w);
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 18%, transparent);
}

.tour-slide.is-active .tour-word-lines span {
  animation: word-highlight 4.95s ease-in-out infinite;
}

.tour-word-lines div:first-child span:nth-child(3) { animation-delay: 0s; }
.tour-word-lines div:first-child span:nth-child(4) { animation-delay: 0.55s; }
.tour-word-lines div:last-child span:nth-child(1) { animation-delay: 1.1s; }
.tour-word-lines div:last-child span:nth-child(2) { animation-delay: 1.65s; }
.tour-word-lines div:last-child span:nth-child(3) { animation-delay: 2.2s; }
.tour-word-lines div:last-child span:nth-child(4) { animation-delay: 2.75s; }
.tour-word-lines div:last-child span:nth-child(5) { animation-delay: 3.3s; }
.tour-word-lines div:first-child span:nth-child(1) { animation-delay: 3.85s; }
.tour-word-lines div:first-child span:nth-child(2) { animation-delay: 4.4s; }

.theme-pages {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
}

.theme-page {
  position: relative;
  width: 78px;
  height: 112px;
  border-radius: 14px;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  outline: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-page::before,
.theme-page::after {
  content: "";
  position: absolute;
  left: 13px;
  border-radius: 999px;
  background: currentColor;
}

.theme-page::before {
  top: 16px;
  width: 40px;
  height: 5px;
  opacity: 0.78;
}

.theme-page::after {
  top: 34px;
  width: 50px;
  height: 4px;
  opacity: 0.35;
  box-shadow:
    0 12px 0 currentColor,
    0 24px 0 currentColor,
    -2px 36px 0 currentColor;
}

.theme-page.light {
  color: #101714;
  background: #ffffff;
}

.theme-page.sepia {
  color: #5c4528;
  background: #f5e9d2;
  box-shadow: var(--shadow-sm), inset 0 0 0 2px var(--accent-bright);
}

.theme-page.dark {
  color: #ffffff;
  background: #1d1d1e;
}

.type-slider {
  display: grid;
  grid-template-columns: auto 92px auto;
  align-items: center;
  gap: 11px;
  color: var(--text-muted);
}

.type-slider strong:first-child {
  font-size: 0.92rem;
}

.type-slider strong:last-child {
  font-size: 1.35rem;
}

.type-slider span {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 18%, transparent);
}

.type-slider i {
  position: absolute;
  top: 50%;
  left: 0;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: var(--accent-bright);
  transform: translateY(-50%);
  animation: type-knob 2.8s ease-in-out infinite alternate;
}

.tour-books {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
}

.tour-books span {
  width: 66px;
  height: 92px;
  border-radius: 10px 8px 8px 10px;
  box-shadow: var(--shadow-sm), inset 1px 0 0 rgba(255, 255, 255, 0.25);
}

.tour-books span:nth-child(1) {
  background: linear-gradient(160deg, #d9fbff, #1b6b82);
}

.tour-books span:nth-child(2) {
  height: 106px;
  background: linear-gradient(160deg, #ffe7c8, #a3534f);
}

.tour-books span:nth-child(3) {
  background: linear-gradient(160deg, #d9ffe6, #0e7750);
}

.tour-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
}

.tour-slide.is-active .tour-tabs span {
  animation: tab-focus 4.4s ease-in-out infinite;
}

.tour-tabs span:nth-child(2) { animation-delay: 1.1s; }
.tour-tabs span:nth-child(3) { animation-delay: 2.2s; }
.tour-tabs span:nth-child(4) { animation-delay: 3.3s; }

.annotation-page {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  width: 260px;
  min-height: 190px;
  padding: 22px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface-strong) 78%, transparent);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
}

.annotation-page span {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 16%, transparent);
}

.annotation-page .title-line {
  width: 52%;
  background: color-mix(in srgb, var(--text) 62%, transparent);
}

.annotation-page .highlight-line {
  width: 78%;
  height: 12px;
  background: rgba(255, 219, 77, 0.62);
  transform-origin: left;
  animation: highlight-sweep 1.7s ease-in-out infinite alternate;
}

.annotation-page span:nth-last-child(2) {
  width: 70%;
}

.annotation-page i {
  position: absolute;
  top: -4px;
  right: 22px;
  width: 24px;
  height: 42px;
  color: var(--accent-bright);
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%);
}

.smart-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 248px;
  padding: 14px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.smart-illustration .smart-page {
  transform: scale(0.92);
  transform-origin: center;
  margin-bottom: -18px;
}

.smart-page span {
  min-height: 26px;
  border-radius: 8px;
}

.smart-page .label,
.smart-page .title,
.smart-page .body {
  grid-column: 1 / -1;
}

.smart-page .read {
  background: rgba(32, 196, 86, 0.15);
  box-shadow: inset 0 0 0 1.3px rgba(32, 196, 86, 0.75);
}

.smart-page .title {
  min-height: 30px;
}

.smart-page .body {
  min-height: 54px;
}

.smart-page .body.short {
  min-height: 34px;
}

.smart-page .skip {
  display: grid;
  place-items: center;
  min-height: 28px;
  color: #17828d;
  background: rgba(56, 157, 172, 0.08);
  background-image: linear-gradient(90deg, transparent 50%, rgba(56, 157, 172, 0.18) 50%);
  background-size: 10px 100%;
  box-shadow: inset 0 0 0 1.3px rgba(56, 157, 172, 0.62);
  font-size: 0.72rem;
  font-weight: 760;
}

.smart-page .figure,
.smart-page .table {
  min-height: 54px;
}

.smart-legend {
  display: flex;
  justify-content: center;
  gap: 18px;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.smart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.smart-legend i {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.smart-legend .read {
  background: rgba(32, 196, 86, 0.15);
  box-shadow: inset 0 0 0 1.3px rgba(32, 196, 86, 0.75);
}

.smart-legend .skip {
  background: rgba(56, 157, 172, 0.08);
  box-shadow: inset 0 0 0 1.3px rgba(56, 157, 172, 0.62);
}

.carousel-controls {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 12px;
}

.carousel-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  cursor: pointer;
  transition-property: background-color, box-shadow, transform;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.carousel-button:hover {
  background: color-mix(in srgb, var(--accent-soft) 72%, var(--surface-strong));
  box-shadow: var(--shadow-sm);
}

.carousel-button:active {
  transform: scale(0.96);
}

.carousel-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.carousel-dots button {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.carousel-dots button::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: inherit;
  background: color-mix(in srgb, var(--text) 28%, transparent);
  transition-property: background-color, transform;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.carousel-dots button.is-active::before {
  background: var(--accent);
  transform: scale(1.25);
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.step-card {
  border-radius: var(--radius-md);
  padding: 24px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 32px;
  margin-bottom: 34px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.82rem;
  font-weight: 820;
  font-variant-numeric: tabular-nums;
}

.step-card h3 {
  margin-bottom: 10px;
  font-size: 1.22rem;
}

.step-card p {
  margin-bottom: 0;
  color: var(--text-dim);
}

.media-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(420px, 1fr);
  align-items: center;
  gap: 48px;
}

.media-copy {
  max-width: 520px;
}

.media-placeholder {
  min-height: 420px;
  display: grid;
  align-content: center;
  gap: 28px;
  padding: 34px;
  border-radius: var(--radius-lg);
}

.library-mock {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
}

.book-cover {
  width: 30%;
  max-width: 128px;
  min-width: 88px;
  aspect-ratio: 0.68;
  border-radius: 18px 12px 12px 18px;
  box-shadow: var(--shadow-md), inset 1px 0 0 rgba(255, 255, 255, 0.28), inset -10px 0 18px rgba(0, 0, 0, 0.08);
  outline: 1px solid rgba(0, 0, 0, 0.1);
}

.cover-green {
  background: linear-gradient(160deg, #d9ffe6, #0e7750 72%);
  transform: translateY(10px) rotate(-5deg);
}

.cover-blue {
  background: linear-gradient(160deg, #d9fbff, #1a6d80 72%);
  transform: translateY(-18px);
}

.cover-sand {
  background: linear-gradient(160deg, #f6e7c8, #765634 72%);
  transform: translateY(12px) rotate(5deg);
}

.media-caption {
  display: grid;
  gap: 4px;
  max-width: 360px;
  margin: 0 auto;
  text-align: center;
}

.media-caption strong {
  font-size: 1.04rem;
}

.privacy-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 30px;
  padding: 34px;
  border-radius: var(--radius-lg);
}

.privacy-panel p {
  max-width: 760px;
  margin-bottom: 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: 48px;
}

.faq-list {
  display: grid;
  gap: 12px;
}

details {
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-strong) 72%, transparent);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
}

summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  color: var(--text);
  cursor: pointer;
  font-weight: 760;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 1.15rem;
  line-height: 1;
  transition-property: transform, background-color;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

details[open] summary::after {
  transform: rotate(45deg);
}

details p {
  margin: -2px 18px 18px;
}

.site-footer {
  padding: 30px 0 46px;
}

.footer-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-wrap nav {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.footer-brand {
  color: var(--text);
}

.copyright {
  font-variant-numeric: tabular-nums;
}

.doc {
  max-width: 760px;
  padding: 62px 38px 42px;
  border-radius: var(--radius-lg);
}

.doc h1 {
  margin-bottom: 8px;
}

.doc .updated {
  margin-bottom: 36px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.doc h2 {
  margin: 36px 0 10px;
  font-size: 1.35rem;
}

.doc p,
.doc li {
  color: var(--text-dim);
}

.doc a {
  color: var(--accent);
  font-weight: 700;
}

.doc ul {
  padding-left: 22px;
}

.doc li {
  margin: 6px 0;
}

@keyframes active-word {
  0%,
  100% {
    transform: scaleX(1);
    opacity: 0.88;
  }
  45% {
    transform: scaleX(1.04);
    opacity: 1;
  }
}

@keyframes float-a {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -10px, 0);
  }
}

@keyframes float-b {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, 12px, 0);
  }
}

@keyframes waveform-pulse {
  0%,
  100% {
    transform: scaleY(0.62);
    opacity: 0.62;
  }
  45% {
    transform: scaleY(1);
    opacity: 0.96;
  }
}

@keyframes file-focus {
  0%,
  22%,
  100% {
    color: var(--text-dim);
    background: color-mix(in srgb, var(--text) 5%, transparent);
    box-shadow: inset 0 0 0 1px var(--line);
    transform: scale(1);
  }
  8%,
  16% {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent-soft) 70%, transparent);
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent);
    transform: scale(1.04);
  }
}

@keyframes word-highlight {
  0%,
  9% {
    background: var(--accent-bright);
    transform: scaleX(1.04);
  }
  15%,
  100% {
    background: color-mix(in srgb, var(--text) 18%, transparent);
    transform: scaleX(1);
  }
}

@keyframes type-knob {
  from {
    left: 0;
  }
  to {
    left: calc(100% - 15px);
  }
}

@keyframes tab-focus {
  0%,
  24%,
  100% {
    color: var(--text-muted);
    background: color-mix(in srgb, var(--text) 6%, transparent);
  }
  8%,
  18% {
    color: var(--accent);
    background: var(--accent-soft);
  }
}

@keyframes highlight-sweep {
  from {
    transform: scaleX(0.18);
  }
  to {
    transform: scaleX(1);
  }
}

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

@media (prefers-reduced-transparency: reduce) {
  .header-wrap,
  .glass-panel,
  .floating-chip,
  .onboarding-carousel,
  details {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--surface-strong);
  }

  body {
    background: var(--bg);
  }

  body::before {
    display: none;
  }
}

@media (prefers-color-scheme: dark) {
  .book-cover {
    outline-color: rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 980px) {
  .header-wrap {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .nav {
    display: none;
  }

  .hero-grid,
  .tour-grid,
  .media-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: auto;
  }

  .device-shell {
    transform: none;
  }

  .media-copy {
    max-width: 720px;
  }

  .tour-heading {
    max-width: 720px;
  }
}

@media (max-width: 760px) {
  .wrap {
    width: min(100% - 28px, var(--maxw));
  }

  .section-pad {
    padding: 66px 0;
  }

  .hero {
    padding-top: 40px;
    padding-bottom: 24px;
  }

  .hero-grid {
    gap: 24px;
  }

  .hero h1 {
    font-size: clamp(2.45rem, 11.5vw, 3.25rem);
  }

  .hero-actions,
  .header-actions {
    flex-wrap: wrap;
  }

  .hero-actions .button,
  .header-actions .button {
    flex: 1 1 auto;
  }

  .step-grid {
    grid-template-columns: 1fr;
  }

  .onboarding-carousel {
    min-height: 590px;
  }

  .carousel-viewport {
    min-height: 490px;
  }

  .privacy-panel {
    grid-template-columns: 1fr;
  }

  .privacy-panel .button {
    justify-self: start;
  }

  .footer-wrap {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .footer-wrap nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 10px 0;
  }

  .header-wrap {
    padding: 8px;
    border-radius: 22px;
    gap: 10px;
  }

  .button {
    padding-inline: 13px;
  }

  .button-large {
    width: 100%;
  }

  .device-shell,
  .onboarding-carousel,
  .media-placeholder,
  .privacy-panel {
    border-radius: 28px;
  }

  .tour-grid {
    gap: 28px;
  }

  .tour-slide {
    gap: 28px;
    padding: 20px 16px;
  }

  .tour-illustration {
    width: min(100%, 290px);
    min-height: 270px;
  }

  .carousel-controls {
    grid-template-columns: 40px 1fr 40px;
    gap: 8px;
  }

  .carousel-dots {
    gap: 2px;
  }

  .hero-visual {
    max-height: 64px;
    overflow: hidden;
    place-items: start center;
  }

  .device-shell {
    width: min(100%, 320px);
    padding: 10px;
  }

  .reader-window {
    border-radius: 22px;
  }

  .reader-page {
    margin-inline: 12px;
    padding: 18px;
    border-radius: 18px;
  }

  .player-card {
    grid-template-columns: 44px 1fr;
  }

  .play-button {
    grid-column: 1;
    grid-row: 1;
  }

  .round-button {
    display: none;
  }

  .progress-stack {
    grid-column: 2;
  }

  .floating-chip {
    display: none;
  }

  .media-placeholder {
    min-height: 340px;
    padding: 24px;
  }

  .library-mock {
    gap: 12px;
  }

  .book-cover {
    min-width: 72px;
  }
}
