/**
 * Landing — agent / WhatsApp motion & visuals
 * Requires tokens.css + components.css
 */

.hero-orbit {
  position: absolute;
  inset: -12% -8%;
  background:
    radial-gradient(ellipse 55% 45% at 70% 40%, rgba(125, 211, 252, 0.18), transparent 60%),
    radial-gradient(ellipse 40% 35% at 20% 70%, rgba(200, 160, 240, 0.12), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.hero-line--lead {
  /* Room for descenders (j in "Deja") inside overflow-hidden + gap before blue line */
  padding-bottom: 0.38em;
}

.hero-line--accent {
  padding-bottom: 0.72em;
}

.hero-promise {
  margin-top: 0.15em;
  max-width: 18ch;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(232, 238, 248, 0.72);
}

@media (min-width: 1024px) {
  .hero-promise {
    max-width: 22ch;
  }
}

.text-glow-pink {
  text-shadow:
    0 0 28px rgba(125, 211, 252, 0.45),
    0 0 60px rgba(125, 211, 252, 0.2);
}


.agent-stage {
  position: relative;
  isolation: isolate;
}

.agent-bot {
  width: min(280px, 70vw);
  height: auto;
  filter: drop-shadow(0 0 40px rgba(125, 211, 252, 0.25));
}

.agent-bot .visor {
  fill: rgba(125, 211, 252, 0.25);
  stroke: #7dd3fc;
}

.agent-bot .eye {
  fill: #7dd3fc;
  animation: agent-blink 4s ease-in-out infinite;
}

.agent-bot .ring {
  fill: none;
  stroke: rgba(125, 211, 252, 0.35);
  stroke-dasharray: 6 10;
  transform-origin: center;
}

@keyframes agent-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@keyframes agent-blink {
  0%, 92%, 100% { opacity: 1; }
  94%, 96% { opacity: 0.15; }
}

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

.wa-thread {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 360px;
}

.wa-bubble {
  max-width: 90%;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  font-size: 0.8125rem;
  line-height: 1.45;
}

/* Prevent first-paint flash: hide hero motion targets until GSAP boots */
html:not(.gsap-ready) .wa-bubble,
html:not(.gsap-ready) .agent-bot,
html:not(.gsap-ready) .hero-line-inner,
html:not(.gsap-ready) .hero-promise,
html:not(.gsap-ready) .hero-orbit {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  html:not(.gsap-ready) .wa-bubble,
  html:not(.gsap-ready) .agent-bot,
  html:not(.gsap-ready) .hero-line-inner,
  html:not(.gsap-ready) .hero-promise,
  html:not(.gsap-ready) .hero-orbit {
    opacity: 1;
  }
}

.wa-bubble--lead {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top-left-radius: 0.25rem;
  color: var(--color-on-surface);
}

.wa-bubble--agent {
  align-self: flex-end;
  background: rgba(125, 211, 252, 0.12);
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-top-right-radius: 0.25rem;
  color: #e8eef8;
}

.wa-bubble--agent .agent-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.35rem;
}

html.gsap-ready .hero-line {
  perspective: 600px;
}

@keyframes bubble-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.agent-card {
  position: relative;
  overflow: hidden;
  transition: border-color var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-out);
}

.agent-card:hover {
  border-color: var(--border-primary-strong);
  transform: translateY(-4px);
}

.agent-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.08), transparent 45%);
  pointer-events: none;
}

.agent-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5eead4;
}

.agent-status::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #5eead4;
  box-shadow: 0 0 10px rgba(94, 234, 212, 0.7);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.flow-rail {
  position: relative;
}

.flow-rail::before {
  content: "";
  position: absolute;
  left: 1.15rem;
  top: 2.5rem;
  bottom: 2.5rem;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(125, 211, 252, 0.5), transparent);
}

@media (min-width: 768px) {
  .flow-rail::before {
    left: 0;
    right: 0;
    top: 2rem;
    bottom: auto;
    height: 1px;
    width: auto;
    background: linear-gradient(to right, transparent, rgba(125, 211, 252, 0.45), transparent);
  }
}

.stat-glow {
  text-shadow: 0 0 28px rgba(125, 211, 252, 0.35);
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: marquee 28s linear infinite;
}

.marquee-track span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-on-surface-muted);
  white-space: nowrap;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .agent-bot,
  .agent-bot .eye,
  .agent-bot .ring,
  .wa-bubble,
  .agent-status::before,
  .marquee-track {
    animation: none !important;
  }
}

/* ---------- Scroll depth / ambient orbs ---------- */
.cx-depth-section {
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.cx-section-orb {
  position: absolute;
  width: min(52vw, 420px);
  height: min(52vw, 420px);
  top: 8%;
  left: var(--orb-shift, 10%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(125, 211, 252, 0.16),
    rgba(94, 234, 212, 0.04) 45%,
    transparent 70%
  );
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}

.cx-depth-section > *:not(.cx-section-orb) {
  position: relative;
  z-index: 1;
}

/* Left signal rail — progresses with page scroll */
.cx-signal-rail {
  position: fixed;
  left: 0.85rem;
  top: 20vh;
  bottom: 18vh;
  width: 2px;
  z-index: 90;
  pointer-events: none;
  opacity: 0.9;
}

.cx-signal-rail__track {
  position: relative;
  height: 100%;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.cx-signal-rail__fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #7dd3fc, #5eead4 55%, #c8a0f0);
  transform: scaleY(0);
  transform-origin: top center;
  border-radius: inherit;
}

.cx-signal-rail__head {
  position: absolute;
  left: 50%;
  top: 0;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: #7dd3fc;
  box-shadow: 0 0 12px rgba(125, 211, 252, 0.85);
  opacity: 0;
}

@media (max-width: 900px) {
  .cx-signal-rail {
    display: none;
  }
}

/* Funnel traveling beam */
.funnel-track {
  position: relative;
}

.funnel-beam {
  display: none;
}

@media (min-width: 768px) {
  .funnel-beam {
    display: block;
    position: absolute;
    left: 4%;
    right: 4%;
    top: 1.85rem;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, #7dd3fc, #5eead4, transparent);
    box-shadow: 0 0 16px rgba(125, 211, 252, 0.45);
    z-index: 0;
    pointer-events: none;
    transform: scaleX(0);
  }
}

.funnel-cell.is-lit {
  border-color: rgba(125, 211, 252, 0.45);
  box-shadow: 0 0 24px rgba(125, 211, 252, 0.12);
}

.funnel-cell.is-lit .funnel-cell__n {
  color: #7dd3fc;
}
