/* ==========================================================================
   Northstar Alliance Enterprise: main stylesheet
   Color system: pure black, chrome/silver, ONE accent (ice blue).
   No gold, no navy, no warm tones. Surfaces are neutral greys only.
   ========================================================================== */

/* ---------- Fonts (self-hosted variable, latin subset) ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Base */
  --bg: #000000;
  --surface-1: #08090a;          /* neutral near-black */
  --surface-2: #0e0f11;
  --line: rgba(222, 228, 236, 0.10);
  --line-strong: rgba(222, 228, 236, 0.20);

  /* Text (all AA+ on black) */
  --ink: #f3f5f7;                /* 19:1 */
  --ink-2: #b9bfc7;              /* 11:1 */
  --ink-3: #8b929b;              /* 6.4:1 */

  /* Chrome */
  --chrome-hi: #ffffff;
  --chrome-1: #e4e8ec;
  --chrome-2: #b4bac2;
  --chrome-3: #7d848d;
  --chrome-text: linear-gradient(180deg, #ffffff 0%, #e8ebef 40%, #a3aab3 58%, #eef1f4 78%, #c3c9d0 100%);
  --chrome-fill: linear-gradient(180deg, #fbfcfd 0%, #dfe3e8 45%, #b6bcc4 55%, #e9ecef 100%);

  /* The single accent: ice blue (the glow at the star's core) */
  --ice: #8fdcff;
  --ice-hi: #c9f1ff;
  --ice-core: #effbff;
  --ice-a10: rgba(143, 220, 255, 0.10);
  --ice-a20: rgba(143, 220, 255, 0.20);
  --ice-a35: rgba(143, 220, 255, 0.35);
  --ice-a60: rgba(143, 220, 255, 0.60);

  /* Type */
  --font-head: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 72px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.5s;
}

/* Cross-document page transitions (e.g. 404 -> home) in supporting browsers */
@view-transition { navigation: auto; }

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  background: var(--bg);
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.08; letter-spacing: -0.025em; margin: 0; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
[role="list"] { list-style: none; }
[hidden] { display: none !important; }
::selection { background: var(--ice); color: #000; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* Focus: always visible, always ice */
:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: #000; font-weight: 600;
  transform: translateY(-160%); transition: transform 0.2s var(--ease-out);
}
.skip-link:focus { transform: none; }

/* ---------- Typography helpers ---------- */
.chrome-text {
  background: var(--chrome-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
/* High-contrast mode: drop the gradient text */
@media (forced-colors: active) {
  .chrome-text { -webkit-text-fill-color: currentColor; color: CanvasText; background: none; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 18px;
  font-family: var(--font-head);
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-2);
}
.eyebrow__star { width: 14px; height: 14px; filter: drop-shadow(0 0 6px var(--ice-a60)); }
.eyebrow__num {
  color: var(--ice);
  font-variant-numeric: tabular-nums;
  padding-right: 12px; margin-right: 2px;
  border-right: 1px solid var(--line-strong);
}

.section-title {
  font-size: clamp(2.1rem, 5.2vw, 4rem);
  color: var(--ink);
  max-width: 16ch;
  text-wrap: balance;
}
.section-intro { color: var(--ink-2); font-size: 1.125rem; max-width: 56ch; }
.lead { font-size: clamp(1.15rem, 1.8vw, 1.35rem); color: var(--ink); line-height: 1.55; }

/* Flag: any item that still needs real info. Easy to spot, easy to grep ("flag"). */
.flag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 1px 9px;
  border: 1px dashed var(--ice-a60);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.8em; font-weight: 500; letter-spacing: 0;
  color: var(--ice-hi);
  background: var(--ice-a10);
  -webkit-text-fill-color: var(--ice-hi);
  white-space: nowrap;
  vertical-align: middle;
}
.flag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ice); }
.flag--soft { border-color: var(--line-strong); color: var(--ink-3); -webkit-text-fill-color: var(--ink-3); background: transparent; }
.flag--soft::before { background: var(--ink-3); }

/* ---------- Buttons ---------- */
.btn {
  --lift: 0px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  border: 1px solid transparent; border-radius: 999px;
  font-family: var(--font-head); font-size: 0.98rem; font-weight: 600; letter-spacing: 0.01em;
  cursor: pointer; isolation: isolate; overflow: hidden;
  transform: translateY(var(--lift));
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s, background-color 0.35s, color 0.35s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 0.88rem; }
.btn--lg { min-height: 56px; padding: 0 30px; font-size: 1.02rem; }
.btn--block { width: 100%; }
.btn__icon { width: 18px; height: 18px; transition: transform 0.35s var(--ease-out); }

