/* // BASE — tokens, reset, sections, dunes, type, buttons, scroll progress */

:root {
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  /* dark plums */
  --plum-950: #130d1d;
  --plum-900: #181126;
  --plum-800: #221836;
  --plum-700: #2e2147;

  /* light lilacs — tinted clearly purple, not white */
  --lilac-50: #e7def6;
  --lilac-100: #ddd2f0;
  --lilac-200: #d2c6ea;

  /* violets (accents) */
  --violet-600: #5f4b8b;
  --violet-500: #7a64ab;
  --violet-400: #9580c4;
  --violet-300: #b5a4d9;
  --violet-200: #cfc3e8;

  /* neighbor hues — desaturated dusk blue and rose. Ambient color only
     (gradients, star tints, washes); never used for text. */
  --dusk-500: #46518e;
  --dusk-400: #6a76a8;
  --rose-500: #8d5a7c;
  --rose-400: #a8799b;
  --rose-300: #c2a0bd;

  --ease-out: cubic-bezier(0.22, 0.61, 0.21, 1);
  --nav-h: 72px;

  /* purple-tinted "whites" — nothing on this site is pure #fff */
  --moon: #f4eefb;
  --moon-dim: #e9e2f5;

  /* ambient star field — tiny lavender / dusk / rose specks. One dot per
     layer, each tiled at a different (co-prime-ish) size so no visible grid
     emerges. Shared by the hero, the dark sections and the footer. */
  --stars:
    radial-gradient(circle at 24px 46px, rgba(207, 195, 232, 0.50) 1px, transparent 2px),
    radial-gradient(circle at 118px 12px, rgba(154, 166, 214, 0.42) 1px, transparent 2px),
    radial-gradient(circle at 64px 150px, rgba(214, 166, 198, 0.38) 1px, transparent 2px),
    radial-gradient(circle at 200px 86px, rgba(207, 195, 232, 0.34) 1.3px, transparent 2.3px),
    radial-gradient(circle at 170px 210px, rgba(154, 166, 214, 0.30) 1px, transparent 2px),
    radial-gradient(circle at 30px 220px, rgba(207, 195, 232, 0.28) 1.3px, transparent 2.3px);
  --stars-size: 246px 246px, 458px 458px, 351px 351px, 384px 384px, 297px 297px, 522px 522px;

  /* the same star field in ink — for the light sections, so day gets
     speckles like night gets stars */
  --stars-ink:
    radial-gradient(circle at 24px 46px, rgba(95, 75, 139, 0.30) 1px, transparent 2px),
    radial-gradient(circle at 118px 12px, rgba(70, 81, 142, 0.26) 1px, transparent 2px),
    radial-gradient(circle at 64px 150px, rgba(141, 90, 124, 0.24) 1px, transparent 2px),
    radial-gradient(circle at 200px 86px, rgba(95, 75, 139, 0.20) 1.3px, transparent 2.3px),
    radial-gradient(circle at 170px 210px, rgba(70, 81, 142, 0.18) 1px, transparent 2px),
    radial-gradient(circle at 30px 220px, rgba(95, 75, 139, 0.18) 1.3px, transparent 2.3px);
}

/* the stars breathe — opacity only, so it composites for free */
@keyframes twinkle { from { opacity: 0.3; } to { opacity: 0.8; } }
@keyframes twinkle-dim { from { opacity: 0.22; } to { opacity: 0.55; } }

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
* { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth; /* fallback when Lenis isn't loaded */
  scroll-padding-top: var(--nav-h); /* anchored jumps clear the fixed nav */
  -webkit-text-size-adjust: 100%;
}

/* Lenis adds these classes to <html> when it takes over scrolling.
   Native smooth-scroll MUST be off then, or the two animate against
   each other and scrolling feels randomly slow/fast. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  background: var(--plum-900);
  color: #ede8f6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  animation: page-in 0.7s ease-out;
}
@keyframes page-in { from { opacity: 0; } }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }

::selection { background: var(--violet-500); color: var(--moon); }

:focus-visible { outline: 2px solid var(--violet-400); outline-offset: 3px; }

/* No scrollbar — the progress bar along the top is the scroll indicator.
   This also stops the page from shifting when the contact modal locks
   scrolling (the old jump was the scrollbar appearing/disappearing). */
html { scrollbar-width: none; }
::-webkit-scrollbar { display: none; }

/* ---------- layout helpers ---------- */
.container {
  width: min(1160px, 92vw);
  margin-inline: auto;
}
.container--narrow { width: min(820px, 92vw); }

.section {
  padding: clamp(5rem, 11vw, 8.5rem) 0;
  scroll-margin-top: var(--nav-h);
}

/* Per-section theme variables — dark and light halves of the site. */
.section--dark {
  position: relative;
  isolation: isolate; /* lets the z-index:-1 ambient layers sit above this
                         background but below all content */
  background:
    radial-gradient(1100px 420px at 85% -5%, rgba(122, 100, 171, 0.1), transparent 60%),
    radial-gradient(900px 540px at -10% 110%, rgba(70, 81, 142, 0.1), transparent 60%),
    radial-gradient(760px 440px at 108% 80%, rgba(141, 90, 124, 0.07), transparent 60%),
    var(--plum-900);
  color: #ede8f6;
  --tx: #ede8f6;
  --tx-muted: #a89bc4;
  --panel: var(--plum-800);
  --panel-hover: var(--plum-700);
  --line: rgba(181, 164, 217, 0.14);
  --accent: var(--violet-300);
  --card-shadow: 0 1px 0 rgba(245, 238, 251, 0.04) inset, 0 12px 26px -20px rgba(0, 0, 0, 0.7);
  --card-shadow-hover: 0 1px 0 rgba(245, 238, 251, 0.06) inset, 0 30px 54px -30px rgba(95, 75, 139, 0.55);
  --h2-grad-a: var(--violet-300);
  --h2-grad-b: var(--rose-300);
  --ghost: rgba(237, 232, 246, 0.08);
}
.section--light {
  position: relative;
  isolation: isolate;
  background-color: var(--lilac-50);
  /* daylight: a pale sun halo with two thin orbit rings (the day's answer
     to the hero's constellation), two offset dot grids (violet + dusk),
     faint topographic contours — the map under the journey — all over a
     soft vertical lilac gradient so the slab is never one flat tone */
  background-image:
    radial-gradient(circle 150px at 86% 190px, rgba(252, 249, 255, 0.75), transparent 70%),
    radial-gradient(circle 205px at 86% 190px, transparent 200px, rgba(95, 75, 139, 0.18) 201px, rgba(95, 75, 139, 0.10) 203px, transparent 205px),
    radial-gradient(circle 264px at 86% 190px, transparent 260px, rgba(95, 75, 139, 0.10) 261px, transparent 264px),
    radial-gradient(rgba(95, 75, 139, 0.05) 1px, transparent 1.5px),
    radial-gradient(rgba(70, 81, 142, 0.05) 1px, transparent 1.5px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='340' height='340'%3E%3Cg fill='none' stroke='%235f4b8b' stroke-opacity='.10'%3E%3Cpath d='M60 170c0-50 44-86 100-81s100 44 95 90-51 77-107 72-88-31-88-81z'/%3E%3Cpath d='M95 172c0-32 30-56 67-52s67 29 63 59-35 50-72 46-58-21-58-53z'/%3E%3Cpath d='M128 174c0-15 14-26 31-24s31 13 29 27-16 23-33 21-27-10-27-24z'/%3E%3Cpath d='M-40 50c36-26 84-19 108 10'/%3E%3Cpath d='M232 330c12-31 53-46 89-34'/%3E%3Cpath d='M300 20c-28 8-44 32-38 60'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, #e0d4f2 0%, #eae1f7 24%, #e9e0f6 62%, #ddd0f0 100%);
  background-size: auto, auto, auto, 26px 26px, 26px 26px, 340px 340px, 100% 100%;
  background-position: 0 0, 0 0, 0 0, 0 0, 13px 13px, 0 0, 0 0;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, repeat, repeat, no-repeat;
  color: #251a3a;
  --tx: #251a3a;
  --tx-muted: #645a7d;
  --panel: #faf6ff;
  --panel-hover: #ffffff;
  --line: #cfc0e8;
  --accent: var(--violet-600);
  --card-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 2px 10px -6px rgba(60, 40, 95, 0.24), 0 18px 38px -30px rgba(95, 75, 139, 0.40);
  --card-shadow-hover: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 26px 46px -26px rgba(95, 75, 139, 0.48);
  --h2-grad-a: var(--violet-600);
  --h2-grad-b: var(--rose-500);
  --ghost: rgba(60, 40, 95, 0.13);
}

/* // AMBIENT BACKGROUND LAYERS */
.section--dark:not(.hero)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--stars);
  background-size: var(--stars-size);
  opacity: 0.45;
  animation: twinkle-dim 11s ease-in-out infinite alternate;
}
.section--dark:not(.hero)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.section--light::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* dawn glow spilling down from under the dark horizon, then the
     drifting corner washes */
  background-image:
    radial-gradient(56% 260px at 50% 0%, rgba(168, 121, 155, 0.16), transparent 70%),
    radial-gradient(46% 38% at 10% 6%, rgba(70, 81, 142, 0.12), transparent 70%),
    radial-gradient(50% 42% at 92% 94%, rgba(168, 121, 155, 0.13), transparent 70%),
    radial-gradient(40% 34% at 74% 22%, rgba(122, 100, 171, 0.10), transparent 70%);
  background-repeat: no-repeat;
  animation: wash-breathe 16s ease-in-out infinite alternate;
}
@keyframes wash-breathe { from { opacity: 0.5; } to { opacity: 1; } }
/* ink speckles twinkling across the light sections */
.section--light::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--stars-ink);
  background-size: var(--stars-size);
  opacity: 0.5;
  animation: twinkle-dim 13s ease-in-out infinite alternate;
}

/* // HORIZON DUNES */
.dune {
  display: block;
  position: absolute;
  /* oversized sideways: slack for the scroll parallax below. The width is
     explicit because an SVG won't stretch between left/right insets — with
     width:auto it falls back to its intrinsic size and comes up short. */
  left: -30px;
  width: calc(100% + 60px);
  height: clamp(48px, 8vw, 112px);
  color: var(--plum-900);
  fill: currentColor;
  pointer-events: none;
}
.dune--top { top: -1px; }
.dune--btm { bottom: -1px; transform: scaleY(-1); }
#stats .dune--btm, #join .dune--btm, #contributors .dune--btm { transform: scale(-1, -1); }
#games .dune--top, #contributors .dune--top { transform: scaleX(-1); }
/* the last horizon descends into the footer's deeper plum */
#join .dune--btm, #contributors .dune--btm { color: var(--plum-950); }

