/* ============================================================
   JPA — JagoPakaiAI
   Nothing Design System · Living Billboard (5-cell carousel)
   Dark mode default via data-theme. Manual toggle.
   ============================================================ */

/* --- TOKENS (Dark Mode Default) --- */
[data-theme="dark"], :root {
  --black: #000000;
  --surface: #111111;
  --surface-raised: #1A1A1A;
  --border: #222222;
  --border-visible: #333333;
  --text-disabled: #666666;
  --text-secondary: #999999;
  --text-primary: #E8E8E8;
  --text-display: #FFFFFF;
  --accent: #D71921;
  --accent-subtle: rgba(215, 25, 33, 0.15);
  --success: #4A9E5C;
  --warning: #D4A843;
  --interactive: #5B9BF6;

  /* Spacing */
  --space-2xs: 2px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Type Scale — fluid, scales with viewport (min of width/height) */
  --display-xl: clamp(56px, min(7vw, 12vh), 132px);
  --display-lg: clamp(40px, min(4.8vw, 8vh),  92px);
  --display-md: clamp(32px, min(3.4vw, 5.8vh), 64px);
  --heading:    clamp(22px, min(2.1vw, 3.5vh), 40px);
  --subheading: clamp(18px, min(1.6vw, 2.7vh), 30px);
  --body:       clamp(15px, min(1.15vw, 1.9vh), 22px);
  --body-sm:    clamp(14px, min(1vw,    1.7vh), 19px);
  --caption:    clamp(13px, min(0.85vw, 1.4vh), 17px);
  --label:      clamp(12px, min(0.75vw, 1.25vh), 15px);

  /* Grid */
  --tile-radius: 12px;
  --tile-gap: 8px;
  --grid-padding: 8px;
  --footer-height: 44px;

  /* Motion */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --slide-fade: 220ms;
}

/* --- LIGHT MODE --- */
[data-theme="light"] {
  --black: #F7F5F0;
  --surface: #FFFDF8;
  --surface-raised: #F0EDE6;
  --border: #D4CFC4;
  --border-visible: #B8B2A6;
  --text-disabled: #A39D94;
  --text-secondary: #7A7468;
  --text-primary: #2C2824;
  --text-display: #1A1714;
  --interactive: #2B5EA7;
}

[data-theme="light"] body {
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 31px, rgba(180, 170, 155, 0.03) 31px, rgba(180, 170, 155, 0.03) 32px),
    repeating-linear-gradient(90deg, transparent, transparent 31px, rgba(180, 170, 155, 0.03) 31px, rgba(180, 170, 155, 0.03) 32px);
}

/* --- RESET --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Space Grotesk', 'DM Sans', system-ui, sans-serif;
  background: var(--black);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
address { font-style: normal; }

/* --- SKIP LINK --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--grid-padding);
  z-index: 1000;
  font-family: 'Space Mono', monospace;
  font-size: var(--caption);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--text-display);
  padding: var(--space-sm) var(--space-md);
  border-radius: 999px;
  text-decoration: none;
  transition: top 200ms var(--ease);
}
.skip-link:focus { top: var(--grid-padding); }

/* --- PAGE TOOLBAR (top-right: theme) --- */
.page-toolbar {
  position: fixed;
  top: var(--grid-padding);
  right: var(--grid-padding);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* --- THEME TOGGLE --- */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.theme-toggle__track {
  display: block;
  width: 36px;
  height: 18px;
  background: var(--surface-raised);
  border: 1px solid var(--border-visible);
  border-radius: 999px;
  position: relative;
  transition: background 200ms var(--ease);
}

.theme-toggle__knob {
  display: block;
  width: 12px;
  height: 12px;
  background: var(--text-display);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 200ms var(--ease);
}

[data-theme="light"] .theme-toggle__knob { transform: translateX(18px); }

.theme-toggle__label {
  font-family: 'Space Mono', monospace;
  font-size: var(--label);
  letter-spacing: 0.1em;
  color: var(--text-disabled);
  text-transform: uppercase;
}

/* ============================================================
   5-CELL BILLBOARD GRID
   Desktop: Hero + Research (row 1) · Event + Showcase + Touchpoint (row 2)
   ============================================================ */
.bento-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: var(--tile-gap);
  padding: var(--grid-padding);
  padding-bottom: 0;
  min-height: 0;
  grid-template-areas:
    "hero  hero  hero  hero  hero  hero  spotA spotA spotA spotA spotA spotA"
    "event event event spotB spotB spotB spotB spotB spotB touch touch touch";
}

