/* =====================================================================
   Kinetix STEM: site styles
   ---------------------------------------------------------------------
   Layout idea: a workbench. Maroon bands are the "bench", cream is the
   paper on it. One loud moment (the live robot in the home hero); every
   other section stays calm, left-aligned and generous.

   Edit colours and fonts here. Everything else reads from these tokens.
   ===================================================================== */
:root {
  /* Brand palette (final, from the brand sheet) */
  --maroon: #862526;
  --maroon-deep: #641a1b;     /* hover states, button shadows */
  --maroon-ink: #43100f;      /* deepest shade, for pressed edges */
  --cream: #f9f0de;
  --paper: #fdf8ee;           /* slightly lighter cream for panels */
  --ink: #252525;             /* charcoal: body text */
  --muted: #66534b;           /* secondary text, warm grey */
  --clay: #c67b5c;            /* terracotta: support colour */
  --teal: #11aeae;            /* accent only, never text on cream */
  --line: rgba(134, 37, 38, 0.16);
  --line-strong: rgba(134, 37, 38, 0.32);
  --on-dark: #f9f0de;
  --on-dark-muted: rgba(249, 240, 222, 0.8);
  --focus: #252525;

  /* FUSION's own palette, used only on FUSION sections */
  --f-bg: #1a1a24;
  --f-panel: #23232f;
  --f-purple: #8b5cf6;
  --f-blue: #2563eb;
  --f-cyan: #22d3ee;
  --f-yellow: #f5c718;
  --f-white: #fffaf9;

  /* Type */
  --display: "Dela Gothic One", "Arial Black", "Helvetica Neue", sans-serif;
  --body: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --code: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
  --step-3: clamp(1.9rem, 1.4rem + 2.2vw, 3rem);
  --step-4: clamp(2.3rem, 1.6rem + 3.4vw, 4.25rem);

  /* Space */
  --gutter: clamp(16px, 4vw, 44px);
  --section: clamp(64px, 9vw, 128px);
  --radius: 14px;
  --header-h: 72px;

  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1.5px; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--maroon); color: var(--cream); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--cream); color: var(--maroon); padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.narrow { max-width: 820px; }
.section { padding-block: var(--section); }
.section--paper { background: var(--paper); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }

/* dark band: maroon with a breadboard hole pattern */
.band {
  background-color: var(--maroon);
  color: var(--on-dark);
  --focus: var(--cream);
}
.band--holes {
  background-image: radial-gradient(rgba(249, 240, 222, 0.11) 1.5px, transparent 1.9px);
  background-size: 24px 24px;
  background-position: 12px 12px;
}

