/* =========================================================
   WATTS WHERE — tokens
   ========================================================= */
:root{
  --bg-0:#070b16;
  --bg-1:#0b1122;
  --ink-0:#ffffff;
  --ink-1:#c9d3e6;
  --ink-2:#8894ad;
  --ink-3:#4f5972;

  --line:rgba(255,255,255,0.08);
  --line-2:rgba(255,255,255,0.16);

  /* Dark blue + white brand scheme. */
  --accent-white:#ffffff;
  --accent-blue:#3b82f6;
  --accent-white-soft:rgba(255,255,255,0.14);
  --accent-blue-soft:rgba(59,130,246,0.18);

  --status-avail:#34e2a0;
  --status-busy:#f0a94e;
  --status-off:#5a6478;

  --maxw:1280px;
  --gutter:28px;

  --nav-h:76px;
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;overflow-x:clip}
html,body{margin:0;padding:0;background:var(--bg-0);color:var(--ink-0)}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,system-ui,sans-serif;
  line-height:1.5;
  overflow-x:clip;
  min-height:100vh;
  background:
    radial-gradient(900px 600px at 82% -8%, rgba(59,130,246,0.12), transparent 60%),
    radial-gradient(800px 560px at -8% 20%, rgba(255,255,255,0.10), transparent 60%),
    var(--bg-0);
}

a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}

.mono{font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,monospace}

h1,h2,h3{font-weight:600;letter-spacing:-0.02em;margin:0;color:var(--ink-0)}
h1{font-size:clamp(40px,6vw,78px);line-height:1.15;letter-spacing:-0.03em;font-weight:600}
h2{font-size:clamp(30px,3.6vw,48px);line-height:1.18;letter-spacing:-0.025em}
p{color:var(--ink-1);font-size:17px;line-height:1.6;margin:0}
.lead{font-size:18px;color:var(--ink-1);max-width:580px;line-height:1.6}

.accent-text{
  background:linear-gradient(95deg,var(--accent-white) 0%, var(--accent-blue) 100%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
  /* background-clip:text paints the gradient only within the element's own
     box, sized by line-height — with line-height this tight, descenders
     (g/y/p/q) extend past that box and get hard-clipped rather than just
     visually cramped. This padding gives the box room to cover them. */
  padding-bottom:0.18em;
}

.wrap{width:100%;max-width:var(--maxw);margin:0 auto;padding:0 var(--gutter)}
.sec-head{max-width:720px;margin-bottom:24px;display:flex;flex-direction:column;gap:16px}

/* =========================================================
   SCROLL PROGRESS
   ========================================================= */
.scroll-progress{
  position:fixed;top:0;left:0;height:2.5px;width:0%;
  z-index:101;
  background:linear-gradient(90deg,var(--accent-blue),var(--accent-white));
  box-shadow:0 0 10px rgba(59,130,246,0.6);
  transition:width .1s linear;
}

/* =========================================================
   CIRCUIT BOARD BACKGROUND
   ========================================================= */
#circuit-bg{
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  z-index:0;
  pointer-events:none;
}
#circuit-bg path{
  fill:none;
  stroke-width:1.6;
  stroke-linecap:round;
  filter:drop-shadow(0 0 3px currentColor);
}
#circuit-bg circle{
  filter:drop-shadow(0 0 4px currentColor);
}

