/* ==========================================================================
   EVENT HORIZON — page-specific sections
   ========================================================================== */

/* ==========================================================================
   HOME — hero galaxy (signature sequence)
   ========================================================================== */

.hero {
  position: relative;
  height: 280vh;             /* scroll runway for the camera dive */
}
.hero__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 3;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero__title {
  position: relative;
  font-size: var(--fs-hero);
  font-weight: 600;
  letter-spacing: -0.02em;
  max-width: 15ch;
  margin-inline: auto;
  /* sci-fi title-card glow — one STATIC text-shadow (animating text-shadow
     repaints the headline every frame; the breathing is done by the cheap
     .hero__title-wrap::before layer below, transform/opacity only) */
  color: #eef3ff;
  text-shadow:
    0 0 18px rgba(168, 198, 255, 0.45),
    0 0 44px rgba(117, 151, 222, 0.4),
    0 0 90px rgba(117, 151, 222, 0.22);
}
.hero__title .accent {
  color: var(--star);
  text-shadow:
    0 0 20px rgba(168, 198, 255, 0.7),
    0 0 52px rgba(111, 247, 227, 0.35),
    0 0 100px rgba(168, 198, 255, 0.4);
}
/* a soft light sweep drifts across the letters like an anamorphic sheen */
.hero__title::after {
  content: "";
  position: absolute;
  inset: -10% -6%;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(200, 220, 255, 0.14) 48%, rgba(255, 255, 255, 0.05) 52%, transparent 62%);
  mix-blend-mode: screen;
  transform: translateX(-60%);
  will-change: transform;
  animation: hero-sheen 7s var(--ease-inout) infinite;
}
@keyframes hero-sheen {
  0%, 18% { transform: translateX(-70%); opacity: 0; }
  30% { opacity: 1; }
  60%, 100% { transform: translateX(70%); opacity: 0; }
}
html.no-motion .hero__title, html.no-motion .hero__title::after,
html.perf-low .hero__title, html.perf-low .hero__title::after { animation: none; }
html.perf-low .hero__title::after { display: none; }
.hero__title-wrap { position: relative; }
/* breathing glow — GPU-composited ellipse behind the headline
   (replaces the old text-shadow keyframe animation; transform/opacity only) */
.hero__title-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120%;
  height: 130%;
  transform: translate(-50%, -50%) scale(0.9);
  background: radial-gradient(ellipse closest-side, rgba(117, 151, 222, 0.22), rgba(117, 151, 222, 0.08) 55%, transparent 72%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  will-change: transform, opacity;
  animation: hero-glow-breathe 4.5s var(--ease-inout) infinite;
}
@keyframes hero-glow-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(0.88); opacity: 0.65; }
  50% { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
}
html.no-motion .hero__title-wrap::before,
html.perf-low .hero__title-wrap::before { animation: none; }
html.perf-low .hero__title-wrap::before { display: none; }
.hero__title-wrap .lens-flare { bottom: 12%; }
.hero__sub {
  margin-top: 1.6rem;
  max-width: 52ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
}
.hero__cta {
  display: flex;
  gap: 1rem;
  margin-top: 2.4rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* corner telemetry */
.hero__telemetry {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: rgba(138, 147, 184, 0.6);
}
.tele { position: absolute; line-height: 1.8; }
.tele--tl { top: calc(var(--nav-height) + 1.2rem); left: var(--gutter); }
.tele--tr { top: calc(var(--nav-height) + 1.2rem); right: var(--gutter); text-align: right; }
.tele--bl { bottom: 1.4rem; left: var(--gutter); }
.tele--br {
  bottom: 1.4rem;
  right: var(--gutter);
  text-align: right;
  color: var(--star);
  animation: tele-blink 2.4s ease-in-out infinite;
}
@keyframes tele-blink { 0%, 100% { opacity: 0.9; } 50% { opacity: 0.35; } }

/* hero viewport corner brackets (tactical framing) */
.hud-bracket {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(168, 198, 255, 0.5);
  pointer-events: none;
}
.hud-bracket--tl { top: calc(var(--nav-height) + 0.8rem); left: 1.4rem; border-right: 0; border-bottom: 0; }
.hud-bracket--tr { top: calc(var(--nav-height) + 0.8rem); right: 1.4rem; border-left: 0; border-bottom: 0; }
.hud-bracket--bl { bottom: 1.2rem; left: 1.4rem; border-right: 0; border-top: 0; }
.hud-bracket--br { bottom: 1.2rem; right: 1.4rem; border-left: 0; border-top: 0; }
@media (max-width: 768px) { .hud-bracket { width: 18px; height: 18px; } }

/* ==========================================================================
   DIVE HUD — rolling info through the galaxy run
   ========================================================================== */
.dive-hud {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.dive-phase {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* hidden until the scroll-driven onUpdate reveals them */
.dive-phase--mistey, .dive-phase--inbound { opacity: 0; }

/* phase 1 — telemetry target tags */
.dive-tag {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1.1rem;
  border-left: 1px solid var(--signal);
  background: linear-gradient(90deg, rgba(111, 247, 227, 0.06), transparent);
  opacity: 0;
}
.dive-tag::before {
  content: "";
  position: absolute;
  left: -1px; top: -1px;
  width: 10px; height: 10px;
  border-top: 1px solid var(--signal);
  border-left: 1px solid var(--signal);
}
.dive-tag .dt-label {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: var(--track-mono);
  color: var(--muted);
}
.dive-tag .dt-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  text-shadow: 0 0 24px rgba(117, 151, 222, 0.4);
}
.dive-tag .dt-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--star);
}
.dive-tag--l1 { left: 8vw; top: 26vh; }
.dive-tag--r1 { right: 8vw; top: 40vh; text-align: right; align-items: flex-end;
  border-left: 0; border-right: 1px solid var(--signal);
  background: linear-gradient(-90deg, rgba(111, 247, 227, 0.06), transparent); }
.dive-tag--r1::before { left: auto; right: -1px; border-left: 0; border-right: 1px solid var(--signal); }
.dive-tag--l2 { left: 12vw; bottom: 24vh; }

