/* ─── Reset & Base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  /* Synced with measured nav height in main.js (--nav-offset) */
  scroll-padding-top: var(--nav-offset, calc(72px + env(safe-area-inset-top, 0px)));
  background: #F8FAFC;
  min-height: 100%;
}
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #F8FAFC;
  color: #0F172A;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

/* ─── Design Tokens ────────────────────────────────────────────────────── */
:root {
  --primary: #9CA5FF;
  --primary-dark: #7B85FF;
  --authority-blue: #2563EB;
  --navy: #252630;
  --slate: #0F172A;
  --text-secondary: #6B6F8A;
  --text-muted: #8A8B99;
  --text-muted-dark: hsl(224,20%,45%);
  --mint: #7DD4A8;
  --peach: #FFB5A0;
  --yellow: #FDEEA3;
  --lavender: #D5AAFF;
  --card-mint: #A8DDB5;
  --card-yellow: #F5E6A3;
  --card-coral: #F4A89A;
  --card-lavender: #B8BFFF;
  --surface: #FFFFFF;
  --bg: #F8FAFC;
  --accent-surface: #EEF2FF;
  --accent-border: #C7D2FE;
  --arrow-chip: hsl(224,20%,92%);
  --border: rgba(0,0,0,0.06);
  --radius-card: 32px;
  --radius-bento: 28px;
  --radius-small: 16px;
  --radius-chip: 24px;
  --whatsapp: #25D366;
  --alert-orange: #F97316;
  --success-green: #10B981;
  --danger: #FF6B6B;
  /* Fits 278px mockup inside typical container (24px + 24px padding) + safe horizontal insets */
  --phone-fit-scale: min(1, calc((100vw - 48px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)) / 278px));
  /* Scroll demo: cap scale; reserve nav + hint + inner padding + shadow so frame isn’t clipped */
  --scroll-demo-vpad: 72px;
  --scroll-phone-scale: min(
    1.2,
    calc((100vw - 48px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)) / 278px),
    calc((100vh - var(--nav-offset, 72px) - var(--scroll-demo-vpad)) / 600px)
  );
  /* Fallback until main.js measures real nav; must leave room under sticky nav for phone demo */
  --nav-offset: calc(72px + env(safe-area-inset-top, 0px));
}

/* ─── Utility ──────────────────────────────────────────────────────────── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 max(24px, env(safe-area-inset-right, 0px)) 0 max(24px, env(safe-area-inset-left, 0px));
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-surface); border: 1px solid var(--accent-border);
  border-radius: 999px; padding: 5px 14px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--authority-blue);
}

/* ─── Bento grid cards ─────────────────────────────────────────────────── */
.bento-card {
  background: var(--surface);
  border-radius: var(--radius-bento);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.bento-card--accent {
  background: var(--accent-surface);
  border-color: var(--accent-border);
  box-shadow: 0 2px 12px rgba(37,99,235,0.06);
  margin-top: 20px;
}
.bento-card--inset { margin-top: -20px; }
.bento-card__icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-surface); border: 1px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  font-size: 0; /* reset emoji size */
}
.bento-card__icon ion-icon { font-size: 20px; color: var(--authority-blue); }
.bento-card__title { font-size: 15px; font-weight: 800; color: var(--slate); margin-bottom: 6px; }
.bento-card__desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* ─── App content positioning helpers ─────────────────────────────────── */
.app-abs-layer {
  position: absolute; top: 52px; left: 0; right: 0; bottom: 0;
  padding: 8px 14px 16px;
}
.sugg-section-header {
  display: flex; align-items: center; gap: 5px;
  margin: 10px 2px 6px;
}
.sugg-section-icon { color: var(--authority-blue); font-size: 13px; line-height: 1; }
.sugg-section-label {
  font-size: 9px; font-weight: 800; letter-spacing: 1.5px; color: var(--slate);
}

/* ─── NAV ──────────────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248,250,252,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding-top: max(14px, env(safe-area-inset-top, 0px));
  padding-bottom: 14px;
  /* iOS: stabilize sticky + backdrop layer */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 max(24px, env(safe-area-inset-right, 0px)) 0 max(24px, env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.nav-logo {
  font-size: 17px;
  font-weight: 800;
  color: var(--slate);
  letter-spacing: -0.5px;
  min-width: 0;
}
.nav-logo span { color: var(--primary); }
.nav-cta {
  background: var(--slate); color: #fff;
  border: none; border-radius: var(--radius-chip);
  padding: 12px 22px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: background 0.25s, transform 0.15s, box-shadow 0.25s;
  font-family: inherit;
  flex-shrink: 0;
  margin-inline-end: 6px;
}
.nav-cta:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 20px rgba(123,133,255,0.35);
}

/* ─── HERO ─────────────────────────────────────────────────────────────── */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
  background: #F8FAFC;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 55% at 70% 50%, rgba(156,165,255,0.13) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(125,212,168,0.09) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 90% 10%, rgba(213,170,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: center;
}
.hero-eyebrow {
  font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  color: var(--authority-blue); margin-bottom: 20px;
}
.hero-headline {
  /* Bigger headline */
  font-size: clamp(46px, 6vw, 72px);
  font-weight: 800; line-height: 1.06;
  letter-spacing: -2px; color: var(--slate); margin-bottom: 24px;
}
.hero-headline em { font-style: normal; color: var(--primary-dark); }
.hero-sub {
  /* Bigger subtitle */
  font-size: 19px; color: var(--text-secondary); line-height: 1.65;
  max-width: 480px; margin-bottom: 44px;
}
.hero-form {
  display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap;
}
.hero-form input {
  /* Longer email field */
  flex: 2; min-width: 260px;
  background: var(--surface);
  border: 2px solid rgba(15, 23, 42, 0.14);
  border-radius: var(--radius-chip); padding: 15px 22px;
  font-size: 15px; font-family: inherit; color: var(--slate);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.hero-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(156,165,255,0.18);
}
.hero-form input::placeholder { color: var(--text-muted); }

