/* Code Switch — landing page.
   Design authority: .impeccable.md. Same token grammar as the app's style.css:
   near-black dark mode, azure primary accent, language hues (ES coral / EN azure /
   FR violet) used meaningfully (only ever alongside a text label). Precise, calm,
   tool-like. Light and dark both first-class. System fonts, no frameworks. */

:root {
  --bg: #0f0f0f;
  --bg-elev: #161616;
  --surface: #1c1c1c;
  --text-primary: #ebebeb;
  --text-secondary: #8c8c8c;
  --hairline: #2e2e2e;

  --accent: #4d94ff;
  --on-accent: #ffffff;

  --hue-es: #f5735c;   /* coral */
  --hue-fr: #9985fa;   /* violet */
  --hue-en: var(--accent); /* azure */

  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "SF Pro Text",
    "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Menlo", monospace;

  --maxw: 1080px;
  --pad: clamp(20px, 5vw, 40px);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f7f7;
    --bg-elev: #ffffff;
    --surface: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #6b6b70;
    --hairline: #e2e2e4;

    --accent: #1a73f2;
    --hue-es: #d95240;
    --hue-fr: #7359d9;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { letter-spacing: -0.02em; margin: 0; }

/* Visible keyboard focus — restrained, azure, consistent across every surface. */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
:focus:not(:focus-visible) { outline: none; }

/* ============================ BUTTONS ============================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 22px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary {
  background: var(--surface);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.btn-secondary:hover { border-color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text-primary); }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 0.92rem; border-radius: 10px; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 1.05rem; }

/* ============================ NAV ============================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
  padding: 0 var(--pad);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}
.nav-mark { display: inline-flex; gap: 3px; align-items: center; }
.nav-mark i {
  width: 6px; height: 16px; border-radius: 3px; display: block;
}
.nav-mark i:nth-child(1) { background: var(--hue-es); }
.nav-mark i:nth-child(2) { background: var(--hue-en); height: 20px; }
.nav-mark i:nth-child(3) { background: var(--hue-fr); }

.nav-links {
  display: flex;
  gap: 22px;
  margin-left: 8px;
}
.nav-links a { color: var(--text-secondary); font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--text-primary); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

@media (max-width: 780px) {
  .nav-links { display: none; }
}

/* ============================ HERO ============================ */

.hero {
  padding: clamp(56px, 10vw, 104px) var(--pad) clamp(40px, 7vw, 72px);
}
.hero-inner { max-width: 820px; margin: 0 auto; text-align: center; }

.eyebrow {
  display: inline-block;
  margin: 0 0 20px;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
}
.hero-title {
  font-size: clamp(2.1rem, 6.2vw, 3.9rem);
  font-weight: 800;
  line-height: 1.06;
}
.brk { display: none; }
@media (min-width: 640px) { .brk { display: inline; } }

.hero-sub {
  margin: 22px auto 0;
  max-width: 40rem;
  font-size: clamp(1.05rem, 2.4vw, 1.28rem);
  color: var(--text-secondary);
  line-height: 1.5;
}
.hero-cta {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-note { margin: 16px 0 0; font-size: 0.9rem; color: var(--text-secondary); }

/* Live caption vignette — shows a real mid-sentence shift */
.hero-vignette {
  max-width: 560px;
  margin: 52px auto 0;
  padding: 22px 24px;
  text-align: left;
  background: var(--bg-elev);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.55);
}
.vg-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.vg-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: var(--surface);
  border-radius: var(--radius-pill);
}
.vg-pill i { width: 7px; height: 7px; border-radius: 50%; }
.vg-es i { background: var(--hue-es); }
.vg-speaker { font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); }
.vg-caption {
  margin: 0;
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}
.vg-shift {
  color: var(--accent);
  border-bottom: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
  padding-bottom: 1px;
}
.vg-foot {
  display: flex; align-items: center; gap: 10px;
  margin-top: 16px;
  font-size: 0.8rem; color: var(--text-secondary);
}
.vg-tag {
  padding: 2px 8px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border-radius: var(--radius-pill);
  font-weight: 600;
}
.vg-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-secondary); opacity: 0.5; }
.vg-latency { font-variant-numeric: tabular-nums; }