.bento-grid > * { min-width: 0; min-height: 0; }

/* --- BASE TILE --- */
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--tile-radius);
  padding: var(--space-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: border-color 200ms var(--ease);
}
.tile:hover { border-color: var(--border-visible); }
a.tile:active { transform: scale(0.995); transition: transform 100ms var(--ease); }

/* --- TILE LABEL (shared) --- */
.tile-label {
  font-family: 'Space Mono', monospace;
  font-size: var(--label);
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--text-disabled);
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  flex-shrink: 0;
}

/* ============================================================
   TILE: HERO (fixed)
   ============================================================ */
.tile-hero {
  grid-area: hero;
  justify-content: center;
  padding: var(--space-xl);
}

.tile-hero__label {
  font-family: 'Space Mono', monospace;
  font-size: var(--label);
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-hero__title {
  font-family: 'Doto', 'Space Mono', monospace;
  font-size: var(--display-xl);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--text-display);
  margin-bottom: var(--space-sm);
}

.tile-hero__subtitle {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--heading);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.tile-hero__desc {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--body-sm);
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 48ch;
  margin-bottom: var(--space-lg);
}

.tile-hero__cta {
  align-self: flex-end;
  margin-top: auto;
}

/* ============================================================
   TILE: LAUNCH EVENT (fixed, accent border)
   ============================================================ */
.tile-event {
  grid-area: event;
  border-color: var(--border);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  justify-content: space-between;
}

.tile-event:hover {
  border-color: var(--accent);
}

.tile-event__date {
  font-family: 'Doto', 'Space Mono', monospace;
  font-size: var(--display-lg);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text-display);
  margin: var(--space-xs) 0;
}

.tile-event__details {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--caption);
  color: var(--text-secondary);
  line-height: 1.4;
}

.tile-event__sponsors {
  font-family: 'Space Mono', monospace;
  font-size: var(--label);
  letter-spacing: 0.08em;
  color: var(--text-disabled);
  text-transform: uppercase;
  margin-top: var(--space-md);
}



.tile-event--past { border-color: var(--border-visible); }
.tile-event--past:hover { background: var(--surface-raised); }
.tile-event--past .tile-event__cta { color: var(--text-secondary); border-color: var(--border-visible); }
.tile-event--past .tile-label::after { content: ' · RECAP'; }

/* ============================================================
   SPOTLIGHT (rotating carousel cell)
   ============================================================ */
.spotlight {
  position: relative;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.spotlight--blog-slider { grid-area: spotA; }
.spotlight--showcase { grid-area: spotB; }
.spotlight--touchpoint { grid-area: touch; }

.spotlight__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  min-width: 0;
}

/* --- SLIDE (absolutely-stacked; active slide sits on top with opaque
   background so the incoming slide masks the outgoing during fade) --- */
.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  opacity: 0;
  pointer-events: none;
  background: var(--surface);
  z-index: 0;
  transition: opacity var(--slide-fade) var(--ease);
  min-height: 0;
  min-width: 0;
}

.slide[data-active] {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.slide__label {
  margin-bottom: var(--space-sm);
  flex-shrink: 0;
}

.slide__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.slide__tagline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--caption);
  font-weight: 400;
  font-style: italic;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.slide__hero-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* --- FEATURE SLIDES (Transformer · JPA Community): dot-grid + accent CTA --- */
.slide--feature { position: absolute; inset: 0; }

.slide__dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--text-disabled) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.06;
  pointer-events: none;
}

.slide__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: var(--space-sm);
}

.slide__feature-name {
  font-family: 'Doto', 'Space Mono', monospace;
  font-size: var(--display-md);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--text-display);
  margin: var(--space-sm) 0 var(--space-xs);
}

.slide__feature-sub {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--caption);
  color: var(--text-secondary);
  line-height: 1.4;
}

.slide--world { /* red accent border on this cell when active */ }
.spotlight--showcase:has(.slide--world[data-active]) {
  border-color: var(--accent);
  transition: border-color 500ms var(--ease);
}

/* --- Generic slide CTA (link-styled) --- */
.slide__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: 'Space Mono', monospace;
  font-size: var(--label);
  letter-spacing: 0.06em;
  color: var(--interactive);
  text-transform: uppercase;
  margin-top: auto;
  align-self: flex-start;
  transition: color 200ms var(--ease);
}
.slide__cta--accent { color: var(--accent); }
.slide__cta:hover { color: var(--text-display); }