@keyframes trace-life{
  0%   { stroke-dashoffset: var(--len); opacity:0; }
  10%  { opacity: var(--peak-op, .55); }
  38%  { stroke-dashoffset: 0; opacity: var(--peak-op, .55); }
  72%  { stroke-dashoffset: 0; opacity: var(--peak-op, .55); }
  100% { stroke-dashoffset: 0; opacity:0; }
}
@keyframes node-life{
  0%,34%{ transform:scale(0); opacity:0; }
  42%{ transform:scale(1); opacity:1; }
  72%{ transform:scale(1); opacity:1; }
  100%{ transform:scale(.4); opacity:0; }
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn{
  position:relative;display:inline-flex;align-items:center;gap:10px;
  padding:14px 22px;border-radius:12px;font-weight:600;font-size:15px;
  border:1px solid var(--line-2);background:rgba(255,255,255,0.03);
  color:var(--ink-0);cursor:pointer;font-family:inherit;
  transition:transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:hover{transform:translateY(-2px);background:rgba(255,255,255,0.06)}
.btn-primary{
  background:linear-gradient(135deg,var(--accent-white),var(--accent-blue));
  color:#081226;border-color:transparent;
  box-shadow:0 10px 30px rgba(59,130,246,0.25), 0 4px 14px rgba(255,255,255,0.16);
}
.btn-primary:hover{
  background:linear-gradient(135deg,var(--accent-white),var(--accent-blue));
  box-shadow:0 14px 38px rgba(59,130,246,0.35), 0 6px 20px rgba(255,255,255,0.22);
}
.btn-ghost{background:transparent}
.btn .arrow{transition:transform .25s ease;display:inline-block}
.btn:hover .arrow{transform:translateX(3px)}

/* =========================================================
   NAV
   ========================================================= */
.nav{
  position:fixed;top:0;left:0;right:0;z-index:100;
  height:var(--nav-h);
  display:flex;align-items:center;
  background:linear-gradient(180deg, rgba(7,10,20,0.85), rgba(7,10,20,0.55));
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}
.nav-inner{
  width:100%;max-width:var(--maxw);margin:0 auto;padding:0 var(--gutter);
  display:flex;align-items:center;justify-content:space-between;
}
.brand{display:flex;align-items:center}
.brand-logo{height:26px;width:auto;display:block}
.nav-cta{padding:10px 18px;font-size:14px}

/* =========================================================
   HERO
   ========================================================= */
.hero{
  position:relative;z-index:1;
  padding-top:calc(var(--nav-h) + 48px);
  padding-bottom:40px;
  min-height:100vh;
  display:flex;flex-direction:column;justify-content:center;
  overflow:clip;
}
.hero-grid{
  width:100%;max-width:var(--maxw);margin:0 auto;padding:0 var(--gutter);
  display:grid;grid-template-columns:0.85fr 1.15fr;gap:20px;align-items:center;
}
@media (max-width:980px){
  .hero-grid{grid-template-columns:1fr;gap:12px;text-align:center}
  /* No visual on this layout (see .hero-visual below) — filling a full
     viewport height and centering just leaves dead air above the text. */
  .hero{min-height:auto;padding-top:calc(var(--nav-h) + 32px);padding-bottom:32px;justify-content:flex-start}
  .cta-row,.meta-row{justify-content:center}
}

.hero-visual{
  position:relative;
  aspect-ratio:3/4;
  max-width:480px;width:100%;
  margin:0 auto;
}
/* Stacks below the text at this width — a static/tilting object with
   nothing beside it just adds scroll, so it's cut rather than shrunk. */
@media (max-width:980px){
  .hero-visual{display:none}
}
.hero-visual-glow{
  position:absolute;inset:-20%;
  background:radial-gradient(closest-side at 55% 42%, rgba(59,130,246,0.22), transparent 70%);
  filter:blur(50px);
  animation:glow-pulse 6s ease-in-out infinite;
  pointer-events:none;
}
@keyframes glow-pulse{0%,100%{opacity:.7}50%{opacity:1}}

/* --- CSS-only 3D brand bolt ---
   Two clipped, gradient-shaded planes echoing the sail + streak shapes
   of the nav logo's bolt mark, given depth the same way the app-showcase
   phone mockup is (see heroPlug in main.js): a perspective stage, a
   slow idle sway on one wrapper, cursor-tilt (JS) on the inner element
   so the two motions compose instead of fighting over one transform. */
.bolt-stage{
  position:absolute;inset:0;
  display:flex;align-items:flex-start;justify-content:center;
  padding-top:6%;
  perspective:1400px;
}
.bolt-sway{
  width:60%;aspect-ratio:263/486;
  transform-style:preserve-3d;
  animation:bolt-sway 7s ease-in-out infinite;
}
@keyframes bolt-sway{
  0%,100%{transform:rotateY(-8deg)}
  50%{transform:rotateY(8deg)}
}
.bolt-3d{
  position:relative;width:100%;height:100%;
  transform:rotateY(-16deg) rotateX(6deg);
  transform-style:preserve-3d;
  will-change:transform;
}

.bolt-sail{position:absolute;left:0;top:0;width:49%;height:63%}
.bolt-sail-back,.bolt-sail-front{
  position:absolute;inset:0;
  clip-path:polygon(100% 0%, 0% 100%, 100% 100%);
}
.bolt-sail-back{
  transform:translate(-6px,6px);
  background:linear-gradient(160deg,#0d1730,#050810);
}
.bolt-sail-front{
  background:linear-gradient(150deg,#f5f8ff 0%,#cddbf5 22%,#7fa0d4 55%,#2c4677 85%,#16233d 100%);
  box-shadow:
    inset 0 2px 6px rgba(255,255,255,.5),
    inset 0 -22px 40px rgba(0,0,0,.35);
}

.bolt-streak{position:absolute;right:0;top:38%;width:45%;height:62%}
.bolt-streak-back,.bolt-streak-front{
  position:absolute;inset:0;
  clip-path:polygon(0% 0%, 100% 0%, 0% 100%);
}
.bolt-streak-back{
  transform:translate(-6px,6px);
  background:linear-gradient(160deg,#0d1730,#050810);
}
.bolt-streak-front{
  background:linear-gradient(150deg,#f5f8ff 0%,#cddbf5 18%,#5b86c9 50%,#274169 82%,#141f36 100%);
  box-shadow:
    inset 0 2px 6px rgba(255,255,255,.5),
    inset 0 -18px 34px rgba(0,0,0,.35);
}
.bolt-shimmer{
  position:absolute;inset:0;
  clip-path:polygon(0% 0%, 100% 0%, 0% 100%);
  background:linear-gradient(115deg, transparent 42%, rgba(255,255,255,.5) 50%, transparent 58%);
  background-size:260% 260%;
  opacity:.8;
  animation:bolt-shimmer 4.5s ease-in-out infinite;
  pointer-events:none;
}
@keyframes bolt-shimmer{
  0%{background-position:130% 130%}
  50%{background-position:-30% -30%}
  100%{background-position:130% 130%}
}
.bolt-spark{
  position:absolute;left:-3%;bottom:-1%;
  width:8%;aspect-ratio:1;border-radius:50%;
  background:var(--accent-white);
  box-shadow:0 0 16px 5px rgba(59,130,246,.7), 0 0 4px rgba(255,255,255,.9);
  animation:pulse 2s infinite;
}
@media (prefers-reduced-motion:reduce){
  .bolt-sway,.bolt-shimmer,.bolt-spark{animation:none}
}

/* --- text column --- */
.hero-text{will-change:transform, opacity}

/* Hero-only now (every other section's eyebrow pill was removed) — a
   plain label with the live-pulse dot, no bounded pill/card around it. */
.eyebrow{
  display:inline-flex;align-items:center;gap:9px;
  font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-2);
  margin:0 0 24px;
}
.eyebrow .dot{width:6px;height:6px;border-radius:50%;background:var(--accent-white);box-shadow:0 0 10px var(--accent-white)}

.hero h1{margin-bottom:24px}
.hero h1 .line{display:block}

.hero .lead{font-size:19px;max-width:520px;margin-bottom:36px}

.cta-row{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:44px}

.meta-row{display:flex;gap:26px;flex-wrap:wrap;font-size:13px;color:var(--ink-2)}
.meta-row span{display:inline-flex;align-items:center;gap:8px}
.meta-row .pulse{width:6px;height:6px;border-radius:50%;background:var(--accent-blue);box-shadow:0 0 8px var(--accent-blue);animation:pulse 2s infinite}
@keyframes pulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.5);opacity:.5}}


/* =========================================================
   SCROLL CUE
   ========================================================= */
.scroll-cue{
  position:absolute;left:50%;bottom:26px;transform:translateX(-50%);z-index:2;
  display:flex;justify-content:center;
  transition:opacity .3s ease;
}
.scroll-cue span{
  width:26px;height:42px;border-radius:14px;border:1.5px solid var(--line-2);
  position:relative;
}
.scroll-cue span::before{
  content:"";position:absolute;top:7px;left:50%;width:4px;height:8px;
  background:var(--accent-white);border-radius:3px;transform:translateX(-50%);
  animation:cue-scroll 1.8s ease-in-out infinite;
  box-shadow:0 0 6px var(--accent-white);
}
@keyframes cue-scroll{
  0%{opacity:0;transform:translate(-50%,0)}
  30%{opacity:1}
  100%{opacity:0;transform:translate(-50%,14px)}
}
@media (max-width:760px){.scroll-cue{display:none}}

/* =========================================================
   LIVE NETWORK SECTION
   ========================================================= */
.network{position:relative;z-index:1;padding:16px 0 40px}
@media (max-width:760px){.network{padding:16px 0 36px}}

.network-panel{
  position:relative;
  aspect-ratio:16/10;
  border-radius:24px;
  border:1px solid var(--line);
  background:
    radial-gradient(closest-side at 72% 30%, rgba(59,130,246,0.10), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0));
  overflow:hidden;
  padding:20px;
  transition:box-shadow .4s ease, border-color .4s ease;
}
/* Holographic projection mode — stays on-brand (blue/white), just
   brighter and lit from within, plus glitch/scanline layers that
   come alive while the cursor is over it. */
.network-panel.holo-active{
  border-color:rgba(59,130,246,0.4);
  box-shadow:0 0 50px rgba(59,130,246,0.16), 0 0 90px rgba(255,255,255,0.10), inset 0 0 36px rgba(59,130,246,0.06);
}

.uae-shape{position:absolute;inset:0;width:100%;height:100%;overflow:visible;transition:filter .3s ease}
.uae-shape .coast{stroke-width:.5;vector-effect:non-scaling-stroke;fill:url(#uaeFill);stroke:url(#uaeStroke);transition:stroke .3s ease,fill .3s ease}
.uae-shape .contour{fill:none;stroke:rgba(255,255,255,0.08);stroke-width:.25;stroke-dasharray:1 1.4;vector-effect:non-scaling-stroke}

.network-lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.network-lines path{
  fill:none;stroke:rgba(255,255,255,0.16);stroke-width:.3;
  stroke-dasharray:1.2 1.6;
  animation:line-flow 3.2s linear infinite;
  vector-effect:non-scaling-stroke;
}
@keyframes line-flow{to{stroke-dashoffset:-2.8}}

/* Faint always-on scanlines establish "this is a projection"; they
   intensify once the panel is being actively viewed (hovered). */
.holo-scanlines{
  position:absolute;inset:0;width:100%;height:100%;
  pointer-events:none;z-index:1;
  background:repeating-linear-gradient(
    to bottom, rgba(180,210,255,0.06) 0px, rgba(180,210,255,0.06) 1px,
    transparent 2px, transparent 4px
  );
  background-size:100% 100%;
  opacity:.4;
  animation:holo-drift 5s linear infinite;
  mix-blend-mode:screen;
}
.network-panel.holo-active .holo-scanlines{opacity:.85;animation-duration:1.8s}
@keyframes holo-drift{from{background-position:0 0}to{background-position:0 40px}}

.holo-vignette{
  position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1;
  background:radial-gradient(closest-side, transparent 55%, rgba(0,0,0,0.35) 100%);
  mix-blend-mode:multiply;
}

/* Brief "signal glitch" pulse, toggled on for a couple hundred ms at a
   time by JS while the hologram is active. Deliberately only touches
   filter/opacity (never transform) — an SVG feMerge-based RGB-split
   filter combined with the panel's live 3D transform crashed the
   renderer during testing, so this sticks to cheap, GPU-safe CSS
   filter functions instead. */
@keyframes holo-glitch{
  0%{filter:none;opacity:1}
  25%{filter:hue-rotate(25deg) saturate(1.7) brightness(1.25);opacity:.86}
  50%{filter:hue-rotate(-18deg) brightness(1.1);opacity:.96}
  75%{filter:saturate(1.4) brightness(.92);opacity:.9}
  100%{filter:none;opacity:1}
}
.network-panel.glitching{animation:holo-glitch .22s ease-in-out}

.legend{position:absolute;left:20px;top:20px;display:flex;gap:8px;flex-wrap:wrap;z-index:4}
.legend .chip{
  display:inline-flex;align-items:center;gap:7px;padding:8px 13px;border-radius:999px;
  font-size:12px;font-weight:500;color:var(--ink-2);font-family:inherit;
  background:rgba(9,13,24,0.72);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  border:1px solid var(--line-2);cursor:pointer;
  transition:opacity .2s ease, color .2s ease, transform .15s ease;
}
.legend .chip:hover{transform:translateY(-1px)}
.legend .chip .d{width:8px;height:8px;border-radius:50%;background:currentColor}
.legend .chip.avail{color:var(--status-avail)}
.legend .chip.busy{color:var(--status-busy)}
.legend .chip.off{color:var(--status-off)}
.legend .chip:not(.active){opacity:.35;color:var(--ink-2)}
.legend .chip:not(.active) .d{background:var(--ink-2)}

.node{position:absolute;transform:translate(-50%,-50%);cursor:pointer;z-index:2;outline:none;
  transition:opacity .25s ease;}
.node-dot{position:relative;display:block;width:26px;height:26px}
.node .ring,.node .core{position:absolute;border-radius:50%}
.node .ring{inset:5px;border:1.5px solid currentColor;animation:node-pulse 2.4s ease-out infinite}
.node .core{inset:9px;background:currentColor;box-shadow:0 0 10px currentColor}
.node.avail{color:var(--status-avail)}
.node.busy{color:var(--status-busy)}
.node.off{color:var(--status-off)}
.node.off .ring{animation:none;opacity:.4}
@keyframes node-pulse{0%{transform:scale(.6);opacity:.9}100%{transform:scale(2.1);opacity:0}}

.node.dim{opacity:.2;pointer-events:none}

.node:focus-visible .node-dot{outline:2px solid #fff;outline-offset:4px;border-radius:50%}

.node-card{
  position:absolute;left:24px;top:-10px;width:200px;padding:14px;border-radius:14px;
  background:rgba(9,13,24,0.94);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
  border:1px solid var(--line-2);
  box-shadow:0 24px 54px rgba(0,0,0,0.55);
  opacity:0;transform:translateX(-6px);pointer-events:none;
  transition:opacity .2s ease, transform .2s ease;
  z-index:5;
}
.node:hover .node-card,
.node:focus-visible .node-card,
.node.open .node-card{
  opacity:1;transform:translateX(0);pointer-events:auto;
}
.node.card-left .node-card{left:auto;right:24px}
.node.card-left:hover .node-card,
.node.card-left:focus-visible .node-card,
.node.card-left.open .node-card{transform:translateX(0)}
.node.card-flip .node-card{top:auto;bottom:-10px}

.node-card .loc{font-weight:600;font-size:14px;letter-spacing:-0.01em;color:var(--ink-0)}
.node-card .sub{color:var(--ink-2);font-size:11px;letter-spacing:.08em;text-transform:uppercase;margin-top:3px}
.node-card .stats{display:flex;gap:14px;margin-top:10px;font-size:12px;color:var(--ink-1)}
.node-card .stats b{font-weight:600;color:var(--ink-0)}

/* --- mobile station list (replaces the map below 760px) ---
   Tiny map pins are hard to read/tap on a phone, so this is a plain,
   scrollable list of the same live stations, filtered by the same
   status chips (duplicated here as .legend.standalone since the
   original .legend is positioned absolutely inside the now-hidden map). */
.legend.standalone{display:none;position:static;margin-bottom:14px}
.station-list-mobile{display:none;flex-direction:column;gap:10px}
.sl-row{
  display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:14px;
  border:1px solid var(--line);background:rgba(255,255,255,0.02);
  transition:opacity .25s ease;
}
.sl-row.dim{opacity:.3}
.sl-dot{width:9px;height:9px;border-radius:50%;flex-shrink:0;background:currentColor;box-shadow:0 0 8px currentColor}
.sl-dot.avail{color:var(--status-avail)}
.sl-dot.busy{color:var(--status-busy)}
.sl-dot.off{color:var(--status-off)}
.sl-info{flex:1;min-width:0}
.sl-name{font-weight:600;font-size:14px}
.sl-sub{color:var(--ink-2);font-size:11px;letter-spacing:.06em;text-transform:uppercase;margin-top:2px}
.sl-stats{display:flex;flex-direction:column;align-items:flex-end;gap:2px;font-size:12px;color:var(--ink-1);flex-shrink:0;text-align:right}
.sl-stats b{font-weight:600;color:var(--ink-0)}
@media (max-width:760px){
  .network-panel{display:none}
  .legend.standalone{display:flex}
  /* A full 9-row list is a lot of scroll before reaching the rest of the
     page — bound it to a peek of ~4 rows with its own internal scroll,
     with a soft fade at the bottom hinting there's more inside. */
  .station-list-mobile{
    display:flex;max-height:280px;overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    mask-image:linear-gradient(to bottom, #000 calc(100% - 28px), transparent 100%);
    -webkit-mask-image:linear-gradient(to bottom, #000 calc(100% - 28px), transparent 100%);
  }
}

/* --- map tile (2x2) + four auto-flowing stat groups ---
   CSS Grid auto-placement handles the flow: declare the map's span,
   drop four 1x1 elements after it, and the algorithm fills the rest.
   A generous gap does the work borders used to — whitespace grouping
   the stats instead of boxing them. */
.bento-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  grid-auto-rows:minmax(150px,auto);
  gap:22px;
  margin-top:28px;
}
.bento-tile{
  border-radius:20px;
  transition:border-color .3s ease, background .3s ease, box-shadow .3s ease;
}
.bento-map{grid-column:span 2;grid-row:span 2}

/* Plain typographic stat groups, not cards — number, label and caption
   separated by whitespace instead of borders/backgrounds. The map tile
   keeps the bounded/interactive treatment (it genuinely benefits from
   it: hover, filtering, live pins); these are just numbers, so they
   don't get the same affordance. */
.bento-stat{
  grid-column:span 1;grid-row:span 1;
  display:flex;flex-direction:column;justify-content:center;
  padding:10px 8px;text-align:left;
}
.bento-stat-top .k{font-size:12px;color:var(--ink-2);letter-spacing:.1em;text-transform:uppercase}
.bento-stat .v{font-size:34px;font-weight:600;margin-top:8px;letter-spacing:-0.02em;color:var(--ink-0)}
.bento-stat .v .unit{font-size:16px;color:var(--ink-3);margin-left:4px;font-weight:500}
.bento-stat .num{display:inline-block;transition:color .15s ease,text-shadow .15s ease}
.bento-stat .num.flicker{color:var(--accent-white);text-shadow:0 0 14px rgba(255,255,255,0.7)}
.bento-detail{font-size:12px;color:var(--ink-2);line-height:1.4;margin-top:8px}

@media (max-width:860px){
  .bento-grid{grid-template-columns:repeat(2,1fr)}
}
/* Below 760px the map gives way to the station list (above); the 4
   stats fall into a plain 2-column grid — generous gaps doing the
   grouping instead of a card strip. */
@media (max-width:760px){
  .bento-map{display:none}
  .bento-grid{
    display:grid;grid-template-columns:repeat(2,1fr);
    gap:28px 20px;margin-top:8px;
  }
  .bento-stat{padding:0}
  .bento-stat .v{font-size:27px}
}

@media (max-width:540px){
  .node-card{width:168px;padding:12px}
}

/* =========================================================
   HOW IT WORKS
   ========================================================= */
.how{position:relative;z-index:1;padding:32px 0;overflow:hidden}
@media (max-width:860px){.how{padding:24px 0}}

.flow{position:relative;display:grid;grid-template-columns:repeat(3,1fr);align-items:start;gap:24px;margin-top:28px}
/* Below 860px this becomes a snap-scroll carousel (one step per view,
   a sliver of the next peeking in) instead of a tall vertical stack —
   the same drag-and-snap feel as the testimonials track. */
@media (max-width:860px){
  .flow{
    display:flex;align-items:stretch;overflow-x:auto;
    gap:16px;margin-top:8px;padding:4px 0 20px;
    scroll-snap-type:x mandatory;scrollbar-width:none;
  }
  .flow::-webkit-scrollbar{display:none}
  .step{flex:0 0 84%;scroll-snap-align:center}
}
/* A gentle, hand-placed stagger instead of a rigid three-up grid. */
.flow button:nth-of-type(2){margin-top:-22px}
.flow button:nth-of-type(3){margin-top:14px}
@media (max-width:860px){.flow button:nth-of-type(2),.flow button:nth-of-type(3){margin-top:0}}
.flow-wire{position:absolute;top:15px;left:0;width:100%;height:60px;pointer-events:none;overflow:visible}
@media (max-width:860px){.flow-wire{display:none}}
.flow-wire-bg{fill:none;stroke:var(--line-2);stroke-width:.4;vector-effect:non-scaling-stroke}
.flow-wire-fill{
  fill:none;stroke:var(--accent-white);stroke-width:.6;vector-effect:non-scaling-stroke;
  stroke-dasharray:97;stroke-dashoffset:97;
  transition:stroke-dashoffset .6s cubic-bezier(.2,.8,.2,1);
  filter:drop-shadow(0 0 4px var(--accent-white));
}

.step{
  position:relative;text-align:left;padding:28px;border-radius:20px;
  border:1px solid var(--line);background:rgba(255,255,255,0.02);
  cursor:pointer;font-family:inherit;color:inherit;
  transition:border-color .3s ease,background .3s ease,transform .3s ease,box-shadow .3s ease;
}
.step:hover{transform:translateY(-4px)}
.step.active{border-color:rgba(59,130,246,0.4);background:rgba(59,130,246,0.05);box-shadow:0 20px 50px rgba(59,130,246,0.12)}
.step-n{
  display:inline-flex;width:38px;height:38px;border-radius:50%;align-items:center;justify-content:center;
  font-family:"SFMono-Regular",Consolas,monospace;font-weight:600;font-size:14px;margin-bottom:16px;
  background:rgba(255,255,255,0.04);color:var(--ink-2);border:1px solid var(--line-2);
  transition:background .3s ease,color .3s ease,border-color .3s ease;
}
.step.active .step-n{background:linear-gradient(135deg,var(--accent-white),var(--accent-blue));color:#081226;border-color:transparent}
.step h3{font-size:19px;margin-bottom:8px}
.step p{font-size:14px;color:var(--ink-2)}

/* =========================================================
   APP SHOWCASE
   ========================================================= */
.app{position:relative;z-index:1;padding:36px 0;overflow:hidden}
@media (max-width:760px){.app{padding:36px 0}}
.app-grid{display:grid;grid-template-columns:1fr 1fr;gap:60px;align-items:center}
@media (max-width:980px){.app-grid{grid-template-columns:1fr;gap:52px}}

.app-features{display:flex;flex-direction:column;gap:10px;margin:32px 0}
.app-feat{
  text-align:left;padding:16px 18px;border-radius:14px;border:1px solid var(--line);
  background:rgba(255,255,255,0.02);cursor:pointer;font-family:inherit;color:inherit;
  transition:border-color .25s ease,background .25s ease;
}
.app-feat b{display:block;font-size:15px;font-weight:600}
.app-feat small{color:var(--ink-2);font-size:13px}
.app-feat.active{border-color:rgba(255,255,255,0.4);background:rgba(255,255,255,0.06)}
.app-feat.active b{color:var(--accent-white)}

/* Below 760px these stop being tabs that drive a phone mockup (the phone
   is gone entirely on this layout) and become plain bullet points —
   whitespace and a marker dot instead of a bounded, clickable card. */
@media (max-width:760px){
  .app-features{gap:18px;margin:22px 0}
  .app-feat{
    position:relative;padding:0 0 0 22px;border:none;background:none;
    cursor:default;pointer-events:none;
  }
  .app-feat::before{
    content:"";position:absolute;left:2px;top:8px;
    width:6px;height:6px;border-radius:50%;
    background:var(--accent-blue);box-shadow:0 0 8px rgba(59,130,246,.7);
  }
  .app-feat.active{border-color:transparent;background:none}
}

.phone-stage{perspective:1200px;display:flex;justify-content:center}
.phone{
  position:relative;width:270px;aspect-ratio:9/19;border-radius:42px;
  background:linear-gradient(160deg,#1b2438,#070a14);padding:10px;
  border:1px solid var(--line-2);
  box-shadow:0 50px 100px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.04) inset;
  transform:rotateY(-14deg) rotateX(4deg);
  will-change:transform;
}
.phone-notch{position:absolute;top:22px;left:50%;transform:translateX(-50%);width:86px;height:22px;border-radius:999px;background:#000;z-index:2}
.phone-screen{position:relative;width:100%;height:100%;border-radius:32px;overflow:hidden;background:#070a14;display:flex;flex-direction:column}

/* --- OS-style status bar (phone mockup only) --- */
.p-statusbar{
  flex:0 0 auto;display:flex;justify-content:space-between;align-items:center;
  padding:14px 18px 4px;font-size:11px;font-weight:600;
  font-family:"SFMono-Regular",Consolas,monospace;color:var(--ink-1);
}
.p-status-icons{display:flex;align-items:center;gap:5px;color:var(--ink-1)}
.p-status-icons svg{display:block;flex-shrink:0}
.p-status-icons svg:first-child{width:15px;height:10px}
.p-status-icons svg:last-child{width:19px;height:10px}

/* --- slide content area --- */
.p-content{position:relative;flex:1;min-height:0}
.p-slide{position:absolute;inset:0;opacity:0;transition:opacity .5s ease;padding:14px 16px 12px;display:flex;flex-direction:column}
.p-slide.active{opacity:1}
.p-slide-head{margin-bottom:10px;flex:0 0 auto}
.p-slide-head h4{font-size:14px;font-weight:600;color:var(--ink-0);margin:0}
.p-slide-head .p-slide-sub{display:block;font-size:11px;color:var(--ink-2);margin-top:2px}

/* --- bottom in-app tab bar (phone + mobile flat preview) --- */
.p-tabbar{flex:0 0 auto;display:flex;border-top:1px solid var(--line);background:rgba(255,255,255,0.02)}
.p-tab{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
  padding:9px 0 11px;font-size:9px;letter-spacing:.02em;color:var(--ink-3);
  background:none;border:none;cursor:pointer;font-family:inherit;transition:color .2s ease;
}
.p-tab svg{width:17px;height:17px}
.p-tab.active{color:var(--accent-blue)}

.p-map{position:relative;flex:1;border-radius:14px;background:linear-gradient(180deg,#101a30,#070a14);border:1px solid var(--line);overflow:hidden}
.p-pin{position:absolute;width:10px;height:10px;border-radius:50%;background:var(--status-avail);box-shadow:0 0 10px var(--status-avail);transform:translate(-50%,-50%);animation:pulse 2s infinite}
.p-pin.busy{background:var(--status-busy);box-shadow:0 0 10px var(--status-busy)}

.p-list{margin-top:10px;flex:0 0 auto;display:flex;flex-direction:column;gap:7px}
.p-list-row{display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:10px;background:rgba(255,255,255,.03);border:1px solid var(--line)}
.p-list-row b{display:block;font-size:12px;font-weight:600}
.p-list-row small{color:var(--ink-2);font-size:10px}
.p-list-val{margin-left:auto;font-size:11px;font-weight:600;color:var(--ink-0);font-family:"SFMono-Regular",Consolas,monospace}
.p-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0;background:currentColor;box-shadow:0 0 6px currentColor}
.p-dot.avail{color:var(--status-avail)}
.p-dot.busy{color:var(--status-busy)}

.p-ring{position:relative;width:132px;height:132px;margin:10px auto 16px}
.p-ring svg{width:100%;height:100%;transform:rotate(-90deg)}
.p-ring circle{fill:none;stroke:rgba(255,255,255,.08);stroke-width:8;cx:50;cy:50;r:42}
.p-ring circle.fill{stroke:var(--accent-blue);stroke-linecap:round;stroke-dasharray:264;stroke-dashoffset:264;transition:stroke-dashoffset 1s ease}
.p-pct{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:26px;font-weight:600;font-family:"SFMono-Regular",Consolas,monospace}
.p-stat-row{display:flex;justify-content:space-between;font-size:12px;color:var(--ink-2);font-family:"SFMono-Regular",Consolas,monospace}
.p-cost-row{display:flex;justify-content:space-between;margin-top:10px;padding-top:10px;border-top:1px solid var(--line);font-size:12px;color:var(--ink-2)}
.p-cost-row b{color:var(--ink-0);font-family:"SFMono-Regular",Consolas,monospace}

.p-receipt{margin-top:2px;padding:14px;border-radius:14px;background:rgba(255,255,255,.03);border:1px solid var(--line)}
.p-row{display:flex;justify-content:space-between;font-size:13px;color:var(--ink-2);padding:6px 0}
.p-row.total{border-top:1px solid var(--line);margin-top:6px;padding-top:10px;color:var(--ink-0);font-weight:600}
.p-pay-method{display:flex;align-items:center;gap:8px;margin-top:10px;font-size:12px;color:var(--ink-1)}
.p-card-chip{width:20px;height:14px;border-radius:3px;background:linear-gradient(135deg,var(--accent-white),var(--accent-blue));flex-shrink:0}
.p-paid{margin-top:8px;text-align:center;color:var(--status-avail);font-size:13px;font-weight:600}

.p-btn-stop,.p-btn-done{
  margin-top:auto;width:100%;padding:10px;border-radius:10px;border:1px solid var(--line-2);
  background:rgba(255,255,255,.04);color:var(--ink-0);font-size:12px;font-weight:600;
  font-family:inherit;cursor:pointer;flex:0 0 auto;
}
.p-btn-done{background:linear-gradient(135deg,var(--accent-white),var(--accent-blue));color:#081226;border-color:transparent}

/* The phone mockup is desktop-only now — below 760px there's no visual
   in this column at all, just the text + bullet list above. */
@media (max-width:760px){
  .phone-stage{display:none}
}

/* =========================================================
   SAVINGS CALCULATOR
   ========================================================= */
.savings{position:relative;z-index:1;padding:36px 0;overflow:hidden}
@media (max-width:760px){.savings{padding:36px 0}}
.calc{max-width:820px;margin:0 auto;padding:40px;border-radius:24px;border:1px solid var(--line);background:rgba(255,255,255,0.02)}
@media (max-width:640px){.calc{padding:26px}}
.calc-row{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:14px;flex-wrap:wrap;gap:8px}
.calc-row label{font-size:13px;color:var(--ink-2);text-transform:uppercase;letter-spacing:.08em}
#kmValue{font-size:20px;font-weight:600;font-family:"SFMono-Regular",Consolas,monospace;color:var(--accent-white)}

input#kmRange{
  -webkit-appearance:none;appearance:none;width:100%;height:6px;border-radius:999px;
  background:linear-gradient(90deg,var(--accent-blue),var(--accent-white));outline:none;cursor:pointer;
}
input#kmRange::-webkit-slider-thumb{
  -webkit-appearance:none;width:24px;height:24px;border-radius:50%;
  background:#fff;border:3px solid var(--accent-blue);cursor:pointer;
  box-shadow:0 4px 14px rgba(0,0,0,.4);
}
input#kmRange::-moz-range-thumb{
  width:24px;height:24px;border-radius:50%;background:#fff;border:3px solid var(--accent-blue);cursor:pointer;
}

/* Three plain typographic columns, not cards — a hairline divider and
   generous gap do the grouping instead of borders/background boxes.
   "You save" gets emphasis purely through size and color, not a
   highlighted box. */
.calc-results{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:36px}
.calc-col{padding:0 16px;text-align:center}
.calc-col:not(:first-child){border-left:1px solid var(--line)}
.calc-col .k{font-size:12px;color:var(--ink-2);text-transform:uppercase;letter-spacing:.08em}
.calc-col .v{font-size:28px;font-weight:600;margin-top:10px}
.calc-col .v small{display:block;font-size:11px;color:var(--ink-3);font-weight:400;margin-top:2px}
.calc-col.highlight .v{color:var(--status-avail);font-size:32px}
@media (max-width:640px){
  .calc-results{gap:8px;margin-top:26px}
  .calc-col{padding:0 6px}
  .calc-col .k{font-size:10px;letter-spacing:.04em}
  .calc-col .v{font-size:19px;margin-top:6px}
  .calc-col.highlight .v{font-size:22px}
  .calc-col .v small{font-size:9px}
}

.calc-note{margin-top:28px;font-size:12px;color:var(--ink-3);text-align:center}

/* =========================================================
   TESTIMONIALS
   ========================================================= */
.testimonials{position:relative;z-index:1;padding:36px 0;overflow:hidden}
@media (max-width:760px){.testimonials{padding:36px 0}}
.testimonials .sec-head{margin-bottom:32px}
.t-track{
  display:flex;gap:20px;overflow-x:auto;padding:8px var(--gutter) 20px;
  cursor:grab;scrollbar-width:none;user-select:none;
  scroll-snap-type:x proximity;
}
.t-track::-webkit-scrollbar{display:none}
.t-track.dragging{cursor:grabbing;scroll-snap-type:none}
.t-card{
  flex:0 0 340px;height:260px;border-radius:20px;
  perspective:1200px;
  cursor:pointer;
  scroll-snap-align:center;
}
.t-card-inner{
  position:relative;width:100%;height:100%;
  transform-style:preserve-3d;
  transition:transform .6s cubic-bezier(.3,.7,.2,1);
}
.t-card.flipped .t-card-inner{transform:rotateY(180deg)}

.t-card-face{
  position:absolute;inset:0;padding:26px;border-radius:20px;border:1px solid var(--line);
  background:linear-gradient(180deg,rgba(255,255,255,.03),rgba(255,255,255,.01));
  backface-visibility:hidden;-webkit-backface-visibility:hidden;
  display:flex;flex-direction:column;
  overflow:hidden;
}
.t-card-back{transform:rotateY(180deg)}

.t-card .q{font-size:16px;line-height:1.5;color:var(--ink-0)}
.t-card-back .q{font-size:14px;line-height:1.5;overflow-y:auto}
.t-card .who{display:flex;gap:12px;align-items:center;margin-top:auto;padding-top:16px}
.t-card .who .av{width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,var(--accent-white),var(--accent-blue));display:flex;align-items:center;justify-content:center;color:#081226;font-weight:600;font-size:13px;flex-shrink:0}
.t-card .who b{display:block;font-size:14px}
.t-card .who small{color:var(--ink-2);font-size:12px}
.t-flip-hint{margin-top:10px;font-size:11px;color:var(--ink-3);letter-spacing:.06em;text-transform:uppercase}
.t-stars{color:var(--accent-white);font-size:18px;letter-spacing:.15em;margin-bottom:10px;text-shadow:0 0 12px rgba(255,255,255,0.5)}

/* =========================================================
   CTA + FOOTER
   ========================================================= */
.cta-section{position:relative;z-index:1;padding:8px 0 44px;overflow:hidden}
@media (max-width:760px){.cta-section{padding:16px 0 40px}}
.cta-big{
  position:relative;padding:80px 40px;border-radius:28px;text-align:center;overflow:hidden;
  background:
    radial-gradient(closest-side at 50% 120%, rgba(59,130,246,.25), transparent 70%),
    radial-gradient(closest-side at 50% -30%, rgba(255,255,255,.2), transparent 70%),
    linear-gradient(#0d1424,#060911);
  border:1px solid rgba(59,130,246,.2);
}
@media (max-width:640px){.cta-big{padding:56px 24px}}
.cta-big h2{font-size:clamp(32px,4.4vw,52px);max-width:700px;margin:0 auto}
.cta-big .lead{margin:18px auto 0;max-width:520px;text-align:center}
.cta-big .cta-row{justify-content:center;margin-top:32px;margin-bottom:0}

footer{position:relative;z-index:1;padding:32px 0 28px;border-top:1px solid var(--line);background:rgba(6,9,18,.6)}
@media (max-width:760px){footer{padding:36px 0 24px}}
.foot-grid{display:grid;grid-template-columns:1.4fr repeat(3,1fr);gap:40px}
@media (max-width:860px){.foot-grid{grid-template-columns:1fr 1fr;gap:28px}}
/* A full single-column stack (brand, then each link group on its own
   row) ran noticeably taller than the sparse content justified — brand
   keeps its own full-width row, but the link groups pair up 2-across
   instead of stacking one per row. */
@media (max-width:560px){
  .foot-grid{grid-template-columns:1fr 1fr;gap:28px 20px}
  .foot-brand{grid-column:1/-1}
}
.foot-brand p{color:var(--ink-2);font-size:14px;margin-top:14px;max-width:300px}
.foot-col h5{font-size:12px;color:var(--ink-2);letter-spacing:.12em;text-transform:uppercase;margin:0 0 14px}
.foot-col ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.foot-col a{color:var(--ink-1);font-size:14px}
.foot-col a:hover{color:var(--accent-white)}
.foot-bottom{margin-top:50px;padding-top:22px;border-top:1px solid var(--line);font-size:13px;color:var(--ink-2)}

/* =========================================================
   SCROLL REVEAL + DEPTH
   ========================================================= */
.reveal{
  opacity:0;transform:translateY(32px) scale(.98);
  transition:opacity .45s cubic-bezier(.2,.7,.2,1), transform .45s cubic-bezier(.2,.7,.2,1);
  transition-delay:var(--d,0ms);
}
.reveal.in{opacity:1;transform:none}

/* Direct child of body (see depthBlobs in main.js) so its blobs aren't
   nested inside any section's own overflow:hidden — lets each glow's
   blur bleed past its section's boundary into the next one instead of
   being clipped flat at the edge. JS sets a real height (matching the
   document) so this own overflow:hidden can clip blobs horizontally —
   several are wider than a phone screen — without also hiding them
   vertically the way a height:0 box with overflow:hidden would. */
.depth-blobs-layer{position:absolute;top:0;left:0;width:100%;overflow:hidden;z-index:0}
.depth-blob{
  position:absolute;top:0;border-radius:50%;filter:blur(70px);
  pointer-events:none;will-change:transform;
}
.depth-blob.blue{background:rgba(59,130,246,0.20)}
.depth-blob.white{background:rgba(255,255,255,0.10)}

/* Cards get this so the tilt utility has something to animate smoothly
   and to reset back to flat the instant the cursor leaves. */
/* No static transition here on purpose — it would override .reveal's
   entrance transition (both would set the same shorthand). The tilt
   JS applies its own inline transition only around the hover/leave
   moments, well after any entrance animation has finished. */
.tilt{will-change:transform}
.tilt-glow{
  position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:radial-gradient(260px circle at var(--tx,50%) var(--ty,50%), rgba(255,255,255,0.07), transparent 60%);
  opacity:0;transition:opacity .3s ease;
}
.tilt:hover .tilt-glow{opacity:1}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.001ms !important;animation-iteration-count:1 !important;transition-duration:.001ms !important}
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width:760px){
  :root{--gutter:20px}
  .hero{padding-top:calc(var(--nav-h) + 24px);padding-bottom:24px}
  .hero .lead{font-size:15px}
  .cta-row{margin-bottom:24px}
  .meta-row{gap:14px 20px;font-size:12px}
  .btn{padding:12px 18px;font-size:14px}
  .sec-head{margin-bottom:30px;gap:14px}
  .app-features{margin:24px 0}
  /* Desktop-scale headings and body copy read as oversized and cramped
     on a phone — sized down a step across the board. */
  h1{font-size:32px}
  h2{font-size:25px}
  p{font-size:15px}
  .lead{font-size:15px}
  /* Secondary trust-badge row and fine-print methodology note — neither
     is essential to the core message, and cutting them reduces the wall
     of stacked text a phone screen has to get through before any visual
     variety shows up. */
  .meta-row{display:none}
  .calc-note{display:none}
}