/* scroll parallax — the horizons slide sideways and the ghost numerals
   drift upward as they cross the viewport. Scroll-driven animations only
   (no per-frame JS); browsers without view() simply get the static page. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .dune {
      animation: dune-drift linear both;
      animation-timeline: view();
    }
    @keyframes dune-drift {
      from { translate: -22px 0; }
      to   { translate: 22px 0; }
    }
    .section__head[data-num]::before {
      animation: ghost-drift linear both;
      animation-timeline: view();
    }
    @keyframes ghost-drift {
      from { translate: 0 30px; }
      to   { translate: 0 -30px; }
    }
  }
}

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; }

h2 {
  font-size: clamp(2rem, 4.4vw, 3.15rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
}
/* one word per heading carries the studio gradient — same treatment as
   "Nomad" in the hero, tuned per theme so it stays readable on lilac */
h2 em {
  font-style: normal;
  background: linear-gradient(105deg, var(--h2-grad-a, var(--violet-300)), var(--h2-grad-b, var(--rose-300)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent, var(--violet-300));
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
  transition: width 0.9s var(--ease-out) 0.2s;
}
/* the little rule draws itself in as the section reveals */
.reveal:not(.is-visible) .eyebrow::before { width: 0; }

.section__head { position: relative; max-width: 660px; margin-bottom: clamp(2.6rem, 5.5vw, 4.2rem); }
.section__head h2 { margin-top: 1rem; }

/* giant outlined index behind each section heading — the editorial
   signature, echoing the outlined wordmark in the footer */
.section__head[data-num]::before {
  content: attr(data-num);
  /* alt-text form where supported, so screen readers skip the decoration */
  content: attr(data-num) / "";
  position: absolute;
  top: -0.46em;
  left: -0.05em;
  z-index: -1;
  font-family: var(--font-display);
  font-size: clamp(5.6rem, 12vw, 9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ghost, rgba(237, 232, 246, 0.08));
  pointer-events: none;
  user-select: none;
}
.section__lede { margin-top: 1.1rem; color: var(--tx-muted); font-size: 1.12rem; line-height: 1.6; max-width: 60ch; text-wrap: pretty; }

/* ---------- buttons ---------- */
.btn {
  position: relative;
  overflow: hidden; /* contains the solid button's shine sweep */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  transition: transform 0.35s var(--ease-out), background 0.35s, border-color 0.35s,
              color 0.35s, background-position 0.55s var(--ease-out), box-shadow 0.35s;
}
.btn:hover { transform: translateY(-2px); }

/* a soft light band sweeps across solid buttons on hover */
.btn--solid::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(244, 238, 251, 0.22) 50%, transparent 65%);
  translate: -130% 0;
  transition: translate 0.8s var(--ease-out);
}
.btn--solid:hover::before { translate: 130% 0; }

.btn--solid {
  /* the rose tail sits past the visible window at rest; the hover
     background-position shift slides it into view */
  background: linear-gradient(135deg, var(--violet-500) 0%, var(--violet-400) 60%, var(--rose-400) 130%);
  background-size: 160% 100%;
  background-position: 0% 0;
  color: var(--moon);
  box-shadow: 0 8px 20px -14px rgba(122, 100, 171, 0.75);
}
.btn--solid:hover {
  background-position: 95% 0;
  box-shadow: 0 16px 30px -16px rgba(122, 100, 171, 0.65);
}

.btn--ghost {
  border: 1px solid rgba(181, 164, 217, 0.35);
  color: var(--violet-200);
}
.btn--ghost:hover {
  border-color: var(--violet-300);
  color: var(--moon);
  background: rgba(149, 128, 196, 0.08);
}

.btn--arrow::after {
  content: "→";
  margin-left: 0.5rem;
  display: inline-block;
  transition: transform 0.35s var(--ease-out);
}
.btn--arrow:hover::after { transform: translateX(4px); }

/* click feedback — !important so it wins over the JS magnetic transform */
.btn:active,
.contact-pill:active,
.nav__links a:active,
.game-card--playable:active,
.mini-link:active,
.hero__scroll:active {
  transform: scale(0.96) !important;
  transition-duration: 0.08s;
}

/* // NAV — header bar, links, mobile menu */
/* // NAV */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 60;
  background: linear-gradient(90deg, var(--dusk-400), var(--violet-400) 45%, var(--rose-400));
  transform: scaleX(0);
  transform-origin: 0 50%;
}
/* the comet head riding the tip of the progress bar */
.scroll-comet {
  position: fixed;
  top: 0;
  left: -7px;
  width: 7px;
  height: 2px;
  z-index: 61;
  border-radius: 999px;
  background: var(--moon);
  box-shadow: 0 0 6px rgba(207, 195, 232, 0.55);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  animation: nav-in 0.7s var(--ease-out) both;
}
@keyframes nav-in { from { opacity: 0; transform: translateY(-12px); } }
.nav.is-scrolled {
  background: rgba(19, 13, 29, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px -18px rgba(10, 6, 18, 0.55);
}
/* tri-hue hairline under the scrolled nav instead of a flat border */
.nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(106, 118, 168, 0.5) 16%, rgba(149, 128, 196, 0.55) 50%, rgba(168, 121, 155, 0.45) 84%, transparent);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.nav.is-scrolled::after { opacity: 1; }

.nav__inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark em {
  font-style: normal;
  background: linear-gradient(100deg, var(--violet-200), var(--violet-400) 38%, var(--rose-300) 60%, var(--violet-200));
  background-size: 220% 100%;
  background-position: 0% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: background-position 0.9s var(--ease-out);
}
.wordmark:hover em { background-position: 100% 0; }
.wordmark sup {
  font-size: 0.55em;
  font-weight: 400;
  color: var(--violet-300);
  margin-left: 1px;
}

/* wordmark + the Our Team pill, grouped on the left */
.nav__brand {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-width: 0;
}
.nav__team {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--violet-200);
  border: 1px solid rgba(181, 164, 217, 0.35);
  border-radius: 999px;
  padding: 0.38rem 1rem;
  transition: color 0.3s, border-color 0.3s, background 0.3s, transform 0.3s var(--ease-out);
}
.nav__team svg {
  width: 12px;
  height: 12px;
  fill: var(--violet-300);
  transition: transform 0.5s var(--ease-out), fill 0.3s;
}
.nav__team:hover {
  border-color: var(--violet-300);
  color: var(--moon);
  background: rgba(149, 128, 196, 0.1);
  transform: translateY(-1px);
}
.nav__team:hover svg { transform: rotate(72deg) scale(1.15); fill: var(--violet-200); }
/* you're on /team right now */
.nav__team.is-active {
  background: linear-gradient(135deg, rgba(122, 100, 171, 0.32), rgba(141, 90, 124, 0.22));
  border-color: rgba(181, 164, 217, 0.55);
  color: var(--moon);
}
@media (max-width: 760px) {
  .nav__brand { gap: 0.8rem; }
  .nav__team { font-size: 0.78rem; padding: 0.3rem 0.8rem; }
}
/* tiny screens: the pill stays, the label shortens to "Team" */
@media (max-width: 400px) {
  .nav__brand { gap: 0.6rem; }
  .wordmark { font-size: 1.05rem; }
  .nav__team { font-size: 0.74rem; padding: 0.26rem 0.7rem; }
  .nav__team-our { display: none; }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.9rem;
}
.nav__links a {
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  color: #c9bfdd;
  transition: color 0.3s, transform 0.3s var(--ease-out);
  padding: 0.3rem 0;
}
.nav__links a:hover { color: var(--moon); transform: translateY(-1px); }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--violet-300);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.nav__links a.is-active { color: var(--moon); }
.nav__links a.is-active::after { transform: scaleX(1); }
/* someone is in a game right now (toggled from the live data) */
.nav__links a.has-live::before {
  content: "";
  position: absolute;
  top: 1px;
  right: -9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8ad6a2;
  animation: live-pulse 2.2s ease-in-out infinite;
}

.nav__links .nav__cta {
  border: 1px solid rgba(181, 164, 217, 0.35);
  border-radius: 999px;
  padding: 0.45rem 1.2rem;
  color: var(--violet-200);
}
.nav__links .nav__cta:hover {
  border-color: var(--violet-300);
  color: var(--moon);
  background: rgba(149, 128, 196, 0.1);
}
.nav__links .nav__cta::after { display: none; }

.nav__toggle { display: none; }

@media (max-width: 760px) {
  .nav__toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0.6rem;
    z-index: 2;
  }
  .nav__toggle span {
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: #ede8f6;
    transition: transform 0.3s var(--ease-out), opacity 0.3s;
  }
  .nav.menu-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.menu-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.menu-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav__links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 1rem 4vw 1.4rem;
    background: rgba(19, 13, 29, 0.96);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(181, 164, 217, 0.12);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s var(--ease-out);
  }
  .nav.menu-open .nav__links {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav__links a { padding: 0.55rem 0; font-size: 1rem; }
  .nav__links .nav__cta { margin-top: 0.4rem; }
}

/* // HERO — night sky, moon, aurora, constellation, scroll cue */
/* // HERO */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 2rem) 0 4rem;
}

.hero__backdrop { position: absolute; inset: 0; }

/* settle the hero into solid plum at its base, so the first horizon
   below it meets one even tone instead of the blob glows */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(140px, 20vh, 220px);
  background: linear-gradient(180deg, transparent, var(--plum-900) 92%);
  pointer-events: none;
}

/* two star layers riding the mouse-parallaxed backdrop: ::before sits under
   the blobs (peeks through the gaps, reads as "far"), ::after floats above
   them. Different durations + a position offset keep them out of phase. */
.hero__backdrop::before,
.hero__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--stars);
  background-size: var(--stars-size);
  opacity: 0.55;
  animation: twinkle 7s ease-in-out infinite alternate;
}
.hero__backdrop::before {
  background-position: 139px 83px;
  animation-duration: 9.5s;
  animation-delay: -4s;
}

