/* ============================================================
   ROBOTICS DIARIES — styles.css
   Static rebuild in the E-lab structural language, handwritten.
   Light theme shipped; tokens grouped so a [data-theme="dark"]
   block can re-map them later without touching components.

   Contents:
   01 tokens        02 base/reset      03 typography
   04 layout        05 buttons/chips   06 media placeholders
   07 navbar        08 hero            09 stats
   10 cards (feature/program/category/blog)
   11 slider        12 marquee         13 cta banner
   14 contact/forms 15 faq accordion   16 footer/ticker
   17 page: program detail / about / reviews / post
   18 helpers + reduced motion
   ============================================================ */

/* ---------- 00 SELF-HOSTED FONTS ----------
   Neue Machina is a commercial font (Pangram Pangram) — it is not on
   Google Fonts and there is no free CDN for it, which is why naming it
   in a font stack alone did nothing. To use it, buy/download the
   licence, convert to .woff2, drop the files in assets/fonts/ with the
   names below, and it takes over automatically.
   Until then these two rules 404 harmlessly and the stack falls
   through to Space Grotesk — delete them if you'd rather keep the
   console clean. */
@font-face {
  font-family: "Neue Machina";
  src: url("../assets/fonts/NeueMachina-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Neue Machina";
  src: url("../assets/fonts/NeueMachina-Ultrabold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* ---------- 01 TOKENS ---------- */
:root {
  /* fonts
     ⤷ Neue Machina first (self-hosted, see above); Space Grotesk is
     the closest free stand-in and renders until those files exist. */
  --font-head: "Neue Machina", "Space Grotesk", Arial, sans-serif;
  --font-body: "DM Sans", Helvetica, Arial, sans-serif;
  --font-mono: "DM Mono", "Courier New", monospace;

  /* neutrals (light) */
  --c-bg: #f7f5f1;
  --c-bg-2: #f0efe9;
  --c-bg-3: #e7e1d8;
  --c-text: #0c0d0f;
  --c-text-2: #565a63;
  --c-text-3: #979ba6;
  --c-line: #e0e4ea;

  /* ink (dark blocks inside the light page) */
  --c-ink: #101113;
  --c-ink-2: #1a1b1f;
  --c-ink-line: #33353b;
  --c-ink-text: #f4f5f7;
  --c-ink-text-2: #9ea3ad;

  /* accents — the site's single accent colour.
     ⤷ Every accent on every page reads from these four names, so this
     is the only place to change it. The names are historical (the
     palette used to be orange); the value is what matters. */
  --c-orange: #004aad;
  --c-orange-deep: #004aad;
  --c-coral: #004aad;
  --c-amber: #004aad;

  /* category tints */
  --t-blue: #ebf6ff;
  --t-purple: #eceafe;
  --t-green: #dff6e2;
  --t-sand: #f5e9d8;
  --t-blush: #feeeea;

  /* radii */
  --r-xxs: 0.5rem;
  --r-xs: 1rem;
  --r-s: 1.5rem;
  --r-m: 2rem;
  --r-l: 3rem;
  --r-pill: 120rem;

  /* spacing scale */
  --sp-3xs: 0.75rem;
  --sp-2xs: 1.25rem;
  --sp-xs: 2rem;
  --sp-s: 3rem;
  --sp-m: 3.5rem;
  --sp-l: 4rem;
  --sp-xl: 5rem;
  --sp-2xl: 6rem;
  --sp-3xl: 8rem;
  --sp-4xl: 10rem;
  --gap: 1rem;
  --gap-s: 0.5rem;

  /* type scale (desktop)
     ⤷ THE master text-size control for the whole site. Every heading,
       paragraph and button reads from these, so nudging a value here
       changes it everywhere. The three @media blocks below override
       the same names at each breakpoint. */
  --fs-h1: 4.75rem;
  --fs-h2: 3.875rem;
  --fs-h3: 2.125rem;
  --fs-h4: 1.3125rem;
  --fs-h5: 1.125rem;
  --fs-h6: 0.9375rem;
  --fs-subhead: 1.5rem;
  --fs-p1: 1.25rem;
  --fs-p2: 1rem;
  --fs-p3: 0.9375rem;
  --fs-btn: 1rem;

  /* motion */
  --ease-quint: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
  --dur-hover: 250ms;

  /* layout */
  --container: 110rem;
  --edge: 3rem;
  --nav-h: 3.25rem; /* ⤷ navbar height */
}

@media screen and (max-width: 991px) {
  :root {
    --fs-h1: 3.875rem;
    --fs-h2: 3.375rem;
    --fs-h3: 1.95rem;
    --fs-p1: 1.15rem;
    --sp-2xl: 5rem;
    --sp-3xl: 6rem;
    --edge: 2rem;
  }
}
@media screen and (max-width: 767px) {
  :root {
    --fs-h1: 3.25rem;
    --fs-h2: 2.75rem;
    --fs-h3: 1.75rem;
    --fs-subhead: 1.3rem;
    --fs-p1: 1.0625rem;
    --sp-xl: 4rem;
    --sp-2xl: 4.5rem;
    --sp-3xl: 5rem;
    --edge: 1.5rem;
  }
}
@media screen and (max-width: 479px) {
  :root {
    --fs-h1: 2.75rem;
    --fs-h2: 2.5rem;
    --fs-h3: 1.5rem;
    --fs-p1: 1rem;
    --edge: 1rem;
    --nav-h: 3.5rem;
  }
}

/* ---------- 02 BASE ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  font-size: var(--fs-p3);
  line-height: 1.4;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img,
svg,
video {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
ul,
ol {
  list-style: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
::selection {
  background: var(--c-orange);
  color: #fff;
}
:focus-visible {
  outline: 2px solid var(--c-orange-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 03 TYPOGRAPHY ---------- */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0;
  text-wrap: balance;
}
h1, .h1 { font-size: var(--fs-h1); line-height: 1; }
h2, .h2 { font-size: var(--fs-h2); line-height: 1.025; }
h3, .h3 { font-size: var(--fs-h3); line-height: 1.1; }
h4, .h4 { font-size: var(--fs-h4); line-height: 1.25; }
h5, .h5 { font-size: var(--fs-h5); line-height: 1.4; }
h6, .h6 { font-size: var(--fs-h6); line-height: 1.4; }
.subhead { font-family: var(--font-head); font-size: var(--fs-subhead); font-weight: 500; line-height: 1.25; }
.p1 { font-size: var(--fs-p1); line-height: 1.35; }
.p2 { font-size: var(--fs-p2); line-height: 1.4; }
.p3 { font-size: var(--fs-p3); line-height: 1.4; }
.text-2 { color: var(--c-text-2); }
.text-3 { color: var(--c-text-3); }
.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.measure { max-width: 48rem; }
.measure-s { max-width: 32rem; }
.measure-xs { max-width: 27rem; }

/* Content pages don't need hero-scale type — the home page gets away
   with big headings because the hero is the whole screen. Put
   class="page-tight" on <body> to run a page a notch smaller.
   ⤷ These re-declare the same token names on <body>, so they inherit
     down and win over the :root values, including at each breakpoint. */
.page-tight {
  --fs-h1: 3rem;
  --fs-h2: 2.25rem;
  --fs-h3: 1.6rem;
  --fs-h4: 1.1875rem;
  --fs-subhead: 1.25rem;
  --fs-p1: 1.0625rem;
}
@media screen and (max-width: 991px) {
  .page-tight {
    --fs-h1: 2.6rem;
    --fs-h2: 2.05rem;
    --fs-h3: 1.5rem;
    --fs-p1: 1rem;
  }
}
@media screen and (max-width: 767px) {
  .page-tight {
    --fs-h1: 2.2rem;
    --fs-h2: 1.85rem;
    --fs-h3: 1.4rem;
    --fs-subhead: 1.15rem;
  }
}

/* ---------- 04 LAYOUT ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--edge);
}
.section {
  padding-block: var(--sp-2xl);
}
.section--tall { padding-block: var(--sp-3xl); }
.section--secondary { background: var(--c-bg-2); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-xs);
  margin-bottom: var(--sp-s);
}
.section-head__intro { max-width: 44rem; }
.section-head__intro .p1 { margin-top: 1.25rem; }
.grid {
  display: grid;
  gap: var(--gap);
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--5 { grid-template-columns: repeat(5, 1fr); }
@media screen and (max-width: 991px) {
  .grid--3, .grid--4, .grid--5 { grid-template-columns: repeat(2, 1fr); }
  .section-head { flex-direction: column; align-items: flex-start; }
}
@media screen and (max-width: 767px) {
  .grid--2, .grid--3, .grid--4, .grid--5 { grid-template-columns: 1fr; }
}

/* ---------- 05 BUTTONS + CHIPS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.875rem 1.75rem;
  border-radius: var(--r-pill);
  background: var(--c-ink);
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--fs-btn);
  font-weight: 500;
  line-height: 1.5rem;
  white-space: nowrap;
  transition: background var(--dur-hover) var(--ease-cubic),
    color var(--dur-hover) var(--ease-cubic),
    border-color var(--dur-hover) var(--ease-cubic),
    transform var(--dur-hover) var(--ease-cubic);
}
.btn:hover { background: var(--c-orange-deep); transform: translateY(-2px); }
.btn--outline {
  background: transparent;
  color: var(--c-text);
  border: 1px solid var(--c-bg-3);
}
.btn--outline:hover { background: var(--c-bg-2); border-color: var(--c-text-3); transform: translateY(-2px); }
.btn--white { background: #fff; color: var(--c-ink); }
.btn--white:hover { background: var(--c-orange); color: #fff; }
.btn--orange { background: var(--c-orange-deep); color: #fff; }
.btn--orange:hover { background: var(--c-ink); }
.btn--sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.72rem;
  line-height: 1.2;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--c-bg-3);
  border-radius: var(--r-pill);
  background: var(--c-bg);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-2);
}
.chip--dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-orange-deep);
}
.chip--solid { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }
.chip--tint { border-color: transparent; background: var(--t-sand); color: var(--c-text); }

/* ---------- 06 MEDIA PLACEHOLDERS ---------- */
/* Clearly-labeled slots for Robotics Diaries' own photos/clips. */
.ph {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--r-s);
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, rgb(0 0 0 / 0.03) 14px 28px);
}
.ph--blue { background-color: var(--t-blue); }
.ph--purple { background-color: var(--t-purple); }
.ph--green { background-color: var(--t-green); }
.ph--sand { background-color: var(--t-sand); }
.ph--blush { background-color: var(--t-blush); }
.ph--grey { background-color: var(--c-bg-2); }
.ph__label {
  padding: 0.5rem 1rem;
  border: 1px dashed rgb(0 0 0 / 0.28);
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 0.65);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-2);
  text-align: center;
}
.story-photo .ph__label {
  display: none;
}
.story-photo .ph__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(0.6) contrast(1.02);
}
.ratio-4x3 { aspect-ratio: 4 / 3; }
.ratio-3x4 { aspect-ratio: 3 / 4; }
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-16x10 { aspect-ratio: 16 / 10; }
.ratio-1x1 { aspect-ratio: 1 / 1; }

