/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */
/* Allocore One audience titles intentionally use the theme-specific
   audience color instead of the shared mission-card flame. */
.cc-card.cc-stat .mcard-n{ color:var(--card-title); }

@media (max-width:1080px){
  .f-grid{ grid-template-columns:repeat(2,1fr) }
  .fcard.wide{ display:flex; grid-column:auto; grid-template-columns:none;}
  .hero-stats{ grid-template-columns:repeat(2,1fr);  }
  .steps{ grid-template-columns:repeat(3,1fr) }
  /* .steps.steps-4, not .steps — a four-stage row reads better as 2x2 than
     3+1, and the two-class weight is needed to beat .steps-4's own rule. */
  .steps.steps-4{ grid-template-columns:repeat(2,1fr) }
  .os-head{ grid-template-columns:1fr; align-items:start; gap:20px }
  .cbd-head{ grid-template-columns:1fr }
  /* two-class weight to match .cbd-head--media's own rule — the single-class
     .cbd-head above loses to it and the media column would survive here */
  .cbd-head.cbd-head--media{ grid-template-columns:1fr }
  .cbd-ph{ max-width:420px }
  .ind-grid{ grid-template-columns:repeat(2,minmax(0,1fr)) }
  .stat{ padding:22px 22px 22px 0; border-bottom:1px solid var(--line) }
  .stat:nth-child(2n){ border-right:none } .stat:nth-child(n+3){ border-bottom:none }
}
@media (max-width:900px){
  /* Give the rotating homepage headline enough leading when the verb and
     trailing copy wrap onto separate mobile lines. */
  #hero.hero-video .hero-h1{
    line-height:1.08;
  }
  #hero.hero-video .hero-h1 .mask{
    padding-block:.06em;
    margin-block:-.06em;
  }
  #hero.hero-video .hero-h1 .hl-b{
    line-height:1.28;
  }
  #hero.hero-video .hero-h1 .hl-b .mask{
    padding-block:.08em;
    margin-block:-.08em;
  }
  #hero.hero-video .hero-verb{
    min-height:1.28em;
    vertical-align:baseline;
  }
  #hero.hero-video .hv-word::after{ display:none; }
  #features .f-grid{ grid-template-columns:1fr; }
  #features .fcard.wide{ grid-column:auto; grid-template-columns:none; }
  #features .fcard.wide > div:first-child{ min-height:0; }
  .nav-toggle{ display:flex; margin-left:auto; margin-right:10px; }
  .nav-links{
    position:fixed; top:74px; left:0; right:0; z-index:499;
    display:flex; flex-direction:column; gap:0;
    max-height:calc(100dvh - 74px); overflow:auto;
    padding:16px var(--pad) 28px;
    background:var(--action); border-bottom:1px solid var(--ai-card-border);
    backdrop-filter:blur(22px) saturate(180%); -webkit-backdrop-filter:blur(22px) saturate(180%);
    opacity:0; visibility:hidden; pointer-events:none; transform:translateY(-8px);
    transition:opacity .24s var(--ease), transform .24s var(--ease), visibility 0s linear .24s;
  }
  nav.mobile-open .nav-links{ opacity:1; visibility:visible; pointer-events:auto; transform:none; transition-delay:0s; }
  .nav-links > li{ width:100%; }
  .nav-top{ width:100%; justify-content:space-between; padding-inline:12px; }
  /* The mobile panel uses the fixed navy action surface in both themes.
     Keep its navigation labels white instead of inheriting light-theme
     secondary text, which becomes too dark against that surface. */
  .nav-links .nav-top,
  .nav-links .nav-menu a,
  .nav-links .nav-top:hover,
  .nav-links .has-menu.open > .nav-top,
  .nav-links .nav-menu a:hover,
  .nav-links .nav-menu a:focus-visible{ color:var(--ai-card-white); }
  .nav-links .nav-top .caret{ opacity:.85; }
  .nav-links .nav-menu a:hover,
  .nav-links .nav-menu a:focus-visible{ background:rgba(255,255,255,.12); outline-color:var(--ai-card-white); }
  .nav-links :where(.nav-top,.nav-menu a,.nav-explore):focus-visible{ outline-color:var(--ai-card-white); }
  .nav-menu,
  .has-menu.open > .nav-menu{
    position:static; min-width:0; max-height:0; overflow:hidden;
    padding:0; border:0; border-radius:0; box-shadow:none; background:none;
    opacity:1; visibility:hidden; transform:none; transition:max-height .24s var(--ease), visibility 0s linear .24s;
  }
  .has-menu.open > .nav-menu{ max-height:420px; padding:4px 0 8px; visibility:visible; transition-delay:0s; }
  .nav-menu::before{ display:none; }
  .nav-menu a{ white-space:normal; padding-inline:24px; }
  .nav-mobile-cta{ display:block; margin-left:0; }
  .nav-desktop-cta{ display:none; }
  .nav-mobile-cta .nav-explore{
    display:flex; align-items:center; justify-content:flex-start;
    width:100%; min-height:44px; padding:8px 12px;
    border:0; border-radius:0; background:transparent;
    color:var(--ai-card-white); font-size:13.5px; font-weight:500;
  }
  .nav-mobile-cta .nav-explore::before{ display:none; }
  .nav-mobile-cta .nav-explore:hover,
  .nav-mobile-cta .nav-explore:focus-visible{
    color:var(--ai-card-white); background:rgba(255,255,255,.12);
    outline:2px solid var(--ai-card-white); outline-offset:-2px;
  }
  .hero-grid{ grid-template-columns:1fr; gap:56px }
  /* the angled scrim is tuned for the two-column width; once the copy is
     full-bleed it needs an even top-to-bottom wash instead */
  .hero-scrim{
    background:linear-gradient(180deg,rgba(4,12,20,.74) 0%,rgba(4,12,20,.6) 40%,rgba(4,12,20,.62) 64%,var(--media-overlay) 100%);
  }
  .hero-h1{ font-size:clamp(40px,10vw,68px) }
  /* keep the badges clear of the radar once the columns stack */
  .chip-a{ left:0; bottom:-20px } .chip-b{ right:0; top:-24px }

  /* Shrink the radar by real widths, not transform:scale — .ring and .sweep
     own transform via their spin keyframes, which would win over scale. */
  .orb{ height:clamp(300px,42vh,430px) }
  .orb .r1{ width:170px } .orb .r2{ width:235px } .orb .r3{ width:320px }
  .orb .r4{ width:412px } .orb .r5{ width:518px }
  .orb .sweep{ width:518px }
  .orb .crosshair{ width:518px; height:518px }
  .orb .bezel{ width:368px }
  .orb .ping{ width:170px }
  .orb .core{ --core:118px }
  /* r3 labels would run past the viewport edge when they swing right here */
  .orb .tag-txt{ font-size:9px; letter-spacing:.1em }
  .orb .r3 .tag-txt{ display:none }
  .mission-cards{ grid-template-columns:1fr }
  .config-grid{ grid-template-columns:1fr }
  .steps{ grid-template-columns:repeat(3,1fr) }
  .steps.steps-4{ grid-template-columns:repeat(2,1fr) }
  /* the split card's media column has no room left to be a column */
  .split{ grid-template-columns:1fr }
  .split-copy{ border-right:none; border-bottom:1px solid var(--line-2) }
  .split-media{ min-height:clamp(240px,42vw,380px) }
  .split-media img{ object-position:center }
  .ai-grid, .trust-grid, .contact-grid, .exception-layout{ grid-template-columns:1fr; gap:48px }
  /* same two-class weight rule as .cbd-head--media above */
  .ai-grid.ai-grid--flip{ grid-template-columns:1fr }
  .ind-feature{ grid-template-columns:1fr }
  /* the seam divider moves from the vertical edge to the horizontal one */
  .ind-feature-media{ border-right:0; border-bottom:1px solid var(--line-2); aspect-ratio:16/7; min-height:0 }
  .ai-flip{ grid-template-columns:1fr }
  /* ── card collage: absolute placement gives way to a plain grid ──
     A 340px horizontal parallax push would tear a stacked grid apart, so
     hero-cards.js also scopes its scroll tween to (min-width:901px). */
  .cc-canvas{
    aspect-ratio:auto; margin-top:clamp(34px,6vh,56px);
    display:grid; grid-template-columns:1fr 1fr; gap:12px;
    padding-inline:var(--pad);
  }
  /* two-class selector to outrank .cc-card.cc-stat's absolute placement */
  .cc-card, .cc-card.cc-stat{ position:static; left:auto; top:auto; width:auto; }
  /* Video cards are display-only on touch screens: keep them compact in a
     two-column collage, then give each audience card a full-width row below. */
  .cc-card.cc-video{ aspect-ratio:298/228; }
  .cc-card.cc-stat{ aspect-ratio:auto; min-height:150px; }
  .cc-card.cc-stat{ grid-column:1 / -1; }
  .ai-ph{ aspect-ratio:16/10 }
  .trust-ph{ aspect-ratio:16/7 }
  #showcase{ height:auto }
  .sc-sticky{ position:static; height:auto; padding-block:100px 80px }
  .sc-caption{ position:static; margin-bottom:44px }
  .sc-note{ display:none }
  /* the showcase timeline is gated to >=900px, so there is no scrub to draw
     the tether here — and an undrawn hairline is just a stray mark */
  .sc-tether{ display:none }
  .sc-frame{ width:100% }
  .sc-frame.sc-frame--phone{ width:min(78vw,420px); }
  /* On touch screens the story becomes a native horizontal carousel. Keep a
     deliberate peek of the next card so the gesture is discoverable, while
     scroll snapping keeps each card readable and aligned. */
  .story-pin{ overflow:hidden; }
  .story-swipe-hint{ display:flex; padding:0 var(--pad) 12px; }
  .story-track{
    overflow-x:auto;
    overscroll-behavior-x:contain;
    scroll-snap-type:x mandatory;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
    padding-inline:var(--pad);
  }
  .story-track::-webkit-scrollbar{ display:none; }
  .panel{
    grid-template-columns:1fr;
    flex:0 0 calc(100vw - (2 * var(--pad)) - 24px);
    scroll-snap-align:start;
    scroll-snap-stop:always;
  }
  .story-rail{ display:none; }
  .story-head{ padding-bottom:36px }
}
@media (max-width:640px){
  /* Keep the loader rule above the wordmark on narrow screens. The desktop
     loader uses an absolute bar between the wordmark and count, but that
     placement crosses the wordmark once the stack becomes vertical. */
  #loader .l-bar{
    position:relative;
    inset:auto;
    order:-1;
    width:100%;
    margin-bottom:4px;
  }
  #features{ padding-block:clamp(80px,14vh,120px); }
  #features .f-grid{ gap:12px; margin-top:clamp(38px,8vh,56px); }
  #features .fcard-content{ padding:24px 22px 26px; }
  #features .fcard.wide > div:first-child{ min-height:0; }
  #features .fcard h3{ font-size:18px; }
  #features .fcard p{ font-size:14px; line-height:1.58; }
  .hero-stats{ grid-template-columns:1fr }
  .steps{ grid-template-columns:1fr }
  /* must repeat the two-class weight here, or the 1080px .steps.steps-4 rule
     above still wins at this width */
  .steps.steps-4{ grid-template-columns:1fr }
  .ind-grid{ grid-template-columns:1fr }
  .ind-card:nth-child(n){ grid-column:span 1; }
  /* first/last name side by side leaves ~57px fields on a phone */
  .cf-row{ grid-template-columns:1fr }
  .tcard{ padding:22px; gap:18px }
  .t-n{ width:48px; height:48px }
  .step{ min-height:0; padding-bottom:26px }
  .step .dot{ margin-bottom:26px }
  .step::before{ display:none }
  .stat{ border-right:none }
  .nav-cta .btn-ghost{ display:none }
  #loader{ flex-direction:column; align-items:flex-start; justify-content:flex-end; gap:8px }
  /* Three 140px tracks + gaps exceed a 390px viewport, and footer{overflow:hidden}
     would silently clip the third column rather than scroll it. */
  .f-cols{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:32px 24px }
  body.story-in-view #totop{ opacity:0; transform:translateY(14px) scale(.85); pointer-events:none; }
}
@media (max-width:560px){
  .cc-canvas{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:400px){
  .f-cols{ grid-template-columns:1fr }
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{ animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important }
  body::after{ display:none }
  /* no scrubbed timelines, so collapse the tall pinned scroll runway */
  #showcase{ height:auto }
  .sc-sticky{ position:static; height:auto; padding-block:100px 80px }
  .sc-caption{ position:static; margin-bottom:44px }
  .sc-note{ display:none }
  .scroll-cue{ display:none }
  /* same reason the rail above it goes: it is a motion gesture, and nothing
     here would ever draw it */
  .sc-tether{ display:none }
  /* animations are stilled above, so reveal the radar labels outright
     rather than leaving them stuck at their opacity:0 start frame */
  .orb .tag-txt{ opacity:1 }
}