/* phase 2 — AGENT MISTEY holographic core */
.dive-phase--mistey { flex-direction: column; gap: 2rem; }
.holo-core {
  position: relative;
  width: clamp(180px, 26vw, 300px);
  height: clamp(180px, 26vw, 300px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.holo-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(111, 247, 227, 0.4);
}
.holo-ring--1 { inset: 0; border-style: dashed; animation: holo-spin 18s linear infinite; }
.holo-ring--2 { inset: 16%; border-color: rgba(168, 198, 255, 0.35); border-style: dashed; animation: holo-spin 12s linear infinite reverse; }
.holo-ring--arc {
  inset: 8%;
  border: 2px solid transparent;
  border-top-color: var(--signal);
  border-right-color: var(--signal);
  animation: holo-spin 6s linear infinite;
  filter: drop-shadow(0 0 6px var(--signal-glow));
}
.holo-dot {
  width: 22%;
  height: 22%;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff, var(--signal) 40%, transparent 72%);
  box-shadow: 0 0 40px var(--signal-glow), 0 0 90px rgba(111, 247, 227, 0.35);
  animation: holo-pulse 2.4s ease-in-out infinite;
}
.holo-mistey {
  position: absolute;
  inset: 0;
  margin: auto; /* replaced element: inset 0 + auto margins = dead center */
  width: 62%;
  height: auto;
  filter: drop-shadow(0 0 26px rgba(111, 247, 227, 0.45));
  pointer-events: none;
  z-index: 2; /* above the rings; GSAP owns the transform (bob/tilt) */
}
/* soft radial glow behind MISTEY — the old holo-dot look as a backdrop */
.holo-core::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 46%;
  height: 46%;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff, var(--signal) 40%, transparent 72%);
  box-shadow: 0 0 40px var(--signal-glow), 0 0 90px rgba(111, 247, 227, 0.35);
  opacity: 0.55;
  animation: holo-pulse 2.4s ease-in-out infinite;
  z-index: 1;
}
.holo-scan {
  position: absolute;
  left: 6%; right: 6%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--signal), transparent);
  animation: holo-scan 3.2s ease-in-out infinite;
}
@keyframes holo-spin { to { transform: rotate(360deg); } }
@keyframes holo-pulse { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.12); opacity: 1; } }
@keyframes holo-scan { 0% { top: 14%; opacity: 0; } 50% { opacity: 1; } 100% { top: 86%; opacity: 0; } }

.mistey-id {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 90vw;
}
.mistey-id .m-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: var(--track-mono);
  color: var(--signal);
}
.mistey-id .m-name {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  text-shadow: 0 0 40px rgba(111, 247, 227, 0.35);
}
.mistey-id .m-sub {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.mistey-id .m-line {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--star);
  min-height: 1.2em;
}

/* phase 3 — inbound capabilities ticker */
.dive-phase--inbound { flex-direction: column; gap: 1.4rem; }
.dive-ticker {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.dive-ticker [data-dive-ticker] {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 600;
  color: transparent;
  -webkit-text-stroke: 1px rgba(168, 198, 255, 0.5);
  will-change: transform;
}
.dive-arrive {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--signal);
  text-shadow: 0 0 16px var(--signal-glow);
}

/* mobile: keep only the MISTEY reveal (shorter runway) */
@media (max-width: 768px) {
  .dive-phase--tags, .dive-phase--inbound { display: none; }
}
html.no-motion .dive-hud { display: none; }

/* static fallback (no WebGL / low power) */
.hero--static .dive-hud { display: none; }
.hero--static { height: auto; }
.hero--static .hero__stage { position: relative; }
.hero--static .hero__canvas { display: none; }
.hero--static .hero__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 42%, rgba(43, 16, 85, 0.75), transparent 72%),
    radial-gradient(ellipse 34% 22% at 50% 42%, rgba(117, 151, 222, 0.35), transparent 70%),
    radial-gradient(ellipse 10% 6% at 50% 42%, rgba(201, 168, 255, 0.5), transparent 80%);
}
html.no-motion .hero { height: auto; }
html.no-motion .hero__stage { position: relative; }

@media (max-width: 768px) {
  .hero { height: 200vh; }  /* shorter fly-through on mobile */
  .tele--tr, .tele--bl { display: none; }
}

/* ==========================================================================
   FLIGHT SIM — pilot mode overlay
   ========================================================================== */
.flight-sim {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(0.6rem, 2vw, 1.4rem);
}
.flight-sim.is-open { display: flex; }
.fs-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 2, 6, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.fs-stage {
  position: relative;
  width: min(1100px, 100%);
  height: min(680px, 88vh);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-l);
  overflow: hidden;
  background: #030308;
  box-shadow: 0 40px 120px rgba(2, 2, 10, 0.7);
}
/* On menus (start / game-over) keep a visible pointer to click buttons.
   During an active round, hide every pointer — the in-game ship IS your cursor. */
.fs-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
html.has-cursor .fs-canvas { cursor: none; }              /* custom reticle takes over on menus */
html.game-playing .fs-canvas { cursor: none; }            /* no native pointer while flying */
html.game-playing .cursor-dot,
html.game-playing .cursor-ring { opacity: 0 !important; } /* no custom cursor while flying */

.fs-hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  pointer-events: none;
  z-index: 2;
}
.fs-hud__left, .fs-hud__right { display: flex; align-items: center; gap: 1.2rem; }
.fs-stat {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--muted);
}
.fs-stat b { color: var(--text); font-weight: 500; margin-left: 0.3rem; }
.fs-hud [data-fs-shield] { color: var(--signal); letter-spacing: 2px; }
.fs-close {
  pointer-events: auto;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: var(--track-mono);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0.4rem 0.7rem;
  transition: color var(--dur-fast), border-color var(--dur-fast);
}
.fs-close:hover { color: var(--flare); border-color: rgba(255, 122, 69, 0.5); }

.fs-panel {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  padding: 1.5rem;
  background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(3, 3, 8, 0.7), rgba(3, 3, 8, 0.92));
}
.fs-panel h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.fs-panel p { color: var(--muted); max-width: 46ch; font-size: 0.95rem; }
.fs-panel .fs-controls { color: var(--star); font-size: 0.62rem; letter-spacing: var(--track-mono); }
.fs-panel .fs-final { color: var(--text); font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.1em; }
.fs-panel .fs-final b { color: var(--signal); }
.fs-panel__cta { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; }
@media (max-width: 600px) {
  .fs-stage { height: 82vh; }
  .fs-hud__left, .fs-hud__right { gap: 0.7rem; }
}

/* ==========================================================================
   HOME — services traverse (pinned horizontal scroll)
   ========================================================================== */

.h-scroll { overflow: hidden; padding: var(--space-6) 0 0; }
.h-scroll__head { margin-bottom: var(--space-4); }
.h-scroll__viewport { position: relative; padding-bottom: var(--space-6); }

.h-scroll__bg {
  position: absolute;
  top: 50%;
  left: -5%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(8rem, 26vw, 22rem);
  font-weight: 600;
  color: transparent;
  -webkit-text-stroke: 1px rgba(150, 170, 255, 0.06);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.h-scroll__line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 12%, var(--line-strong) 88%, transparent);
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 0;
}
html.no-motion .h-scroll__line { transform: scaleX(1); }

.h-scroll__track {
  position: relative;
  display: flex;
  gap: clamp(1.4rem, 3vw, 2.6rem);
  padding-left: max(var(--gutter), calc((100vw - var(--container)) / 2));
  padding-right: 8vw;
  width: max-content;
  z-index: 1;
  will-change: transform;
}

.station {
  width: clamp(300px, 26vw, 380px);
  flex-shrink: 0;
  padding: 2rem;
  color: var(--text);
}
.station .station__orbit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}
.station .card-idx { color: var(--star); }
.station h3 { font-size: 1.35rem; margin-bottom: 0.6rem; }
.station p { color: var(--muted); font-size: var(--fs-small); min-height: 4.2em; }
.station .station__meta {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: var(--track-mono);
  color: rgba(138, 147, 184, 0.55);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .h-scroll { padding-top: var(--space-5); }
  .h-scroll__track {
    width: auto;
    flex-direction: column;
    padding-inline: var(--gutter);
  }
  .station { width: 100%; }
  .h-scroll__line, .h-scroll__bg { display: none; }
}

/* ==========================================================================
   HOME — stats (why provatsoft)
   ========================================================================== */