/* each blob leans a different way: violet, dusk blue, plum rose */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}
.blob--1 {
  width: 58vw; height: 58vw;
  background: #342457;
  top: -18%; left: -12%;
  animation: drift-a 28s ease-in-out infinite alternate;
}
.blob--2 {
  width: 44vw; height: 44vw;
  background: #3c3a6e;
  bottom: -22%; right: -8%;
  opacity: 0.7;
  animation: drift-b 34s ease-in-out infinite alternate;
}
.blob--3 {
  width: 30vw; height: 30vw;
  background: #43274e;
  top: 30%; right: 28%;
  animation: drift-c 24s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(7vw, 5vh) scale(1.08); } }
@keyframes drift-b { to { transform: translate(-6vw, -6vh) scale(1.12); } }
@keyframes drift-c { to { transform: translate(-4vw, 7vh) scale(0.94); } }

/* aurora — a blurred ribbon where all three hues meet, swaying slowly
   across the top of the hero */
.hero__aurora {
  position: absolute;
  left: -12%;
  right: -12%;
  top: -18%;
  height: 72%;
  pointer-events: none;
  background: linear-gradient(105deg,
    transparent 28%,
    rgba(70, 81, 142, 0.20) 40%,
    rgba(122, 100, 171, 0.22) 52%,
    rgba(168, 121, 155, 0.16) 64%,
    transparent 78%);
  filter: blur(48px);
  transform: rotate(-8deg);
  opacity: 0.8;
  will-change: transform;
  animation: aurora-sway 26s ease-in-out infinite alternate;
}
@keyframes aurora-sway {
  from { transform: rotate(-8deg) translateX(-4%) scaleY(1); }
  to   { transform: rotate(-4deg) translateX(4%) scaleY(1.12); }
}

/* the occasional faint shooting star — under a second of streak, then a
   long quiet gap. The two fire at different points of the same loop.
   Stays invisible (opacity 0) when reduced motion freezes animations. */
.shooting-star {
  position: absolute;
  width: 90px;
  height: 1.5px;
  border-radius: 999px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(231, 222, 246, 0.55));
  opacity: 0;
  animation: shoot 17s linear infinite;
}
.shooting-star--1 { top: 16%; left: 6%; animation-delay: 5s; }
.shooting-star--2 { top: 42%; left: 52%; width: 70px; animation-delay: 13.5s; }
@keyframes shoot {
  0%, 93% { opacity: 0; transform: translate(0, 0) rotate(23deg); }
  94.5%   { opacity: 0.5; }
  100%    { opacity: 0; transform: translate(24vw, 10vw) rotate(23deg); }
}

/* dashed wandering path with waypoints — slowly drifts */
.hero__path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__path-line {
  fill: none;
  stroke: rgba(181, 164, 217, 0.16);
  stroke-width: 2;
  stroke-dasharray: 5 13;
  stroke-linecap: round;
  animation: path-drift 60s linear infinite;
}
@keyframes path-drift { to { stroke-dashoffset: -720; } }
.hero__path-dot {
  fill: rgba(181, 164, 217, 0.3);
  animation: dot-pulse 3.6s ease-in-out infinite alternate;
}
/* each waypoint along the journey has its own tint */
.hero__path-dot:nth-of-type(2) { animation-delay: 1.2s; fill: rgba(154, 166, 214, 0.32); }
.hero__path-dot:nth-of-type(3) { animation-delay: 2.4s; fill: rgba(214, 166, 198, 0.32); }
/* symmetric via alternate — the waypoints breathe, never jump */
@keyframes dot-pulse { from { opacity: 0.35; } to { opacity: 1; } }

/* constellation, upper right — the lines draw themselves in after the page
   loads, then the stars sit there and twinkle. pathLength="1" in the markup
   makes the dash math trivial. */
.hero__constellation {
  position: absolute;
  top: 16%;
  right: 6%;
  width: clamp(150px, 17vw, 240px);
  transform: rotate(-4deg);
  overflow: visible;
}
.constellation__line {
  fill: none;
  stroke: rgba(181, 164, 217, 0.26);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: constellation-draw 2.4s var(--ease-out) 1.2s forwards;
}
.constellation__line--branch { animation-delay: 2.6s; animation-duration: 1s; }
@keyframes constellation-draw { to { stroke-dashoffset: 0; } }
.constellation__stars circle {
  fill: rgba(207, 195, 232, 0.8);
  animation: dot-pulse 3.2s ease-in-out infinite alternate;
}
.constellation__stars circle:nth-child(2n) { animation-delay: 1.1s; fill: rgba(154, 166, 214, 0.75); }
.constellation__stars circle:nth-child(3n) { animation-delay: 2.2s; fill: rgba(214, 166, 198, 0.75); }
.constellation__north circle { fill: rgba(231, 222, 246, 0.9); }
.constellation__north path {
  fill: none;
  stroke: rgba(231, 222, 246, 0.55);
  stroke-width: 0.8;
  stroke-linecap: round;
  transform-box: fill-box;
  transform-origin: center;
  animation: north-glint 5s ease-in-out infinite alternate;
}
@keyframes north-glint {
  from { opacity: 0.25; transform: scale(0.7) rotate(0deg); }
  to   { opacity: 0.9;  transform: scale(1.1) rotate(8deg); }
}
@media (max-width: 760px) { .hero__constellation { display: none; } }

/* the moon — soft lit disc with a shaded limb, a crisp rim, and a thin
   tilted orbit ring. Sits mid-right where the hero was empty; rides the
   same mouse parallax as the rest of the backdrop. */
.hero__moon {
  position: absolute;
  top: 38%;
  right: 9%;
  width: clamp(170px, 20vw, 300px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 32%,
    rgba(231, 222, 246, 0.14),
    rgba(149, 128, 196, 0.08) 52%,
    rgba(70, 81, 142, 0.05) 78%,
    rgba(70, 81, 142, 0.02));
  box-shadow:
    inset -20px -16px 44px rgba(19, 13, 29, 0.55),
    0 0 0 1px rgba(207, 195, 232, 0.10),
    0 0 70px rgba(149, 128, 196, 0.10);
  animation: moon-drift 18s ease-in-out infinite alternate;
  /* clickable on purpose — see initMoon() in main.js */
  pointer-events: auto;
  cursor: pointer;
}
@keyframes moon-drift { from { transform: translateY(-9px); } to { transform: translateY(11px); } }
/* the click response: a small bow (rotate/scale compose with the drift) */
.hero__moon.is-nudged { animation: moon-drift 18s ease-in-out infinite alternate, moon-nudge 0.9s var(--ease-out); }
@keyframes moon-nudge {
  30% { rotate: -5deg; scale: 1.04; }
  60% { rotate: 3deg; }
  100% { rotate: 0deg; scale: 1; }
}
/* ...and a shooting star answers from across the sky */
.shooting-star--1.is-fired { animation: shoot-once 0.9s ease-out; }
@keyframes shoot-once {
  0%   { opacity: 0; transform: translate(0, 0) rotate(23deg); }
  12%  { opacity: 0.6; }
  100% { opacity: 0; transform: translate(26vw, 11vw) rotate(23deg); }
}
.hero__moon-ring {
  position: absolute;
  inset: 18% -26%;
  border-radius: 50%;
  border: 1px solid rgba(207, 195, 232, 0.13);
  transform: rotate(-14deg);
}
/* a small satellite resting on the ring */
.hero__moon-ring::before {
  content: "";
  position: absolute;
  top: 14%;
  right: 5%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(207, 195, 232, 0.55);
  animation: dot-pulse 4.2s ease-in-out infinite alternate;
}
@media (max-width: 760px) { .hero__moon { display: none; } }

/* near stars left of the title, balancing the moon */
.hero__spark {
  position: absolute;
  fill: rgba(207, 195, 232, 0.5);
  animation: spark-glint 4.5s ease-in-out infinite alternate;
  pointer-events: none;
}
.hero__spark--1 { top: 19%; left: 5%; width: 18px; height: 18px; }
.hero__spark--2 {
  bottom: 26%;
  left: 11%;
  width: 12px;
  height: 12px;
  fill: rgba(154, 166, 214, 0.5);
  animation-delay: 2.2s;
}
@keyframes spark-glint {
  from { opacity: 0.2; transform: scale(0.8) rotate(-10deg); }
  to   { opacity: 0.9; transform: scale(1.05) rotate(10deg); }
}
@media (max-width: 760px) { .hero__spark { display: none; } }

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.55rem;
  will-change: transform;
}

.hero__title {
  font-size: clamp(3rem, 9.2vw, 6.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.0;
}
.hero__title em {
  font-style: normal;
  /* the pan animation drifts the rose stop through the word */
  background: linear-gradient(100deg, var(--violet-200), var(--violet-400) 38%, var(--rose-300) 60%, var(--violet-200));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-pan 9s ease-in-out infinite alternate;
}
@keyframes gradient-pan {
  from { background-position: 0% 0; }
  to   { background-position: 100% 0; }
}
.hero__title sup {
  font-size: 0.28em;
  font-weight: 400;
  color: var(--violet-300);
  vertical-align: super;
}

.hero__tagline {
  font-size: clamp(1.1rem, 2.3vw, 1.45rem);
  line-height: 1.55;
  color: #c3b8df;
  max-width: 36ch;
}
.hero__tagline strong { color: #ede8f6; font-weight: 600; }

.hero__cta { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1rem; }

/* staggered entrance on page load — rises and settles into focus */
.hero-fade {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(4px);
  animation: hero-in 0.95s var(--ease-out) forwards;
  animation-delay: calc(var(--d) * 130ms + 150ms);
}
@keyframes hero-in { to { opacity: 1; transform: none; filter: none; } }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 2.2rem;
  margin-left: -14px; /* center the 28px chevron without using transform */
  z-index: 1;
  color: rgba(181, 164, 217, 0.5);
  transition: color 0.3s;
}
.hero__scroll:hover { color: var(--violet-300); }
.hero__scroll-chevron {
  display: block;
  width: 28px;
  height: 28px;
  animation: scroll-bob 2.4s ease-in-out infinite;
}
/* symmetric (0% = 100%) so it bobs forever with no jump */
@keyframes scroll-bob {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50%      { transform: translateY(7px); opacity: 1; }
}

/* // PEOPLE — inner-page hero, skychart, departments, contributor stamps */
/* // SUBPAGE HERO */
.page-hero {
  padding: calc(var(--nav-h) + clamp(4.5rem, 10vw, 7rem)) 0 clamp(3.2rem, 7vw, 5rem);
}
.page-hero h1 {
  font-size: clamp(2.7rem, 6.5vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-top: 1rem;
}
.page-hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--violet-200), var(--violet-400) 38%, var(--rose-300) 60%, var(--violet-200));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-pan 9s ease-in-out infinite alternate;
}
.page-hero .section__lede { margin-top: 1rem; }
/* small fact row under the lede ("3 members · 4 departments · 2 open roles") */
.page-hero__facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  margin-top: 1.5rem;
}
.page-hero__facts:empty { display: none; }
.page-hero__facts .fact {
  font-size: 0.9rem;
  color: var(--tx-muted);
}
.page-hero__facts .fact b {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--violet-200);
}
.page-hero__facts .fact--link {
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--violet-400) 45%, transparent);
  transition: color 0.3s, border-color 0.3s;
}
.page-hero__facts .fact--link:hover {
  color: var(--violet-200);
  border-color: var(--violet-300);
}
.page-hero__facts .fact-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--violet-400);
  opacity: 0.6;
}
/* full-viewport variant (the 404 page) */
.page-hero--fill {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
}

