:root {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f7faf8;
  background: #0b1010;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  background: #0b1010;
}

button {
  font: inherit;
  touch-action: manipulation;
}

.hero {
  position: relative;
  min-height: 84vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero__media,
.hero__shade {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.8) contrast(1.04);
}

.hero__shade {
  background:
    linear-gradient(90deg, rgba(8, 15, 14, 0.94) 0%, rgba(8, 15, 14, 0.72) 45%, rgba(8, 15, 14, 0.36) 100%),
    linear-gradient(0deg, rgba(8, 15, 14, 0.78) 0%, rgba(8, 15, 14, 0.05) 45%);
}

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(20px, 5vw, 72px);
}

.brand,
.nav__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

.brand__mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.nav__meta {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.hero__content {
  position: relative;
  z-index: 2;
  flex: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 440px);
  align-items: center;
  gap: clamp(28px, 6vw, 84px);
  padding: 18px 0 42px;
}

.hero__copy {
  max-width: 680px;
}

.eyebrow,
.panel-label {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 800;
  color: #aeeac2;
}

h1 {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 5.7rem);
  line-height: 0.94;
  letter-spacing: 0;
  max-width: 780px;
}

.lede {
  margin: 28px 0 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(1.05rem, 2vw, 1.24rem);
  line-height: 1.55;
}

.voice-panel {
  background: rgba(9, 18, 18, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  padding: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.voice-panel__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.voice-panel h2 {
  margin: 0;
  font-size: 1.5rem;
}

.status-pill {
  min-width: 92px;
  text-align: center;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  font-weight: 700;
}

.status-pill[data-mode="live"] {
  color: #101612;
  background: #aeeac2;
}

.status-pill[data-mode="error"] {
  color: #fff;
  background: #b7413e;
}

.orb {
  position: relative;
  width: min(220px, 62vw);
  aspect-ratio: 1;
  margin: 20px auto;
  display: grid;
  place-items: center;
}

.orb__ring,
.orb__core {
  position: absolute;
  border-radius: 50%;
}

.orb__ring {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(174, 234, 194, 0.4);
  background:
    radial-gradient(circle at 50% 50%, rgba(174, 234, 194, 0.22), transparent 58%),
    conic-gradient(from 80deg, rgba(174, 234, 194, 0.04), rgba(174, 234, 194, 0.7), rgba(78, 188, 209, 0.35), rgba(174, 234, 194, 0.04));
}

.orb__core {
  width: 46%;
  height: 46%;
  background: #aeeac2;
  box-shadow: 0 0 42px rgba(174, 234, 194, 0.45);
}

.orb[data-mode="connecting"] .orb__ring,
.orb[data-mode="live"] .orb__ring {
  animation: spin 8s linear infinite;
}

.orb[data-mode="live"] .orb__core {
  animation: pulse 1.4s ease-in-out infinite;
}

.controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

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

.primary-button {
  color: #0a1210;
  background: #aeeac2;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.secondary-button {
  padding: 0 22px;
  color: #f6fff8;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.button-icon {
  display: inline-block;
  margin-right: 8px;
  color: #2fa767;
}

.permission-note {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.82rem;
  line-height: 1.35;
}

.transcript {
  margin-top: 18px;
  height: 136px;
  overflow: auto;
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.transcript__empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
}

.transcript-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 12px;
  padding-left: 10px;
  border-left: 2px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.84);
}

.transcript-row span {
  font-weight: 800;
  color: #aeeac2;
}

.transcript-row--system span {
  color: rgba(255, 255, 255, 0.58);
}

.transcript-row--you {
  border-left-color: #83d8ef;
}

.transcript-row--you span {
  color: #83d8ef;
}

.transcript-row--sophia {
  border-left-color: #aeeac2;
}

.transcript-row p {
  margin: 0;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.trust-band {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #16201d;
  width: min(1180px, calc(100% - 40px));
  margin: -34px auto 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.trust-band div {
  padding: 28px clamp(20px, 4vw, 56px);
  background: #101817;
}

.trust-band span {
  color: #aeeac2;
  font-weight: 900;
}

.trust-band p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.45;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  50% {
    transform: scale(1.08);
  }
}

@media (max-width: 880px) {
  .hero {
    min-height: auto;
  }

  .hero__shade {
    background:
      linear-gradient(0deg, rgba(8, 15, 14, 0.9) 0%, rgba(8, 15, 14, 0.58) 58%, rgba(8, 15, 14, 0.3) 100%),
      linear-gradient(90deg, rgba(8, 15, 14, 0.88) 0%, rgba(8, 15, 14, 0.48) 100%);
  }

  .hero__content {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 28px;
    padding-top: 22px;
  }

  .voice-panel {
    width: 100%;
    max-width: 560px;
  }

  .trust-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav {
    padding: 20px;
  }

  .nav__meta {
    display: none;
  }

  .hero__content {
    width: calc(100% - 28px);
    padding-bottom: max(34px, env(safe-area-inset-bottom));
  }

  h1 {
    font-size: clamp(2.35rem, 13vw, 3.25rem);
    line-height: 0.98;
  }

  .lede {
    margin-top: 18px;
    font-size: 1rem;
    line-height: 1.48;
  }

  .voice-panel {
    padding: 16px;
  }

  .voice-panel__top {
    align-items: center;
  }

  .voice-panel h2 {
    font-size: 1.3rem;
  }

  .status-pill {
    min-width: 82px;
    padding: 7px 10px;
  }

  .orb {
    width: min(172px, 52vw);
    margin: 14px auto;
  }

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

  .primary-button,
  .secondary-button {
    min-height: 52px;
  }

  .secondary-button {
    width: 100%;
  }

  .transcript {
    height: clamp(124px, 28svh, 188px);
    margin-top: 14px;
    padding: 12px;
  }

  .transcript-row {
    grid-template-columns: 1fr;
    gap: 3px;
    margin-bottom: 11px;
  }

  .trust-band {
    width: 100%;
    margin-top: 0;
    border-left: 0;
    border-right: 0;
  }

  .trust-band div {
    padding: 22px 20px;
  }
}
