/* =============================================================
   Mila — landing page styles
   Built on Alt Data Partners tokens (colors_and_type.css)
   ============================================================= */

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
}

/* Accent override hook — Tweaks panel rewrites these on :root */
:root {
  --mila-accent: var(--orange-500);
  --mila-accent-hover: var(--orange-600);
  --mila-accent-press: var(--orange-700);
  --mila-accent-soft: var(--orange-50);
  --mila-accent-fg: #FFF4EE;
  --mila-bubble: #0A84FF;
  --mila-chat-speed: 1;
}

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

/* ------- Buttons (ADP spec: 8px radius, never pill) -------- */
.btn {
  font-family: var(--font-sans); font-size: 14px; font-weight: 600; line-height: 1;
  border-radius: var(--r-md); padding: 10px 16px; border: 1px solid transparent;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
  text-decoration: none;
}
.btn-primary { background: var(--mila-accent); color: var(--mila-accent-fg); box-shadow: var(--shadow-inset); }
.btn-primary:hover { background: var(--mila-accent-hover); }
.btn-primary:active { background: var(--mila-accent-press); box-shadow: none; }
.btn-secondary { background: var(--bg-raised); color: var(--fg-strong); border-color: var(--border); }
.btn-secondary:hover { background: var(--ink-100); border-color: var(--border-strong); }
.btn-lg { padding: 16px 24px; font-size: 15px; border-radius: 10px; }
.btn:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* "Get started" buttons: grow + orange outline + orange, bolder text */
.btn.js-get-started {
  transition: background var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              transform 0.18s var(--ease-out);
}
.btn.js-get-started:hover {
  transform: scale(1.07);
  background: #fff;
  border-color: var(--mila-accent);
  color: var(--mila-accent);
  font-weight: 700;
}

/* ------- Navbar --------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg); border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.wordmark-tile {
  width: 28px; height: 28px; border-radius: 8px; background: var(--mila-accent);
  color: var(--mila-accent-fg);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.wordmark-name {
  font-size: 19px; font-weight: 700; letter-spacing: var(--tr-snug);
  color: var(--fg-strong);
}
/* chat icon twitches on wordmark hover, then settles back */
@keyframes tile-twitch {
  0%, 100% { transform: rotate(0deg); }
  15%      { transform: rotate(-14deg); }
  38%      { transform: rotate(11deg); }
  60%      { transform: rotate(-7deg); }
  80%      { transform: rotate(3deg); }
}
.wordmark:hover .wordmark-tile svg { animation: tile-twitch 0.55s var(--ease-in-out); }

/* ------- Hero ------------------------------------------------ */
.hero {
  padding: var(--s-8) 0; overflow: hidden;
  min-height: calc(100vh - 56px);
  display: flex; align-items: center;
}
.hero > .container { width: 100%; transform: translateY(-44px); }
.hero-grid {
  display: grid; grid-template-columns: 1fr 400px; gap: var(--s-16);
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: var(--s-8); align-items: flex-start; }
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.2vw, 64px); font-weight: 700;
  line-height: var(--lh-tight); letter-spacing: var(--tr-tight);
  color: var(--fg-strong);
  /* reserve exactly 2 lines; bottom-anchor so a 3rd line grows UP and
     the sub-copy below never moves */
  height: calc(var(--lh-tight) * 2em);
  display: flex; align-items: flex-end; overflow: visible;
}
.headline-swap {
  display: inline-block;
  transition: opacity 0.26s var(--ease-out), transform 0.26s var(--ease-out);
}
.headline-swap.swap-out { opacity: 0; transform: translateY(-18px); }
.headline-swap.swap-in { animation: headline-in 0.34s var(--ease-out); }
@keyframes headline-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-sub {
  font-size: var(--t-18); line-height: var(--lh-loose);
  color: var(--fg-muted); max-width: 44ch; text-wrap: pretty;
  margin-bottom: 2px;
}
/* Small use-case bullets sitting FLUSH with the hero-sub above.
   Goals per spec: much smaller font, no gap between description
   end and first bullet, each bullet fits on one line on desktop.
   Removing max-width so bullets aren't constrained to the 44ch
   description column; white-space:nowrap on desktop guarantees
   one-line fit (mobile relaxes this to allow graceful wrap on
   narrow screens where bullets physically cannot fit). */