.slide__cta-arrow {
  font-size: var(--subheading);
  transition: transform 200ms var(--ease);
}
.slide__cta:hover .slide__cta-arrow { transform: translateX(4px); }

/* --- Faculty slide --- */
.slide__body--faculty { gap: var(--space-sm); }

.tile-faculty__hero {
  font-family: 'Doto', 'Space Mono', monospace;
  font-size: var(--display-lg);
  font-weight: 700;
  line-height: 1.0;
  color: var(--text-display);
  margin: 0 0 var(--space-xs);
}

.tile-faculty__bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  gap: 2px;
  margin: var(--space-sm) 0 var(--space-xs);
}

.faculty-seg {
  background: var(--text-primary);
  border-radius: 2px;
  min-width: 4px;
}
.faculty-seg--alt1 { background: var(--text-secondary); }
.faculty-seg--alt2 { background: var(--text-disabled); }
.faculty-seg--alt3 { background: var(--border-visible); }
.faculty-seg--alt4 { background: var(--border-visible); opacity: 0.7; }
.faculty-seg--alt5 { background: var(--border); }

.tile-faculty__legend {
  display: flex;
  gap: var(--space-sm);
  font-family: 'Space Mono', monospace;
  font-size: var(--label);
  letter-spacing: 0.06em;
  color: var(--text-disabled);
  text-transform: uppercase;
  flex-wrap: wrap;
}
.tile-faculty__legend span {
  display: flex;
  align-items: center;
  gap: 3px;
}
.tile-faculty__legend span::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tile-faculty__legend span:nth-child(1)::before { background: var(--text-primary); }
.tile-faculty__legend span:nth-child(2)::before { background: var(--text-secondary); }
.tile-faculty__legend span:nth-child(3)::before { background: var(--text-disabled); }
.tile-faculty__legend span:nth-child(4)::before { background: var(--border-visible); }
.tile-faculty__legend span:nth-child(5)::before { background: var(--border); }

/* --- Stats grid (At-a-Glance slide) --- */
.stats-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: var(--space-md);
  min-height: 0;
}

.stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: var(--space-xs);
}

.stat-value {
  font-family: 'Doto', 'Space Mono', monospace;
  font-size: var(--display-md);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--text-display);
}

.stat-label {
  font-family: 'Space Mono', monospace;
  font-size: var(--label);
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* --- Stat hero inside a research slide --- */
.tile-stat-hero {
  font-family: 'Doto', 'Space Mono', monospace;
  font-size: var(--display-md);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--text-display);
}

.tile-stat-unit {
  font-family: 'Space Mono', monospace;
  font-size: var(--label);
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* --- Projects list (research slides) --- */
.tile-projects {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border-visible) transparent;
  scroll-padding-block: var(--space-xs);
  /* Bottom fade cues "more below" when content overflows. Lifted by .is-at-end. */
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 24px), transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 24px), transparent 100%);
}

.tile-projects.is-at-end {
  -webkit-mask-image: none;
          mask-image: none;
}

.tile-projects::-webkit-scrollbar {
  width: 4px;
}
.tile-projects::-webkit-scrollbar-track {
  background: transparent;
}
.tile-projects::-webkit-scrollbar-thumb {
  background: var(--border-visible);
  border-radius: 2px;
}
.tile-projects::-webkit-scrollbar-thumb:hover {
  background: var(--text-disabled);
}

.project {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-xs) 0;
  border-top: 1px solid var(--border);
}
.project:first-child { border-top: none; }

.project-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--subheading);
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-tags {
  font-family: 'Space Mono', monospace;
  font-size: var(--label);
  letter-spacing: 0.02em;
  color: var(--text-disabled);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Progress bar --- */
.progress-bar {
  position: relative;
  height: 6px;
  background: var(--border);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: var(--space-sm);
  overflow: visible;
}

.progress-bar__fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: width 400ms var(--ease);
}
.progress-bar__fill--success { background: var(--success); }
.progress-bar__fill--warning { background: var(--warning); }
.progress-bar__fill--active { background: var(--interactive); }

