/* ============================================================================
   SERVICE-AREA MAP — prototype styles. Rides the site tokens (--aqua, --bg…).
   Layout: one tall .map-stage; a sticky 100vh viewport holds the WebGL canvas;
   the five "beats" are absolutely-positioned tiles the WebGL module fades in/out
   by scroll progress. .no-map-webgl (set by the module when 3D can't run) drops
   everything back into readable, stacked document flow.
   ========================================================================== */

.proto-strip{
  background:linear-gradient(90deg,rgba(0,210,255,.14),rgba(0,210,255,.04));
  border-bottom:1px solid var(--line);color:var(--ink-2);
  font-size:.85rem;text-align:center;padding:9px 16px;letter-spacing:.01em}
.proto-strip b{color:#fff}

/* --------------------------------- STAGE --------------------------------- */
/* NOTE: pinned via GSAP ScrollTrigger (pin:true), NOT CSS position:sticky —
   the site's global html/body overflow-x:hidden breaks native sticky. */
.map-stage{position:relative}
.map-sticky{position:relative;height:100vh;overflow:hidden}
.map-canvas{position:absolute;inset:0;width:100%;height:100%;display:block;
  opacity:0;transition:opacity .8s var(--ease);touch-action:pan-y}
  /* touch-action:pan-y (2026-07-26, added alongside the map-tap-to-select
     addition in service-area-map.webgl.js's wireMapTap()) — explicit vertical
     panning stays fully native (the whole page scrolls through the pinned
     beats via a plain swipe on the canvas, untouched), while double-tap-zoom
     ambiguity is dropped, same rationale as .state-btn's touch-action above. */
.map-canvas.ready{opacity:1}

.map-progress{position:absolute;left:0;top:0;height:3px;width:0;z-index:8;
  background:linear-gradient(90deg,var(--aqua),var(--aqua-2));
  box-shadow:0 0 14px var(--glow)}

/* soft aqua vignette behind the map so states read over the water bg */
.map-sticky::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:radial-gradient(60% 55% at 50% 42%,rgba(0,210,255,.10),transparent 70%)}

.map-hint{position:absolute;left:50%;bottom:26px;transform:translateX(-50%);z-index:6;
  font-size:.82rem;letter-spacing:.16em;text-transform:uppercase;color:var(--ink-2);
  display:flex;align-items:center;gap:9px;pointer-events:none}
.map-hint::after{content:"";width:1px;height:22px;background:linear-gradient(var(--aqua),transparent);
  animation:mh 1.9s ease-in-out infinite}
@keyframes mh{0%,100%{transform:scaleY(.5);opacity:.5}50%{transform:scaleY(1);opacity:1}}

/* --------------------------------- BEATS --------------------------------- */
.beat{position:absolute;z-index:5;will-change:opacity,transform}

/* Beat 1 — hero copy */
.beat-hero{left:0;right:0;top:11vh;text-align:center;padding:0 24px}
.beat-hero .eyebrow{justify-content:center;margin-bottom:14px}
/* 2026-07-26: gradient fill + inner-etch inlay moved to the shared .aqua-fx
   treatment (aqua-headline-fx.css, now linked on this page) so this hero
   matches the etched-headline fix applied to the 5 gyro-engine pages. This
   rule now only sizes/positions the h1 block itself; .aqua-fx (on the two
   inner spans) supplies the fill + inlay. */
