/* ==========================================================================
   Visit Lab Town — Core Stylesheet
   Built from Design.md — Visit Orlando structure, Lab Town content.
   Theme: "Night Lab" — near-black panels, phosphor-green glow (cyan on Play
   pages), terminal-style labels and scanlines. Theme-specific flourishes are
   gathered in the "Night Lab details" section near the end.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- Design Tokens ------------------------------------------------------ */
:root {
  color-scheme: dark;

  /* Palette */
  --color-primary: #3DFF9A;        /* phosphor green — Explore accent */
  --color-primary-dark: #3DFF9A;   /* accent as text: the bright tone reads best on dark */
  --color-primary-light: rgba(61, 255, 154, 0.1);
  --color-secondary: #3DE0FF;      /* cyan — Play accent */
  --color-secondary-dark: #3DE0FF;
  --color-secondary-light: rgba(61, 224, 255, 0.1);
  --color-bg: #070B0A;             /* page background */
  --color-bg-alt: #0B1210;         /* alternate sections, image placeholders */
  --color-surface: #0F1715;        /* cards, panels, tables */
  --color-line: rgba(140, 255, 200, 0.11);   /* hairline borders */
  --color-dark: #040706;           /* header / footer / menus */
  --color-dark-alt: #0B1210;
  --color-text: #E6F5EE;
  --color-text-muted: #8BA399;
  --color-white: #FFFFFF;          /* text over photos */
  --color-on-accent: #03130B;      /* text on a filled accent button */
  --color-scrim: rgba(4, 7, 6, 0.6);

  /* Section accent — overridden by body.play */
  --accent: var(--color-primary);
  --accent-dark: var(--color-primary-dark);
  --accent-light: var(--color-primary-light);
  --glow-rgb: 61, 255, 154;        /* the accent as r, g, b — for rgba() glows */

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;   /* labels, eyebrows, tags */

  /* Layout */
  --nav-height: 76px;
  --utility-height: 34px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --max-width: 1240px;
  --shadow-card: none;
  --shadow-hover: 0 0 0 1px rgba(var(--glow-rgb), 0.45), 0 0 32px rgba(var(--glow-rgb), 0.16);
  --transition: 220ms ease;
}

/* Play-section tint — apply class="play" to <body> on Play pages */
body.play {
  --accent: var(--color-secondary);
  --accent-dark: var(--color-secondary-dark);
  --accent-light: var(--color-secondary-light);
  --glow-rgb: 61, 224, 255;
  --shadow-hover: 0 0 0 1px rgba(var(--glow-rgb), 0.45), 0 0 32px rgba(var(--glow-rgb), 0.16);
}

/* ---- Reset / Base -------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg) radial-gradient(1200px 600px at 80% -10%, rgba(var(--glow-rgb), 0.06), transparent 60%) no-repeat;
  line-height: 1.55;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  color: var(--color-text);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--color-text-muted); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  text-shadow: 0 0 12px rgba(var(--glow-rgb), 0.35);
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 12px;
}

/* Skip links */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-surface);
  color: var(--color-text);
  padding: 10px 16px;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* Focus visibility (a11y) */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

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

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--color-on-accent); }
.btn-primary:hover { filter: brightness(1.15); transform: translateY(-1px); box-shadow: 0 0 0 4px rgba(var(--glow-rgb), 0.15), 0 0 30px rgba(var(--glow-rgb), 0.35); }
.btn-disabled { background: var(--color-bg-alt); color: var(--color-text-muted); cursor: not-allowed; }
.btn-outline { background: transparent; border-color: rgba(var(--glow-rgb), 0.5); color: var(--color-white); }
.btn-outline:hover { background: rgba(var(--glow-rgb), 0.08); }
.btn-text { color: var(--accent-dark); font-family: var(--font-mono); font-size: 0.85rem; font-weight: 500; border-bottom: 2px solid transparent; border-radius: 0; padding: 0; }
.btn-text:hover { border-bottom-color: var(--accent-dark); }
.btn-text::after { content: '→'; margin-left: 6px; transition: transform var(--transition); display: inline-block; }
.btn-text:hover::after { transform: translateX(3px); }

/* ---- Header / Nav ---------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  transition: background var(--transition), box-shadow var(--transition);
}
.site-header.is-scrolled,
.site-header.solid {
  background: var(--color-dark);
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
}

.utility-bar {
  height: var(--utility-height);
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.2);
  font-size: 0.78rem;
}
.utility-bar .container { display: flex; gap: 20px; }
.utility-bar a { color: rgba(255,255,255,0.75); }
.utility-bar a:hover { color: #fff; }

.primary-nav {
  position: relative;
  height: var(--nav-height);
  display: flex;
  align-items: center;
}
.primary-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}
/* Logo, nav links, and the CTA are each pinned independently to the
   viewport (via .primary-nav, not the flex flow) so their positions never
   depend on one another's width — a true left inset, a true dead-center,
   and a mirrored true right inset. */
