/* ─────────────────────────────────────────────────────────────────────────
   FlowVoice — landing page

   Newsreader (serif display) + Geist (sans body). Warm cream surface in
   light, deep cocoa in dark, single honey-amber accent. Theme is
   data-theme on <html> (light | dark | auto), persisted to localStorage
   by the inline script in index.html; auto falls through to the
   prefers-color-scheme media query.
   ───────────────────────────────────────────────────────────────────── */

/* ───────── tokens ───────── */
:root {
  --accent:        #d4943a;
  --accent-2:      #b87a26;
  --accent-on:     #1f1810;
  --accent-soft:   rgba(212, 148, 58, 0.14);
  --accent-glow:   rgba(212, 148, 58, 0.28);

  --success:        #4a8c5a;
  --success-bg:     rgba(74, 140, 90, 0.10);
  --success-border: rgba(74, 140, 90, 0.28);

  /* light theme defaults */
  --bg:       #efe5d0;
  --bg-2:     #f4ecd8;
  --bg-card:  #faf3e3;
  --bg-elev:  #ffffff;
  --bg-key:   rgba(31, 24, 16, 0.06);
  --text:     #1f1810;
  --text-2:   #4a3f31;
  --text-mute:#8a7d6a;
  --border:   rgba(31, 24, 16, 0.07);
  --border-2: rgba(31, 24, 16, 0.13);
  --shadow-lg:
    0 30px 80px -20px rgba(50, 30, 10, 0.28),
    0  8px 28px  -8px rgba(50, 30, 10, 0.18);
  --window-shadow:
    0 50px 100px -20px rgba(40, 25, 5, 0.35),
    0 18px  40px -10px rgba(40, 25, 5, 0.22);

  --serif: 'Newsreader', ui-serif, Georgia, serif;
  --sans:  'Geist', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1120px;
}

:root[data-theme='dark'],
:root[data-theme='auto'][data-system-prefers='dark'] {
  --bg:       #0d0906;
  --bg-2:     #14100a;
  --bg-card:  #1a140d;
  --bg-elev:  #1f1810;
  --bg-key:   rgba(255, 255, 255, 0.06);
  --text:     #f0e5d0;
  --text-2:   #c4b89d;
  --text-mute:#8a7d6a;
  --border:   rgba(255, 255, 255, 0.06);
  --border-2: rgba(255, 255, 255, 0.12);
  --shadow-lg:
    0 30px 80px -20px rgba(0, 0, 0, 0.60),
    0  8px 28px  -8px rgba(0, 0, 0, 0.40);
  --window-shadow:
    0 50px 100px -20px rgba(0, 0, 0, 0.65),
    0 18px  40px -10px rgba(0, 0, 0, 0.50);
  --success:        #6fb07e;
  --success-bg:     rgba(111, 176, 126, 0.10);
  --success-border: rgba(111, 176, 126, 0.32);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme='auto']:not([data-system-prefers='light']) {
    --bg:       #0d0906;
    --bg-2:     #14100a;
    --bg-card:  #1a140d;
    --bg-elev:  #1f1810;
    --bg-key:   rgba(255, 255, 255, 0.06);
    --text:     #f0e5d0;
    --text-2:   #c4b89d;
    --text-mute:#8a7d6a;
    --border:   rgba(255, 255, 255, 0.06);
    --border-2: rgba(255, 255, 255, 0.12);
    --shadow-lg:
      0 30px 80px -20px rgba(0, 0, 0, 0.60),
      0  8px 28px  -8px rgba(0, 0, 0, 0.40);
    --window-shadow:
      0 50px 100px -20px rgba(0, 0, 0, 0.65),
      0 18px  40px -10px rgba(0, 0, 0, 0.50);
    --success:        #6fb07e;
    --success-bg:     rgba(111, 176, 126, 0.10);
    --success-border: rgba(111, 176, 126, 0.32);
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-feature-settings: 'ss01', 'cv11';
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.35s ease, color 0.35s ease;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
::selection { background: var(--accent-soft); color: var(--text); }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 28px; }

