:root {
  color-scheme: light;
  --bg: oklch(1 0 0);
  --surface: oklch(0.965 0.006 356.8);
  --ink: oklch(0.19 0.025 356.8);
  --muted: oklch(0.45 0.025 356.8);
  --line: oklch(0.87 0.018 356.8);
  --primary: oklch(0.44 0.17 356.8);
  --primary-hover: oklch(0.39 0.17 356.8);
  --focus: oklch(0.48 0.18 356.8);
  --focus-on-primary: oklch(0.96 0.02 356.8);
  --radius: 14px;
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  min-width: 300px;
  min-height: 100vh;
}

button, input, textarea { font: inherit; }

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.call-stage button:focus-visible {
  outline-color: var(--focus-on-primary);
}

.site-header,
main,
footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: inset 0 0 0 5px var(--bg);
  border: 2px solid var(--primary);
}

.demo-label {
  color: var(--muted);
  font-size: 0.875rem;
}

main { padding-block: clamp(52px, 8vw, 104px) 72px; }

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(230px, 0.7fr);
  gap: clamp(36px, 7vw, 96px);
  align-items: end;
}

.context {
  margin: 0 0 16px;
  color: var(--primary);
  font-weight: 700;
}

h1, h2, p { text-wrap: pretty; }

h1 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(3rem, 8vw, 5.75rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.lede {
  max-width: 62ch;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.55;
}

.limits {
  margin: 0;
  border-top: 1px solid var(--line);
}

.limits div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.limits dt { color: var(--muted); }
.limits dd { margin: 0; font-weight: 680; text-align: right; }

.call-stage {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-top: clamp(48px, 8vw, 96px);
  padding: clamp(28px, 5vw, 56px);
  color: var(--bg);
  background: var(--primary);
  border-radius: var(--radius);
}

.call-main { position: relative; z-index: 1; max-width: 660px; }
.status-row { display: flex; align-items: flex-start; gap: 16px; }

.status-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-top: 8px;
  border-radius: 50%;
  background: oklch(0.9 0 0 / 0.65);
}

.status-dot[data-state="connecting"] { background: oklch(0.89 0.14 85); animation: pulse 1.2s ease-in-out infinite; }
.status-dot[data-state="active"] { background: oklch(0.88 0.18 153); animation: pulse 1.6s ease-in-out infinite; }
.status-dot[data-state="error"] { background: oklch(0.88 0.14 32); }

.call-stage h2 { margin: 0; font-size: 1.5rem; letter-spacing: -0.02em; }
.call-stage #status-detail { margin: 6px 0 0; color: oklch(0.95 0.014 356.8); line-height: 1.5; }
.call-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.primary-button,
.secondary-button {
  min-height: 48px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 760;
  cursor: pointer;
  transition: transform 180ms cubic-bezier(.22, 1, .36, 1), background 180ms cubic-bezier(.22, 1, .36, 1);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border: 0;
  background: var(--bg);
  color: var(--primary-hover);
}

.primary-button:hover:not(:disabled) { transform: translateY(-2px); }
.primary-button:active:not(:disabled) { transform: translateY(0); }
.primary-button:disabled { cursor: wait; opacity: 0.72; }

.secondary-button {
  border: 1px solid oklch(1 0 0 / 0.72);
  background: transparent;
  color: var(--bg);
}

.secondary-button:hover { background: oklch(1 0 0 / 0.12); }
.phone-symbol { font-size: 1.25rem; line-height: 1; transform: rotate(-24deg); }

.privacy-note {
  max-width: 62ch;
  margin: 28px 0 0;
  color: oklch(0.93 0.018 356.8);
  font-size: 0.875rem;
  line-height: 1.55;
}

.signal {
  width: min(30vw, 260px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  opacity: 0.55;
}

.signal span { width: 8px; height: 28%; min-height: 32px; border-radius: 999px; background: var(--bg); }
.signal span:nth-child(2), .signal span:nth-child(6) { height: 44%; }
.signal span:nth-child(3), .signal span:nth-child(5) { height: 68%; }
.signal span:nth-child(4) { height: 92%; }
.call-stage[data-active="true"] .signal span { animation: sound 1.1s ease-in-out infinite alternate; }
.call-stage[data-active="true"] .signal span:nth-child(2) { animation-delay: -0.7s; }
.call-stage[data-active="true"] .signal span:nth-child(3) { animation-delay: -0.25s; }
.call-stage[data-active="true"] .signal span:nth-child(4) { animation-delay: -0.9s; }
.call-stage[data-active="true"] .signal span:nth-child(5) { animation-delay: -0.45s; }
.call-stage[data-active="true"] .signal span:nth-child(6) { animation-delay: -0.1s; }

.evidence {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: clamp(36px, 6vw, 72px);
  margin-top: clamp(56px, 8vw, 96px);
}

.transcript-panel, .result-panel { min-width: 0; }

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 { margin: 0; font-size: 1.25rem; letter-spacing: -0.02em; }
.section-heading span { color: var(--muted); font-size: 0.875rem; }
.transcript { list-style: none; margin: 0; padding: 0; }

.transcript li {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.55;
}

.transcript .speaker { color: var(--muted); font-size: 0.875rem; font-weight: 700; }
.transcript .partial { color: var(--muted); }
.transcript .empty-state { display: block; color: var(--muted); }

.result-content {
  min-height: 140px;
  padding-top: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.result-content dl { margin: 0; }
.result-content div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.result-content dt { color: var(--muted); }
.result-content dd { margin: 0; color: var(--ink); font-weight: 680; text-align: right; overflow-wrap: anywhere; }
.result-content pre { overflow: auto; max-height: 280px; margin: 20px 0 0; padding: 14px; border-radius: 10px; background: var(--surface); color: var(--ink); font: 0.78rem/1.5 ui-monospace, monospace; white-space: pre-wrap; }

footer {
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.825rem;
}

@keyframes pulse { 50% { transform: scale(1.28); opacity: 0.72; } }
@keyframes sound { to { transform: scaleY(0.35); opacity: 0.72; } }

@media (max-width: 760px) {
  .site-header, main, footer { width: min(100% - 28px, 1120px); }
  .site-header { min-height: 68px; }
  .demo-label { max-width: 130px; text-align: right; }
  main { padding-top: 42px; }
  .intro, .evidence { grid-template-columns: 1fr; }
  .intro { gap: 36px; }
  h1 { max-width: 10ch; font-size: clamp(3rem, 15vw, 4.5rem); }
  .call-stage { padding: 28px 22px; }
  .signal { position: absolute; inset: auto 14px 22px auto; height: 70px; opacity: 0.18; }
  .transcript li { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
