/* SpeakDo — marketing site
   Dark, zinc-based, single accent: the app's own Pro gradient (#8033FF → #1A99FF).
   System type stack on purpose: the product is iOS-native, the site renders in
   Apple's own face on Apple devices, and no font CDN means no third-party request
   — consistent with the app's privacy story. */

:root {
  --bg: #0e0f15;
  /* Alternate section tone — subtly lighter with a faint cool tint, so adjacent
     sections read as distinct bands without the page feeling multi-colored. */
  --bg-alt: #15161f;
  --bg-raised: #14151d;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #ececf1;
  --muted: #a2a3b3;
  --faint: #787989;
  --accent-a: #8033ff;
  --accent-b: #1a99ff;
  --accent-grad: linear-gradient(100deg, var(--accent-a), var(--accent-b));
  /* Deeper gradient for the filled Pro card only — both stops stay dark enough
     that white body text clears WCAG AA; the vibrant --accent-grad is reserved
     for large/bold surfaces (buttons, chips) where 3:1 is sufficient. */
  --accent-grad-deep: linear-gradient(125deg, #6a2cd4 0%, #2b6ecb 100%);
  --radius: 16px;
  --container: 1080px;
  --shadow-phone: 0 30px 60px -25px rgba(10, 8, 30, 0.8);
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }
/* height:auto is load-bearing — without it, max-width-constrained images
   stretch vertically in Safari/Firefox (Chromium masks it via attribute
   aspect-ratio mapping). */
img { max-width: 100%; height: auto; display: block; }

::selection { background: rgba(128, 51, 255, 0.35); }

/* ── Nav ─────────────────────────────────────────── */

nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(14, 15, 21, 0.75);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--container); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: 0.92rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta {
  font-size: 0.85rem; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border-strong); border-radius: 99px;
  padding: 7px 14px; white-space: nowrap;
}

/* ── Type scale ──────────────────────────────────── */

h1 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  line-height: 1.06; letter-spacing: -0.035em; font-weight: 700;
}
h2 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.15; letter-spacing: -0.025em; font-weight: 700;
}
.lede { color: var(--muted); font-size: 1.08rem; max-width: 58ch; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 14px;
}

/* ── Hero ────────────────────────────────────────── */

.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 48px; align-items: center;
  padding: 84px 24px 72px;
  max-width: var(--container); margin: 0 auto;
  /* (Gradient removed because ambient-waves now handles the full-screen background glow) */
}
.hero p.lede { margin: 20px 0 28px; }
.hero-ctas { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.btn-store {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent-grad); color: #fff;
  font-weight: 600; font-size: 0.95rem;
  border-radius: 12px; padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.15s ease;
}
.btn-store:active { transform: scale(0.98); }
.link-more { color: var(--muted); font-size: 0.92rem; font-weight: 500; border-bottom: 1px solid var(--border-strong); padding-bottom: 1px; }
.link-more:hover { color: var(--text); }

.fact-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 34px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 500; color: var(--muted);
  border: 1px solid var(--border); border-radius: 99px; padding: 7px 13px;
}
.chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-grad); flex-shrink: 0;
}

/* ── Phone frame ─────────────────────────────────── */

.phone {
  width: min(320px, 78vw);
  border-radius: 52px;
  background: #05050a;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-phone), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  padding: 11px;
  margin: 0 auto;
}
/* All screenshots are 1206×2622; locking the ratio (+ cover) guarantees the
   screen fills the frame at the correct shape in every browser, never stretched. */
.phone img { width: 100%; aspect-ratio: 1206 / 2622; object-fit: cover; border-radius: 42px; }
.phone.tilt { transform: rotate(2.5deg); }
.phone-caption {
  text-align: center; color: var(--faint); font-size: 0.8rem; margin-top: 16px;
}

/* ── Sections ────────────────────────────────────── */

.section { padding: 72px 0; border-top: 1px solid var(--border); }
/* Alternate section backgrounds for rhythm. Counting only <section> children of
   <main> (the hero is a <header>, skipped): odd = how / edit / ask-ai / pricing
   sit on the raised tone, evens stay on the base tone. */
