:root {
  color-scheme: dark;
  --bg: #08090d;
  --surface: #11131a;
  --surface-soft: #171923;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4f4f7;
  --muted: #999dab;
  --faint: #6f7382;
  --accent: #9297ff;
  --accent-bright: #b4b8ff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 75% 18%, rgba(45, 70, 114, 0.18), transparent 28rem),
    linear-gradient(180deg, #0d0e15 0, var(--bg) 36rem);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 32px;
}

.hero {
  padding: 0 0 36px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-bright);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.18em;
}

h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(42px, 7vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero-copy {
  max-width: 900px;
  margin: 24px 0 0;
  color: #b2b5c2;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.7;
}

code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.86em;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hero-meta span,
.renderer-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}

.hero-meta span {
  padding: 6px 10px;
}

.demo-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
  min-height: 650px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 17, 23, 0.86);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.28);
}

.orb-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 650px;
  overflow: hidden;
  border-right: 1px solid var(--line);
}

.orb-guide {
  position: absolute;
  width: min(70%, 460px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 50%;
}

.orb-frame {
  position: relative;
  width: min(43vw, 360px);
  max-width: 62%;
  aspect-ratio: 1;
}

#voice-orb {
  position: absolute;
  inset: -20px;
  display: block;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  filter: drop-shadow(0 0 4px rgb(154 154 249 / 55%));
}

.live-status {
  position: absolute;
  bottom: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #c5c7d1;
  font-size: 14px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(146, 151, 255, 0.8);
}

.renderer-badge {
  position: absolute;
  top: 24px;
  left: 24px;
  margin: 0;
  padding: 6px 9px;
}

.control-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: 42px;
  background: rgba(8, 9, 13, 0.28);
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend,
.field-heading {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

legend {
  margin-bottom: 10px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
}

.segmented button {
  min-width: 0;
  padding: 10px 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}

.segmented button:hover,
.segmented button:focus-visible {
  color: var(--text);
  outline: 1px solid rgba(146, 151, 255, 0.65);
}

.segmented button.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.field-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

output {
  color: #c8cad4;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.field-hint,
.input-note,
.error-message {
  margin: 8px 0 0;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.5;
}

.button-stack {
  display: grid;
  gap: 10px;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
}

.primary-button {
  border: 0;
  background: #f4f4f8;
  color: #15161c;
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.primary-button:hover,
.secondary-button:hover {
  filter: brightness(1.08);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.error-message {
  color: #ff9b9b;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.notes-grid article {
  min-height: 170px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(13, 15, 20, 0.72);
}

.notes-grid span {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.notes-grid h2 {
  margin: 28px 0 8px;
  font-size: 19px;
}

.notes-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 4px 0;
  color: var(--faint);
  font-size: 11px;
}

footer a {
  color: var(--accent-bright);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 24px, 680px);
    padding-top: 30px;
  }

  .demo-card {
    grid-template-columns: 1fr;
  }

  .orb-stage {
    min-height: 500px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .orb-frame {
    width: min(58vw, 300px);
  }

  .control-panel {
    padding: 30px 24px;
  }

  .notes-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
  }
}