.progress-bar__label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-sm);
  background: var(--surface-raised);
  border: 1px solid var(--border-visible);
  border-radius: 999px;
  font-family: 'Space Mono', monospace;
  font-size: var(--label);
  letter-spacing: 0.08em;
  color: var(--text-disabled);
  text-transform: uppercase;
  white-space: nowrap;
}

/* --- Partners slide --- */
.partners-count {
  font-family: 'Doto', 'Space Mono', monospace;
  font-size: var(--display-md);
  font-weight: 700;
  line-height: 1;
  color: var(--text-display);
  margin-left: auto;
}

.slide__body--partners {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  min-height: 0;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: var(--space-sm);
  flex: 1;
  min-height: 0;
}

.partners-grid__cell {
  position: relative;
  display: grid;
  place-items: center;
  padding: var(--space-md) var(--space-lg);
  border-radius: 4px;
  text-decoration: none;
  min-width: 0;
  opacity: 0;
}

.slide[data-active] .partners-grid__cell {
  animation: partner-cell-in 420ms var(--ease) both;
  animation-delay: calc(var(--cell-idx, 0) * 80ms);
}

@keyframes partner-cell-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.partners-grid__cell:focus-visible {
  outline: 2px solid var(--border-visible);
  outline-offset: 2px;
}

.partner-logo {
  display: block;
  width: 100%;
  height: clamp(28px, 4.4vh, 40px);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: var(--logo-dark);
  opacity: 0.82;
  transition: opacity 200ms var(--ease);
}
[data-theme="light"] .partner-logo {
  background-image: var(--logo-light);
}
.partners-grid__cell:hover .partner-logo,
.partners-grid__cell:focus-visible .partner-logo {
  opacity: 1;
}

/* Per-partner optical-weight tuning: `background-size: auto <%>` maps to
   logo-height-as-percent-of-cell-height. Values are hand-picked to equalize
   visual presence across horizontal wordmarks, stacked marks, and pictograms. */
.partner-logo--aws {
  --logo-dark:  url('assets/partners/aws--on-dark.svg');
  --logo-light: url('assets/partners/aws--on-light.svg');
  /* AWS's viewBox is near-square (1.67:1, because wordmark sits above arrow),
     so `contain` alone renders it small relative to horizontal wordmarks.
     Scale up visually via `transform` — unlike `height`, transforms don't
     participate in grid row math, so AWS's extra presence doesn't push the
     grid into the footer. */
  background-size: contain;
  transform: scale(1.45);
  transform-origin: center;
}
.partner-logo--unity {
  --logo-dark:  url('assets/partners/unity--on-dark.svg');
  --logo-light: url('assets/partners/unity--on-light.svg');
  background-size: auto 95%;
}
.partner-logo--sgr-law {
  --logo-dark:  url('assets/partners/sgr-law--on-dark.svg');
  --logo-light: url('assets/partners/sgr-law--on-light.svg');
  background-size: auto 95%;
}
.partner-logo--arc {
  --logo-dark:  url('assets/partners/arc--on-dark.svg');
  --logo-light: url('assets/partners/arc--on-light.svg');
  background-size: auto 105%;
}
.partner-logo--georgia {
  --logo-dark:  url('assets/partners/georgia-usa--on-dark.png');
  --logo-light: url('assets/partners/georgia-usa--on-light.png');
  background-size: auto 75%;
}
.partner-logo--provost {
  --logo-dark:  url('assets/partners/provost-studio--on-dark.svg');
  --logo-light: url('assets/partners/provost-studio--on-light.svg');
  /* Very wide wordmark (aspect ~8.3:1). At `auto 40%` the rendered height is
     ~16px and the auto-width stays inside the cell's 164px — anything above
     ~50% would start overflowing horizontally and clip the P and O letters. */
  background-size: auto 40%;
}
.partner-logo--telmore {
  --logo-dark:  url('assets/partners/telmore--on-dark.svg');
  --logo-light: url('assets/partners/telmore--on-light.svg');
  background-size: auto 45%;
}
.partner-logo--soapbox {
  --logo-dark:  url('assets/partners/soapbox--on-dark.png');
  --logo-light: url('assets/partners/soapbox--on-light.png');
  background-size: auto 75%;
}
.partner-logo--norton {
  --logo-dark:  url('assets/partners/norton-childrens--on-dark.svg');
  --logo-light: url('assets/partners/norton-childrens--on-light.svg');
  background-size: auto 90%;
}