/* ---------- type ---------- */
.display { font-family: var(--display); font-weight: 400; letter-spacing: 0; line-height: 1.08; }
.h2 { font-family: var(--display); font-weight: 400; font-size: var(--step-3); line-height: 1.1; }
.h3 { font-size: var(--step-1); font-weight: 600; line-height: 1.3; }
.lead { font-size: var(--step-1); line-height: 1.6; max-width: 60ch; }
.muted { color: var(--muted); }
.band .muted { color: var(--on-dark-muted); }
.prose { max-width: 66ch; }
.prose h2 { margin: 1.6em 0 0.5em; }
.prose h3 { margin: 1.4em 0 0.4em; }
.prose ul { padding-left: 1.2em; margin-bottom: 1em; }
.prose li { margin-bottom: 0.35em; }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(32px, 5vw, 56px); max-width: 760px; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--maroon); --fg: var(--cream); --edge: var(--maroon-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0.7em 1.35em;
  border: 2px solid var(--edge); border-radius: 12px;
  background: var(--bg); color: var(--fg);
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none;
  box-shadow: 0 4px 0 var(--edge);
  transform: translateY(0);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.2s ease;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { --bg: var(--maroon-deep); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }
.btn--cream { --bg: var(--cream); --fg: var(--maroon); --edge: var(--maroon-ink); }
.btn--cream:hover { --bg: #fff8ea; }
.btn--outline-cream { --bg: transparent; --fg: var(--cream); --edge: var(--cream); box-shadow: 0 4px 0 rgba(0,0,0,0.25); }
.btn--outline-cream:hover { --bg: rgba(249, 240, 222, 0.1); }
.btn--outline { --bg: transparent; --fg: var(--maroon); --edge: var(--maroon); }
.btn--outline:hover { --bg: rgba(134, 37, 38, 0.07); }
.btn--small { min-height: 42px; padding: 0.5em 1em; font-size: 0.95rem; box-shadow: 0 3px 0 var(--edge); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.text-link {
  font-weight: 600; color: var(--maroon); text-decoration: underline; text-decoration-color: var(--line-strong);
}
.text-link:hover { text-decoration-color: currentColor; }
.band .text-link { color: var(--cream); text-decoration-color: rgba(249,240,222,0.45); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--maroon); color: var(--cream);
  --focus: var(--cream);
  transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 rgba(0,0,0,0.2), 0 8px 24px rgba(67, 16, 15, 0.25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; color: var(--cream); text-decoration: none; }
.brand svg { height: 40px; width: auto; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-link, .nav-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 10px; border: 0; background: none;
  color: var(--cream); font-size: 0.97rem; font-weight: 500; text-decoration: none; cursor: pointer;
}
.nav-link:hover, .nav-trigger:hover, .nav-trigger[aria-expanded="true"] { background: rgba(249, 240, 222, 0.1); }
.nav-link[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; text-decoration-color: var(--teal); }
.nav-trigger svg { width: 14px; height: 14px; transition: transform 0.2s ease; }
.nav-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.has-menu { position: relative; }
.menu {
  position: absolute; top: calc(100% + 10px); left: -8px; width: 330px;
  background: var(--cream); color: var(--ink); border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(67, 16, 15, 0.3), 0 0 0 1px rgba(67,16,15,0.08);
  padding: 8px; list-style: none; --focus: var(--maroon);
}
.menu a { display: grid; gap: 2px; padding: 12px 14px; border-radius: 10px; text-decoration: none; }
.menu a:hover { background: rgba(134, 37, 38, 0.07); }
.menu strong { font-weight: 600; color: var(--maroon); }
.menu span { font-size: 0.88rem; color: var(--muted); line-height: 1.45; }
.nav-cta { margin-left: 10px; }
.menu-toggle {
  display: none; align-items: center; justify-content: center; width: 48px; height: 48px;
  border: 2px solid rgba(249,240,222,0.35); border-radius: 12px; background: none; color: var(--cream); cursor: pointer;
}
.menu-toggle svg { width: 22px; height: 22px; }

@media (max-width: 1080px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 0; top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--maroon); overflow-y: auto;
    padding: 12px max(var(--gutter), env(safe-area-inset-right, 0px)) calc(32px + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px));
    border-top: 1px solid rgba(249,240,222,0.15);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity 0.2s ease, transform 0.2s ease; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { border-bottom: 1px solid rgba(249,240,222,0.14); }
  .nav-link, .nav-trigger { width: 100%; justify-content: space-between; padding: 18px 4px; font-size: 1.35rem; border-radius: 0; }
  .nav-link:hover, .nav-trigger:hover, .nav-trigger[aria-expanded="true"] { background: none; }
  .menu { position: static; width: auto; box-shadow: none; background: rgba(249,240,222,0.06); color: var(--cream); margin: 0 0 14px; }
  .menu strong { color: var(--cream); }
  .menu span { color: var(--on-dark-muted); }
  .menu a:hover { background: rgba(249,240,222,0.08); }
  .nav-cta { margin: 24px 0 0; width: 100%; }
  body.nav-open { overflow: hidden; }
}

/* ---------- home hero ---------- */
.hero { padding-block: clamp(36px, 6vw, 84px) clamp(48px, 7vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: clamp(28px, 5vw, 72px); }
.hero-logo-wrap { position: relative; }
.hero-logo { width: 100%; height: auto; overflow: visible; touch-action: manipulation; }
.hero-logo .ink { fill: var(--cream); }
.hero-logo .bot-light { fill: var(--teal); transition: fill 0.25s ease; }
.hero-logo { cursor: pointer; }
.hero-logo.is-booped .bot-light { fill: #6ff2f2; }
.hero-copy { display: grid; gap: 26px; }
.hero-title {
  font-family: var(--body); font-weight: 600; font-size: var(--step-4);
  line-height: 1.04; letter-spacing: -0.025em;
}
.hero-copy .lead { color: var(--on-dark-muted); max-width: 34ch; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 0.95rem; color: var(--on-dark-muted); }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 18px; height: 18px; color: var(--teal); }
.bot-hint { margin: 14px 0 0; font-size: 0.85rem; color: var(--on-dark-muted); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-logo-wrap { max-width: 560px; }
}

/* ---------- page hero (inner pages) ---------- */
.page-hero { padding-block: clamp(48px, 7vw, 96px); }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.page-hero h1 { font-family: var(--display); font-weight: 400; font-size: var(--step-4); line-height: 1.06; }
.page-hero .lead { color: var(--on-dark-muted); margin-top: 22px; }
.page-hero .btn-row { margin-top: 32px; }
.page-hero-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; box-shadow: 0 24px 60px rgba(40, 8, 8, 0.35); }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.crumb { display: inline-block; margin-bottom: 18px; color: var(--on-dark-muted); font-size: 0.95rem; text-decoration: none; }
.crumb:hover { color: var(--cream); text-decoration: underline; }
@media (max-width: 900px) { .page-hero-grid { grid-template-columns: 1fr; } }

/* ---------- programs index ---------- */
.programs { list-style: none; border-top: 2px solid var(--maroon); }
.program {
  display: grid; grid-template-columns: 148px minmax(0, 1fr) auto; gap: clamp(16px, 3vw, 36px); align-items: center;
  padding: 22px 6px; border-bottom: 1px solid var(--line-strong); text-decoration: none; color: inherit;
  transition: background-color 0.2s ease;
}
.program:hover { background: rgba(134, 37, 38, 0.045); }
.program-thumb { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--paper); }
.program-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.program:hover .program-thumb img { transform: scale(1.05); }
.program-thumb--logo { display: grid; place-items: center; padding: 14px; background: var(--f-bg); }
.program-thumb--cells { display: grid; place-items: center; padding: 12px; background: #fff; }
.program-thumb--cells { position: relative; }
.program-thumb--cells img { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); object-fit: contain; }
.program-body { display: grid; gap: 4px; min-width: 0; }
.program-title { font-size: var(--step-2); font-weight: 600; line-height: 1.2; color: var(--maroon); }
.program-desc { color: var(--muted); max-width: 58ch; }
.program-for { display: inline-flex; align-items: center; gap: 12px; font-size: 0.92rem; font-weight: 600; color: var(--maroon); white-space: nowrap; }
.program-for .arrow {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--maroon); transition: background-color 0.2s ease, color 0.2s ease;
}
.program-for .arrow svg { width: 18px; height: 18px; }
.program:hover .arrow { background: var(--maroon); color: var(--cream); }
@media (max-width: 720px) {
  .program { grid-template-columns: 96px minmax(0, 1fr); }
  .program-for { grid-column: 2; }
  .program-for .arrow { width: 36px; height: 36px; }
}