.stat-card {
  padding: 2rem 1.6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.stat-card .stat-ring {
  width: 92px;
  height: 92px;
  margin-bottom: 1rem;
  transform: rotate(-90deg);
}
.stat-card .stat-ring circle {
  fill: none;
  stroke-width: 2;
}
.stat-card .stat-ring circle:first-child { stroke: rgba(150, 170, 255, 0.12); }
.stat-card .stat-ring circle:last-child { stroke: var(--star); stroke-linecap: round; }
.stat-card .stat-ring--flare circle:last-child { stroke: var(--flare); }
.stat-card .stat-value {
  position: absolute;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}
.stat-card .stat-figure {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-card h3 { font-size: 1.02rem; font-family: var(--font-body); font-weight: 600; }
.stat-card p { color: var(--muted); font-size: 0.82rem; }

/* ==========================================================================
   HOME — showcase teaser rows
   ========================================================================== */

.teaser-rows { border-top: 1px solid var(--line); }
.teaser-row {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2.2rem 0.5rem;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  overflow: hidden;
  transition: padding-left 0.4s var(--ease-out);
}
.teaser-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(117, 151, 222, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.teaser-row:hover { padding-left: 1.4rem; }
.teaser-row:hover::before { opacity: 1; }
.teaser-row .teaser-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.4vw, 3rem);
  font-weight: 600;
  transition: color 0.3s ease;
}
.teaser-row:hover .teaser-title { color: var(--star); }
.teaser-row .teaser-meta {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.teaser-row .arrow {
  font-size: 1.1rem;
  color: var(--muted);
  transition: transform 0.35s var(--ease-out), color 0.3s ease;
}
.teaser-row:hover .arrow { transform: translateX(8px); color: var(--signal); }

/* ==========================================================================
   SERVICES INDEX — stacked mission panels
   ========================================================================== */

.stack { position: relative; }
.stack-panel {
  position: sticky;
  top: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-height) + 1rem) 0 2rem;
}
.stack-panel__inner {
  position: relative;
  width: 100%;
  padding: clamp(2rem, 5vw, 4rem);
  background: rgba(9, 11, 24, 0.9);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  overflow: hidden;
  will-change: transform;
}
.stack-panel__idx {
  position: absolute;
  right: clamp(1rem, 4vw, 3rem);
  bottom: -0.12em;
  font-family: var(--font-display);
  font-size: clamp(6rem, 16vw, 13rem);
  font-weight: 600;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(150, 170, 255, 0.14);
  pointer-events: none;
  user-select: none;
}
.stack-panel h2 { font-size: var(--fs-h2); margin-bottom: 1rem; max-width: 16ch; }
.stack-panel .stack-desc { color: var(--muted); max-width: 52ch; margin-bottom: 1.6rem; }
.stack-panel .stack-price {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: var(--track-mono);
  color: var(--signal);
  text-transform: uppercase;
  margin-bottom: 1.8rem;
}
.stack-panel .stack-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.8rem;
  max-width: 60ch;
}
.stack-panel .stack-features span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0.4rem 0.7rem;
}
.stack-panel .stack-icon {
  width: clamp(120px, 16vw, 200px);
  height: clamp(120px, 16vw, 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--star);
  font-size: clamp(2.4rem, 5vw, 4rem);
  background: radial-gradient(circle, rgba(117, 151, 222, 0.12), transparent 70%);
  box-shadow: 0 0 80px rgba(117, 151, 222, 0.12);
}

@media (max-width: 768px) {
  .stack-panel { position: static; min-height: 0; padding: 1rem 0; }
  .stack-panel__inner { grid-template-columns: 1fr; }
  .stack-panel .stack-icon { display: none; }
  .stack-panel__idx { font-size: 5rem; }
}

/* ==========================================================================
   SERVICE DETAIL
   ========================================================================== */

.detail-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }

.feature-list li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1rem 0.2rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.feature-list li i {
  color: var(--signal);
  font-size: 0.8rem;
  margin-top: 0.4rem;
}

.side-panel { padding: 1.8rem; position: sticky; top: calc(var(--nav-height) + 1.5rem); }
.side-panel .side-price {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--star);
  margin: 0.4rem 0 1.4rem;
}
.side-panel .btn { width: 100%; margin-bottom: 0.7rem; }

/* process steps — connected line */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
  margin-top: var(--space-4);
}
.process-steps::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 6%;
  width: 88%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), var(--line-strong), transparent);
}
.process-step { text-align: center; position: relative; }
.process-step .node {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--panel-solid);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--star);
}
.process-step h4 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.process-step p { color: var(--muted); font-size: 0.78rem; }
@media (max-width: 700px) {
  .process-steps { grid-template-columns: 1fr 1fr; }
  .process-steps::before { display: none; }
}

/* ==========================================================================
   ABOUT — mission log
   ========================================================================== */

.mission-statement {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.2vw, 2.3rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  max-width: 30ch;
  margin-inline: auto;
  text-align: center;
}

/* flight-path timeline */
.flightpath { position: relative; }
.flightpath__svg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: 60px;
  overflow: visible;
  pointer-events: none;
}
.flightpath__svg path {
  stroke: rgba(150, 170, 255, 0.4);
  stroke-width: 1.5;
  stroke-dasharray: 2 7;
  fill: none;
}
.log-entry {
  position: relative;
  width: calc(50% - 55px);
  margin-bottom: var(--space-5);
  padding: 1.8rem;
}
.log-entry:nth-child(odd) { margin-right: auto; text-align: right; }
.log-entry:nth-child(even) { margin-left: auto; }
.log-entry .log-stamp {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: var(--track-mono);
  color: var(--flare);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.7rem;
}
.log-entry h3 { font-size: 1.25rem; margin-bottom: 0.6rem; }
.log-entry p { color: var(--muted); font-size: var(--fs-small); }
/* flare beacon node on the path */
.log-entry::after {
  content: "";
  position: absolute;
  top: 2rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--flare);
  box-shadow: 0 0 16px var(--flare-glow), 0 0 4px var(--flare);
}
.log-entry:nth-child(odd)::after { right: -60px; }
.log-entry:nth-child(even)::after { left: -60px; }

@media (max-width: 820px) {
  .flightpath__svg { left: 12px; transform: none; }
  .log-entry,
  .log-entry:nth-child(odd) {
    width: calc(100% - 48px);
    margin-left: 48px;
    margin-right: 0;
    text-align: left;
  }
  .log-entry:nth-child(odd)::after { right: auto; left: -41px; }
  .log-entry:nth-child(even)::after { left: -41px; }
}

/* leadership */
.leader-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 900px) { .leader-grid { grid-template-columns: 1fr; } }
.leader-card { padding: 2.4rem; text-align: center; }
.leader-card img {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.4rem;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 40px rgba(117, 151, 222, 0.2);
}
.leader-card h3 { font-size: 1.5rem; }
.leader-card .leader-role {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--signal);
  margin: 0.6rem 0 1.4rem;
}
.leader-card p { color: var(--muted); font-size: var(--fs-small); text-align: left; margin-bottom: 0.9rem; }
.leader-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 1.4rem; }
.leader-tags span {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--star);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0.4rem 0.7rem;
}
.research-card { padding: 1.4rem 1.6rem; margin-bottom: 1rem; display: flex; gap: 1rem; align-items: flex-start; }
.research-card i { color: var(--star); margin-top: 0.3rem; }
.research-card h4 { font-size: 1rem; margin-bottom: 0.3rem; }
.research-card p { color: var(--muted); font-size: 0.82rem; }