/* ───────── nav ───────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  padding: 18px 0;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; letter-spacing: -0.01em; font-size: 17px;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background-image: url('/assets/icon.png');
  background-size: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-link {
  padding: 8px 12px; border-radius: 8px;
  color: var(--text-2); font-size: 14px; font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--text); background: var(--bg-key); }
.theme-toggle {
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-grid; place-items: center;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-2);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.theme-toggle:hover { background: var(--bg-key); color: var(--text); border-color: var(--border-2); }
.theme-toggle svg { width: 16px; height: 16px; }
:root[data-theme='auto'][data-system-prefers='dark'] .theme-toggle .ico-sun,
:root[data-theme='dark'] .theme-toggle .ico-sun { display: none; }
:root[data-theme='auto'][data-system-prefers='light'] .theme-toggle .ico-moon,
:root[data-theme='light'] .theme-toggle .ico-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root[data-theme='auto']:not([data-system-prefers='light']) .theme-toggle .ico-sun { display: none; }
  :root[data-theme='auto']:not([data-system-prefers='light']) .theme-toggle .ico-moon { display: inline; }
}
@media (prefers-color-scheme: light) {
  :root[data-theme='auto']:not([data-system-prefers='dark']) .theme-toggle .ico-moon { display: none; }
}

/* ───────── buttons ───────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600; font-size: 15px;
  border: 0;
  transition:
    transform 0.15s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-on);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 8px 24px -8px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 12px 28px -8px var(--accent-glow);
}
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  padding: 13px 18px;
  border: 1px solid var(--border-2);
}
.btn-ghost:hover { color: var(--text); background: var(--bg-key); }
.btn .arr { transition: transform 0.2s ease; }
.btn:hover .arr { transform: translateX(2px); }

/* ───────── hero ───────── */
.hero {
  position: relative;
  padding: 80px 0 60px;
  text-align: center;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 880px; height: 880px;
  background: radial-gradient(circle at center, var(--accent-glow), transparent 55%);
  filter: blur(20px);
  opacity: 0.65;
  pointer-events: none;
  z-index: 0;
}
.hero > *:not(.hero-glow) { position: relative; z-index: 1; }

.hero-visual {
  margin: 0 auto 36px;
  height: 112px;
  display: grid; place-items: center;
}
.hero-icon-wrap {
  width: 112px; height: 112px;
  border-radius: 26px;
  background: var(--bg-elev);
  display: grid; place-items: center;
  box-shadow:
    0 30px 60px -20px var(--accent-glow),
    0 10px 30px -10px rgba(0, 0, 0, 0.15);
  position: relative;
}
:root[data-theme='dark'] .hero-icon-wrap,
:root[data-theme='auto'][data-system-prefers='dark'] .hero-icon-wrap { background: #1a140d; }
@media (prefers-color-scheme: dark) {
  :root[data-theme='auto']:not([data-system-prefers='light']) .hero-icon-wrap { background: #1a140d; }
}
.hero-icon-wrap img { width: 80%; height: 80%; object-fit: contain; }

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(48px, 8vw, 86px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  text-wrap: balance;
}
.hero h1 em { font-style: italic; font-weight: 500; font-feature-settings: 'ss01'; }
.hero p.lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 580px;
  margin: 0 auto 38px;
  text-wrap: pretty;
}

.cta-row {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 16px;
}
.cta-meta {
  font-size: 13px;
  color: var(--text-mute);
  display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap;
}
.cta-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.cta-meta a {
  color: var(--text-2);
  text-decoration: underline;
  text-decoration-color: var(--border-2);
  text-underline-offset: 3px;
}
.cta-meta a:hover { text-decoration-color: var(--accent); color: var(--text); }

/* ───────── product stage — the dictation scene ─────────
   A small "compose" card with cleanly typed text and a blinking caret,
   the FlowVoice HUD pill floating below with its breathing waveform.
   Replaces the previous Settings-window mock — the hero promises words
   from speech, so the image should *show* writing, not configuration. */

.product-stage {
  position: relative;
  padding: 60px 0 110px;
}
.product-stage::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 1200px; height: 700px;
  background: radial-gradient(ellipse at center, var(--accent-glow), transparent 60%);
  opacity: 0.5;
  filter: blur(40px);
  pointer-events: none;
}