/* ---------- workshop steps (sticky image on desktop) ---------- */
.steps-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); }
.steps-media { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
.steps-frame { position: relative; aspect-ratio: 5 / 4; border-radius: var(--radius); overflow: hidden; background: var(--maroon); }
.steps-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s ease; }
.steps-frame img.is-active { opacity: 1; }
.steps-count { margin-top: 14px; display: flex; gap: 8px; }
.steps-count i { flex: 1; height: 4px; border-radius: 2px; background: var(--line-strong); transition: background-color 0.3s ease; }
.steps-count i.is-active { background: var(--maroon); }
.step-list { list-style: none; display: grid; }
.step { min-height: 56vh; display: grid; align-content: center; gap: 14px; padding-block: 28px; border-top: 1px solid var(--line-strong); }
.step:first-child { border-top: 0; }
.step:last-child { min-height: 40vh; }
.step-num { font-family: var(--display); font-size: 1rem; color: var(--clay); }
.step h3 { font-family: var(--display); font-weight: 400; font-size: var(--step-3); color: var(--maroon); line-height: 1.05; }
.step p { max-width: 46ch; color: var(--muted); }
.step-photo { display: none; }
@media (max-width: 900px) {
  .steps-grid { grid-template-columns: 1fr; }
  .steps-media { display: none; }
  .step { min-height: 0; }
  .step-photo { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; margin-bottom: 6px; }
  .step-photo img { width: 100%; height: 100%; object-fit: cover; }
}

