/* Speech Layer homepage */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --card: #ffffff;
  --card-edge: #e4e7ed;
  --text: #161c26;
  --muted: #57606e;
  --faint: #8a93a3;
  --accent: #1c64d8;
  --accent-hover: #1853b4;
  --accent-soft: rgba(28, 100, 216, 0.07);
  --accent-edge: rgba(28, 100, 216, 0.24);
  --term-bg: #10151d;
  --term-edge: #232c3a;
  --term-text: #c9d2e0;
  --radius: 12px;
  --max: 1120px;
}

[data-theme="dark"] {
  --bg: #0d1117;
  --bg-soft: #10151c;
  --card: #151b24;
  --card-edge: #262f3d;
  --text: #e8ebf1;
  --muted: #9aa3b2;
  --faint: #6d7686;
  --accent: #5b93ec;
  --accent-hover: #7aa7f0;
  --accent-soft: rgba(91, 147, 236, 0.1);
  --accent-edge: rgba(91, 147, 236, 0.3);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .2s ease, color .2s ease;
}

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

a { color: inherit; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-edge);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 28px;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; display: block; }
.brand span em { font-style: normal; color: var(--accent); }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.main-nav > a { color: var(--muted); text-decoration: none; font-size: 15px; transition: color .15s ease; }
.main-nav > a:hover { color: var(--text); }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 22px; border-radius: 9px;
  font-weight: 600; font-size: 15.5px; text-decoration: none;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--card-edge); color: var(--text); background: var(--card); }