.primary-nav .logo {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}
.primary-nav .nav-links {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.primary-nav .nav-utility {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.logo .logo-image {
  height: 72px;
  width: auto;
}
.logo .logo-fallback {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo .logo-mark {
  width: 56px; height: 56px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
}
.logo .logo-kicker {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: -2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: center;
}
.nav-links > li { position: relative; }
.nav-links > li > a, .nav-links > li > button.nav-top-link {
  color: rgba(255,255,255,0.88);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  background: none; border: none;
  display: flex; align-items: center; gap: 5px;
}
.nav-links > li > a:hover, .nav-links > li > button.nav-top-link:hover,
.nav-links > li.is-open > button.nav-top-link { background: rgba(255,255,255,0.12); color: #fff; }
.caret { font-size: 0.65em; transition: transform var(--transition); }
.nav-links > li.is-open .caret { transform: rotate(180deg); }

.nav-utility { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.menu-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.4rem; }

/* ---- Full-screen menus (Explore / Play / mobile) --------------------------- */
body.menu-open { overflow: hidden; }

.fullscreen-menu {
  position: fixed;
  inset: 0;
  z-index: 600;
  color: #fff;
  background: var(--color-dark);
  transform: translateY(-100%);
  transition: transform 420ms ease;
  pointer-events: none;
  overflow-y: auto;
}
.fullscreen-menu.is-open { transform: translateY(0); pointer-events: auto; }
.fullscreen-menu--play { background: #04090B; }

.fullscreen-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
}
.fullscreen-menu-top .logo { color: #fff; font-size: 2rem; }
.fullscreen-menu-top .logo .logo-image { height: 92px; }
.fullscreen-menu-top .logo .logo-mark { width: 70px; height: 70px; font-size: 2.2rem; }
.fullscreen-menu-close {
  background: none;
  border: none;
  color: #fff;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
}
.fullscreen-menu-close:hover { background: rgba(255,255,255,0.14); }

.fullscreen-menu-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 48px;
  padding-top: 24px;
  padding-bottom: 80px;
}
.fullscreen-menu-columns a {
  display: block;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1.15rem;
  color: #fff;
}
.fullscreen-menu-columns a:hover { color: rgba(255,255,255,0.7); }
.fullscreen-menu .mega-col-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 18px 4px 10px;
}

/* ---- Mobile menu accordion --------------------------------------------------- */
/* padding-top/bottom only, so the .container side gutters still apply */
.mobile-menu-list { display: flex; flex-direction: column; padding-top: 12px; padding-bottom: 60px; }
.mobile-menu-item { border-bottom: 1px solid rgba(255,255,255,0.12); }
.mobile-menu-trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  background: none; border: none; color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
  padding: 18px 4px;
}
.mobile-menu-trigger .caret { transition: transform var(--transition); }
.mobile-menu-item.is-open .caret { transform: rotate(180deg); }
.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 320ms ease;
}
.mobile-menu-item.is-open .mobile-submenu { max-height: 600px; }
.mobile-submenu a {
  display: block;
  padding: 10px 4px 10px 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}
.mobile-submenu a:hover { color: #fff; }
.mobile-menu-list > li:not(.mobile-menu-item) { padding: 16px 4px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.mobile-menu-list > li:not(.mobile-menu-item) > a { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.mobile-menu-list .btn-primary { display: inline-flex; margin-top: 8px; }

/* ---- Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  height: 92vh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
  background: var(--color-dark) center/cover no-repeat;
}
.hero video, .hero .hero-fallback-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px),   /* scanlines */
    linear-gradient(180deg, rgba(4, 7, 6, 0.35) 0%, rgba(4, 7, 6, 0.1) 40%, rgba(4, 7, 6, 0.92) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 24px 88px;
  max-width: 720px;
}
.hero-content p { color: rgba(255,255,255,0.88); font-size: 1.1rem; max-width: 540px; }
.hero-content .btn-row, .map-cta .btn-row { display: flex; gap: 14px; margin-top: 24px; flex-wrap: wrap; }
.hero.page-hero {
  height: 50vh; min-height: 540px;
}
.hero.page-hero .hero-content h1 { color: var(--color-white); text-shadow: 0 0 28px rgba(var(--glow-rgb), 0.3); }
/* District logo standing in for the page title (place.js, district-logos.csv) */
.hero-content .hero-logo { margin-bottom: 16px; }
.hero-content .hero-logo img {
  /* Logos are cropped to their artwork, so they're wide strips: size by width,
     and cap the taller ones (e.g. Lakeside Estates) without stretching them */
  width: min(420px, 100%); height: auto; max-height: 170px;
  object-fit: contain; object-position: left center;
  filter: drop-shadow(0 0 18px rgba(var(--glow-rgb), 0.35));
}
@media (max-width: 720px) { .hero-content .hero-logo img { width: min(300px, 100%); max-height: 120px; } }

/* Homepage hero: white curved panel anchored to the bottom-left corner,
   rounded on the top-right edge only — everywhere else keeps the plain
   text-over-image treatment. */
.hero:not(.page-hero) .hero-content {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 3;
  background: rgba(8, 14, 12, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(var(--glow-rgb), 0.35);
  border-right: 1px solid rgba(var(--glow-rgb), 0.35);
  color: var(--color-text);
  border-radius: 0 120px 0 0;
  padding: 64px 72px 56px 48px;
  max-width: 620px;
}
.hero:not(.page-hero) .hero-content h1 { color: var(--color-white); text-shadow: 0 0 28px rgba(var(--glow-rgb), 0.3); }

/* ---- Section scaffolding ---------------------------------------------------- */
.section { padding: 88px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---- Audience / Image-text cards -------------------------------------------- */
.audience-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.card-image-text {
  display: flex;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card-image-text:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-image-text .img { position: relative; width: 42%; flex-shrink: 0; background: var(--color-bg-alt); aspect-ratio: 4/5; overflow: hidden; }
/* Name of the build shown in a card's image (homepage audience cards) */
.card-image-text .img-caption:not(:empty) {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  padding: 5px 8px; border-radius: 4px;
  background: rgba(4, 7, 6, 0.75);
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--color-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-image-text .img img { width: 100%; height: 100%; object-fit: cover; }
.card-image-text .body { padding: 28px; display: flex; flex-direction: column; justify-content: center; }

/* ---- Carousel ---------------------------------------------------------------- */
.carousel-wrap { position: relative; }
.carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; flex-shrink: 0; }
.carousel-controls { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; align-items: center; }
.carousel-pagination { font-size: 0.82rem; color: var(--color-text-muted); margin-right: auto; font-weight: 600; }
.carousel-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--color-line); background: var(--color-surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.carousel-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-dark); }
.carousel-btn:disabled { opacity: 0.35; cursor: default; }

/* Single-item carousel (homepage news): one compact card per view, image
   left / text right — the arrows step one story at a time. */
.carousel--single > * { width: 100%; }
.carousel--single .content-card:hover { transform: none; }
.carousel--single .content-card a { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); height: 100%; }
.carousel--single .content-card .img { aspect-ratio: auto; height: 240px; }
.carousel--single .content-card .body { justify-content: center; padding: 28px 36px; }
.carousel--single .content-card h3 { font-size: 1.5rem; }
.carousel--single .content-card p { margin-bottom: 0; max-width: 560px; }

/* Category tile */
.tile {
  width: 250px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/5;
  background: var(--color-bg-alt);
  color: #fff;
  display: flex; align-items: flex-end;
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.tile:hover img { transform: scale(1.06); }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(4,7,6,0.85) 100%); }
.tile .tile-label { position: relative; z-index: 2; padding: 18px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }

/* Live search above a card grid (data-search, see render-cards.js) */
.search-bar { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.search-bar input {
  flex: 1; max-width: 560px; padding: 12px 18px; border-radius: 999px;
  font-family: inherit; font-size: 0.95rem;
  background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-line);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-bar input::placeholder { color: var(--color-text-muted); }
.search-bar input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.search-status { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--color-text-muted); white-space: nowrap; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (max-width: 720px) {
  .search-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .search-bar input { max-width: none; }
}

/* Generic content card (places to stay / dine / news / events) */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

/* Grouped card lists (e.g. neighborhoods by area) — a heading followed by
   its own .card-grid, repeated per group. */
.card-group-heading { margin-top: 56px; }
.card-group-heading:first-child { margin-top: 0; }
.grouped-cards .card-grid { margin-top: 24px; margin-bottom: 8px; }
.content-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex; flex-direction: column;
}
.content-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.content-card .img { aspect-ratio: 16/10; overflow: hidden; background: var(--color-bg-alt); }
.content-card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.content-card:hover .img img { transform: scale(1.05); }
.content-card .body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.content-card .tag {
  align-self: flex-start;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--accent-dark); background: var(--accent-light);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}

/* Event row card (image-left/text-right) */
.event-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.event-card { display: flex; flex-direction: column; border-radius: var(--radius-md); overflow: hidden; background: var(--color-surface); box-shadow: var(--shadow-card); }
.event-card .img { aspect-ratio: 16/9; background: var(--color-bg-alt); }
.event-card .img img { width: 100%; height: 100%; object-fit: cover; }
.event-card .body { padding: 20px; }

/* ---- Tabbed image-sync module ---------------------------------------------- */
.plan-module { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.plan-mosaic { position: relative; aspect-ratio: 1/1; }
.plan-mosaic img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: var(--radius-md); object-fit: cover; box-shadow: var(--shadow-hover);
  opacity: 0; transition: opacity 400ms ease;
}
.plan-mosaic img.is-active { opacity: 1; }
/* Coming Soon notice over the map tab's image — only while that tab is active */
.plan-mosaic .map-coming-soon {
  border-radius: var(--radius-md); opacity: 0; pointer-events: none; transition: opacity 400ms ease;
}
.plan-mosaic .plan-map.is-active ~ .map-coming-soon { opacity: 1; }
.tab-list { display: flex; flex-direction: column; gap: 4px; }
.tab-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 18px 4px; border-bottom: 1px solid var(--color-line);
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--color-text-muted);
}
.tab-item p { font-family: var(--font-body); font-weight: 400; font-size: 0.92rem; margin: 6px 0 0; max-height: 0; overflow: hidden; transition: max-height 300ms ease; }
.tab-item.is-active { color: var(--accent-dark); }
.tab-item.is-active p { max-height: 100px; margin-top: 8px; }
.tab-item .tab-cta { display: none; font-size: 0.85rem; margin-top: 8px; }
.tab-item.is-active .tab-cta { display: inline-flex; }