/* ============================ SECTIONS ============================ */

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 88px) var(--pad);
  border-top: 1px solid var(--hairline);
}
.section-head { max-width: 46rem; margin: 0 auto clamp(32px, 5vw, 52px); text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 4.2vw, 2.5rem); font-weight: 800; }
.section-lead { margin: 16px auto 0; color: var(--text-secondary); font-size: 1.08rem; max-width: 42rem; }

/* ---- Mesh mic illustration (pure CSS) ---- */
.mesh { display: flex; justify-content: center; margin: 8px 0 48px; }
.mesh-table {
  position: relative;
  width: min(420px, 80vw);
  aspect-ratio: 1 / 0.72;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at center, color-mix(in srgb, var(--accent) 9%, transparent), transparent 62%),
    var(--surface);
  border: 1px solid var(--hairline);
}
.mesh-phone {
  position: absolute;
  width: 30px; height: 58px;
  border-radius: 7px;
  background: var(--bg-elev);
  border: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: center;
}
.mesh-phone span {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent);
  opacity: 0.85;
  animation: meshPulse 2.4s ease-in-out infinite;
}
.mesh-phone.p1 { top: -20px; left: 22%; }
.mesh-phone.p2 { top: -20px; right: 22%; transform: rotate(8deg); }
.mesh-phone.p1 span { background: var(--hue-es); animation-delay: 0s; }
.mesh-phone.p2 span { background: var(--hue-en); animation-delay: 0.5s; }
.mesh-phone.p3 { bottom: -22px; left: 20%; transform: rotate(-6deg); }
.mesh-phone.p4 { bottom: -22px; right: 20%; transform: rotate(5deg); }
.mesh-phone.p3 span { background: var(--hue-fr); animation-delay: 1s; }
.mesh-phone.p4 span { background: var(--hue-en); animation-delay: 1.5s; }