/* Primary button — smaller text, purple hover */
.btn-primary {
  background: var(--slate); color: #fff;
  border: none; border-radius: var(--radius-chip);
  padding: 15px 24px;
  min-height: 44px;
  font-size: 13px; font-weight: 700;
  cursor: pointer; white-space: nowrap; font-family: inherit;
  display: flex; align-items: center; gap: 8px;
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s, color 0.25s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  text-decoration: none;
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(123,133,255,0.40);
}
.btn-primary:disabled,
.btn-cta:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }
.btn-primary .arrow { font-size: 16px; transition: transform 0.2s; }
.btn-primary:hover:not(:disabled) .arrow { transform: translateX(3px); }

.hero-note { font-size: 12px; color: var(--text-muted); }

.hero-phone-wrap {
  display: flex; justify-content: center; align-items: center;
  position: relative;
}
.hero-blob {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.35;
  pointer-events: none;
}
.hero-blob-1 { width: 220px; height: 220px; background: var(--primary); top: -40px; right: -20px; }
.hero-blob-2 { width: 160px; height: 160px; background: var(--mint); bottom: -20px; left: 30px; }

/* ─── FORM STATUS ──────────────────────────────────────────────────────── */
.form-status {
  margin-top: 12px; font-size: 13px; font-weight: 600;
  min-height: 20px; display: flex; align-items: center; gap: 6px;
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.3s, transform 0.3s;
}
.form-status.visible { opacity: 1; transform: translateY(0); }
.form-status.success { color: var(--success-green); }
.form-status.error { color: var(--danger); }
.form-status.loading { color: var(--text-muted); }

/* ─── STATUS BAR (phone mockup) ────────────────────────────────────────── */
.status-bar {
  position: absolute; top: 0; left: 0; right: 0;
  height: 52px;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 18px 8px;
  font-size: 11px; font-weight: 700; color: var(--slate);
  z-index: 40;
}
.status-time { font-size: 12px; font-weight: 800; letter-spacing: -0.3px; }
.status-right { display: flex; align-items: center; gap: 6px; }

/* Signal bars (CSS only) */
.signal-bars {
  display: flex; align-items: flex-end; gap: 1.5px; height: 10px;
}
.signal-bars span {
  width: 2.5px; background: var(--slate); border-radius: 1px; display: block;
}
.signal-bars span:nth-child(1) { height: 4px; }
.signal-bars span:nth-child(2) { height: 7px; }
.signal-bars span:nth-child(3) { height: 10px; }

/* Wifi icon (CSS) */
.wifi-icon { display: flex; align-items: center; justify-content: center; }
.wifi-icon ion-icon { font-size: 12px; color: var(--slate); }

/* Battery (CSS) */
.battery-icon { display: flex; align-items: center; }
.battery-body {
  width: 15px; height: 8px;
  border: 1.5px solid var(--slate); border-radius: 2px;
  position: relative; overflow: hidden;
}
.battery-body::after {
  content: '';
  position: absolute; left: 1.5px; top: 1px; bottom: 1px; width: 65%;
  background: var(--slate); border-radius: 1px;
}
.battery-tip {
  width: 2px; height: 4px; background: var(--slate);
  border-radius: 0 1px 1px 0; margin-left: 1px;
}

/* ─── PAIN SECTION ─────────────────────────────────────────────────────── */
.pain {
  padding: 100px 0 80px;
  background: linear-gradient(180deg, #F8FAFC 0%, #F3F4FA 100%);
  content-visibility: auto;
  contain-intrinsic-size: 0 900px;
}
.section-eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  color: var(--authority-blue); margin-bottom: 10px;
}
.section-title {
  font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -1px;
  color: var(--slate); margin-bottom: 14px; line-height: 1.12;
}
.section-sub {
  font-size: 16px; color: var(--text-secondary); max-width: 520px; margin-bottom: 56px;
}
.quote-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.quote-card {
  background: var(--surface); border-radius: var(--radius-bento);
  padding: 28px; border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  position: relative; overflow: hidden;
}
.quote-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  border-radius: var(--radius-bento) var(--radius-bento) 0 0;
}
.quote-card.coral::before { background: var(--card-coral); }
.quote-card.yellow::before { background: var(--card-yellow); }
.quote-card.lavender::before { background: var(--card-lavender); }
.quote-card.mint::before { background: var(--card-mint); }
.quote-card.blue::before { background: var(--accent-border); }
.quote-card.peach::before { background: var(--peach); }
.quote-mark { font-size: 36px; color: var(--card-lavender); line-height: 1; margin-bottom: 10px; }
.quote-text { font-size: 14px; color: var(--text-secondary); line-height: 1.7; font-style: italic; margin-bottom: 16px; }
.quote-source { font-size: 12px; color: var(--text-muted); font-weight: 600; }

/* ─── INTRO ─────────────────────────────────────────────────────────────── */
.intro { padding: 100px 0; }
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.intro-label {
  font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  color: var(--primary); margin-bottom: 10px;
}
.intro-title {
  font-size: clamp(28px, 3.5vw, 42px); font-weight: 800; letter-spacing: -1px;
  color: var(--slate); line-height: 1.12; margin-bottom: 20px;
}
.intro-title em { font-style: normal; color: var(--authority-blue); }
.intro-desc { font-size: 16px; color: var(--text-secondary); line-height: 1.7; }
.intro-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.chip {
  background: var(--accent-surface); border: 1px solid var(--accent-border);
  border-radius: 999px; padding: 6px 16px;
  font-size: 13px; font-weight: 600; color: var(--authority-blue);
  display: inline-flex; align-items: center; gap: 6px;
}
.chip ion-icon { font-size: 14px; }
.intro-bento-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }

/* ─── PHONE FRAME ──────────────────────────────────────────────────────── */
.phone-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  width: 100%;
  min-height: calc(600px * var(--phone-fit-scale));
}
.phone-wrap > .phone {
  transform: scale(var(--phone-fit-scale)) translateZ(0);
  transform-origin: top center;
  backface-visibility: hidden;
}
.phone {
  width: 278px; height: 600px;
  background: #1C1C2A;
  border-radius: 52px;
  padding: 14px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.07),
    0 40px 80px rgba(0,0,0,0.28),
    0 10px 30px rgba(0,0,0,0.15),
    inset 0 0 0 1px rgba(255,255,255,0.04);
  position: relative; flex-shrink: 0;
}
/* Hero phone is taller so content doesn't clip */
.phone--hero {
  height: 680px;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 40px; overflow: hidden;
  background: #F8FAFC; position: relative;
}
.phone-island {
  position: absolute; top: 22px; left: 50%;
  transform: translateX(-50%);
  width: 90px; height: 26px;
  background: #1C1C2A; border-radius: 13px; z-index: 50;
}

/* App content */
.app-content {
  position: absolute; top: 52px; left: 0; right: 0; bottom: 0;
  padding: 8px 14px 14px;
  overflow: hidden;
}
.app-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 12px; padding-top: 4px;
}
.today-label {
  font-size: 10px; font-weight: 800; letter-spacing: 2px;
  color: var(--authority-blue); text-transform: uppercase; margin-bottom: 2px;
}
.app-greeting { font-size: 20px; font-weight: 800; color: var(--slate); letter-spacing: -0.5px; line-height: 1.1; }
.avatar-chip {
  width: 36px; height: 36px; border-radius: 18px;
  background: var(--accent-surface); border: 1px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--authority-blue); flex-shrink: 0;
}

/* Event cards */
.event-card {
  background: var(--surface); border-radius: 20px;
  padding: 12px; border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04); margin-bottom: 10px;
}
.event-card.next { border-color: var(--accent-border); box-shadow: 0 4px 20px rgba(37,99,235,0.08); }
.event-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.event-header-left { display: flex; align-items: center; gap: 7px; }
.initials-chip {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--arrow-chip);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--text-muted-dark);
}
.initials-chip.blue { background: var(--authority-blue); color: #fff; }
.event-time {
  display: flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--text-muted-dark);
}
.event-time ion-icon { font-size: 11px; }
.event-time.blue { color: var(--authority-blue); }
.up-next-badge {
  background: var(--accent-surface); border: 1px solid var(--accent-border);
  border-radius: 999px; padding: 3px 8px;
  font-size: 9px; font-weight: 800; letter-spacing: 0.8px;
  color: var(--authority-blue); text-transform: uppercase;
}
.event-title { font-size: 13px; font-weight: 800; color: var(--slate); margin-bottom: 2px; }
.event-details { font-size: 10px; color: var(--text-muted-dark); margin-bottom: 9px; }
.voice-note-btn {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--accent-surface); border: 1px solid var(--accent-border);
  border-radius: 11px; padding: 7px 9px;
}
.voice-note-label { font-size: 10px; font-weight: 600; color: var(--slate); }
.voice-note-tip { font-size: 9px; color: var(--text-muted-dark); }
.mic-circle {
  width: 26px; height: 26px; border-radius: 13px;
  background: var(--accent-surface);
  display: flex; align-items: center; justify-content: center;
}
.mic-circle ion-icon { font-size: 13px; color: var(--authority-blue); }
.mic-circle.pulse { animation: mic-pulse 1.8s ease-in-out infinite; }
@keyframes mic-pulse {
  0%,100% { background: var(--accent-surface); box-shadow: 0 0 0 0 rgba(37,99,235,0); }
  50% { background: rgba(156,165,255,0.3); box-shadow: 0 0 0 6px rgba(156,165,255,0); }
}

