/* Hero: dark stage, WebGL backdrop, and a CSS 3D composition of the three products. */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(120% 80% at 70% 10%, #163a7a 0%, var(--navy-2) 45%, var(--navy) 100%);
  padding: calc(var(--nav-h) + 56px) 0 96px;
  min-height: 100svh;
  display: grid; align-items: center;
}
.hero-canvas { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-canvas canvas { width: 100% !important; height: 100% !important; display: block; }
.hero-canvas.no-3d {
  background:
    radial-gradient(60% 50% at 70% 60%, rgba(27, 106, 232, 0.35), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 100% 56px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 56px 100%;
  mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
}
.hero-vignette { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(to bottom, rgba(11, 18, 32, 0.4), transparent 30%, transparent 70%, var(--navy)); }
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 72px); align-items: center; }

.hero-copy { display: grid; gap: 26px; position: relative; z-index: 3; }
.hero-copy .eyebrow { color: var(--on-navy-2); }
.hero-copy .eyebrow::before { background: #7fb2ff; box-shadow: 0 0 0 4px rgba(127, 178, 255, 0.2), 0 0 24px #7fb2ff; }
.hero-copy h1 { color: #fff; }
.hero-copy h1 .line { display: block; }
.hero-copy h1 .glow {
  background: linear-gradient(90deg, #8ec2ff, #cfe3ff 40%, #9be7c4 75%, #c9b8ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-copy .lede { color: var(--on-navy-2); font-size: clamp(1.05rem, 1rem + 0.45vw, 1.28rem); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.hero-proof { display: grid; gap: 12px; margin-top: 10px; color: var(--on-navy-2); font-size: 0.95rem; }
.hero-proof li { display: flex; align-items: center; gap: 12px; }
.hero-proof svg { width: 20px; height: 20px; flex: none; color: #9be7c4; }

/* 3D stage */
.hero-stage { position: relative; perspective: 1800px; perspective-origin: 40% 40%; min-height: 540px; padding-top: 24px; }
.hero-scene {
  position: relative; transform-style: preserve-3d;
  transform: translateY(var(--py, 0px)) rotateX(var(--sx, 6deg)) rotateY(var(--sy, -10deg));
  will-change: transform;
}
.hero-scene > * { transform-style: preserve-3d; }

.browser {
  position: relative; border-radius: 14px; overflow: hidden;
  background: #0f172a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 60px 120px -40px rgba(0, 0, 0, 0.8), 0 30px 60px -30px rgba(27, 106, 232, 0.5);
}
.browser-bar { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; background: #162036; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3b4a66; }
.browser-bar i:nth-child(1) { background: #ff5f57; } .browser-bar i:nth-child(2) { background: #febc2e; } .browser-bar i:nth-child(3) { background: #28c840; }
.browser-bar span { margin-left: 10px; flex: 1; max-width: 360px; height: 22px; line-height: 22px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); color: #93a4c3; font-size: 12px; padding: 0 10px; text-align: center; }
.browser img { width: 100%; aspect-ratio: 1440 / 900; object-fit: cover; object-position: top; }
.browser::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, 0.12), transparent 35%, transparent 70%, rgba(255, 255, 255, 0.05)); mix-blend-mode: screen; }

.card-dash { width: 92%; transform: translateZ(0); }
.card-phone { position: absolute; right: -3%; bottom: -8%; width: 24%; transform: translateZ(110px) rotateY(-14deg) rotateX(3deg); }
.card-ai { position: absolute; left: -2%; bottom: 2%; width: 36%; transform: translateZ(110px) rotateY(7deg); }

.phone { position: relative; border-radius: 12% / 6%; padding: 3.2%; background: linear-gradient(160deg, #2a3650, #0d1526); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 50px 90px -30px rgba(0, 0, 0, 0.85), 0 20px 40px -20px rgba(0, 0, 0, 0.6); }
.phone::before { content: ""; position: absolute; left: -2px; top: 24%; width: 3px; height: 9%; border-radius: 2px; background: #3b4a66; }
.phone::after { content: ""; position: absolute; right: -2px; top: 30%; width: 3px; height: 14%; border-radius: 2px; background: #3b4a66; }
.phone-screen { position: relative; border-radius: 10% / 5%; overflow: hidden; background: #000; }
.phone-screen img { width: 100%; aspect-ratio: 720 / 1520; object-fit: cover; object-position: top; }
.phone-screen::before { content: ""; position: absolute; top: 2.4%; left: 50%; width: 9%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; background: #0b1220; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06); z-index: 2; }

/* Assistant card, built in HTML so it stays crisp */
.ai-card { border-radius: 16px; padding: 14px 14px 12px; background: rgba(255, 255, 255, 0.96); color: var(--text); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.4), 0 50px 90px -30px rgba(0, 0, 0, 0.75), 0 24px 40px -24px rgba(124, 92, 255, 0.5); font-size: 12.5px; line-height: 1.4; }
.ai-head { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); margin-bottom: 12px; white-space: nowrap; }
.ai-head .spark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--violet)); color: #fff; }
.ai-head .spark svg { width: 15px; height: 15px; }
.ai-head small { margin-left: auto; font-weight: 500; color: var(--text-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.ai-q { display: inline-block; max-width: 92%; padding: 9px 12px; border-radius: 14px 14px 4px 14px; background: var(--brand); color: #fff; margin: 0 0 10px auto; font-weight: 500; }
.ai-q-wrap { display: flex; justify-content: flex-end; }
.ai-a { padding: 10px 12px; border-radius: 4px 14px 14px 14px; background: var(--surface-2); min-height: 56px; }
.ai-a p { margin-bottom: 6px; }
.ai-a ul { display: grid; gap: 4px; }
.ai-a li { display: flex; justify-content: space-between; gap: 10px; }
.ai-a li b { font-weight: 600; color: var(--ink); }
.ai-a li span { color: var(--text-3); font-variant-numeric: tabular-nums; }
.ai-approve { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; margin-top: 10px; padding: 8px 10px; border: 1px dashed var(--line-strong); border-radius: 12px; background: #fff; }
.ai-approve .tag { grid-column: 1 / -1; }
.ai-approve > span:nth-child(2) { color: var(--ink); font-weight: 500; }
.ai-approve .tag { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #5a3fd6; }
.ai-approve .ok { padding: 5px 10px; border-radius: 999px; background: #0b7a56; color: #fff; font-weight: 700; font-size: 12px; }
.ai-cursor { display: inline-block; width: 7px; height: 14px; vertical-align: -2px; background: var(--brand); border-radius: 1px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Floating chips */
.chip { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.96); color: var(--text); font-size: 12.5px; line-height: 1.25; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5), 0 30px 60px -24px rgba(0, 0, 0, 0.7); white-space: nowrap; }
.chip strong { display: block; color: var(--ink); font-weight: 700; }
.chip small { color: var(--text-3); }
.chip-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex: none; }
.chip-icon svg { width: 16px; height: 16px; }
.chip-call { left: 34%; top: 1%; transform: translateZ(190px); --c: var(--emerald); }
.chip-lead { right: 4%; top: 26%; transform: translateZ(230px); --c: var(--brand); }
.chip-won { left: 50%; bottom: -6%; transform: translateZ(200px); --c: var(--amber); }
.chip .chip-icon { background: var(--c); }

/* Gentle bob at different phases; disabled under reduced motion */
.float { animation: bob 7s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@media (prefers-reduced-motion: reduce) { .float, .ai-cursor, .scroll-cue i { animation: none; } }

.scroll-cue { position: absolute; left: 50%; bottom: 22px; z-index: 2; translate: -50% 0; color: var(--on-navy-2); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; display: grid; justify-items: center; gap: 8px; }
.scroll-cue i { width: 1px; height: 36px; background: linear-gradient(to bottom, #7fb2ff, transparent); animation: cue 2s ease-in-out infinite; }
@keyframes cue { 0% { scale: 1 0; transform-origin: top; } 50% { scale: 1 1; transform-origin: top; } 51% { transform-origin: bottom; } 100% { scale: 1 0; transform-origin: bottom; } }

@media (max-width: 1080px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-stage { min-height: 0; margin-top: 24px; perspective-origin: 50% 30%; }
  .hero-scene { --sx: 4deg; --sy: -6deg; max-width: 720px; margin-inline: auto; }
  .card-ai { left: 0; bottom: -4%; width: 44%; }
  .card-phone { right: 0; bottom: -10%; }
  .chip-lead { right: 2%; }
}
@media (max-width: 640px) {
  .hero { padding-top: calc(var(--nav-h) + 24px); padding-bottom: 72px; }
  .hero-scene { --sx: 2deg; --sy: -4deg; }
  .card-dash { width: 100%; }
  .chip { font-size: 11.5px; padding: 8px 10px 8px 8px; }
  .chip-won { display: none; }
  .card-ai { position: relative; left: auto; bottom: auto; width: 88%; margin: 30px auto 0; transform: translateZ(60px) rotateY(3deg); }
  .ai-head small { display: none; }
  .card-phone { width: 28%; right: -2%; bottom: auto; top: 10%; }
  .chip-lead { top: 4%; right: 2%; }
  .chip-call { display: none; }
  .hero-stage { margin-bottom: 24px; padding-top: 12px; }
  .scroll-cue { display: none; }
}