.hero-sub-list {
  margin: 0;
  padding-left: 1em;
  list-style: disc;
  color: var(--fg-muted);
  font-size: 12.5px;
  line-height: 1.5;
  max-width: none;
}
.hero-sub-list li { margin: 0; white-space: nowrap; }
.hero-sub-list li::marker { font-size: 0.8em; }
.hero-bullets { list-style: none; display: flex; flex-direction: column; gap: var(--s-3); }
.hero-bullets li { display: flex; align-items: flex-start; gap: 12px; font-size: var(--t-15); color: var(--fg); }
.bullet-icon {
  width: 34px; height: 34px; border-radius: var(--r-md); flex-shrink: 0;
  background: var(--mila-accent-soft); color: var(--mila-accent);
  display: flex; align-items: center; justify-content: center;
}
.bullet-icon svg { width: 18px; height: 18px; }
.hero-bullets strong { color: var(--fg-strong); font-weight: 600; }
.hero-cta-row { display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-2); }
.hero-fineprint { font-size: var(--t-13); color: var(--fg-subtle); }
.hero-phone { display: flex; justify-content: center; transform: translateY(14px); }
/* Reserve the iPhone footprint BEFORE React + Babel finishes mounting so the
   sections below don't briefly pop up into view. The :empty selector matches
   only until the chat UI renders into #hero-phone-root, then it stops applying. */
#hero-phone-root:empty { display: block; width: 360px; max-width: 100%; min-height: 640px; }

/* ------- iMessage chat surface ------------------------------ */
.chat-screen {
  display: flex; flex-direction: column; height: 100%;
  background: #fff; font-family: -apple-system, system-ui, sans-serif;
}
.chat-header {
  padding: 58px 16px 10px; text-align: center;
  border-bottom: 0.5px solid rgba(60,60,67,0.16);
  background: rgba(249,249,249,0.94); position: relative; z-index: 5;
}
.chat-avatar {
  width: 50px; height: 50px; border-radius: 50%; margin: 0 auto 4px;
  background: var(--mila-accent); color: var(--mila-accent-fg);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 600; letter-spacing: 0.5px;
}
.chat-contact {
  font-size: 12px; color: #000; display: flex;
  align-items: center; justify-content: center; gap: 5px;
}
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bull-500); display: inline-block; }
.chat-thread {
  flex: 1; overflow-y: auto; padding: 14px 14px 18px;
  display: flex; flex-direction: column; gap: 5px;
  scrollbar-width: none;
}
.chat-thread::-webkit-scrollbar { display: none; }
.chat-stamp {
  font-size: 11px; color: rgba(60,60,67,0.55); text-align: center;
  padding: 6px 0 8px; font-weight: 500;
}
.bubble {
  max-width: 76%; padding: 8px 13px; border-radius: 18px;
  font-size: 15px; line-height: 1.33; letter-spacing: -0.2px;
  animation: bubble-in 0.34s var(--ease-out) both;
}
.bubble-them { align-self: flex-start; background: #E9E9EB; color: #000; border-bottom-left-radius: 5px; }
.bubble-me { align-self: flex-end; background: var(--mila-bubble); color: #fff; border-bottom-right-radius: 5px; }
@keyframes bubble-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.typing { display: flex; gap: 4px; align-items: center; padding: 11px 14px; }
.typing-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #8E8E93;
  animation: typing-bounce 1.1s infinite var(--ease-in-out);
}
.bubble-me .typing-dot { background: rgba(255,255,255,0.85); }
.typing-dot:nth-child(2) { animation-delay: 150ms; }
.typing-dot:nth-child(3) { animation-delay: 300ms; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: scale(1); opacity: 0.45; }
  30% { transform: scale(1.35); opacity: 1; }
}

/* ------- Sections ------------------------------------------- */
.section { padding: var(--s-20) 0; }
.section-head { max-width: 640px; margin: 0 auto var(--s-12); text-align: center; display: flex; flex-direction: column; gap: var(--s-3); }
.section-title {
  font-size: clamp(28px, 3.2vw, 40px); font-weight: 700;
  line-height: var(--lh-snug); letter-spacing: var(--tr-snug);
  color: var(--fg-strong); text-wrap: balance;
}
.section-sub { font-size: var(--t-16); color: var(--fg-muted); text-wrap: pretty; }
.section-band .section-sub { font-size: var(--t-14); margin-top: -10px; }