/* ---------- 07 NAVBAR ---------- */
/* Fixed, not sticky: it sits out of the flow so the hero owns the top
   of the page. It shows on load and slides away once the user starts
   scrolling — a top-of-page bar only. JS adds .is-hidden past the
   threshold (see "NAVBAR" in js/main.js). */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: transform 450ms var(--ease-quint), visibility 450ms linear,
    border-color 400ms ease, box-shadow 400ms ease;
}
.navbar.is-hidden {
  transform: translateY(-100%);
  visibility: hidden;
}
/* a keyboard user tabbing in pulls it back, so the links stay reachable
   even once it has slid away */
.navbar.is-hidden:focus-within {
  transform: translateY(0);
  visibility: visible;
}
.navbar.is-scrolled {
  border-bottom-color: var(--c-line);
  box-shadow: 0 6px 24px rgb(12 13 15 / 0.05);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-xs);
  height: var(--nav-h);
}
.navbar__brand {
  display: flex;
  align-items: center;
  gap: 0.35rem; /* ⤷ space between the mark and the wordmark */
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.navbar__brand-logo {
  width: 5.1rem;
  height: 5.1rem;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center;
}
.navbar__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 0.8;
  gap: 0.04rem;
}
/* The two words are stretched to an identical width by js/main.js,
   which measures them and scales the narrower one. Doing it in JS
   rather than with a hand-picked letter-spacing keeps them matched if
   the font, size or wording ever changes.
   transform doesn't affect layout, so nothing shifts around it. */
.navbar__brand-line {
  display: block;
  /* shrink to the text: as flex items these would otherwise stretch to
     the column's width, and the script would measure equal boxes
     instead of the actual words */
  align-self: flex-start;
  width: fit-content;
  line-height: 0.85;
  font-size: 0.82rem;
  letter-spacing: -0.04em;
  white-space: nowrap;
  transform-origin: left center;
}
.navbar__menu {
  display: flex;
  align-items: center;
  gap: 1.6rem; /* ⤷ space between links (no pills, so gap does the work) */
}
/* Plain text links — no pill backgrounds. Hover and the active page
   are signalled with colour alone. */
.nav-link {
  position: relative;
  padding: 0.35rem 0;
  border-radius: 0;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--c-text-2);
  background: none;
  transition: color var(--dur-hover) var(--ease-cubic);
}
.nav-link:hover,
.nav-link[aria-expanded="true"] { background: none; color: var(--c-text); }
.nav-link.is-active { color: var(--c-orange-deep); }
.nav-link--dd { display: inline-flex; align-items: center; gap: 0.4rem; }
/* the dropdown chevron carries the accent colour */
.nav-link--dd::after { color: var(--c-orange-deep); }
.nav-link--dd::after {
  content: "";
  width: 0.5em;
  height: 0.5em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 250ms var(--ease-cubic);
}
.nav-link--dd[aria-expanded="true"]::after { transform: rotate(-135deg) translateY(-2px); }
.navbar__actions { display: flex; align-items: center; gap: 0.75rem; }

/* mega dropdown */
.nav-dd {
  position: relative;
}
.nav-dd__panel {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  translate: -50% 0;
  min-width: 34rem;
  padding: 1.25rem;
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--r-s);
  box-shadow: 0 24px 60px rgb(12 13 15 / 0.12);
}
.nav-dd__panel.is-open { display: grid; }
.nav-dd__col-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-3);
  padding: 0.35rem 0.75rem;
}
.nav-dd__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--r-xs);
  font-weight: 500;
  transition: background var(--dur-hover) var(--ease-cubic);
}
.nav-dd__link:hover { background: var(--c-bg-2); }
.nav-dd__tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-3);
  border: 1px solid var(--c-bg-3);
  border-radius: var(--r-pill);
  padding: 0.2rem 0.55rem;
}

/* mobile */
.navbar__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  border-radius: 50%;
  border: 1px solid var(--c-bg-3);
}
.navbar__burger span {
  width: 1.25rem;
  height: 2px;
  border-radius: 2px;
  background: var(--c-text);
  transition: transform 300ms var(--ease-cubic), opacity 200ms;
}
.navbar__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.navbar__burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

@media screen and (max-width: 991px) {
  .navbar__menu {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    z-index: 99;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.25rem;
    padding: var(--sp-xs) var(--edge) var(--sp-s);
    background: var(--c-bg);
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-0.5rem);
    transition: opacity 400ms ease, transform 400ms ease, visibility 400ms;
  }
  .navbar__menu.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
  }
  .nav-link {
    font-family: var(--font-head);
    font-size: 1.5rem;
    line-height: 2rem;
    padding: 0.75rem 0.5rem;
  }
  .nav-dd__panel {
    position: static;
    translate: none;
    min-width: 0;
    border: 0;
    box-shadow: none;
    padding: 0 0.5rem 0.75rem;
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .navbar__burger { display: flex; }
  .navbar__actions .btn { display: none; }
  .navbar__menu .btn { margin-top: var(--sp-xs); }
}