.btn--chrome {
  color: #000;
  background: var(--chrome-fill);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), inset 0 -1px 0 rgba(0,0,0,0.25), 0 1px 0 rgba(255,255,255,0.06);
}
/* Shimmer sweep */
.btn--chrome::after {
  content: ""; position: absolute; inset: -2px; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.95) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--ease-out);
}
.btn--ghost {
  color: var(--ink);
  background: rgba(255,255,255,0.02);
  border-color: var(--line-strong);
}
@media (hover: hover) {
  .btn:hover { --lift: -2px; }
  .btn--chrome:hover { box-shadow: inset 0 1px 0 #fff, 0 10px 30px -8px var(--ice-a60), 0 0 0 1px var(--ice-a35); }
  .btn--chrome:hover::after { transform: translateX(120%); }
  .btn--ghost:hover { border-color: var(--ice-a60); box-shadow: 0 0 24px -6px var(--ice-a60), inset 0 0 16px -8px var(--ice-a60); color: #fff; }
  .btn:hover .btn__icon { transform: translateX(3px); }
}
.btn:active { --lift: 0px; transition-duration: 0.1s; }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: auto; padding-top: 12px;
  font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
  color: var(--ice);
}
.text-link svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease-out); }
.text-link:hover svg { transform: translateX(4px); }

.pill {
  display: inline-flex; align-items: center;
  padding: 4px 12px; border-radius: 999px;
  font-family: var(--font-head); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  border: 1px solid var(--line-strong); color: var(--ink-2);
}
.pill--ice { color: #000; background: var(--ice); border-color: var(--ice); box-shadow: 0 0 18px -2px var(--ice-a60); }

/* ---------- Cards (solid near-black, chrome hairline. Deliberately not glassmorphism) ---------- */
.card {
  --mx: 50%; --my: 0%;
  position: relative;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--radius);
  background:
    radial-gradient(600px circle at var(--mx) var(--my), rgba(143,220,255,0.06), transparent 40%),
    linear-gradient(180deg, var(--surface-2), var(--surface-1));
  border: 1px solid var(--line);
  transition: transform 0.5s var(--ease-out), border-color 0.4s, box-shadow 0.5s var(--ease-out);
}
/* chrome top edge */
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0) 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
@media (hover: hover) {
  .card:hover {
    transform: translateY(-6px);
    border-color: var(--ice-a35);
    box-shadow: 0 30px 60px -30px rgba(143,220,255,0.35), 0 0 0 1px var(--ice-a10), 0 0 40px -12px var(--ice-a35);
  }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--header-h);
  transition: background-color 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(0,0,0,0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.site-header__inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.scroll-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none; }
.scroll-progress span {
  display: block; height: 100%; width: 100%;
  transform-origin: 0 50%; transform: scaleX(var(--progress, 0));
  background: linear-gradient(90deg, transparent, var(--ice) 60%, var(--ice-core));
  box-shadow: 0 0 10px var(--ice);
}

.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand__logo { height: 34px; width: auto; }
.brand__text { font-family: var(--font-head); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.04em; color: var(--ink); }
.brand--footer .brand__logo { height: 44px; }

.nav { margin-left: auto; }
.nav__list { display: flex; gap: 4px; list-style: none; }
.nav__link {
  position: relative; display: block;
  padding: 8px 12px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 500; color: var(--ink-2);
  transition: color 0.25s;
}
.nav__link::after {
  content: ""; position: absolute; left: 50%; bottom: 2px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--ice); box-shadow: 0 0 8px var(--ice);
  transform: translateX(-50%) scale(0); transition: transform 0.3s var(--ease-out);
}
.nav__link:hover, .nav__link.is-active { color: var(--ink); }
.nav__link.is-active::after { transform: translateX(-50%) scale(1); }
.site-header__actions { display: flex; align-items: center; gap: 12px; }

.menu-toggle {
  display: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: transparent; cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-toggle__bars, .menu-toggle__bars::before, .menu-toggle__bars::after {
  display: block; width: 18px; height: 1.5px; background: var(--ink); border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}
.menu-toggle__bars { position: relative; }
.menu-toggle__bars::before, .menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bars::before { top: -6px; }
.menu-toggle__bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0; z-index: 99;
  padding: 24px var(--gutter) 40px;
  background: #000;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 32px;
  overflow-y: auto;
  animation: menu-in 0.35s var(--ease-out);
}
.mobile-menu ul { list-style: none; }
.mobile-menu li a {
  display: block; padding: 14px 0;
  font-family: var(--font-head); font-size: 1.6rem; font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.mobile-menu__ctas { display: grid; gap: 12px; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }

@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .site-header__actions { margin-left: auto; }
}
@media (max-width: 520px) {
  .site-header__actions .btn { display: none; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  --R: min(25vh, 40vw, 300px);         /* compass-star radius: shared by the SVG fallback and the 3D scene */
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 24px) 0 96px;
  overflow: hidden;
  isolation: isolate;
}
.hero__canvas {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  opacity: 0; transition: opacity 1.2s var(--ease-out);
  pointer-events: none;
}
.hero__canvas.is-ready { opacity: 1; }
.hero__vignette {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 38%, transparent 55%, rgba(0,0,0,0.85) 100%),
    linear-gradient(180deg, transparent 75%, #000 100%);
}
.hero__inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero__eyebrow { margin-bottom: 8px; }

/* Brand block: star + logo stand on the "floor" (the bottom edge of .hero__brand) */
.hero__brand {
  position: relative;
  width: 100%;
  height: calc(var(--R) * 2);
  display: flex; align-items: flex-end; justify-content: center;
}
.hero__logo { position: relative; z-index: 2; margin: 0; font-size: 1rem; }

