:root {
  color-scheme: light;
  --forest-950: #0a221a;
  --forest-900: #0f2f24;
  --forest-800: #154531;
  --forest-700: #1c5b40;
  --sage-500: #7b9a7e;
  --cream-100: #f8f3e7;
  --cream-200: #eee4cf;
  --cream-300: #dfd0b3;
  --amber-400: #e5a94b;
  --amber-500: #d78d2d;
  --red-500: #c74d44;
  --ink: #17211d;
  --muted: #68736d;
  --white: #fffdf7;
  --shadow: 0 24px 70px rgba(26, 41, 32, 0.14);
  font-family:
    "Segoe UI", Tahoma, Arial, system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--cream-100);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, rgba(229, 169, 75, 0.12), transparent 32%),
    radial-gradient(circle at 90% 30%, rgba(28, 91, 64, 0.09), transparent 33%),
    var(--cream-100);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(229, 169, 75, 0.65);
  outline-offset: 4px;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  border-bottom: 1px solid rgba(21, 69, 49, 0.12);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--forest-900);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--cream-100);
  font-size: 23px;
  font-weight: 800;
  background: var(--forest-900);
  border-radius: 50% 50% 44% 56% / 55% 44% 56% 45%;
  transform: rotate(-3deg);
}

.brand > span:last-child {
  display: flex;
  flex-direction: column;
}