/* ---- Interactive map page ---------------------------------------------------- */
.map-frame {
  position: relative; aspect-ratio: 16/10; overflow: hidden;
  border-radius: var(--radius-lg); border: 1px solid var(--color-line); background: var(--color-bg-alt);
}
.map-frame img { width: 100%; height: 100%; object-fit: cover; }
.map-coming-soon {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 24px; text-align: center; background: var(--color-scrim);
}
.map-coming-soon h2 { margin: 0; color: var(--color-white); }

/* ---- Interactive map CTA ------------------------------------------------------ */
.map-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.map-cta .img { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow-card); }
.map-cta .img img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Snapshot tile-collage (see Design.md §13) -------------------------------- */
/* Version page header: a console readout of the build (styles shared with the
   index console further down — .console-label, .monitor-stats) */
.snapshot-header {
  padding: 150px 0 44px;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px),
    radial-gradient(900px 400px at 85% 0%, rgba(var(--glow-rgb), 0.1), transparent 70%),
    var(--color-dark);
  border-bottom: 1px solid var(--color-line);
}
.snapshot-header .console-label { max-width: 640px; }
/* Archive Restoration Programme banner on an archive version's page */
.snapshot-header .archive-banner {
  display: inline-block; margin-bottom: 16px; padding: 6px 14px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-on-accent); background: var(--accent);
  box-shadow: 0 0 24px rgba(var(--glow-rgb), 0.35);
}
.snapshot-header h1 { color: var(--color-white); text-shadow: 0 0 28px rgba(var(--glow-rgb), 0.3); margin: 0; }
.snapshot-header .monitor-stats { max-width: 640px; margin: 24px 0 0; }