/* TEMP (2026-04-23): user only provided dark-ink logos for light backgrounds;
   true on-dark (white) variants are still pending. `brightness(0) invert(1)`
   collapses any input color to pure white, giving a silhouette wall in dark
   mode until real white SVGs arrive. Remove this whole block once the
   *--on-dark.* files are replaced with genuine white artwork. */
[data-theme="dark"] .partner-logo {
  filter: brightness(0) invert(1);
}

/* Silhouette enforcement in light mode: Georgia (full brand color) and Unity
   (red ink) collapse to pure near-black so the PARTNERS wall stays monochrome
   and the accent budget (red = Install Tile + JPA Community) stays intact. */
[data-theme="light"] .partner-logo--georgia,
[data-theme="light"] .partner-logo--unity {
  filter: brightness(0);
}

.slide__footnote {
  margin-top: auto;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-visible);
  font-family: 'Space Mono', monospace;
  font-size: var(--label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-disabled);
  text-align: center;
}

@media (max-width: 900px) {
  .partners-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .partners-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .slide[data-active] .partners-grid__cell,
  .slide[data-active] .sponsors-grid__cell {
    animation: none;
    opacity: 1;
  }
}

/* --- Sponsors slide (celebrate via scale, Nothing 2.4: spacing-only grouping) --- */
.slide__body--sponsors {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  min-height: 0;
}

.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: var(--space-lg);
  flex: 1;
  min-height: 0;
}

.sponsors-grid__cell {
  position: relative;
  display: grid;
  place-items: center;
  padding: var(--space-md) var(--space-lg);
  border-radius: 4px;
  text-decoration: none;
  min-width: 0;
  opacity: 0;
  transition: opacity 200ms var(--ease);
}
.sponsors-grid__cell:focus-visible {
  outline: 2px solid var(--border-visible);
  outline-offset: 2px;
}

.slide[data-active] .sponsors-grid__cell {
  animation: partner-cell-in 420ms var(--ease) both;
  animation-delay: calc(var(--cell-idx, 0) * 120ms);
}

/* `contain` guarantees the logo fits its span width at narrow viewports — the
   earlier `auto N%` sizing computed widths from the height, which overflowed
   145px cells at a 1280px viewport. `max-width: 85%` leaves gutters so
   neighbouring logos don't visually crowd each other. */
.sponsors-grid .partner-logo {
  height: clamp(52px, 9vh, 80px);
  max-width: 85%;
  background-size: contain;
  transform: none;
}

@media (max-width: 900px) {
  .sponsors-grid { grid-template-columns: 1fr; gap: var(--space-md); }
  .sponsors-grid .partner-logo { height: clamp(44px, 8vh, 68px); max-width: 70%; }
}

/* --- Published games slide (one game per pane) --- */
.slide__body--game {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.game-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  text-decoration: none;
  color: inherit;
  min-width: 0;
  min-height: 0;
}

.game-card__img-wrap {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 460 / 215;
  flex-shrink: 1;
  min-height: 0;
}

.game-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.3) brightness(0.85);
  transition: filter 300ms var(--ease);
}

.game-card:hover .game-card__img {
  filter: grayscale(50%) contrast(1.15) brightness(0.95);
}

.game-card__paper-overlay {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(0,0,0,0.06) 2px, rgba(0,0,0,0.06) 3px);
  mix-blend-mode: multiply;
  pointer-events: none;
  opacity: 0.7;
}
[data-theme="light"] .game-card__paper-overlay {
  background-image: repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(0,0,0,0.08) 2px, rgba(0,0,0,0.08) 3px);
}

.game-card__info { display: flex; flex-direction: column; gap: 1px; flex-shrink: 0; }
.game-card__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--body-sm);
  font-weight: 500;
  color: var(--text-display);
}
.game-card__tags {
  font-family: 'Space Mono', monospace;
  font-size: var(--label);
  letter-spacing: 0.06em;
  color: var(--text-disabled);
  text-transform: uppercase;
}
.game-card__meta { font-family: 'Space Mono', monospace; font-size: var(--caption); color: var(--text-secondary); }

