/* ============================================================
   POL — responsiveness layer
   Loads AFTER pol.css / pol-scenes.css / pol-home.css so it can
   override their breakpoints. Three concerns:
     1. Laptop midrange (901–1280)  — stop the rail/headline collision
     2. Ultra-wide (≥1380)          — align hero + nav to content column
     3. Mobile (≤900)               — rebuild the hero (no scroll-jack)
                                       with 3 switchable modes + data density
   ============================================================ */

/* HUD panels — slightly transparent so the live footage reads behind them */
.readout,.hb-inset{opacity:.9}

/* =====================================================================
   1 · LAPTOP MIDRANGE — 901–1280
   The instrument rail (right) and the headline column (left) share the
   hero's horizontal space. At ~1024 the headline slides under the rail.
   Tighten both so they always clear each other.
   ===================================================================== */
@media (min-width:901px) and (max-width:1280px){
  .hb-rail2{width:300px;right:24px}
  .hb-float,.hb-rail2 .hb-inset,.hb-inset{width:300px}
  .hud-scope{height:300px}
  .hb-copy{max-width:48vw;padding-left:32px}
  .hb-copy h1{font-size:clamp(34px,4.6vw,52px)}
  .hb-copy p{font-size:16px;margin-top:18px}
  .hb-actions{margin-top:26px}
  .hb-chips{margin-top:26px}
}
@media (min-width:901px) and (max-width:1080px){
  .hb-rail2{width:276px;right:18px}
  .hb-float,.hb-rail2 .hb-inset,.hb-inset{width:276px}
  .hud-scope{height:264px}
  .hb-copy{max-width:44vw}
  .scene-idx .track{width:90px}
}

/* =====================================================================
   1b · LARGE DESKTOP (≥1281) — at 100% zoom the base HUD (344px wide,
   270px scope) is oversized and crowds the headline. Keep it compact so
   the instrument rail sits comfortably beside the title.
   ===================================================================== */
@media (min-width:901px){
  /* pre-JS fallback zoom; scenes.js then auto-fits the rail to the exact
     viewport height (adaptive — see the auto-fit block in scenes.js). */
  .hb-rail2{zoom:0.7}
}

/* =====================================================================
   2 · ULTRA-WIDE — align hero copy, nav and rail to the 1240 column
   so the headline lines up with the editorial sections below instead of
   hugging the screen edge on 27"+ monitors.
   ===================================================================== */
@media (min-width:1380px){
  .pnav{padding-left:max(48px,calc((100vw - 1240px) / 2));
        padding-right:max(48px,calc((100vw - 1240px) / 2))}
  /* push with margin (outside the box) so it never eats max-width */
  .hb-copy{margin-left:max(0px,calc((100vw - 1240px) / 2 - 48px))}
  .hb-rail2{right:max(40px,calc((100vw - 1240px) / 2))}
  /* .sec / .foot already centre their inner column via max-width + margin:auto */
}
@media (min-width:1700px){
  .hb-copy{max-width:680px}
  .hb-copy h1{font-size:72px}
}

/* =====================================================================
   1b · DESKTOP — keep the instrument rail clear of the top nav.
   The rail was vertically centred (top:50% + translateY(-50%)) and tall
   enough that its top reached y≈20, sliding the HUD header under the
   transparent nav so the “Apply for coaching” CTA overlapped it.
   Anchor the rail between the nav and the bottom instead; it scrolls
   internally (overflow-y:auto from base) when content runs long.
   ===================================================================== */
@media (min-width:901px){
  /* symmetric box centred on the viewport (not just the space below the nav),
     so the HUD sits at the optical centre. `safe` top-aligns on short
     viewports so the header never slips under the nav CTA. */
  .hb-rail2{top:100px;bottom:100px;height:auto;max-height:none;
    justify-content:safe center;transform:translateX(12px)}
  .scene.active .hb-rail2{transform:translateX(0)}
}