/* ------- Demo section ---------------------------------------- */
.demo-section { background: var(--bg-sunken); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); padding: calc(var(--s-8) - 10px) 0 var(--s-8); scroll-margin-top: 56px; }
/* Hairline separator beneath the demo card title for visual breathing room. */
.demo-title-divider {
  border: 0;
  height: 1px;
  background: var(--border-strong);
  margin: 12px 0 18px;
}
/* Desktop: kill all hover/focus visuals on the (read-only) demo fields. */
.demo-section .demo-card .field,
.demo-section .demo-card .field:hover,
.demo-section .demo-card .field:focus,
.demo-section .demo-card .field:focus-visible {
  border-color: var(--border) !important;
  box-shadow: var(--shadow-xs) !important;
  outline: none !important;
}
.demo-section .section-head { margin-bottom: var(--s-4); max-width: none; }
.demo-section .section-sub { white-space: nowrap; }
.demo-shell { max-width: 980px; margin: 0 auto; will-change: transform; }
.demo-shell .field, .demo-shell .field:hover { cursor: default; }

.demo-card {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s-5) var(--s-6) var(--s-6);
}
.demo-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-4); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4) var(--s-5); }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.lbl {
  font-size: 12px; font-weight: 600; color: var(--fg-muted);
  font-family: var(--font-mono); letter-spacing: var(--tr-wide); text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.lbl .check { color: var(--bull-500); display: none; }
.form-field.filled .lbl .check { display: inline-flex; }
.field {
  font-family: var(--font-sans); font-size: 14px; color: var(--fg);
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 10px 12px; width: 100%;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.field:hover { border-color: var(--border-strong); }
.field:focus { outline: none; border-color: var(--mila-accent); box-shadow: var(--ring-focus); }
textarea.field { resize: vertical; min-height: 72px; line-height: var(--lh-base); }
.dropzone {
  border: 1.5px dashed var(--border-strong); border-radius: var(--r-md);
  padding: var(--s-6); text-align: center; cursor: pointer;
  color: var(--fg-muted); font-size: var(--t-13);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.dropzone:hover, .dropzone.dragover { border-color: var(--mila-accent); background: var(--mila-accent-soft); }
.dropzone .file-name { font-family: var(--font-mono); font-size: var(--t-12); color: var(--fg-strong); }
.hint { font-size: var(--t-12); color: var(--fg-subtle); }

/* Phase 2 */
.live-bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s-4) var(--s-5); margin-bottom: var(--s-4);
}
.live-status { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--fg-strong); font-size: var(--t-15); }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bull-500); position: relative; }
.pulse-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--bull-500); opacity: 0;
  animation: pulse-ring 2s var(--ease-out) infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.5); opacity: 0.6; }
  100% { transform: scale(1.1); opacity: 0; }
}
.live-number { font-family: var(--font-mono); font-size: var(--t-13); color: var(--fg-muted); }

.tab-row { display: flex; gap: 4px; background: var(--bg-sunken); border: 1px solid var(--border); border-radius: var(--r-md); padding: 4px; width: fit-content; margin-bottom: var(--s-5); }
.tab-btn {
  font-family: var(--font-sans); font-size: 14px; font-weight: 600;
  padding: 8px 16px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--fg-muted); cursor: pointer;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.tab-btn.active { background: var(--bg-raised); color: var(--fg-strong); box-shadow: var(--shadow-sm); }