.scene {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}

.compose {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 44px 52px;
  box-shadow: var(--window-shadow);
}
:root[data-theme='dark'] .compose,
:root[data-theme='auto'][data-system-prefers='dark'] .compose { background: #1a140d; }
@media (prefers-color-scheme: dark) {
  :root[data-theme='auto']:not([data-system-prefers='light']) .compose {
    background: #1a140d;
  }
}
.compose p {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--text);
  text-wrap: pretty;
}
.compose__caret {
  display: inline-block;
  width: 2px;
  height: 0.95em;
  margin-left: 2px;
  vertical-align: -0.12em;
  background: var(--accent);
  animation: caret-blink 1.05s steps(2) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

.scene-pill {
  position: relative;
  width: 224px;
  height: 32px;
  margin: 36px auto 0;
}
.scene-pill::before {
  content: '';
  position: absolute;
  inset: -18px -28px;
  background: radial-gradient(ellipse 55% 55% at 50% 50%, var(--accent-glow), transparent 70%);
  filter: blur(12px);
  z-index: 0;
  pointer-events: none;
}
.scene-pill__shape {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.scene-pill__shape .pill-body {
  fill: #1c1b19; /* the real app HUD is dark in both themes */
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 0.8;
}
.scene-pill__shape .bar {
  fill: var(--accent);
  transform-origin: center;
  transform-box: fill-box;
  animation: pillBar 1.6s ease-in-out infinite;
  will-change: transform;
}
.scene-pill__shape .bar-1  { animation-delay: 0.00s; }
.scene-pill__shape .bar-2  { animation-delay: 0.22s; }
.scene-pill__shape .bar-3  { animation-delay: 0.08s; }
.scene-pill__shape .bar-4  { animation-delay: 0.34s; }
.scene-pill__shape .bar-5  { animation-delay: 0.14s; }
.scene-pill__shape .bar-6  { animation-delay: 0.42s; }
.scene-pill__shape .bar-7  { animation-delay: 0.20s; }
.scene-pill__shape .bar-8  { animation-delay: 0.30s; }
.scene-pill__shape .bar-9  { animation-delay: 0.06s; }
.scene-pill__shape .bar-10 { animation-delay: 0.24s; }

@keyframes pillBar {
  0%, 100% { transform: scaleY(0.55); opacity: 0.85; }
  50%      { transform: scaleY(1);    opacity: 1; }
}

/* ───────── section heads ───────── */
.section { padding: 100px 0; position: relative; }
.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
}
.section-head { max-width: 720px; margin: 0 auto 60px; text-align: center; }
.section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  text-wrap: balance;
}
.section-head h2 em { font-style: italic; font-weight: 500; }
.section-head p {
  color: var(--text-2);
  font-size: 17.5px;
  line-height: 1.55;
  margin: 0;
  text-wrap: pretty;
}

/* ───────── features ───────── */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 26px 26px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.feature:hover {
  transform: translateY(-2px);
  border-color: var(--border-2);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  margin-bottom: 22px;
}
.feature-icon svg { width: 20px; height: 20px; }
.feature h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.feature p {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0;
}

