:root {
  --ink: #07110f;
  --paper: #e9e5d8;
  --paper-soft: #c7c8ba;
  --signal: #ff5c35;
  --signal-soft: #ffb09d;
  --mint: #8de5c4;
  --line: rgba(233, 229, 216, 0.17);
  --display: Georgia, "Times New Roman", serif;
  --body: Bahnschrift, "Aptos Narrow", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--paper);
  background:
    radial-gradient(circle at 75% 20%, rgba(62, 119, 102, 0.2), transparent 30rem),
    linear-gradient(135deg, #07110f 0%, #091613 52%, #040908 100%);
  font-family: var(--body);
}

button, a { font: inherit; }
button { color: inherit; }

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.18;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}

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

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

.brand {
  display: inline-flex;
  gap: 13px;
  align-items: center;
  color: var(--paper);
  text-decoration: none;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
}

.brand-mark { display: flex; gap: 3px; align-items: flex-end; height: 18px; }
.brand-mark i { display: block; width: 3px; background: var(--signal); border-radius: 3px; }
.brand-mark i:nth-child(1) { height: 8px; }
.brand-mark i:nth-child(2) { height: 18px; }
.brand-mark i:nth-child(3) { height: 12px; }

.topbar-actions { display: flex; align-items: center; gap: 10px; }
.phone-bridge-link {
  padding: 8px 11px;
  border: 1px solid var(--line);
  color: var(--paper-soft);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.62rem;
}
.phone-bridge-link:hover { color: var(--signal-soft); border-color: rgba(255, 92, 53, 0.45); }

.connection-pill {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper-soft);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.64rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #68756f;
  box-shadow: 0 0 0 4px rgba(104, 117, 111, 0.12);
}

.connection-pill.online .status-dot {
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(141, 229, 196, 0.12), 0 0 16px var(--mint);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr);
  gap: clamp(50px, 8vw, 112px);
  align-items: center;
  min-height: 710px;
  padding: 72px 0 84px;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--signal);
  letter-spacing: 0.19em;
  font-size: 0.69rem;
  font-weight: 700;
}

h1, h2 { font-family: var(--display); font-weight: 400; }

h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(4.1rem, 7.5vw, 7.7rem);
  line-height: 0.83;
  letter-spacing: -0.055em;
}

.lede {
  max-width: 530px;
  margin: 38px 0 0;
  color: var(--paper-soft);
  font-size: 1.02rem;
  line-height: 1.75;
}

.notice {
  max-width: 510px;
  margin-top: 42px;
  padding: 17px 18px;
  border-left: 2px solid var(--signal);
  background: rgba(255, 92, 53, 0.055);
  color: #b9b9aa;
  font-size: 0.75rem;
  line-height: 1.55;
}

.notice span {
  display: block;
  margin-bottom: 4px;
  color: var(--signal-soft);
  letter-spacing: 0.14em;
  font-size: 0.62rem;
  font-weight: 700;
}

.console {
  position: relative;
  min-height: 590px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(233, 229, 216, 0.19);
  border-radius: 4px 48px 4px 4px;
  background:
    linear-gradient(rgba(141, 229, 196, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141, 229, 196, 0.04) 1px, transparent 1px),
    linear-gradient(145deg, rgba(21, 43, 37, 0.88), rgba(5, 13, 11, 0.94));
  background-size: 32px 32px, 32px 32px, auto;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.32);
}

.console::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -90px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255, 92, 53, 0.22);
  border-radius: 50%;
}

.console-meta {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  color: #8fa096;
  letter-spacing: 0.15em;
  font-size: 0.61rem;
}

.signal-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
}

.voice-core {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 260px;
  aspect-ratio: 1;
  border: 1px solid rgba(141, 229, 196, 0.42);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(141, 229, 196, 0.11), rgba(7, 17, 15, 0.45) 62%, rgba(7, 17, 15, 0.9));
  box-shadow: inset 0 0 42px rgba(141, 229, 196, 0.07), 0 0 58px rgba(0, 0, 0, 0.2);
  transition: border-color 350ms ease, box-shadow 350ms ease;
}