/* // STAR CHART */
.page-hero .container { position: relative; }
.skychart {
  position: absolute;
  top: 50%;
  right: 0;
  width: min(330px, 28vw);
  aspect-ratio: 1;
  margin-top: calc(min(330px, 28vw) / -2);
}
@media (max-width: 1019px) { .skychart { display: none; } }
.skychart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.skychart__rings circle {
  fill: none;
  stroke: rgba(181, 164, 217, 0.2);
  stroke-width: 1;
}
.skychart__ring-dash {
  stroke-dasharray: 3 7;
  transform-box: fill-box;
  transform-origin: center;
  animation: orbit 180s linear infinite;
}
.skychart__cardinals text {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.1em;
  fill: rgba(181, 164, 217, 0.45);
}
.skychart__minor {
  fill: var(--violet-200);
  opacity: 0.5;
  animation: twinkle 3.8s ease-in-out infinite alternate;
  animation-delay: calc(-1 * var(--sd, 0s));
}
/* constellation lines draw themselves in on load */
.skychart__lines line {
  stroke: rgba(181, 164, 217, 0.38);
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: chart-draw 1.1s var(--ease-out) forwards;
  animation-delay: var(--ld, 0.4s);
}
@keyframes chart-draw { to { stroke-dashoffset: 0; } }
.skychart__star { --sc: var(--violet-300); cursor: pointer; }
.skychart__star--dusk { --sc: var(--dusk-400); }
.skychart__star--rose { --sc: var(--rose-300); }
.skychart__spark { fill: var(--sc); }
.skychart__halo {
  fill: var(--sc);
  opacity: 0.14;
  animation: halo-breathe 4.5s ease-in-out infinite alternate;
  animation-delay: var(--sd, 0s);
  transition: opacity 0.35s;
}
@keyframes halo-breathe { from { opacity: 0.1; } to { opacity: 0.26; } }
.skychart__star text {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  fill: var(--sc);
  opacity: 0.75;
  transition: opacity 0.35s;
}
.skychart__star:hover .skychart__halo { opacity: 0.4; animation: none; }
.skychart__star:hover text { opacity: 1; }

/* /team: one block per department, a hairline running from each name */
.dept + .dept { margin-top: clamp(2.4rem, 5vw, 3.4rem); }
/* auto-fill (not auto-fit): a department with one person keeps a normal
   card instead of one stretched across the whole row */
.dept .team__grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.dept__name {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--violet-200);
  margin-bottom: 1.15rem;
}
/* small icon tile in the department's hue */
.dept__icon {
  --dh: var(--violet-300);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--dh) 32%, transparent);
  background: color-mix(in srgb, var(--dh) 10%, transparent);
  color: var(--dh);
}
.dept__icon--dusk { --dh: var(--dusk-400); }
.dept__icon--rose { --dh: var(--rose-300); }
.dept__icon svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}
.dept__name::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}
.dept__count {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 999px;
  padding: 0.08rem 0.55rem;
}
.dept__blurb {
  margin: -0.5rem 0 1.15rem;
  color: var(--tx-muted);
  font-size: 0.95rem;
}
#departmentsArea .crew-empty { margin-top: clamp(2.6rem, 5.5vw, 3.8rem); }

/* /team: the open invitation closing the departments list */
.crew-empty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem 2.5rem;
  background: var(--panel);
  border: 1px dashed rgba(181, 164, 217, 0.3);
  border-radius: 22px;
  padding: clamp(1.6rem, 4vw, 2.4rem) clamp(1.6rem, 4vw, 2.8rem);
  transition: border-color 0.4s;
}
.crew-empty:hover { border-color: var(--violet-400); }
.crew-empty p { color: var(--tx-muted); max-width: 54ch; }

/* // CONTRIBUTORS (/TEAM AND EACH GAME'S PAGE) */
.contrib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}
.contrib {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.05rem 1.2rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  transition: border-color 0.4s, box-shadow 0.4s;
}
.contrib:hover {
  border-color: var(--violet-400);
  box-shadow: var(--card-shadow-hover);
}

/* the stamp. Perforation is two mask layers: a tiled grid of punched
   holes, then a solid plate over the middle — their union keeps the
   center whole, so the holes only survive along the edges. */
.contrib__stamp {
  --ch: var(--violet-500);
  --hole: 3.5px;
  flex: none;
  display: block;
  position: relative;
  width: 78px;
  padding: 8px 8px 18px;
  background:
    linear-gradient(160deg,
      color-mix(in srgb, var(--ch) 24%, var(--moon)),
      color-mix(in srgb, var(--ch) 9%, var(--moon)) 70%);
  rotate: -2.4deg;
  transition: rotate 0.45s var(--ease-out), scale 0.45s var(--ease-out);
  mask:
    radial-gradient(var(--hole), transparent 98%, #000)
      calc(var(--hole) * -1.5) calc(var(--hole) * -1.5) /
      calc(var(--hole) * 3) calc(var(--hole) * 3) round,
    linear-gradient(#000 0 0)
      50% / calc(100% - var(--hole) * 3) calc(100% - var(--hole) * 3) no-repeat;
}
.contrib__stamp--dusk { --ch: var(--dusk-500); }
.contrib__stamp--rose { --ch: var(--rose-500); }
/* alternate the lean so a row never tilts in step */
.contrib:nth-child(even) .contrib__stamp { rotate: 1.8deg; }
.contrib:hover .contrib__stamp { rotate: 0deg; }
/* the stamp is the link — it perks up a little extra under the cursor */
a.contrib__stamp:hover,
a.contrib__stamp:focus-visible { rotate: 0deg; scale: 1.06; }
/* the printed entry number in the stamp's bottom strip */
.contrib__stamp::after {
  content: "N\00BA " attr(data-no);
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.56rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.09em;
  color: color-mix(in srgb, var(--ch) 75%, var(--plum-800));
}
.contrib__photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--plum-700);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ch) 35%, transparent);
}
.contrib__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: avatar-in 0.6s ease;
}
.contrib__initial {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: color-mix(in srgb, var(--ch) 45%, var(--moon));
}
.contrib__photo.has-photo .contrib__initial { visibility: hidden; }

.contrib__text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}
.contrib__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--tx);
}

/* role chips — the first shows, the rest pop in behind the +N button */
.contrib__roles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.15rem;
}
.contrib__role {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  white-space: nowrap;
}
.contrib__role--extra {
  animation: role-pop 0.35s var(--ease-out) backwards;
  animation-delay: calc(var(--k, 0) * 60ms);
}
@keyframes role-pop {
  from { opacity: 0; transform: scale(0.7); }
}
.contrib__more-roles {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  background: none;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s var(--ease-out);
}
.contrib__more-roles:hover { transform: translateY(-1px); border-color: var(--accent); }
.contrib__more-roles[aria-expanded="true"] {
  background: var(--accent);
  border-style: solid;
  border-color: transparent;
  color: var(--panel);
}
/* which game the credit belongs to (omitted on the game's own page) */
.contrib__game {
  font-size: 0.78rem;
  color: var(--tx-muted);
  margin-top: 0.2rem;
}

/* collapsed cards fade in with a stagger as the box opens — the
   open/close mechanics themselves are shared with the games list */
.contrib-more .contrib { opacity: 0; transition: opacity 0.5s ease; }
.contrib-more.is-open .contrib {
  opacity: 1;
  transition-delay: calc(var(--i, 0) * 70ms);
}
.contrib-more .contrib-grid { padding-top: 1.1rem; }

/* // GAME PAGE — /game/<slug> hero, trail, postmark */
/* // GAME PAGE (/GAMES/<SLUG>) */
/* the credits split into sectors (Developers, Management) — each heading
   after the first sits clear of the grid above it */
#gameCreditsArea .contrib-grid + .team__heading { margin-top: clamp(2rem, 4.5vw, 3rem); }
.game-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.92fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
@media (max-width: 900px) {
  .game-hero { grid-template-columns: 1fr; }
}
.game-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.9rem;
}
.game-hero__cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--plum-700);
  box-shadow: 0 1px 0 rgba(245, 238, 251, 0.06) inset, 0 40px 70px -38px rgba(0, 0, 0, 0.85);
}
.game-hero__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* the same glare sweep the game cards wear */
.game-hero__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(244, 238, 251, 0.1) 50%, transparent 62%);
  translate: -140% 0;
  transition: translate 1s var(--ease-out);
}
.game-hero__cover:hover::after { translate: 140% 0; }
/* ----- game hero extras: the trail, the postcard, the postmark ----- */
.game-hero { position: relative; }

/* eyebrow doubles as the way back to the games list */
.game-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: color 0.3s;
}
.game-hero__back::before {
  content: "←";
  transition: transform 0.35s var(--ease-out);
}
.game-hero__back:hover { color: var(--violet-200); }
.game-hero__back:hover::before { transform: translateX(-4px); }

/* the dashed expedition line drifting behind the hero, ending on an X
   at the cover — same idea as the index hero's path, drawn in starlight */
.game-trail {
  position: absolute;
  inset: -8% -4%;
  width: 108%;
  height: 116%;
  z-index: -1;
  pointer-events: none;
}
.game-trail__line {
  fill: none;
  stroke: rgba(181, 164, 217, 0.15);
  stroke-width: 2;
  stroke-dasharray: 5 13;
  stroke-linecap: round;
  animation: path-drift 90s linear infinite;
}
.game-trail__dot {
  fill: rgba(181, 164, 217, 0.28);
  animation: dot-pulse 4s ease-in-out infinite alternate;
}
.game-trail__dot--late { animation-delay: 1.7s; }
.game-trail__mark path {
  fill: none;
  stroke: rgba(194, 160, 189, 0.4);
  stroke-width: 2.4;
  stroke-linecap: round;
}
@media (max-width: 900px) { .game-trail { display: none; } }