.game-card__available {
  font-family: 'Space Mono', monospace;
  font-size: var(--label);
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.accent-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

/* --- Touchpoint slides --- */
.slide--touch { justify-content: flex-start; align-items: stretch; text-align: left; }

.slide__body--touch {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  gap: var(--space-md);
  text-align: left;
}

.touch-primary-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.touch-primary {
  font-family: 'Space Mono', monospace;
  font-size: var(--subheading);
  color: var(--interactive);
  overflow-wrap: anywhere;
  transition: color 200ms var(--ease);
}
.touch-primary:hover { color: var(--text-display); }

.touch-primary--large {
  font-family: 'Space Mono', monospace;
  font-size: clamp(16px, 1.6vw, 26px);
  letter-spacing: -0.01em;
  color: var(--text-display);
  line-height: 1.15;
  overflow-wrap: anywhere;
  font-weight: 700;
}
.touch-primary--large:hover { color: var(--interactive); }

.touch-handle {
  font-family: 'Doto', 'Space Mono', monospace;
  font-size: var(--display-md);
  color: var(--text-display);
  letter-spacing: -0.02em;
  line-height: 1.0;
}

.touch-handle--xl { font-size: clamp(32px, 3.2vw, 56px); line-height: 1.0; }

.touch-venue {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--display-md);
  font-weight: 500;
  line-height: 1.05;
  color: var(--text-display);
}

.touch-address {
  font-family: 'Space Mono', monospace;
  font-size: var(--caption);
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.touch-cta { align-self: flex-end; margin-top: auto; }

/* Touchpoint decorations: pixel-art SVG accents that fill the tile's middle space */
.touch-decoration {
  display: flex;
  align-self: flex-start;
  opacity: 0.9;
}
.touch-decoration svg {
  width: 80px;
  height: 80px;
  fill: var(--text-display);
  display: block;
}
[data-theme="light"] .touch-decoration svg { fill: var(--text-primary); }
.touch-decoration--qr svg { width: 96px; height: 96px; }
@media (max-width: 768px) {
  .touch-decoration svg { width: 64px; height: 64px; }
  .touch-decoration--qr svg { width: 80px; height: 80px; }
}

/* ============================================================
   SPOTLIGHT CONTROLS — circle-chip arrows flanking dot row
   ============================================================ */
.spotlight__controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-sm);
  align-self: flex-start;
  flex-shrink: 0;
  margin-top: auto;
}

/* Lift slide CTAs down into the controls row so the arrow/dot pills
   and the action pill share a single bottom band. */
.slide .arrow-pill,
.slide .btn-primary {
  transform: translateY(calc(var(--space-md) + 40px));
}

/* Touchpoint is the narrow column — drop the dots so controls + CTA
   fit on one line without overlapping. */
.spotlight--touchpoint .spot-dots { display: none; }

/* .spot-btn--prev / --next inherit .arrow-chip styling */
.spot-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-visible);
  background: var(--surface-raised);
  color: var(--text-display);
  font-family: 'Space Mono', monospace;
  font-size: var(--subheading);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease);
  flex-shrink: 0;
}
.spot-btn:hover {
  background: var(--text-display);
  color: var(--black);
  border-color: var(--text-display);
}

.spot-dots {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0 var(--space-xs);
}

.spot-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-disabled);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 200ms var(--ease), transform 200ms var(--ease);
}
.spot-dot:hover { background: var(--text-secondary); }
.spot-dot[aria-selected="true"] {
  background: var(--text-display);
  transform: scale(1.3);
}

/* ============================================================
   FLIP-CHAR (character-roll transition on slide labels)
   ============================================================ */
.flip-char {
  display: inline-block;
  min-width: 0.5em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   BUTTONS (shared)
   ============================================================ */
.btn-primary {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: var(--label);
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  text-align: center;
  color: var(--black);
  background: var(--text-display);
  border: 1px solid var(--text-display);
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  transition: opacity 200ms var(--ease);
  text-decoration: none;
  flex-shrink: 0;
}
.btn-primary:hover { opacity: 0.85; }

/* --- Circle chip: navigation & back arrows --- */
.arrow-chip {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-visible);
  background: var(--surface-raised);
  color: var(--text-display);
  font-family: 'Space Mono', monospace;
  font-size: var(--subheading);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
  padding: 0;
  transition: background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease);
}
.arrow-chip:hover {
  background: var(--text-display);
  color: var(--black);
  border-color: var(--text-display);
}
.arrow-chip:focus-visible {
  outline: 2px solid var(--interactive);
  outline-offset: 2px;
}

