:root {
  color-scheme: dark;
  --bg: #06060f;
  --bg-alt: #0b0b18;
  --card: #10101e;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f4fa;
  --muted: rgba(255, 255, 255, 0.66);
  --dim: rgba(255, 255, 255, 0.48);
  /* Bifaria's pill colors (Theme.swift / VoicePill) */
  --violet: #7c6fff;
  --violet-light: #a593ff;
  --orange: #ff8a4c;
  --orange-light: #ffb98c;
  --pink: #e58bdb;
  --cyan: #00d4ff;
  --green: #00e5a0;
  --brand: linear-gradient(90deg, #6a5cff, #ff7aa8, #ff8a3d);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--violet-light); }
img { display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--dim); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(6, 6, 15, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-row { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; }
.brand img { border-radius: 7px; }
.brand-small { font-size: 15px; }
.nav-links { display: flex; gap: 20px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; }
.nav-links a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 999px;
  background: var(--brand); color: #fff; font-weight: 600; text-decoration: none;
  border: 0; box-shadow: 0 8px 30px rgba(124, 111, 255, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 36px rgba(255, 122, 168, 0.35); }
.btn-small { padding: 8px 16px; font-size: 14px; }
.btn-ghost { background: transparent; border: 1px solid rgba(255, 255, 255, 0.18); box-shadow: none; }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.4); box-shadow: none; }
.btn-disabled { background: rgba(255, 255, 255, 0.08); color: var(--muted); box-shadow: none; cursor: default; }
.btn-disabled:hover { transform: none; box-shadow: none; }

/* Hero */
.hero { padding: 88px 0 72px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--violet-light); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; margin: 0 0 16px; }
h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 20px; }
.grad { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 19px; color: var(--muted); max-width: 520px; margin: 0 0 28px; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.fine { color: var(--dim); font-size: 13px; margin: 14px 0 0; }

/* Demo pill */
.demo { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 320px; }
.glow {
  position: absolute; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 111, 255, 0.45), rgba(255, 122, 168, 0.18) 45%, transparent 70%);
  filter: blur(30px); transition: background 0.6s ease;
}
.demo[data-mode="translate"] .glow { background: radial-gradient(circle, rgba(255, 138, 76, 0.45), rgba(229, 139, 219, 0.18) 45%, transparent 70%); }
.pill {
  --c: var(--violet);
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 12px 22px 12px 12px; border-radius: 999px; min-width: 250px;
  background: linear-gradient(135deg, #131326, #0d0d1e);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent), 0 20px 60px rgba(0, 0, 0, 0.6);
  transition: box-shadow 0.4s ease;
}
.pill-icon {
  position: relative; width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: color-mix(in srgb, var(--c) 16%, transparent);
  display: grid; place-items: center;
}
.pill-icon > span { position: absolute; display: flex; align-items: center; gap: 3px; opacity: 0; transition: opacity 0.3s ease; }
.bars i { width: 3px; height: 8px; border-radius: 2px; background: var(--c); animation: bar 0.9s ease-in-out infinite; }
.bars i:nth-child(2) { animation-delay: -0.2s; }
.bars i:nth-child(3) { animation-delay: -0.45s; }
.bars i:nth-child(4) { animation-delay: -0.1s; }
.bars i:nth-child(5) { animation-delay: -0.6s; }
@keyframes bar { 0%, 100% { height: 6px; } 50% { height: 22px; } }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); animation: dot 1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 100% { opacity: 0.3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.check { color: var(--c); font-weight: 700; font-size: 20px; }
.pill[data-state="listen"] .bars,
.pill[data-state="work"] .dots,
.pill[data-state="done"] .check { opacity: 1; }
.pill-text { display: flex; flex-direction: column; line-height: 1.25; }
.pill-text b { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c); font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.pill-text small { color: var(--muted); font-size: 13px; }
.demo-out {
  position: relative; margin: 22px 0 0; width: 320px; max-width: 100%; min-height: 72px;
  padding: 12px 16px; border-radius: 12px;
  background: rgba(16, 16, 30, 0.85); border: 1px solid var(--border);
  color: var(--text); font-size: 15px; transition: opacity 0.3s ease;
}
.demo-out::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -3px; background: var(--violet-light); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* Strip */
.strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.strip-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 16px; color: var(--muted); font-size: 14px; }
.strip-row span::before { content: "●"; color: var(--violet); margin-right: 8px; font-size: 10px; vertical-align: 2px; }
.strip-row span:nth-child(2)::before { color: var(--pink); }
.strip-row span:nth-child(3)::before { color: var(--orange); }
.strip-row span:nth-child(4)::before { color: var(--green); }

/* Sections */
.section { padding: 88px 0; scroll-margin-top: 60px; }
.section-alt { background: var(--bg-alt); }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 14px; }
h3 { font-size: 19px; margin: 0 0 8px; }
.section-lead { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 0 40px; }

.ways { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.way { padding: 28px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); }
.way p { color: var(--muted); }
.way-dictate { box-shadow: inset 0 3px 0 var(--violet); }
.way-translate { box-shadow: inset 0 3px 0 var(--orange); }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; margin-bottom: 14px; }
.way-dictate .tag { color: var(--violet-light); background: rgba(124, 111, 255, 0.14); }
.way-translate .tag { color: var(--orange-light); background: rgba(255, 138, 76, 0.14); }
.steps { margin: 16px 0 0; padding-left: 20px; color: var(--text); }
.steps li { margin: 4px 0; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.card { padding: 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); }
.card p { color: var(--muted); margin: 0; font-size: 15px; }

.privacy { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding: 8px 0 8px 30px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.proof { padding: 28px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); }
.proof p { color: var(--muted); margin: 0 0 20px; }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.plan { display: flex; flex-direction: column; align-items: flex-start; padding: 32px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); }
.plan p { color: var(--muted); }
.plan .btn { margin-top: auto; }
.plan .fine { margin-top: 12px; }
.price { font-size: 30px; font-weight: 700; color: var(--text) !important; margin: 0 0 8px; }
.plan-free { border-color: rgba(124, 111, 255, 0.35); }

.faq details { max-width: 760px; }
details { border-bottom: 1px solid var(--border); padding: 18px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--dim); font-weight: 400; }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); margin: 10px 0 0; }

.footer { border-top: 1px solid var(--border); padding: 28px 0; font-size: 14px; }
.footer-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 18px; margin-left: auto; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-row .btn-small { margin-left: auto; }
  .hero { padding: 56px 0 48px; }
  .hero-grid, .ways, .privacy, .plans { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .demo { min-height: 240px; }
  .section { padding: 64px 0; }
  .footer nav { margin-left: 0; }
}

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