:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-strong: #edf7f5;
  --ink: #171421;
  --muted: #4c5568;
  --faint: #697386;
  --line: #d8dde7;
  --purple: #6d5dfc;
  --purple-dark: #5448d7;
  --teal: #087568;
  --coral: #d95542;
  --amber: #b76e00;
  --shadow: 0 24px 70px rgba(23, 20, 33, 0.14);
  --radius: 8px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body.nav-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.hidden { display: none !important; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(247, 248, 251, 0.82);
  border-bottom: 1px solid rgba(216, 221, 231, 0.74);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0;
  color: var(--ink);
}

.brand img { border-radius: 8px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-weight: 650;
}

.nav-links a:not(.button):hover,
.footer a:hover,
.link-panel a:hover { color: var(--purple-dark); }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 8px;
  border: 1px solid var(--purple);
  background: var(--purple);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(109, 93, 252, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
  background: var(--purple-dark);
  border-color: var(--purple-dark);
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(84, 72, 215, 0.28);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  border-color: rgba(216, 221, 231, 0.88);
  box-shadow: 0 14px 34px rgba(23, 20, 33, 0.08);
}

.button-secondary:hover {
  background: #ffffff;
  color: var(--ink);
  border-color: #ffffff;
}

.button-small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.9rem;
}