/* the Arduino sketch: real code, so a real monospace face */
.code {
  margin-top: 8px; border-radius: 12px; background: var(--ink); color: #eae3d6;
  font-family: var(--code); font-size: 0.86rem; line-height: 1.7;
  box-shadow: 0 14px 36px rgba(37, 37, 37, 0.25); overflow: hidden; max-width: 520px;
}
.code-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: #1b1b1b; font-family: var(--body); font-size: 0.8rem; color: #b8ad9d; }
.code-bar b { color: #eae3d6; font-weight: 500; }
.code pre { margin: 0; padding: 16px 18px 18px; overflow-x: auto; min-height: 21.5em; white-space: pre; }
.code .k { color: #f0a58a; }   /* keywords */
.code .f { color: #7fd8d8; }   /* functions */
.code .n { color: #f5d38a; }   /* numbers */
.code .c { color: #8f8577; }   /* comments */
.code .caret { display: inline-block; width: 0.55em; height: 1.1em; vertical-align: -0.2em; background: var(--teal); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- FUSION band ---------- */
.fusion-band { background: var(--f-bg); color: var(--f-white); --focus: var(--f-yellow); position: relative; overflow: hidden; }
.fusion-band::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 6px;
  background: linear-gradient(90deg, var(--f-purple) 0 33.3%, var(--f-blue) 33.3% 66.6%, var(--f-cyan) 66.6%);
}
.fusion-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.fusion-logo { width: 100%; max-width: 620px; }
.fusion-when { font-family: var(--display); font-size: var(--step-2); line-height: 1.2; }
.fusion-when span { color: var(--f-yellow); }
.fusion-copy { display: grid; gap: 22px; }
.fusion-copy p { color: rgba(255, 250, 249, 0.82); max-width: 50ch; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; }
.chips li { padding: 7px 14px; border-radius: 999px; font-size: 0.92rem; font-weight: 500; border: 1.5px solid rgba(255,250,249,0.22); }
.chips li:nth-child(3n+1) { border-color: var(--f-purple); }
.chips li:nth-child(3n+2) { border-color: var(--f-blue); }
.chips li:nth-child(3n) { border-color: var(--f-cyan); }
.btn--fusion { --bg: var(--f-yellow); --fg: var(--f-bg); --edge: #9a7a00; }
.btn--fusion:hover { --bg: #ffd52e; }
.btn--fusion-outline { --bg: transparent; --fg: var(--f-white); --edge: var(--f-white); box-shadow: 0 4px 0 rgba(0,0,0,0.4); }
.btn--fusion-outline:hover { --bg: rgba(255,250,249,0.08); }
@media (max-width: 900px) { .fusion-grid { grid-template-columns: 1fr; } }

/* ---------- robot with hotspots ---------- */
.robot-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.robot-figure { position: relative; margin: 0; }
.robot-photo { position: relative; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: 0 24px 60px rgba(67, 16, 15, 0.18); }
.robot-photo img { width: 100%; }
.hotspot {
  position: absolute; transform: translate(-50%, -50%);
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--maroon); color: var(--cream); border: 2px solid var(--cream);
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.hotspot::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(249,240,222,0.9); opacity: 0; }
.hotspot:hover { transform: translate(-50%, -50%) scale(1.1); }
.hotspot[aria-pressed="true"] { background: var(--teal); color: var(--ink); }
.hotspot[aria-pressed="true"]::after { opacity: 1; animation: ping 1.8s ease-out infinite; }
@keyframes ping { 0% { transform: scale(0.8); opacity: 0.9; } 100% { transform: scale(1.5); opacity: 0; } }
.callout {
  margin-top: 18px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; align-items: start;
  padding: 18px 20px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line);
  min-height: 112px;
}
.callout-num { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: var(--ink); font-weight: 600; }
.callout-title { font-weight: 600; color: var(--maroon); }
.callout-text { color: var(--muted); font-size: 0.97rem; }
.facts { list-style: none; display: grid; gap: 0; margin: 28px 0 32px; border-top: 1px solid var(--line-strong); }
.facts li { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-strong); }
.facts dt, .facts .k { font-weight: 600; color: var(--maroon); }
.facts .v { color: var(--ink); }
@media (max-width: 900px) { .robot-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .facts li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- gallery ---------- */
.gallery { columns: 3 280px; column-gap: 16px; }
.gallery-item { break-inside: avoid; margin: 0 0 16px; }
.gallery-item button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden; }
.gallery-item img { width: 100%; transition: transform 0.5s ease; }
.gallery-item button:hover img { transform: scale(1.03); }
.gallery-item figcaption { padding: 8px 2px 0; font-size: 0.9rem; color: var(--muted); }
.band .gallery-item figcaption { color: var(--on-dark-muted); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(20, 6, 6, 0.86); }
.lightbox img { max-height: 80vh; width: auto; margin-inline: auto; border-radius: 10px; }
.lightbox p { color: var(--cream); text-align: center; margin-top: 12px; }
.lightbox-close {
  position: absolute; top: -52px; right: 0; width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--cream); background: none; color: var(--cream); cursor: pointer; display: grid; place-items: center;
}
.lightbox-close svg { width: 20px; height: 20px; }

/* ---------- CTA tiles ---------- */
.cta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.cta-tile {
  display: grid; gap: 14px; align-content: start; padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius); background: var(--cream); color: var(--ink); text-decoration: none;
  box-shadow: 0 6px 0 var(--maroon-ink); transition: transform 0.15s ease, box-shadow 0.15s ease; --focus: var(--maroon);
}
.cta-tile:hover { transform: translateY(-3px); box-shadow: 0 9px 0 var(--maroon-ink); }
.cta-tile:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--maroon-ink); }
.cta-tile h3 { font-family: var(--display); font-weight: 400; font-size: var(--step-2); color: var(--maroon); }
.cta-tile p { color: var(--muted); }
.cta-tile .go { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--maroon); margin-top: 6px; }
.cta-tile .go svg { width: 18px; height: 18px; transition: transform 0.2s ease; }
.cta-tile:hover .go svg { transform: translateX(4px); }
@media (max-width: 720px) { .cta-grid { grid-template-columns: 1fr; } }