.voice-core.live {
  border-color: var(--signal);
  box-shadow: inset 0 0 48px rgba(255, 92, 53, 0.1), 0 0 64px rgba(255, 92, 53, 0.11);
}

#meterCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.core-label { position: relative; z-index: 2; text-align: center; pointer-events: none; }
.core-label span { display: block; color: var(--signal); letter-spacing: 0.2em; font-size: 0.56rem; }
.core-label strong { display: block; max-width: 120px; margin-top: 7px; font-family: var(--display); font-size: 1.25rem; font-weight: 400; line-height: 1.1; }

.orbit { position: absolute; border: 1px solid rgba(233, 229, 216, 0.1); border-radius: 50%; }
.orbit-a { width: 340px; height: 340px; border-style: dashed; animation: spin 28s linear infinite; }
.orbit-b { width: 390px; height: 210px; transform: rotate(-18deg); border-color: rgba(255, 92, 53, 0.13); }

.coordinate { position: absolute; color: rgba(199, 200, 186, 0.45); font-size: 0.54rem; letter-spacing: 0.12em; }
.coordinate-a { left: 4px; top: 50%; transform: rotate(-90deg); }
.coordinate-b { right: 6px; bottom: 22%; }

.controls { position: relative; z-index: 4; display: flex; justify-content: center; gap: 10px; }
.primary-button, .icon-button, .text-button { border: 0; cursor: pointer; }

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-width: 190px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 2px;
  background: var(--signal);
  color: #160704;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease;
}

.primary-button:hover { transform: translateY(-2px); background: #ff7655; }
.primary-button:focus-visible, .icon-button:focus-visible, .text-button:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
.primary-button.live { background: var(--paper); }

.button-icon { position: relative; width: 12px; height: 12px; border: 1px solid currentColor; border-radius: 50%; }
.button-icon::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: currentColor; }

.icon-button {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(233, 229, 216, 0.04);
}

.icon-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.icon-button:disabled { cursor: not-allowed; opacity: 0.35; }
.icon-button[aria-pressed="true"] { color: var(--signal); border-color: var(--signal); }

.permission-note { margin: 12px 0 0; color: #718178; text-align: center; font-size: 0.64rem; }

.transcript-section { padding: 94px 0 120px; border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.section-heading .eyebrow { margin-bottom: 10px; }
h2 { margin: 0; font-size: clamp(2.3rem, 4vw, 4rem); letter-spacing: -0.035em; }
.text-button { padding: 8px 0; border-bottom: 1px solid #68756f; background: transparent; color: #9da49c; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; }

.transcript {
  display: grid;
  gap: 1px;
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.empty-state { margin: 0; padding: 32px 0; color: #718178; }

.transcript-entry {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  animation: reveal 420ms ease both;
}

.transcript-entry span { color: var(--signal); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.62rem; }
.transcript-entry p { margin: 0; max-width: 780px; color: var(--paper-soft); font-family: var(--display); font-size: 1.18rem; line-height: 1.55; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 22px max(24px, calc((100vw - 1180px) / 2));
  border-top: 1px solid var(--line);
  color: #68756f;
  letter-spacing: 0.12em;
  font-size: 0.56rem;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes reveal { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 58px; }
  .hero-copy { max-width: 680px; }
  .console { width: min(100%, 620px); margin: 0 auto; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 28px, 1180px); }
  .topbar { min-height: 76px; }
  h1 { font-size: clamp(3.4rem, 18vw, 5rem); }
  .hero { padding: 50px 0 64px; gap: 46px; }
  .console { min-height: 510px; padding: 18px; border-radius: 3px 32px 3px 3px; }
  .signal-stage { min-height: 350px; transform: scale(0.88); margin: -14px; }
  .transcript-section { padding: 68px 0 88px; }
  .transcript-entry { grid-template-columns: 1fr; gap: 8px; }
  footer { flex-direction: column; gap: 8px; }
}

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