/* ─── VOICE MODAL ─────────────────────────────────────────────────────── */
.voice-modal {
  position: absolute; inset: 0;
  background: rgba(240,244,255,0.93);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: 40px;
  display: flex; flex-direction: column;
  /* 58px = 52px status bar + 6px breathing room — keeps header visible below status bar */
  padding: 58px 14px 18px;
  z-index: 30;
  opacity: 0; /* prevent flash before voice-modal-show animation applies */
}
/* Header: badge left, end btn right — no stacking */
.voice-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
  /* margin-top removed — padding-top on modal handles status-bar clearance */
}
/* Contains the three state badges, all overlap each other */
.voice-phase-area {
  position: relative;
  flex: 1;
  height: 32px;
  display: flex; align-items: center;
}
.voice-phase-area .voice-phase-badge {
  position: absolute; top: 0; left: 0;
  opacity: 0; /* hidden by default; animation controls visibility — prevents all three flashing together */
}
.voice-phase-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.9);
  border-radius: 20px; padding: 6px 14px;
}
.phase-dot { width: 7px; height: 7px; border-radius: 50%; }
.phase-dot.listening { background: var(--primary); animation: dot-glow-blue 1.5s ease-in-out infinite; }
.phase-dot.processing { background: var(--lavender); animation: dot-glow-purple 1s linear infinite; }
.phase-dot.responding { background: var(--mint); animation: dot-glow-green 1.5s ease-in-out infinite; }
@keyframes dot-glow-blue {
  0%,100% { box-shadow: 0 0 0 0 rgba(156,165,255,0.8); }
  50% { box-shadow: 0 0 0 5px rgba(156,165,255,0); }
}
@keyframes dot-glow-purple {
  0%,100% { box-shadow: 0 0 0 0 rgba(213,170,255,0.8); }
  50% { box-shadow: 0 0 0 5px rgba(213,170,255,0); }
}
@keyframes dot-glow-green {
  0%,100% { box-shadow: 0 0 0 0 rgba(125,212,168,0.8); }
  50% { box-shadow: 0 0 0 5px rgba(125,212,168,0); }
}
.phase-label { font-size: 11px; font-weight: 800; letter-spacing: 0.5px; }
.phase-label.listening { color: var(--primary-dark); }
.phase-label.processing { color: #7C3AED; }
.phase-label.responding { color: #059669; }
.end-btn {
  background: rgba(0,0,0,0.07); border: 1px solid rgba(0,0,0,0.06);
  border-radius: 20px; padding: 6px 12px;
  font-size: 11px; font-weight: 700; color: var(--text-muted); white-space: nowrap;
}

/* Transcript */
.voice-transcript {
  flex: 1; display: flex; flex-direction: column; justify-content: flex-end;
  gap: 10px;
  /* padding-bottom keeps bubbles above the viz zone (bottom: 130px + 60px tall = 190px from bottom)
     and the action card (bottom: 0, ~120px tall) — prevents content overlap */
  padding: 0 2px 200px;
  overflow: hidden;
}
.msg-bubble { max-width: 90%; font-size: 12px; line-height: 1.5; }
.msg-bubble.user {
  align-self: flex-end;
  background: rgba(255,255,255,0.55); border-radius: 14px 14px 4px 14px;
  padding: 8px 12px;
  font-weight: 600; color: var(--text-muted-dark); font-size: 12px;
}
.msg-bubble.ai {
  align-self: flex-start;
  font-size: 15px; font-weight: 800; color: var(--slate); line-height: 1.35;
}

/* ─── VOICE VIZ — matches app: dots that scale Y ──────────────────────── */
.viz-center {
  display: flex; align-items: center; justify-content: center;
  height: 60px;
  position: absolute; bottom: 130px; left: 0; right: 0;
}

/* Listening: 4 dots that bounce on Y-axis (matches app exactly) */
.dot-wave-group { display: flex; align-items: center; justify-content: center; gap: 8px; }
.dw {
  width: 12px; height: 12px; border-radius: 6px;
  transform-origin: center;
  box-shadow: 0 0 8px 0 currentColor;
}
.dw.dw1 { animation: dw-pulse 0.55s ease-in-out infinite alternate; }
.dw.dw2 { animation: dw-pulse 0.50s 0.10s ease-in-out infinite alternate; }
.dw.dw3 { animation: dw-pulse 0.65s 0.05s ease-in-out infinite alternate; }
.dw.dw4 { animation: dw-pulse 0.45s 0.15s ease-in-out infinite alternate; }
@keyframes dw-pulse {
  from { transform: scaleY(0.5); opacity: 0.7; }
  to   { transform: scaleY(2.4); opacity: 1; }
}

/* Processing: orbiting dots (matches app) */
.orbit-container {
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.viz-dot { width: 10px; height: 10px; border-radius: 50%; position: absolute; }
.viz-dot.d1 { animation: orbit 1.4s linear infinite; }
.viz-dot.d2 { animation: orbit 1.4s 0.35s linear infinite; }
.viz-dot.d3 { animation: orbit 1.4s 0.7s linear infinite; }
.viz-dot.d4 { animation: orbit 1.4s 1.05s linear infinite; }
@keyframes orbit {
  0%   { transform: rotate(0deg) translateX(22px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(22px) rotate(-360deg); }
}

/* Responding: gentle breathing (same dots, slower pulse) */
.dw.dw1-resp { animation: dw-breathe 1.8s 0s ease-in-out infinite alternate; }
.dw.dw2-resp { animation: dw-breathe 1.8s 0.2s ease-in-out infinite alternate; }
.dw.dw3-resp { animation: dw-breathe 1.8s 0.4s ease-in-out infinite alternate; }
.dw.dw4-resp { animation: dw-breathe 1.8s 0.6s ease-in-out infinite alternate; }
@keyframes dw-breathe {
  from { transform: scale(0.8); opacity: 0.6; }
  to   { transform: scale(1.3); opacity: 1; }
}

/* Action card (slides up) */
.action-card-wrap {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 0 12px 16px;
}
.action-card {
  background: rgba(255,255,255,0.97); border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.9);
  padding: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}
.action-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.action-icon-wrap {
  width: 26px; height: 26px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.action-label { font-size: 10px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; }
.action-desc { font-size: 11px; color: var(--slate); font-weight: 600; line-height: 1.4; margin-bottom: 10px; }
.action-btns { display: flex; gap: 8px; }
.btn-accept {
  flex: 1; border: none; border-radius: 12px; padding: 9px;
  font-size: 11px; font-weight: 700; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.btn-edit {
  flex: 1; border-radius: 12px; padding: 9px;
  background: rgba(0,0,0,0.05);
  font-size: 11px; font-weight: 700; color: var(--slate);
  display: flex; align-items: center; justify-content: center; gap: 5px;
}

/* ─── FEATURES ─────────────────────────────────────────────────────────── */
.features { padding: 80px 0; }
.feature-section { padding: 80px 0; border-top: 1px solid var(--border); }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.feature-grid.reverse { direction: rtl; }
.feature-grid.reverse > * { direction: ltr; }
.feature-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase; color: var(--primary-dark); margin-bottom: 12px;
}
.feature-label ion-icon { font-size: 14px; }
.feature-title {
  font-size: clamp(24px, 3vw, 36px); font-weight: 800; letter-spacing: -0.8px;
  color: var(--slate); line-height: 1.15; margin-bottom: 16px;
}
.feature-desc { font-size: 16px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 28px; }
.feature-quote {
  background: var(--accent-surface); border-left: 3px solid var(--accent-border);
  border-radius: 0 12px 12px 0; padding: 14px 16px;
  font-size: 13px; color: var(--text-secondary); font-style: italic; line-height: 1.6;
}

/* ─── VOICE DEMO ANIMATION ─────────────────────────────────────────────── */
/*
  Timeline (22s, linear) — slow enough for first-time visitors to read each stage:
  ─────────────────────────────────────────────────────────────────────────
  0s  – 3.1s   Home screen (0–14%)
  3.1s– 3.7s   Cross-fade → Voice Modal (14–17%)
  3.7s–12.1s   LISTENING animation visible (17–55%) — 8.4s on screen
  4.4s–11.4s     └ badge + dot wave HELD (20–52%) — 7.0s                ← key learning moment
  7.5s–13.6s   User transcript fades in (34%) and holds (34–62%) — 6.2s read time
  12.1s–14.5s  PROCESSING orbits (54–66%) — 2.5s
  14.3s–17.6s  RESPONDING mint dots (65–80%) — 3.3s
  15.4s–17.6s  AI response bubble holds (70–77%) — 1.5s
  17.2s–20.7s  ACTION CARD slides up (78–94%) — 3.5s total, 2.2s fully held
  20.1s–22s    Home screen returns (91–100%)
  ─────────────────────────────────────────────────────────────────────────
  3% crossfade bands between every state — no jarring cuts
*/

/* Default states — prevent any initial flash before animations apply */
.voice-demo .user-bubble      { opacity: 0; transform: translateY(8px); }
.voice-demo .ai-bubble        { opacity: 0; transform: translateY(8px); }
.voice-demo .action-card-wrap { opacity: 0; transform: translateY(24px); }

.voice-demo .home-layer       { animation: voice-home       22s linear infinite; }
.voice-demo .modal-layer      { animation: voice-modal-show 22s linear infinite; position: absolute; inset: 0; z-index: 30; }
.voice-demo .state-listening  { animation: voice-listening  22s linear infinite; }
.voice-demo .state-processing { animation: voice-processing 22s linear infinite; }
.voice-demo .state-responding { animation: voice-responding 22s linear infinite; }
.voice-demo .user-bubble      { animation: voice-user-bubble  22s linear infinite; }
.voice-demo .ai-bubble        { animation: voice-ai-bubble    22s linear infinite; }
.voice-demo .action-card-wrap { animation: voice-action-card  22s linear infinite; }

/* Home screen: visible at start and end of each cycle */
@keyframes voice-home {
  0%, 14%   { opacity: 1; }
  17%       { opacity: 0; }
  91%       { opacity: 0; }
  94%, 100% { opacity: 1; }
}

/* Voice modal: inverse of home */
@keyframes voice-modal-show {
  0%, 14%   { opacity: 0; pointer-events: none; }
  17%       { opacity: 1; pointer-events: all; }
  91%       { opacity: 1; }
  94%, 100% { opacity: 0; pointer-events: none; }
}

/* LISTENING — long hold so visitors clearly see the badge + dot wave */
@keyframes voice-listening {
  0%, 17%   { opacity: 0; }
  20%       { opacity: 1; }   /* 3% fade-in  */
  52%       { opacity: 1; }   /* hold        */
  55%, 100% { opacity: 0; }   /* 3% fade-out → smooth cross into processing */
}

/* PROCESSING — brief but legible; overlaps slightly with listening fade-out */
@keyframes voice-processing {
  0%, 54%   { opacity: 0; }
  57%       { opacity: 1; }
  63%       { opacity: 1; }
  66%, 100% { opacity: 0; }
}

/* RESPONDING — AI is speaking; gentle mint dots */
@keyframes voice-responding {
  0%, 65%   { opacity: 0; }
  68%       { opacity: 1; }
  77%       { opacity: 1; }
  80%, 100% { opacity: 0; }
}

/* User transcript — appears mid-listening so visitors see real-time transcription,
   holds all the way through processing so they can read it */
@keyframes voice-user-bubble {
  0%, 31%   { opacity: 0; transform: translateY(8px); }
  34%       { opacity: 1; transform: translateY(0); }   /* appears after ~2.6s of listening */
  62%       { opacity: 1; transform: translateY(0); }   /* holds through processing */
  65%, 100% { opacity: 0; transform: translateY(-4px); }
}

/* AI response — appears after responding starts, gone cleanly before action card */
@keyframes voice-ai-bubble {
  0%, 68%   { opacity: 0; transform: translateY(8px); }
  71%       { opacity: 1; transform: translateY(0); }
  77%       { opacity: 1; transform: translateY(0); }
  80%, 100% { opacity: 0; transform: translateY(-4px); }
}

/* SESSION LOGGED card — main payoff, long clear hold so visitors can read the result */
@keyframes voice-action-card {
  0%, 78%   { opacity: 0; transform: translateY(24px); }
  81%       { opacity: 1; transform: translateY(0); }   /* smooth slide-up */
  91%       { opacity: 1; transform: translateY(0); }   /* 2.2s fully held */
  94%, 100% { opacity: 0; transform: translateY(24px); }
}

/* ─── SUGGESTION CARDS DEMO ────────────────────────────────────────────── */
/* 18s cycle — each card visible ~5s so visitors can read the full message */
.sugg-demo .card-1 { animation: sugg-c1 18s linear infinite; }
.sugg-demo .card-2 { animation: sugg-c2 18s linear infinite; position: absolute; top: 0; left: 0; right: 0; }
.sugg-demo .card-3 { animation: sugg-c3 18s linear infinite; position: absolute; top: 0; left: 0; right: 0; }
@keyframes sugg-c1 {
  0%, 27%   { opacity: 1; transform: translateY(0); }
  31%, 100% { opacity: 0; transform: translateY(-8px); }   /* hold 4.9s, 4% cross-fade */
}
@keyframes sugg-c2 {
  0%, 30%   { opacity: 0; transform: translateY(8px); }
  34%, 64%  { opacity: 1; transform: translateY(0); }       /* hold 5.4s */
  68%, 100% { opacity: 0; transform: translateY(-8px); }
}
@keyframes sugg-c3 {
  0%, 67%   { opacity: 0; transform: translateY(8px); }
  71%, 96%  { opacity: 1; transform: translateY(0); }       /* hold 4.5s */
  100%      { opacity: 0; transform: translateY(-8px); }
}

/* ─── PUSH NOTIFICATION DEMO ───────────────────────────────────────────── */
/* 16s cycle — notification banner has enough time to read, opened state is clear */
.notif-demo .notif-home   { animation: notif-home-anim   16s linear infinite; }
.notif-demo .notif-opened { animation: notif-opened-anim 16s linear infinite; position: absolute; inset: 0; z-index: 25; }
.notif-demo .notif-banner { z-index: 60; animation: notif-banner-anim 16s linear infinite; }
@keyframes notif-banner-anim {
  0%, 15%   { transform: translateY(-80px); opacity: 0; }
  19%       { transform: translateY(0);    opacity: 1; }   /* 4% slide-down */
  63%       { transform: translateY(0);    opacity: 1; }   /* hold 7.0s */
  67%, 100% { transform: translateY(-80px); opacity: 0; }
}
@keyframes notif-home-anim {
  0%, 69%   { opacity: 1; }
  72%       { opacity: 0; }                                 /* 3% fade */
  88%       { opacity: 0; }
  91%, 100% { opacity: 1; }
}
@keyframes notif-opened-anim {
  0%, 71%   { opacity: 0; pointer-events: none; }
  74%       { opacity: 1; pointer-events: all; }   /* 3% fade-in */
  88%       { opacity: 1; }
  91%, 100% { opacity: 0; pointer-events: none; }
}
.notif-banner {
  position: absolute; top: 56px; left: 10px; right: 10px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  border-radius: 16px; padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
  border: 1px solid rgba(255,255,255,0.8);
}
.notif-header { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.notif-app-icon {
  width: 20px; height: 20px; border-radius: 5px;
  background: var(--primary); display: flex; align-items: center; justify-content: center;
  font-size: 10px;
}
.notif-app-name { font-size: 11px; font-weight: 700; color: var(--text-muted-dark); }
.notif-time { font-size: 10px; color: var(--text-muted); margin-left: auto; }
.notif-title { font-size: 12px; font-weight: 700; color: var(--slate); margin-bottom: 3px; }
.notif-body { font-size: 11px; color: var(--text-muted-dark); line-height: 1.4; }
.notif-actions { display: flex; gap: 6px; margin-top: 8px; }
.notif-action-btn { flex: 1; border-radius: 10px; padding: 6px 8px; font-size: 11px; font-weight: 700; text-align: center; }
.notif-action-btn.primary { background: var(--authority-blue); color: #fff; }
.notif-action-btn.secondary { background: var(--arrow-chip); color: var(--text-muted-dark); }

/* ─── HOW IT WORKS ─────────────────────────────────────────────────────── */
.how {
  padding: 100px 0;
  background: linear-gradient(180deg, #F3F4FA 0%, #F8FAFC 100%);
  content-visibility: auto;
  contain-intrinsic-size: 0 520px;
}
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 56px; }
.step-card {
  background: var(--surface); border-radius: var(--radius-bento);
  padding: 32px 24px; border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.step-num {
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--accent-surface); border: 1px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: var(--authority-blue); margin-bottom: 20px;
}
.step-title { font-size: 16px; font-weight: 800; color: var(--slate); margin-bottom: 8px; }
.step-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ─── WHO IT'S FOR ─────────────────────────────────────────────────────── */
.who {
  padding: 100px 0;
  content-visibility: auto;
  contain-intrinsic-size: 0 480px;
}
.coach-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 44px; }
.coach-pill {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 999px; padding: 12px 24px;
  font-size: 14px; font-weight: 600; color: var(--text-secondary);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.coach-pill:hover { border-color: var(--accent-border); color: var(--authority-blue); background: var(--accent-surface); }
.not-for {
  margin-top: 28px; padding: 16px 20px;
  background: #FFF7F0; border: 1px solid #FED7AA;
  border-radius: var(--radius-small); font-size: 13px; color: #92400E;
}

/* ─── MINI SUGGESTION CARDS ────────────────────────────────────────────── */
.mini-sugg-card {
  background: var(--surface); border-radius: 16px;
  padding: 11px; border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.mini-sugg-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.mini-sugg-icon-row { display: flex; align-items: center; gap: 6px; }
.mini-icon-wrap {
  width: 26px; height: 26px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
}
.mini-icon-wrap ion-icon { font-size: 13px; }
.mini-sugg-title { font-size: 11px; font-weight: 800; color: var(--slate); }
.mini-dismiss {
  width: 20px; height: 20px; border-radius: 10px;
  background: var(--arrow-chip);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: var(--text-muted);
}
.mini-sugg-desc { font-size: 9.5px; color: var(--text-muted-dark); line-height: 1.5; margin-bottom: 7px; }
.wa-preview {
  background: #E7F8E8; border: 1px solid #C4ECCC;
  border-radius: 9px; padding: 7px; margin-bottom: 7px;
}
.wa-header { display: flex; align-items: center; gap: 4px; margin-bottom: 3px; }
.wa-icon { font-size: 10px; }
.wa-icon ion-icon { font-size: 10px; color: #25D366; }
.wa-label { font-size: 8.5px; font-weight: 800; color: #25D366; letter-spacing: 0.4px; text-transform: uppercase; }
.wa-text { font-size: 9.5px; color: var(--slate); line-height: 1.5; }
.mini-btn-row { display: flex; gap: 6px; }
.mini-btn-green {
  flex: 1; border: none; border-radius: 9px; padding: 6px;
  background: #25D366; font-size: 9.5px; font-weight: 700; color: #fff; cursor: pointer;
}
.mini-btn-outline {
  flex: 1; border: 1px solid var(--authority-blue); border-radius: 9px; padding: 6px;
  background: transparent; font-size: 9.5px; font-weight: 700; color: var(--authority-blue); cursor: pointer;
}
.mini-btn-blue {
  flex: 1; border: none; border-radius: 9px; padding: 6px;
  background: var(--authority-blue); font-size: 9.5px; font-weight: 700; color: #fff; cursor: pointer;
}

/* ─── FINAL CTA ────────────────────────────────────────────────────────── */
.final-cta {
  padding: 120px 0;
  padding-bottom: max(120px, calc(80px + env(safe-area-inset-bottom, 0px)));
  background: var(--slate);
  position: relative; overflow: hidden;
}
.final-cta::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 80% 50%, rgba(156,165,255,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(125,212,168,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.final-cta-inner { text-align: center; position: relative; z-index: 1; }
.final-cta .badge { margin: 0 auto 20px; background: rgba(156,165,255,0.12); border-color: rgba(156,165,255,0.25); color: var(--primary); }
.final-cta h2 {
  font-size: clamp(32px, 4.5vw, 54px); font-weight: 800; letter-spacing: -1.5px;
  color: #fff; line-height: 1.1; margin-bottom: 20px;
}
.final-cta p { font-size: 17px; color: rgba(255,255,255,0.6); margin-bottom: 44px; max-width: 480px; margin-left: auto; margin-right: auto; }
.cta-form { display: flex; gap: 10px; max-width: 500px; margin: 0 auto 16px; flex-wrap: wrap; justify-content: center; }
.cta-form input {
  flex: 2; min-width: 220px;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.28);
  border-radius: var(--radius-chip); padding: 14px 20px;
  font-size: 15px; font-family: inherit; color: #fff;
  outline: none; transition: border-color 0.2s;
}
.cta-form input:focus { border-color: var(--primary); }
.cta-form input::placeholder { color: rgba(255,255,255,0.4); }
.btn-cta {
  background: var(--primary); color: var(--slate);
  border: none; border-radius: var(--radius-chip);
  padding: 14px 28px;
  min-height: 44px;
  font-size: 14px; font-weight: 800;
  cursor: pointer; white-space: nowrap; font-family: inherit;
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
  box-shadow: 0 8px 32px rgba(156,165,255,0.35);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-cta:hover:not(:disabled) {
  background: var(--primary-dark);
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 12px 40px rgba(123,133,255,0.50);
}
.cta-note { font-size: 12px; color: rgba(255,255,255,0.4); }
.final-cta .form-status { justify-content: center; }
.final-cta .form-status.success { color: #6EE7B7; }
.final-cta .form-status.error { color: #FCA5A5; }
.final-cta .form-status.loading { color: rgba(255,255,255,0.4); }

/* ─── FOOTER ───────────────────────────────────────────────────────────── */
footer {
  background: var(--slate);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 32px 0;
  padding-bottom: max(32px, env(safe-area-inset-bottom, 0px));
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 max(24px, env(safe-area-inset-right, 0px)) 0 max(24px, env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-logo { font-size: 15px; font-weight: 800; color: rgba(255,255,255,0.7); }
.footer-logo span { color: var(--primary); }
.footer-tagline { font-size: 12px; color: rgba(255,255,255,0.3); }

/* ─── SCROLL ANIMATIONS ────────────────────────────────────────────────── */
[data-animate] {
  opacity: 0;
  transition: opacity 0.65s cubic-bezier(0.16,1,0.3,1), transform 0.65s cubic-bezier(0.16,1,0.3,1);
  will-change: opacity, transform;
}
[data-animate="fade-up"]    { transform: translateY(32px); }
[data-animate="fade-left"]  { transform: translateX(-40px); }
[data-animate="fade-right"] { transform: translateX(40px); }
[data-animate].is-visible   { opacity: 1; transform: translate(0); }

[data-delay="1"] { transition-delay: 0.08s; }
[data-delay="2"] { transition-delay: 0.16s; }
[data-delay="3"] { transition-delay: 0.24s; }
[data-delay="4"] { transition-delay: 0.32s; }
[data-delay="5"] { transition-delay: 0.40s; }
[data-delay="6"] { transition-delay: 0.48s; }

/* ion-icon sizing reset */
ion-icon { display: inline-block; vertical-align: middle; }

/* ─── RESPONSIVE ───────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .pain { padding: 72px 0 64px; }
  .intro { padding: 72px 0; }
  .features { padding: 64px 0; }
  .feature-section { padding: 64px 0; }
  .feature-grid { gap: 56px; }
  .how { padding: 72px 0; }
  .who { padding: 72px 0; }
  .final-cta { padding-top: 88px; padding-bottom: max(88px, calc(64px + env(safe-area-inset-bottom, 0px))); }
}

@media (max-width: 900px) {
  .hero-grid, .intro-grid, .feature-grid { grid-template-columns: 1fr; gap: 40px; }
  .feature-grid.reverse { direction: ltr; }
  .quote-grid { grid-template-columns: 1fr 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid .phone-wrap { order: -1; }
}

@media (max-width: 768px) {
  nav { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .voice-modal {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .notif-banner { backdrop-filter: blur(12px); }
  .hero { padding: 64px 0 48px; }
  .hero--centered { padding: 88px 0 48px; min-height: auto; }
  .pain { padding: 56px 0 48px; }
  .intro { padding: 56px 0; }
  .features { padding: 48px 0; }
  .feature-section { padding: 56px 0; }
  .feature-grid { gap: 40px; }
  .how { padding: 56px 0; }
  .who { padding: 56px 0; }
  .section-sub { margin-bottom: 40px; }
  .hero-form input,
  .cta-form input {
    min-height: 44px;
  }
  .hero--centered {
    min-height: 0;
    padding: 56px 0 36px;
  }
  .hero-headline {
    font-size: clamp(32px, 8.5vw, 72px);
    margin-bottom: 18px;
  }
  .hero-sub {
    font-size: 17px;
    margin-bottom: 28px;
  }
}

@media (max-width: 600px) {
  .quote-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .intro-bento-grid { grid-template-columns: 1fr; }
  .bento-card--inset { margin-top: 0; }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .nav-cta { padding: 10px 16px; font-size: 12px; }
}

@media (max-width: 380px) {
  .nav-cta { padding: 10px 12px; }
}

/* ─── HERO CENTERED ────────────────────────────────────────────────────── */
.hero--centered {
  min-height: min(72vh, 720px);
  min-height: min(72svh, 720px);
  padding: 100px 0 60px;
}
.hero-center {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.hero--centered .hero-sub {
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 44px;
}
.hero--centered .hero-form {
  justify-content: center;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.hero--centered .form-status,
.hero--centered .hero-note {
  justify-content: center;
  text-align: center;
}

/* ─── SCROLL PHONE DEMO ────────────────────────────────────────────────── */
.scroll-demo {
  height: 480vh;
  position: relative;
  background: #F8FAFC;
}
/* Sticky band: below nav, fills dynamic viewport so no white strip above Safari toolbar */
.scroll-demo__sticky {
  position: sticky;
  top: var(--nav-offset, calc(72px + env(safe-area-inset-top, 0px)));
  z-index: 5;
  box-sizing: border-box;
  /* dvh tracks visible viewport when iOS chrome shows/hides; avoids banding vs body */
  height: calc(100vh - var(--nav-offset, calc(72px + env(safe-area-inset-top, 0px))));
  height: calc(100dvh - var(--nav-offset, calc(72px + env(safe-area-inset-top, 0px))));
  min-height: calc(100vh - var(--nav-offset, calc(72px + env(safe-area-inset-top, 0px))));
  min-height: calc(100dvh - var(--nav-offset, calc(72px + env(safe-area-inset-top, 0px))));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow: visible;
  background: #F8FAFC;
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}
.scroll-demo__sticky-inner {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  width: 100%;
  padding: 16px 12px 10px;
  box-sizing: border-box;
  overflow: visible;
}
.scroll-demo__phone-wrap {
  /* starts off-screen below, JS animates in via rAF */
  transform: translateY(130px);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: visible;
}
.scroll-demo__hint {
  flex-shrink: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  padding: 4px 16px 2px;
  pointer-events: none;
  opacity: 0.88;
  /* Opacity refined from JS while scroll demo runs (avoids fighting keyframes) */
}

/* Scale phone (capped by --scroll-phone-scale); GPU layer for crispness */
.scroll-demo .phone {
  transform: scale(var(--scroll-phone-scale)) translateZ(0);
  transform-origin: center center;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (max-width: 600px) {
  .scroll-demo { height: 360vh; }
}

@media (max-width: 400px) {
  .scroll-demo { height: 320vh; }
}

/* SD layer base — all start invisible, JS fades them in */
.sd-layer {
  opacity: 0;
  transform: translateY(14px);
}

/* ─── SEND BUTTON TAP PULSE ─────────────────────────────────────────────── */
@keyframes sd-send-tap {
  0%   { transform: scale(1);    box-shadow: 0 2px 8px  rgba(37,211,102,0.35); }
  18%  { transform: scale(0.92); box-shadow: 0 1px 3px  rgba(37,211,102,0.20); }
  50%  { transform: scale(1.06); box-shadow: 0 5px 18px rgba(37,211,102,0.55); }
  72%  { transform: scale(0.97); }
  100% { transform: scale(1);    box-shadow: 0 2px 8px  rgba(37,211,102,0.35); }
}
.sd-btn-tapping {
  animation: sd-send-tap 0.75s ease-in-out forwards;
}

/* ─── SENT CONFIRMATION CARD ────────────────────────────────────────────── */
.sd-sent-card {
  background: #F0FFF4;
  border: 1.5px solid #BBF7D0;
  border-radius: 16px;
  padding: 13px;
}
.sd-sent-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 11px;
}
.sd-sent-icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37,211,102,0.35);
}
.sd-sent-title {
  font-size: 12px; font-weight: 800; color: var(--slate);
}
.sd-sent-sub {
  font-size: 9.5px; color: var(--text-muted-dark); margin-top: 1px;
}
.sd-sent-preview {
  background: rgba(37,211,102,0.08);
  border-radius: 10px;
  padding: 8px;
  font-size: 9.5px;
  color: var(--slate);
  line-height: 1.55;
  font-style: italic;
}
.sd-sent-done-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
.sd-sent-done-btn {
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 7px 16px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 3px 10px rgba(37,211,102,0.3);
}

/* ─── ACCESSIBILITY: reduced motion ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
  }

  .voice-demo .home-layer { opacity: 1 !important; }
  .voice-demo .modal-layer {
    opacity: 0 !important;
    pointer-events: none !important;
  }
  .voice-demo .state-listening,
  .voice-demo .state-processing,
  .voice-demo .state-responding { opacity: 0 !important; }
  .voice-demo .user-bubble,
  .voice-demo .ai-bubble { opacity: 0 !important; }
  .voice-demo .action-card-wrap {
    opacity: 0 !important;
    transform: none !important;
    animation: none !important;
  }
  .voice-demo .home-layer,
  .voice-demo .modal-layer,
  .voice-demo .state-listening,
  .voice-demo .state-processing,
  .voice-demo .state-responding,
  .voice-demo .user-bubble,
  .voice-demo .ai-bubble,
  .voice-demo .action-card-wrap,
  .voice-demo .dw,
  .voice-demo .viz-dot,
  .voice-demo .phase-dot {
    animation: none !important;
  }

  .sugg-demo .card-1 {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .sugg-demo .card-2,
  .sugg-demo .card-3 {
    opacity: 0 !important;
    transform: none !important;
    animation: none !important;
  }

  .notif-demo .notif-banner {
    opacity: 0 !important;
    transform: translateY(-80px) !important;
    animation: none !important;
  }
  .notif-demo .notif-home { opacity: 1 !important; animation: none !important; }
  .notif-demo .notif-opened {
    opacity: 0 !important;
    pointer-events: none !important;
    animation: none !important;
  }

  .mic-circle.pulse { animation: none !important; }

  .sd-btn-tapping { animation: none !important; }

  .scroll-demo__hint {
    animation: none !important;
    opacity: 0.8 !important;
  }

  /* Scroll-scrub demo: static readable frame, no tall sticky scroll */
  .scroll-demo {
    height: auto !important;
    padding: 40px 0 56px;
  }
  .scroll-demo__sticky {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  .scroll-demo__sticky-inner {
    flex: none !important;
  }
  .scroll-demo__phone-wrap {
    opacity: 1 !important;
    transform: none !important;
  }
  #sd-upnext {
    opacity: 1 !important;
    transform: none !important;
  }
  #sd-suggestion {
    opacity: 0 !important;
    transform: none !important;
  }
  #sd-sent {
    opacity: 1 !important;
    transform: none !important;
  }
}