/* ---------- generic split + cards ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.split--center { align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.media { border-radius: var(--radius); overflow: hidden; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--43 { aspect-ratio: 4 / 3; }
.media--45 { aspect-ratio: 4 / 5; }

.checklist { list-style: none; display: grid; gap: 12px; }
.checklist li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; }
.checklist svg { width: 22px; height: 22px; color: var(--maroon); margin-top: 3px; }
.band .checklist svg { color: var(--teal); }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 34px); }
.panel h3 { margin-bottom: 12px; }
.panel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.panel-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .panel-grid, .panel-grid--2 { grid-template-columns: 1fr; } }

.spec { list-style: none; display: grid; border-top: 2px solid var(--maroon); }
.spec li { display: grid; grid-template-columns: minmax(0, 10rem) minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-strong); }
.spec .k { font-weight: 600; color: var(--maroon); }
@media (max-width: 520px) { .spec li { grid-template-columns: 1fr; gap: 2px; } }

/* numbered agenda (a real sequence) */
.agenda { list-style: none; display: grid; gap: 0; counter-reset: agenda; }
.agenda li { counter-increment: agenda; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line-strong); }
.agenda li::before { content: counter(agenda); font-family: var(--display); font-size: 1.6rem; color: var(--clay); line-height: 1.1; }
.agenda b { display: block; font-weight: 600; color: var(--maroon); margin-bottom: 2px; }
.agenda span { color: var(--muted); }

/* ---------- timeline (STEM Cells seasons) ---------- */
.timeline { list-style: none; display: grid; border-top: 2px solid var(--maroon); }
.season { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: clamp(16px, 4vw, 48px); padding: 28px 0; border-bottom: 1px solid var(--line-strong); }
.season-year { font-family: var(--display); font-size: var(--step-2); color: var(--maroon); line-height: 1.1; }
.season-game { display: block; margin-top: 6px; font-family: var(--body); font-size: 0.95rem; font-weight: 500; color: var(--muted); }
.awards { list-style: none; display: grid; gap: 12px; }
.award { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: baseline; }
.award-place {
  display: inline-grid; place-items: center; min-width: 46px; padding: 2px 8px; border-radius: 999px;
  font-size: 0.82rem; font-weight: 600; background: rgba(134, 37, 38, 0.1); color: var(--maroon);
}
.award-place--1 { background: var(--maroon); color: var(--cream); }
.award b { font-weight: 600; }
.award-where { color: var(--muted); }
.season--highlight { background: linear-gradient(90deg, rgba(17,174,174,0.09), transparent 70%); padding-inline: 16px; margin-inline: -16px; border-radius: 6px; }
@media (max-width: 720px) { .season { grid-template-columns: 1fr; } }