/* Version page layout: back button + build picker sidebar, feeds on the right */
.snapshot-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; }
.snapshot-side {
  position: sticky; top: calc(var(--nav-height) + var(--utility-height) + 24px);
  display: flex; flex-direction: column; gap: 12px;
}
.snapshot-side .build-list { max-height: calc(100vh - var(--nav-height) - var(--utility-height) - 200px); overflow-y: auto; scrollbar-width: thin; }
.build-list-title {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--color-text-muted); margin: 14px 0 4px;
}
.build-list-title:first-child { margin-top: 0; }
.console-back { justify-content: center; border-radius: 999px; }
.console-back:hover { box-shadow: 0 0 20px rgba(var(--glow-rgb), 0.25); }

.snapshot-group { margin-bottom: 24px; }
.snapshot-group:last-child { margin-bottom: 0; }
@media (max-width: 900px) {
  .snapshot-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .snapshot-side { position: static; }
}
/* Even rows and columns; a row marked primary in snapshots.csv takes a whole
   row to itself, in CSV order */
.tile-collage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.collage-tile {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: var(--color-bg-alt);
  color: #fff;
  aspect-ratio: 4 / 3;
}
/* Tiles are buttons that open the viewer panel */
.collage-tile {
  display: block; width: 100%; padding: 0; text-align: left; font: inherit; cursor: pointer;
  border: 1px solid var(--color-line); transition: box-shadow var(--transition);
}
.collage-tile:hover { box-shadow: var(--shadow-hover); }
.collage-tile.is-active { box-shadow: 0 0 0 2px var(--accent), 0 0 32px rgba(var(--glow-rgb), 0.3); }
.collage-tile.is-primary { grid-column: 1 / -1; aspect-ratio: 21 / 9; }
.collage-tile.is-primary .cap .title { font-size: 1.4rem; }
@media (max-width: 980px) {
  .tile-collage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Photo viewer (snapshots.js): a right-hand panel on desktop that pushes the
   page left, a bottom sheet over a scrim on mobile */
:root { --viewer-w: min(40vw, 560px); }
.snapshot-viewer {
  position: fixed; z-index: 400; right: 0; bottom: 0;
  top: calc(var(--nav-height) + var(--utility-height));
  width: var(--viewer-w); overflow-y: auto; padding: 20px 24px 28px;
  background: var(--color-dark); border-left: 1px solid rgba(var(--glow-rgb), 0.35);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.45);
  transform: translateX(100%); visibility: hidden;
  transition: transform 320ms ease, visibility 0s linear 320ms;
}
.snapshot-viewer.is-open { transform: none; visibility: visible; transition: transform 320ms ease; }
.snapshot-viewer [hidden] { display: none; }
#main-content, .site-footer { transition: margin-right 320ms ease; }
body.viewer-open #main-content, body.viewer-open .site-footer { margin-right: var(--viewer-w); }