/* ---------- 08 HERO ---------- */
.hero {
  padding-block: var(--sp-3xs) var(--sp-2xl);
  min-height: calc(70svh - var(--nav-h));
  display: flex;
  align-items: center; /*cross axis*/
  justify-content: center;

}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-l);
  align-items: center;
  justify-items: center;
  width: 100%;
}
/*.hero__text {  }*/
.hero__title { margin-top: 0; text-transform: uppercase; }
.hero__title .accent { color: var(--c-orange-deep); }
.hero__sub { margin-top: 1.5rem; }
.hero__cta { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero__media {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}
.hero__media .ph:nth-child(1) { margin-top: 2.5rem; rotate: -2deg; }
.hero__media .ph:nth-child(2) { rotate: 2deg; }
.hero__media .ph:nth-child(3) { grid-column: 1 / -1; }
.hero__pill {
  position: absolute;
  z-index: 2;
  padding: 0.6rem 1.1rem;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 12px 32px rgb(12 13 15 / 0.18);
}
.hero__pill--ink { background: var(--c-ink); color: #fff; top: 0.75rem; left: -1rem; }
.hero__pill--orange { background: var(--c-orange-deep); color: #fff; bottom: 6rem; right: -0.75rem; }
@media screen and (max-width: 991px) {
  .hero { min-height: 0; }
  .hero__grid { grid-template-columns: 1fr; gap: var(--sp-s); }
  .hero__pill--ink { left: 0; }
  .hero__pill--orange { right: 0; }
}

/* ---------- 08b HERO — OBJECT STAGE ----------
   Centred headline with decorative objects floating around it.
   Every object is positioned/rotated here, so swapping a
   placeholder for a real <img> needs no CSS change.
   --u is the object scale unit: everything sizes off it. */
.hero--stage {
  /* ⤷ master size of the floating cards — everything scales off it */
  --u: clamp(3.6rem, 6.6vw, 7.4rem);
  position: relative;
  overflow: hidden; /* objects must never create a scrollbar */
  /* ⤷ hero height + the space above the headline. The navbar is fixed
     now, so it takes no flow space and the hero owns the top of the
     page — hence no --nav-h subtraction here. The block is centred in
     min-height, so shrink min-height first, then the top padding. */
  padding-block: var(--sp-4xl) var(--sp-2xl);
  min-height: 84svh;
  display: flex;
  align-items: center;
}
.hero__stage {
  position: relative;
  width: 100%;
}

/* --- the headline block --- */
.hero__lead {
  position: relative;
  z-index: 2; /* type reads above the objects */
  text-align: center;
  max-width: 62rem;
  margin-inline: auto;
  pointer-events: none; /* clicks pass through to nothing but the buttons */
}
.hero__lead > * { pointer-events: auto; }

.hero--stage .hero__title {
  /* ⤷ hero headline size — independent of --fs-h1 so the stage can
     run bigger than ordinary page titles. min / preferred / max. */
  font-size: clamp(2.4rem, 6.5vw, 5.6rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.02em;
  text-transform: none; /* sentence case, unlike the older hero */
  text-wrap: nowrap;
}
.hero__line { display: block; }

/* --- rotating word ---
   The sizer is an invisible copy of the longest word: it gives the
   box its height so the animated words can be absolute. Width is
   driven from JS (--rot-w) so the box eases between word lengths. */
.rotator {
  position: relative;
  display: inline-block;
  vertical-align: bottom;
  /* content-box so the slack padding below adds to the measured word
     width instead of eating into it */
  box-sizing: content-box;
  width: var(--rot-w, auto);
  overflow: hidden;
  color: var(--c-orange-deep);
  /* Slack on all sides, taken back with negative margin so the line
     box is unchanged. Vertical room is for descenders; horizontal
     room stops the last glyph clipping while the width eases to the
     next word. Both taken back so layout is unaffected. */
  padding: 0 0.09em 0.14em;
  margin: 0 -0.09em -0.14em;
  /* matches the word slide below, so they finish together */
  transition: width 0.55s var(--ease-quint);
}
.rotator__sizer { visibility: hidden; }
.rotator__word {
  position: absolute;
  top: 0;
  /* Span the mask and centre inside it, rather than sitting at its
     left edge. The mask's width eases between word lengths, so a
     left-aligned word would visibly slide sideways as it resizes —
     and would start off-centre before JS measures the first word. */
  left: 0;
  right: 0;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  /* 125%, not 100%: the mask is taller than the word by its descender
     padding, so a 100% offset would leave the next word peeking out
     underneath the current one */
  transform: translateY(125%);
  /* Incoming word fades in fast so the line is never briefly empty… */
  transition: transform 0.55s var(--ease-quint), opacity 0.18s ease-out;
}
.rotator__word.is-active { opacity: 1; transform: translateY(0); }
/* …while the outgoing one fades slowly, so the two overlap */
.rotator__word.is-out {
  opacity: 0;
  transform: translateY(-115%);
  transition: transform 0.55s var(--ease-quint), opacity 0.38s ease-in;
}

.hero--stage .hero__sub {
  margin: 1.75rem auto 0;
  max-width: 34rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--c-text-2);
}
.hero--stage .hero__cta {
  margin-top: 2.25rem;
  justify-content: center;
  gap: 1rem;
}

/* --- buttons that swap their label on hover ---
   Both labels sit in the same grid cell, so the button is always as
   wide as its longest label and nothing reflows on hover. */
.btn--swap { position: relative; overflow: hidden; }
.btn__swap { display: grid; }
.btn__t {
  grid-area: 1 / 1;
  transition: transform 0.4s var(--ease-quint), opacity 0.25s ease;
}
.btn__t--alt { opacity: 0; transform: translateY(115%); }
.btn--swap:hover .btn__t,
.btn--swap:focus-visible .btn__t { opacity: 0; transform: translateY(-115%); }
.btn--swap:hover .btn__t--alt,
.btn--swap:focus-visible .btn__t--alt { opacity: 1; transform: translateY(0); }

/* orange corner flare on the primary button */
.btn__flare {
  width: 1.5rem;
  height: 1.5rem;
  margin-left: 0.25rem;
  background: var(--c-orange-deep);
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  transition: transform 0.4s var(--ease-quint);
}
.btn--swap:hover .btn__flare { transform: rotate(90deg); }

/* --- floating objects --- */
.hero__objects {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.obj {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: calc(var(--u) * 0.28);
  background: var(--c-bg-2);
  border: 1px solid var(--c-line);
  rotate: var(--rot, 0deg);
  box-shadow: 0 18px 38px -14px rgb(12 13 15 / 0.3),
    0 2px 6px rgb(12 13 15 / 0.06);
  animation: obj-float 6s var(--ease-cubic) infinite alternate;
  animation-delay: var(--delay, 0s);
}
/* Artwork inside a floating card. js/main.js removes it if the file is
   missing, revealing the label underneath. */
.obj__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* photos crop to fill rather than squash */
  border-radius: inherit;
}
/* A cut-out graphic (transparent PNG/SVG) shouldn't sit on a tinted
   card — the tint would show through as a background behind it. So
   strip the card entirely and let the artwork float on its own, with
   the shadow following its shape instead of a rectangle.
   Photos keep the card, since they fill it edge to edge anyway. */
.obj:has(.obj__img.is-cutout) {
  background: none;
  border-color: transparent;
  box-shadow: none;
  /* The card shape is a wide 1.586 rectangle, which height-constrains a
     square illustration and renders it much smaller than the box. With
     no card to preserve, let the box match the art instead. */
  aspect-ratio: 1;
}
.obj__img.is-cutout {
  object-fit: contain; /* show the whole graphic, don't crop it */
  filter: drop-shadow(0 14px 24px rgb(12 13 15 / 0.22));
}
.obj__label {
  font-family: var(--font-mono);
  font-size: clamp(0.4rem, 0.62vw, 0.56rem);
  letter-spacing: 0.08em;
  color: var(--c-text-3);
  text-align: center;
  padding: 0.25em;
}
.obj--card { width: calc(var(--u) * 1.9); aspect-ratio: 1.586; } /* card ratio */
.obj--tile { width: calc(var(--u) * 1.35); aspect-ratio: 1; }
.obj--pill {
  width: calc(var(--u) * 1.9);
  height: calc(var(--u) * 0.92);
  border-radius: var(--r-pill);
}

/* tinted faces — replace with real art later */
.obj--1 { background: var(--t-sand); }
.obj--2 { background: #fff; }
.obj--3 { background: var(--c-ink); border-color: var(--c-ink); }
.obj--3 .obj__label { color: var(--c-ink-text-2); }
.obj--4 { background: var(--t-green); }
.obj--5 { background: var(--t-blue); }

/* Five objects: three left, two right. obj--3 sits furthest inboard so
   the headline overlaps it — that overlap is what gives the hero its
   depth, so keep one card tucked under the type if you re-arrange. */
.obj--1 { left: 0%;   top: 10%; --rot: -15deg; --delay: 0s; }
.obj--2 { left: 8%;   top: 40%; --rot: -7deg;  --delay: -1.4s; z-index: 2; }
.obj--3 { left: 20%;  top: 62%; --rot: 5deg;   --delay: -2.6s; z-index: 3; }
/* right */
/* `width` overrides the shared card size for these two, and a bigger
   `right` value pulls them inboard toward the headline. */
.obj--4 {
  right: 6%;  top: 8%;  --rot: 9deg;  --delay: -1.9s;
  width: calc(var(--u) * 2.3); /* drone */
}
.obj--5 {
  /* Sits high enough to run alongside the headline rather than across
     the CTA row — at a lower `top` it overlapped the second button. */
  right: 10%; top: 30%; --rot: -6deg; --delay: -3.4s; z-index: 2;
  width: calc(var(--u) * 3.4); /* students — the hero's anchor image */
}

@keyframes obj-float {
  from { translate: 0 0; }
  to   { translate: 0 -16px; }
}

/* hero entrance — CSS rather than GSAP: it fires on load, so the
   headline never flashes before the scroll library is ready */
.hero__lead > * {
  animation: hero-in 0.8s var(--ease-quint) backwards;
}
.hero__lead > *:nth-child(2) { animation-delay: 0.08s; }
.hero__lead > *:nth-child(3) { animation-delay: 0.16s; }
.hero__objects .obj { animation-name: obj-float, hero-pop; }
@keyframes hero-in {
  from { opacity: 0; transform: translateY(24px); }
}
@keyframes hero-pop {
  from { opacity: 0; scale: 0.9; }
  to   { opacity: 1; scale: 1; }
}
.hero__objects .obj {
  animation-duration: 6s, 0.7s;
  animation-iteration-count: infinite, 1;
  animation-direction: alternate, normal;
  animation-fill-mode: none, backwards;
}

@media screen and (max-width: 1200px) {
  .hero--stage .hero__title { font-size: clamp(2.3rem, 6.9vw, 5rem); }
  .obj--2 { left: 5%; top: 44%; }
}
@media screen and (max-width: 991px) {
  /* min-height drops out here, so the top padding alone sets the gap */
  .hero--stage { min-height: 0; padding-block: var(--sp-xs) var(--sp-xl); }
  .obj--2 { display: none; } /* the inboard card would crowd the type */
  .obj--1 { top: 6%; }
  .obj--5 { top: 60%; }
}
@media screen and (max-width: 767px) {
  .hero--stage .hero__title { text-wrap: balance; }
  /* Small screens have no room beside the type, so the survivors move
     out to the edges (bleeding off, clipped by the section) and sit
     back — they must never crowd the headline or the buttons. */
  .hero__objects { opacity: 0.5; }
  .obj--3 { display: none; }
  .obj--1 { left: -10%; top: 4%;  --rot: -12deg; }
  .obj--4 { right: -8%; top: 12%; --rot: 10deg; }
  .obj--5 { right: -6%; top: 72%; --rot: -8deg; }
}

/* ---------- 08c SCROLL FILM ----------
   A pinned scene. .vfilm__stage is what gets pinned; the media box is
   absolutely positioned and JS animates its left/top/width/height so
   the video re-crops (object-fit) instead of squashing. Starting
   values live here — the scrubbed keyframes are in js/animations.js. */
.vfilm { position: relative; }
/* The CTA, sitting inside the pinned stage so it holds still while the
   video grows over it. Centred, and behind the media. */
.vfilm__behind {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  align-content: center;
}
.vfilm__stage {
  position: relative;
  height: 100svh;
  overflow: hidden;
  background: var(--c-bg);
}
.vfilm__media {
  position: absolute;
  z-index: 2; /* over the CTA behind it */
  /* hidden until the pin engages; the timeline fades it in */
  opacity: 0;
  /* opening state — JS grows this to full bleed, then to the left frame */
  left: 22%;
  top: 22%;
  width: 56%;
  height: 56%;
  border-radius: var(--r-m);
  overflow: hidden;
  background: var(--c-ink);
  box-shadow: 0 30px 70px -30px rgb(12 13 15 / 0.45);
}
.vfilm__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  background: var(--c-ink);
}
.vfilm__ph .ph__label { color: var(--c-ink-text-2); }
/* If you ever go back to an embedded player (YouTube/Vimeo iframe),
   this makes it fill the frame. The frame is sized to the clip's
   aspect ratio in js/animations.js, so there are no letterbox bars. */
.vfilm__media iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* sound toggle — autoplay has to start muted, so this is how the
   viewer turns audio on. Icon only, no label. */
.vfilm__sound {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 4;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgb(12 13 15 / 0.45);
  border: 1px solid rgb(255 255 255 / 0.18);
  color: #fff;
  backdrop-filter: blur(8px);
  transition: background var(--dur-hover) var(--ease-cubic),
    transform var(--dur-hover) var(--ease-cubic),
    opacity var(--dur-hover) var(--ease-cubic);
}
.vfilm__sound:hover {
  background: rgb(12 13 15 / 0.75);
  transform: scale(1.06);
}
.vfilm__sound-ico {
  grid-area: 1 / 1; /* both icons share the cell; one is hidden */
  width: 1.15rem;
  height: 1.15rem;
}
.vfilm__sound-ico .spk { fill: currentColor; }
.vfilm__sound-ico .wave {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}
/* aria-pressed doubles as the state, so no extra class is needed */
.vfilm__sound[aria-pressed="false"] .vfilm__sound-ico--on,
.vfilm__sound[aria-pressed="true"] .vfilm__sound-ico--off { display: none; }
/* nothing to unmute until the file is actually playing */
.vfilm__media:not(:has(.vfilm__video.is-ready)) .vfilm__sound {
  opacity: 0;
  pointer-events: none;
}
/* Sits above the placeholder, but stays transparent until the file has
   actually decoded a frame — an empty <video> paints an opaque box and
   would otherwise hide the labelled placeholder behind it.
   js/main.js adds .is-ready on the video's loadeddata event. */
.vfilm__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 400ms ease;
}
.vfilm__video.is-ready { opacity: 1; }
.vfilm__copy {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  right: 0;
  width: 46%;
  padding-right: var(--edge);
  padding-left: var(--sp-xs);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1.1rem;
}
.vfilm__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }

@media screen and (max-width: 991px) {
  /* No room for a side-by-side split: the video keeps the top of the
     stage and the copy sits under it. */
  .vfilm__copy {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: auto;
    height: 42%;
    padding-inline: var(--edge);
    justify-content: flex-start;
    gap: 0.75rem;
  }
  .vfilm__copy .p1 { font-size: var(--fs-p2); }
}
@media (prefers-reduced-motion: reduce) {
  /* animations.js opts out entirely under this setting, so nothing
     would move the media out of its opening state — lay the scene out
     as an ordinary stacked section instead. */
  .vfilm__stage { height: auto; overflow: visible; padding-block: var(--sp-2xl); }
  .vfilm__media {
    position: relative;
    left: auto; top: auto;
    width: 100%; height: 60svh;
    border-radius: var(--r-m);
  }
  .vfilm__copy {
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
    padding: var(--sp-s) var(--edge) 0;
  }
}

/* ---------- 09 STATS ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
.stat {
  padding: var(--sp-xs);
  border-radius: var(--r-s);
  background: var(--c-bg-2);
}
.stat__num {
  font-family: var(--font-head);
  font-size: clamp(2.75rem, 4vw, 4rem);
  font-weight: 600;
  line-height: 1;
  color: var(--c-orange-deep);
}
.stat__label { margin-top: 0.6rem; }
@media screen and (max-width: 991px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media screen and (max-width: 479px) { .stats { grid-template-columns: 1fr 1fr; } .stat { padding: 1.25rem; } }

/* ---------- 10 CARDS ---------- */
/* feature card (3-up "designed for builders") */
.feature-card {
  padding: var(--sp-xs);
  border-radius: var(--r-m);
}
.feature-card__icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: var(--r-xs);
  background: rgb(255 255 255 / 0.75);
  font-size: 1.25rem;
}
.feature-card h3, .feature-card .h4 { margin-top: 1.5rem; }
.feature-card p { margin-top: 0.75rem; color: var(--c-text-2); }