/* commendations marquee */
.comm-lane {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  margin-bottom: 1rem;
}
.comm-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: comm-left 34s linear infinite;
}
.comm-track.reverse { animation-name: comm-right; }
.comm-track.fast { animation-duration: 26s; }
@keyframes comm-left { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 0.5rem)); } }
@keyframes comm-right { from { transform: translateX(calc(-50% - 0.5rem)); } to { transform: translateX(0); } }
.comm-card {
  width: 330px;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.2rem 1.3rem;
}
.comm-card i { color: var(--flare); margin-top: 0.25rem; }
.comm-card h5 { font-size: 0.92rem; margin-bottom: 0.25rem; }
.comm-card p {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 600px) {
  .comm-lane { mask-image: none; -webkit-mask-image: none; }
  .comm-card { width: 260px; }
}
html.no-motion .comm-track { animation: none; flex-wrap: wrap; width: auto; }

/* ==========================================================================
   SHOWCASE
   ========================================================================== */

.tab-bar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}
.tab-bar a {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0.7rem 1.3rem;
  transition: color var(--dur-fast), border-color var(--dur-fast), background-color var(--dur-fast);
}
.tab-bar a:hover { color: var(--text); border-color: var(--line-strong); }
.tab-bar a.is-active {
  color: var(--signal);
  border-color: rgba(111, 247, 227, 0.5);
  background: rgba(111, 247, 227, 0.05);
}

.dossier {
  padding: 1.8rem;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  overflow: hidden;
}
.dossier::before {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(168, 198, 255, 0.06), transparent);
  transform: skewX(-16deg);
  transition: left 0.7s var(--ease-out);
  pointer-events: none;
}
.dossier:hover::before { left: 160%; }
.dossier .dossier-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--muted);
}
.dossier .dossier-head .status { color: var(--signal); }
.dossier .dossier-head .status--dev { color: var(--star); }
.dossier .dossier-head .dossier-ext { color: var(--star); opacity: 0.7; }
.dossier h3 { font-size: 1.3rem; }
.dossier p { color: var(--muted); font-size: var(--fs-small); }
.dossier .tech-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.dossier .tech-chips span {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--star);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0.3rem 0.55rem;
}
.dossier .card-foot { margin-top: auto; }

/* project / research detail */
.detail-meta li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-small);
  color: var(--muted);
}
.detail-meta li strong {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--text);
}
.outcome-panel { border-left: 2px solid var(--signal); padding: 1.4rem 1.6rem; }
.outcome-panel p { color: var(--muted); }

/* ==========================================================================
   PRICING
   ========================================================================== */

.price-category { margin-bottom: var(--space-6); }
.price-cards { align-items: stretch; }
.price-card {
  position: relative;
  padding: 2.2rem 2rem;
  display: flex;
  flex-direction: column;
  transition: opacity 0.35s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.price-card .plan-badge {
  position: absolute;
  top: -11px;
  left: 2rem;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: #170700;
  background: var(--flare);
  border-radius: 3px;
  padding: 0.3rem 0.7rem;
}
.price-card h3 { font-size: 1.4rem; }
.price-card .plan-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--muted);
  margin: 0.5rem 0 1rem;
}
.price-card .plan-desc { color: var(--muted); font-size: var(--fs-small); margin-bottom: 1.6rem; }
.price-card .price-value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 600;
  color: var(--star);
  margin-bottom: 0.2rem;
}
.price-card .price-note {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.6rem;
}
.price-card .plan-features { margin-bottom: 2rem; }
.price-card .plan-features li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.45rem 0;
  color: var(--muted);
  font-size: var(--fs-small);
}
.price-card .plan-features li i { color: var(--signal); font-size: 0.7rem; margin-top: 0.42rem; }
.price-card .plan-cta { margin-top: auto; display: grid; gap: 0.7rem; }

/* recommended tier — rotating conic border */
.price-card.is-featured { background: rgba(13, 15, 30, 0.85); }
.price-card.is-featured::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--sweep, 0deg), transparent 0%, var(--flare) 12%, transparent 26%, transparent 55%, rgba(168, 198, 255, 0.7) 68%, transparent 82%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: sweep-rotate 5s linear infinite;
  pointer-events: none;
}
@property --sweep {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes sweep-rotate { to { --sweep: 360deg; } }
/* fallback for browsers without @property: static gradient border */
@supports not (background: conic-gradient(from 0deg, red, blue)) {
  .price-card.is-featured::before { background: linear-gradient(120deg, var(--flare), rgba(168, 198, 255, 0.6)); animation: none; }
}
html.no-motion .price-card.is-featured::before { animation: none; }

.addon-card { padding: 1.5rem; }
.addon-card h4 { font-size: 1rem; margin-bottom: 0.4rem; }
.addon-card p { color: var(--muted); font-size: 0.82rem; margin-bottom: 0.9rem; }
.addon-card .addon-price {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: var(--track-mono);
  color: var(--signal);
}

/* ==========================================================================
   CUSTOMIZE PLAN + QUOTE CONFIRMATION
   ========================================================================== */

.customize-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 900px) { .customize-grid { grid-template-columns: 1fr; } }

.feature-option {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: rgba(13, 15, 30, 0.4);
  transition: border-color var(--dur-fast), background-color var(--dur-fast);
  cursor: pointer;
}
.feature-option:hover { border-color: var(--line-strong); }
.feature-option.is-selected {
  border-color: rgba(111, 247, 227, 0.5);
  background: rgba(111, 247, 227, 0.04);
}
.feature-option .fo-name { font-weight: 600; display: flex; gap: 0.7rem; align-items: center; }
.feature-option .fo-desc { color: var(--muted); font-size: 0.82rem; margin-top: 0.35rem; }
.feature-option .fo-price {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--star);
  white-space: nowrap;
}

.summary-panel { padding: 1.8rem; position: sticky; top: calc(var(--nav-height) + 1.5rem); }
.summary-panel .sum-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  font-size: var(--fs-small);
  color: var(--muted);
}
.summary-panel .sum-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--line);
}
.summary-panel .sum-total strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--signal);
}

/* confirmation */
.confirm-hero { text-align: center; }
.confirm-check {
  width: 84px;
  height: 84px;
  margin: 0 auto 1.6rem;
}
.confirm-check circle {
  fill: none;
  stroke: rgba(111, 247, 227, 0.35);
  stroke-width: 1.5;
}
.confirm-check path {
  fill: none;
  stroke: var(--signal);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: check-draw 0.8s var(--ease-out) 0.4s forwards;
}
@keyframes check-draw { to { stroke-dashoffset: 0; } }
html.no-motion .confirm-check path { animation: none; stroke-dashoffset: 0; }