.viewer-top { align-items: center; }
.viewer-close {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--color-text); border: 1px solid var(--color-line); font-size: 0.95rem;
}
.viewer-close:hover { border-color: var(--accent); color: var(--accent); }
.viewer-screen {
  position: relative; overflow: hidden; border-radius: var(--radius-md);
  border: 1px solid var(--color-line); background: var(--color-bg);
}
.viewer-screen img { width: 100%; height: auto; }
.viewer-screen::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.14) 0 1px, transparent 1px 3px);
}
.viewer-section {
  margin: 18px 0 6px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent);
}
.viewer-name { font-size: 1.6rem; margin-bottom: 8px; }
.viewer-builder {
  margin: -2px 0 10px; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--color-text);
}
.viewer-tagline { font-style: italic; margin-bottom: 20px; }
.viewer-scrim { display: none; }

@media (max-width: 900px) {
  .snapshot-viewer {
    z-index: 700; top: auto; left: 0; width: auto; max-height: 88vh;
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    border-left: none; border-top: 1px solid rgba(var(--glow-rgb), 0.35);
    border-radius: 20px 20px 0 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
  }
  body.viewer-open #main-content, body.viewer-open .site-footer { margin-right: 0; }
  body.viewer-open { overflow: hidden; }
  .viewer-scrim {
    display: block; position: fixed; inset: 0; z-index: 690;
    background: var(--color-scrim); opacity: 0; pointer-events: none; transition: opacity 320ms ease;
  }
  body.viewer-open .viewer-scrim { opacity: 1; pointer-events: auto; }
  .viewer-close { width: 44px; height: 44px; font-size: 1.1rem; }
}
.collage-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.collage-tile img { transition: transform 400ms ease; }
.collage-tile:hover img { transform: scale(1.04); }
.collage-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(18,14,12,0.88) 100%); }
.collage-tile .cap { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; }
.collage-tile .cap .kicker { font-size: 0.72rem; font-style: italic; opacity: 0.85; margin-bottom: 3px; }
.collage-tile .cap .title { font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; }
.collage-tile .builder-tag {
  position: absolute; top: 12px; left: 12px; z-index: 2; max-width: calc(100% - 24px);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: #fff; background: rgba(18,14,12,0.72); padding: 4px 10px; border-radius: 999px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---- Changelog / News / Snapshots index list (Play utility pages) ------------- */
.changelog-entry {
  padding: 22px 0; border-bottom: 1px solid var(--color-line);
}
.changelog-entry summary {
  display: flex; align-items: center; gap: 20px; cursor: pointer; list-style: none;
}
.changelog-entry summary::-webkit-details-marker { display: none; }
.changelog-entry summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.changelog-entry .changelog-heading { flex: 1; }
.changelog-entry .version-pill {
  display: inline-block; font-size: 0.72rem; font-weight: 700; background: var(--accent-light);
  color: var(--accent-dark); padding: 3px 10px; border-radius: 999px; margin-bottom: 6px;
}
.changelog-entry .archive-pill {
  margin-left: 6px; background: transparent; color: var(--accent);
  border: 1px solid rgba(var(--glow-rgb), 0.45); padding: 2px 10px;
}
.changelog-entry .changelog-meta { font-size: 0.8rem; margin: 2px 0 0; }
.changelog-entry h3 { margin: 0; }
.changelog-toggle {
  flex-shrink: 0; color: var(--color-text-muted); font-size: 0.8rem; transition: transform var(--transition);
}
.changelog-entry[open] .changelog-toggle { transform: rotate(180deg); }
.changelog-body { padding: 20px 0 6px 76px; }
.changelog-body > p:first-child { color: var(--color-text); font-weight: 600; }
.changelog-section { margin-top: 18px; }
.changelog-section h4 {
  font-size: 0.98rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent-dark); margin-bottom: 10px;
}
.changelog-section ul, .changelog-subsection ul { margin: 0 0 10px; padding-left: 20px; }
.changelog-section li, .changelog-subsection li { margin-bottom: 6px; color: var(--color-text); }
.changelog-subsection { margin: 14px 0 14px 18px; }
.changelog-subsection h5 {
  font-size: 0.85rem; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px;
}
.changelog-note {
  font-size: 0.85rem; font-style: italic; color: var(--color-text-muted); margin: 2px 0 0;
}
.changelog-note a { color: var(--accent-dark); }
@media (max-width: 640px) {
  .changelog-body { padding-left: 0; }
}
.version-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.version-list a {
  display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--color-surface);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card); font-weight: 700;
}
.version-list a:hover { box-shadow: var(--shadow-hover); }

/* Snapshots index "control console": build selector left, preview monitor right */
.console-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.console-head h2 { margin: 0; }
.console-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em; color: var(--color-text-muted);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary);
  box-shadow: 0 0 10px rgba(61, 255, 154, 0.7);
  animation: nl-blink 2.4s steps(1) infinite;
}
.snapshot-console {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px;
  padding: 16px; border-radius: 20px;
  background: var(--color-dark); border: 1px solid var(--color-line);
  box-shadow: 0 0 60px rgba(var(--glow-rgb), 0.06);
}
.console-pane {
  background: var(--color-surface); border: 1px solid var(--color-line);
  border-radius: var(--radius-lg); padding: 18px; min-width: 0;
}
.console-label {
  display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500; line-height: 1.55; letter-spacing: 0.06em;
  color: var(--accent); text-shadow: 0 0 12px rgba(var(--glow-rgb), 0.35);
  margin: 0 0 14px;
}
.console-live::before { content: '\25CF  '; animation: nl-blink 1.1s steps(1) infinite; }