/* program card (course-card equivalent) */
.program-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-m);
  border: 1px solid var(--c-line);
  background: var(--c-bg);
  overflow: hidden;
  transition: box-shadow 400ms var(--ease-cubic), transform 400ms var(--ease-cubic);
}
.program-card:hover {
  box-shadow: 0 24px 60px rgb(12 13 15 / 0.1);
  transform: translateY(-4px);
}
.program-card__media {
  position: relative;
  margin: var(--gap-s);
  border-radius: var(--r-s);
  overflow: hidden;
}
.program-card__meta {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  gap: 0.4rem;
  z-index: 2;
}
.program-card__meta .chip { background: rgb(255 255 255 / 0.9); border-color: transparent; backdrop-filter: blur(4px); }
.program-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1.5rem 1.5rem;
}
.program-card__body h3 { font-size: var(--fs-h4); }
.program-card__body p { margin-top: 0.6rem; color: var(--c-text-2); }
.program-card__foot {
  margin-top: auto;
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.program-card__foot .subhead { font-size: 1.25rem; }
.card-arrow {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--c-bg-3);
  font-size: 1.1rem;
  transition: background var(--dur-hover) var(--ease-cubic), color var(--dur-hover) var(--ease-cubic), border-color var(--dur-hover) var(--ease-cubic);
}
.program-card:hover .card-arrow,
.blog-card:hover .card-arrow {
  background: var(--c-orange-deep);
  border-color: var(--c-orange-deep);
  color: #fff;
}