.beat-hero h1{max-width:16ch;margin:0 auto .3em;line-height:1.12;padding-bottom:.06em}
.beat-hero .lead{margin:0 auto;max-width:46ch;color:#c7cfdb}

/* Beat 2 — Orlando tile. Flex-centered (NOT translate) so the module can drive
   translateY on .beat without clobbering the centering. */
.beat-orlando{inset:0;display:flex;align-items:center;justify-content:center;padding:24px}
.orl-card{width:min(680px,92vw);
  background:linear-gradient(155deg,rgba(0,210,255,.14),rgba(13,15,20,.86) 62%);
  border:1px solid rgba(0,210,255,.32);border-radius:var(--r-xl);padding:34px 36px;
  box-shadow:0 30px 90px rgba(0,0,0,.5),0 0 0 1px rgba(255,255,255,.03) inset;
  backdrop-filter:blur(10px)}
.orl-card .eyebrow{margin-bottom:12px}
.orl-card h2{font-size:clamp(1.8rem,3.6vw,2.9rem);margin:0 0 .35em}
.orl-card h2 .accent{background:linear-gradient(100deg,var(--aqua),var(--aqua-2));
  -webkit-background-clip:text;background-clip:text;color:transparent}
.orl-card .lead{font-size:1.06rem;margin:0 0 22px}
.orl-figs{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:0 0 20px}
.orl-fig{background:rgba(255,255,255,.03);border:1px solid var(--line);border-radius:var(--r);
  padding:14px 16px}
.orl-fig b{display:block;font-family:var(--disp);font-size:1.5rem;color:#fff;letter-spacing:-.02em}
.orl-fig span{display:block;font-size:.82rem;color:var(--ink-2);margin-top:3px}
.orl-note{font-size:.98rem;color:#cfe9f5;border-left:2px solid var(--aqua);padding-left:14px;margin:0}
.orl-approx{margin:14px 0 0;font-size:.74rem;color:var(--muted)}

/* Beat 3 — cities we serve */
.beat-cities{inset:0;display:flex;align-items:center;justify-content:center;padding:24px}
.cities-card{width:min(720px,94vw);
  background:linear-gradient(155deg,rgba(13,15,20,.9),rgba(13,15,20,.82));
  border:1px solid var(--line-2);border-radius:var(--r-xl);padding:30px 32px;
  box-shadow:0 30px 90px rgba(0,0,0,.5);backdrop-filter:blur(10px);
  max-height:78vh;overflow:auto}
.cities-card h2{font-size:clamp(1.6rem,3vw,2.4rem);margin:0 0 .3em}
.cities-card .lead{font-size:1rem;margin:0 0 20px}
.cities-local{background:linear-gradient(140deg,rgba(0,210,255,.12),transparent);
  border:1px solid rgba(0,210,255,.28);border-radius:var(--r);padding:14px 18px;margin:0 0 18px}
.cities-local h3{font-size:.82rem;letter-spacing:.14em;text-transform:uppercase;color:var(--aqua-2);margin:0 0 8px}
.cities-local .chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{font-size:.86rem;font-weight:500;color:#dfeaf3;background:rgba(255,255,255,.05);
  border:1px solid var(--line);border-radius:var(--pill);padding:6px 13px}
.state-drop{border:1px solid var(--line);border-radius:var(--r);margin:0 0 8px;overflow:hidden;
  background:rgba(255,255,255,.02)}
.state-drop summary{list-style:none;cursor:pointer;padding:12px 16px;display:flex;
  align-items:center;justify-content:space-between;font-weight:600;color:#eaf3fa}
.state-drop summary::-webkit-details-marker{display:none}
.state-drop summary .cnt{font-size:.82rem;font-weight:600;color:var(--aqua-2);
  background:rgba(0,210,255,.1);border:1px solid rgba(0,210,255,.26);border-radius:var(--pill);padding:3px 11px}
.state-drop[open] summary{border-bottom:1px solid var(--line)}
.state-drop .drop-body{padding:12px 16px;display:flex;flex-wrap:wrap;gap:7px}
.state-drop .drop-body a,.state-drop .drop-body span{font-size:.85rem;color:var(--ink-2);
  background:rgba(255,255,255,.03);border:1px solid var(--line);border-radius:var(--pill);padding:5px 11px}
.cities-approx{margin:12px 0 0;font-size:.74rem;color:var(--muted)}

/* Beat 4 — state list (right rail, flex-centered vertically) */
.beat-states{top:0;bottom:0;right:3vw;display:flex;align-items:center}
.states-card{width:min(400px,92vw);
  background:linear-gradient(160deg,rgba(13,15,20,.92),rgba(13,15,20,.84));
  border:1px solid var(--line-2);border-radius:var(--r-xl);padding:22px 22px 18px;
  box-shadow:0 30px 90px rgba(0,0,0,.5);backdrop-filter:blur(10px);max-height:82vh;overflow:hidden;
  display:flex;flex-direction:column}
.states-card h2{font-size:1.5rem;margin:0 0 .2em}
.states-card .sc-sub{font-size:.9rem;color:var(--ink-2);margin:0 0 14px}
.state-list{list-style:none;margin:0;padding:2px;display:grid;
  grid-template-columns:1fr 1fr;gap:5px;overflow:auto}
.state-btn{width:100%;text-align:left;font-family:var(--body);font-size:.82rem;font-weight:500;
  color:#d7e2ec;background:rgba(255,255,255,.03);border:1px solid var(--line);
  border-radius:9px;padding:8px 10px;min-height:44px;box-sizing:border-box;
  display:flex;align-items:center;
  cursor:pointer;transition:background .16s,border-color .16s,color .16s;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  touch-action:manipulation;-webkit-tap-highlight-color:transparent}
  /* 2026-07-26: 34px -> 44px (min-height, flex-centered) — under the ~44px tap-target
     guideline; bumped since the below-map layout has the room to spare.
     touch-action:manipulation (bug fix, same date) — cuts the browser's
     double-tap-zoom detection window, one contributor to the "stationary tap
     needs a nudge of movement" bug fixed in service-area-map.webgl.js
     (touchstart/touchend tap handling with a movement tolerance now does the
     real work; this is a cheap, standard companion that shrinks the OS's own
     tap-vs-gesture ambiguity window). Still allows normal vertical scrolling —
     "manipulation" only drops double-tap-zoom/pinch, not panning. */
.state-btn:hover,.state-btn:focus-visible,.state-btn.hot{background:rgba(0,210,255,.14);
  border-color:var(--aqua);color:#fff;outline:none;box-shadow:0 0 0 1px rgba(0,210,255,.35)}
.states-hint{margin:12px 2px 0;font-size:.76rem;color:var(--muted)}

/* ---- .states-below-map (2026-07-26) — plain normal-flow duplicate of the
   state legend, shown ONLY on (pointer:coarse) — see the RESPONSIVE section
   below for the media query that toggles this vs. .beat-states. Hidden by
   default (fine-pointer/desktop) and in the .no-map-webgl fallback, where
   .beat-states itself already renders as a normal stacked block (no overlay
   to escape there, so showing both would just duplicate the list). */
.states-below-map{display:none;width:min(760px,92vw);margin:0 auto;padding:56px 0 64px;text-align:center}
.states-below-map h2{font-size:clamp(1.5rem,3vw,1.9rem);margin:0 0 .2em}
.states-below-map .sc-sub{font-size:.95rem;color:var(--ink-2);margin:0 0 20px}
.states-below-map .state-list{list-style:none;margin:0 0 16px;padding:0;display:grid;
  grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;text-align:left}
.states-below-map .states-hint{text-align:center}
.no-map-webgl .states-below-map{display:none}

/* ---- 2026-07-26 dead-zone fix — the list "assembles" into view instead of
   sitting there fully formed the instant it's on screen. Cheap, one-shot
   IntersectionObserver reveal (service-area-map.webgl.js) adds .in-view —
   this is scroll-INTO-VIEW, never scroll-pinned/scrubbed, and every child
   keeps full opacity/pointer-events in the DOM the whole time (only the
   CSS-painted opacity/transform animate), so all 50 buttons stay tappable
   even before the reveal fires. */
.states-below-map>*{opacity:0;transform:translateY(16px);
  transition:opacity .5s var(--ease),transform .5s var(--ease)}
.states-below-map>h2{transition-delay:0ms}
.states-below-map>.sc-sub{transition-delay:70ms}
.states-below-map>.state-list{transition-delay:140ms}
.states-below-map>.states-hint{transition-delay:230ms}
.states-below-map.in-view>*{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){
  .states-below-map>*{opacity:1;transform:none;transition:none}
}

/* -------------------- "Select a state" cue + hover label -------------------
   Owner feedback 2026-07-25: the always-visible 50-state legend above used to
   sit in a right-rail card (.beat-states{right:3vw}) that blocked the East
   Coast — its states are small and tightly packed, so the panel covered them
   outright. See the fine-pointer media query further down for the fix (hides
   the descriptive heading/list/hint on mouse devices, replaces it with just
   this minimal cue) — these two rules are its always-present base styles. */
.state-select-hint{display:none;margin:0}
.state-hover-label{position:fixed;left:50%;bottom:70px;transform:translateX(-50%);
  z-index:7;pointer-events:none;background:rgba(13,15,20,.9);
  border:1px solid rgba(0,210,255,.4);color:#fff;font-family:var(--body);
  font-size:.82rem;font-weight:600;padding:5px 13px;border-radius:var(--pill);
  white-space:nowrap;opacity:0;transition:opacity .12s var(--ease);
  backdrop-filter:blur(6px);box-shadow:0 8px 22px rgba(0,0,0,.35)}
.state-hover-label.show{opacity:1}
.no-map-webgl .state-hover-label,.no-map-webgl .state-select-hint{display:none}

/* ---- 2026-07-26 owner amendment — "give the map a job" on touch -----------
   Coarse-pointer devices hide .beat-states entirely (see the @media(pointer:
   coarse) rule further down), so once the dive+pull-back morph settles into
   the "explore" pose, touch had literally nothing on screen for the rest of
   that hold — the exact static stretch the owner called "not very
   interesting." This is a small, NON-interactive (pointer-events:none, so it
   can never block a canvas tap/drag) text cue, opacity-driven by the same
   `st` beat timeline service-area-map.webgl.js already computes (no new
   scroll math, no change to the protected morph timing) — it either invites
   the tap-to-raise interaction below or confirms whatever the user already
   selected. Hidden on fine-pointer (desktop already has the real thing: live
   hover-to-raise on the visible map) and in the no-WebGL/reduced-motion
   fallback (nothing to raise there). */
.map-explore-hint{display:none}
.no-map-webgl .map-explore-hint{display:none}
@media (pointer:coarse){
  .map-explore-hint{display:flex;position:absolute;left:50%;bottom:26px;
    transform:translateX(-50%);z-index:6;max-width:84vw;text-align:center;
    pointer-events:none;font-family:var(--body);font-size:.8rem;font-weight:500;
    color:#eaf3fa;background:rgba(13,15,20,.72);border:1px solid rgba(0,210,255,.32);
    border-radius:var(--pill);padding:8px 16px;backdrop-filter:blur(6px);
    box-shadow:0 8px 22px rgba(0,0,0,.35)}
}

/* --------------------------- FACT SHEET (overlay) --------------------------- */
.factsheet{position:fixed;inset:0;z-index:90;display:flex;align-items:center;justify-content:center;
  padding:24px;background:rgba(4,6,10,.6);backdrop-filter:blur(4px);
  opacity:0;transition:opacity .28s var(--ease)}
.factsheet.open{opacity:1}
.factsheet[hidden]{display:none}
.factsheet-card{position:relative;width:min(560px,94vw);max-height:88vh;overflow:auto;
  background:linear-gradient(160deg,rgba(18,24,36,.98),rgba(11,14,20,.98));
  border:1px solid rgba(0,210,255,.3);border-radius:var(--r-xl);padding:34px 36px;
  box-shadow:0 40px 120px rgba(0,0,0,.6);transform:translateY(14px) scale(.98);
  transition:transform .3s var(--ease)}
.factsheet.open .factsheet-card{transform:none}
.factsheet-close{position:absolute;top:14px;right:14px;width:38px;height:38px;border-radius:50%;
  background:rgba(255,255,255,.05);border:1px solid var(--line-2);color:#fff;font-size:1.2rem;
  cursor:pointer;line-height:1;display:flex;align-items:center;justify-content:center}
.factsheet-close:hover{background:rgba(0,210,255,.16);border-color:var(--aqua)}
.fs-eyebrow{display:inline-block;font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;
  color:var(--aqua-2);background:rgba(0,210,255,.1);border:1px solid rgba(0,210,255,.26);
  border-radius:var(--pill);padding:4px 12px;margin-bottom:14px}
.fs-name{font-size:clamp(1.8rem,4vw,2.6rem);margin:0 0 .5em}
.fs-stats{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0 0 20px}
.fs-stat{background:rgba(0,210,255,.07);border:1px solid rgba(0,210,255,.22);border-radius:var(--r);
  padding:16px 18px}
.fs-num{font-family:var(--disp);font-size:2rem;color:#fff;letter-spacing:-.03em;line-height:1}
.fs-lbl{font-size:.82rem;color:#eaf3fa;font-weight:600;margin-top:8px}
.fs-sub{font-size:.74rem;color:var(--muted);margin-top:2px}
.fs-stub{grid-template-columns:1fr}
.fs-stubline{color:var(--ink-2);font-size:.96rem;padding:16px 18px}
.fs-line{font-size:.98rem;color:var(--ink-2);margin:0 0 16px}
.fs-key{display:block;font-size:.74rem;letter-spacing:.12em;text-transform:uppercase;color:var(--aqua-2);margin-bottom:4px}
.fs-did{font-size:.98rem;color:#dfeaf3;margin:0 0 20px;line-height:1.55}
.fs-badge{display:inline-block;font-size:.7rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
  color:var(--bg);background:var(--aqua);border-radius:var(--pill);padding:3px 10px;margin-right:10px}
.fs-ai{background:linear-gradient(140deg,rgba(0,210,255,.12),transparent);
  border:1px solid rgba(0,210,255,.26);border-radius:var(--r);padding:16px 18px}
.fs-ai-h{display:block;font-size:.74rem;letter-spacing:.12em;text-transform:uppercase;color:var(--aqua-2);margin-bottom:6px}
.fs-ai p{margin:0;color:#eaf3fa;font-size:.98rem;line-height:1.55}

/* ------------------------------ RESPONSIVE ------------------------------ */
@media(max-width:820px){
  .beat-hero h1{font-size:clamp(2.2rem,9vw,3.4rem)}
}

/* ---- 2026-07-26 owner fix — REPLACES the two overlay-repositioning rules that
   used to live here (max-width:820px centered it; min-width:821px+pointer:coarse
   left-anchored it). Both approaches still left the ~400px .beat-states card
   floating ON TOP of the WebGL relief — centering put it dead over the map on
   an iPad in portrait (820px, which the OLD max-width:820px rule caught
   inclusively — the worst case), and left-anchoring at 821px+ still covered the
   western/mountain states. Root cause both shared: .beat-states is
   position:absolute; top:0;bottom:0 inside the pinned .map-sticky, so ANY
   position on that rail sits over the canvas. Verified this still reproduces
   at 820×1180 and 834×1194 (touch) before changing anything, per the brief.
   THE FIX now takes the whole legend OUT of the overlay for every coarse-pointer
   (touch) device — no width split, so the old inclusive-boundary bug (820px
   landing on the wrong side of the breakpoint) can't recur — and shows the
   plain, normal-flow, always-visible duplicate list added after .map-stage in
   the HTML (.states-below-map) instead. Checked 390×844 (phone) too: it has the
   exact same position:absolute;top:0;bottom:0 overlay problem (this rule used to
   just center it there), so phones get the identical below-map treatment, not a
   separate carve-out. Moving the list out of the overlay also removes the
   WebGL-canvas-intercepts-a-touch report by construction — the tap target and
   the 3D canvas no longer occupy the same box at all. */
@media (pointer:coarse){
  .beat-states{display:none}
  .states-below-map{display:block}
}

/* ---- Fine-pointer (real mouse) devices: map-first, legend-free explore ----
   Touch/coarse-pointer devices are DELIBERATELY untouched above — a bare tap
   on the 3D canvas can't reliably raycast on most touchscreens without a
   preceding drag, so the always-visible, tappable state-list stays their real
   selection mechanism, not just a fallback. :not(.no-map-webgl) excludes the
   WebGL-unavailable / prefers-reduced-motion fallback too — there is no 3D
   map to hover in that path, so it keeps the real heading + full list. */
@media (hover:hover) and (pointer:fine) {
  html:not(.no-map-webgl) .beat-states{top:auto;bottom:34px;left:0;right:0;display:block}
  html:not(.no-map-webgl) .states-card{background:none;border:none;box-shadow:none;
    backdrop-filter:none;padding:0;width:auto;max-height:none;overflow:visible;
    display:block;text-align:center}
  /* Offscreen, NOT display:none — Tab and screen readers still reach every
     state button and can open its fact sheet; only the visual legend goes. */
  html:not(.no-map-webgl) .states-card h2,
  html:not(.no-map-webgl) .states-card .sc-sub,
  html:not(.no-map-webgl) .states-card .state-list,
  html:not(.no-map-webgl) .states-card .states-hint{
    position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
    clip:rect(0,0,0,0);white-space:nowrap;border:0}
  html:not(.no-map-webgl) .state-select-hint{display:flex;align-items:center;
    justify-content:center;gap:9px;font-size:.82rem;letter-spacing:.16em;
    text-transform:uppercase;color:var(--ink-2);pointer-events:none}
  html:not(.no-map-webgl) .state-select-hint::after{content:"";width:1px;height:14px;
    background:linear-gradient(var(--aqua),transparent)}
}

/* ------------------- NO-WEBGL / REDUCED-MOTION FALLBACK ------------------- */
.no-map-webgl .map-stage{height:auto}
.no-map-webgl .map-sticky{position:static;height:auto;overflow:visible;padding:40px 0}
.no-map-webgl .map-canvas,
.no-map-webgl .map-hint,
.no-map-webgl .map-progress,
.no-map-webgl .map-sticky::before{display:none}
.no-map-webgl .beat{position:static;transform:none!important;opacity:1!important;visibility:visible!important;
  pointer-events:auto!important;width:min(760px,92vw);margin:0 auto 44px;left:auto;right:auto;top:auto}
.no-map-webgl .beat-hero{text-align:center}
.no-map-webgl .beat-states{width:min(760px,92vw);display:flex}
/* display:flex above — bug fix (found while verifying the 2026-07-26 tap fix,
   pre-existing, unrelated to it): on a COARSE-POINTER device the
   `@media(pointer:coarse){.beat-states{display:none}}` rule further up
   applies unconditionally (no `:not(.no-map-webgl)` guard, since it predates
   the no-map-webgl fallback needing a carve-out), and separately
   `.no-map-webgl .states-below-map{display:none}` (below) suppresses the
   duplicate list. Combined, a touch device that lands in the no-WebGL /
   reduced-motion fallback (e.g. iOS "Reduce Motion" enabled) got BOTH the
   50-state list variants hidden at once — the entire list, and with it every
   fact sheet, simply vanished. `.no-map-webgl .beat-states` (two classes)
   outweighs the single-class pointer:coarse rule regardless of source order,
   so this restores the always-present list (with its already-correct
   `.no-map-webgl .beat` static/visible/opacity overrides) for that fallback
   on every pointer type. Verified via computed-style check (Playwright,
   390×844 touch + prefers-reduced-motion:reduce): both variants computed
   display:none before this line was added. */
.no-map-webgl .state-list{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.no-map-webgl .states-hint{display:none}

/* NAV LINKS WHITE — 2026-07-25 (owner decision, approved): the plain nav
   links ("Live site" / "The engine" / etc.) inherited the site's grey nav
   convention (styles.css: .nav .links a:not(.btn){color:var(--ink-2)}).
   The other rebuild pages already switched their body copy to white; the
   nav was the one open item across all six prototype pages (see
   website-build-STATE doc). Scoped to this page only — global styles.css
   untouched, live production unaffected. This file loads after styles.css
   so it wins at equal selector specificity. Hover/focus goes aqua
   (--aqua-2) instead of the global's plain #fff-on-hover, which would be
   invisible against an already-white resting state. The "Book a call"
   pill (.btn/.btn-primary) is untouched — it keeps its own existing styling. */
.nav .links a:not(.btn),
.nav-mobile a:not(.btn){color:#fff}
.nav .links a:not(.btn):hover,
.nav-mobile a:not(.btn):hover,
.nav-mobile a:not(.btn):focus{color:var(--aqua-2)}