.logo-frame { position: relative; display: block; width: min(560px, 80vw); }
.logo-frame__img { width: 100%; max-height: calc(var(--R) * 1.15); object-fit: contain; object-position: bottom; }
.logo-frame__glint {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  /* the glint sweeps only across the logo's own pixels */
  -webkit-mask: url("../Northstar_Logo_Light_Transparent.png") center bottom / contain no-repeat;
  mask: url("../Northstar_Logo_Light_Transparent.png") center bottom / contain no-repeat;
  background: linear-gradient(105deg, transparent 40%, rgba(230,248,255,0.95) 50%, transparent 60%) 0 0 / 300% 100% no-repeat;
}
.logo-frame.is-loaded .logo-frame__glint { opacity: 1; animation: logo-glint 7s 2.2s var(--ease-in-out) infinite; }
@keyframes logo-glint {
  0% { background-position: 100% 0; }
  22%, 100% { background-position: 0% 0; }
}

/* Logo placeholder: shown ONLY when the logo file is missing. Clearly marked; not a logo. */
.logo-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 26px 24px;
  border: 1.5px dashed var(--ice-a60);
  border-radius: var(--radius);
  background: rgba(0,0,0,0.72);
}
.logo-placeholder__tag {
  font-family: var(--font-body); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: #000; background: var(--ice); padding: 3px 10px; border-radius: 999px;
}
.logo-placeholder__name {
  font-family: var(--font-head); font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  font-size: clamp(1.1rem, 3vw, 1.7rem); color: var(--ink);
}
.logo-placeholder__file { font-size: 0.72rem; color: var(--ink-3); word-break: break-all; }
.logo-frame.is-missing .logo-frame__img, .logo-frame.is-missing .logo-frame__glint { display: none; }

/* Reflective floor: sheen line + reflected logo */
.hero__floor {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 1;
  height: calc(var(--R) * 0.9);
  display: flex; justify-content: center;
  pointer-events: none;
}
.hero__floor::before { /* the horizon line */
  content: ""; position: absolute; top: 0; left: 50%;
  width: min(900px, 96vw); height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(220,228,236,0.25) 20%, var(--ice-hi) 50%, rgba(220,228,236,0.25) 80%, transparent);
  box-shadow: 0 0 18px 1px var(--ice-a35);
}
.hero__floor::after { /* floor sheen */
  content: ""; position: absolute; top: 0; left: 50%;
  width: min(1000px, 110vw); height: 100%;
  transform: translateX(-50%);
  background: radial-gradient(50% 60% at 50% 0%, rgba(143,220,255,0.10), rgba(200,210,220,0.03) 50%, transparent 75%);
}
.logo-reflection {
  width: min(560px, 80vw);
  max-height: calc(var(--R) * 1.15);
  object-fit: contain; object-position: bottom;
  transform: scaleY(-1);
  margin-top: 2px;
  opacity: 0.55;
  filter: blur(1.2px);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.1) 35%, transparent 60%);
  mask-image: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.1) 35%, transparent 60%);
}
.logo-reflection.is-missing { display: none; }

