/* ── Variables ────────────────────────────────────────────────────────────── */
:root {
  --brand: #3B0F4E;
  --brand-mid: #6B3FA0;
  --brand-light: #F3EBF9;
  --brand-pale: #FAF6FD;
  --bg: #FFFFFF;
  --text: #1A1624;
  --text-mid: #6B5C7A;
  --text-light: #A89BB8;
  --border: #EAE0F5;
  --shadow: rgba(59, 15, 78, 0.07);
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Skyline background ───────────────────────────────────────────────────── */
.skyline-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  opacity: 0.06;
  z-index: 0;
}

.skyline-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Page shell ───────────────────────────────────────────────────────────── */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ── Top bar ──────────────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0 24px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 32px;
  width: auto;
  display: block;
}

.brand-divider {
  color: var(--border);
  font-size: 18px;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 0.4px;
  font-weight: 400;
}

.brand-city {
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ── Two-column layout ────────────────────────────────────────────────────── */
.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 60px 0 80px;
}

/* ── Intro panel ──────────────────────────────────────────────────────────── */
.intro-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.intro-eyebrow {
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--brand-mid);
  font-weight: 500;
  margin-bottom: 16px;
}

.intro-name {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 400;
  color: var(--brand);
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.intro-role {
  font-size: 13px;
  color: var(--text-light);
  letter-spacing: 0.3px;
  margin-bottom: 28px;
}

.intro-rule {
  width: 48px;
  height: 1.5px;
  background: var(--brand);
  opacity: 0.3;
  margin-bottom: 28px;
}

.intro-body {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-mid);
  margin-bottom: 18px;
}

.intro-cta-text {
  font-size: 15px;
  color: var(--brand);
  font-style: italic;
  opacity: 0.8;
  margin-bottom: 36px;
}

/* Trust row */
.trust-row {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 4px;
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 24px;
}

.trust-item:first-child {
  padding-left: 0;
}

.trust-num {
  font-size: 18px;
  font-weight: 600;
  color: var(--brand);
  font-family: Georgia, serif;
  letter-spacing: 0.5px;
}

.trust-label {
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 0.3px;
}

.trust-sep {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Voice panel ──────────────────────────────────────────────────────────── */
.voice-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  background: var(--brand-pale);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px 36px 40px;
  box-shadow: 0 4px 40px var(--shadow);
}

/* ── Avatar ───────────────────────────────────────────────────────────────── */
.avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.avatar-rings {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(59, 15, 78, 0.15);
  opacity: 0;
  transition: opacity 0.4s;
}

.r1 {
  width: 140px;
  height: 140px;
}

.r2 {
  width: 114px;
  height: 114px;
}

.r3 {
  width: 90px;
  height: 90px;
}

.avatar-rings.listening .ring {
  opacity: 1;
  animation: ripple 1.8s infinite ease-out;
}

.avatar-rings.listening .r2 {
  animation-delay: 0.3s;
}

.avatar-rings.listening .r3 {
  animation-delay: 0.6s;
}

.avatar-rings.speaking .ring {
  opacity: 1;
  border-color: rgba(59, 15, 78, 0.25);
  animation: pulse-ring 1s infinite ease-in-out alternate;
}

.avatar-rings.speaking .r2 {
  animation-delay: 0.2s;
}

.avatar-rings.speaking .r3 {
  animation-delay: 0.4s;
}

@keyframes ripple {
  0% {
    transform: scale(0.88);
    opacity: 0.5;
  }

  100% {
    transform: scale(1.08);
    opacity: 0;
  }
}

@keyframes pulse-ring {
  from {
    transform: scale(0.96);
  }

  to {
    transform: scale(1.04);
  }
}

.avatar-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 28px;
  font-weight: 600;
  font-family: Georgia, serif;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 28px rgba(59, 15, 78, 0.22);
  transition: box-shadow 0.3s;
}

.avatar-rings.listening .avatar-circle,
.avatar-rings.speaking .avatar-circle {
  box-shadow: 0 8px 36px rgba(59, 15, 78, 0.38);
}

.agent-name {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--brand);
  letter-spacing: 0.3px;
}

.status-text {
  font-size: 13px;
  color: var(--text-light);
  min-height: 18px;
  text-align: center;
  transition: color 0.3s;
}

.status-text.active {
  color: var(--brand-mid);
}

.status-text.speaking {
  color: var(--brand);
}

/* ── Transcript ───────────────────────────────────────────────────────────── */
.transcript-box {
  width: 100%;
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 28px;
  padding: 0 2px;
}

.transcript-box::-webkit-scrollbar {
  width: 3px;
}

.transcript-box::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.transcript-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.t-line {
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: fadeUp 0.22s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.t-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.t-line.user .t-label {
  color: var(--brand-mid);
}

.t-line.arya .t-label {
  color: var(--brand);
}

.t-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-mid);
}

/* ── Controls ─────────────────────────────────────────────────────────────── */
.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.mic-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--brand);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 2px 12px var(--shadow);
  -webkit-tap-highlight-color: transparent;
}

.mic-btn:hover:not(.disabled) {
  border-color: var(--brand);
  box-shadow: 0 4px 20px rgba(59, 15, 78, 0.15);
  transform: translateY(-1px);
}

.mic-btn.listening {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 4px 24px rgba(59, 15, 78, 0.35);
  animation: mic-pulse 1.2s infinite alternate;
}

@keyframes mic-pulse {
  from {
    box-shadow: 0 4px 16px rgba(59, 15, 78, 0.28);
  }

  to {
    box-shadow: 0 4px 32px rgba(59, 15, 78, 0.52);
  }
}

.mic-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.mic-hint {
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 0.3px;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .page {
    padding: 0 20px;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 0 60px;
  }

  .intro-name {
    font-size: 40px;
  }

  .voice-panel {
    padding: 36px 24px 32px;
  }

  .topbar {
    padding: 20px 0 18px;
  }

  .brand-sub {
    display: none;
  }
}

/* ── Call panel ────────────────────────────────────────────────────────────── */
.call-panel {
  margin-top: 24px;
  width: 100%;
  max-width: 320px;
}

.call-input-row {
  display: flex;
  gap: 8px;
}

.call-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid #e0d6e8;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}

.call-input:focus {
  border-color: #3B0F4E;
}

.call-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: #3B0F4E;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s;
}

.call-btn:hover {
  background: #5a1a78;
}

.call-status {
  margin-top: 8px;
  font-size: 13px;
  color: #7a6a8a;
  min-height: 18px;
}