/* Breakthrough Automations landing page
   Brand: deep navy, white Inter headlines, purple -> blue -> cyan gradient, glowing cyan button */
:root {
  --bg: #050a18;
  --bg-2: #0b1120;
  --panel: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.09);
  --ink: #ffffff;
  --muted: #a8b3c7;
  --muted-2: #6b7891;
  --cyan: #00d4ff;
  --blue: #3b82f6;
  --purple: #7c3aed;
  --grad: linear-gradient(90deg, var(--purple) 0%, var(--blue) 50%, var(--cyan) 100%);
  --glow: 0 0 24px rgba(0, 212, 255, 0.5);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { font-family: var(--font); background: var(--bg); overflow-x: hidden; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
canvas, img { display: block; }
::selection { background: var(--cyan); color: var(--bg); }

.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); }
.sub { color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; }

/* Buttons: same glowing cyan as the main site */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: var(--radius); border: 0;
  background: var(--cyan); color: var(--bg-2); font: 700 16px/1 var(--font);
  box-shadow: var(--glow); cursor: pointer; white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 36px rgba(0, 212, 255, 0.7); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 12px; }
.btn-block { width: 100%; }

/* ---------- loader ---------- */
#boot {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: grid; place-content: center; justify-items: center; gap: 10px;
  transition: opacity 0.7s ease, visibility 0.7s;
}
#boot.done { opacity: 0; visibility: hidden; }
#boot .gauge { width: 132px; height: 132px; transform: rotate(-90deg); filter: drop-shadow(0 0 14px rgba(0, 212, 255, 0.45)); }
#boot .track { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 6; }
#boot .fill { fill: none; stroke: url(#gaugeGrad); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 0.25s; }
#boot .boot-pct { margin-top: -94px; height: 60px; font: 800 30px/60px var(--font); font-variant-numeric: tabular-nums; }
#boot .boot-label { margin-top: 30px; font-size: 12px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) var(--gutter) 12px;
  background: linear-gradient(180deg, rgba(5, 10, 24, 0.85), rgba(5, 10, 24, 0));
  transition: transform 0.35s;
}
.topbar.tucked { transform: translateY(-110%); }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.logo b { font-weight: 700; color: var(--cyan); }
.bolt { font-size: 18px; }

/* ---------- pinned frame scenes ---------- */
.stage { position: relative; height: 420vh; }
.stage-pipeline { height: 340vh; }
.stage-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--bg); }
.frames { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-fade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 10, 24, 0.55) 0%, transparent 22%, transparent 60%, rgba(5, 10, 24, 0.9) 100%);
}
/* extra shade on the side where the copy sits */
.stage-engine .stage-fade {
  background:
    linear-gradient(90deg, rgba(5, 10, 24, 0.8) 0%, rgba(5, 10, 24, 0.35) 38%, transparent 55%),
    linear-gradient(180deg, rgba(5, 10, 24, 0.55) 0%, transparent 22%, transparent 60%, rgba(5, 10, 24, 0.9) 100%);
}

/* hero copy sits over the dark first frames */
.hero { position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(9vh + env(safe-area-inset-bottom)); max-width: 680px; z-index: 5; }
.hero .kicker { margin-bottom: 16px; }
.hero h1 { font-size: clamp(42px, 7.4vw, 96px); }
.hero .sub { margin-top: 18px; max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 26px; }
.scroll-hint { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.scroll-hint i { width: 18px; height: 28px; border: 2px solid var(--muted-2); border-radius: 10px; position: relative; }
.scroll-hint i::after { content: ""; position: absolute; left: 50%; top: 5px; width: 4px; height: 6px; margin-left: -2px; border-radius: 2px; background: var(--cyan); animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(10px); opacity: 0; } }