/* ==========================================================================
   CONTACT
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-form-panel { padding: clamp(1.6rem, 4vw, 2.6rem); }
.info-card {
  padding: 1.4rem 1.5rem;
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.info-card i {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  color: var(--star);
  font-size: 0.95rem;
}
.info-card h4 {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.info-card a, .info-card p { color: var(--text); font-size: var(--fs-small); overflow-wrap: anywhere; }
.info-card a:hover { color: var(--signal); }
.info-card .hours { color: var(--muted); font-size: 0.78rem; line-height: 1.9; }

.social-row {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.social-row a {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  color: var(--muted);
  font-size: 1.1rem;
  transition: color var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-fast), background-color var(--dur-fast);
}
.social-row a:hover {
  color: var(--signal);
  border-color: rgba(111, 247, 227, 0.5);
  box-shadow: 0 0 22px rgba(111, 247, 227, 0.14);
}

/* ==========================================================================
   LEGAL / DYNAMIC PAGES
   ========================================================================== */

.legal-wrap { max-width: 820px; margin-inline: auto; }

/* ==========================================================================
   LOGIN (standalone shell)
   ========================================================================== */

body.login-body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.2rem;
  background:
    radial-gradient(ellipse 50% 40% at 20% 15%, rgba(43, 16, 85, 0.5), transparent 70%),
    radial-gradient(ellipse 40% 34% at 85% 80%, rgba(117, 151, 222, 0.12), transparent 70%),
    var(--void);
}
.login-stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(232, 238, 255, 0.8) 50%, transparent 50%),
    radial-gradient(1px 1px at 32% 68%, rgba(168, 198, 255, 0.6) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 58% 14%, rgba(232, 238, 255, 0.7) 50%, transparent 50%),
    radial-gradient(1px 1px at 74% 42%, rgba(232, 238, 255, 0.5) 50%, transparent 50%),
    radial-gradient(1px 1px at 88% 76%, rgba(168, 198, 255, 0.7) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 44% 88%, rgba(232, 238, 255, 0.6) 50%, transparent 50%),
    radial-gradient(1px 1px at 6% 56%, rgba(232, 238, 255, 0.5) 50%, transparent 50%),
    radial-gradient(1px 1px at 66% 62%, rgba(168, 198, 255, 0.45) 50%, transparent 50%);
  animation: login-twinkle 5s ease-in-out infinite alternate;
}
@keyframes login-twinkle { from { opacity: 0.5; } to { opacity: 1; } }

.login-panel {
  position: relative;
  width: min(440px, 100%);
  padding: 2.6rem 2.2rem 2.2rem;
  z-index: 1;
}
.login-panel .login-head { text-align: center; margin-bottom: 2rem; }
.login-panel .login-head .login-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  color: var(--star);
  font-size: 1.15rem;
  box-shadow: 0 0 30px rgba(117, 151, 222, 0.15);
}
.login-panel h1 { font-size: 1.7rem; margin-bottom: 0.5rem; }
.login-panel .login-head p { color: var(--muted); font-size: var(--fs-small); }
.login-panel form { display: grid; gap: 1.3rem; }
.login-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.login-foot {
  margin-top: 1.8rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--muted);
}

/* ==========================================================================
   SERVICES — department grid (phase 5)
   ========================================================================== */

/* departments read as one continuous sector map — tighten the default
   .section rhythm so consecutive depts don't leave 300px+ starfield voids */
.svc-dept { padding: var(--space-4) 0; }
.svc-dept:first-of-type { padding-top: 0; }
.svc-dept .section-head { margin-bottom: 2rem; }
.svc-dept .section-head h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }

/* compact card: reuse .hud-card; keep content dense, no fixed heights */
.svc-card { text-decoration: none; color: inherit; }
.svc-card p { line-height: 1.55; }

/* feature chips (mirrors .stack-features spans, card-scale) */
.svc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.svc-chips span {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0.32rem 0.6rem;
}

/* pricing line */
.svc-price {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  color: var(--signal);
}

/* whole card is the link — drive the link-line hover from the card */
.svc-card:hover .link-line .arrow { transform: translateX(6px); }
.svc-card:hover .link-line::after { transform: scaleX(1); }

/* ==========================================================================
   LEADERSHIP XI — holographic tactics board (phase 7)
   ========================================================================== */

.squad-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 980px) { .squad-layout { grid-template-columns: 1fr; } }

/* ---- coach card (touchline) ---- */
.coach-card { padding: 1.8rem; position: sticky; top: calc(var(--nav-height) + 1.5rem); }
@media (max-width: 980px) { .coach-card { position: static; } }
.coach-card__head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.coach-card__head img,
.coach-card .squad-monogram {
  width: 76px; height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 26px rgba(117, 151, 222, 0.25);
  flex-shrink: 0;
}
.coach-tag {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: var(--track-mono);
  color: var(--flare);
}
.coach-card h3 { font-size: 1.3rem; margin: 0.2rem 0; }
.coach-role { color: var(--muted); font-size: 0.8rem; }
.coach-bio { color: var(--muted); font-size: 0.86rem; margin-bottom: 0.9rem; }
.coach-quote {
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--star);
  border-left: 2px solid var(--flare);
  padding-left: 0.9rem;
  margin-bottom: 1rem;
}

/* ---- pitch ---- */
.pitch-wrap { display: flex; justify-content: center; }
.pitch {
  position: relative;
  width: min(560px, 100%);
  aspect-ratio: 100 / 140;            /* portrait tactics board */
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 50% at 50% 0%, rgba(117, 151, 222, 0.10), transparent 70%),
    radial-gradient(ellipse 90% 50% at 50% 100%, rgba(43, 16, 85, 0.35), transparent 70%),
    linear-gradient(180deg, rgba(13, 15, 30, 0.85), rgba(6, 7, 16, 0.92));
  border: 1px solid var(--line-strong);
}
.theme-classic .pitch {
  background:
    repeating-linear-gradient(180deg, rgba(30, 90, 45, 0.9) 0 14.28%, rgba(24, 76, 38, 0.9) 14.28% 28.56%);
}
.pitch__lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.pitch__lines rect, .pitch__lines line, .pitch__lines circle {
  fill: none;
  stroke: rgba(150, 170, 255, 0.28);
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
}
.theme-classic .pitch__lines rect, .theme-classic .pitch__lines line, .theme-classic .pitch__lines circle {
  stroke: rgba(255, 255, 255, 0.55);
}
.pitch__lines .dot { fill: rgba(150, 170, 255, 0.5); }

/* stadium light sweep */
.pitch__lights { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pitch__lights span {
  position: absolute;
  top: -20%;
  width: 34%;
  height: 140%;
  background: linear-gradient(180deg, rgba(200, 220, 255, 0.10), transparent 75%);
  transform: skewX(-14deg) translateX(-140%);
  opacity: 0;
}
.pitch__lights span:nth-child(2) { width: 22%; }

/* connection lines between rows */
.pitch__links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pitch__links line { stroke: rgba(111, 247, 227, 0.35); stroke-width: 1; }

/* ---- players ---- */
.player {
  position: absolute;
  left: 0; top: 0;                     /* JS positions via --px/--py */
  transform: translate(-50%, -50%);
  width: 86px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
  cursor: default;
  z-index: 2;
}
.player__photo {
  position: relative;
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(168, 198, 255, 0.6);
  background: rgba(9, 11, 24, 0.9);
  box-shadow: 0 0 16px rgba(117, 151, 222, 0.25);
  transition: transform 0.28s var(--ease-out), box-shadow 0.28s ease, border-color 0.28s ease;
}
.player__photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.squad-monogram {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--star);
  background: radial-gradient(circle, rgba(117, 151, 222, 0.2), rgba(13, 15, 30, 0.7));
}
/* unfilled seat — reads as a vacancy, never as a person */
.squad-monogram--open {
  color: var(--muted);
  font-size: 1.4rem;
  background: radial-gradient(circle, rgba(138, 147, 184, 0.12), rgba(13, 15, 30, 0.6));
}
.player--open .player__photo {
  border-style: dashed;
  border-color: rgba(138, 147, 184, 0.45);
  opacity: 0.85;
}
.player--open .player__name {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
}
.player--open:hover .player__photo,
.player--open:focus-visible .player__photo {
  border-color: var(--signal);
  opacity: 1;
}
.player--open .player__card em { color: var(--signal); }