.quick-questions { display: flex; flex-direction: column; gap: var(--s-2); }
.qq-btn {
  font-family: var(--font-sans); font-size: 14px; font-weight: 500; text-align: left;
  background: var(--bg-raised); color: var(--fg); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 11px 14px; cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.qq-btn:hover:not(:disabled) { border-color: var(--border-strong); background: var(--ink-100); }
.qq-btn:disabled { opacity: 0.45; cursor: default; }

/* Dashboard */
.dash {
  display: grid; grid-template-columns: 280px 1fr; height: 480px;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.dash-list { border-right: 1px solid var(--border-soft); overflow-y: auto; }
.dash-list-head {
  padding: var(--s-4); border-bottom: 1px solid var(--border-soft);
}
.convo-row {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left;
  padding: 12px var(--s-4); border: 0; border-bottom: 1px solid var(--border-soft);
  background: transparent; cursor: pointer; font-family: var(--font-sans);
  transition: background var(--dur-fast) var(--ease-out);
}
.convo-row:hover { background: var(--ink-100); }
.convo-row.active { background: var(--mila-accent-soft); box-shadow: inset 2px 0 0 var(--mila-accent); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--ink-150); color: var(--ink-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.convo-meta { flex: 1; min-width: 0; }
.convo-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.convo-name { font-size: 14px; font-weight: 600; color: var(--fg-strong); }
.convo-time { font-size: 11px; color: var(--fg-subtle); font-family: var(--font-mono); white-space: nowrap; }
.convo-snippet { display: block; font-size: 13px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }

.dash-thread { display: flex; flex-direction: column; }
.thread-meta {
  display: flex; align-items: center; gap: 12px;
  padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--border-soft);
}
.thread-name { font-weight: 600; font-size: 14px; color: var(--fg-strong); }
.thread-phone { font-family: var(--font-mono); font-size: 12px; color: var(--fg-subtle); }
.badge-mila {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--bull-600);
  background: var(--bull-50); border-radius: var(--r-pill); padding: 4px 10px;
  margin-left: auto;
}
.badge-mila .online-dot { width: 6px; height: 6px; }
.thread-body { flex: 1; padding: var(--s-5); display: flex; flex-direction: column; gap: 6px; overflow-y: auto; background: var(--ink-50); }
.thread-body .bubble { animation: none; font-size: 14px; }

/* ------- How it works ---------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
.step { display: flex; flex-direction: column; gap: var(--s-3); }
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--mila-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 16px; font-weight: 700;
}
.step h3 { font-size: var(--t-18); font-weight: 600; color: var(--fg-strong); }
.step p { font-size: var(--t-14, 14px); color: var(--fg-muted); line-height: var(--lh-base); max-width: 36ch; }

/* ------- Features -------------------------------------------- */
.features { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.feature-card {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s-6);
  display: flex; flex-direction: column; gap: var(--s-3);
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background 0.3s var(--ease-out);
}
.feature-icon {
  width: 38px; height: 38px; border-radius: var(--r-md);
  background: var(--mila-accent-soft); color: var(--mila-accent);
  display: flex; align-items: center; justify-content: center;
}
.feature-icon svg { width: 19px; height: 19px; }
.feature-card h3 { font-size: var(--t-16); font-weight: 600; color: var(--fg-strong); }
.feature-card p { font-size: 14px; color: var(--fg-muted); line-height: var(--lh-base); }
.feature-card h3, .feature-card p, .feature-card .feature-icon {
  transition: color 0.3s var(--ease-out), background 0.3s var(--ease-out);
}
.feature-card:hover { background: var(--mila-accent-soft); border-color: var(--mila-accent); }
.feature-card:hover .feature-icon { background: var(--mila-accent); color: var(--mila-accent-fg); }

/* ------- CTA footer ------------------------------------------ */
.cta-section { background: var(--ink-900); padding: var(--s-24) 0; }
.cta-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s-5); }
.cta-title {
  font-size: clamp(30px, 3.6vw, 44px); font-weight: 700;
  line-height: var(--lh-snug); letter-spacing: var(--tr-tight);
  color: #F2EFE8; text-wrap: balance;
}
.cta-sub { font-size: var(--t-16); color: #B8B2A2; }
.cta-line2-wrap { display: block; overflow: hidden; }
.cta-line2 {
  display: inline-block; transform: translateY(-110%);
  transition: transform 1.2s var(--ease-out) 0.15s;
}
.cta-title.in-view .cta-line2 { transform: translateY(0); }
.cta-title.in-view .cta-q { animation: q-blink 2.2s steps(1, end) 3.4s infinite; }
@keyframes q-blink { 50% { opacity: 0; } }
.btn-cta { background: #F2EFE8; color: var(--ink-900); }
.btn-cta:hover { background: #fff; }

/* ------- Footer ----------------------------------------------- */
.footer { padding: var(--s-8) 0; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  font-size: var(--t-13); color: var(--fg-subtle);
}
.footer a { color: var(--fg-muted); text-decoration: none; }
.footer a:hover { color: var(--fg); }
.footer-links { display: flex; gap: var(--s-5); }

/* ------- Phase transition ------------------------------------ */
.phase { transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.phase-exit { opacity: 0; transform: translateY(-14px); }
.phase-enter { animation: phase-in 0.4s var(--ease-out) both; }
@keyframes phase-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ------- Responsive ------------------------------------------ */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-12); }
  .hero-phone { order: 2; }
  .steps { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .dash { grid-template-columns: 1fr; height: auto; min-height: 480px; }
  .dash-list { border-right: 0; border-bottom: 1px solid var(--border-soft); max-height: 260px; }
  .demo-split { flex-direction: column; }
  .steps::before, .steps::after { display: none; }
  .demo-section .section-sub { white-space: normal; }
}

/* iOS Safari auto-zooms when a focused input has font-size < 16px. Bumping
   every text input to 16px on mobile prevents that zoom (and the horizontal
   shift that comes with it) without affecting the visual size noticeably. */
@media (max-width: 768px) {
  .field,
  input[type="text"], input[type="email"], input[type="tel"],
  input[type="url"], input[type="password"], input[type="search"],
  input[type="number"], textarea, select {
    font-size: 16px !important;
  }
}

/* ── Phone/tablet (≤768px) — mobile-only UX overrides ───────────── */
@media (max-width: 768px) {
  /* Hero title was being clipped by the sticky nav: kill the negative shift
     and leave breathing room below the 56px header. */
  .hero { padding-top: 24px; min-height: auto; }
  .hero > .container { transform: none; }
  .hero-headline {
    font-size: clamp(22px, 6.4vw, 32px);
    line-height: 1.18;
    letter-spacing: -0.01em;
    /* Reserve room for exactly two lines so the rotating titles don't push
       the rest of the page around as they swap between phrases. */
    min-height: calc(2 * 1.18em);
  }
  .hero-sub { font-size: 14.5px; line-height: 1.4; margin-bottom: 2px; }
  .hero-sub-list { font-size: 11.5px; line-height: 1.45; }
  /* Phones are physically narrower than the longest bullet (~70
     chars). Allow graceful wrap rather than shrinking the font
     below readable. */
  .hero-sub-list li { white-space: normal; }
  /* Tighten the gap between the headline → description → phone. */
  .hero-copy { gap: 14px; }
  .hero-grid { gap: 18px; }
  .hero { padding-top: 18px; padding-bottom: 12px; }
  .hero-phone { transform: none; }

  /* Drop "Watch a fictional business…" subhead so the demo card fits one screen. */
  .demo-section .section-sub { display: none; }
  /* Compact the demo-section head spacing on mobile. */
  .demo-section .section-head { margin-bottom: 12px; }
  /* Demo (landing-page) setup form: only the launch button is interactive;
     inputs are static. Scoped to the landing demo so onboarding inputs on
     get-started.html keep working. */
  .demo-section .demo-card .form-field input,
  .demo-section .demo-card .form-field textarea,
  .demo-section .demo-card .form-field .field { pointer-events: none; user-select: none; }

  /* Shrink the demo card heading so the full sentence stays on one line. */
  .demo-card-head h3 { font-size: 13px !important; line-height: 1.25; white-space: nowrap; }

  /* Two upload-material chips on one horizontal row so they don't take
     two stacked rows of vertical space. */
  .files-row { flex-wrap: nowrap; gap: 6px; min-height: 0; }
  .file-chip { flex: 1 1 0; min-width: 0; padding: 4px 7px; gap: 5px; }
  .file-chip-name {
    font-size: 10.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1 auto;
    min-width: 0;
  }
  .file-chip-size { font-size: 10px; flex-shrink: 0; }

  /* Customer-view Q buttons: kill the hover/focus colour bleed that made the
     first row of buttons look filled-in for a beat on initial render. */
  .qq-btn { transition: none; }
  .qq-btn:hover, .qq-btn:focus, .qq-btn:focus-visible {
    background: var(--bg-raised) !important;
    border-color: var(--border) !important;
  }

  /* When the demo goes live, keep the "Live demo" / "See EZText in action"
     heading in place so the visitor's view doesn't jump. Just compact the
     surrounding spacing and shrink the phone. */
  .demo-section[data-live="1"] .section-head { margin-bottom: 8px; }
  .demo-section[data-live="1"] { padding-top: 8px; }
  .demo-section[data-live="1"] .demo-shell { padding-top: 0; }
  .demo-section[data-live="1"] .demo-split > div:first-child {
    transform: scale(0.72);
    transform-origin: top center;
    margin-bottom: -130px;
  }
  .demo-section[data-live="1"] .demo-split { flex-direction: column; gap: 4px !important; }
  /* 0.5s fade-in for the launched content so the swap feels intentional. */
  .demo-section[data-live="1"] .phase-enter { animation: demo-fade-in 0.5s ease-out both; }
  @keyframes demo-fade-in { from { opacity: 0; } to { opacity: 1; } }

  /* 4 quick-question buttons in a 2x2 grid so the description below stays
     visible without scrolling. */
  .quick-questions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .qq-btn { font-size: 12px; padding: 8px 10px; line-height: 1.25; }

  /* Don't force-stop scroll. Demo still snaps softly the first time the
     visitor scrolls past it (controlled in scroll-fx.js via sessionStorage). */
  .demo-section { scroll-snap-stop: normal; scroll-margin-top: 56px; }
  html.snap-disabled { scroll-snap-type: none !important; }

  /* User asked to drop the hero CTA on mobile. */
  .hero-cta-row { display: none; }

  /* Why EZText — 2×2, tighter padding so all four cards fit one screen. */
  .features { grid-template-columns: 1fr 1fr; gap: 10px; }
  .feature-card { padding: 14px 12px; }
  .feature-card h3 { font-size: 14px; line-height: 1.25; margin: 6px 0 4px; }
  .feature-card p { font-size: 12.5px; line-height: 1.35; }
  .feature-icon { width: 28px; height: 28px; }
  .feature-icon svg { width: 16px; height: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .bubble, .phase-enter { animation: none; }
  .typing-dot { animation: none; opacity: 0.6; }
  .pulse-dot::after { animation: none; }
  .btn-pulse { animation: none; }
  .file-chip, .pop-in { animation: none; }
  .click-cursor { animation: none; }
  .start-hint.nudge { animation: none; }
  .headline-swap { transition: none; }
  .headline-swap.swap-in { animation: none; }
  .steps .step { opacity: 1; transform: none; transition: none; animation: none; }
  .steps::after { transition: none; }
  .cta-line2 { transition: none; transform: none; }
  .cta-title.in-view .cta-q { animation: none; }
}

/* ------- Setup form: example tag, file chips, zip row -------- */
.example-tag {
  font-family: var(--font-mono); font-size: var(--t-12); font-weight: 600;
  letter-spacing: var(--tr-wide); text-transform: uppercase;
  color: var(--fg-muted); background: var(--bg-sunken);
  border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: 5px 12px; white-space: nowrap;
}
.files-row { display: flex; flex-wrap: wrap; gap: var(--s-2); min-height: 38px; align-items: center; }
.file-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-sunken); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 8px 12px;
  color: var(--fg-muted);
  animation: chip-pop 0.28s var(--ease-out) both;
}
.file-chip-name { font-family: var(--font-mono); font-size: var(--t-12); color: var(--fg-strong); }
.file-chip-size { font-size: var(--t-12); color: var(--fg-subtle); }
@keyframes chip-pop {
  from { opacity: 0; transform: scale(0.7); }
  60%  { transform: scale(1.04); }
  to   { opacity: 1; transform: scale(1); }
}
.zip-row { display: flex; align-items: center; gap: var(--s-4); justify-content: space-between; }
.zip-field { width: 140px; }
.pop-in { animation: chip-pop 0.3s var(--ease-out) both; }

/* Pulsing CTA once the form is populated */
.btn-pulse { animation: btn-pulse 1.6s var(--ease-in-out) infinite; }
.btn-please { font-size: 12px; font-weight: 500; font-style: italic; opacity: 0.9; }
@keyframes btn-pulse {
  0%, 100% { box-shadow: var(--shadow-inset), 0 0 0 0 color-mix(in srgb, var(--mila-accent) 50%, transparent); }
  50%      { box-shadow: var(--shadow-inset), 0 0 0 10px color-mix(in srgb, var(--mila-accent) 0%, transparent); }
}

/* Click-here prompt + fake cursor over the launch button */
.launch-wrap { position: relative; margin-top: var(--s-6); margin-bottom: var(--s-8); }
.click-prompt {
  position: absolute; left: 24%; top: -40px;
  display: flex; align-items: flex-start; gap: 6px;
  color: var(--fg-strong); font-weight: 700; font-size: 15px;
  pointer-events: none; white-space: nowrap;
}
.click-prompt-2 {
  right: auto; left: 22%; top: auto; bottom: -42px;
  align-items: flex-end;
}
.click-prompt-2 .click-arrow { transform: scaleY(-1); margin-top: 0; margin-bottom: 8px; }
.click-prompt-3 { right: auto; left: 50%; transform: translateX(-50%); top: -42px; font-style: italic; font-weight: 600; }
.click-arrow { margin-top: 10px; color: var(--fg-strong); }
.click-cursor {
  position: absolute; right: 25%; top: 28px;
  pointer-events: none; z-index: 2;
  animation: cursor-tap 1.5s var(--ease-in-out) infinite;
  filter: drop-shadow(0 1px 2px rgba(15,14,10,0.3));
}
@keyframes cursor-tap {
  0%, 100% { transform: translate(0, 0) scale(1); }
  38%      { transform: translate(-5px, -5px) scale(1); }
  52%      { transform: translate(-5px, -5px) scale(0.8); }
  68%      { transform: translate(-5px, -5px) scale(1); }
}

/* ------- Chat header: plain avatar + call icon --------------- */
.chat-avatar-plain { background: #E9E9EB; font-size: 24px; }
.chat-call {
  position: absolute; right: 18px; top: 72px;
  color: #0A84FF; display: flex; align-items: center; justify-content: center;
}
.chat-call svg { width: 22px; height: 22px; }

/* Centered start hint inside the phone */
.start-hint {
  margin: auto; max-width: 210px;
  background: #F2F2F7; border-radius: 14px; padding: 12px 16px;
  font-size: 13px; line-height: 1.4; color: rgba(60,60,67,0.6);
  text-align: center;
  font-family: -apple-system, system-ui, sans-serif;
  transform-origin: center;
}
.start-hint.nudge {
  animation: hint-nudge 0.7s var(--ease-out);
  color: var(--fg-strong); background: #E9E9EB;
}
@keyframes hint-nudge {
  0%   { transform: scale(1) rotate(0deg); }
  18%  { transform: scale(1.16) rotate(-2.5deg); }
  34%  { transform: scale(1.16) rotate(2.5deg); }
  50%  { transform: scale(1.16) rotate(-2deg); }
  66%  { transform: scale(1.12) rotate(1.5deg); }
  82%  { transform: scale(1.06) rotate(-0.5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* Subtle inline "click here" link in the example-questions hint */
.byo-link {
  color: inherit; font-weight: 600;
  text-decoration: underline; text-underline-offset: 2px;
  text-decoration-thickness: 1px; cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out);
}
.byo-link:hover { color: var(--mila-accent); }

/* The phone is a faux UI; never show the I-beam text cursor anywhere inside it. */
.demo-section .demo-split *, .demo-section .demo-split { cursor: default; }
.demo-section .demo-split .qq-btn:not(:disabled) { cursor: pointer; }

/* ------- iMessage compose bar -------------------------------- */
.compose {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px 44px; border-top: 0.5px solid rgba(60,60,67,0.16);
  background: #fff; position: relative; z-index: 5;
  cursor: default;
}
.compose.compose-kb { padding-bottom: 10px; }
.compose.compose-low { padding-bottom: 12px; }
.compose-input {
  flex: 1; min-height: 34px; border: 1px solid rgba(60,60,67,0.25);
  cursor: default;
  border-radius: 17px; padding: 7px 14px;
  font-size: 15px; line-height: 1.3; letter-spacing: -0.2px;
  color: rgba(60,60,67,0.45); display: flex; align-items: center;
  font-family: -apple-system, system-ui, sans-serif;
}
.compose-input.has-text { color: #000; }
.compose-caret {
  display: inline-block; width: 2px; height: 17px; margin-left: 1px;
  background: #0A84FF; animation: caret-blink 0.9s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }
.compose-send {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: rgba(118,118,128,0.16); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast) var(--ease-out);
}
.compose-send.active { background: var(--mila-bubble); }

/* ------- Asked question buttons ------------------------------ */
.qq-btn.asked, .qq-btn.asked:disabled {
  text-decoration: line-through; opacity: 0.4; cursor: default;
}

/* ------- Prominent centered tabs ------------------------------ */
.tab-row-big {
  margin: 0 auto var(--s-8); padding: 5px;
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.tab-row-big .tab-btn { font-size: 15px; padding: 11px 28px; border-radius: var(--r-md); }

/* ------- Business view: unread + call ------------------------- */
.convo-row { position: relative; }
.unread-dot { display: none; }
.convo-row.unread .unread-dot {
  display: block; width: 8px; height: 8px; border-radius: 50%;
  background: #0A84FF; position: absolute; left: 7px; top: 50%;
  transform: translateY(-50%);
}
.convo-row.unread .convo-name { font-weight: 700; }
.convo-row.unread .convo-snippet { color: var(--fg); font-weight: 500; }
.thread-call {
  margin-left: auto; width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-sunken); border: 1px solid var(--border);
  color: var(--fg-muted); display: flex; align-items: center; justify-content: center;
}

/* ------- Modal (Get started placeholder) ----------------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg-overlay);
  display: flex; align-items: center; justify-content: center;
  padding: var(--s-6);
}
.modal-overlay[hidden] { display: none; }
.modal-card {
  position: relative; width: 100%; max-width: 420px;
  background: var(--bg-raised); border-radius: var(--r-xl);
  box-shadow: var(--shadow-pop); padding: var(--s-8);
  display: flex; flex-direction: column; gap: var(--s-3);
  animation: chip-pop 0.25s var(--ease-out) both;
}
.modal-card h3 { font-size: var(--t-20); font-weight: 600; color: var(--fg-strong); }
.modal-card p { font-size: 14px; color: var(--fg-muted); line-height: var(--lh-base); }
.modal-card .btn { align-self: flex-start; margin-top: var(--s-2); }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: transparent; color: var(--fg-muted); cursor: pointer;
  font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--ink-100); color: var(--fg-strong); }

/* ------- Section band (How it works) -------------------------- */
.section-band {
  background: var(--bg-raised);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

/* ------- Steps reveal -------------------------------------------
   No more connecting line. Each card slides in when it enters the viewport
   (scrolling down) and slides out when it leaves (scrolling up). */
.steps { position: relative; --steps-progress: 0; }
.steps::before, .steps::after { content: none; display: none; }
.steps .step-num { position: relative; z-index: 1; }
.steps .step {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.steps .step.step-in {
  opacity: 1;
  transform: translateY(0);
  animation: none !important;
}
.steps .step.step-out {
  opacity: 0;
  transform: translateY(-40px);
  animation: none !important;
}
@media (max-width: 768px) {
  /* Bidirectional slide-in/out driven by scroll direction. */
  .steps .step {
    transform: translateY(40px);
    transition: opacity 0.45s ease, transform 0.45s ease;
    animation: none !important;
  }
  .steps .step.step-in { opacity: 1; transform: translateY(0); animation: none !important; }
  .steps .step.step-out { opacity: 0; transform: translateY(-40px); animation: none !important; }
}
@keyframes step-pop {
  0%   { opacity: 0; transform: translateY(26px) scale(0.92); }
  30%  { opacity: 1; }
  70%  { opacity: 1; transform: translateY(-3px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ------- How-it-works: pinned scroll scrub ------------------- */
/* While "pinning", the section sticks centered in the viewport and
   scrolling drives the progress line. After one full pass, JS removes
   the pin and the section becomes fully static. */
.steps-pin.pinning > .section-band {
  position: sticky; top: 0; height: 100vh; box-sizing: border-box;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.steps-pin.pinning > .section-band > .container { width: 100%; }
.steps-pin.steps-done .steps .step { opacity: 1; animation: none; }

/* ------- Short windows: hide the above-button nudges ---------- */
@media (max-height: 780px) {
  .click-prompt:not(.click-prompt-2) { display: none; }
}

/* ------- Compact chat header (customer-view phone) ------------ */
.chat-header-compact { padding-top: 48px; }
.chat-header-compact .chat-avatar { width: 42px; height: 42px; font-size: 19px; }
.chat-header-compact .chat-call { top: 58px; }

/* ── Demo card title click-pulse ───────────────────────────── */
.demo-card-title-pulse {
  animation: demoTitlePulse 380ms ease-out;
}
@keyframes demoTitlePulse {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .demo-card-title-pulse { animation: none; }
}

/* No input boxes live on the landing page (the BYO setup form is
   display-only), so the text-input I-beam cursor never makes sense.
   Force default on every element of the demo card + readonly fields
   to keep the hover affordance consistent. */
.demo-section, .demo-section *,
.demo-card, .demo-card * { cursor: default; }
.demo-card a,
.demo-card button,
.demo-card .qq-btn,
.demo-card .byo-link { cursor: pointer; }