/* the cover leans like a postcard on a desk; tilt (initTilt) adds the
   rest of the life on hover */
.game-hero__art { position: relative; }
.game-hero__cover { rotate: -1.4deg; }

/* the studio postmark presses in over the cover's edge once the hero
   has settled */
.game-hero__postmark {
  position: absolute;
  top: -26px;
  right: -18px;
  width: 92px;
  height: 92px;
  rotate: -14deg;
  pointer-events: none;
  animation: postmark-press 0.5s var(--ease-out) 1.15s backwards;
}
.game-hero__postmark circle {
  fill: none;
  stroke: rgba(207, 195, 232, 0.5);
  stroke-width: 1.5;
}
.game-hero__postmark text {
  fill: rgba(207, 195, 232, 0.62);
  font-family: var(--font-body);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.game-hero__postmark-year {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}
@keyframes postmark-press {
  from { opacity: 0; scale: 1.7; rotate: -2deg; }
}

/* the in-development notice wears the studio spark */
.game-soon { align-items: center; }
.game-soon__spark {
  flex: none;
  width: 26px;
  height: 26px;
  fill: var(--accent);
  animation: soon-glint 2.6s ease-in-out infinite;
}
@keyframes soon-glint {
  0%, 100% { transform: scale(0.85) rotate(-8deg); opacity: 0.55; }
  50%      { transform: scale(1.05) rotate(8deg);  opacity: 1; }
}

/* // SECTIONS — stats, partners, games grid + cards */
/* // STATS */
.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 1.2rem;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2rem 1.8rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s, border-color 0.4s;
}
.stat:hover {
  transform: translateY(-5px);
  border-color: var(--violet-300);
  box-shadow: var(--card-shadow-hover);
}
.stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.8rem;
  width: 30px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--violet-500), var(--rose-400));
  opacity: 0.7;
  transition: width 0.45s var(--ease-out), opacity 0.45s;
}
.stat:hover::before { width: 54px; opacity: 1; }

.stat__value {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(110deg, var(--h2-grad-a, var(--accent)), var(--h2-grad-b, var(--accent)) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
  transition: transform 0.45s var(--ease-out);
  transform-origin: left center;
}
.stat:hover .stat__value { transform: translateX(4px); }
.stat__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tx-muted);
}

.live-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--violet-500);
  animation: live-pulse 2.2s ease-in-out infinite;
}
/* radar ping rippling out of the dot */
.live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--violet-500);
  animation: ping 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping {
  0%        { transform: scale(1); opacity: 0.5; }
  70%, 100% { transform: scale(2.6); opacity: 0; }
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.8); }
}

.stat__cap {
  font-size: 0.78rem;
  color: var(--tx-muted);
  opacity: 0.75;
}

.stats__note {
  margin-top: 2rem;
  color: var(--tx-muted);
  font-size: 0.95rem;
  font-style: italic;
}

/* // PARTNERS */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  padding: 0.5rem 0;
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee var(--marquee-dur, 28s) linear infinite;
}
/* spacing via margin, not gap, so the two duplicated halves are EXACTLY the
   same width — translateX(-50%) then wraps with no seam jump. (With flex
   `gap`, -50% lands half a gap off and the row visibly hitches each loop.) */
.marquee__track > * { margin-right: 1.4rem; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

.marquee--reverse .marquee__track { animation-direction: reverse; }
.partners__rows .marquee + .marquee { margin-top: 1.2rem; }

.partner-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  min-height: 86px;
  padding: 1.5rem 2.4rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  transition: border-color 0.35s, transform 0.35s var(--ease-out), box-shadow 0.35s;
}
.partner-tile:hover { border-color: var(--violet-400); transform: translateY(-3px); box-shadow: var(--card-shadow-hover); }
.partner-tile img {
  max-height: 42px;
  filter: grayscale(1) brightness(1.4);
  opacity: 0.8;
  transition: filter 0.35s, opacity 0.35s;
}
.partner-tile:hover img { filter: none; opacity: 1; }
.partner-tile span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--violet-200);
  white-space: nowrap;
}

.partners-soon {
  color: var(--tx-muted);
  font-style: italic;
}

/* // GAMES */
.games__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.6rem;
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s, border-color 0.45s;
}
.game-card--playable:hover,
.game-card--playable:focus-within {
  transform: translateY(-6px);
  border-color: var(--violet-400);
  box-shadow: var(--card-shadow-hover);
}
.game-card--playable:focus-within { outline: 2px solid var(--violet-500); outline-offset: 3px; }

/* invisible link covering the whole card — the main "play" click target.
   The small link buttons sit on a higher layer, so they stay clickable. */
.game-card__play {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.game-card__play:focus { outline: none; }

.game-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--plum-700);
}
.game-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out), opacity 0.5s ease;
}
.game-card:hover .game-card__media img { transform: scale(1.05); }

/* a soft glare sweeps across the cover on hover (matches the buttons) */
.game-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(244, 238, 251, 0.13) 50%, transparent 62%);
  translate: -140% 0;
  transition: translate 0.9s var(--ease-out);
}
.game-card:hover .game-card__media::after { translate: 140% 0; }

/* hover overlay over the cover — link buttons lower-left, live stats
   lower-right. Slides up on hover/focus, always visible on touch. */
.game-card__overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 2.2rem 0.8rem 0.8rem;
  background: linear-gradient(180deg, transparent, rgba(19, 13, 29, 0.88) 60%);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s, transform 0.35s var(--ease-out);
  /* the strip sits above the card's stretched play link and would eat
     clicks on the lower half of the cover (even at opacity 0) — let them
     fall through; only the buttons and chips inside are interactive */
  pointer-events: none;
}
.game-card__overlay .mini-link,
.game-card__overlay .chip { pointer-events: auto; }
.game-card:hover .game-card__overlay,
.game-card:focus-within .game-card__overlay {
  opacity: 1;
  transform: none;
}
@media (hover: none) {
  .game-card__overlay { opacity: 1; transform: none; }
}

.game-card__links {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.game-card__stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.mini-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  color: #e7e1f3;
  background: rgba(34, 24, 54, 0.75);
  border: 1px solid rgba(181, 164, 217, 0.22);
  transition: transform 0.3s var(--ease-out), border-color 0.3s, background 0.3s, color 0.3s;
}
.mini-link svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}
.mini-link img {
  width: 17px;
  height: 17px;
  object-fit: contain;
}
.mini-link:hover {
  transform: translateY(-2px);
  border-color: var(--violet-300);
  background: var(--plum-700);
  color: var(--moon);
}

/* PNG brand badges — every icon renders as the same-size circle.
   "cover" icons (Roblox, X) fill the whole button; the Discord glyph
   sits on its brand color, recolored white via filter. */
.mini-link--cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.mini-link--cover:hover { border-color: var(--violet-300); background: rgba(34, 24, 54, 0.75); }
.mini-link--discord { background: #5865f2; border-color: rgba(244, 238, 251, 0.25); }
.mini-link--discord img { filter: brightness(0) invert(1); }
.mini-link--discord:hover { background: #6a76f4; border-color: rgba(244, 238, 251, 0.45); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #e7e1f3;
  background: rgba(34, 24, 54, 0.75);
  border: 1px solid rgba(181, 164, 217, 0.22);
  border-radius: 999px;
  padding: 0.3rem 0.68rem;
  white-space: nowrap;
  transition: transform 0.3s var(--ease-out), border-color 0.3s;
}
.chip:hover { transform: translateY(-2px); border-color: rgba(181, 164, 217, 0.5); }
.chip b { font-weight: 700; font-variant-numeric: tabular-nums; }
.chip svg { width: 12px; height: 12px; fill: currentColor; flex-shrink: 0; }
.chip--live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8ad6a2;
  animation: live-pulse 2.2s ease-in-out infinite;
}

/* genre badge from Roblox, top-left of the cover */
.game-card__genre {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 2;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #e7e1f3;
  background: rgba(19, 13, 29, 0.72);
  border: 1px solid rgba(181, 164, 217, 0.25);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
}

.game-card__body {
  padding: 1.3rem 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

/* favorites / server size / last updated — filled from Roblox */
.game-card__meta {
  font-size: 0.8rem;
  color: var(--tx-muted);
  opacity: 0.85;
}
.game-card__body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--tx);
  transition: color 0.35s;
}
.game-card:hover .game-card__body h3 { color: var(--accent); }
.game-card__body p {
  font-size: 0.93rem;
  color: var(--tx-muted);
  flex: 1;
}
.game-card__cta {
  margin-top: 0.7rem;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}
.game-card__cta::after {
  content: "→";
  display: inline-block;
  margin-left: 0.4rem;
  transition: transform 0.35s var(--ease-out);
}
.game-card:hover .game-card__cta::after { transform: translateX(5px); }

/* text cover — used by projects with no Roblox page and no image yet */
.game-card__text-cover {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background:
    radial-gradient(420px 200px at 80% -10%, rgba(149, 128, 196, 0.25), transparent 70%),
    radial-gradient(320px 190px at 8% 112%, rgba(168, 121, 155, 0.18), transparent 70%),
    linear-gradient(135deg, var(--plum-700), #463263);
  background-size: 150% 150%, 160% 160%, 180% 180%;
  /* slow living gradient for in-dev covers; alternate keeps it seamless */
  animation: cover-drift 14s ease-in-out infinite alternate;
}
@keyframes cover-drift {
  from { background-position: 0% 0%, 100% 100%, 100% 0%; }
  to   { background-position: 100% 100%, 0% 0%, 0% 100%; }
}
.game-card__text-cover span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  letter-spacing: -0.01em;
  color: var(--violet-200);
  text-align: center;
  text-wrap: balance;
}

/* shown instead of "Play on Roblox" on unreleased projects */
.game-card__status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.7rem;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--tx-muted);
}
.game-card__status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--violet-400);
  animation: live-pulse 2.2s ease-in-out infinite;
}
/* unreleased cards show the status line AND the page link under it */
.game-card__status + .game-card__cta { margin-top: 0.15rem; }