/* --- Pill button: inline CTA arrows (VIEW PROGRAM, FOLLOW, etc.) --- */
.arrow-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 18px;
  border: 1px solid var(--border-visible);
  border-radius: 999px;
  background: var(--surface-raised);
  color: var(--text-display);
  font-family: 'Space Mono', monospace;
  font-size: var(--label);
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  align-self: flex-end;
  margin-top: auto;
  transition: background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease);
}
.arrow-pill:hover {
  background: var(--text-display);
  color: var(--black);
  border-color: var(--text-display);
}
.arrow-pill--accent { color: var(--accent); border-color: var(--accent); }
.arrow-pill--accent:hover { background: var(--accent); color: var(--black); border-color: var(--accent); }
.arrow-pill--interactive { color: var(--interactive); border-color: var(--interactive); }
.arrow-pill--interactive:hover { background: var(--interactive); color: var(--black); border-color: var(--interactive); }

.arrow-pill__arrow {
  font-size: var(--body-sm);
  line-height: 1;
  transition: transform 200ms var(--ease);
}
.arrow-pill:hover .arrow-pill__arrow { transform: translateX(4px); }
.arrow-pill:focus-visible {
  outline: 2px solid var(--interactive);
  outline-offset: 2px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  min-height: var(--footer-height);
  flex-shrink: 0;
  padding: var(--space-xs) var(--grid-padding);
  display: flex;
  align-items: center;
}

.footer-inner {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
}

.footer-clusters, .footer-copy, .footer-institution {
  font-family: 'Space Mono', monospace;
  font-size: var(--caption);
  letter-spacing: 0.06em;
  color: var(--text-disabled);
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  gap: var(--space-md);
}

.footer-links a {
  font-family: 'Space Mono', monospace;
  font-size: var(--caption);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 200ms var(--ease);
}
.footer-links a:hover { color: var(--text-display); }

/* ============================================================
   RESPONSIVE: TABLET (769-1200px)
   Stacks to 2 columns. Rotations still run.
   ============================================================ */
@media (min-width: 769px) and (max-width: 1200px) {
  body {
    height: auto;
    overflow-y: auto;
  }

  .bento-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: auto;
    grid-template-areas:
      "hero  hero  hero  spotA spotA spotA"
      "hero  hero  hero  spotA spotA spotA"
      "event event event touch touch touch"
      "spotB spotB spotB spotB spotB spotB";
    padding-bottom: var(--grid-padding);
  }

  .spotlight, .tile-hero, .tile-event {
    min-height: 320px;
  }

  .spotlight--showcase { min-height: 420px; }
}

/* ============================================================
   RESPONSIVE: MOBILE (≤768px)
   Single column stack. Carousels keep their structure but
   auto-advance is disabled in JS — manual controls only.
   ============================================================ */
@media (max-width: 768px) {
  body {
    height: auto;
    overflow-y: auto;
  }

  .bento-grid {
    display: flex;
    flex-direction: column;
    gap: var(--tile-gap);
    padding: var(--grid-padding);
    padding-bottom: var(--tile-gap);
  }

  .tile {
    min-height: auto;
    padding: var(--space-md);
    /* Clear fixed top-right toolbar and iOS notch/status bar on the first tile */
    padding-top: max(var(--space-md), calc(env(safe-area-inset-top) + var(--space-sm)));
  }

  .tile-hero {
    padding: var(--space-2xl) var(--space-md);
  }

  .tile-event {
    /* Belt-and-braces — keep LAUNCH EVENT eyebrow clear of the toolbar */
    padding-top: max(var(--space-lg), calc(env(safe-area-inset-top) + var(--space-md)));
  }

  /* Reserve space for the fixed page-toolbar in the top-right */
  .slide__label,
  .tile-label {
    padding-right: 64px;
  }

  .spotlight {
    min-height: 360px;
    padding: var(--space-md);
    padding-top: max(var(--space-lg), calc(env(safe-area-inset-top) + var(--space-sm)));
  }

  /* Floating toolbar chip — surface-raised + visible border on mobile */
  .page-toolbar {
    top: max(6px, env(safe-area-inset-top));
    right: 6px;
    background: var(--surface-raised);
    border-color: var(--border-visible);
    padding: 3px var(--space-xs);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    gap: var(--space-md);
    padding-right: 72px; /* clear the fixed top-right toolbar chip */
  }

  .partners-list { overflow: visible; }

  .footer-inner {
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-sm) 0;
    text-align: center;
  }

  .site-footer {
    height: auto;
    padding: var(--space-sm) var(--grid-padding);
  }
}

