/* ============================================================
   SpeechAI — Landing styles
   Brand: warm minimalism · soundwave over a book
   Dark-first (ink) with a light (ivory) toggle.
   ============================================================ */

/* ---------- Brand palette (immutable) ---------- */
:root {
  --brand-ivory:       #F6F2EA;
  --brand-ink:         #211C17;
  --brand-coral:       #DA6A45;
  --brand-coral-mark:  #D55C39;
  --brand-coral-light: #E68A63;
  --brand-clay:        #C2542E;
  --brand-amber:       #E9A56B;
  --brand-forest:      #214140;
  --brand-teal:        #3E6F66;
  --brand-stone:       #8C857B;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-text:    'Inter', system-ui, sans-serif;

  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(72px, 11vw, 140px);

  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

/* ---------- DARK (default) ---------- */
:root,
[data-theme="dark"] {
  --bg:           #1B1712;
  --bg-2:         #211C17;
  --surface:      #2A241E;
  --surface-2:    #332C24;
  --surface-soft: #241F19;
  --border:       rgba(246,242,234,.12);
  --border-strong:rgba(246,242,234,.20);
  --text:         #F6F2EA;
  --text-muted:   #C9C1B4;
  --text-subtle:  #9A9286;
  --accent:       #E68A63;
  --accent-2:     #DA6A45;
  --accent-hover: #DA6A45;
  --accent-on:    #211C17;
  --secondary:    #5A8C82;
  --focus-ring:   #E68A63;
  --grad-top:     #E68A63;
  --grad-bot:     #C2542E;
  /* mark fills on dark = ivory mono */
  --mk-wave:  #F6F2EA;
  --mk-coral: #F6F2EA;
  --mk-forest:#F6F2EA;
  --player-shadow: 0 40px 80px -32px rgba(0,0,0,.7);
  --hairline: rgba(246,242,234,.08);
}

/* ---------- LIGHT ---------- */
[data-theme="light"] {
  --bg:           #F6F2EA;
  --bg-2:         #F0EADF;
  --surface:      #FFFFFF;
  --surface-2:    #F6F2EA;
  --surface-soft: #FBF8F2;
  --border:       rgba(33,28,23,.12);
  --border-strong:rgba(33,28,23,.20);
  --text:         #211C17;
  --text-muted:   #6E665C;
  --text-subtle:  #8C857B;
  --accent:       #DA6A45;
  --accent-2:     #C2542E;
  --accent-hover: #C2542E;
  --accent-on:    #F6F2EA;
  --secondary:    #3E6F66;
  --focus-ring:   #DA6A45;
  --grad-top:     #E68A63;
  --grad-bot:     #C2542E;
  /* mark fills on light = brand colors */
  --mk-wave:  #D55C39;
  --mk-coral: #D55C39;
  --mk-forest:#214140;
  --player-shadow: 0 36px 70px -34px rgba(33,28,23,.40);
  --hairline: rgba(33,28,23,.06);
}

/* ============================================================
   Base
   ============================================================ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .4s var(--ease), color .4s var(--ease);
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2.5px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent); color: var(--accent-on); }

/* ============================================================
   Layout helpers
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(48px, 7vw, 90px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow--muted { color: var(--text-subtle); }

.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head--center { margin-inline: auto; text-align: center; }
.h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 18px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .98rem;
  letter-spacing: -.01em;
  border: none;
  border-radius: var(--radius-pill);
  padding: 14px 24px;
  min-height: 48px;
  transition: transform .18s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn--primary {
  background: var(--accent);
  color: var(--accent-on);
  box-shadow: 0 10px 26px -12px color-mix(in oklab, var(--accent) 70%, transparent);
}
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 16px 30px -12px color-mix(in oklab, var(--accent) 75%, transparent); }
.btn--primary:active { transform: translateY(0); }
/* Submit loading state (spec 010) — visible feedback while a request is in flight.
   Generic (used by the contact form + waitlist forms); lives in styles.css since
   it is the only stylesheet loaded by both index.html and contact.html. */
@keyframes btn-spin { to { transform: rotate(360deg); } }
.btn.is-loading { opacity: .9; cursor: progress; }
.btn__spinner {
  display: inline-block; width: 18px; height: 18px; vertical-align: -4px; margin-right: 8px;
  border: 2px solid color-mix(in oklab, currentColor 35%, transparent);
  border-top-color: currentColor; border-radius: 50%;
  animation: btn-spin .7s linear infinite;
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border-strong);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn--lg { min-height: 56px; padding: 17px 30px; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* ============================================================
   Logo (inline mark + text wordmark)
   ============================================================ */
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo__mark { width: 34px; height: 34px; flex: 0 0 auto; }
.logo__mark .mk-wave   { fill: var(--mk-wave); }
.logo__mark .mk-coral  { fill: var(--mk-coral); }
.logo__mark .mk-forest { fill: var(--mk-forest); }
.logo__word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -.035em;
  color: var(--text);
  line-height: 1;
}
.logo__word b { color: var(--accent); font-weight: 800; }

/* ============================================================
   Navigation
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--border); }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}
.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  color: var(--text-muted);
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav__link:hover { color: var(--text); background: var(--surface); }
.nav__login {
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  color: var(--text-muted); padding: 9px 14px; border-radius: var(--radius-pill);
  transition: color .2s var(--ease), background .2s var(--ease);
  white-space: nowrap;
}
.nav__login:hover { color: var(--text); background: var(--surface); }
.nav__right { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); transform: rotate(12deg); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav__burger { display: none; }

/* ---------- Language switcher ---------- */
.lang { position: relative; }
.lang__btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 44px; padding: 0 12px; border-radius: var(--radius-pill);
  background: transparent; border: 1.5px solid var(--border); color: var(--text-muted);
  font-family: var(--font-display); font-weight: 600; font-size: .9rem;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.lang__btn:hover { color: var(--accent); border-color: var(--accent); }
.lang__btn svg.globe { width: 18px; height: 18px; }
.lang__btn svg.chev { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.lang.is-open .lang__btn svg.chev { transform: rotate(180deg); }
.lang__menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: 0 24px 48px -20px rgba(0,0,0,.55); padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  z-index: 70;
}
.lang.is-open .lang__menu { opacity: 1; visibility: visible; transform: none; }
.lang__opt {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border-radius: var(--radius-sm); border: none; background: transparent;
  font-family: var(--font-text); font-size: .95rem; color: var(--text); text-align: left;
  transition: background .18s var(--ease);
}
.lang__opt:hover { background: var(--surface-2); }
.lang__opt[aria-current="true"] { color: var(--accent); font-weight: 600; }
.lang__opt .flag { font-size: .78rem; font-weight: 700; font-family: var(--font-display); width: 26px; color: var(--text-subtle); letter-spacing: .03em; }
.lang__opt[aria-current="true"] .flag { color: var(--accent); }
.lang__opt .tick { width: 16px; height: 16px; margin-left: auto; color: var(--accent); opacity: 0; }
.lang__opt[aria-current="true"] .tick { opacity: 1; }
.lang__opt--soon { color: var(--text-subtle); cursor: default; }
.lang__opt--soon:hover { background: transparent; }
.lang__opt .soon { margin-left: auto; font-family: var(--font-display); font-weight: 700; font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-subtle); background: var(--surface-2); padding: 3px 8px; border-radius: var(--radius-pill); }

