/* ==========================================================
   HERO
   ========================================================== */
.hero {
  position: relative;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
}

.wf-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.7;
  pointer-events: none;
  mask-image: radial-gradient(80% 90% at 50% 40%, black 35%, transparent 90%);
  -webkit-mask-image: radial-gradient(80% 90% at 50% 40%, black 35%, transparent 90%);
}
[data-theme="light"] .wf-bg { opacity: 0.45; }

.hero-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--grad-hero);
  pointer-events: none;
}

.hero-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
  padding-top: 90px;
  padding-bottom: 110px;
  min-height: 760px;
}
@media (max-width: 980px) {
  .hero-wrap {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-top: 70px;
    padding-bottom: 80px;
    min-height: unset;
  }
}

.hero-copy { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }

.hero-title {
  font-size: clamp(44px, 6.2vw, 84px);
  letter-spacing: -0.035em;
  line-height: 1;
}
.hero-sub {
  font-size: clamp(17px, 1.5vw, 20px);
  color: var(--ink-2);
  margin: 0;
  max-width: 560px;
  line-height: 1.5;
}

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
@media (max-width: 480px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
.stat-n {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 28px;
  color: var(--indigo);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-l {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Hero marquee */
.hero-marquee {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  overflow: hidden;
  background: color-mix(in oklab, var(--bg-1) 40%, transparent);
  backdrop-filter: blur(10px);
}
.marquee-track {
  display: flex;
  gap: 56px;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
  width: max-content;
}
.marquee-item {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.marquee-item::before {
  content: "▸";
  color: var(--indigo-2);
  margin-right: 12px;
  opacity: 0.6;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ==========================================================
   Call Demo Widget
   ========================================================== */
.call-widget {
  background: linear-gradient(180deg, rgba(22,28,51,0.85) 0%, rgba(15,20,36,0.85) 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  padding: 22px;
  position: relative;
  box-shadow:
    0 30px 80px -20px rgb(var(--accent-rgb) / 0.45),
    0 12px 28px -10px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  overflow: hidden;
}
[data-theme="light"] .call-widget {
  background: linear-gradient(180deg, #fff 0%, #f8f9ff 100%);
  box-shadow:
    0 30px 80px -20px rgb(var(--accent-rgb) / 0.25),
    0 12px 28px -10px rgba(20,25,60,0.10);
}
.call-widget::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / 0.6), transparent 40%, rgb(var(--accent2-rgb) / 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.call-widget::after {
  content: "";
  position: absolute;
  top: -120px; right: -120px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(var(--accent-rgb) / 0.35), transparent 60%);
  pointer-events: none;
  animation: float-slow 6s ease-in-out infinite;
}

.cw-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px;
}
.cw-avatar {
  width: 46px; height: 46px;
  position: relative;
  display: grid; place-items: center;
}
.cw-avatar-core {
  position: relative; z-index: 2;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-l), var(--accent), var(--accent-d));
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-ink);
  box-shadow: 0 6px 18px -4px rgb(var(--accent-rgb) / 0.6), inset 0 1px 0 rgba(255,255,255,0.3);
}
.cw-avatar-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgb(var(--accent-rgb) / 0.6);
  animation: avatar-pulse 2s ease-out infinite;
}
@keyframes avatar-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

.cw-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.cw-sub {
  display: flex; gap: 14px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--ink-3);
  margin-top: 4px;
  align-items: center;
}
.cw-live {
  display: inline-flex; align-items: center; gap: 5px;
  color: #f87171;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.cw-live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: pulse-dot 1.4s ease-in-out infinite;
}
.cw-time { color: var(--ink-2); }
.cw-lang { color: var(--indigo-3); }

.cw-controls { display: flex; gap: 8px; }
.cw-icon-btn {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.15s ease;
}
.cw-icon-btn:hover { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }

/* Mini waveform inside widget */
.mini-wave {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 4px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: rgba(5,10,8,0.45);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
[data-theme="light"] .mini-wave { background: rgba(15,20,40,0.04); }
.mini-wave::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgb(var(--accent-rgb) / 0.15), transparent);
  animation: shimmer 3s linear infinite;
  background-size: 200% 100%;
}
.mini-wave span {
  flex: 1;
  margin: 0 1px;
  background: linear-gradient(180deg, var(--indigo-2), var(--indigo));
  border-radius: 2px;
  height: 8%;
  animation: wave-bar 1.4s ease-in-out infinite;
  transform-origin: center;
  opacity: 0.85;
}
.mini-wave[data-active="false"] span { animation-play-state: paused; opacity: 0.3; }
@keyframes wave-bar {
  0%, 100% { height: 8%; }
  20% { height: 35%; }
  40% { height: 80%; }
  60% { height: 25%; }
  80% { height: 60%; }
}

/* Transcript */
.cw-transcript {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 130px;
  margin-bottom: 18px;
}
.bubble {
  padding: 10px 14px;
  border-radius: 14px;
  max-width: 90%;
  font-size: 14px;
  line-height: 1.45;
  position: relative;
  transition: opacity 0.4s ease;
}
.bubble-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
  opacity: 0.7;
}
.bubble.agent {
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / 0.18), rgb(var(--accent2-rgb) / 0.12));
  border: 1px solid rgb(var(--accent-rgb) / 0.3);
  align-self: flex-start;
  color: var(--ink);
}
.bubble.agent .bubble-meta { color: var(--indigo-3); }
.bubble.lead {
  background: var(--surface-2);
  border: 1px solid var(--line);
  align-self: flex-end;
  color: var(--ink-2);
}
[data-theme="light"] .bubble.lead { background: #f0f2fa; }
.bubble.lead .bubble-meta { color: var(--ink-3); }
.bubble.faded { opacity: 0.45; }
.bubble.active { animation: bubble-in .25s ease; }
@keyframes bubble-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Meta footer */
.cw-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.cw-meta-item {
  display: flex; flex-direction: column; gap: 2px;
}
.cw-meta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cw-meta-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.cw-meta-value.good { color: var(--emerald); }
.cw-meta-value.tagged { color: var(--indigo-2); }