.btn-ghost:hover { border-color: var(--faint); }
.btn-small { padding: 8px 16px; font-size: 14px; }
.btn svg { width: 17px; height: 17px; fill: currentColor; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 9px;
  border: 1px solid var(--card-edge); background: var(--card); color: var(--muted);
  cursor: pointer; transition: color .15s ease, border-color .15s ease;
}
.theme-toggle:hover { color: var(--text); border-color: var(--faint); }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; padding: 96px 0 84px; overflow: hidden;
  background:
    radial-gradient(720px 300px at 50% -60px, var(--accent-soft), transparent 70%);
}
.hero .wrap { position: relative; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  border: 1px solid var(--card-edge); border-radius: 999px;
  padding: 7px 16px; background: var(--card);
  transition: color .15s ease, border-color .15s ease;
}
a.eyebrow:hover { color: var(--text); border-color: var(--faint); }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero h1 {
  margin: 26px auto 18px; max-width: 820px;
  font-size: clamp(38px, 6vw, 62px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800;
}
.hero h1 .accent, #for-coders h2 .accent { color: var(--accent); }
/* Yellow marker stripe: waits ~1.4s after load, then strokes in behind the phrase */
.hero h1 .hl {
  position: relative;
  display: inline;
  z-index: 0;
  white-space: nowrap;
  padding: 0 0.08em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hero h1 .hl::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.06em;
  right: -0.06em;
  top: 0.52em;
  bottom: 0.05em;
  background: linear-gradient(180deg, rgba(255, 214, 64, 0.92) 0%, rgba(255, 196, 40, 0.78) 100%);
  border-radius: 0.12em;
  box-shadow: 0 0 0 1px rgba(230, 170, 20, 0.18);
  transform: scaleX(0);
  transform-origin: left center;
  animation: sl-hl 0.7s cubic-bezier(0.22, 1, 0.36, 1) 1.4s forwards;
}
@keyframes sl-hl {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
[data-theme="dark"] .hero h1 .hl::before {
  background: linear-gradient(180deg, rgba(230, 180, 40, 0.72) 0%, rgba(200, 150, 28, 0.58) 100%);
  box-shadow: 0 0 0 1px rgba(255, 210, 70, 0.18);
}
@media (prefers-reduced-motion: reduce) {
  .hero h1 .hl::before { animation: none; transform: scaleX(1); }
}
.hero p.lede { max-width: 640px; margin: 0 auto 36px; color: var(--muted); font-size: 19px; }
.hero-cta { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* Coder block: one voice line fanning out to parallel coding agents */
.coder-viz { max-width: 760px; margin: 44px auto 0; }
.viz-voice {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--accent-edge); background: var(--accent-soft);
  border-radius: 999px; padding: 10px 22px;
  font-size: 15.5px; font-weight: 600; color: var(--text);
}
.viz-mic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); flex: none; }
.viz-mic svg { width: 16px; height: 16px; stroke: #fff; }
.wave { display: inline-flex; align-items: center; gap: 3px; height: 18px; }
.wave i { width: 3px; border-radius: 2px; background: var(--accent); animation: sl-wave 1.7s ease-in-out infinite; }
.wave i:nth-child(1) { height: 6px;  animation-delay: 0s; }
.wave i:nth-child(2) { height: 12px; animation-delay: .15s; }
.wave i:nth-child(3) { height: 18px; animation-delay: .3s; }
.wave i:nth-child(4) { height: 10px; animation-delay: .45s; }
.wave i:nth-child(5) { height: 16px; animation-delay: .6s; }
.wave i:nth-child(6) { height: 8px;  animation-delay: .75s; }
.wave i:nth-child(7) { height: 13px; animation-delay: .9s; }
@keyframes sl-wave { 0%, 100% { transform: scaleY(0.55); } 50% { transform: scaleY(1); } }
.viz-fan { margin: 12px 0; font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.viz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.viz-pane {
  border: 1px solid var(--card-edge); border-radius: var(--radius);
  background: var(--card); padding: 13px 15px; text-align: left;
  box-shadow: 0 10px 26px rgba(16, 21, 29, 0.06);
}
.vp-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 11px; }
.vp-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--card-edge); }
.vp-bar span { margin-left: 5px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; color: var(--faint); }
.vp-lines .l { display: block; height: 7px; border-radius: 4px; background: var(--card-edge); margin-bottom: 6px; }
.vp-lines .l.a { background: var(--accent-edge); }
.vp-lines .l:last-child { margin-bottom: 0; }
.vp-lines .w35 { width: 35%; } .vp-lines .w40 { width: 40%; } .vp-lines .w45 { width: 45%; }
.vp-lines .w50 { width: 50%; } .vp-lines .w55 { width: 55%; } .vp-lines .w60 { width: 60%; }
.vp-lines .w65 { width: 65%; } .vp-lines .w70 { width: 70%; }
.vp-status { display: flex; align-items: center; gap: 7px; margin-top: 11px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.vp-status .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.vp-status.ok .dot { background: #1a9e54; }
.vp-status.run .dot { background: var(--accent); animation: sl-pulse 1.8s ease-in-out infinite; }
@keyframes sl-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.viz-reply {
  margin: 14px auto 0; display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  border: 1px solid var(--card-edge); background: var(--card); border-radius: 999px;
  padding: 10px 18px; font-size: 14.5px; font-weight: 600; color: var(--text);
  box-shadow: 0 10px 26px rgba(16, 21, 29, 0.06);
}
.viz-sound { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); border: 1px solid var(--accent-edge); flex: none; }
.viz-sound svg { width: 15px; height: 15px; stroke: var(--accent); }
@media (max-width: 640px) {
  .viz-grid { grid-template-columns: 1fr; }
  .viz-reply { border-radius: var(--radius); }
}
@media (prefers-reduced-motion: reduce) {
  .wave i, .vp-status.run .dot { animation: none; }
}

/* ---------- sections ---------- */
section { padding: 84px 0; }
section + section { border-top: 1px solid var(--card-edge); }
section.tinted { background: var(--bg-soft); }

/* Voice demo: the centerpiece. Visual weight on par with the hero,
   everything below reads as supporting detail. */
#voice-demo { background: var(--bg-soft); padding: 92px 0 100px; }
#voice-demo .sec-head { max-width: 780px; margin-bottom: 34px; }
#voice-demo .sec-head h2 { font-size: clamp(34px, 4.6vw, 48px); }
#voice-demo .sec-head p { font-size: 19px; }
#voice-demo .sl-demo { max-width: 880px; margin: 0 auto; }
#voice-demo .sl-demo-tabs { justify-content: center; }

/* Built-with strip: quiet, playful stack chips low on the page */
#built-with { padding: 60px 0 68px; text-align: center; }
.bw-kicker { font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.bw-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 860px; margin: 20px auto 0; padding: 0; list-style: none; }
.bw-row > li { display: contents; }
a.bw-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px 5px 6px;
  border: 1px solid var(--card-edge); border-radius: 999px;
  background: var(--card); color: var(--muted);
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  transition: border-color .15s ease, color .15s ease, background .15s ease, transform .15s ease;
}
a.bw-chip:hover { border-color: var(--accent-edge); color: var(--text); background: var(--accent-soft); }
a.bw-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Wordmark-only chips (no logo asset found) get equal side padding */
a.bw-chip > span:only-child { padding: 0 4px; }
a.bw-chip.bw-chip-wide { padding: 6px 12px; }
.bw-logo {
  width: 24px; height: 24px; border-radius: 6px; object-fit: contain;
  /* no background: dark-theme invert() would flip a painted bg into a solid white tile */
  flex: none;
  filter: grayscale(1); opacity: 0.88;
  transition: filter .15s ease, opacity .15s ease;
}
.bw-logo-photo { object-fit: cover; background: var(--bg-soft); }
a.bw-chip:hover .bw-logo { filter: none; opacity: 1; }
/* Monochrome marks invert cleanly in dark; photo chips stay as-is */
[data-theme="dark"] .bw-logo:not(.bw-logo-photo) { filter: invert(1); opacity: 0.92; }
[data-theme="dark"] a.bw-chip:hover .bw-logo:not(.bw-logo-photo) { filter: invert(1); opacity: 1; }
[data-theme="dark"] .bw-logo-photo { filter: grayscale(0.35); opacity: 0.92; }
[data-theme="dark"] a.bw-chip:hover .bw-logo-photo { filter: none; opacity: 1; }
.bw-wordmark {
  display: block; height: 18px; width: auto; max-width: 130px;
  object-fit: contain; opacity: 0.88;
  transition: opacity .15s ease;
}
a.bw-chip:hover .bw-wordmark { opacity: 1; }
[data-theme="dark"] .bw-wordmark { filter: brightness(1.25); opacity: 0.92; }
.bw-note { margin: 18px auto 0; max-width: 520px; font-size: 14px; color: var(--faint); }
.sec-head { max-width: 680px; margin-bottom: 52px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-kicker {
  font-size: 13px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--accent);
}
.sec-head h2 { margin: 10px 0 12px; font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.02em; line-height: 1.15; }
.sec-head p { color: var(--muted); font-size: 17.5px; }