/* category / track card */
.cat-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--sp-s);
  min-height: 15rem;
  padding: 1.5rem;
  border-radius: var(--r-m);
  transition: transform 400ms var(--ease-cubic);
}
.cat-card:hover { transform: translateY(-4px); }
.cat-card__count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-2);
}
.cat-card p { color: var(--c-text-2); margin-top: 0.5rem; }

/* blog card */
.blog-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-m);
  border: 1px solid var(--c-line);
  overflow: hidden;
  transition: box-shadow 400ms var(--ease-cubic), transform 400ms var(--ease-cubic);
}
.blog-card:hover { box-shadow: 0 24px 60px rgb(12 13 15 / 0.1); transform: translateY(-4px); }
.blog-card__media { margin: var(--gap-s); border-radius: var(--r-s); overflow: hidden; }
.blog-card__body { padding: 1rem 1.5rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.blog-card__date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-3);
}
.blog-card__body h3 { font-size: var(--fs-h4); margin-top: 0.6rem; }
.blog-card__foot { margin-top: auto; padding-top: 1.25rem; display: flex; justify-content: flex-end; }

/* ---------- 11 TESTIMONIAL SLIDER ---------- */
.tst {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--gap);
  align-items: stretch;
}
.tst__stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--sp-s);
  padding: var(--sp-xs);
  border-radius: var(--r-m);
  background: var(--t-sand);
}
.tst__stat-num {
  font-family: var(--font-head);
  font-size: clamp(4rem, 7vw, 7rem);
  font-weight: 700;
  line-height: 1;
  color: var(--c-orange-deep);
}
.slider {
  position: relative;
  border-radius: var(--r-m);
  background: var(--c-bg-2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.slider__mask { position: relative; flex: 1; min-height: 20rem; }
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--sp-xs);
  padding: var(--sp-xs);
  opacity: 0;
  visibility: hidden;
  transition: opacity 500ms ease, visibility 500ms;
}
.slide.is-active { opacity: 1; visibility: visible; }
.slide__quote { font-family: var(--font-head); font-weight: 500; font-size: var(--fs-subhead); line-height: 1.25; text-wrap: balance; }
.slide__who { display: flex; align-items: center; gap: 0.9rem; }
.slide__avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
}
.slider__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-xs) var(--sp-xs);
}
.slider__dots { display: flex; gap: 0.75rem; }
.slider__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--c-bg-3);
  transition: background 250ms, transform 250ms;
}
.slider__dot.is-active { background: var(--c-ink); transform: scale(1.25); }
.slider__arrows { display: flex; gap: 0.5rem; }
.slider__arrow {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--c-bg-3);
  background: var(--c-bg);
  transition: background var(--dur-hover), color var(--dur-hover), border-color var(--dur-hover);
}
.slider__arrow:hover { background: var(--c-ink); border-color: var(--c-ink); color: #fff; }
@media screen and (max-width: 991px) { .tst { grid-template-columns: 1fr; } }

/* ---------- 12 MARQUEE ---------- */
.marquee {
  overflow: hidden;
  display: flex;
  user-select: none;
}
.marquee__train {
  display: flex;
  align-items: center;
  flex: none;
  min-width: 100%;
  animation: marquee-scroll var(--marquee-dur, 30s) linear infinite;
}
.marquee:hover .marquee__train { animation-play-state: paused; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
.logo-strip { --marquee-dur: 28s; padding-block: var(--sp-xs); }
.logo-cell {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 13rem;
  padding: 1.25rem 2rem;
  margin-right: var(--gap);
  border-radius: var(--r-s);
  background: var(--c-bg);
  border: 1px dashed var(--c-bg-3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-3);
  white-space: nowrap;
}

/* ---------- 13 CTA BANNER ---------- */
.cta-banner {
  border-radius: var(--r-l);
  background: var(--c-ink);
  color: var(--c-ink-text);
  padding: var(--sp-2xl) var(--sp-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner .chip { background: transparent; border-color: var(--c-ink-line); color: var(--c-ink-text-2); }
.cta-banner h2 { margin-top: 1.5rem; }
.cta-banner p { margin-top: 1rem; color: var(--c-ink-text-2); }
.cta-banner__actions { margin-top: 2rem; display: flex; justify-content: center; flex-wrap: wrap; gap: 0.75rem; }
.cta-banner__faces {
  margin: 0 auto 1.5rem;
  display: flex;
  justify-content: center;
}
.cta-banner__face {
  position: relative;
  overflow: hidden; /* clip the headshot to the circle */
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  border: 3px solid var(--c-ink);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--c-text-2);
}
.face__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cta-banner__face--you {
  cursor: pointer;
  transition: transform 200ms var(--ease-cubic), box-shadow 200ms var(--ease-cubic);
}
.cta-banner__face--you:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}
.cta-banner__you {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--c-text);
}
.cta-banner__face + .cta-banner__face { margin-left: -0.9rem; }
@media screen and (max-width: 767px) { .cta-banner { padding: var(--sp-xl) var(--sp-xs); border-radius: var(--r-m); } }

/* ---------- JOIN (segmented tabs → detail + form) ---------- */
.join__bar {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.3rem;
  border-radius: var(--r-pill);
  background: var(--c-bg-2);
  border: 1px solid var(--c-line);
}
.join__tab {
  padding: 0.7rem 1.6rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-p3);
  font-weight: 500;
  color: var(--c-text-2);
  white-space: nowrap;
  transition: background var(--dur-hover) var(--ease-cubic),
    color var(--dur-hover) var(--ease-cubic);
}
.join__tab:hover { color: var(--c-text); }
/* aria-selected is the state — no parallel class to keep in sync */
.join__tab[aria-selected="true"] {
  background: var(--c-ink);
  color: #fff;
}

.join__panels { margin-top: var(--sp-s); }
.join__panel { display: none; }
.join__panel.is-active {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--gap);
  align-items: start;
  animation: join-in 450ms var(--ease-quint) both;
}
@keyframes join-in {
  from { opacity: 0; transform: translateY(14px); }
}

.join__detail {
  background: var(--c-bg-2);
  border: 1px solid var(--c-line);
  border-radius: var(--r-m);
  padding: var(--sp-s);
}
.join__detail h3 { margin-top: 1rem; }
.join__detail > .p2 { margin-top: 0.75rem; }
.join__list { display: grid; gap: 0.75rem; margin-top: 1.5rem; }
.join__list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: var(--fs-p3);
  line-height: 1.55;
  color: var(--c-text-2);
}
.join__list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--c-orange-deep);
}
.join__note {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--c-line);
  font-size: 0.68rem;
  color: var(--c-text-3);
  text-transform: none;
  letter-spacing: 0.04em;
}
.join .form-card h3 { margin-bottom: 1.25rem; }

/* find-us strip */
.findus {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: start;
}
.findus__rows { display: grid; gap: 0; align-content: start; }
.findus__rows .chip { width: fit-content; margin-bottom: 1.25rem; }

@media screen and (max-width: 991px) {
  .join__panel.is-active { grid-template-columns: 1fr; }
  .findus { grid-template-columns: 1fr; }
}
@media screen and (max-width: 600px) {
  /* the bar would overflow at three tabs — stack it */
  .join__bar { display: grid; width: 100%; border-radius: var(--r-s); }
  .join__tab { border-radius: var(--r-s); }
}