.build-list { display: flex; flex-direction: column; gap: 6px; }
.build-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: transparent; color: var(--color-text); font-size: 0.92rem;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.build-btn:hover { background: rgba(var(--glow-rgb), 0.06); border-color: var(--color-line); }
/* The version page's picker uses links (aria-current) instead of buttons (aria-pressed) */
.build-btn[aria-current] {
  background: var(--accent); color: var(--color-on-accent);
  box-shadow: 0 0 24px rgba(var(--glow-rgb), 0.3);
}
.build-btn[aria-current] .build-name { color: var(--color-on-accent); }
.build-btn[aria-current] .build-badge { background: var(--color-on-accent); color: var(--accent); }

/* Mobile build picker: a dropdown in place of the list */
.build-select { display: none; position: relative; }
.build-select select {
  width: 100%; appearance: none; -webkit-appearance: none;
  padding: 13px 44px 13px 16px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 1rem; font-weight: 600;
  color: var(--color-text); background: var(--color-bg-alt); border: 1px solid rgba(var(--glow-rgb), 0.45);
  cursor: pointer;
}
.build-select select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.build-select::after {
  content: '\25BE'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: var(--accent); pointer-events: none;
}
.build-btn .build-num { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; flex-shrink: 0; }
.build-btn .build-name { flex: 1; min-width: 0; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.build-badge {
  flex-shrink: 0; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; color: var(--color-text-muted); background: rgba(255, 255, 255, 0.06);
}
.build-btn[aria-pressed="true"] {
  background: var(--accent); color: var(--color-on-accent);
  box-shadow: 0 0 24px rgba(var(--glow-rgb), 0.3);
}
.build-btn[aria-pressed="true"] .build-name { color: var(--color-on-accent); }
.build-btn[aria-pressed="true"] .build-badge { background: var(--color-on-accent); color: var(--accent); }

.monitor-screen {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius-md); border: 1px solid var(--color-line); background: var(--color-bg);
}
.monitor-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 400ms ease; }
.monitor-screen img.is-loading { opacity: 0; }
.monitor-screen img[hidden] { display: none; }

/* No photos for a build: TV static, a rolling bar and a "No Signal" card */
.monitor-static, .monitor-nosignal { display: none; }
.monitor-screen.no-signal .monitor-static {
  display: block; position: absolute; inset: -50%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px; opacity: 0.4;
  animation: tv-static 0.35s steps(1) infinite;
}
@keyframes tv-static {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-8%, 4%); }
  50%  { transform: translate(5%, -7%); }
  75%  { transform: translate(-4%, 9%); }
}
.monitor-screen.no-signal::before {
  content: ''; position: absolute; left: 0; right: 0; top: -20%; height: 20%; z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: tv-roll 3.5s linear infinite;
}
@keyframes tv-roll { to { top: 100%; } }
.monitor-screen.no-signal .monitor-nosignal {
  display: block; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2;
  padding: 8px 18px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 4px;
  background: rgba(4, 7, 6, 0.8);
  font-family: var(--font-mono); font-size: 0.9rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--color-white); text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  animation: nl-blink 1.6s steps(1) infinite;
}
/* Archive Restoration Programme strip across the top of the monitor */
.monitor-banner {
  display: none; position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  padding: 8px 14px; text-align: center;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-on-accent); background: var(--accent);
  box-shadow: 0 0 24px rgba(var(--glow-rgb), 0.35);
}
.monitor-banner.is-shown { display: block; }
.monitor-screen::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}
.monitor-caption {
  position: absolute; left: 12px; bottom: 12px; z-index: 2; max-width: calc(100% - 24px);
  padding: 5px 10px; border-radius: 4px; background: rgba(4, 7, 6, 0.75);
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--color-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.monitor-caption:empty { display: none; }

.monitor-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 16px; }
.monitor-stats > div { background: var(--color-bg-alt); border: 1px solid var(--color-line); border-radius: var(--radius-sm); padding: 10px 14px; }
.monitor-stats dt { font-size: 0.72rem; color: var(--color-text-muted); }
.monitor-stats dd { margin: 2px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--color-text); }
.monitor-stats .stat-wide { grid-column: 1 / -1; }
.monitor-cta { border-radius: 999px; }

@media (max-width: 900px) {
  .snapshot-console { grid-template-columns: minmax(0, 1fr); }
  .build-list { display: none; }
  .build-select { display: block; }
}
@media (max-width: 480px) {
  .snapshot-console { padding: 10px; border-radius: var(--radius-lg); }
  .console-pane { padding: 14px; }
  .monitor-stats dd { font-size: 1rem; }
}

/* ---- Download page ------------------------------------------------------------ */
.download-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.download-card { background: var(--color-surface); border-radius: var(--radius-md); padding: 26px; box-shadow: var(--shadow-card); text-align: center; }
.download-card .platform-icon { font-size: 2rem; margin-bottom: 12px; }