/* mobile nav */
.nav__mobile {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(86vw, 360px);
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform .4s var(--ease-out);
  z-index: 80;
  padding: 90px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav__mobile.is-open { transform: translateX(0); }
.nav__mobile a { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; padding: 14px 6px; border-bottom: 1px solid var(--hairline); color: var(--text); }
.nav__mobile .btn { margin-top: 18px; }
.nav__mobile-lang { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--hairline); }
.nav__mobile-lang-label { font-family: var(--font-display); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-subtle); font-weight: 700; }
.nav__mobile-lang-opts { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.nav__mlang { display: flex; align-items: center; gap: 8px; background: transparent; border: none; text-align: left; font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--text); padding: 12px 4px; border-radius: var(--radius-sm); }
.nav__mlang.is-active { color: var(--accent); }
.nav__mlang:disabled { color: var(--text-subtle); }
.nav__mlang span { margin-left: auto; font-size: .64rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; color: var(--text-subtle); background: var(--surface); padding: 3px 8px; border-radius: var(--radius-pill); }
.scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease); z-index: 70;
  backdrop-filter: blur(2px);
}
.scrim.is-open { opacity: 1; visibility: visible; }

/* ============================================================
   Announcement bar
   ============================================================ */
.announce {
  background: var(--bg-2);
  border-bottom: 1px solid var(--hairline);
  color: var(--text-muted);
  font-size: .9rem;
  text-align: center;
  padding: 9px 16px;
}
.announce a { color: var(--accent); font-weight: 600; }
.announce a:hover { text-decoration: underline; }

/* ============================================================
   Waitlist form
   ============================================================ */
.waitlist { width: 100%; max-width: 480px; }
.waitlist__row {
  display: flex;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 6px 6px 8px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.waitlist__row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 18%, transparent); }