main > section:nth-of-type(odd) { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head p { color: var(--muted); margin-top: 12px; }

.grid-2 {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 56px; align-items: center;
}
.grid-2.flip .text-col { order: 2; }
.grid-2.flip .img-col { order: 1; }

.feature-points { list-style: none; margin-top: 22px; display: grid; gap: 14px; }
.feature-points li { display: flex; gap: 12px; color: var(--muted); font-size: 0.97rem; }
.feature-points li strong { color: var(--text); font-weight: 600; }
.feature-points .tick {
  flex-shrink: 0; width: 20px; height: 20px; margin-top: 3px;
  border-radius: 6px; background: rgba(128, 51, 255, 0.14);
  display: grid; place-items: center;
}
.feature-points .tick svg { width: 11px; height: 11px; }

/* ── Steps (how it works) ────────────────────────── */

.steps { counter-reset: step; display: grid; margin-top: 8px; max-width: 760px; }
.step {
  counter-increment: step;
  display: grid; grid-template-columns: 64px 1fr; gap: 20px;
  padding: 26px 0; border-top: 1px solid var(--border);
}
.step:first-child { border-top: none; }
.step::before {
  content: "0" counter(step);
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  font-size: 1.5rem; font-weight: 600; line-height: 1.2;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.step h3 { font-size: 1.08rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 0.97rem; max-width: 56ch; }

/* ── Ask AI exchange (illustrative) ──────────────── */

.chat-demo {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-raised); padding: 26px; max-width: 460px;
  display: grid; gap: 14px;
}
.bubble { max-width: 85%; padding: 11px 15px; border-radius: 18px; font-size: 0.93rem; line-height: 1.45; }
.bubble.user { justify-self: end; background: var(--accent-grad); color: #fff; border-bottom-right-radius: 6px; }
.bubble.ai { justify-self: start; background: rgba(255, 255, 255, 0.07); color: var(--text); border-bottom-left-radius: 6px; }
.chat-note { color: var(--faint); font-size: 0.76rem; }

/* ── Privacy section ─────────────────────────────── */

/* Background now comes from the section alternation above. */
.promise-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0 48px; margin-top: 8px;
}
.promise {
  display: flex; gap: 14px; padding: 20px 0;
  border-top: 1px solid var(--border);
}
.promise:nth-child(-n+2) { border-top: none; }
.promise .tick {
  flex-shrink: 0; width: 22px; height: 22px; margin-top: 2px;
  border-radius: 7px; background: rgba(26, 153, 255, 0.14);
  display: grid; place-items: center;
}
.promise .tick svg { width: 12px; height: 12px; }
.promise h3 { font-size: 0.99rem; font-weight: 600; margin-bottom: 3px; }
.promise p { color: var(--muted); font-size: 0.92rem; }

/* ── Pricing ─────────────────────────────────────── */

.pricing-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  align-items: stretch; max-width: 860px;
}
.plan {
  border: 1px solid var(--border); border-radius: 20px;
  padding: 32px; background: var(--bg-raised);
  display: flex; flex-direction: column;
}
/* Filled featured card. Every text layer is white at a set opacity so it clears
   contrast against the (deliberately deep) gradient — the muted grays inherited
   from .plan were the unreadable ones in the report. */
.plan.pro {
  background: var(--accent-grad-deep);
  border-color: transparent;
  box-shadow: 0 22px 50px -24px rgba(90, 45, 210, 0.7);
}
.plan.pro h3,
.plan.pro .price { color: #fff; }
.plan.pro .price .per { color: rgba(255, 255, 255, 0.85); }
.plan.pro .tagline { color: rgba(255, 255, 255, 0.9); }
.plan.pro ul { color: rgba(255, 255, 255, 0.92); }
.plan.pro ul li strong { color: #fff; }
.plan.pro ul li::before { background: #fff; opacity: 0.9; }
.plan h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
.plan-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.plan-header h3 { margin: 0; }
.trial-badge { 
  font-size: 0.72rem; font-weight: 700; 
  background: rgba(255, 255, 255, 0.22); color: #fff; 
  padding: 4px 10px; border-radius: 20px; 
  text-transform: uppercase; letter-spacing: 0.05em;
}
.price { font-size: 2.1rem; font-weight: 700; letter-spacing: -0.03em; margin: 10px 0 2px; }
.price .per { font-size: 0.9rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .tagline { color: var(--muted); font-size: 0.9rem; margin-bottom: 22px; }
.plan ul { list-style: none; display: grid; gap: 11px; font-size: 0.94rem; color: var(--muted); }
.plan ul li { display: flex; gap: 10px; align-items: baseline; }
.plan ul li::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-grad); flex-shrink: 0; position: relative; top: -2px;
}
.plan ul li strong { color: var(--text); font-weight: 600; }
.pricing-note { color: var(--faint); font-size: 0.82rem; margin-top: 20px; }

/* ── FAQ ─────────────────────────────────────────── */

.faq { max-width: 720px; }
.faq details { border-top: 1px solid var(--border); }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 20px 36px 20px 0; position: relative;
  font-weight: 600; font-size: 1rem; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%);
  color: var(--faint); font-size: 1.3rem; font-weight: 400;
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); font-size: 0.95rem; padding: 0 0 22px; max-width: 62ch; }