.table-wrap { overflow-x: auto; background: var(--color-surface); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.download-table { width: 100%; border-collapse: collapse; text-align: left; }
.download-table th, .download-table td { padding: 16px 20px; }
.download-table th { font-family: var(--font-display); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); border-bottom: 1px solid var(--color-line); }
.download-table td { border-bottom: 1px solid var(--color-line); }
.download-table tbody tr:last-child td { border-bottom: none; }
.download-table .btn-table { padding: 8px 18px; font-size: 0.85rem; }
.download-table .download-date { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--color-text-muted); }
.download-table .table-divider td { background: var(--color-bg-alt); font-family: var(--font-display); font-weight: 700; text-align: center; color: var(--color-text); }

.setup-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.setup-column { background: var(--color-surface); border-radius: var(--radius-md); padding: 32px; box-shadow: var(--shadow-card); }
.setup-column h3 { margin-bottom: 16px; }
.setup-column ol { list-style: decimal; margin: 0; padding-left: 1.2em; }
.setup-column ol li { margin-bottom: 12px; color: var(--color-text-muted); }
.setup-column ol li:last-child { margin-bottom: 0; }
.setup-column .path-list { margin-top: 10px; }
.setup-column .path-list li { margin-bottom: 6px; font-size: 0.92rem; }
.setup-column .path-list li:last-child { margin-bottom: 0; }
.setup-column .path-list strong { color: var(--color-text); }

/* ---- Footer -------------------------------------------------------------------- */
.site-footer { background: var(--color-dark); color: rgba(255,255,255,0.82); padding: 64px 0 28px; }
.footer-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-top h4 { color: #fff; font-family: var(--font-body); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.footer-top ul li { margin-bottom: 10px; }
.footer-top a { color: rgba(255,255,255,0.72); font-size: 0.92rem; }
.footer-top a:hover { color: #fff; }
.footer-logo { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-bottom: 14px; }
.studio-credit { font-size: 0.85rem; color: rgba(255,255,255,0.6); max-width: 320px; }
.studio-credit a { color: rgba(255,255,255,0.85); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; flex-wrap: wrap; gap: 14px; font-size: 0.82rem; color: rgba(255,255,255,0.55); }
.social-icons { display: flex; gap: 14px; }
.social-icons a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; }
.social-icons a:hover { background: rgba(255,255,255,0.12); }
.updates-signup { display: flex; gap: 10px; }
.updates-signup input { padding: 10px 14px; border-radius: 999px; border: none; font-family: inherit; min-width: 220px; }

/* ---- Utility page (simple content pages: About, Report an Issue, Privacy) ------- */
.prose { max-width: 720px; }
.prose h2 { margin-top: 1.6em; }

/* ---- About page: history timeline + credits ----------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; max-width: 980px; }
.timeline::before {                          /* the vertical "wire" */
  content: '';
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(var(--accent), rgba(var(--glow-rgb), 0.08));
}
.timeline-item { position: relative; display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 0 0 56px 40px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {                     /* glowing node on the wire */
  content: '';
  position: absolute;
  left: 2px; top: 6px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--glow-rgb), 0.15), 0 0 16px rgba(var(--glow-rgb), 0.6);
}
.timeline-marker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 2px;
}
.timeline-content h3 { font-size: 1.45rem; }
.timeline-content p { font-size: 1.02rem; max-width: 680px; }
.timeline-image {
  width: 100%;
  max-width: 680px;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  margin-top: 8px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-bg-alt);
}
.about-credits { max-width: 720px; }
.about-credits a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Place detail page (explore/place.html, filled by place.js) ----------------- */
.place-missing { padding-top: calc(var(--nav-height) + var(--utility-height) + 88px); }
.place-back { display: inline-block; font-weight: 600; color: var(--accent-dark); margin-bottom: 28px; }
.place-back:hover { text-decoration: underline; }
.place-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; align-items: start; }
.place-main > p { font-size: 1.05rem; }
.place-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 32px; }
.place-gallery img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius-md); background: var(--color-bg-alt); }
.place-facts {
  position: sticky; top: calc(var(--nav-height) + 24px);
  background: var(--color-surface); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: 26px;
}
.place-facts dl { margin: 0 0 20px; }
.place-facts dl > div { padding: 12px 0; border-bottom: 1px solid var(--color-line); }
.place-facts dl > div:first-child { padding-top: 0; }
.place-facts dt { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); }
.place-facts dd { margin: 2px 0 0; font-weight: 600; color: var(--color-text); }
.place-facts dd a { color: var(--accent-dark); }
.place-facts dd a:hover { text-decoration: underline; }
.place-facts .btn { width: 100%; justify-content: center; }
.place-facts dl:last-child { margin-bottom: 0; }

/* ---- Night Lab details --------------------------------------------------------------
   The theme's flourishes, kept together so they're easy to tune. Glows use
   --glow-rgb, so they turn cyan automatically on Play pages. */

/* Eyebrows read as terminal prompts: "> GET OUT AND EXPLORE_" */
.eyebrow::before { content: '> '; opacity: 0.6; }
.section-head .eyebrow::after {
  content: '_';
  margin-left: 2px;
  animation: nl-blink 1.1s steps(1) infinite;
}
@keyframes nl-blink { 50% { opacity: 0; } }