.waitlist__input {
  flex: 1; min-width: 0;
  border: none; background: transparent; outline: none;
  font-family: var(--font-text); font-size: 1rem; color: var(--text);
  padding: 10px 14px;
}
.waitlist__input::placeholder { color: var(--text-subtle); }
.waitlist--center { margin-inline: auto; }
.waitlist__micro { font-size: .85rem; color: var(--text-subtle); margin-top: 12px; line-height: 1.5; }
/* Turnstile widget. `data-appearance="interaction-only"` keeps it INVISIBLE for
   legit visitors — it only renders a challenge when the visitor looks suspicious
   (the common best practice). When it does show, keep it small + left-aligned,
   not a full-width bar. Collapsed to zero height while empty so there's no gap. */
.waitlist__turnstile { display: flex; justify-content: flex-start; margin: 10px 0 0; min-height: 0; max-width: 300px; }
.waitlist__turnstile:empty { display: none; margin: 0; }
.waitlist__success, .waitlist__error { display: none; align-items: center; gap: 10px; font-size: .95rem; padding: 4px 2px; }
.waitlist__success { color: var(--secondary); font-weight: 600; }
.waitlist__error { color: var(--brand-clay); font-weight: 600; }
[data-theme="dark"] .waitlist__error { color: #F0A07F; }
.waitlist.is-success .waitlist__row { display: none; }
.waitlist.is-success .waitlist__success { display: flex; }
.waitlist.is-error .waitlist__error { display: flex; }
.waitlist__success svg, .waitlist__error svg { width: 20px; height: 20px; flex: 0 0 auto; }

/* ============================================================
   Pills / badges / chips
   ============================================================ */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-weight: 600; font-size: .82rem;
  letter-spacing: .01em;
  padding: 7px 13px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
  white-space: nowrap;
}
.chip--accent { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 40%, transparent); background: color-mix(in oklab, var(--accent) 10%, transparent); }
.chip--teal { color: var(--secondary); border-color: color-mix(in oklab, var(--secondary) 40%, transparent); background: color-mix(in oklab, var(--secondary) 10%, transparent); }

.badge-value {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: .98rem;
  color: var(--text);
}
.badge-value .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }

/* store badges (inactive) */
.store-badge {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 10px 18px; border-radius: var(--radius-md);
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text-subtle); cursor: default; opacity: .85;
}
.store-badge svg { width: 22px; height: 22px; opacity: .7; flex: 0 0 auto; }
.store-badge > span { display: flex; flex-direction: column; line-height: 1.2; }
.store-badge .sb-top { font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; opacity: .8; white-space: nowrap; }
.store-badge .sb-name { font-family: var(--font-display); font-weight: 700; font-size: .98rem; color: var(--text-muted); white-space: nowrap; }

/* ============================================================
   Cards & surfaces
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: transform .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}
.card__icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  display: grid; place-items: center; margin-bottom: 16px;
  background: color-mix(in oklab, var(--accent) 14%, transparent);
  color: var(--accent);
}
.card__icon svg { width: 22px; height: 22px; }
.card__title { font-size: 1.08rem; font-weight: 700; font-family: var(--font-display); letter-spacing: -.02em; margin-bottom: 6px; }
.card__line { font-size: .95rem; color: var(--text-muted); line-height: 1.5; }

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
/* hero is above the fold — render instantly, never fade-in (no empty flash) */
.hero .reveal { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .07s; }
.reveal[data-d="2"] { transition-delay: .14s; }
.reveal[data-d="3"] { transition-delay: .21s; }
.reveal[data-d="4"] { transition-delay: .28s; }

/* ============================================================
   Footer
   ============================================================ */
.footer { background: var(--bg-2); border-top: 1px solid var(--border); padding-block: clamp(56px, 7vw, 88px) 40px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.footer__tag { color: var(--text-muted); font-size: .95rem; margin-top: 16px; max-width: 280px; line-height: 1.55; }
.footer__col h4 { font-family: var(--font-display); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-subtle); margin-bottom: 16px; font-weight: 700; }
.footer__col a { display: block; color: var(--text-muted); font-size: .95rem; padding: 6px 0; transition: color .2s var(--ease); }
.footer__col a:hover { color: var(--accent); }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: clamp(48px, 6vw, 72px); padding-top: 28px; border-top: 1px solid var(--border); color: var(--text-subtle); font-size: .88rem; }
.footer__social { display: flex; gap: 10px; }
.footer__social a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius-pill); border: 1px solid var(--border); color: var(--text-muted); transition: color .2s var(--ease), border-color .2s var(--ease); }
.footer__social a:hover { color: var(--accent); border-color: var(--accent); }
.footer__social svg { width: 18px; height: 18px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .nav__links, .nav__right .btn--primary, .nav__right .lang { display: none; }
  .nav__burger { display: grid; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px 28px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .footer__grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .waitlist__row { flex-wrap: wrap; }
}