.brand strong {
  font-size: 21px;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.mvp-badge {
  padding: 8px 13px;
  color: var(--forest-800);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: rgba(123, 154, 126, 0.14);
  border: 1px solid rgba(28, 91, 64, 0.16);
  border-radius: 999px;
}

main {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(480px, 1.2fr);
  gap: 60px 74px;
  align-items: center;
  padding: 66px 0 42px;
}

.hero-copy {
  align-self: start;
  padding-top: 52px;
}

.eyebrow,
.card-kicker {
  margin: 0 0 14px;
  color: var(--amber-500);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.hero-copy h1 {
  margin: 0;
  color: var(--forest-950);
  font-size: clamp(46px, 6.2vw, 78px);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.hero-copy h1 span {
  color: var(--forest-700);
}

.intro {
  max-width: 430px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

.call-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid rgba(21, 69, 49, 0.11);
  border-radius: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.call-card::after {
  position: absolute;
  z-index: -1;
  top: -100px;
  left: -90px;
  width: 250px;
  height: 250px;
  background: rgba(229, 169, 75, 0.09);
  border-radius: 50%;
  content: "";
}

.card-topline,
.conversation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-kicker {
  margin-bottom: 5px;
  font-size: 11px;
}

.card-topline h2 {
  margin: 0;
  color: var(--forest-950);
  font-size: 21px;
}

.connection-pill {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 12px;
  color: var(--muted);
  font-size: 11px;
  background: #f4f1e9;
  border-radius: 999px;
}

.connection-pill span {
  width: 8px;
  height: 8px;
  background: #a4aba7;
  border-radius: 50%;
}

.connection-pill[data-state="ready"] span,
.connection-pill[data-state="connected"] span {
  background: #42a86b;
  box-shadow: 0 0 0 5px rgba(66, 168, 107, 0.12);
}

.connection-pill[data-state="connecting"] span {
  background: var(--amber-400);
  box-shadow: 0 0 0 5px rgba(229, 169, 75, 0.14);
}

.connection-pill[data-state="error"] span {
  background: var(--red-500);
  box-shadow: 0 0 0 5px rgba(199, 77, 68, 0.13);
}

.voice-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 34px 0 25px;
  text-align: center;
}

.avatar-ring {
  position: relative;
  display: grid;
  width: 116px;
  height: 116px;
  place-items: center;
}

.avatar {
  z-index: 2;
  display: grid;
  width: 90px;
  height: 90px;
  place-items: center;
  color: var(--cream-100);
  font-size: 36px;
  font-weight: 800;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 55%),
    var(--forest-800);
  border: 6px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 14px 34px rgba(15, 47, 36, 0.25);
}

.signal-ring {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(28, 91, 64, 0.22);
  border-radius: 50%;
  opacity: 0;
}

.ring-two {
  inset: 0;
}

.voice-stage[data-mode="speaking"] .signal-ring,
.voice-stage[data-mode="listening"] .signal-ring {
  animation: signal 1.65s ease-out infinite;
}

.voice-stage[data-mode="speaking"] .ring-two,
.voice-stage[data-mode="listening"] .ring-two {
  animation-delay: 0.52s;
}

.voice-copy {
  min-height: 67px;
  margin-top: 17px;
}

.voice-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.voice-copy strong {
  display: block;
  margin-top: 6px;
  color: var(--forest-900);
  font-size: 21px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.waveform {
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  height: 34px;
  margin: 2px 0 19px;
}

.waveform i {
  display: block;
  width: 4px;
  height: 7px;
  background: var(--sage-500);
  border-radius: 999px;
  opacity: 0.35;
  transform-origin: center;
}

.voice-stage[data-mode="speaking"] .waveform i,
.voice-stage[data-mode="listening"] .waveform i {
  animation: wave 0.75s ease-in-out infinite alternate;
  opacity: 0.9;
}

.waveform i:nth-child(2),
.waveform i:nth-child(6) {
  animation-delay: -0.2s !important;
}

.waveform i:nth-child(3),
.waveform i:nth-child(5) {
  animation-delay: -0.4s !important;
}

.waveform i:nth-child(4) {
  animation-delay: -0.58s !important;
}

.controls {
  display: grid;
  grid-template-columns: 48px minmax(180px, 1fr) 48px;
  gap: 12px;
  align-items: center;
  width: min(100%, 340px);
}

.call-button {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 55px;
  padding: 0 22px;
  color: var(--cream-100);
  font-weight: 800;
  background: var(--forest-800);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 13px 26px rgba(21, 69, 49, 0.24);
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.call-button:hover:not(:disabled) {
  background: var(--forest-700);
  box-shadow: 0 16px 31px rgba(21, 69, 49, 0.29);
  transform: translateY(-2px);
}

.call-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.call-button[data-active="true"] {
  background: var(--red-500);
  box-shadow: 0 13px 26px rgba(199, 77, 68, 0.24);
}

.call-button svg,
.round-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.round-button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--forest-800);
  background: var(--cream-100);
  border: 1px solid var(--cream-300);
  border-radius: 50%;
  cursor: pointer;
}

.round-button:disabled {
  color: #adb3af;
  cursor: not-allowed;
  opacity: 0.55;
}

.round-button[aria-pressed="true"] {
  color: var(--white);
  background: var(--red-500);
  border-color: var(--red-500);
}

.conversation-panel {
  padding: 15px 17px;
  background: #f7f4ec;
  border: 1px solid rgba(21, 69, 49, 0.08);
  border-radius: 17px;
}

.conversation-heading {
  color: var(--forest-900);
  font-size: 12px;
  font-weight: 800;
}

.conversation-heading button {
  padding: 2px 5px;
  color: var(--muted);
  font-size: 11px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.conversation-list {
  display: flex;
  overflow: auto;
  flex-direction: column;
  gap: 9px;
  max-height: 118px;
  margin-top: 10px;
  scrollbar-width: thin;
}

.empty-conversation {
  margin: 0;
  color: #8a938e;
  font-size: 12px;
  line-height: 1.7;
}

.message {
  max-width: 92%;
  margin: 0;
  padding: 9px 11px;
  color: #3e4944;
  font-size: 12px;
  line-height: 1.65;
  background: var(--white);
  border-radius: 12px 12px 4px 12px;
}

.message.user {
  align-self: flex-start;
  color: var(--forest-900);
  background: #e8f0e7;
  border-radius: 12px 12px 12px 4px;
}

.privacy-note {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  margin: 14px 0 0;
  color: #7b837f;
  font-size: 10px;
}

.privacy-note svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--sage-500);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.quick-info {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.quick-info article {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 17px 19px;
  background: rgba(255, 253, 247, 0.64);
  border: 1px solid rgba(21, 69, 49, 0.09);
  border-radius: 17px;
}

.info-icon {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--forest-800);
  font-size: 14px;
  font-weight: 900;
  background: rgba(123, 154, 126, 0.14);
  border-radius: 13px;
}

.location-icon {
  font-size: 24px;
}

.quick-info strong {
  display: block;
  color: var(--forest-950);
  font-size: 13px;
}

.quick-info p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

footer {
  padding: 22px 0 30px;
  color: #8b938f;
  text-align: center;
  border-top: 1px solid rgba(21, 69, 49, 0.1);
}

footer p {
  margin: 0;
  font-size: 11px;
}

#remoteAudio {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.toast {
  position: fixed;
  z-index: 20;
  right: 50%;
  bottom: 24px;
  width: min(420px, calc(100% - 32px));
  padding: 13px 16px;
  color: var(--white);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  background: var(--forest-950);
  border-radius: 13px;
  box-shadow: 0 16px 35px rgba(10, 34, 26, 0.25);
  transform: translateX(50%);
}

@keyframes signal {
  0% {
    opacity: 0.48;
    transform: scale(0.82);
  }
  100% {
    opacity: 0;
    transform: scale(1.38);
  }
}

@keyframes wave {
  from {
    height: 6px;
  }
  to {
    height: 27px;
  }
}

@media (max-width: 900px) {
  main {
    grid-template-columns: 1fr;
    gap: 42px;
    padding-top: 42px;
  }

  .hero-copy {
    padding-top: 0;
    text-align: center;
  }

  .intro {
    margin-inline: auto;
  }

  .call-card {
    width: min(620px, 100%);
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 24px, 1180px);
  }

  .topbar {
    min-height: 76px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand strong {
    font-size: 18px;
  }

  main {
    gap: 30px;
    padding: 35px 0 30px;
  }

  .hero-copy h1 {
    font-size: clamp(42px, 15vw, 62px);
  }

  .intro {
    margin-top: 19px;
    font-size: 15px;
  }

  .call-card {
    padding: 20px 16px;
    border-radius: 23px;
  }

  .connection-pill {
    padding: 8px 10px;
  }

  .voice-stage {
    padding-top: 27px;
  }

  .controls {
    grid-template-columns: 44px minmax(155px, 1fr) 44px;
    gap: 9px;
  }

  .round-button {
    width: 44px;
    height: 44px;
  }

  .call-button {
    min-height: 52px;
    padding-inline: 16px;
    font-size: 13px;
  }

  .quick-info {
    grid-template-columns: 1fr;
  }
}

@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;
  }
}