/* teaser cards shown while the games list is empty */
.game-card--teaser { cursor: default; }
.game-card--teaser .game-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(125deg, #e8e0f4 0%, #f7f2fd 50%, #e3daf1 100%);
  background-size: 200% 200%;
  /* `alternate` eases the gradient across and then back instead of snapping
     to the start — a calm breathing loop with no teleport */
  animation: teaser-breathe 9s ease-in-out infinite alternate;
}
@keyframes teaser-breathe {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}
.teaser-mark {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--violet-300);
  opacity: 0.55;
  /* the gentle bob uses the standalone `translate` property; hover uses
     `scale`/`rotate` — separate properties, so the float and the hover pop
     compose instead of one animation clobbering the other's transform */
  transition: scale 0.5s var(--ease-out), rotate 0.5s var(--ease-out), opacity 0.5s;
  animation: teaser-float 5s ease-in-out infinite alternate;
}
@keyframes teaser-float {
  from { translate: 0 -4px; }
  to   { translate: 0 4px; }
}
.game-card--teaser:hover { border-color: var(--violet-300); }
.game-card--teaser:hover .teaser-mark { scale: 1.12; rotate: -4deg; opacity: 0.82; }
.teaser-tag {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--violet-600);
  background: rgba(248, 244, 253, 0.92);
  border: 1px solid var(--lilac-200);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
}

/* // GAMES: TOP 3 + COLLAPSIBLE "SHOW ALL" */
.games-toggle-wrap,
.contrib-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2.2rem;
}
.games-toggle,
.contrib-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
  padding: 0.75rem 1.6rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: transform 0.35s var(--ease-out), border-color 0.35s,
              background 0.35s, color 0.35s, box-shadow 0.35s;
}
.games-toggle:hover,
.contrib-toggle:hover {
  transform: translateY(-2px);
  border-color: var(--violet-400);
  color: var(--violet-600);
  background: var(--panel-hover);
  box-shadow: 0 16px 30px -22px rgba(95, 75, 139, 0.5);
}
.games-toggle__chevron,
.contrib-toggle__chevron {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  transition: transform 0.4s var(--ease-out);
}
.games-toggle[aria-expanded="true"] .games-toggle__chevron,
.contrib-toggle[aria-expanded="true"] .contrib-toggle__chevron { transform: rotate(180deg); }
.games-toggle:active,
.contrib-toggle:active { transform: scale(0.97); transition-duration: 0.08s; }

/* the collapsible cards fade in with a gentle stagger as the section opens */
.games-more .game-card {
  opacity: 0;
  transition: opacity 0.5s ease;
}
.games-more.is-open .game-card {
  opacity: 1;
  transition-delay: calc(var(--i, 0) * 70ms);
}

/* the extra games tween open via grid-template-rows 0fr -> 1fr — animates
   height with no hard-coded pixel value, so any number of rows works */
.games-more,
.contrib-more {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.55s var(--ease-out), opacity 0.45s ease;
}
.games-more.is-open,
.contrib-more.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
}
.games-more__inner,
.contrib-more__inner {
  overflow: hidden;
  min-height: 0;
}
.games-more #gamesGridMore { padding-top: 1.6rem; }

/* // CREW — member cards, board variant, open positions */
/* // ABOUT */
#about .container--narrow { position: relative; }

/* compass — the needle turns as you scroll (see main.js) */
.compass {
  position: absolute;
  top: -0.6rem;
  right: 0;
  width: 110px;
  height: 110px;
  fill: none;
  stroke: rgba(181, 164, 217, 0.32);
  stroke-width: 1.5;
}
.compass__needle path {
  fill: rgba(181, 164, 217, 0.42);
  stroke: none;
}
.compass__needle circle {
  fill: var(--plum-900);
  stroke: rgba(181, 164, 217, 0.5);
}
.compass__needle {
  transform-box: fill-box;
  transform-origin: center;
}
/* easter egg: clicking the compass spins the needle (see main.js) */
.compass__needle.is-spun { animation: needle-spin 1.4s cubic-bezier(0.2, 0.8, 0.25, 1); }
@keyframes needle-spin { to { transform: rotate(1080deg); } }
@media (max-width: 760px) { .compass { display: none; } }

.about__copy {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  font-size: 1.08rem;
  color: #cfc6e2;
  max-width: 62ch;
}

/* // THE CREW */
.team { margin-top: clamp(2.4rem, 5vw, 3.4rem); }
.team__heading {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--violet-200);
  margin-bottom: 1.2rem;
}
.team__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.1rem;
}
.member {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18rem;
  padding: 1.6rem 1rem 1.45rem;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  transition: transform 0.4s var(--ease-out), border-color 0.4s, box-shadow 0.4s;
}
a.member:hover {
  transform: translateY(-5px);
  border-color: var(--violet-400);
  box-shadow: var(--card-shadow-hover);
}

.member__avatar {
  --ring: var(--violet-400);
  --orbit-dur: 9s;
  position: relative;
  width: 86px;
  height: 86px;
  margin-bottom: 0.85rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--plum-700);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ring) 55%, transparent);
}
.member__avatar--dusk { --ring: var(--dusk-400); --orbit-dur: 12s; }
.member__avatar--rose { --ring: var(--rose-400); --orbit-dur: 7.5s; }

.member__avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  animation: avatar-in 0.6s ease;
}
@keyframes avatar-in { from { opacity: 0; transform: scale(0.92); } }
.member__initial {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--ring);
}
.member__avatar.has-photo .member__initial { visibility: hidden; }

/* the satellite — a faint orbit track with a small moon circling it */
.member__orbit {
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ring) 22%, transparent);
  animation: orbit var(--orbit-dur) linear infinite;
  pointer-events: none;
}
.member__orbit i {
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--ring);
}
@keyframes orbit { to { transform: rotate(360deg); } }
/* stagger the satellites so they never line up */
.member:nth-child(2) .member__orbit { animation-delay: -4s; }
.member:nth-child(3) .member__orbit { animation-delay: -7s; }

/* // BOARD VARIANT (/TEAM) */
.team__grid--board {
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 1.4rem;
}
.member--lead {
  --mh: var(--violet-400);
  position: relative;
  overflow: hidden;
  padding: 2.4rem 1.4rem 2.1rem;
  border-radius: 22px;
}
.member--dusk { --mh: var(--dusk-400); }
.member--rose { --mh: var(--rose-400); }
/* the numeral, outlined like the big section indices */
.member--lead::before {
  content: attr(data-numeral);
  content: attr(data-numeral) / "";
  position: absolute;
  top: 0.55rem;
  right: 1rem;
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--mh) 62%, transparent);
  pointer-events: none;
}
/* inner hairline frame */
.member--lead::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid color-mix(in srgb, var(--mh) 26%, transparent);
  border-radius: 16px;
  pointer-events: none;
  transition: border-color 0.4s;
}
a.member--lead:hover::after {
  border-color: color-mix(in srgb, var(--mh) 55%, transparent);
}
.member--lead .member__avatar {
  width: 106px;
  height: 106px;
  margin-bottom: 1.05rem;
}
.member--lead .member__orbit { inset: -11px; }
.member--lead .member__initial { font-size: 2.4rem; }
.member--lead .member__name { font-size: 1.16rem; }
.member--lead .member__craft { font-size: 0.9rem; }

.member__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--tx);
}
/* two lines: position in the org, then what they actually make */
.member__role {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
}
.member__craft {
  font-size: 0.85rem;
  color: var(--tx-muted);
}

.about__values {
  margin-top: clamp(2.4rem, 5vw, 3.6rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.3rem;
}
.value {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.6rem 1.5rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s, border-color 0.4s;
}
.value:hover { transform: translateY(-4px); border-color: var(--violet-400); box-shadow: var(--card-shadow-hover); }
.value h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--violet-200);
  margin-bottom: 0.5rem;
  transition: color 0.35s;
}
.value:hover h3 { color: var(--moon); }
.value p { font-size: 0.92rem; color: var(--tx-muted); }

/* // OPEN POSITIONS */
/* the dashed expedition trail wandering across the section toward its
   marker — same idea as the hero's path, drawn in daylight ink */
.join-trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
.join-trail__line {
  fill: none;
  stroke: rgba(95, 75, 139, 0.22);
  stroke-width: 2;
  stroke-dasharray: 5 13;
  stroke-linecap: round;
  animation: path-drift 90s linear infinite;
}
.join-trail__dot {
  fill: rgba(95, 75, 139, 0.30);
  animation: dot-pulse 4s ease-in-out infinite alternate;
}
.join-trail__dot--dusk { fill: rgba(70, 81, 142, 0.30); animation-delay: 1.6s; }
.join-trail__mark circle {
  fill: none;
  stroke: rgba(141, 90, 124, 0.45);
  stroke-width: 2;
}
.join-trail__mark path {
  fill: none;
  stroke: rgba(141, 90, 124, 0.40);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.position {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  transition: border-color 0.35s, box-shadow 0.35s, transform 0.4s var(--ease-out),
              background 0.35s;
}
.position + .position { margin-top: 0.9rem; }
.position:hover { border-color: var(--violet-400); transform: translateY(-2px); }
.position.is-open {
  border-color: var(--violet-400);
  background: var(--panel-hover);
  box-shadow: var(--card-shadow-hover);
  transform: none;
}
/* gradient rail along the left edge, grows in on hover and stays while open */
.position::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--violet-500), var(--rose-400));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.45s var(--ease-out);
}
.position:hover::before,
.position.is-open::before { transform: scaleY(1); }

.position__head {
  display: grid;
  grid-template-columns: auto auto auto 1fr auto;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.3rem 1rem 1.1rem;
  text-align: left;
  cursor: pointer;
}

/* the role's icon, in a tinted ring that lights up when the row opens */
.position__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  transition: background 0.35s, color 0.35s, border-color 0.35s,
              transform 0.45s var(--ease-out);
}
.position__badge svg { width: 20px; height: 20px; }
.position:hover .position__badge { transform: rotate(-6deg) scale(1.06); }
.position.is-open .position__badge {
  background: linear-gradient(135deg, var(--violet-500), var(--rose-400) 130%);
  color: var(--moon);
  border-color: transparent;
  transform: none;
}