/* power readout */
.hud {
  position: absolute; z-index: 5; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(11, 17, 32, 0.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  opacity: 0; white-space: nowrap;
}
.hud-meter { width: 120px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.hud-meter i { display: block; height: 100%; width: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); }
.hud-val { color: var(--ink); font-variant-numeric: tabular-nums; min-width: 3.4em; }
.hud-state { color: #f87171; }
.hud-state.on { color: var(--cyan); }

/* callouts: one at a time, crossfaded by scroll */
.callouts, .steps { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.callout, .step {
  position: absolute; left: var(--gutter); top: 0; bottom: 0; margin: auto 0; height: fit-content; width: min(400px, 36vw);
  opacity: 0; visibility: hidden;
  padding: 24px; border: 1px solid var(--line); border-radius: 20px;
  background: rgba(11, 17, 32, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.callout .num, .step .num { display: inline-block; margin-bottom: 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); }
.callout h2 { font-size: clamp(24px, 2.4vw, 34px); }
.callout p, .step p { margin-top: 10px; color: var(--muted); font-size: 16px; }
.callout-final { pointer-events: auto; }
.callout-final .btn { margin-top: 18px; }

/* pipeline scene */
.pipe-title { position: absolute; top: calc(13vh + env(safe-area-inset-top)); left: 0; right: 0; text-align: center; padding: 0 var(--gutter); z-index: 5; }
.pipe-title .kicker { margin-bottom: 12px; }
.pipe-title h2 { font-size: clamp(32px, 4.6vw, 64px); }
.step { left: 0; right: 0; top: auto; bottom: calc(10vh + env(safe-area-inset-bottom)); margin: 0 auto; width: min(520px, calc(100vw - 2 * var(--gutter))); text-align: center; }
.step h3 { font-size: clamp(22px, 2.2vw, 30px); }
.dots { position: absolute; z-index: 5; left: 50%; bottom: calc(5vh + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 8px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); transition: background 0.3s, box-shadow 0.3s; }
.dots i.on { background: var(--cyan); box-shadow: var(--glow); }

/* ---------- trades ---------- */
.trades { position: relative; padding: clamp(80px, 14vh, 150px) var(--gutter); max-width: 1240px; margin: 0 auto; }
.trades .kicker { margin-bottom: 16px; }
.trades h2 { font-size: clamp(30px, 4.4vw, 56px); max-width: 900px; }
.trade-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 48px; }
.trade { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); transition: border-color 0.3s, transform 0.3s; }
.trade:hover { border-color: rgba(0, 212, 255, 0.4); transform: translateY(-3px); }
.trade .icon { font-size: 26px; }
.trade h3 { margin-top: 14px; font-size: 21px; letter-spacing: -0.02em; }
.trade p { margin-top: 6px; color: var(--muted); font-size: 15px; }

/* ---------- booking ---------- */
.book {
  display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center;
  max-width: 1240px; margin: 0 auto; padding: clamp(80px, 14vh, 160px) var(--gutter) clamp(100px, 16vh, 180px);
}
.book .kicker { margin-bottom: 16px; }
.book h2 { font-size: clamp(34px, 5vw, 64px); }
.book .sub { margin-top: 18px; max-width: 480px; }
.checks { list-style: none; margin-top: 26px; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: baseline; color: var(--ink); font-weight: 500; }
.checks li::before { content: "✓"; color: var(--cyan); font-weight: 800; }

.panel {
  position: relative; padding: clamp(22px, 3vw, 36px); border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 212, 255, 0.06);
}
.panel::before { content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 1px; background: var(--grad); }

/* Zoom Scheduler calendar */
.book-cal { padding-bottom: clamp(40px, 6vh, 80px); }
.cal-panel { padding: 12px; }
/* wide enough on desktop for Zoom's three-column view; on phones the time list scrolls inside */
.cal-frame { display: block; width: 100%; height: 760px; border: 0; border-radius: 16px; background: #fff; }
.cal-panel .fine a { color: var(--cyan); }
#contact { padding-top: clamp(40px, 6vh, 80px); }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.field input, .field select {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 10, 24, 0.6); color: var(--ink); font: 500 16px var(--font); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s; appearance: none; -webkit-appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 23px, calc(100% - 16px) 23px; background-size: 6px 6px; background-repeat: no-repeat;
}
.field select:invalid { color: var(--muted-2); }
.field option { color: #000; }
.field input:focus, .field select:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.15); }
.field.bad input, .field.bad select { border-color: #f87171; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
#leadForm .btn { margin-top: 6px; }
.form-msg { margin-top: 12px; font-size: 14px; color: #fca5a5; text-align: center; }
.form-msg:empty { display: none; }
.fine { margin-top: 12px; font-size: 13px; color: var(--muted-2); text-align: center; }
.thanks { display: none; text-align: center; padding: 30px 0; outline: none; }
.thanks-ring { width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; background: var(--cyan); color: var(--bg-2); font-size: 30px; font-weight: 800; box-shadow: 0 0 50px rgba(0, 212, 255, 0.55); }
.thanks h3 { font-size: 30px; }
.thanks p { margin-top: 10px; color: var(--muted); }
.panel.sent form { display: none; }
.panel.sent .thanks { display: block; }

/* ---------- footer + phone CTA ---------- */
.footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 28px var(--gutter) calc(100px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
  color: var(--muted-2); font-size: 14px;
}
.footer .logo { color: var(--ink); font-size: 15px; }
.mobile-cta {
  position: fixed; z-index: 45; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateY(160%); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); display: none;
}
.mobile-cta.show { transform: none; }
/* chat bubble (js/chat/loader.js) docks to the right of the phone CTA instead of covering it */
.ba-chat-on .mobile-cta { right: 84px; }

.reveal { opacity: 0; transform: translateY(28px); }

/* ---------- larger screens ---------- */
@media (min-width: 900px) {
  .book { grid-template-columns: 1.05fr 0.95fr; gap: 7vw; }
  .book-cal { grid-template-columns: 1fr; gap: 40px; }
  .book-cal .book-copy { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 0 6vw; align-items: end; }
  .book-cal .book-copy > * { grid-column: 1; }
  .book-cal .checks { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
  .cal-frame { height: 640px; }
  .footer { padding-bottom: 28px; }
}

/* ---------- phones ---------- */
@media (max-width: 899px) {
  .topbar .btn-sm { display: none; }
  .stage-engine .stage-fade { background: linear-gradient(180deg, rgba(5, 10, 24, 0.5) 0%, transparent 16%, transparent 36%, rgba(5, 10, 24, 0.94) 60%); }
  .mobile-cta { display: block; }
  .hero { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .hero .scroll-hint { display: none; }
  .hud { top: calc(64px + env(safe-area-inset-top)); bottom: auto; gap: 10px; padding: 8px 14px; font-size: 11px; }
  .hud-meter { width: 72px; }
  /* compact, see-through cards that sit just above the phone CTA, leaving the animation clear */
  .callout, .step {
    padding: 14px 16px; border-radius: 16px; box-shadow: none;
    background: rgba(11, 17, 32, 0.58); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  }
  .callout .num, .step .num { margin-bottom: 4px; font-size: 11px; }
  .callout { left: 16px; right: 16px; width: auto; top: auto; bottom: calc(80px + env(safe-area-inset-bottom)); margin: 0; }
  .callout h2, .step h3 { font-size: 19px; }
  .callout p, .step p { margin-top: 6px; font-size: 14px; line-height: 1.45; }
  .callout-final .btn { display: none; }
  .pipe-title { top: calc(66px + env(safe-area-inset-top)); }
  .pipe-title .kicker { display: none; }
  .step { bottom: calc(94px + env(safe-area-inset-bottom)); }
  .dots { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint i::after { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