.player__num {
  position: absolute;
  bottom: -4px; right: -6px;
  min-width: 18px; height: 18px;
  padding: 0 3px;
  border-radius: 9px;
  background: var(--star);
  color: #050810;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.player__band {
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  background: var(--flare);
  color: #1a0800;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
}
/* inline variant — captain badge beside a name (coach card) */
.player__band--inline {
  position: static;
  transform: none;
  display: inline-block;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.player__name {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}
.player__meta {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

/* hover / focus: lift + glow + detail card */
.player:hover .player__photo,
.player:focus-visible .player__photo {
  transform: translateY(-5px) scale(1.08);
  border-color: var(--signal);
  box-shadow: 0 0 26px rgba(111, 247, 227, 0.5);
}
.player--flare:hover .player__photo, .player--flare:focus-visible .player__photo { border-color: var(--flare); box-shadow: 0 0 26px var(--flare-glow); }
.player--flare .player__num { background: var(--flare); }
.player--signal .player__num { background: var(--signal); }

.player__card {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 210px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: left;
  background: rgba(9, 11, 24, 0.96);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.25s var(--ease-out), visibility 0s linear 0.25s;
  z-index: 5;
  pointer-events: none;
}
.player:hover .player__card,
.player:focus-visible .player__card,
.player:focus-within .player__card {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.22s ease, transform 0.25s var(--ease-out);
  pointer-events: auto;
}
.player__card strong { font-size: 0.85rem; }
.player__card em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  color: var(--signal);
  text-transform: uppercase;
}
.player__card > span { font-size: 0.72rem; color: var(--muted); }
.player__contacts { display: flex; gap: 0.5rem; margin-top: 0.3rem; }
.player__contacts a {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  color: var(--muted);
  font-size: 0.68rem;
}
.player__contacts a:hover { color: var(--signal); border-color: rgba(111, 247, 227, 0.5); }

/* players near the top edge flip their card below */
.player.card-below .player__card { bottom: auto; top: calc(100% + 10px); }

@media (max-width: 560px) {
  .player { width: 68px; }
  .player__photo { width: 42px; height: 42px; }
  .player__name { font-size: 0.58rem; }
  .player__meta { display: none; }
  .player__card { width: 180px; }
}

html.no-motion .pitch__lights, html.perf-low .pitch__lights { display: none; }

/* ==========================================================================
   LEADERSHIP XI — ball passing + Pass & Score mini-game (phase 7b)
   ========================================================================== */

.pitch__ball {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #cfe4ff 55%, #8fb4ff);
  box-shadow: 0 0 10px rgba(200, 224, 255, 0.9), 0 0 22px rgba(111, 247, 227, 0.4);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 4;
  opacity: 0;
}

/* receiver flash when the ball arrives */
.player.got-ball .player__photo {
  border-color: var(--signal);
  box-shadow: 0 0 26px rgba(111, 247, 227, 0.65);
}

/* play button under the pitch */
.squad-play {
  display: flex;
  justify-content: center;
  margin-top: 1.2rem;
}

/* goal zone + keeper (game mode) */
.goal-zone {
  position: absolute;
  left: 24%;
  top: 0;
  width: 52%;
  height: 12%;
  z-index: 3;
  cursor: pointer;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, rgba(111, 247, 227, 0.12), transparent 80%);
  border-bottom: 1px dashed rgba(111, 247, 227, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.game-mode .goal-zone { opacity: 1; pointer-events: auto; }
.goal-zone::after {
  content: "SHOOT HERE";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.2em;
  color: rgba(111, 247, 227, 0.7);
}
.goal-zone.net-flash { animation: net-flash 0.5s ease; }
@keyframes net-flash {
  0% { background: rgba(111, 247, 227, 0.45); }
  100% { background: linear-gradient(180deg, rgba(111, 247, 227, 0.12), transparent 80%); }
}

.keeper {
  position: absolute;
  top: 4.5%;
  left: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid var(--flare);
  background: rgba(26, 8, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--flare);
  z-index: 4;
  pointer-events: none;
}
.game-mode .keeper { display: flex; }
.keeper.save-flash { animation: keeper-save 0.4s ease; }
@keyframes keeper-save {
  40% { transform: translate(-50%, -50%) scale(1.55); box-shadow: 0 0 24px var(--flare-glow); }
}

/* in-game HUD strip */
.squad-hud {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.55rem 0.9rem;
  background: linear-gradient(0deg, rgba(3, 3, 8, 0.9), transparent);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}
.game-mode .squad-hud { display: flex; }
.squad-hud b { color: var(--signal); font-weight: 500; }
.squad-hud .hud-exit {
  pointer-events: auto;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.25rem 0.55rem;
  font-size: 0.54rem;
  letter-spacing: 0.14em;
}
.squad-hud .hud-exit:hover { color: var(--flare); border-color: rgba(255, 122, 69, 0.5); }

/* result burst text */
.squad-result {
  position: absolute;
  left: 50%;
  top: 34%;
  transform: translate(-50%, -50%) scale(0.6);
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--signal);
  text-shadow: 0 0 30px rgba(111, 247, 227, 0.6);
  opacity: 0;
  pointer-events: none;
  z-index: 6;
}
.squad-result.is-save { color: var(--flare); text-shadow: 0 0 30px var(--flare-glow); }

/* game mode: players become targets, hover cards get out of the way */
.game-mode .player { cursor: pointer; }
.game-mode .player .player__card { display: none !important; }
.game-mode .player:hover .player__photo { border-color: var(--signal); }

html.no-motion .squad-play, html.no-motion .pitch__ball { display: none; }

/* ==========================================================================
   GAME HUB + PENALTY SHOOTOUT (phase 7c)
   ========================================================================== */

.game-hub__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 560px) { .game-hub__options { grid-template-columns: 1fr; } }
.game-hub__opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1.4rem 1.3rem;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.game-hub__opt:hover { border-color: rgba(111, 247, 227, 0.5); box-shadow: 0 0 26px rgba(111, 247, 227, 0.12); }
.game-hub__opt i { font-size: 1.5rem; color: var(--star); }
.game-hub__opt strong { font-family: var(--font-display); font-size: 1.15rem; }
.game-hub__opt span { font-size: 0.8rem; color: var(--muted); }
.game-hub__opt .opt-tag { font-size: 0.56rem; letter-spacing: 0.16em; color: var(--signal); margin-top: 0.3rem; }