/* Sections: hairline dividers, faint grid on alternate sections */
.section { border-top: 1px solid var(--color-line); }
.section-alt {
  background-image:
    linear-gradient(rgba(var(--glow-rgb), 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--glow-rgb), 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Panels get a hairline frame */
.content-card, .event-card, .card-image-text, .download-card, .setup-column,
.version-list a, .table-wrap, .place-facts { border: 1px solid var(--color-line); }

/* Photos sit slightly dimmed and "power up" on hover */
.content-card .img img, .event-card .img img, .card-image-text .img img, .tile img {
  filter: saturate(0.65) brightness(0.82);
  transition: filter 400ms ease, transform 400ms ease;
}
.content-card:hover .img img, .card-image-text:hover .img img, .tile:hover img { filter: none; }

/* Tags: outlined mono labels */
.content-card .tag, .event-card .tag {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: transparent;
  border: 1px solid rgba(var(--glow-rgb), 0.35);
  border-radius: 4px;
  padding: 3px 8px;
  margin-bottom: 10px;
}

/* Tiles & carousel controls */
.tile { border: 1px solid var(--color-line); transition: box-shadow var(--transition); }
.tile:hover { box-shadow: var(--shadow-hover); }
.tile .tile-label { font-family: var(--font-mono); font-weight: 500; font-size: 0.92rem; }
.carousel-btn { color: var(--color-text); }
.carousel-btn:hover:not(:disabled) { box-shadow: 0 0 16px rgba(var(--glow-rgb), 0.35); }

/* Header, menus & footer */
.site-header {
  border-bottom: 1px solid transparent;
  transition: border-color 350ms ease;
}
.site-header.is-scrolled,
.site-header.solid {
  background: transparent;
  border-bottom-color: var(--color-line);
  box-shadow: none;
}
/* The frosted glass sits on a pseudo-element, not the header itself:
   backdrop-filter on .site-header would make it the containing block for
   the position:fixed full-screen menus inside it, clipping them to the
   header's height once the page is scrolled. It is always there but
   invisible until scrolled, so it can fade in and out. */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(4, 7, 6, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 350ms ease;
  pointer-events: none;
}
.site-header.is-scrolled::before,
.site-header.solid::before { opacity: 1; }
.utility-bar { background: rgba(0, 0, 0, 0.45); }
/* Menus keep their own section colour on every page: Explore green, Play cyan */
.fullscreen-menu--explore, [data-mobile-trigger="explore"], [data-mobile-panel="explore"] {
  --accent: var(--color-primary);
  --glow-rgb: 61, 255, 154;
}
.fullscreen-menu--play, [data-mobile-trigger="play"], [data-mobile-panel="play"] {
  --accent: var(--color-secondary);
  --glow-rgb: 61, 224, 255;
}
.fullscreen-menu-columns a:hover, .mobile-submenu a:hover,
.mobile-menu-item.is-open > .mobile-menu-trigger { color: var(--accent); }
.site-footer { border-top: 1px solid rgba(var(--glow-rgb), 0.25); }
.footer-top a:hover { color: var(--accent); }
.updates-signup input { background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-line); }

/* Plan module & map */
.tab-item.is-active { color: var(--accent); }
.plan-mosaic img, .map-cta .img { border: 1px solid var(--color-line); background: var(--color-bg-alt); }
.map-cta .img { box-shadow: 0 0 40px rgba(var(--glow-rgb), 0.08); }

/* ---- Responsive ------------------------------------------------------------------ */
@media (max-width: 980px) {
  .audience-cards, .card-grid, .event-cards, .plan-module, .map-cta, .download-grid, .version-list { grid-template-columns: 1fr 1fr; }
  .place-layout { grid-template-columns: 1fr; }
  .place-facts { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .utility-bar { display: none; }
  .nav-links, .nav-utility .btn-primary { display: none; }
  .menu-toggle { display: block; }
  .primary-nav .logo .logo-image { height: 48px; }
  .primary-nav .logo .logo-mark { width: 40px; height: 40px; font-size: 1.3rem; }
  .primary-nav .logo { font-size: 1.15rem; }
  .fullscreen-menu-columns { grid-template-columns: 1fr; }
  .card-image-text { flex-direction: column; }
  .card-image-text .img { width: 100%; aspect-ratio: 16/9; }
  .audience-cards, .card-grid, .event-cards, .plan-module, .map-cta, .download-grid, .version-list, .footer-top, .setup-columns, .place-layout, .place-gallery { grid-template-columns: 1fr; }
  .tile-collage { grid-template-columns: minmax(0, 1fr); }
  .collage-tile.is-primary { aspect-ratio: 4 / 3; }
  .hero-content { padding-bottom: 56px; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; padding-left: 32px; }
  .carousel--single .content-card a { grid-template-columns: 1fr; }
  .carousel--single .content-card .img { height: 180px; }
  .carousel--single .content-card .body { padding: 20px 22px 24px; }
  .hero:not(.page-hero) .hero-content {
    max-width: calc(100% - 40px);
    border-radius: 0 56px 0 0;
    padding: 40px 32px 40px 24px;
  }
}