/* ── Footer ──────────────────────────────────────── */

footer { border-top: 1px solid var(--border); padding: 44px 0 56px; margin-top: 72px; }
.footer-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: flex-start; gap: 40px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.footer-brand img { width: 32px; height: 32px; border-radius: 8px; }
.footer-tag { color: var(--faint); font-size: 0.85rem; margin-top: 8px; }
.footer-links { margin-left: auto; display: flex; gap: 26px; }
.footer-links a { color: var(--muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }

/* ── Inner pages (privacy / support) ─────────────── */

.page { max-width: 720px; margin: 0 auto; padding: 64px 24px 40px; }
.page h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); margin-bottom: 8px; }
.page .updated { color: var(--faint); font-size: 0.85rem; margin-bottom: 40px; }
.page h2 { font-size: 1.25rem; margin: 36px 0 10px; }
.page p, .page li { color: var(--muted); font-size: 0.97rem; }
.page ul { padding-left: 22px; margin: 10px 0; }
.page li { margin: 6px 0; }
.page a { color: var(--text); border-bottom: 1px solid var(--border-strong); }
.page strong { color: var(--text); }

/* ── Reveal on scroll (Dynamic Framer Style) ─────── */
/* Scoped under .js (set by an inline script in <head>) so content is fully
   visible without JavaScript — the animation is an enhancement, never a gate. */

.js .reveal { 
  opacity: 0; 
  transform: translateY(40px) scale(0.96); 
  filter: blur(10px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.8s cubic-bezier(0.16, 1, 0.3, 1); 
  will-change: opacity, transform, filter;
}

.js .reveal.in { 
  opacity: 1; 
  transform: none; 
  filter: blur(0);
}

/* Staggered animations for grids */
.js .steps .step.reveal.in:nth-child(1) { transition-delay: 0.0s; }
.js .steps .step.reveal.in:nth-child(2) { transition-delay: 0.1s; }
.js .steps .step.reveal.in:nth-child(3) { transition-delay: 0.2s; }

.js .promise-grid .promise.reveal.in:nth-child(1) { transition-delay: 0.0s; }
.js .promise-grid .promise.reveal.in:nth-child(2) { transition-delay: 0.1s; }
.js .promise-grid .promise.reveal.in:nth-child(3) { transition-delay: 0.2s; }
.js .promise-grid .promise.reveal.in:nth-child(4) { transition-delay: 0.3s; }
.js .promise-grid .promise.reveal.in:nth-child(5) { transition-delay: 0.4s; }
.js .promise-grid .promise.reveal.in:nth-child(6) { transition-delay: 0.5s; }

.js .pricing-grid .plan.reveal.in:nth-child(1) { transition-delay: 0.0s; }
.js .pricing-grid .plan.reveal.in:nth-child(2) { transition-delay: 0.15s; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; filter: none; transition: none; transition-delay: 0s; }
}

/* ── Ambient Waves Background ────────────────────── */

.ambient-waves {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.ambient-waves::before, .ambient-waves::after {
  content: "";
  position: absolute;
  width: 80vw;
  height: 80vh;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  animation: wavePulse 15s ease-in-out infinite alternate;
}
.ambient-waves::before {
  top: -20%; left: -10%;
  background: radial-gradient(circle, #ff2055, transparent 60%);
  animation-delay: -5s;
}
.ambient-waves::after {
  bottom: -20%; right: -10%;
  background: radial-gradient(circle, #1abc9c, #8033ff 60%, transparent 80%);
}

@keyframes wavePulse {
  0% { transform: scale(1) translate(0, 0); opacity: 0.15; }
  50% { transform: scale(1.1) translate(5%, 5%); opacity: 0.25; }
  100% { transform: scale(0.9) translate(-5%, 5%); opacity: 0.15; }
}

/* ── Responsive ──────────────────────────────────── */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; gap: 44px; }
  .grid-2 { grid-template-columns: 1fr; gap: 36px; }
  .grid-2.flip .text-col { order: 1; }
  .grid-2.flip .img-col { order: 2; }
  .promise-grid { grid-template-columns: 1fr; }
  .promise:nth-child(2) { border-top: 1px solid var(--border); }
  .pricing-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .phone.tilt { transform: none; }
  .step { grid-template-columns: 48px 1fr; }
}

/* Back-link to the AppsDo parent site (added when both apps moved under one domain). */
.parent-link{
  margin-left:10px; padding:4px 10px; border-radius:999px;
  border:1px solid var(--border-strong); color:var(--muted);
  font-size:12.5px; font-weight:600; text-decoration:none; white-space:nowrap;
}
.parent-link:hover{ color:var(--text); border-color:var(--muted); }