/* ---- penalty: select screen ---- */
.pen-loading { text-align: center; padding: 4rem 1rem; color: var(--muted); letter-spacing: 0.18em; font-size: 0.7rem; }
.pen-select { padding: 3.6rem 1.4rem 1.6rem; height: 100%; overflow-y: auto; }
.pen-title { text-align: center; font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0.4rem 0 1.4rem; }
.pen-roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.8rem;
  max-width: 860px;
  margin: 0 auto;
}
.pen-pick {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem 0.7rem;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: border-color var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
}
.pen-pick:hover { transform: translateY(-3px); border-color: rgba(111, 247, 227, 0.5); box-shadow: 0 0 20px rgba(111, 247, 227, 0.12); }
.pen-pick__photo {
  position: relative;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(168, 198, 255, 0.55);
  display: flex; align-items: center; justify-content: center;
  background: rgba(9, 11, 24, 0.9);
  flex-shrink: 0;
}
.pen-pick__photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pen-pick strong { font-size: 0.78rem; line-height: 1.25; }
.pen-pick em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}
.pen-cap {
  position: absolute;
  top: 8px; right: 8px;
  font-family: var(--font-mono);
  font-size: 0.44rem;
  letter-spacing: 0.12em;
  color: #1a0800;
  background: var(--flare);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ---- penalty: the scene ---- */
.pen-body { position: absolute; inset: 0; }
.pen-scene { position: absolute; inset: 0; overflow: hidden; }
.pen-sky {
  position: absolute; inset: 0 0 32% 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(117, 151, 222, 0.14), transparent 75%),
    linear-gradient(180deg, #04040c, #0a0d1e);
}
.pen-turf {
  position: absolute; inset: 68% 0 0 0;
  background:
    repeating-linear-gradient(180deg, rgba(111, 247, 227, 0.05) 0 12px, transparent 12px 26px),
    linear-gradient(180deg, rgba(13, 15, 30, 0.9), rgba(6, 7, 16, 0.95));
  border-top: 1px solid rgba(150, 170, 255, 0.25);
}
.pen-goalframe {
  position: absolute;
  left: 50%;
  top: 16%;
  transform: translateX(-50%);
  width: min(66%, 560px);
  aspect-ratio: 3 / 1.15;
  border: 3px solid rgba(232, 238, 255, 0.9);
  border-bottom: none;
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 30px rgba(117, 151, 222, 0.2);
}
.pen-net {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(168, 198, 255, 0.12) 0 1px, transparent 1px 9%),
    repeating-linear-gradient(0deg, rgba(168, 198, 255, 0.12) 0 1px, transparent 1px 18%);
  transition: transform 0.2s ease;
}
.pen-net.ripple { animation: net-ripple 0.5s ease; }
@keyframes net-ripple {
  30% { transform: scale(1.02) translateY(2px); filter: brightness(1.6); }
}
.pen-zones { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr; z-index: 3; }
.pen-zone {
  border: 1px dashed transparent;
  cursor: crosshair;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.pen-zone:hover, .pen-zone:focus-visible {
  background: rgba(111, 247, 227, 0.10);
  border-color: rgba(111, 247, 227, 0.45);
  outline: none;
}
.pen-keeper {
  position: absolute;
  left: 50%; top: 58%;
  transform: translate(-50%, -50%);
  z-index: 2;
  transition: none;
}
.pen-keeper__body {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 54px;
  border-radius: 14px 14px 8px 8px;
  border: 2px solid var(--flare);
  background: rgba(26, 8, 0, 0.85);
  color: var(--flare);
  font-family: var(--font-mono);
  font-weight: 700;
  box-shadow: 0 0 18px rgba(255, 122, 69, 0.35);
}
.pen-ball {
  position: absolute;
  left: 50%; top: 78%;
  width: 22px; height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #cfe4ff 55%, #8fb4ff);
  box-shadow: 0 0 14px rgba(200, 224, 255, 0.9), 0 6px 14px rgba(0, 0, 0, 0.5);
  z-index: 4;
}
.pen-result {
  position: absolute;
  left: 50%; top: 42%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--signal);
  text-shadow: 0 0 34px rgba(111, 247, 227, 0.6);
  opacity: 0;
  pointer-events: none;
  z-index: 6;
}
.pen-result.is-save { color: var(--flare); text-shadow: 0 0 34px var(--flare-glow); }
.pen-striker {
  position: absolute;
  left: 1rem; bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.9rem;
  z-index: 5;
}
.pen-striker strong { display: block; font-size: 0.8rem; }
.pen-striker em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}
.pen-striker .pen-pick__photo { width: 40px; height: 40px; }
.pen-hint {
  position: absolute;
  left: 50%; bottom: 1.2rem;
  transform: translateX(-50%);
  font-size: 0.54rem;
  letter-spacing: 0.16em;
  color: rgba(138, 147, 184, 0.6);
  z-index: 5;
  white-space: nowrap;
}
.pen-dots { letter-spacing: 3px; color: var(--signal); }
@media (max-width: 600px) {
  .pen-goalframe { width: 88%; top: 20%; }
  .pen-striker { left: 0.6rem; bottom: 3rem; padding: 0.45rem 0.7rem; }
  .pen-hint { bottom: 0.8rem; width: 92%; white-space: normal; text-align: center; }
}

/* penalty face-off header + MISTEY keeper variant (phase 7c.1) */
.pen-faceoff {
  position: absolute;
  top: 3.4rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  z-index: 5;
  white-space: nowrap;
}
.pen-faceoff .fo-name { color: var(--text); }
.pen-faceoff .fo-name--keeper { color: var(--flare); }
.pen-faceoff .fo-name--mistey { color: var(--signal); text-shadow: 0 0 12px var(--signal-glow); }
.pen-faceoff .fo-vs {
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.15rem 0.4rem;
  font-size: 0.52rem;
}
.pen-keeper--mistey .pen-keeper__body {
  border-color: var(--signal);
  color: var(--signal);
  box-shadow: 0 0 22px rgba(111, 247, 227, 0.45);
  animation: holo-pulse 2.2s ease-in-out infinite;
}
@media (max-width: 600px) {
  .pen-faceoff { font-size: 0.5rem; gap: 0.5rem; top: 4.2rem; max-width: 94%; white-space: normal; justify-content: center; text-align: center; }
}

/* ============================================================
   FLIGHT SIM — MISTEY pilot (phase 8)
   MISTEY avatar in the flight sim: start-panel hero, game-over
   cameo, and 24px HUD pilot chip.
   ============================================================ */
.fs-mistey {
  width: clamp(90px, 14vw, 140px);
  height: auto;
  filter: drop-shadow(0 0 18px rgba(111, 247, 227, 0.45));
  margin-bottom: 0.4rem;
}
.fs-mistey--over {
  width: 80px;
}
.fs-mistey-chip {
  width: 24px;
  height: auto;
  vertical-align: middle;
  margin-right: 0.35rem;
  display: inline-block;
}

/* ==========================================================================
   PENALTY — MISTEY keeper sprite (append-only block; owns .pen-keeper__img)
   The keeper wrapper (.pen-keeper) is still the dive-tween target; the img
   inside only receives transform-only reaction tweens from penalty.js.
   The legacy .pen-keeper__body box rules remain above as a text fallback,
   but the runtime markup now renders this image instead of the span.
   ========================================================================== */