/* feature grid */
.grid { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--radius);
  padding: 28px 26px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.card:hover { border-color: var(--accent-edge); box-shadow: 0 8px 24px rgba(16, 21, 29, 0.06); }
.card .icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); border: 1px solid var(--accent-edge);
  margin-bottom: 18px;
}
.card .icon svg { width: 22px; height: 22px; stroke: var(--accent); }
.card h3 { font-size: 18px; margin-bottom: 8px; letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 15.5px; }

/* why list */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.why-item { display: flex; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--card-edge); }
.why-item:nth-last-child(-n+2) { border-bottom: 0; }
.why-item .tick {
  flex: 0 0 26px; height: 26px; margin-top: 3px; border-radius: 50%;
  background: var(--accent-soft); border: 1px solid var(--accent-edge);
  display: flex; align-items: center; justify-content: center;
}
.why-item .tick svg { width: 13px; height: 13px; stroke: var(--accent); }
.why-item h3 { font-size: 17px; margin-bottom: 4px; }
.why-item p { color: var(--muted); font-size: 15.5px; }

/* platforms */
.platforms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.platform {
  background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--radius);
  padding: 26px 20px 22px; text-align: center;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.platform:hover { border-color: var(--accent-edge); box-shadow: 0 8px 24px rgba(16, 21, 29, 0.06); }
.platform img { width: 46px; height: 46px; display: block; margin: 0 auto 14px; }
[data-theme="dark"] .platform img { filter: brightness(1.25); }
[data-theme="dark"] .platform img[src$="apple.svg"],
[data-theme="dark"] .platform img[src$="linux.svg"] { filter: invert(0.92); }
.platform strong { display: block; font-size: 15.5px; }
.platform small { color: var(--faint); font-size: 13px; }
.platform-note { text-align: center; color: var(--faint); font-size: 14px; margin-top: 26px; }

/* pipeline */
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: step; }
.step {
  position: relative; background: var(--card); border: 1px solid var(--card-edge);
  border-radius: var(--radius); padding: 24px 20px;
}
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 10px;
}
.step h3 { font-size: 15.5px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 13.8px; line-height: 1.55; }

/* get started */
.get-started .panel {
  background: var(--card);
  border: 1px solid var(--card-edge); border-radius: 16px;
  box-shadow: 0 18px 44px rgba(16, 21, 29, 0.07);
  padding: 48px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: center;
}
.get-started h2 { font-size: clamp(26px, 3.5vw, 34px); letter-spacing: -0.02em; margin-bottom: 12px; }
.get-started .panel > div > p { color: var(--muted); margin-bottom: 24px; }
.code-block {
  margin: 0; white-space: pre;
  background: var(--term-bg); border: 1px solid var(--term-edge); border-radius: 12px;
  padding: 20px 22px; overflow-x: auto;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px; line-height: 1.8; color: var(--term-text);
}
.code-block .c { color: #6d7686; }
.code-block .p { color: #6ea8fe; }

/* footer */
.site-footer { border-top: 1px solid var(--card-edge); padding: 56px 0 44px; background: var(--bg-soft); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 40px; }
.foot-brand .brand { margin-bottom: 14px; }
.foot-brand p { color: var(--faint); font-size: 14px; max-width: 300px; }
.foot-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin-bottom: 14px; }
.foot-col a { display: block; color: var(--muted); text-decoration: none; font-size: 14.5px; padding: 4px 0; }
.foot-col a:hover { color: var(--text); }
.foot-base {
  border-top: 1px solid var(--card-edge); padding-top: 24px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--faint); font-size: 13.5px;
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .platforms { grid-template-columns: repeat(3, 1fr); }
  .get-started .panel { grid-template-columns: 1fr; padding: 36px 28px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .main-nav > a:not(.btn) { display: none; }
  .hero { padding: 64px 0 56px; }
  section { padding: 60px 0; }
  .grid-4, .grid-2, .why { grid-template-columns: 1fr; }
  .why-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--card-edge); }
  .why-item:last-child { border-bottom: 0; }
  .pipeline { grid-template-columns: 1fr; }
  .platforms { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr; }
}
