/* ==========================================================================
   Zansay marketing site
   Design tokens mirror the app's Theme.swift (v5 design system):
   bone/cream in light, neutral near-black in dark, monochrome chrome,
   teal as the one saturated colour.
   ========================================================================== */

:root {
  /* Surfaces: warm bone (light) */
  --bg:        #F5F3EE;
  --card:      #FDFCFA;
  --field:     #FFFFFF;
  --ink:       #1C1A17;   /* text1, 16.9:1 on card */
  --ink-2:     #4A463F;   /* text2,  9.2:1 */
  --ink-3:     #625E56;   /* text3 tuned to ≥5.6:1 on bg */
  --border:    rgba(28, 26, 23, 0.08);
  --hairline:  rgba(28, 26, 23, 0.10);
  --chrome:    #1C1A17;   /* primary buttons: near-black */
  --on-chrome: #FDFCFA;
  --teal:      #40C8E0;   /* fills, dots; never body type */
  --teal-ink:  #0D7590;   /* contrast-passing teal for type: 4.78:1 on bg, 5.17:1 on card */
  --amber-ink: #8A5200;
  --shadow-card: 0 1px 2px rgba(28, 26, 23, 0.05), 0 12px 40px rgba(28, 26, 23, 0.07);
  --shadow-shot: 0 2px 6px rgba(28, 26, 23, 0.12), 0 24px 70px rgba(28, 26, 23, 0.22);
  --nav-bg: rgba(245, 243, 238, 0.86);

  --serif: "New York", ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --max: 1120px;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Neutral near-black, never #000 (Theme.swift rule 1) */
    --bg:        #0A0A0B;
    --card:      #141416;
    --field:     #1C1C1F;
    --ink:       #F5F5F7;
    --ink-2:     #C7C7CC;
    --ink-3:     #98989E;
    --border:    rgba(255, 255, 255, 0.09);
    --hairline:  rgba(255, 255, 255, 0.12);
    --chrome:    #E8E8EA;
    --on-chrome: #0A0A0B;
    --teal-ink:  #5FD3E8;
    --amber-ink: #E0A33A;
    --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-shot: 0 0 0 1px rgba(255, 255, 255, 0.09), 0 30px 80px rgba(0, 0, 0, 0.6);
    --nav-bg: rgba(10, 10, 11, 0.82);
  }
}

/* --------------------------------------------------------------------- base */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--teal); color: #0A0A0B; }

:focus-visible {
  outline: 2px solid var(--teal-ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 10px 16px;
  background: var(--chrome);
  color: var(--on-chrome);
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

/* ------------------------------------------------------------------ type */

.eyebrow {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-ink);
  margin-bottom: 14px;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }

h1 {
  font-size: clamp(2.4rem, 6vw, 4.1rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  line-height: 1.15;
  text-wrap: balance;
}

h3 { font-size: 1.28rem; line-height: 1.3; }

.lede {
  font-size: clamp(1.05rem, 1.8vw, 1.22rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 620px;
}

.section {
  padding: 104px 0;
}
.section + .section { padding-top: 0; }

.section-head {
  max-width: 660px;
  margin-bottom: 56px;
}
.section-head .lede { margin-top: 16px; }

/* ------------------------------------------------------------------- nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--ink);
  margin-right: auto;
}
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }

.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
}
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--ink);
  font: inherit;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle svg { display: block; }

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  padding: 13px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.btn:hover { text-decoration: none; opacity: 0.92; }
.btn:active { transform: scale(0.985); }

.btn-primary { background: var(--chrome); color: var(--on-chrome); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline);
}
.btn-secondary:hover { background: var(--card); }
.btn-lg { font-size: 1.02rem; padding: 15px 26px; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:active { transform: none; }
}

/* ------------------------------------------------------------------ hero */

.hero {
  padding: 72px 0 84px;
  text-align: center;
}

.alpha-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 22px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.alpha-badge .alpha-name {
  padding: 5px 12px;
  color: var(--ink-2);
}
.alpha-badge .alpha-free {
  padding: 5px 12px;
  background: var(--chrome);
  color: var(--on-chrome);
}

.hero .lede {
  margin: 22px auto 0;
  max-width: 620px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 34px;
}

.hero-meta {
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--ink-3);
}
.hero-meta strong { color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.hero-meta .dot { margin: 0 8px; opacity: 0.6; }

/* Live dictation demo strip */
.demo {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.demo-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--ink-3);
}
.demo-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal);
  flex: none;
}
@media (prefers-reduced-motion: no-preference) {
  .demo-dot.live { animation: pulse 1.6s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: 0.35; } }
}
.demo-body {
  padding: 20px 22px 22px;
  font-size: 1.02rem;
  line-height: 1.65;
  min-height: 118px;
}
.demo-raw { color: var(--ink-3); }
.demo-clean { color: var(--ink); }
.demo-caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--teal-ink);
  vertical-align: text-bottom;
  margin-left: 1px;
}
@media (prefers-reduced-motion: no-preference) {
  .demo-caret { animation: blink 1.1s step-end infinite; }
  @keyframes blink { 50% { opacity: 0; } }
}
.demo-note {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--ink-3);
}
.demo-note em { font-style: normal; }