/* ───────── how it works ───────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
}
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 34px 32px 32px;
  position: relative;
}
.step-num {
  position: absolute;
  top: 28px; right: 30px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 38px;
  font-weight: 400;
  color: var(--accent);
  opacity: 0.45;
  line-height: 1;
}
.step-visual {
  height: 100px;
  display: grid; place-items: center;
  margin-bottom: 24px;
}
.step h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.step p { color: var(--text-2); font-size: 15px; line-height: 1.55; margin: 0; }

.key-big {
  background: var(--bg-elev);
  border: 1px solid var(--border-2);
  border-bottom-width: 3px;
  border-radius: 12px;
  padding: 16px 26px;
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.04);
}
:root[data-theme='dark'] .key-big,
:root[data-theme='auto'][data-system-prefers='dark'] .key-big {
  background: rgba(255, 255, 255, 0.04);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme='auto']:not([data-system-prefers='light']) .key-big {
    background: rgba(255, 255, 255, 0.04);
  }
}

.wave { display: flex; align-items: center; gap: 5px; height: 60px; }
.wave span {
  width: 6px;
  border-radius: 3px;
  background: var(--accent);
  animation: wave 1.4s ease-in-out infinite;
}
.wave span:nth-child(1) { height: 22px; animation-delay: 0s; }
.wave span:nth-child(2) { height: 36px; animation-delay: 0.1s; }
.wave span:nth-child(3) { height: 52px; animation-delay: 0.2s; }
.wave span:nth-child(4) { height: 30px; animation-delay: 0.3s; }
.wave span:nth-child(5) { height: 18px; animation-delay: 0.4s; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.6); }
  50%      { transform: scaleY(1.15); }
}

.typed-line {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--text);
  border-right: 2px solid var(--accent);
  padding: 6px 4px 6px 12px;
  background: var(--bg-elev);
  border-radius: 8px;
  box-shadow: 0 2px 12px -4px var(--accent-glow);
  animation: blink 1s steps(2) infinite;
  max-width: 240px;
}
:root[data-theme='dark'] .typed-line,
:root[data-theme='auto'][data-system-prefers='dark'] .typed-line {
  background: rgba(255, 255, 255, 0.04);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme='auto']:not([data-system-prefers='light']) .typed-line {
    background: rgba(255, 255, 255, 0.04);
  }
}
@keyframes blink { 50% { border-right-color: transparent; } }

/* ───────── faq ───────── */
.faq-wrap { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px;
  padding: 22px 4px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
}
.faq-q .chev {
  flex-shrink: 0;
  color: var(--text-mute);
  transition: transform 0.25s ease, color 0.25s ease;
}
.faq-item[data-open='true'] .faq-q .chev { transform: rotate(45deg); color: var(--accent); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-a-inner {
  padding: 0 4px 24px;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.65;
  max-width: 620px;
}
.faq-a-inner code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--bg-key);
  color: var(--text);
}
.faq-item[data-open='true'] .faq-a { max-height: 420px; }

/* ───────── final cta ───────── */
.cta-final {
  text-align: center;
  padding: 140px 0;
  position: relative;
}
.cta-final::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, var(--accent-glow), transparent 50%);
  opacity: 0.45;
  pointer-events: none;
}
.cta-final > * { position: relative; }
.cta-final h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 68px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 18px;
  text-wrap: balance;
}
.cta-final h2 em { font-style: italic; font-weight: 500; }
.cta-final p {
  color: var(--text-2);
  font-size: 17.5px;
  margin: 0 auto 36px;
  max-width: 500px;
}

/* ───────── footer ───────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  text-align: center;
  color: var(--text-mute);
  font-size: 13px;
}

/* ───────── platform menu ───────── */
.platform { position: relative; display: inline-block; }
.platform-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 280px;
  background: var(--bg-elev);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}
:root[data-theme='dark'] .platform-menu,
:root[data-theme='auto'][data-system-prefers='dark'] .platform-menu { background: #1a140d; }
@media (prefers-color-scheme: dark) {
  :root[data-theme='auto']:not([data-system-prefers='light']) .platform-menu { background: #1a140d; }
}
.platform[data-open='true'] .platform-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.platform-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 9px;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 14px;
  text-align: left;
  transition: background 0.15s;
}
.platform-item:hover { background: var(--bg-key); }
.platform-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.75; }
.platform-item .arch { margin-left: auto; font-size: 12px; color: var(--text-mute); }

/* ───────── focus ───────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ───────── responsive ───────── */
@media (max-width: 880px) {
  .features      { grid-template-columns: 1fr 1fr; }
  .steps         { grid-template-columns: 1fr; gap: 16px; }
  .section       { padding: 70px 0; }
  .product-stage { padding: 30px 0 70px; }
  .hero          { padding: 50px 0 30px; }
  .compose       { padding: 32px 28px; border-radius: 18px; }
  .compose p     { font-size: 19px; }
  .scene-pill    { margin-top: 30px; }
}
@media (max-width: 580px) {
  .features  { grid-template-columns: 1fr; }
  .wrap      { padding: 0 22px; }
  .cta-final { padding: 90px 0; }
}

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