.position__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--tx);
  white-space: nowrap;
  transition: color 0.35s;
}
.position:hover .position__title,
.position.is-open .position__title { color: var(--accent); }
.position__tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 999px;
  padding: 0.26rem 0.66rem;
  white-space: nowrap;
}
.position__summary {
  color: var(--tx-muted);
  font-size: 0.92rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* chevron in its own ring, so the row reads as clickable */
.position__chev {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--accent);
  transition: background 0.35s, border-color 0.35s;
}
.position:hover .position__chev { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.position.is-open .position__chev {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
}
.position__chevron {
  width: 16px;
  height: 16px;
  transition: transform 0.45s var(--ease-out);
}
.position.is-open .position__chevron { transform: rotate(180deg); }

/* expand via grid-template-rows 0fr -> 1fr (same trick as "show all games");
   the content inside fades in a beat behind the height */
.position__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease-out);
}
.position.is-open .position__body { grid-template-rows: 1fr; }
.position__inner {
  overflow: hidden;
  min-height: 0;
  /* indented past the badge so the details line up under the title */
  padding: 0 1.4rem 0 calc(1.1rem + 42px + 1rem);
}
.position__inner > * {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.4s var(--ease-out);
}
.position.is-open .position__inner > * {
  opacity: 1;
  transform: none;
  transition-delay: 0.12s;
}
.position__points {
  margin: 0.1rem 0 1.15rem;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: var(--tx-muted);
  font-size: 0.94rem;
}
.position__points li::marker { color: var(--violet-400); }
.position__cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  margin-bottom: 1.35rem;
}
.position__apply {
  font-size: 0.9rem;
  padding: 0.7rem 1.4rem;
}
.position__hint {
  font-size: 0.85rem;
  color: var(--tx-muted);
}

@media (max-width: 760px) {
  .position__head { grid-template-columns: auto 1fr auto; gap: 0.55rem 0.9rem; }
  .position__badge { grid-row: 1; }
  .position__title { white-space: normal; }
  .position__tag { grid-row: 2; grid-column: 2; justify-self: start; }
  .position__summary { grid-row: 3; grid-column: 1 / -1; white-space: normal; }
  .position__chev { grid-row: 1; grid-column: 3; }
  .position__inner { padding: 0 1.2rem; }
}

/* // CONTACT — footer, pills, the contact modal + form */
/* // FOOTER / CONTACT */
.footer {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(900px 480px at 88% -6%, rgba(122, 100, 171, 0.08), transparent 60%),
    radial-gradient(800px 480px at -6% 70%, rgba(70, 81, 142, 0.07), transparent 60%),
    var(--plum-950);
  color: #ede8f6;
  --tx: #ede8f6;
  --tx-muted: #a89bc4;
  --panel: var(--plum-800);
  --line: rgba(181, 164, 217, 0.14);
  --accent: var(--violet-300);
  --card-shadow: 0 1px 0 rgba(245, 238, 251, 0.04) inset, 0 12px 26px -20px rgba(0, 0, 0, 0.7);
  --card-shadow-hover: 0 1px 0 rgba(245, 238, 251, 0.06) inset, 0 30px 54px -30px rgba(95, 75, 139, 0.55);
  --h2-grad-a: var(--violet-300);
  --h2-grad-b: var(--rose-300);
  padding: clamp(5rem, 11vw, 8rem) 0 2.4rem;
  scroll-margin-top: var(--nav-h);
}
/* giant outlined wordmark behind the footer content; every few seconds a
   soft band of light sweeps along the letters */
.footer::before {
  content: "EMVION NOMAD";
  position: absolute;
  left: 50%;
  bottom: -0.18em;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4rem, 13vw, 10.5rem);
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(181, 164, 217, 0.09);
  background: linear-gradient(100deg, transparent 38%, rgba(207, 195, 232, 0.14) 50%, transparent 62%) no-repeat;
  background-size: 55% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: wordmark-sheen 11s linear infinite;
  pointer-events: none;
}
@keyframes wordmark-sheen {
  0%, 55%  { background-position: -80% 0; }
  100%     { background-position: 190% 0; }
}
.footer > .container { position: relative; z-index: 1; }

/* stars over the footer too, plus a soft violet horizon rising from the
   bottom edge behind the giant wordmark — the whole layer breathes */
.footer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(56% 44% at 50% 106%, rgba(122, 100, 171, 0.18), transparent 70%),
    var(--stars);
  background-size: 100% 100%, var(--stars-size);
  opacity: 0.5;
  animation: twinkle-dim 12s ease-in-out infinite alternate;
}

.partner-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem 2.5rem;
  background: var(--plum-800);
  border: 1px dashed rgba(181, 164, 217, 0.3);
  border-radius: 22px;
  padding: clamp(1.6rem, 4vw, 2.4rem) clamp(1.6rem, 4vw, 2.8rem);
  margin-bottom: clamp(2rem, 5vw, 3.2rem);
  transition: border-color 0.4s;
}
.partner-cta:hover { border-color: var(--violet-400); }
.partner-cta h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.partner-cta p {
  color: var(--tx-muted);
  max-width: 54ch;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.4rem;
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

/* the highlighted form button that leads the contact row */
.contact-cta { font-size: 1rem; padding: 0.95rem 2.1rem; }

/* a channel shown as plain text (the email address) — semantically a button
   so keyboards can reach it, visually just text. Clicking copies it. */
.contact-text {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--violet-200);
  padding: 0.4rem 0.2rem;
  cursor: copy;
  transition: color 0.3s;
}
.contact-text:hover { color: var(--moon); }
.contact-text .pill-icon { width: 17px; height: 17px; flex-shrink: 0; }
.contact-text svg.pill-icon { fill: currentColor; }

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--violet-200);
  background: var(--plum-800);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.8rem 1.5rem;
  transition: transform 0.35s var(--ease-out), border-color 0.35s, color 0.35s;
}
.contact-pill:hover {
  transform: translateY(-3px);
  border-color: var(--violet-400);
  color: var(--moon);
  background: var(--plum-700);
}
.contact-pill .pill-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.contact-pill img.pill-icon {
  object-fit: cover;
  border-radius: 5px;
}
.contact-pill img.pill-icon--glyph {
  object-fit: contain;
  border-radius: 0;
}
.contact-pill svg.pill-icon { fill: currentColor; }

.contact-empty {
  color: var(--tx-muted);
  font-style: italic;
  max-width: 50ch;
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(181, 164, 217, 0.12);
  font-size: 0.85rem;
  color: #8f82ad;
}
.footer__legal .to-top {
  color: var(--violet-300);
  transition: color 0.3s;
}
.footer__legal .to-top:hover { color: var(--moon); }

/* // CONTACT MODAL */
.contact-modal {
  position: fixed;
  margin: auto;
  width: min(540px, 92vw);
  max-height: min(92vh, 800px);
  overflow-y: auto;
  color-scheme: dark; /* native widgets (select dropdown, autofill) match the dark panel */
  /* unlike the page, the modal keeps a slim scrollbar when the form
     overflows — otherwise the bottom just looks cut off */
  scrollbar-width: thin;
  scrollbar-color: var(--plum-700) transparent;
  /* tri-hue gradient border: panel gradient fills the padding box, the
     dusk→violet→rose line paints the 1px border box behind it. The star
     field rides along as extra background layers — the night sky follows
     you into the modal. */
  border: 1px solid transparent;
  border-radius: 24px;
  --pad: clamp(1.5rem, 4vw, 2.1rem);
  padding: var(--pad);
  background-image:
    var(--stars),
    radial-gradient(480px 260px at 85% -10%, rgba(122, 100, 171, 0.2), transparent 70%),
    linear-gradient(165deg, var(--plum-800), var(--plum-900)),
    linear-gradient(135deg, rgba(106, 118, 168, 0.55), rgba(149, 128, 196, 0.6) 50%, rgba(168, 121, 155, 0.55));
  background-size: var(--stars-size), 100% 100%, 100% 100%, 100% 100%;
  background-origin: padding-box, padding-box, padding-box, border-box;
  background-clip: padding-box, padding-box, padding-box, border-box;
  color: #ede8f6;
  box-shadow: 0 48px 90px -42px rgba(0, 0, 0, 0.85);
}
/* re-enable a thin scrollbar just for the modal (hidden globally above) */
.contact-modal::-webkit-scrollbar { display: block; width: 6px; }
.contact-modal::-webkit-scrollbar-track { background: transparent; }
.contact-modal::-webkit-scrollbar-thumb { background: var(--plum-700); border-radius: 8px; }
.contact-modal::-webkit-scrollbar-thumb:hover { background: var(--violet-500); }

.contact-modal__mark {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 0.5rem;
  vertical-align: -1px;
  fill: var(--violet-300);
  animation: mark-glint 4s ease-in-out infinite alternate;
}
@keyframes mark-glint {
  from { opacity: 0.55; transform: scale(0.88) rotate(-8deg); }
  to   { opacity: 1;    transform: scale(1.06) rotate(8deg); }
}
.contact-modal::backdrop {
  background: rgba(19, 13, 29, 0.62);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}
/* entrance: transform-only, via @starting-style. Deliberately no opacity
   or filter on the dialog itself — if the transition ever fails to run,
   the worst case is a modal sitting 14px low, never an invisible one. */
.contact-modal[open] {
  transform: none;
  transition: transform 0.45s var(--ease-out);
}
.contact-modal[open]::backdrop {
  opacity: 1;
  transition: opacity 0.45s ease;
}
@starting-style {
  .contact-modal[open] { transform: translateY(14px) scale(0.98); }
  .contact-modal[open]::backdrop { opacity: 0; }
}
/* exit: main.js adds .is-closing, lets this play, then closes the dialog.
   Opacity is safe here — worst case the timeout closes it anyway. */
.contact-modal.is-closing {
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.24s ease, transform 0.26s ease;
  pointer-events: none;
}
.contact-modal.is-closing::backdrop {
  opacity: 0;
  transition: opacity 0.26s ease;
}

/* // POSTCARD HEADER */
.contact-modal__head {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  overflow: hidden;
  margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) 1.35rem;
  padding: calc(var(--pad) + 0.15rem) var(--pad) 2.6rem;
  border-radius: 23px 23px 0 0;
  background:
    var(--stars),
    /* the moon — a quiet disc with one thin ring, no glow */
    radial-gradient(circle at 57% 16%, rgba(233, 226, 245, 0.14) 8px, transparent 9px),
    radial-gradient(circle at 57% 16%, transparent 12px, rgba(233, 226, 245, 0.06) 13px, transparent 14px),
    linear-gradient(170deg, #150e22, var(--plum-950));
  background-size: var(--stars-size), 100% 100%, 100% 100%, 100% 100%;
}
.contact-modal__head-text { min-width: 0; }
/* the horizon at the band's foot, in the panel color the form sits on */
.contact-modal__dune {
  position: absolute;
  left: -10px;
  bottom: -1px;
  width: calc(100% + 20px);
  height: 30px;
  color: var(--plum-800);
  fill: currentColor;
  transform: scaleY(-1);
  pointer-events: none;
}