.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(249,240,222,0.25); border-bottom: 1px solid rgba(249,240,222,0.25); margin-top: 48px; }
.stat { padding: 24px 20px 24px 0; }
.stat + .stat { padding-left: 20px; border-left: 1px solid rgba(249,240,222,0.25); }
.stat b { display: block; font-family: var(--display); font-weight: 400; font-size: var(--step-3); line-height: 1; color: var(--cream); font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 10px; font-size: 0.95rem; color: var(--on-dark-muted); }
@media (max-width: 820px) {
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid rgba(249,240,222,0.25); }
}

/* ---------- FUSION page ---------- */
.fusion-page { background: var(--f-bg); color: var(--f-white); --focus: var(--f-yellow); }
.fusion-page .section--alt { background: var(--f-panel); }
.fusion-hero { padding-block: clamp(48px, 7vw, 100px); text-align: left; }
.fusion-hero .fusion-logo { max-width: 700px; margin-bottom: 28px; margin-left: -2%; }
.fusion-hero-copy { max-width: 640px; }
.fusion-hero-copy .fusion-when { font-size: var(--step-3); }
.fusion-strip { background: var(--f-yellow); color: var(--f-bg); --focus: var(--f-bg); }
.fusion-strip-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 40px; padding-block: 26px; }
.fusion-strip p { font-weight: 600; font-size: var(--step-1); font-style: italic; }
.fusion-strip .tagline { font-family: var(--body); font-weight: 500; font-style: italic; font-size: var(--step-2); letter-spacing: 0.01em; }
.zone-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; list-style: none; }
.zone { padding: 26px; border-radius: var(--radius); background: var(--f-panel); border-top: 4px solid var(--f-purple); }
.zone:nth-child(3n+2) { border-top-color: var(--f-blue); }
.zone:nth-child(3n) { border-top-color: var(--f-cyan); }
.section--alt .zone { background: var(--f-bg); }
.zone h3 { font-size: var(--step-1); font-weight: 600; margin-bottom: 8px; }
.zone p { color: rgba(255,250,249,0.75); font-size: 0.98rem; }
.fusion-page .h2 { color: var(--f-white); }
.fusion-page .muted { color: rgba(255,250,249,0.72); }
.fusion-page .spec { border-top-color: var(--f-cyan); }
.fusion-page .spec li { border-bottom-color: rgba(255,250,249,0.16); }
.fusion-page .spec .k { color: var(--f-cyan); }
.join-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.join {
  display: grid; gap: 10px; align-content: start; padding: 24px; border-radius: var(--radius);
  background: var(--f-bg); color: var(--f-white); text-decoration: none; border: 1.5px solid rgba(255,250,249,0.14);
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.join:hover { border-color: var(--f-yellow); transform: translateY(-2px); }
.join h3 { font-weight: 600; font-size: var(--step-1); }
.join p { color: rgba(255,250,249,0.72); font-size: 0.95rem; }
.join .go { color: var(--f-yellow); font-weight: 600; display: inline-flex; gap: 8px; align-items: center; }
.join .go svg { width: 16px; height: 16px; }
.faq { display: grid; gap: 0; border-top: 1px solid rgba(255,250,249,0.16); }
.faq details { border-bottom: 1px solid rgba(255,250,249,0.16); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; font-weight: 600; font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; flex: none; transition: transform 0.2s ease; color: var(--f-yellow); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: rgba(255,250,249,0.78); max-width: 70ch; }
.faq--light { border-top-color: var(--line-strong); }
.faq--light details { border-bottom-color: var(--line-strong); }
.faq--light summary svg { color: var(--maroon); }
.faq--light details p { color: var(--muted); }
@media (max-width: 960px) { .zone-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .join-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .zone-grid, .join-grid { grid-template-columns: 1fr; } }

/* ---------- forms ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px; border-radius: 16px; background: rgba(134, 37, 38, 0.08); width: fit-content; max-width: 100%; }
.tab {
  border: 0; background: none; padding: 12px 18px; border-radius: 11px; font-weight: 600; color: var(--maroon); cursor: pointer;
  --focus: var(--maroon);
}
.tab:hover { background: rgba(134, 37, 38, 0.08); }
.tab[aria-selected="true"] { background: var(--maroon); color: var(--cream); box-shadow: 0 3px 0 var(--maroon-ink); }
.tab-panel { margin-top: 32px; }
.form-layout { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.form-aside { display: grid; gap: 18px; }
.form-aside h2 { font-family: var(--display); font-weight: 400; font-size: var(--step-2); color: var(--maroon); line-height: 1.15; }
@media (max-width: 900px) { .form-layout { grid-template-columns: 1fr; } }
.form { display: grid; gap: 20px; padding: clamp(22px, 3vw, 36px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); --focus: var(--maroon); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; min-width: 0; }
.field label, .field legend, .field-label { font-weight: 600; font-size: 0.95rem; color: var(--ink); padding: 0; }
.field .hint { font-size: 0.86rem; color: var(--muted); margin-top: -3px; }
.req { color: var(--maroon); }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid rgba(37, 37, 37, 0.28); background: #fff; color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23862526' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 44px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--maroon); box-shadow: 0 0 0 4px rgba(134, 37, 38, 0.16); }
.input:user-invalid, .select:user-invalid, .textarea:user-invalid { border-color: #b3261e; }
fieldset.field { border: 0; margin: 0; padding: 0; }
.options { display: flex; flex-wrap: wrap; gap: 10px; }
.option { position: relative; }
.option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.option span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 9px 15px; border-radius: 10px;
  border: 1.5px solid rgba(37, 37, 37, 0.25); background: #fff; font-size: 0.95rem; font-weight: 500;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.option input:checked + span { background: var(--maroon); border-color: var(--maroon); color: var(--cream); }
.option input:focus-visible + span { outline: 3px solid var(--maroon); outline-offset: 2px; }
.option--big span { min-height: 56px; padding: 12px 18px; font-size: 1rem; }
.consent { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; font-size: 0.92rem; color: var(--muted); align-items: start; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--maroon); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.form-foot small { color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { display: none; padding: 16px 18px; border-radius: 12px; font-weight: 500; }
.form-status.is-error { display: block; background: #fbe9e7; color: #8c1d18; border: 1px solid #f2b8b5; }
.form-success { display: grid; gap: 14px; justify-items: start; padding: clamp(28px, 4vw, 48px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.form-success .tick { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: var(--ink); }
.form-success .tick svg { width: 28px; height: 28px; }
.form-success h3 { font-family: var(--display); font-weight: 400; font-size: var(--step-2); color: var(--maroon); }
.form-success .note { font-size: 0.9rem; color: var(--muted); }

/* ---------- contact bits ---------- */
.email-chip { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.email-chip a { font-weight: 600; font-size: var(--step-1); color: var(--maroon); }
.band .email-chip a { color: var(--cream); }
.copy-btn { border: 1.5px solid currentColor; border-radius: 8px; background: none; padding: 4px 10px; font-size: 0.85rem; font-weight: 600; cursor: pointer; color: inherit; opacity: 0.8; }
.copy-btn:hover { opacity: 1; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--cream); --focus: var(--cream); padding-block: clamp(56px, 7vw, 88px) calc(28px + env(safe-area-inset-bottom, 0px)); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.footer-brand svg { width: 210px; height: auto; color: var(--cream); }
.footer-brand p { margin-top: 20px; color: rgba(249,240,222,0.72); max-width: 34ch; font-size: 0.97rem; }
.footer-col h2 { font-family: var(--body); font-size: 0.95rem; font-weight: 600; color: var(--cream); margin-bottom: 14px; }
.footer-col ul { list-style: none; display: grid; gap: 8px; }
.footer-col a { color: rgba(249,240,222,0.78); text-decoration: none; font-size: 0.97rem; }
.footer-col a:hover { color: var(--cream); text-decoration: underline; }
.footer-base { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(249,240,222,0.16); display: grid; gap: 14px; font-size: 0.88rem; color: rgba(249,240,222,0.66); }
.footer-base .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

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