/* =====================================================================
   3 · MOBILE — ≤900.  Rebuild the pinned scroll-story into a normal-flow
   hero: nav → copy → contained video → instrument rail, with the scene
   chips acting as tabs that swap the active scene in place.
   ===================================================================== */
@media (max-width:900px){

  /* --- kill the scroll-jack: hero becomes a normal column ----------- */
  .hero-track{height:auto !important}
  .heroB.sticky{position:relative;top:auto}
  .heroB{position:relative;min-height:100vh;min-height:100svh;display:flex;flex-direction:column;overflow:hidden}
  .heroB .hb-nav{position:relative;z-index:6}
  .scroll-cue,.scene-idx{display:none}

  /* --- nav: brand + CTA + menu button -------------------------------- */
  .pnav{padding:13px 16px}
  .pnav .brand img{height:30px !important;width:auto !important}
  .pnav .brand-full{display:none !important}
  .pnav img.brand-mark{display:block;height:36px !important;width:auto !important}
  html,body{overflow-x:clip}
  .pnav .cta{display:none}
  .nav-right{gap:12px}
  .menu-btn{font-size:11px;gap:8px}
  .menu-btn .mb-bars{width:20px}
  .menu-btn .mb-bars i:nth-child(1){width:20px}

  /* --- copy overlaid on the video, bottom-anchored ----------------- */
  .hb-copy{position:relative;z-index:5;margin-top:auto;max-width:none;
    padding:88px 22px calc(50px + env(safe-area-inset-bottom));
    background:linear-gradient(180deg,transparent 0,rgba(18,15,14,.5) 32%,rgba(18,15,14,.9) 70%,var(--deep) 100%)}
  .hb-copy .eyebrow{font-size:11px;letter-spacing:.18em}
  .hb-copy h1{font-size:clamp(28px,7.4vw,40px);max-width:15ch;margin:12px 0 0}
  .hb-copy p{font-size:14px;line-height:1.55;margin-top:11px;max-width:46ch;color:rgba(246,244,240,.82)}
  .hb-actions{margin-top:18px;gap:10px}
  .hb-actions .btn-ghost{display:none}
  .hb-actions .btn-primary{flex:1;justify-content:center;padding:14px 16px}
  .hb-chips{margin-top:18px;gap:6px;flex-wrap:nowrap}
  .hb-chips .chip{flex:1 1 0;min-width:0;justify-content:center;padding:0 6px;min-height:36px;
    font-size:10px;letter-spacing:.02em;gap:4px;white-space:nowrap;
    background:rgba(18,15,14,.5);backdrop-filter:blur(5px)}
  .hb-chips .chip .dot{display:none}

  /* --- scenes crossfade as a full-bleed video backdrop; HUDs dropped --- */
  .scene{position:absolute;inset:0;display:block;
    opacity:0;visibility:hidden;transition:opacity .7s ease,visibility .7s;z-index:1;background:var(--deep)}
  .scene.active{opacity:1;visibility:visible}
  .hb-rail2,.hb-rec{display:none !important}
  /* compact instrument panel (B3c) — side rail of live metrics + micro-bars */
  .m-hud{display:block;position:absolute;top:64px;right:14px;z-index:5;width:150px;
    border:1px solid var(--line);border-radius:7px;background:rgba(20,17,16,.64);backdrop-filter:blur(12px);
    overflow:hidden;box-shadow:0 16px 38px rgba(0,0,0,.42)}
  .m-hud .ph{display:flex;align-items:center;gap:6px;padding:9px 12px;border-bottom:1px solid var(--line);
    font-family:"IBM Plex Mono",monospace;font-size:8.5px;letter-spacing:.14em;text-transform:uppercase;color:var(--sage-dim)}
  .m-hud .ph .dot{width:6px;height:6px;border-radius:50%;background:var(--orange)}
  .m-hud .pr{padding:6.5px 12px}
  .m-hud .pr+.pr{border-top:1px solid rgba(246,244,240,.07)}
  .m-hud .pr .top{display:flex;justify-content:space-between;align-items:baseline}
  .m-hud .pr .l{font-family:"IBM Plex Mono",monospace;font-size:9px;letter-spacing:.04em;color:var(--sage-dim)}
  .m-hud .pr .v{font-family:"Archivo",sans-serif;font-weight:800;font-size:15px;letter-spacing:-.02em;color:var(--paper)}
  .m-hud .pr .v small{font-family:"IBM Plex Mono",monospace;font-size:8px;font-weight:400;color:var(--sage-dim);margin-left:1px}
  .m-hud .bar{height:4px;margin-top:6px;border-radius:3px;background:rgba(246,244,240,.1);overflow:hidden}
  .m-hud .bar i{display:block;height:100%;background:linear-gradient(90deg,#3f6f6a,#5fc0a0)}
  .hb-media,.met-media,.coach-media{position:absolute;inset:0;width:100%;height:100%;opacity:1}
  .hb-media video,.met-media video,.coach-media video{
    position:absolute;inset:0;width:100%;height:100%;
    object-fit:cover;object-position:center;transform:none !important;
    -webkit-mask-image:none;mask-image:none;
    filter:saturate(1.06) contrast(1.12) brightness(.94)}
  /* bio clip frames the runner on the right — pull focal point across so they centre */
  [data-scene-layer="bio"] .hb-media video{object-position:60% center}
  .hb-media::before,.hb-media::after,.hb-vig{display:none}
  .hb-grain{opacity:.1}

  /* --- editorial sections ------------------------------------------ */
  .sec{padding:64px 20px}
  .cred .it{padding:15px 22px;font-size:12px}
  .blind-grid{gap:30px}
  .blind-lead{font-size:17px}
  .cons h3{font-size:19px}
  .sys-head h2{font-size:clamp(30px,7.6vw,42px)}
  .keys{margin-top:48px}
  .key{padding:40px 0;gap:26px}
  .key-media{height:240px}
  .key h3{font-size:26px}
  .feat-quote{padding:30px 22px}
  .feat-quote .q{font-size:21px}
  .cta-band{padding:74px 22px}
  .foot{padding:48px 20px 32px}
  .foot-top img{width:auto !important;max-width:min(72vw,260px) !important;height:auto !important}
  .foot-top{flex-direction:column;gap:28px}
  .foot-links{gap:32px}

  /* --- menu: always a bottom sheet on mobile (overrides the data-menu tweak) --- */
  .navmenu-panel{inset:auto 0 0 0 !important;width:auto !important;height:auto !important;max-height:90vh;
    border-radius:18px 18px 0 0;padding:24px 22px calc(30px + env(safe-area-inset-bottom)) !important;
    transform:translateY(101%) !important;box-shadow:0 -30px 60px rgba(0,0,0,.5)}
  .navmenu.open .navmenu-panel{transform:none !important}
  .navmenu-panel::before{content:"";position:absolute;top:10px;left:50%;transform:translateX(-50%);
    width:42px;height:4px;border-radius:3px;background:rgba(246,244,240,.25)}
  .navmenu-links{flex:none !important;justify-content:flex-start !important;gap:0 !important;margin:12px 0 !important}
  .navmenu-links a{font-size:clamp(23px,7vw,30px) !important;padding:15px 0 !important}
}

/* phones — tighten grids that are still 2-up at 900 */
@media (max-width:560px){
  .statband{grid-template-columns:1fr 1fr}
  .statband .st{padding:26px 18px}
  .statband .st .v{font-size:36px}
  .who-grid{grid-template-columns:1fr;gap:18px}
  .who-card .ph{height:200px}
  .results-head h2{font-size:clamp(26px,8vw,34px)}
  .phase-scope{flex-direction:column}
  .phase-card{flex-direction:row;align-items:center;gap:12px}
  .phase-card .pc-graph{flex:1;height:46px;margin:0}
  .phase-card .pc-head{flex:1.2}
  .phase-card .pc-foot{flex:none;margin-top:0;text-align:right}
  .hb-actions{flex-direction:column}
  .hb-actions .btn-primary,.hb-actions .btn-ghost{width:100%}
}