/* ---------- 14 CONTACT + FORMS ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--gap);
  align-items: stretch;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-s);
  padding: var(--sp-xs);
  border-radius: var(--r-m);
  background: var(--c-bg-2);
}
.contact-info__rows { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-row { display: flex; align-items: baseline; gap: 1rem; }
.contact-row .mono { color: var(--c-text-3); min-width: 5.5rem; }
.form-card {
  padding: var(--sp-xs);
  border-radius: var(--r-m);
  border: 1px solid var(--c-line);
  background: var(--c-bg);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field { display: flex; flex-direction: column; gap: 0.5rem; }
.form-field--full { grid-column: 1 / -1; }
.form-field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-2);
}
.form-field input,
.form-field select,
.form-field textarea {
  font: inherit;
  padding: 0.875rem 1.1rem;
  border: 1px solid var(--c-bg-3);
  border-radius: var(--r-xs);
  background: var(--c-bg);
  color: var(--c-text);
  transition: border-color 250ms;
  width: 100%;
}
.form-field textarea { resize: vertical; min-height: 8rem; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { outline: none; border-color: var(--c-ink); }
.form-field.is-invalid input,
.form-field.is-invalid textarea { border-color: var(--c-orange-deep); }
.form-field__error {
  display: none;
  font-size: 0.8125rem;
  color: var(--c-orange-deep);
}
.form-field.is-invalid .form-field__error { display: block; }
.form-note { margin-top: 1rem; font-size: 0.8125rem; color: var(--c-text-3); }
.form-state {
  display: none;
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--r-xs);
  font-weight: 500;
}
.form-state.is-visible { display: block; }
.form-state--done { background: var(--t-green); }
.form-state--fail { background: var(--t-blush); color: var(--c-orange-deep); }
@media screen and (max-width: 991px) { .contact-grid { grid-template-columns: 1fr; } }
@media screen and (max-width: 767px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- 15 FAQ ACCORDION ---------- */
.faq-list { display: flex; flex-direction: column; gap: var(--gap-s); }
.faq {
  border-radius: var(--r-s);
  background: var(--c-bg-2);
  overflow: hidden;
}
.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  text-align: left;
  font-family: var(--font-head);
  font-size: var(--fs-h5);
  font-weight: 600;
  line-height: 1.3;
}
.faq__icon {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--c-bg);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  transition: transform 350ms var(--ease-cubic), background 250ms, color 250ms;
}
.faq.is-open .faq__icon { transform: rotate(45deg); background: var(--c-ink); color: #fff; }
.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 400ms var(--ease-quint);
}
.faq.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a-inner { overflow: hidden; }
.faq__a-inner p {
  padding: 0 1.75rem 1.5rem;
  max-width: 44rem;
  color: var(--c-text-2);
}

/* ---------- 16 FOOTER ---------- */
.footer {
  background: var(--c-ink);
  color: var(--c-ink-text);
  border-radius: var(--r-l) var(--r-l) 0 0;
  margin-top: var(--sp-2xl);
  overflow: hidden;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--sp-s);
  padding-block: var(--sp-2xl) var(--sp-xl);
}
.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.footer__brand .navbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
}
.footer__brand-logo {
  width: 5.2rem;
  height: 5.2rem;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.footer__brand p { margin-top: 1rem; color: var(--c-ink-text-2); max-width: 20rem; }
.footer__col-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-ink-text-2);
  margin-bottom: 1.1rem;
}
.footer__col a {
  display: block;
  padding-block: 0.35rem;
  color: var(--c-ink-text);
  opacity: 0.85;
  transition: opacity 200ms, color 200ms;
}
.footer__col a:hover { opacity: 1; color: var(--c-orange); }
.footer__socials {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.4rem;
}
.footer__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 50%;
  background: rgb(255 255 255 / 0.02);
  padding: 0;
  transition: border-color 200ms, transform 200ms, color 200ms;
}
.footer__social:hover {
  border-color: rgb(255 255 255 / 0.38);
  transform: translateY(-1px);
}
.footer__social svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
  display: block;
}
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--c-ink-line);
  color: var(--c-ink-text-2);
  font-size: 0.875rem;
}
/* footer skill ticker */
.footer__ticker {
  --marquee-dur: 70s;
  border-top: 1px solid var(--c-ink-line);
  padding-block: 1.1rem;
}
.ticker-item {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  margin-right: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-ink-text-2);
  white-space: nowrap;
}
.ticker-item::after { content: "✦"; color: var(--c-orange); }
@media screen and (max-width: 991px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media screen and (max-width: 479px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- 17 PAGE-SPECIFIC ---------- */
/* generic page hero */
/* ---------- "COMING SOON" FLOAT ----------
   Spawned on click by js/main.js. Dips below the button first, then
   rises and fades out. Each click adds another one, so rapid clicks
   stack up instead of restarting a single element. */
[data-coming-soon] { position: relative; overflow: visible; }
.poof {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 5;
  pointer-events: none;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-orange-deep);
  /* ⤷ sideways drift on the way up. js/main.js cycles this through five
     values so consecutive clicks fan out instead of stacking. */
  --dx: 0px;
  animation: poof 2200ms forwards;
}
/* One keyframe set serves all five directions: --dx steers the exit.
   Per-keyframe easing gives a springy dip, a brief hover, then a slow
   drift upward. */
@keyframes poof {
  0% {
    transform: translate(-50%, 0) scale(0.9);
    opacity: 0;
    animation-timing-function: cubic-bezier(0.34, 1.32, 0.64, 1); /* dip */
  }
  14% {
    transform: translate(-50%, 20px) scale(1);
    opacity: 1;
    animation-timing-function: ease-in-out;
  }
  36% {
    /* hangs for a beat before rising, so the ascent doesn't feel rushed */
    transform: translate(calc(-50% + var(--dx) * 0.1), 15px) scale(1);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
  }
  100% {
    transform: translate(calc(-50% + var(--dx)), -88px) scale(0.98);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  /* the global reset would otherwise collapse this to a 0.001ms flash,
     leaving no readable feedback — hold it still instead */
  .poof { animation: poof-hold 2000ms linear forwards !important; }
  @keyframes poof-hold {
    0%, 80% { transform: translate(-50%, 16px); opacity: 1; }
    100%    { transform: translate(-50%, 16px); opacity: 0; }
  }
}

/* ---------- MERCH ---------- */
.mch-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
.mch {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--c-line);
  border-radius: var(--r-s);
  overflow: hidden;
  background: var(--c-bg);
  transition: transform var(--dur-hover) var(--ease-cubic),
    box-shadow var(--dur-hover) var(--ease-cubic);
}
.mch:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -26px rgb(12 13 15 / 0.4);
}
.mch__media { margin: 0.4rem; border-radius: var(--r-xs); overflow: hidden; }
.mch__body {
  padding: 0.5rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.mch__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.mch__name { font-size: var(--fs-h6); }
.mch__price {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--c-orange-deep);
  white-space: nowrap;
}
.mch__blurb {
  margin-top: 0.45rem;
  font-size: var(--fs-p3);
  line-height: 1.5;
  color: var(--c-text-2);
}
.mch__cta { margin-top: auto; padding-top: 0.9rem; align-self: flex-start; }
.mch__cta.btn { margin-top: 1rem; }

/* funding split bars */
.split { display: grid; gap: 1.1rem; margin-top: var(--sp-xs); }
.split__row { display: grid; gap: 0.4rem; }
.split__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: var(--fs-p3);
}
.split__pct { font-family: var(--font-mono); color: var(--c-orange-deep); }
.split__bar {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--c-bg-3);
  overflow: hidden;
}
.split__bar > span {
  display: block;
  height: 100%;
  background: var(--c-orange-deep);
  border-radius: inherit;
}

@media screen and (max-width: 991px) { .mch-grid { grid-template-columns: repeat(3, 1fr); } }
@media screen and (max-width: 767px) { .mch-grid { grid-template-columns: repeat(2, 1fr); } }
@media screen and (max-width: 479px) { .mch-grid { grid-template-columns: 1fr; } }

/* ---------- RANKINGS ---------- */
.rk-meta { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1.5rem; }
.rk-notice {
  border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-orange-deep);
  border-radius: var(--r-xs);
  padding: 1rem 1.25rem;
  font-size: var(--fs-p3);
  line-height: 1.6;
  color: var(--c-text-2);
  background: var(--c-bg-2);
}
.rk-notice code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--c-text);
}
.rk-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--sp-2xs);
}
.rk-filters .chip { cursor: pointer; }
.rk-filters .chip.is-active {
  background: var(--c-ink);
  color: #fff;
  border-color: var(--c-ink);
}