/* ---------- Layered SVG compass-star (fallback + anchor) ---------- */
.hero-star {
  --px: 0; --py: 0;  /* pointer parallax, set from JS (-1..1) */
  position: absolute; z-index: 0;
  left: 50%; bottom: 0;
  width: calc(var(--R) * 2); height: calc(var(--R) * 2);
  transform: translateX(-50%);
  pointer-events: none;
}
.hero-star > * { position: absolute; inset: 0; margin: auto; will-change: transform; }
.hero-star__halo {
  inset: -30%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(143,220,255,0.22), rgba(143,220,255,0.06) 45%, transparent 70%);
  transform: translate3d(calc(var(--px) * -6px), calc(var(--py) * -6px), 0);
}
.hero-star__ring {
  width: 100%; height: 100%; color: rgba(220,228,236,0.18);
  transform: translate3d(calc(var(--px) * -10px), calc(var(--py) * -10px), 0);
  animation: spin 120s linear infinite;
}
.hero-star__back {
  width: 74%; height: 74%; opacity: 0.38;
  transform: translate3d(calc(var(--px) * -14px), calc(var(--py) * -14px), 0) rotate(22.5deg);
  filter: blur(0.5px);
}
.hero-star__main {
  width: 100%; height: 100%;
  transform: translate3d(calc(var(--px) * 12px), calc(var(--py) * 12px), 0);
  filter: drop-shadow(0 0 30px rgba(143,220,255,0.18));
}
.hero-star__core {
  width: 9%; height: 9%; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--ice-hi) 30%, rgba(143,220,255,0.5) 55%, transparent 72%);
  box-shadow: 0 0 40px 10px rgba(143,220,255,0.35);
  transform: translate3d(calc(var(--px) * 12px), calc(var(--py) * 12px), 0);
  animation: core-pulse 4.5s ease-in-out infinite;
}
.hero-star__flare { /* four-point lens glint */
  width: 70%; height: 70%;
  background:
    linear-gradient(90deg, transparent, rgba(220,245,255,0.75), transparent) center / 100% 1px no-repeat,
    linear-gradient(0deg, transparent, rgba(220,245,255,0.75), transparent) center / 1px 100% no-repeat;
  transform: translate3d(calc(var(--px) * 12px), calc(var(--py) * 12px), 0);
  animation: flare 6s ease-in-out infinite;
  mix-blend-mode: screen;
}
.hero-star__beam { /* the slow rotating glint */
  width: 140%; height: 140%; inset: -20%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(201,241,255,0.12) 8deg, transparent 18deg, transparent 180deg, rgba(201,241,255,0.07) 188deg, transparent 198deg);
  -webkit-mask: radial-gradient(closest-side, #000 30%, transparent 75%);
  mask: radial-gradient(closest-side, #000 30%, transparent 75%);
  animation: spin 16s linear infinite;
}
.hero-star__mirror {
  width: 100%; height: 100%;
  inset: auto 0 auto 0; top: 100%;
  transform: scaleY(-1) translate3d(calc(var(--px) * 12px), 0, 0);
  opacity: 0.22;
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 45%);
  mask-image: linear-gradient(to top, #000 0%, transparent 45%);
  filter: blur(1.5px);
}
@keyframes spin { to { rotate: 360deg; } }
@keyframes core-pulse { 0%, 100% { opacity: 0.85; scale: 1; } 50% { opacity: 1; scale: 1.12; } }
@keyframes flare { 0%, 70%, 100% { opacity: 0; scale: 0.6; } 82% { opacity: 1; scale: 1; } }

/* When the 3D scene takes over, the SVG star steps back (it stays as the layout anchor) */
.webgl-hero .hero-star > *:not(.hero-star__halo) { opacity: 0; transition: opacity 0.8s; }
.webgl-hero .hero-star .hero-star__halo { opacity: 0.6; }

/* ---------- Hero quote + CTAs ---------- */
.hero__quote { margin: calc(var(--R) * 0.32 + 8px) 0 0; max-width: 820px; }
.hero__quote blockquote { margin: 0; }
.hero__quote p {
  margin: 0;
  font-family: var(--font-head); font-weight: 500;
  font-size: clamp(1.35rem, 3vw, 2.15rem);
  line-height: 1.2; letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
.hero__quote figcaption {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 18px;
  font-size: 0.9rem; color: var(--ink-2);
}
.hero__quote figcaption::before { content: ""; width: 28px; height: 1px; background: var(--ice); box-shadow: 0 0 8px var(--ice); }
.hero__quote-name { color: var(--ink); font-weight: 600; }
.hero__quote-role { color: var(--ink-3); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 32px; }

.hero__scroll {
  position: absolute; z-index: 2; bottom: 24px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 52px; display: flex; justify-content: center;
}
.hero__scroll-line {
  width: 1px; height: 100%;
  background: linear-gradient(180deg, transparent, var(--chrome-2));
  position: relative; overflow: hidden;
}
.hero__scroll-line::after {
  content: ""; position: absolute; left: -1px; width: 3px; height: 14px; top: -14px; border-radius: 2px;
  background: var(--ice); box-shadow: 0 0 10px var(--ice);
  animation: scroll-cue 2.2s var(--ease-in-out) infinite;
}
@keyframes scroll-cue { to { top: 100%; } }

/* ---------- Hero ignition sequence (CSS side) ---------- */
.js .hero__eyebrow, .js .hero__quote, .js .hero__ctas, .js .hero__scroll { animation: rise 1s var(--ease-out) both; }
.js .hero__eyebrow { animation-delay: 0.2s; }
.js .hero__quote { animation-delay: 1.05s; }
.js .hero__ctas { animation-delay: 1.3s; }
.js .hero__scroll { animation-delay: 1.8s; }
.js .logo-frame { animation: ignite-logo 1.6s 0.35s var(--ease-out) both; }
.js .hero__floor::before { animation: floor-line 1.4s 0.5s var(--ease-out) both; }
.js .logo-reflection { animation: fade-reflection 1.6s 0.8s var(--ease-out) both; }
.js:not(.webgl-hero) .hero-star { animation: ignite-star 1.8s 0.1s var(--ease-out) both; }
.js:not(.webgl-hero) .hero-star__core { animation: core-ignite 1.6s 0.1s var(--ease-out) both, core-pulse 4.5s 1.8s ease-in-out infinite; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes ignite-logo {
  0% { opacity: 0; filter: brightness(0.1) blur(10px); transform: translateY(10px) scale(0.98); }
  60% { opacity: 1; filter: brightness(1.35) blur(0); }
  100% { opacity: 1; filter: none; transform: none; }
}
@keyframes floor-line { from { transform: translateX(-50%) scaleX(0); opacity: 0; } }
@keyframes fade-reflection { from { opacity: 0; } }
@keyframes ignite-star {
  0% { opacity: 0; transform: translateX(-50%) scale(0.82) rotate(-18deg); filter: brightness(0.2); }
  100% { opacity: 1; transform: translateX(-50%); filter: none; }
}
@keyframes core-ignite {
  0% { scale: 0; opacity: 0; }
  45% { scale: 2.6; opacity: 1; }
  100% { scale: 1; opacity: 0.9; }
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section { position: relative; padding: clamp(96px, 14vw, 160px) 0; }
.section-head { margin-bottom: clamp(40px, 6vw, 72px); }
.section-head--center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.section-head--center .section-title { margin-inline: auto; }
.section-head--center .section-intro { margin: 22px auto 0; }
.section-head--split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; }
.section-head--split .section-intro { margin: 0; }

/* Section transition: a star "ignites" on a hairline as each section arrives */
.divider {
  position: absolute; top: 0; left: 50%;
  width: min(var(--container), 100% - 2 * var(--gutter));
  height: 1px; transform: translateX(-50%);
  display: flex; justify-content: center; align-items: center;
}
.divider::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--line-strong) 30%, var(--ice-a35) 50%, var(--line-strong) 70%, transparent);
  transform: scaleX(0.2); opacity: 0.4;
  transition: transform 1.4s var(--ease-out), opacity 1.4s;
}
.divider svg {
  position: relative; width: 22px; height: 22px;
  transform: scale(0.4) rotate(-45deg); opacity: 0.3;
  transition: transform 1.2s var(--ease-out), opacity 0.8s, filter 1.2s;
}
.divider.is-visible::before { transform: none; opacity: 1; }
.divider.is-visible svg { transform: none; opacity: 1; filter: drop-shadow(0 0 10px var(--ice)); }