.postage {
  position: relative;
  flex: 0 0 auto;
  margin: 0.35rem 2rem 0 0; /* clear of the close button */
}
.stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 60px;
  height: 74px;
  padding: 0.3rem;
  border: 1px dashed rgba(181, 164, 217, 0.5);
  border-radius: 6px;
  background: color-mix(in srgb, var(--plum-700) 70%, transparent);
  transform: rotate(4deg);
}
.stamp svg {
  width: 20px;
  height: 20px;
  fill: var(--violet-300);
}
.stamp b {
  font-family: var(--font-display);
  font-size: 0.48rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.4;
  color: #b3a6cf;
}
/* the cancellation mark, overlapping the stamp's corner */
.postmark {
  position: absolute;
  left: -52px;
  bottom: -14px;
  width: 76px;
  height: 76px;
  color: rgba(181, 164, 217, 0.5);
  transform: rotate(-12deg);
}
.postmark circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}
.postmark text {
  font-family: var(--font-body);
  font-size: 7.4px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  fill: currentColor;
}
.postmark__year {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
@media (max-width: 480px) {
  .postmark { display: none; }
  .stamp { width: 52px; height: 64px; }
  .postage { margin-right: 1.4rem; }
}

.contact-modal h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  padding-right: 0.5rem;
}
.contact-modal__lede {
  color: #a89bc4;
  font-size: 0.95rem;
  max-width: 40ch;
}
.contact-modal__close {
  position: absolute;
  z-index: 2; /* above the postcard header band */
  top: 1.1rem;
  right: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #a89bc4;
  border: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s, transform 0.35s var(--ease-out);
}
.contact-modal__close:hover {
  color: var(--moon);
  border-color: rgba(181, 164, 217, 0.3);
  transform: rotate(90deg);
}
.contact-modal__close svg { width: 16px; height: 16px; }

.contact-form { display: flex; flex-direction: column; gap: 0.95rem; }
.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.05rem;
}
/* an input's intrinsic min-width beats 1fr and overflows the cell otherwise */
.contact-form__row label { min-width: 0; }
.contact-form input { width: 100%; }
@media (max-width: 480px) { .contact-form__row { grid-template-columns: 1fr; } }

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #c9bfdd;
}
.contact-form label small { font-weight: 400; color: #8f82ad; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  font: inherit;
  font-size: 0.95rem;
  color: var(--moon);
  background-color: rgba(19, 13, 29, 0.55);
  border: 1px solid rgba(181, 164, 217, 0.22);
  border-radius: 12px;
  padding: 0.72rem 0.95rem;
  transition: border-color 0.3s, background-color 0.3s, box-shadow 0.3s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #8f82ad; opacity: 0.7; }
.contact-form input:hover,
.contact-form select:hover,
.contact-form textarea:hover { border-color: rgba(181, 164, 217, 0.4); }
/* keep Chrome's autofill from flashing its own colors over the plum panel */
.contact-form input:-webkit-autofill,
.contact-form input:-webkit-autofill:hover,
.contact-form input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #1a1230 inset;
  -webkit-text-fill-color: var(--moon);
  caret-color: var(--moon);
  transition: background-color 9999s ease-out;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--violet-400);
  background-color: rgba(19, 13, 29, 0.8);
  box-shadow: 0 0 0 3px rgba(122, 100, 171, 0.18);
}
.contact-form textarea { resize: vertical; min-height: 92px; }
.contact-form select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9' fill='none' stroke='%23a89bc4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 13px;
}

/* Developer / Investor / Partner cards */
.role-picker { border: 0; }
.role-picker legend {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #c9bfdd;
  margin-bottom: 0.55rem;
}
.role-picker__options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}
.role-picker label { position: relative; }
.role-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.role-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.85rem 0.4rem 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(181, 164, 217, 0.24);
  background: rgba(19, 13, 29, 0.45);
  color: #c9bfdd;
  text-align: center;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s var(--ease-out);
}
.role-card svg {
  width: 21px;
  height: 21px;
  margin-bottom: 0.25rem;
  color: var(--violet-300);
  transition: color 0.3s;
}
.role-card b {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.2;
}
.role-card small {
  font-size: 0.7rem;
  color: #8f82ad;
  transition: color 0.3s;
}
.role-card:hover {
  border-color: var(--violet-300);
  color: var(--moon);
  transform: translateY(-2px);
}
/* each role wears its own hue when picked — the same color its Discord
   embed arrives in */
.role-picker input:checked + .role-card {
  background: linear-gradient(150deg, var(--violet-500), var(--violet-600));
  border-color: transparent;
  color: var(--moon);
}
.role-picker input[value="Investor"]:checked + .role-card {
  background: linear-gradient(150deg, var(--dusk-400), var(--dusk-500));
}
.role-picker input[value="Partner"]:checked + .role-card {
  background: linear-gradient(150deg, var(--rose-400), var(--rose-500));
}
.role-picker input:checked + .role-card svg { color: var(--moon); }
.role-picker input:checked + .role-card small { color: rgba(244, 238, 251, 0.75); }
.role-picker input:focus-visible + .role-card {
  outline: 2px solid var(--violet-400);
  outline-offset: 2px;
}
@media (max-width: 430px) {
  .role-card small { display: none; }
  .role-card { padding: 0.7rem 0.3rem 0.65rem; }
}

/* ---------- attachments ---------- */
.attach { display: flex; flex-direction: column; gap: 0.5rem; }
.attach__label {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #c9bfdd;
}
.attach__label small { font-weight: 400; color: #8f82ad; }

/* the drop box — drag files onto it or click it to browse */
.attach__drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  width: 100%;
  padding: 1rem 1rem 0.9rem;
  border-radius: 14px;
  border: 1.5px dashed rgba(181, 164, 217, 0.35);
  background: rgba(19, 13, 29, 0.35);
  color: #c9bfdd;
  text-align: center;
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}
.attach__drop:hover,
.attach__drop.is-drag {
  border-color: var(--violet-300);
  background: rgba(149, 128, 196, 0.1);
  color: var(--moon);
}
.attach__drop.is-drag { border-style: solid; }
.attach__drop svg { width: 20px; height: 20px; }
.attach__drop-text { font-size: 0.9rem; }
.attach__drop-text b { font-family: var(--font-display); font-weight: 600; }
.attach__hint { font-size: 0.78rem; color: #8f82ad; }
.attach__hint.is-error { color: #d9a0a8; }

/* preview tiles for what's been added */
.attach__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding-top: 0.2rem;
}
.attach__item { position: relative; width: 96px; }
.attach__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(181, 164, 217, 0.25);
  background: rgba(19, 13, 29, 0.6);
  color: var(--violet-300);
}
.attach__thumb img,
.attach__thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.attach__thumb svg { width: 22px; height: 22px; }
.attach__name {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.68rem;
  color: #a89bc4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attach__remove {
  position: absolute;
  top: -7px;
  right: -7px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--plum-700);
  border: 1px solid rgba(181, 164, 217, 0.4);
  color: #e7e1f3;
  font-size: 0.85rem;
  line-height: 1;
  transition: background 0.25s, border-color 0.25s;
}
.attach__remove:hover { background: var(--rose-500); border-color: transparent; }

/* honeypot — parked far off-screen; never display:none so bots still see it */
.contact-form .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

#contactSubmit { margin-top: 0.3rem; align-self: flex-start; }
#contactSubmit:disabled { opacity: 0.6; cursor: wait; }

.contact-modal__status {
  font-size: 0.9rem;
  color: #a89bc4;
  /* room for two full lines (line-height 1.65), so a message never grows
     the dialog (the dialog is centered, so any growth makes it jump) */
  min-height: 3.4em;
  margin-top: -0.35rem;
}
.contact-modal__status.is-ok { color: #9ed6b2; }
.contact-modal__status.is-error { color: #d9a0a8; }

/* // MOTION — cursor spotlight, pointer parallax, reveals, reduced motion */
/* // CURSOR SPOTLIGHT */
.stat, .value, .game-card, .partner-tile, .partner-cta, .member, .contrib { position: relative; }

/* .member--lead's ::after is its inner frame, so the spotlight skips it;
   plain member cards get the highlight like everyone else */
.stat::after, .value::after, .game-card::after,
.partner-tile::after, .partner-cta::after, .contrib::after,
.member:not(.member--lead)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    240px circle at var(--mx, 50%) var(--my, 50%),
    rgba(149, 128, 196, 0.13),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.45s;
}
.stat:hover::after, .value:hover::after, .game-card:hover::after,
.partner-tile:hover::after, .partner-cta:hover::after, .contrib:hover::after,
.member:not(.member--lead):hover::after { opacity: 1; }

/* // POINTER PARALLAX */
@media (pointer: fine) {
  .hero__moon,
  .hero__constellation,
  .hero__spark--1,
  .hero__spark--2,
  .hero__path {
    transition: translate 0.7s var(--ease-out);
  }
  .hero__moon          { translate: calc(var(--par-x, 0) * -16px) calc(var(--par-y, 0) * -11px); }
  .hero__constellation { translate: calc(var(--par-x, 0) * -9px)  calc(var(--par-y, 0) * -7px); }
  .hero__spark--1      { translate: calc(var(--par-x, 0) * 13px)  calc(var(--par-y, 0) * 10px); }
  .hero__spark--2      { translate: calc(var(--par-x, 0) * 8px)   calc(var(--par-y, 0) * 6px); }
  .hero__path          { translate: calc(var(--par-x, 0) * 5px)   calc(var(--par-y, 0) * 4px); }
}

/* clicking a skychart star rides down to the member's card and pulses it */
.member.is-hailed {
  animation: member-hail 1.2s var(--ease-out);
}
@keyframes member-hail {
  0%, 100% { box-shadow: var(--card-shadow); }
  30% {
    box-shadow:
      0 0 0 4px color-mix(in srgb, var(--mh, var(--violet-400)) 40%, transparent),
      var(--card-shadow-hover);
  }
}

/* the satellite leans in when you hover a member card */
.member__orbit i { transition: scale 0.35s var(--ease-out); }
.member:hover .member__orbit i { scale: 1.7; }
.member .member__avatar { transition: box-shadow 0.35s; }
.member:hover .member__avatar {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ring) 85%, transparent);
}

/* // SCROLL REVEALS */
.reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  filter: blur(2px); /* a hint of settle-into-focus, kept subtle */
  transition: opacity 0.7s ease, transform 0.8s var(--ease-out), filter 0.55s ease;
  transition-delay: var(--rd, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

/* // REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-fade, .reveal { opacity: 1; transform: none; filter: none; }
}