/* Compose-window variant of the demo (the #how demonstration) */
.demo-window {
  max-width: 720px;
  margin: 0 auto;
}
.demo-traffic {
  display: inline-flex;
  gap: 6px;
  margin-right: 4px;
}
.demo-traffic i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--hairline);
}
.demo-app { font-weight: 600; color: var(--ink-2); }
.demo-hud {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 4px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--field);
  font-size: 0.78rem;
  color: var(--ink-2);
  white-space: nowrap;
}
.demo-fields {
  border-bottom: 1px solid var(--border);
  padding: 4px 22px;
  font-size: 0.88rem;
  color: var(--ink-2);
}
.demo-field { padding: 7px 0; }
.demo-field + .demo-field { border-top: 1px solid var(--border); }
.demo-field span { color: var(--ink-3); margin-right: 6px; }
.demo-window .demo-body { min-height: 132px; }
.demo-note[hidden] { display: none; }

/* Before/after comparison card (Speak naturally feature) */
.demo-compare .demo-raw { font-size: 0.95rem; }
.demo-compare .demo-clean { font-size: 0.98rem; }
.demo-arrow {
  color: var(--ink-3);
  padding: 8px 0;
  font-size: 0.95rem;
}
kbd {
  font-family: var(--sans);
  font-size: 0.78em;
  font-weight: 600;
  padding: 2px 7px 3px;
  border-radius: 5px;
  border: 1px solid var(--hairline);
  border-bottom-width: 2px;
  background: var(--field);
  color: var(--ink-2);
}

/* Large product shot (product visual section) */
.hero-shot {
  margin: 0 auto;
  max-width: 980px;
  padding: 0 20px;
}
.shot {
  border-radius: 12px;
  box-shadow: var(--shadow-shot);
}
.hero-shot .shot { border-radius: 14px; }

/* -------------------------------------------------------------- features */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
  padding: 72px 0;
}
.feature + .feature { border-top: 1px solid var(--border); }
.feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.flip .feature-copy { order: 2; }
.feature.flip .feature-media { order: 1; }

.feature-copy h3 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 1.95rem);
  margin-bottom: 14px;
}
.feature-copy p { color: var(--ink-2); }
.feature-copy p + p { margin-top: 12px; }

.feature-points {
  list-style: none;
  margin-top: 18px;
}
.feature-points li {
  position: relative;
  padding-left: 22px;
  margin-top: 9px;
  font-size: 0.95rem;
  color: var(--ink-2);
}
.feature-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
}

.feature-foot {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--ink-3);
}

/* ------------------------------------------------------------- use cases */

.cases {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.case {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 28px 26px;
}
.case h3 { font-size: 1.12rem; margin-bottom: 10px; }
.case p { font-size: 0.94rem; color: var(--ink-2); }

/* ------------------------------------------------------------ how it works */

.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.steps-3 {
  grid-template-columns: repeat(3, 1fr);
  max-width: 920px;
  margin: 44px auto 0;
}
.step {
  counter-increment: step;
  padding: 26px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--teal-ink);
  margin-bottom: 14px;
}
.step h3 { font-size: 1.06rem; margin-bottom: 8px; }
.step p { font-size: 0.92rem; color: var(--ink-2); }

/* --------------------------------------------------------------- privacy */

.privacy-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

.privacy-list { list-style: none; }
.privacy-list li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  padding: 16px 0;
}
.privacy-list li + li { border-top: 1px solid var(--border); }
.privacy-list svg { margin-top: 3px; color: var(--teal-ink); }
.privacy-list b { display: block; font-weight: 600; }
.privacy-list span { font-size: 0.92rem; color: var(--ink-2); }

/* -------------------------------------------------------- CTA strip */

.cta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 48px;
  font-size: 0.88rem;
  color: var(--ink-3);
}

/* ------------------------------------------------------- technical trust */