/* wide table: scrolls inside its own box, never the page */
.rk-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-line);
  border-radius: var(--r-s);
}
.rk {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-p3);
  white-space: nowrap;
}
.rk__th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--c-bg-2);
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-2);
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--c-line);
}
.rk__th[data-sort] { cursor: pointer; user-select: none; }
.rk__th[data-sort]:hover { color: var(--c-text); }
/* the sorted column announces itself in the header */
.rk__th[aria-sort="ascending"]::after { content: " ▲"; color: var(--c-orange-deep); }
.rk__th[aria-sort="descending"]::after { content: " ▼"; color: var(--c-orange-deep); }
.rk__th--rank, .rk__th--name { text-align: left; }
.rk__th--pillar abbr { text-decoration: none; border-bottom: 1px dotted var(--c-text-3); }

.rk tbody tr { border-bottom: 1px solid var(--c-line); }
.rk tbody tr:last-child { border-bottom: 0; }
.rk tbody tr:hover { background: var(--c-bg-2); }
.rk td, .rk tbody th { padding: 0.85rem 0.75rem; text-align: right; }
.rk__rank {
  text-align: left !important;
  font-family: var(--font-mono);
  color: var(--c-text-3);
  width: 3rem;
}
.rk__name {
  text-align: left !important;
  font-weight: 500;
  white-space: normal;
  min-width: 14rem;
}
.rk__where {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-text-3);
  margin-top: 0.2rem;
}
.rk__overall { min-width: 8rem; }
.rk__score { font-weight: 600; font-size: 1.05em; }
.rk__bar {
  display: block;
  height: 3px;
  margin-top: 0.4rem;
  border-radius: var(--r-pill);
  background: var(--c-bg-3);
  overflow: hidden;
}
.rk__bar > span {
  display: block;
  height: 100%;
  background: var(--c-orange-deep);
  border-radius: inherit;
}
.rk__cell { color: var(--c-text-2); font-variant-numeric: tabular-nums; }
.rk__trend { font-family: var(--font-mono); font-size: 0.7rem; color: var(--c-text-3); }
.rk__trend--up { color: #178a4a; }
.rk__trend--down { color: #c2401d; }
.rk__trend--new { color: var(--c-orange-deep); }
.rk-foot { margin-top: 1rem; line-height: 1.6; text-transform: none; letter-spacing: 0; }

/* methodology pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.pillar {
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--r-s);
  padding: var(--sp-2xs);
}
.pillar__head { display: flex; align-items: baseline; gap: 0.75rem; }
.pillar__weight {
  font-family: var(--font-head);
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--c-orange-deep);
  line-height: 1;
}
.pillar__label { font-size: var(--fs-h5); }
.pillar__desc { margin-top: 0.75rem; color: var(--c-text-2); font-size: var(--fs-p3); }
.pillar__inputs {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--c-line);
  display: grid;
  gap: 0.5rem;
}
.pillar__inputs li {
  position: relative;
  padding-left: 1rem;
  font-size: var(--fs-p3);
  line-height: 1.5;
  color: var(--c-text-2);
}
.pillar__inputs li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--c-orange-deep);
}
.pillar__total {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-3);
}
.pillar__total.is-wrong { color: #c2401d; }

@media screen and (max-width: 991px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
}
@media screen and (max-width: 767px) {
  .pillars { grid-template-columns: 1fr; }
}

/* ---------- ONGOING PROJECTS (image swaps per tab) ---------- */
.projects__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
}
.projects__media {
  position: relative;
  z-index: 2; /* sits over the panel's left edge */
  aspect-ratio: 4 / 5;
  border-radius: var(--r-m);
  overflow: hidden;
  background: var(--c-bg-2);
  box-shadow: 0 30px 60px -30px rgb(12 13 15 / 0.35);
}
.projects__shot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 500ms var(--ease-quint);
}
.projects__shot.is-active { opacity: 1; }
.projects__shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.projects__panel {
  background: var(--c-bg-2);
  border-radius: var(--r-m);
  padding: var(--sp-l) var(--sp-m);
  /* slide the panel under the image */
  margin-left: -4rem;
  padding-left: calc(4rem + var(--sp-m));
}
.projects__panel h2 { margin-top: 1rem; }
.projects__list { margin-top: var(--sp-xs); display: grid; gap: 0.25rem; }

.proj {
  border-radius: var(--r-s);
  transition: background var(--dur-hover) var(--ease-cubic),
    box-shadow var(--dur-hover) var(--ease-cubic);
}
.proj.is-active {
  background: var(--c-bg);
  box-shadow: 0 14px 34px -22px rgb(12 13 15 / 0.4);
}
.proj__btn {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  text-align: left;
  padding: 1.1rem 1.35rem;
}
.proj__icon {
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.15rem;
  fill: none;
  stroke: var(--c-text-3);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke var(--dur-hover) var(--ease-cubic);
}
.proj.is-active .proj__icon { stroke: var(--c-orange-deep); }
.proj__title {
  display: block;
  font-family: var(--font-head);
  font-size: var(--fs-h5);
  font-weight: 600;
  transition: color var(--dur-hover) var(--ease-cubic);
}
.proj.is-active .proj__title { color: var(--c-orange-deep); }
.proj__desc {
  display: block;
  margin-top: 0.4rem;
  color: var(--c-text-2);
  font-size: var(--fs-p3);
  line-height: 1.55;
}
/* the link belongs to the open project only */
.proj__link {
  display: none;
  margin: 0 1.35rem 1.1rem calc(1.35rem + 1.35rem + 1rem);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-orange-deep);
}
.proj.is-active .proj__link { display: inline-flex; }
.proj__link:hover { text-decoration: underline; }

@media screen and (max-width: 991px) {
  .projects__grid { grid-template-columns: 1fr; gap: 0; }
  .projects__media { aspect-ratio: 16 / 10; }
  .projects__panel {
    margin-left: 0;
    margin-top: -3rem;
    padding: calc(3rem + var(--sp-s)) var(--sp-xs) var(--sp-s);
  }
}

.page-hero { padding-block: var(--sp-xl) var(--sp-s); }
/* Headline beside the diagram rather than on top of it — overlaying
   the two made the text fight the artwork for the same space. */
.about-timeline-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(13rem, 21rem) 1fr;
  gap: var(--sp-s);
  align-items: center;
  width: 100%;
  margin: 0 0 var(--sp-xs);
}
@media screen and (max-width: 767px) {
  .about-timeline-wrap { grid-template-columns: 1fr; gap: var(--sp-2xs); }
}
.about-timeline {
  display: block;
  width: 100%;
  height: auto;
}
.about-timeline__title {
  position: static; /* was absolute, sitting over the diagram */
  grid-column: 1;
  max-width: none;
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 2vw, 2.25rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--c-text);
  background: none;
  backdrop-filter: none;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}
.page-hero h1 { margin-top: 1.25rem; }
.page-hero .p1 { margin-top: 1.25rem; }

.merch-hero {
  padding-top: var(--sp-l);
  padding-bottom: 0;
}
/* ⤷ the two knobs that size the merch hero image: max-width caps how
   wide it runs, aspect-ratio sets its height from that width. */
.merch-hero__image-wrap {
  width: 100%;
  max-width: 52rem;
  margin-inline: auto;
}
.merch-hero__image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  border-radius: var(--r-l);
  object-fit: cover;
  object-position: center;
}
.merch-hero__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 7;
  border-radius: var(--r-l);
  border: 1px dashed rgb(0 0 0 / 0.2);
  background:
    linear-gradient(135deg, rgba(0,0,0,0.02), rgba(0,0,0,0.08)),
    repeating-linear-gradient(-45deg, transparent 0 16px, rgb(0 0 0 / 0.03) 16px 32px),
    var(--c-bg-2);
  color: var(--c-text-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}
.merch-hero__placeholder span {
  display: inline-block;
  padding: 0.85rem 1.1rem;
  border: 1px solid rgb(0 0 0 / 0.12);
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 0.45);
}