.hero {
  position: relative;
  min-height: min(84vh, 760px);
  padding: 126px 0 86px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #f2f5f9;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(247, 248, 251, 0.98) 0%, rgba(247, 248, 251, 0.94) 39%, rgba(247, 248, 251, 0.68) 61%, rgba(247, 248, 251, 0.18) 100%),
    linear-gradient(180deg, rgba(247, 248, 251, 0.08), rgba(247, 248, 251, 0.82));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: none;
  color: var(--ink);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow { color: var(--teal); }

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

h1 {
  margin-bottom: 16px;
  font-size: clamp(4rem, 10vw, 7rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.hero-copy {
  max-width: 610px;
  margin-bottom: 28px;
  color: #34394a;
  font-size: 1.22rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  color: #34394a;
  font-size: 0.9rem;
  font-weight: 750;
}

.hero-proof span {
  padding: 8px 12px;
  border: 1px solid rgba(216, 221, 231, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 10px 26px rgba(23, 20, 33, 0.06);
}

.proof-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.proof-grid div {
  position: relative;
  padding: 26px 22px 24px;
  border-left: 1px solid rgba(216, 221, 231, 0.8);
}

.proof-grid div:last-child { border-right: 1px solid var(--line); }
.proof-grid div::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 0;
  width: 44px;
  height: 3px;
  background: var(--purple);
}
.proof-grid div:nth-child(2)::before { background: var(--teal); }
.proof-grid div:nth-child(3)::before { background: var(--coral); }
.proof-grid div:nth-child(4)::before { background: var(--amber); }
.proof-grid strong { display: block; font-size: 1.05rem; }
.proof-grid span { display: block; color: var(--muted); font-size: 0.92rem; }

.section { padding: 96px 0; }

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.feature-card,
.reader-app,
.status-panel,
.link-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 42px rgba(23, 20, 33, 0.07);
}

.feature-card {
  position: relative;
  min-height: 218px;
  padding: 24px;
  overflow: hidden;
}
.feature-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: var(--purple);
}
.feature-card:nth-child(2)::after { background: var(--teal); }
.feature-card:nth-child(3)::after { background: var(--coral); }
.feature-card:nth-child(4)::after { background: var(--amber); }
.feature-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 28px;
  margin-bottom: 26px;
  border-radius: 999px;
  background: #f1efff;
  color: var(--purple-dark);
  font-size: 0.78rem;
  font-weight: 900;
}
.feature-card:nth-child(2) .feature-marker { background: #e7f6f2; color: var(--teal); }
.feature-card:nth-child(3) .feature-marker { background: #fff0ed; color: var(--coral); }
.feature-card:nth-child(4) .feature-marker { background: #fff6df; color: var(--amber); }
.feature-card p { color: var(--muted); margin-bottom: 0; }

.reader-section {
  background:
    linear-gradient(180deg, #edf7f5 0%, #f7f8fb 100%);
}
.reader-app {
  padding: 26px;
  border-color: rgba(8, 117, 104, 0.2);
}

.reader-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
}

#readerText {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #ffffff;
  line-height: 1.65;
}

#readerText:focus,
#voiceSelect:focus,
#speedSlider:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(14, 147, 132, 0.35);
  outline-offset: 2px;
}

.reader-meta,
.reader-time {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.reader-controls {
  display: grid;
  grid-template-columns: auto auto auto auto minmax(180px, 1fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: center;
  margin: 22px 0 16px;
}

.control-button {
  min-width: 52px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
}

.play-button {
  min-width: 58px;
  background: var(--purple);
  border-color: var(--purple);
  color: #ffffff;
}

.stop-button {
  min-width: 72px;
  color: #b42318;
  border-color: #fecdca;
  background: #fff5f5;
}

.control-field {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

.voice-field {
  grid-template-columns: auto 1fr;
}

#speedSlider { width: 100%; accent-color: var(--purple); }

#voiceSelect {
  min-width: 0;
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 10px;
}

.reader-progress {
  width: 100%;
  height: 8px;
  border-radius: 99px;
  background: #e4e7ec;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
  transition: width 0.18s linear;
}

.waveform {
  width: 100%;
  height: 70px;
  margin: 20px 0 10px;
  border-radius: 8px;
  background: #f2f4f7;
}

.highlighted-text {
  min-height: 72px;
  margin: 0;
  padding: 16px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
}

.word-active {
  color: var(--ink);
  background: #d9f3ef;
  border-radius: 4px;
}

.word-spoken { color: #98a2b3; }

.availability { background: #ffffff; }

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 28px;
  align-items: start;
}

.status-panel,
.link-panel {
  padding: 24px;
}

.status-panel ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.link-panel {
  display: grid;
  gap: 12px;
}

.link-panel a {
  color: var(--purple-dark);
  font-weight: 800;
}

.privacy-summary { background: var(--surface-strong); }

.footer {
  padding: 52px 0 20px;
  background: #171421;
  color: #d0d5dd;
}

.footer .brand { color: #ffffff; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.footer h2 {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer nav a {
  display: block;
  margin: 8px 0;
  color: #d0d5dd;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.12);
  color: #98a2b3;
}

.simple-page {
  padding-top: 68px;
  background: var(--bg);
}

.page-hero {
  padding: 78px 0 44px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: clamp(2.75rem, 7vw, 5.25rem);
}

.page-hero p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.08rem;
}

.legal-section {
  padding: 54px 0 88px;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 820px);
}

.legal-copy {
  color: var(--muted);
}

.legal-copy h2 {
  margin: 32px 0 10px;
  color: var(--ink);
  font-size: 1.42rem;
  line-height: 1.25;
}

.legal-copy h2:first-child { margin-top: 0; }

.legal-copy p,
.legal-copy li {
  font-size: 1rem;
}

.legal-copy strong {
  color: var(--ink);
}

.legal-copy a {
  color: var(--purple-dark);
  font-weight: 800;
}

.faq-list h2 {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.faq-list h2:first-child {
  padding-top: 0;
  border-top: 0;
}

@media (max-width: 900px) {
  .feature-grid,
  .proof-grid,
  .two-column,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .reader-controls {
    grid-template-columns: repeat(4, auto);
  }

  .control-field,
  .voice-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .container { width: min(100% - 32px, 1120px); }
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: 68px 0 auto;
    display: none;
    padding: 18px 16px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links.nav-open { display: flex; }

  .hero {
    min-height: 84vh;
    padding: 110px 0 72px;
  }

  .hero-scrim {
    background: linear-gradient(180deg, rgba(247, 248, 251, 0.96), rgba(247, 248, 251, 0.9));
  }

  .hero-bg-image {
    object-position: 74% center;
    opacity: 0.42;
  }
  .hero-copy { font-size: 1.08rem; }
  .hero-proof { gap: 8px; }
  .hero-proof span { width: 100%; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  h1 { font-size: clamp(3.2rem, 17vw, 5.4rem); }
  .proof-grid,
  .feature-grid,
  .two-column,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .proof-grid div,
  .proof-grid div:last-child {
    border: 0;
    border-bottom: 1px solid var(--line);
  }

  .section { padding: 64px 0; }
  .reader-app { padding: 18px; }
  .reader-controls { grid-template-columns: repeat(4, 1fr); }
  .control-button { min-width: 0; }
  .play-button, .stop-button { min-width: 0; }
}

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