.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.tech-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px 24px 26px;
}
.tech-item dt {
  font-weight: 600;
  margin-bottom: 8px;
}
.tech-item dd {
  font-size: 0.93rem;
  color: var(--ink-2);
}
.tech-item code { font-family: var(--mono); font-size: 0.85em; }

/* ------------------------------------------------------------------ free */

.section.free {
  padding: 92px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.free h2 { font-size: clamp(2rem, 4.4vw, 3rem); }
.free .free-lede {
  margin: 18px auto 0;
  max-width: 560px;
}
.free .free-why {
  margin: 26px auto 0;
  max-width: 480px;
  font-size: 0.92rem;
  color: var(--ink-3);
}

/* -------------------------------------------------------------- download */

.download { text-align: center; }
.download-panel { max-width: 720px; margin: 0 auto; }
.download-panel .lede { margin: 14px auto 0; }
.download-panel .hero-cta { margin-top: 28px; }

.install-steps {
  list-style: none;
  counter-reset: install;
  max-width: 560px;
  margin: 40px auto 0;
  text-align: left;
}
.install-steps li {
  counter-increment: install;
  position: relative;
  padding: 14px 0 14px 44px;
  font-size: 0.93rem;
  color: var(--ink-2);
}
.install-steps li + li { border-top: 1px solid var(--border); }
.install-steps li::before {
  content: counter(install);
  position: absolute;
  left: 0;
  top: 14px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 0.85rem;
  color: var(--teal-ink);
}
.install-steps b { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------- FAQ */

/* The FAQ section head has no eyebrow, and the section follows the bordered
   .free band, so it needs its own top padding back. */
#faq.section { padding-top: 96px; }

.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  border-top: 1px solid var(--border);
}
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 40px 20px 2px;
  font-weight: 600;
  font-size: 1.02rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ink-3);
}
.faq details[open] summary::after { content: "−"; }
.faq .faq-a {
  padding: 0 2px 22px;
  color: var(--ink-2);
  font-size: 0.96rem;
  max-width: 660px;
}
.faq .faq-a p + p { margin-top: 10px; }
.faq .faq-a code { font-family: var(--mono); font-size: 0.85em; }

/* ---------------------------------------------------------------- footer */

.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 56px;
  font-size: 0.88rem;
  color: var(--ink-3);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
  font-weight: 600;
}
.footer-brand img { width: 22px; height: 22px; border-radius: 5px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
}
.footer-links a { color: var(--ink-3); }
.footer-links a:hover { color: var(--ink); }
.footer-fine { margin-top: 26px; }
.footer-fine p + p { margin-top: 4px; }

/* ---------------------------------------------------------- legal pages */

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 28px 96px;
}
.legal h1 { font-size: 2.2rem; margin-bottom: 8px; }
.legal .updated { color: var(--ink-3); font-size: 0.88rem; margin-bottom: 40px; }
.legal h2 { font-size: 1.35rem; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--ink-2); font-size: 0.98rem; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 22px; margin-top: 10px; }
.legal li { margin-top: 6px; }
.legal .placeholder {
  border: 1px dashed var(--hairline);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--amber-ink);
  font-size: 0.92rem;
  margin: 16px 0;
}

/* ---------------------------------------------------------------- reveal */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }
  .reveal.in { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------ responsive */

/* The nav shows Download as the standalone CTA button on wide screens;
   the plain "Download" link only appears inside the mobile menu. */
.nav-links-download { display: none; }

@media (max-width: 960px) {
  .feature,
  .feature.flip {
    grid-template-columns: 1fr;
    padding: 56px 0;
  }
  .feature.flip .feature-copy { order: 1; }
  .feature.flip .feature-media { order: 2; }
  .privacy-grid { grid-template-columns: 1fr; }
  .cases { grid-template-columns: repeat(2, 1fr); }
  .steps, .steps-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .section { padding: 72px 0; }
  .hero { padding: 56px 0 64px; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 28px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid var(--border); }
  .nav-links a { display: block; padding: 14px 0; font-size: 1rem; }
  .nav-links-download { display: block; }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  .cases { grid-template-columns: 1fr; }
  .steps, .steps-3 { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: 1fr; }
  .hero-shot { padding: 0 4px; }
  .demo-fields { padding: 4px 16px; }
  .demo-hud { font-size: 0.72rem; padding: 3px 9px; }
  .demo-app { display: none; }
  .section.free { padding: 72px 0; }
}

/* Break the hero headline into its two sentences on wide viewports;
   on narrow screens let it flow. */
@media (min-width: 561px) {
  .hero h1 .h1-break::before { content: "\A"; white-space: pre; }
}