/* program detail */
.pd-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--sp-l);
  align-items: center;
}
.story-video-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.5rem;
  padding: 0.8rem 1.1rem 0.8rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgb(17 17 17 / 0.08);
  background: linear-gradient(135deg, #ffffff 0%, #f4f1ea 100%);
  color: var(--c-text);
  box-shadow: 0 16px 36px -22px rgba(12, 13, 15, 0.45);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.story-video-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px -20px rgba(12, 13, 15, 0.5);
  border-color: rgb(17 17 17 / 0.14);
}
.story-video-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #ff0033;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.3);
  flex-shrink: 0;
}
.story-video-btn__icon svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: #fff;
  display: block;
  transform: translateX(0.06rem);
}
.story-video-btn span:last-child {
  font-family: var(--font-head);
  font-size: 0.95rem;
  letter-spacing: -0.04em;
  line-height: 1.2;
}
.pd-hero__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pd-hero h1 { margin-top: 1.5rem; }
.pd-hero .p1 { margin-top: 1.25rem; }
.pd-hero__cta { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.pd-meta {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  border-top: 1px solid var(--c-line);
  padding-top: 1.5rem;
}
.pd-meta__item .subhead { font-size: 1.5rem; }
.pd-meta__item .mono { color: var(--c-text-3); }
.pd-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--sp-l);
  align-items: start;
}
.pd-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  border: 1px solid var(--c-line);
  border-radius: var(--r-m);
  padding: var(--sp-xs);
}
.pd-sidebar ul { margin-top: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
.pd-sidebar li { display: flex; gap: 0.75rem; align-items: baseline; color: var(--c-text-2); }
.pd-sidebar li::before { content: "✦"; color: var(--c-orange-deep); }
.pd-sidebar .btn { width: 100%; margin-top: 1.5rem; }
.curriculum { margin-top: var(--sp-s); }
/* ways to join (repurposed pricing tiers) */
.join-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.join-tier {
  display: flex;
  flex-direction: column;
  padding: var(--sp-xs);
  border-radius: var(--r-m);
  border: 1px solid var(--c-line);
}
.join-tier--featured { background: var(--c-ink); color: var(--c-ink-text); border-color: var(--c-ink); }
.join-tier--featured .join-tier__desc, .join-tier--featured li { color: var(--c-ink-text-2); }
.join-tier__desc { margin-top: 0.75rem; color: var(--c-text-2); }
.join-tier ul { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.join-tier li { display: flex; gap: 0.6rem; color: var(--c-text-2); }
.join-tier li::before { content: "→"; color: var(--c-orange-deep); }
.join-tier .btn { margin-top: 1.5rem; }
@media screen and (max-width: 991px) {
  .pd-hero, .pd-layout { grid-template-columns: 1fr; }
  .pd-sidebar { position: static; }
  .join-tiers { grid-template-columns: 1fr; }
}

/* about + team */
.mission-band {
  border-radius: var(--r-l);
  background: var(--c-ink);
  color: var(--c-ink-text);
  padding: var(--sp-2xl) var(--sp-xl);
}
.mission-band .chip { background: transparent; border-color: var(--c-ink-line); color: var(--c-ink-text-2); }
.mission-band h2 { margin-top: 1.5rem; max-width: 24ch; }
@media screen and (max-width: 767px) { .mission-band { padding: var(--sp-xl) var(--sp-xs); border-radius: var(--r-m); } }
.coach-card {
  border: 1px solid var(--c-line);
  border-radius: var(--r-m);
  overflow: hidden;
}
.coach-card__media { margin: var(--gap-s); border-radius: var(--r-s); overflow: hidden; }
.coach-card__body { padding: 0.75rem 1.5rem 1.5rem; }
.coach-card__role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-3);
  margin-top: 0.35rem;
}
.coach-card__bio { margin-top: 0.75rem; color: var(--c-text-2); }

/* ---------- PEOPLE (compact team + volunteer cards) ---------- */
.people {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--gap);
}
.people--4 { grid-template-columns: repeat(4, 1fr); }
.person {
  border: 1px solid var(--c-line);
  border-radius: var(--r-s);
  overflow: hidden;
  background: var(--c-bg);
  transition: transform var(--dur-hover) var(--ease-cubic),
    box-shadow var(--dur-hover) var(--ease-cubic);
}
.person:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px -22px rgb(12 13 15 / 0.35);
}
.person__media { margin: 0.4rem; border-radius: var(--r-xs); overflow: hidden; }
.person__body { padding: 0.7rem 0.9rem 1rem; display: grid; gap: 0.2rem; }
.person__name {
  font-family: var(--font-head);
  font-size: var(--fs-h6);
  font-weight: 600;
  line-height: 1.2;
}
.person__role {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-3);
}
.person--sm .person__body { padding: 0.6rem 0.8rem 0.85rem; }

/* sub-heading inside a section (Volunteers under the team) */
.sub-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: var(--sp-l) 0 var(--sp-2xs);
}
.sub-head h3 { font-size: var(--fs-h4); }
.sub-head p { color: var(--c-text-2); font-size: var(--fs-p3); }

@media screen and (max-width: 991px) {
  .people, .people--4 { grid-template-columns: repeat(3, 1fr); }
}
@media screen and (max-width: 639px) {
  .people, .people--4 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- PARTNER WALL ---------- */
/* Flex rather than grid so a part-filled last row centres itself —
   with a fixed column count, eight logos left two orphans hanging on
   the left. ⤷ change the 6 to fit more or fewer per row. */
.wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
}
.wall__cell {
  flex: 0 1 calc((100% - 5 * var(--gap)) / 6);
  aspect-ratio: 3 / 2;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: var(--c-ink);
  border-radius: var(--r-s);
  transition: transform var(--dur-hover) var(--ease-cubic),
    background var(--dur-hover) var(--ease-cubic);
}
.wall__cell:hover { transform: translateY(-3px); background: var(--c-ink-2); }
/* Logos arrive in every colour and format. js/main.js samples each one
   and tags it, because the two cases need opposite treatment:
     .is-cutout — has transparency, so it can be flattened to white and
                  sit directly on the dark tile
     .is-plated — opaque (a JPEG), where flattening would turn the whole
                  rectangle into a white block, so it keeps its own
                  colours on a white plate instead
   Supplying transparent PNG/SVG for everything gives the cleaner wall. */
.wall__logo {
  grid-area: 1 / 1;
  max-width: 78%;
  max-height: 46%;
  object-fit: contain;
}
.wall__logo.is-cutout { filter: brightness(0) invert(1); }
.wall__logo.is-plated {
  max-width: 74%;
  max-height: 56%;
  padding: 0.5rem 0.7rem;
  background: #fff;
  border-radius: var(--r-xxs);
}
.wall__name {
  grid-area: 1 / 1;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  color: var(--c-ink-text-2);
}
/* The name shows until a logo has actually painted — keyed on
   .is-loaded (set in js/main.js), not on the tag merely existing, so a
   missing file still leaves a readable tile. */
.wall__cell:has(.wall__logo.is-loaded) .wall__name { display: none; }

@media screen and (max-width: 991px) {
  .wall__cell { flex-basis: calc((100% - 3 * var(--gap)) / 4); }
}
@media screen and (max-width: 639px) {
  .wall__cell { flex-basis: calc((100% - 2 * var(--gap)) / 3); }
}

/* ---------- EXPERT ADVISORS ---------- */
.advisors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}
.advisor {
  display: grid;
  gap: 0.9rem;
  padding: var(--sp-3xs);
  border: 1px solid var(--c-line);
  border-radius: var(--r-s);
  background: var(--c-bg);
}
.advisor__media { border-radius: var(--r-xs); overflow: hidden; }
.advisor__body { display: grid; gap: 0.2rem; padding: 0 0.4rem 0.4rem; }
.advisor__org {
  font-size: var(--fs-p3);
  color: var(--c-text-2);
  margin-top: 0.15rem;
}
.advisor__focus {
  margin-top: 0.5rem;
  font-size: var(--fs-p3);
  line-height: 1.5;
  color: var(--c-text-2);
}
@media screen and (max-width: 991px) { .advisors { grid-template-columns: repeat(2, 1fr); } }
@media screen and (max-width: 479px) { .advisors { grid-template-columns: 1fr; } }

/* reviews grid */
.review-card {
  break-inside: avoid;
  padding: var(--sp-xs);
  border-radius: var(--r-m);
  border: 1px solid var(--c-line);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.review-card blockquote { font-size: var(--fs-p2); line-height: 1.45; }

/* blog post */
.post-body { max-width: 44rem; margin-inline: auto; }
.post-body > * + * { margin-top: 1.25rem; }
.post-body h2 { font-size: var(--fs-h3); margin-top: 2.5rem; }
.post-body p { font-size: var(--fs-p2); line-height: 1.6; color: var(--c-text-2); }
.post-body blockquote {
  border-left: 3px solid var(--c-orange-deep);
  padding-left: 1.5rem;
  font-family: var(--font-head);
  font-size: var(--fs-subhead);
  color: var(--c-text);
}

/* ---------- 18 HELPERS + MOTION ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.hide-desktop { display: none; }
@media screen and (max-width: 991px) {
  .hide-desktop { display: block; }
  .hide-tablet { display: none; }
}
/* word-split animation scaffolding (built by js/animations.js) */
.w-line { display: inline-block; overflow: hidden; vertical-align: bottom; }
.w-word { display: inline-block; will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