.mesh-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.mesh-wave { display: flex; align-items: flex-end; gap: 4px; height: 34px; }
.mesh-wave i {
  width: 4px; border-radius: 2px;
  background: var(--accent);
  animation: meshWave 1.1s ease-in-out infinite;
}
.mesh-wave i:nth-child(1) { height: 40%; animation-delay: 0s; }
.mesh-wave i:nth-child(2) { height: 75%; animation-delay: 0.15s; }
.mesh-wave i:nth-child(3) { height: 100%; animation-delay: 0.3s; }
.mesh-wave i:nth-child(4) { height: 65%; animation-delay: 0.45s; }
.mesh-wave i:nth-child(5) { height: 45%; animation-delay: 0.6s; }
.mesh-core-label {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-secondary);
}
@keyframes meshPulse { 0%, 100% { opacity: 0.4; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes meshWave { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  .mesh-phone span, .mesh-wave i { animation: none !important; }
}

/* ---- Steps ---- */
.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.step-n {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 700;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 50%;
}
.steps h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--text-secondary); font-size: 0.98rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ---- Features ---- */
.features {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}
.feature {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
}
.feature h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 8px; }
.feature p { margin: 0; color: var(--text-secondary); font-size: 0.97rem; }
.feature-lead {
  grid-column: span 3;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%),
    var(--surface);
}
.feature-lead h3 { font-size: 1.4rem; }
.feature-lead p { font-size: 1.05rem; max-width: 52rem; }
.feature-hues { display: flex; gap: 6px; margin-bottom: 14px; }
.feature-hues span { width: 26px; height: 6px; border-radius: 3px; }
.feature-hues span:nth-child(1) { background: var(--hue-es); }
.feature-hues span:nth-child(2) { background: var(--hue-en); }
.feature-hues span:nth-child(3) { background: var(--hue-fr); }
@media (max-width: 880px) {
  .features { grid-template-columns: 1fr 1fr; }
  .feature-lead { grid-column: span 2; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .feature-lead { grid-column: span 1; }
}

/* ---- Comparison table ---- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.compare th, .compare td {
  padding: 12px 14px;
  text-align: center;
  border-bottom: 1px solid var(--hairline);
}
.compare thead th {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.9rem;
  vertical-align: bottom;
}
.compare thead th span {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.compare tbody th[scope="row"] {
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
}
.compare tbody th span {
  display: block;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.compare .rowhead { border-bottom: 1px solid var(--hairline); }
.compare .us { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.compare thead .us { border-radius: 10px 10px 0 0; }
.compare tr.highlight th, .compare tr.highlight td { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.compare tr.highlight .us { background: color-mix(in srgb, var(--accent) 13%, transparent); }
.yes { color: var(--accent); font-weight: 700; }
.us .yes { color: var(--accent); }
.no { color: var(--text-secondary); }
.part { color: var(--hue-fr); font-weight: 600; }
.price { color: var(--accent); font-weight: 700; }
.muted { color: var(--text-secondary); }
.footnote { margin: 16px 0 0; font-size: 0.82rem; color: var(--text-secondary); }

/* ---- Pricing ---- */
.pricing-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(5, 1fr);
  align-items: start;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 20px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  min-height: 100%;
}
.plan-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 20px 50px -30px color-mix(in srgb, var(--accent) 60%, transparent);
}
.plan-badge {
  position: absolute;
  top: -11px; left: 50%; transform: translateX(-50%);
  padding: 3px 12px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.plan h3 { font-size: 1.12rem; font-weight: 700; }
.plan-price {
  margin: 10px 0 2px;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.plan-price span { font-size: 0.86rem; font-weight: 500; color: var(--text-secondary); letter-spacing: 0; }
.plan-annual { margin: 0 0 4px; font-size: 0.8rem; color: var(--text-secondary); }
.plan-desc { margin: 8px 0 14px; font-size: 0.92rem; color: var(--text-secondary); }
.plan-feats {
  list-style: none;
  margin: 0 0 20px; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
  flex: 1 1 auto;
}
.plan-feats li {
  position: relative;
  padding-left: 22px;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.plan-feats li::before {
  content: "";
  position: absolute; left: 0; top: 7px;
  width: 12px; height: 7px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.plan .btn { width: 100%; }
@media (max-width: 980px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pricing-grid { grid-template-columns: 1fr; } }

.pricing-notes { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; max-width: 46rem; }
.pricing-notes p { margin: 0; font-size: 0.9rem; color: var(--text-secondary); }
.pricing-notes strong { color: var(--text-primary); font-weight: 600; }
.pricing-status { min-height: 1.2em; font-weight: 500; color: var(--accent); }

/* ---- FAQ ---- */
.faq { max-width: 46rem; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--hairline);
  padding: 4px 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 32px 16px 0;
  position: relative;
  font-size: 1.05rem;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 4px; top: 14px;
  font-size: 1.4rem; font-weight: 400;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { content: "\2013"; }
.faq p { margin: 0 0 16px; color: var(--text-secondary); font-size: 0.98rem; }

/* ---- Closing CTA ---- */
.closing {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 96px) var(--pad);
  text-align: center;
  border-top: 1px solid var(--hairline);
}
.closing h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); font-weight: 800; }
.closing p { margin: 14px auto 28px; color: var(--text-secondary); max-width: 34rem; }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--hairline); background: var(--bg-elev); }
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px var(--pad);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}
.footer-brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 1rem;
}
.footer-privacy { margin: 0; flex: 1 1 280px; font-size: 0.86rem; color: var(--text-secondary); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text-secondary); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text-primary); }

/* ============================ MODAL (shared grammar) ============================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: color-mix(in srgb, #000 50%, transparent);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--bg-elev);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  box-shadow: 0 24px 70px -18px rgba(0, 0, 0, 0.6);
}
.modal-close {
  position: absolute;
  top: 12px; right: 14px;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; line-height: 1;
  color: var(--text-secondary);
  background: transparent; border: 0; cursor: pointer;
  border-radius: 50%;
}
.modal-close:hover { background: var(--surface); }
.modal-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 10px; }
.modal-body { margin: 0 0 20px; color: var(--text-secondary); font-size: 0.95rem; line-height: 1.5; }
.modal-body strong { color: var(--text-primary); font-weight: 600; }
.modal-label {
  display: block;
  font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.modal-input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  font-family: var(--font);
  font-size: 1.02rem;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s ease;
}
.modal-input:focus { border-color: var(--accent); }
.modal-actions { margin-top: 18px; }
.modal-actions .btn { width: 100%; }
.modal-error { margin: 12px 0 0; min-height: 1.2em; color: var(--hue-es); font-size: 0.9rem; font-weight: 500; }
.modal-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  font-size: 0.85rem; line-height: 1.45;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 10px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