.pen-keeper__img {
  display: block;
  width: 90px;
  height: auto;
  filter: drop-shadow(0 0 16px rgba(111, 247, 227, 0.5));
  pointer-events: none;
  will-change: transform;
}
@media (max-width: 600px) {
  .pen-keeper__img { width: 68px; }
}

/* ==========================================================================
   MOBILE UI/UX PASS — page sections (append-only overrides)
   Everything below is additive. No rule above this header was changed.
   Motion stays transform/opacity only; html.no-motion + html.perf-low
   guardrails are re-asserted at the bottom of this block.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DEAD SCROLL TRAP (all widths) — the low-power / no-WebGL static hero.
   `.hero--static { height: auto }` (above) and `.hero { height: 200vh }` in the
   768px block are both (0,1,0); the media rule comes later so 200vh won,
   leaving ~840px of empty black under a hero whose canvas is display:none.
   Raising specificity to (0,2,0) makes the static hero collapse again.
   -------------------------------------------------------------------------- */
.hero.hero--static { height: auto; }

/* --------------------------------------------------------------------------
   2. SQUAD PITCH (all widths) — leadership.js appends `.squad-play` into
   `.pitch-wrap`, which is `display:flex` (row). The play button therefore
   parks *beside* the pitch instead of under it: at 390px it stole 124px and
   crushed the pitch to 226px (players overlapping, "SEAT OPESEAT OPEN"); at
   1440px it rendered as a 191x765 column. Stacking the wrap restores the
   authored "play button under the pitch" intent at every width.
   -------------------------------------------------------------------------- */
.pitch-wrap { flex-direction: column; align-items: center; }
.squad-play { width: 100%; }

/* --------------------------------------------------------------------------
   3. TABLET / SMALL-LAPTOP
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  /* -- hero: readability over the WebGL accretion disc ---------------------
     Sampled disc pixels behind the copy run to rgb(253,188,102); the existing
     shadows are all *light* glows, which lower contrast over bright amber.
     A radial scrim rides behind .hero__content (z-index:-1 inside the content's
     own stacking context, so it sits over the canvas but under the copy and
     under the existing breathing glow). Static paint only — no animation. */
  .hero:not(.hero--static) .hero__content::before {
    content: "";
    position: absolute;
    inset: -6% -24%;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse 72% 66% at 50% 46%,
      rgba(2, 3, 8, 0.74),
      rgba(2, 3, 8, 0.68) 52%,
      rgba(2, 3, 8, 0.46) 76%,
      rgba(2, 3, 8, 0.16) 92%,
      rgba(2, 3, 8, 0) 100%);
  }
  /* dark shadow first so glyph edges hold even where the scrim thins out */
  .hero__title {
    text-shadow:
      0 1px 2px rgba(0, 0, 0, 0.95),
      0 2px 16px rgba(0, 0, 0, 0.85),
      0 0 30px rgba(2, 3, 8, 0.9),
      0 0 20px rgba(168, 198, 255, 0.28);
  }
  .hero__title .accent {
    color: #cfe0ff;
    text-shadow:
      0 1px 2px rgba(0, 0, 0, 0.95),
      0 2px 16px rgba(0, 0, 0, 0.85),
      0 0 30px rgba(2, 3, 8, 0.9),
      0 0 24px rgba(168, 198, 255, 0.34);
  }
  .hero__sub {
    color: var(--text);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.92), 0 0 18px rgba(2, 3, 8, 0.85);
  }
  /* corner telemetry was 3.00:1 — lift to ~4.6:1 */
  .hero__telemetry { color: rgba(160, 170, 205, 0.82); }
  /* "SCROLL TO ENGAGE" sat under the WhatsApp FAB and read "SCROLL TO EN".
     Re-anchor to bottom-centre, which is clear of both floating buttons. */
  .tele--br {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    bottom: 1rem;
  }

  /* -- home teaser rows: meta + arrow were clipped off-screen -------------- */
  .teaser-row {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1rem;
    padding: 1.7rem 0.25rem;
  }
  .teaser-row .teaser-title { flex: 1 1 100%; }
  .teaser-row .teaser-meta { white-space: normal; flex: 1 1 auto; }
  .teaser-row .arrow { flex: 0 0 auto; }

  /* -- services rail cards: meta was 2.68:1 ------------------------------- */
  .station .station__meta { color: var(--muted); }
}

/* --------------------------------------------------------------------------
   4. PHONE
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  /* hero CTA stacked as three ragged, differently sized pills — unify */
  .hero__cta {
    width: 100%;
    max-width: 21rem;
    margin-inline: auto;
    margin-top: 1.8rem;
    gap: 0.7rem;
  }
  .hero__cta .btn { width: 100%; }

  /* contact channel links were 17px tall — the worst tap targets on the site */
  .info-card a {
    display: flex;
    align-items: center;
    min-height: 44px;
  }

  /* pricing / services vertical rhythm — the plan stack ran ~12000px tall */
  .price-card { padding: 1.8rem 1.3rem; }
  .price-card .plan-features { margin-bottom: 1.4rem; }
  .addon-card { padding: 1.2rem; }
  .svc-dept { padding: var(--space-3) 0; }
  .svc-card p { font-size: var(--fs-small); }

  /* penalty hint was 3.00:1 */
  .pen-hint { color: rgba(160, 170, 205, 0.82); }
}

/* --------------------------------------------------------------------------
   5. NARROW PHONE (360 / 390 / 414) — squad pitch breathing room.
   Even with the wrap stacked, 11 players at 68px on a 100/140 board collide.
   A taller board spreads the rows; the players keep a >=44px hit box.
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .pitch { aspect-ratio: 100 / 168; }
  .player { width: 62px; }
  .player__photo { width: 40px; height: 40px; }
  .player__name { font-size: 0.56rem; line-height: 1.2; }
  /* the detail card is centred on its player and the board clips at 350px,
     so keep it narrow enough that edge players stay mostly on-board */
  .player__card { width: min(176px, 48vw); padding: 0.7rem 0.8rem; }
  .player__card strong { font-size: 0.8rem; }
  /* contact icons inside the detail card were 26x26 — below the 44px minimum */
  .player__contacts { gap: 0.4rem; }
  .player__contacts a { width: 44px; height: 44px; font-size: 0.8rem; }
  .coach-card { padding: 1.4rem; }
  /* belt and braces: never let a tooltip create a horizontal page scroll */
  #squad { overflow-x: clip; }
}

/* --------------------------------------------------------------------------
   6. GUARDRAILS — keep the reduced-motion / degraded-perf paths intact.
   -------------------------------------------------------------------------- */
html.no-motion .hero,
html.perf-low .hero.hero--static { height: auto; }
html.no-motion .hero:not(.hero--static) .hero__content::before,
html.perf-low .hero:not(.hero--static) .hero__content::before { animation: none; }

/* ---- awards marquee: the track duplicates its cards for a seamless loop.
   Under no-motion the animation stops and flex-wrap makes the duplicates
   visible, so every award appeared twice. The clones already carry
   aria-hidden (see about.html), so key off that. ---- */
html.no-motion .comm-card[aria-hidden="true"] { display: none; }
/* award titles moved h5 -> h3 for correct heading order; keep the visual size */
.comm-card .comm-card__title { font-size: 0.92rem; margin-bottom: 0.25rem; }