/* --- FOCUS STYLES --- */
.tile:focus-visible,
a:focus-visible,
button:focus-visible,
.btn-primary:focus-visible,
.spot-dot:focus-visible,
.spot-btn:focus-visible {
  outline: 2px solid var(--interactive);
  outline-offset: 2px;
}

.spotlight:focus-within {
  border-color: var(--border-visible);
}

/* ============================================================
   REDUCED MOTION
   Disables character-roll, slide fade → instant swap, no scale
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }
  .slide { transition: none !important; }
  .flip-char { min-width: 0; }
}

/* ============================================================
   APP LAYOUT: Split 3-6-3 Column Bento Grid
   ============================================================ */
.app-layout {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--tile-gap, 8px);
  padding: var(--grid-padding, 8px);
  padding-bottom: 0;
  min-height: 0;
  max-width: 100%;
}

.app-layout__left {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--space-md);
}

.app-layout__center {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.app-layout__right {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.app-layout__scroll {
  flex: 1;
  overflow-y: auto;
  padding-right: var(--space-xs);
}

.app-layout__scroll::-webkit-scrollbar {
  width: 6px;
}
.app-layout__scroll::-webkit-scrollbar-track {
  background: transparent;
}
.app-layout__scroll::-webkit-scrollbar-thumb {
  background: var(--border-visible);
  border-radius: 999px;
}
.app-layout__scroll::-webkit-scrollbar-thumb:hover {
  background: var(--text-disabled);
}

/* --- SIDEBAR MENU LINK (Doto Font) --- */
.menu-item-link {
  font-family: 'Doto', monospace;
  font-size: clamp(14px, 1.4vw, 20px);
  font-weight: 700;
  text-transform: uppercase;
  padding: var(--space-sm) var(--space-md);
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
  transition: border-color 200ms, background-color 200ms, color 200ms;
}
.menu-item-link:hover {
  border-color: var(--accent);
  color: var(--text-display);
}
.menu-item-link--active {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: var(--text-display);
}

@media (max-width: 992px) {
  .app-layout {
    grid-template-columns: 1fr;
    gap: var(--tile-gap, 12px);
    padding: calc(var(--space-2xl) + 44px) var(--space-md) var(--space-2xl);
    overflow-y: auto;
    height: auto;
  }
  .app-layout__left,
  .app-layout__center,
  .app-layout__right {
    grid-column: span 12;
  }
  .app-layout__right {
    display: none; /* Hide right panel on tablet/mobile for space efficiency */
  }
}

/* --- LISTING CARD STYLES (Bento Sub-items) --- */
.listing-card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-lg);
  text-decoration: none;
  transition: border-color 200ms, background 200ms;
  display: block;
  color: inherit;
}
.listing-card:hover {
  border-color: var(--border-visible);
  background: var(--surface);
}
.listing-card__label {
  font-family: 'Space Mono', monospace;
  font-size: var(--label);
  letter-spacing: 0.08em;
  color: var(--text-disabled);
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}
.listing-card__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--heading);
  font-weight: 500;
  color: var(--text-display);
  margin-bottom: var(--space-xs);
}
.listing-card__excerpt {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--body-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-sm);
}
.listing-card__tags {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.listing-card__tag {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--text-disabled);
  padding: 2px 8px;
  border: 1px solid var(--border-visible);
  border-radius: 999px;
  background: transparent;
}

/* --- COLLEGE DOTS / DASHBOARD STATS --- */
.college-dots {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
}
.college-dots__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--text-secondary);
  transition: color 150ms var(--ease);
  padding: var(--space-2xs) 0;
}
.college-dots__row:hover {
  color: var(--text-display);
}
.college-dots__label {
  font-family: 'Space Mono', monospace;
  font-size: var(--label);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.college-dots__grid {
  flex: 1;
  height: 12px;
  display: flex;
  align-items: center;
  gap: 3px;
  overflow: hidden;
  mask-image: linear-gradient(to right, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
}
.college-dots__grid .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border-visible);
  display: inline-block;
}
.college-dots__row:hover .college-dots__grid .dot {
  background: var(--accent);
}
.college-dots__count {
  font-family: 'Space Mono', monospace;
  font-size: var(--label);
  color: var(--text-disabled);
  flex-shrink: 0;
}
.college-dots__row:hover .college-dots__count {
  color: var(--text-display);
}