/* Scroll reveals */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  filter: blur(6px);
  transition:
    opacity 0.9s var(--ease-out) calc(var(--i, 0) * 90ms),
    transform 1s var(--ease-out) calc(var(--i, 0) * 90ms),
    filter 0.9s var(--ease-out) calc(var(--i, 0) * 90ms);
}
.js-ready [data-reveal].is-visible { opacity: 1; transform: none; filter: none; }
/* card hover lift must win over the reveal transform once visible */
@media (hover: hover) {
  .js-ready .card[data-reveal].is-visible:hover { transform: translateY(-6px); transition-delay: 0s; }
}

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.about__story p:not(.lead) { color: var(--ink-2); }
.facts {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  margin: 36px 0 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
  background: var(--line);
}
.facts__item { background: #000; padding: 18px 20px; }
.facts dt { font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.facts dd { margin: 0; font-family: var(--font-head); font-weight: 500; font-size: 1.05rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.card--feature { overflow: hidden; padding: clamp(28px, 4vw, 44px); }
.card__star {
  position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; opacity: 0.16;
  transition: transform 1.2s var(--ease-out), opacity 0.6s;
}
.card--feature:hover .card__star { transform: rotate(45deg); opacity: 0.3; }
.about__mission-text {
  position: relative;
  font-family: var(--font-head); font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 500; line-height: 1.25; letter-spacing: -0.02em;
  margin: 0;
}

.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: clamp(40px, 6vw, 72px); }
.value h3 { font-size: 1.2rem; margin: 18px 0 10px; }
.value p { color: var(--ink-2); font-size: 0.97rem; margin: 0; }
.value__num { font-family: var(--font-head); font-size: 0.85rem; letter-spacing: 0.1em; color: var(--ice); }

/* ---------- What we do (bento) ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bento__item { display: flex; flex-direction: column; min-height: 260px; }
.bento__item h3 { font-size: 1.35rem; margin: 22px 0 12px; }
.bento__item p { color: var(--ink-2); margin: 0; }
.bento__item--wide { grid-column: span 2; grid-row: span 2; justify-content: flex-end; min-height: 420px; padding-top: 104px; overflow: hidden; }
.bento__item--wide h3 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); max-width: 14ch; }
.bento__item--wide p { font-size: 1.08rem; max-width: 52ch; }
.bento__item--wide strong { color: var(--ink); }
.bento__item--span2 { grid-column: span 2; }
.bento__item--wide .pill { position: absolute; top: clamp(22px, 3vw, 32px); left: clamp(22px, 3vw, 32px); }
.bento__icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #16181b, #0a0b0c);
  border: 1px solid var(--line-strong);
  color: var(--chrome-1);
  transition: color 0.4s, box-shadow 0.4s, border-color 0.4s;
}
.bento__icon svg { width: 24px; height: 24px; }
.card:hover .bento__icon { color: var(--ice); border-color: var(--ice-a35); box-shadow: 0 0 20px -4px var(--ice-a60); }
.card--blitz__glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 70% at 85% 10%, rgba(143,220,255,0.14), transparent 60%),
    repeating-linear-gradient(115deg, transparent 0 38px, rgba(255,255,255,0.018) 38px 39px);
}
.card--blitz .bento__icon { position: absolute; top: clamp(22px, 3vw, 32px); right: clamp(22px, 3vw, 32px); }

.different {
  margin-top: clamp(48px, 7vw, 88px);
  display: grid; grid-template-columns: 1fr 2fr; gap: 32px;
  padding-top: 40px; border-top: 1px solid var(--line);
}
.different__title { font-size: clamp(1.5rem, 2.6vw, 2rem); max-width: 12ch; }
.different__list { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; }
.different__list li { display: flex; gap: 14px; color: var(--ink-2); }
.different__list svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 4px; filter: drop-shadow(0 0 6px var(--ice-a60)); }
.different__list strong { color: var(--ink); font-weight: 600; }
.wwd__door {
  margin: clamp(40px, 6vw, 64px) 0 0;
  padding: 18px 22px;
  border-left: 2px solid var(--ice);
  color: var(--ink-2); font-size: 0.98rem;
  max-width: 78ch;
  background: linear-gradient(90deg, var(--ice-a10), transparent 60%);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.wwd__door-label {
  display: block; margin-bottom: 4px;
  font-family: var(--font-head); font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ice);
}

/* ---------- Service area ---------- */
.area__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.area__list { margin-top: 40px; display: grid; gap: 0; }
.area__row { display: flex; gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); }
.area__row:last-child { border-bottom: 1px solid var(--line); }
.area__row h3 { font-size: 1.2rem; margin-bottom: 6px; }
.area__row p { margin: 0; color: var(--ink-2); }
.area__dot { flex-shrink: 0; width: 10px; height: 10px; margin-top: 8px; border-radius: 50%; border: 1px solid var(--chrome-2); }
.area__dot--home { background: var(--ice); border-color: var(--ice); box-shadow: 0 0 14px var(--ice); }
.area__dot--next { border-style: dashed; }

.constellation { position: relative; margin: 0; aspect-ratio: 1; max-width: 520px; width: 100%; justify-self: center; }
.constellation__svg { width: 100%; height: 100%; overflow: visible; }
.constellation__routes path { stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 2.2s var(--ease-out); }
.constellation.is-visible .constellation__routes path { stroke-dashoffset: 0; }
.constellation__routes path:nth-child(2) { transition-delay: 0.15s; }
.constellation__routes path:nth-child(3) { transition-delay: 0.3s; }
.constellation__routes path:nth-child(4) { transition-delay: 0.45s; }
.constellation__routes path:nth-child(5) { transition-delay: 0.6s; }
.constellation__nodes circle { fill: var(--chrome-1); filter: drop-shadow(0 0 6px var(--ice)); animation: twinkle 3.6s ease-in-out infinite; }
.constellation__nodes circle:nth-child(2n) { animation-delay: 1.2s; }
.constellation__nodes circle:nth-child(3n) { animation-delay: 2.1s; }
.constellation__home { filter: drop-shadow(0 0 16px rgba(143,220,255,0.6)); }
@keyframes twinkle { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
.constellation::before { /* soft orbital rings */
  content: ""; position: absolute; inset: 8%; border-radius: 50%;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 60px rgba(0,0,0,0), 0 0 0 40px rgba(0,0,0,0);
  background: radial-gradient(closest-side at 50% 57.5%, rgba(143,220,255,0.08), transparent 70%);
}
.constellation__labels { position: absolute; inset: 0; pointer-events: none; }
.constellation__label {
  position: absolute;
  font-family: var(--font-head); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: #000; border: 1px solid var(--line-strong);
}
.constellation__label--home { left: 50%; top: 68%; transform: translateX(-50%); color: var(--ice-hi); border-color: var(--ice-a35); white-space: nowrap; }
.constellation__label--out { right: 2%; top: 14%; color: var(--ink-2); }

/* ---------- Recruiting ---------- */
.join { overflow: hidden; }
.join__bg {
  position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(50% 40% at 50% 0%, rgba(143,220,255,0.07), transparent 70%);
}
.tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.track { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(28px, 4vw, 44px); }
.track__kicker { font-family: var(--font-head); font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ice); margin-bottom: 10px; }
.track__title { font-size: clamp(1.8rem, 3.2vw, 2.5rem); margin-bottom: 14px; }
.track > p { color: var(--ink-2); max-width: 46ch; }
.track .btn { margin-top: auto; }
.checklist { list-style: none; display: grid; gap: 12px; margin: 10px 0 32px; }
.checklist li { position: relative; padding-left: 28px; color: var(--ink); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 14px; height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-100 -100 200 200'%3E%3Cpath fill='%238fdcff' d='M0 -100L12 -12L100 0L12 12L0 100L-12 12L-100 0L-12 -12Z'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 0 4px rgba(143,220,255,0.7));
  translate: 0 -25%;
}

.join__details { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.comp__title { font-size: 1.35rem; margin-bottom: 8px; }
.comp__note { color: var(--ink-3); font-size: 0.9rem; }
.comp__table { margin: 18px 0 0; }
.comp__table > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.comp__table dt { color: var(--ink-2); }
.comp__table dd { margin: 0; }
.path__steps { list-style: none; margin-top: 22px; position: relative; }
.path__steps::before { content: ""; position: absolute; left: 13px; top: 14px; bottom: 14px; width: 1px; background: linear-gradient(180deg, var(--ice), var(--line-strong) 40%); }
.path__step { position: relative; display: flex; gap: 18px; padding: 10px 0; }
.path__step div { display: flex; flex-direction: column; gap: 4px; }
.path__step strong { font-family: var(--font-head); font-weight: 600; }
.path__step div > span { color: var(--ink-2); font-size: 0.94rem; }
.path__marker {
  position: relative; flex-shrink: 0; width: 27px; height: 27px; border-radius: 50%;
  background: #000; border: 1px solid var(--line-strong); display: grid; place-items: center;
}
.path__step--active .path__marker { border-color: var(--ice-a60); box-shadow: 0 0 16px -2px var(--ice-a60); }
.path__marker svg { width: 15px; height: 15px; }

.blitz-banner {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  margin-top: clamp(32px, 5vw, 56px);
  padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 52px);
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--ice-a35);
  background:
    radial-gradient(80% 140% at 0% 50%, rgba(143,220,255,0.14), transparent 60%),
    linear-gradient(180deg, #0c0d0f, #050506);
  box-shadow: 0 0 60px -30px var(--ice);
}
.blitz-banner__star { width: 72px; height: 72px; flex-shrink: 0; filter: drop-shadow(0 0 18px rgba(143,220,255,0.55)); animation: slow-rot 30s linear infinite; }
@keyframes slow-rot { to { rotate: 360deg; } }
.blitz-banner__copy { flex: 1 1 320px; }
.blitz-banner__copy .eyebrow { margin-bottom: 6px; }
.blitz-banner__title { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.1; letter-spacing: -0.02em; }

/* ---------- Partners ---------- */
.partners__grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.partner {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 180px; text-align: center;
}
/* Plain text wordmark fallback: just the company's name set in the site typeface. Not a logo design. */
.partner__name {
  font-family: var(--font-head); font-weight: 600; font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -0.01em;
  color: var(--chrome-1);
  transition: color 0.4s, text-shadow 0.4s;
}
.partner img { max-height: 56px; width: auto; filter: grayscale(1) brightness(1.6); opacity: 0.85; transition: filter 0.4s, opacity 0.4s; }
.partner:hover img { filter: none; opacity: 1; }
.partner:hover .partner__name { color: #fff; text-shadow: 0 0 24px var(--ice-a60); }
.partner__meta { font-size: 0.76rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- Team ---------- */
.team__grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.member { display: flex; flex-direction: column; align-items: flex-start; }
.member__photo {
  position: relative; width: 100%; aspect-ratio: 4 / 3; margin-bottom: 22px;
  border-radius: var(--radius-sm); overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(70% 70% at 50% 40%, #16181b, #050506);
  border: 1px solid var(--line);
}
.member__star { position: absolute; width: 70%; height: 70%; color: rgba(220,228,236,0.12); transition: transform 1.2s var(--ease-out), color 0.6s; }
.member:hover .member__star { transform: rotate(45deg); color: var(--ice-a35); }
.member__initials {
  position: relative; font-family: var(--font-head); font-weight: 600; font-size: 3rem; letter-spacing: 0.04em;
  background: var(--chrome-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.member__photo--empty { border-style: dashed; }
.member__photo--cta .member__star { width: 46%; height: 46%; filter: drop-shadow(0 0 22px rgba(143,220,255,0.45)); animation: slow-rot 40s linear infinite; }
.member__name { font-family: var(--font-head); font-size: 1.35rem; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.02em; }
.member__role { color: var(--ice); font-size: 0.92rem; margin: 0 0 12px; }
.member__bio { color: var(--ink-2); font-size: 0.95rem; margin: 0; }
.member--todo .member__role { color: var(--ink-3); }
.member--cta .btn { margin-top: auto; }

/* ---------- Contact ---------- */
.contact__inner { display: flex; flex-direction: column; align-items: center; }
.contact__card {
  width: 100%; max-width: 720px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(32px, 5vw, 56px);
}
.contact__icon { width: 36px; height: 36px; color: var(--ice); filter: drop-shadow(0 0 10px var(--ice-a60)); }
.contact__label { margin: 16px 0 6px; font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }
.contact__email {
  font-family: var(--font-head); font-weight: 600; font-size: clamp(1.3rem, 3.4vw, 2.2rem); letter-spacing: -0.02em;
  word-break: break-word;
  background: var(--chrome-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: filter 0.3s;
}
a.contact__email[href^="mailto:"]:hover { filter: drop-shadow(0 0 12px var(--ice-a60)); }
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.contact__area { display: inline-flex; align-items: center; gap: 8px; margin: 28px 0 0; color: var(--ink-3); font-size: 0.92rem; }
.contact__area svg { width: 16px; height: 16px; }

/* ---------- Footer ---------- */
.site-footer { position: relative; padding: 72px 0 40px; border-top: 1px solid var(--line); overflow: hidden; }
.site-footer__floor {
  position: absolute; top: 0; left: 50%; width: min(900px, 100%); height: 160px; transform: translateX(-50%);
  background: radial-gradient(50% 100% at 50% 0%, rgba(143,220,255,0.08), transparent 70%);
  pointer-events: none;
}
.site-footer__inner { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 24px 48px; align-items: center; }
.site-footer__nav { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: flex-end; }
.site-footer__nav a { font-size: 0.92rem; color: var(--ink-2); transition: color 0.25s; }
.site-footer__nav a:hover { color: var(--ice); }
.site-footer__legal { grid-column: 1 / -1; margin: 24px 0 0; padding-top: 24px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 0.85rem; }

/* ==========================================================================
   MODALS (native <dialog>: focus containment, Esc, inert page for free)
   ========================================================================== */
.modal {
  /* full-viewport, transparent: anything outside .modal__panel counts as backdrop */
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 16px;
  border: 0; background: transparent; color: var(--ink);
  overflow-y: auto; overscroll-behavior: contain;
}
.modal[open] { display: grid; place-items: center; }
.modal::backdrop { background: rgba(0,0,0,0.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal[open]::backdrop { animation: fade-in 0.25s ease both; }
.modal.is-closing::backdrop { animation: fade-out 0.16s ease both; }

.modal__panel {
  position: relative; overflow: hidden;
  width: 100%; max-width: 620px;
  padding: clamp(26px, 5vw, 44px);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(180deg, #0f1012, #060607);
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 120px -20px rgba(0,0,0,0.9), 0 0 0 1px rgba(255,255,255,0.02), 0 0 80px -40px var(--ice);
}
.modal[open] .modal__panel { animation: modal-in 0.4s var(--ease-out) both; }
.modal.is-closing .modal__panel { animation: modal-out 0.16s ease-in both; }
.modal__panel::before { /* ice core at the top edge */
  content: ""; position: absolute; top: 0; left: 50%; width: 60%; height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--ice), transparent);
  box-shadow: 0 0 20px 1px var(--ice);
}
.modal__star { position: absolute; top: -70px; right: -70px; width: 220px; height: 220px; opacity: 0.1; pointer-events: none; }
.modal__close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.03); border: 1px solid var(--line-strong);
  cursor: pointer; transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s var(--ease-out);
}
.modal__close svg { width: 20px; height: 20px; }
.modal__close:hover { border-color: var(--ice-a60); box-shadow: 0 0 16px -4px var(--ice); transform: rotate(90deg); }
.modal__title { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 10px; padding-right: 44px; }
.modal__desc { color: var(--ink-2); margin-bottom: 26px; }
.modal__body .eyebrow { margin-bottom: 10px; }
.modal__success { text-align: center; padding: 20px 0 4px; outline: none; }
.modal__success .modal__title { padding: 0; }
.modal__success p { color: var(--ink-2); }
.modal__success-star { width: 72px; height: 72px; margin: 0 auto 20px; filter: drop-shadow(0 0 20px var(--ice)); animation: ignite-success 1s var(--ease-out) both; }
@keyframes ignite-success { from { transform: scale(0.3) rotate(-90deg); opacity: 0; } }

@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(8px) scale(0.985); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
html.modal-open { overflow: hidden; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.form__row { display: grid; gap: 16px; }
.form__row--2 { grid-template-columns: 1fr 1fr; }
.form__row--3 { grid-template-columns: 2fr 1fr 1.2fr; }
.field { display: grid; gap: 6px; }
.field label, .segmented legend { font-size: 0.85rem; font-weight: 500; color: var(--ink-2); }
.field__opt { color: var(--ink-3); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: #000; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font-size: 1rem; /* 16px: no iOS zoom */
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field select {
  appearance: none; padding-right: 40px;
  background: #000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23b9bfc7' stroke-width='1.8'/%3E%3C/svg%3E") right 12px center / 18px no-repeat;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(222,228,236,0.32); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ice); box-shadow: 0 0 0 3px var(--ice-a20); }
.field input[aria-invalid="true"] { border-color: #ffffff; box-shadow: 0 0 0 3px rgba(255,255,255,0.15); }
.field__error { margin: 0; min-height: 0; font-size: 0.82rem; color: var(--ink); }
.field__error:not(:empty)::before { content: "! "; color: var(--ice); font-weight: 700; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__status { margin: 0; font-size: 0.9rem; color: var(--ink-2); min-height: 1.2em; }

.segmented { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.segmented legend { margin-bottom: 8px; padding: 0; width: 100%; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  font-size: 0.92rem; font-weight: 500; color: var(--ink-2);
  transition: all 0.25s;
}
.segmented input:checked + span { color: #000; background: var(--chrome-fill); border-color: transparent; box-shadow: 0 0 18px -6px var(--ice); }
.segmented input:focus-visible + span { outline: 2px solid var(--ice); outline-offset: 2px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
  .values { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento__item--wide { grid-column: span 2; grid-row: auto; min-height: 380px; }
  .bento__item--span2 { grid-column: auto; }
  .different { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .about__grid, .area__grid, .tracks, .join__details { grid-template-columns: 1fr; }
  .team__grid, .partners__grid { grid-template-columns: 1fr 1fr; }
  .different__list { grid-template-columns: 1fr; }
  .constellation { max-width: 420px; }
  .site-footer__inner { grid-template-columns: 1fr; }
  .site-footer__nav { justify-content: flex-start; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .hero { --R: min(22vh, 40vw); padding-bottom: 88px; }
  .hero__eyebrow { font-size: 0.68rem; letter-spacing: 0.14em; }
  .hero__ctas { flex-direction: column; width: 100%; max-width: 360px; }
  .hero__ctas .btn { width: 100%; }
  .values, .bento, .team__grid, .partners__grid, .facts { grid-template-columns: 1fr; }
  .bento__item--wide { grid-column: auto; }
  .bento__item--wide { min-height: 0; }
  .bento__item { min-height: 0; }
  .form__row--2, .form__row--3 { grid-template-columns: 1fr; }
  .modal { padding: 0; align-items: end; }
  .modal[open] { place-items: end center; }
  .modal__panel { border-radius: 22px 22px 0 0; max-height: 100%; overflow-y: auto; padding-bottom: max(28px, env(safe-area-inset-bottom)); }
  .blitz-banner .btn { width: 100%; }
  .constellation__label--out { right: 0; top: 4%; }
}
@media (max-height: 640px) and (min-width: 601px) {
  .hero { --R: min(20vh, 30vw); }
}

/* ==========================================================================
   REDUCED MOTION: everything static and instantly visible
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .js-ready [data-reveal] { opacity: 1; transform: none; filter: none; }
  .logo-frame.is-loaded .logo-frame__glint { display: none; }
  .hero-star__flare, .hero-star__beam { display: none; }
  .card:hover, .btn:hover { transform: none !important; }
}
