/* =========================================================================
   COMPONENTS — buttons, nav, cards
   Depends on: tokens.css, base.css (load first)

   Two voices, one system:
   - default / .voice-main  → carved rune & metal (Cinzel, sharp radius)
   - .voice-hud             → broadcast console (Space Grotesk + mono, glow)
   ========================================================================= */

/* ---------------------------------------------------------------------
   BUTTONS
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--touch-target-min);
  padding: var(--space-3) var(--space-5);
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-normal);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard),
              color var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard),
              transform var(--duration-fast) var(--ease-standard);
}



.btn:active { transform: translateY(1px); }

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

/* Primary — deep red, main CTA */
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-primary-foreground);
}
.btn-primary:hover:not(:disabled) { background-color: var(--color-primary-hover); }
.btn-primary:active:not(:disabled) { background-color: var(--color-primary-active); }

/* Secondary — dark blue, supporting actions */
.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-secondary-foreground);
}
.btn-secondary:hover:not(:disabled) { background-color: var(--color-secondary-hover); }
.btn-secondary:active:not(:disabled) { background-color: var(--color-secondary-active); }

/* Outline — copper edge, low-emphasis actions on both surfaces */
.btn-outline {
  background-color: transparent;
  border-color: var(--color-border);
  color: var(--color-foreground);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Ghost — text-only, tertiary actions (e.g. "skip", "cancel") */
.btn-ghost {
  background-color: transparent;
  color: var(--color-muted-foreground);
  padding-inline: var(--space-3);
}
.btn-ghost:hover:not(:disabled) {
  background-color: var(--color-muted);
  color: var(--color-foreground);
}

.btn-sm { min-height: 36px; padding: var(--space-2) var(--space-4); font-size: var(--text-sm); }
.btn-lg { min-height: 52px; padding: var(--space-4) var(--space-6); font-size: var(--text-md); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* HUD voice — radio page: geometric, mono, glowing edge instead of fill shift */
.voice-hud .btn,
.btn-hud {
  font-family: var(--font-hud);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  font-size: var(--text-sm);
}
.voice-hud .btn-primary,
.btn-hud.btn-primary {
  box-shadow: var(--shadow-sm);
}
.voice-hud .btn-primary:hover:not(:disabled),
.btn-hud.btn-primary:hover:not(:disabled) {
  box-shadow: var(--shadow-glow-accent);
}
.voice-hud .btn-outline,
.btn-hud.btn-outline {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.voice-hud .btn-outline:hover:not(:disabled),
.btn-hud.btn-outline:hover:not(:disabled) {
  box-shadow: var(--shadow-glow-accent);
  color: var(--color-accent-hover);
}

/* ---------------------------------------------------------------------
   NAV
   --------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--section-padding-x);
  background-color: color-mix(in srgb, var(--color-background) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: var(--border-width) solid var(--color-border);
}

.nav__brand {
  font-family: var(--font-wordmark);
  font-size: var(--text-lg);
  font-weight: var(--weight-wordmark);
  letter-spacing: var(--tracking-wide);
  color: var(--color-foreground);
  text-decoration: none;
  white-space: nowrap;
}

/* Mobile: prevent overlap of pill + Explore; keep single row */
@media (max-width: 480px) {
  .nav {
    padding: var(--space-3) var(--space-4);
    gap: var(--space-2);
  }
  .nav__brand {
    font-size: var(--text-sm);
    white-space: nowrap;
  }
  .nav__brand__sub {
    display: none;
  }
  .btn-row {
    gap: var(--space-2);
    flex-wrap: nowrap;
  }
  .btn-row .btn-sm {
    padding: var(--space-1) var(--space-2);
    font-size: 0.75rem;
  }
}

.voice-hud .nav__brand {
  font-family: var(--font-hud);
  text-transform: uppercase;
}



.nav__links {
  display: none;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  color: var(--color-foreground);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  padding: var(--space-2) 0;
  border-bottom: var(--border-width-thick) solid transparent;
  transition: border-color var(--duration-fast) var(--ease-standard),
              color var(--duration-fast) var(--ease-standard);
}
.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}
.voice-hud .nav__links a {
  font-family: var(--font-hud);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

/* Mobile nav toggle — meets 44x44 touch target */
.nav__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  background: transparent;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--color-foreground);
}
.nav__toggle:hover { border-color: var(--color-accent); color: var(--color-accent); }

@media (min-width: 768px) {
  .nav__links { display: flex; }
  .nav__toggle { display: none; }
}

/* Mobile nav panel — progressive disclosure, closed by default */
.nav__mobile-panel {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background-color: var(--color-scrim);
  display: none;
}
.nav__mobile-panel[data-open="true"] { display: block; }

.nav__mobile-sheet {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(84vw, 360px);
  background-color: var(--color-background);
  border-left: var(--border-width) solid var(--color-border);
  padding: var(--space-6) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.nav__mobile-sheet a {
  display: block;
  min-height: var(--touch-target-min);
  display: flex;
  align-items: center;
  color: var(--color-foreground);
  text-decoration: none;
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
}
.nav__mobile-sheet a:hover { color: var(--color-accent); }

/* ---------------------------------------------------------------------
   CARDS
   --------------------------------------------------------------------- */
.card {
  background-color: var(--color-card);
  color: var(--color-card-foreground);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration-base) var(--ease-standard),
              border-color var(--duration-base) var(--ease-standard),
              transform var(--duration-base) var(--ease-standard);
}

.card--interactive { cursor: pointer; }
.card--interactive:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.card__eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}

.card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

.card__body {
  color: var(--color-muted-foreground);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

/* HUD card — radio page: sharper corners, mono readouts, accent-glow border
   instead of a lift, since "console panel" doesn't float on hover */
.card--hud {
  border-radius: var(--radius-sm);
  background-color: var(--color-card);
  border-color: var(--color-border);
}
.card--hud .card__eyebrow { font-family: var(--font-mono); }
.card--hud .card__title { font-family: var(--font-hud); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.card--hud:hover { box-shadow: var(--shadow-glow-accent); border-color: var(--color-accent); transform: none; }

/* Live status pill, used inside HUD cards / stream player */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-accent);
  border: var(--border-width) solid var(--color-accent);
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-3);
}
.status-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-accent);
}
.status-pill[data-live="true"] .status-pill__dot {
  animation: pulse-live 1.6s ease-in-out infinite;
}
@keyframes pulse-live {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 hsl(32 63% 50% / 0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px hsl(32 63% 50% / 0); }
}

/* Red "live" variant — radio page live indicator + now-broadcasting pill */
.status-pill--live {
  color: var(--color-destructive);
  border-color: var(--color-destructive);
}
.status-pill--live .status-pill__dot {
  background-color: var(--color-destructive);
}
.status-pill--live[data-live="true"] .status-pill__dot {
  animation: pulse-live-red 1.6s ease-in-out infinite;
}
@keyframes pulse-live-red {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 hsl(0 60% 40% / 0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px hsl(0 60% 40% / 0); }
}

/* ---------------------------------------------------------------------
   HERO — main site (Phase 1)
   --------------------------------------------------------------------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--space-3);
  min-height: 82vh;
  padding-block: var(--space-9);
}
/* Tighten player → location gap on mobile */
@media (max-width: 480px) {
  .radio-hero { gap: var(--space-4); }
  .radio-loc { padding-block: var(--space-3); }
}


.hero__mark {
  color: var(--color-accent);
  width: 56px;
  height: 56px;
}

.hero__wordmark {
  font-family: var(--font-wordmark);
  font-weight: var(--weight-wordmark);
  font-size: var(--text-4xl);
  letter-spacing: var(--tracking-wide);
  line-height: var(--leading-tight);
  margin: 0;
}

.hero__tagline {
  font-family: var(--font-body);
  font-size: var(--text-md);
  color: var(--color-muted-foreground);
  max-width: 34rem;
  margin: 0;
}

.hero__scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
  min-height: var(--touch-target-min);
  justify-content: center;
  color: var(--color-muted-foreground);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}
.hero__scroll-cue:hover { color: var(--color-accent); }
.hero__scroll-cue svg { animation: scroll-cue-bounce 1.8s var(--ease-standard) infinite; }

@keyframes scroll-cue-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ---------------------------------------------------------------------
   PILLAR SECTIONS — alternating media/content rows
   --------------------------------------------------------------------- */
.pillar {
  position: relative;
  z-index: 1; /* sit above the parallax/morphing stage */
  scroll-margin-top: var(--space-9); /* keep the anchored heading clear of the sticky nav */
}

.pillar__row {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}

@media (min-width: 900px) {
  .pillar__row {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
  .pillar__row--reverse .pillar__media { order: 2; }
  .pillar__row--reverse .pillar__content { order: 1; }
}

.pillar__eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.pillar__title { margin-bottom: var(--space-4); }

.pillar__lede {
  font-size: var(--text-md);
  color: var(--color-foreground);
  margin-bottom: var(--space-5);
  max-width: none;
}

.pillar__body { color: var(--color-muted-foreground); max-width: none; }

.pillar__skills {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.pillar__skills li {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  color: var(--color-foreground);
  background-color: var(--color-muted);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-3);
}

/* Placeholder media block — swap for real photography/art once provided
   (see phase-report §5 open items). aspect-ratio reserves layout space
   up front so a later image swap causes no CLS. */
.media-placeholder {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  border: var(--border-width) solid var(--color-border);
  background-color: var(--color-card);
  background-image: linear-gradient(135deg, color-mix(in srgb, var(--color-accent) 14%, transparent), transparent 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* Real photo swap — match the image's 16/9 aspect ratio, rounded corners,
   and accent border the placeholder had so CLS stays zero on the swap.
   `object-fit: cover` fills the frame without cropping because ratios match. */
.pillar__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: var(--border-width) solid var(--color-border);
}

/* Real-photo override: when the placeholder holds a photo, drop the card bg/gradient */
.media-placeholder:has(> img.lightbox-image) {
  background-color: transparent;
  background-image: none;
}
.media-placeholder svg {
  width: 38%;
  height: 38%;
  color: var(--color-accent);
  opacity: 0.75;
}
.media-placeholder__label {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  color: var(--color-muted-foreground);
  background-color: color-mix(in srgb, var(--color-background) 82%, transparent);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------------
   CONTACT — email form (Phase 4). mailto: submission opens the user's
   mail client with the message composed; swap for a backend endpoint
   later if preferred. Styled to the carved/parchment system: copper
   accents, sharp radius, warm borders, generous touch targets.
   --------------------------------------------------------------------- */
.contact-stub {
  max-width: 34rem;
  margin-inline: auto;
  text-align: center;
}
.contact-stub .btn-row { justify-content: center; margin-top: var(--space-5); }

/* The form itself — left-aligned fields inside the centered intro */
.contact-form {
  margin-top: var(--space-6);
  text-align: left;
  display: grid;
  gap: var(--space-4);
}

.contact-form__row {
  display: grid;
  gap: var(--space-2);
}

.contact-form__row label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-muted-foreground);
}

.contact-form__row input,
.contact-form__row select,
.contact-form__row textarea {
  width: 100%;
  min-height: var(--touch-target-min);
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-card);
  color: var(--color-card-foreground);
  border: var(--border-width) solid var(--color-input-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: border-color var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard);
}
.contact-form__row textarea { min-height: calc(var(--touch-target-min) * 3); resize: vertical; }

.contact-form__row input::placeholder,
.contact-form__row textarea::placeholder {
  color: var(--color-muted-foreground);
  opacity: 0.75;
}

.contact-form__row input:hover,
.contact-form__row select:hover,
.contact-form__row textarea:hover {
  border-color: var(--color-accent);
}

.contact-form__row input:focus,
.contact-form__row select:focus,
.contact-form__row textarea:focus {
  border-color: var(--color-ring);
  box-shadow: var(--shadow-glow-accent);
  outline: none; /* :focus-visible outline still applies from base.css */
}

.contact-form__row select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23B5651D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-6);
  cursor: pointer;
}

/* Validation state — required fields get a destructive-red cue, but only
   AFTER the user has tried to use them (focused + blurred, or after they
  've attempted to submit). Untouched required fields stay neutral. */
   /* Inputs the user has interacted with (touched) via JS — see index.html */
.contact-form :is(input, textarea, select).is-touched:invalid {
  border-color: var(--color-destructive);
  box-shadow: 0 0 0 1px var(--color-destructive);
}
   /* The progressive-disclosure field groups aren't marked `required`, so we
     flag them red only once a submit is attempted while they're still empty */
.contact-form__group .contact-form__row[data-invalid="true"]:is(input, textarea, select) {
  border-color: var(--color-destructive);
  box-shadow: 0 0 0 1px var(--color-destructive);
}
/* :user-invalid is the modern progressive flag (fires after the user is
   done editing a field). Supported in recent Chrome/Safari/Edge; older
   browsers get the .is-touched rule above which has the same intent. */
.contact-form :is(input, textarea, select):user-invalid {
  border-color: var(--color-destructive);
  box-shadow: 0 0 0 1px var(--color-destructive);
}

/* Type-specific field groups (progressive disclosure by inquiry type).
   Each group is a bordered sub-panel; the group head reads as a carved
   subheading so the extra questions are clearly scoped to the request. */
.contact-form__group {
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  background-color: color-mix(in srgb, var(--color-card) 60%, var(--color-background));
  display: grid;
  gap: var(--space-4);
  transition: opacity var(--duration-base) var(--ease-standard);
}
.contact-form__group[hidden] { display: none; }

.contact-form__group-head {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0;
  padding-bottom: var(--space-2);
  border-bottom: var(--border-width) solid var(--color-border);
}

/* ---------------------------------------------------------------------
   FOOTER
   --------------------------------------------------------------------- */
.site-footer {
  border-top: var(--border-width) solid var(--color-border);
  padding-block: var(--space-6);
  text-align: center;
}
.site-footer p {
  margin: 0 auto;
  max-width: none;
  color: var(--color-muted-foreground);
  font-size: var(--text-sm);
}

/* =========================================================================
   PARALLAX + MORPHING MARK — scroll-driven symbol morph across pillars
   Phase 3 (reworked). A fixed background stage with a single evolving SVG
   that interpolates between three marks (stage rig → circuit traces →
   triskelle) as the user scrolls through each pillar section. Each pillar
   carries its own "energy" — a distinct atmosphere wash (ember → LED →
   forge) and matching mark tint — so the whole page shifts mood as you
   move between pillars.
   Reduced-motion fallback: static crossfade, no scroll-linking.
   ========================================================================= */

.scroll-stage {
  position: fixed;
  inset: 0;
  z-index: 0; /* behind content */
  pointer-events: none;
  overflow: hidden;
  background: transparent;

  /* Four per-pillar ground colours: the page's background *itself* shifts
  mood (ember → LED-violet → steel-blue → forest) as you scroll. The colour
  eases over ~900ms so the change reads as a smooth transition, never an
  abrupt flip. Falls back to the theme background if a ground var is absent
  (e.g. detail/radio pages that don't drive the per-pillar system). */
  background-color: var(--color-background);
  transition: background-color 900ms var(--ease-standard);
}
.scroll-stage[data-atmo="ngahere"]   { background-color: var(--ground-1); }
.scroll-stage[data-atmo="artist"]    { background-color: var(--ground-2); }
.scroll-stage[data-atmo="triskelle"] { background-color: var(--ground-3); }
.scroll-stage[data-atmo="contact"]   { background-color: var(--ground-4); }

/* Ensure the ember ground is visible immediately — without waiting for JS */
.scroll-stage[data-atmo="ngahere"],
.scroll-stage[data-atmo="ngahere"] .scroll-stage__atmo--ngahere {
  background-color: var(--ground-1);
  opacity: 1;
}

/* Parallax depth layers — faint texture, mid-ground, foreground mark */
.scroll-stage__layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.scroll-stage__layer--back {
  /* faint rune/circuit-line texture, moves slowest */
  opacity: 0.16;
  background-image:
    linear-gradient(var(--color-border), transparent) 1px / 1px 1px,
    linear-gradient(90deg, var(--color-border), transparent) 1px / 1px 1px;
  background-size: 56px 56px;
  background-position: center center;
}

/* Static mid glow for detail/radio pages — these don't use the per-pillar
   atmosphere system, so a single soft copper wash keeps their depth. */
.scroll-stage__layer--mid {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background: radial-gradient(40% 40% at 50% 42%, color-mix(in srgb, var(--color-accent) 18%, transparent), transparent 70%);
}

/* Atmosphere washes — one soft radial glow per pillar (plus a contact
   wash). Each is a coloured bloom anchored at a different point; the JS
   crossfades their opacity as the active pillar crosses the viewport
   centre, layered on top of the transitioning ground colour above. */
.scroll-stage__atmo {
  position: absolute;
  inset: 0;
  opacity: 0;
  /* Longer crossfade so the pillar-to-pillar mood change eases smoothly */
  transition: opacity 900ms var(--ease-standard);
}
.scroll-stage__atmo--ngahere {
   /* EMBER / stage copper — warm, low-left, like a lit stage */
  background:
    radial-gradient(42% 42% at 28% 30%, color-mix(in srgb, var(--atmos-ngahere) 26%, transparent), transparent 72%),
    radial-gradient(34% 34% at 78% 24%, color-mix(in srgb, var(--atmos-ngahere) 16%, transparent), transparent 70%);
}
.scroll-stage__atmo--artist {
   /* LED / projection violet — cool, high-center, like festival lighting */
  background:
    radial-gradient(46% 46% at 50% 22%, color-mix(in srgb, var(--atmos-artist) 26%, transparent), transparent 74%),
    radial-gradient(30% 30% at 20% 60%, color-mix(in srgb, var(--atmos-artist) 16%, transparent), transparent 70%);
}
.scroll-stage__atmo--triskelle {
   /* FORGE / steel blue — deep, low-right, like workshop heat */
  background:
    radial-gradient(46% 46% at 74% 68%, color-mix(in srgb, var(--atmos-triskelle) 24%, transparent), transparent 74%),
    radial-gradient(30% 30% at 30% 72%, color-mix(in srgb, var(--atmos-triskelle) 16%, transparent), transparent 70%);
}
.scroll-stage__atmo--contact {
   /* FOREST / pine — centred, calm glow for the "let's build" section */
  background:
    radial-gradient(50% 50% at 50% 40%, color-mix(in srgb, var(--atmos-contact) 24%, transparent), transparent 74%),
    radial-gradient(32% 32% at 50% 82%, color-mix(in srgb, var(--atmos-contact) 16%, transparent), transparent 72%);
}
.scroll-stage__layer--bottom {
  position: absolute;
  top: 100vh;
  left: 0; right: 0;
  height: 800px;
  pointer-events: none;
}
.scroll-stage__atmo--contact--bottom {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 900ms var(--ease-standard);
  background:
    radial-gradient(50% 50% at 50% 30%, color-mix(in srgb, var(--atmos-contact) 24%, transparent), transparent 74%),
    radial-gradient(32% 32% at 50% 70%, color-mix(in srgb, var(--atmos-contact) 16%, transparent), transparent 72%);
}

/* Dark-mode colour inversion: icons (logo + socials) should be white on dark,
   and dark on light — so we only apply the invert when we're in dark mode. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .invert-on-dark { filter: invert(1); }
}
[data-theme="dark"] .invert-on-dark { filter: invert(1); }
[data-theme="light"] .invert-on-dark { filter: none; }

/* The morphing mark itself — centered, large, low-opacity watermark.
   Its color is per-pillar; the JS sets data-atmo on the stage and the
   matching mark rule below recolors it. */
.scroll-stage__mark {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(420px, 82vw);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  color: var(--color-accent);
  opacity: 0.55;
  z-index: -1; /* behind pillar content (pillar z-index:1) */
  transition: color var(--duration-slow) var(--ease-standard), opacity var(--duration-slow) var(--ease-standard);
}
.scroll-stage__mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Mark tint follows the active pillar's atmosphere */
.scroll-stage[data-atmo="ngahere"] .scroll-stage__mark { color: var(--atmos-ngahere); }
.scroll-stage[data-atmo="artist"] .scroll-stage__mark { color: var(--atmos-artist); }
.scroll-stage[data-atmo="triskelle"] .scroll-stage__mark { color: var(--atmos-triskelle); }
.scroll-stage[data-atmo="contact"] .scroll-stage__mark { color: var(--atmos-contact); }

@media (prefers-reduced-motion: reduce) {
   /* Freeze the parallax; the page background + washes are set by the JS
     state (data-atmo) which simply stops changing, so the active pillar's
     mood still reads without any scroll-linked movement or animation. */
  .scroll-stage { transition: none; }
  .scroll-stage__layer { transform: none !important; }
  .scroll-stage__mark svg { animation: none; }
   .scroll-stage__atmo { transition: none; }
}

/* ---------------------------------------------------------------------
   PILLAR LAYOUT (reframed) — number badge + title row
   --------------------------------------------------------------------- */
.pillar__head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.pillar__num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: var(--border-width-thick) solid var(--color-accent);
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wider);
}

/* Per-pillar accents — each pillar's number badge + eyebrow take on its
   own "energy" color so the mood shift is reinforced in content, not
   only in the background wash. Color is redundant with titles/icons. */
.pillar[data-pillar="stage"] .pillar__num {
  border-color: var(--atmos-ngahere);
  color: var(--atmos-ngahere);
}
.pillar[data-pillar="stage"] .pillar__eyebrow { color: var(--atmos-ngahere); }
.pillar[data-pillar="circuit"] .pillar__num {
  border-color: var(--atmos-artist);
  color: var(--atmos-artist);
}
.pillar[data-pillar="circuit"] .pillar__eyebrow { color: var(--atmos-artist); }
.pillar[data-pillar="triskelle"] .pillar__num {
  border-color: var(--atmos-triskelle);
  color: var(--atmos-triskelle);
}
.pillar[data-pillar="triskelle"] .pillar__eyebrow { color: var(--atmos-triskelle); }

/* Ngahere toa — two modalities as distinct sub-cards inside one section */
.modalities {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-6);
}
@media (min-width: 760px) {
  .modalities { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
}
.modality {
  background-color: var(--color-card);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration-base) var(--ease-standard),
              border-color var(--duration-base) var(--ease-standard),
              transform var(--duration-base) var(--ease-standard);
}
.modality:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}
.modality__eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}
.modality__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}
.modality__body {
  color: var(--color-muted-foreground);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}
.modality__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* Pillar "view full" CTA row */
.pillar__cta { margin-top: var(--space-6); }

/* ---------------------------------------------------------------------
   PILLAR DETAIL PAGES — full description + examples layout
   --------------------------------------------------------------------- */
.detail-hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-block: var(--space-9);
}
.detail-hero__mark {
  margin-inline: auto;
  width: 72px;
  height: 72px;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}
.detail-hero h1 { margin-bottom: var(--space-4); }
.detail-hero .lede {
  font-size: var(--text-md);
  color: var(--color-muted-foreground);
  max-width: 34rem;
  margin-inline: auto;
}

.detail-section { position: relative; z-index: 1; }

.detail-grid {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-6);
}
@media (min-width: 760px) {
  .detail-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-6); }
}
.detail-item {
  background-color: var(--color-card);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.detail-item__title { font-family: var(--font-display); font-size: var(--text-md); margin-bottom: var(--space-3); }
.detail-item__body { color: var(--color-muted-foreground); font-size: var(--text-sm); line-height: var(--leading-relaxed); }

/* =========================================================================
   RADIO / HUD PAGE — roadhouseradio.live console
   ========================================================================= */
.radio-hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  min-height: 40vh;
  justify-content: flex-start;
  padding-block: var(--space-4);
}
.radio-hero__wordmark {
  font-family: var(--font-hud);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  font-size: var(--text-3xl);
}

.radio-console {
  width: 100%;
  max-width: 34rem;
  background-color: var(--color-card);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  text-align: left;
}
.radio-console__readout {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Custom audio player controls */
.player {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.player__row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.player__play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  border-radius: 50%;
  background-color: var(--color-primary);
  color: var(--color-primary-foreground);
  border: none;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard);
}
.player__play:hover { background-color: var(--color-primary-hover); box-shadow: var(--shadow-glow-accent); }
.player__play:active { background-color: var(--color-primary-active); }

.player__meta {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-muted-foreground);
  flex: 1;
}

.player__track {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background-color: var(--color-muted);
  -webkit-appearance: none;
  appearance: none;
}
.player__track::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--color-accent);
  cursor: pointer;
}
.player__track::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--color-accent);
  cursor: pointer;
  border: none;
}

.player__volume {
  width: 120px;
  height: 6px;
  border-radius: var(--radius-full);
  background-color: var(--color-muted);
  -webkit-appearance: none;
  appearance: none;
}
.player__volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--color-accent);
  cursor: pointer;
}
.player__volume::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--color-accent);
  cursor: pointer;
  border: none;
}

/* Location / follow block */
.radio-loc {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-block: var(--space-5);
}
.radio-loc__grid {
  display: grid;
  gap: var(--space-5);
  max-width: 48rem;
  margin-inline: auto;
  text-align: left;
}
@media (min-width: 760px) {
  .radio-loc__grid { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
}
.radio-loc__coords {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-accent);
  letter-spacing: var(--tracking-wider);
}

.ig-widget {
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-card);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.ig-widget__head {
  font-family: var(--font-hud);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  font-size: var(--text-sm);
  color: var(--color-foreground);
  margin-bottom: var(--space-4);
}

/* Radio page CTA */
.radio-hero .btn-row { justify-content: center; }

/* =====================================================================
   RADIO PAGE — FM transmission readout + stylised New Zealand map
    ===================================================================== */

/* FM read-out: each reading is a small stack — the label reads as an
   uppercase mono tag and the figure sits on its OWN line below it. */
.fm-reading { margin: 0; }
.fm-reading + .fm-reading { margin-top: var(--space-3); }
.fm-label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-muted-foreground);
}
.fm-figure {
  display: block;
  margin-top: var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  color: var(--color-accent);
  letter-spacing: var(--tracking-normal);
  word-break: break-word;
}
.fm-reading__note {
  margin: var(--space-4) 0 0;
  color: var(--color-muted-foreground);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

/* Stylised New Zealand map — a clean silhouette (not a topographically
   accurate survey). The SVG colours itself with currentColor via CSS so
   it swaps automatically with light/dark. The broadcast dot pulses in the
   location of the current coordinates and carries an accessible label. */
.nz-map {
  display: block;
  width: 100%;
  max-width: 19rem;
  height: auto;
  margin: var(--space-3) auto var(--space-1);
  color: var(--color-muted-foreground);
}
.nz-map__land {
  fill: color-mix(in srgb, var(--color-accent) 16%, transparent);
  stroke: color-mix(in srgb, var(--color-accent) 62%, var(--color-border));
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.nz-map__island-name {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  fill: var(--color-muted-foreground);
}
.nz-map__caption {
  margin: var(--space-2) 0 var(--space-4);
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-muted-foreground);
}
.nz-map__dot-glow {
  fill: var(--color-accent);
  opacity: 0.3;
  animation: nz-pulse 2s var(--ease-standard) infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.nz-map__dot-core { fill: var(--color-accent); filter: drop-shadow(0 0 3px var(--color-accent)); }
.nz-map__cross {
  stroke: var(--color-accent);
  stroke-width: 1.4;
  opacity: 0.7;
  stroke-linecap: round;
}
@keyframes nz-pulse {
  0%    { transform: scale(1);   opacity: 0.3; }
  70%   { transform: scale(2.2); opacity: 0; }
  100%  { transform: scale(2.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .nz-map__dot-glow { animation: none; }
}

/* --------------------------------------------------------------------
   MAKER PAGE — Triskelle 3D detail: a distinct steel-blue ground instead
   of the default so the "making/engineering" page reads visually apart
   from the radio/HUD page. Same smooth page-background transition as the
   main site, driven by its own single fixed stage (no per-pillar JS). */
   .page-maker .scroll-stage {
  background-color: var(--ground-3);
  transition: background-color var(--duration-slow) var(--ease-standard);
}

/* --------------------------------------------------------------------
   Floating theme toggle — bottom-right, page tokens only
   -------------------------------------------------------------------- */
.theme-toggle {
  position: fixed;
  bottom: var(--space-5, 1.5rem);
  right: var(--space-5, 1.5rem);
  z-index: var(--z-modal, 400);
  width: 48px;
  height: 48px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full, 999px);
  background: var(--color-card);
  color: var(--color-foreground);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
  transition:
    background-color var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard);
}
.theme-toggle:hover { border-color: var(--color-accent); transform: translateY(-2px); }
.theme-toggle:active { transform: translateY(0); }
.theme-toggle__icon--sun { display: block; }
.theme-toggle__icon--moon { display: none; }
[data-theme="dark"] .theme-toggle__icon--sun { display: none; }
[data-theme="dark"] .theme-toggle__icon--moon { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__icon--sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle__icon--moon { display: block; }
}

/* =====================================================================
   LIGHTBOX — click any .lightbox-image to open full-screen with × close
   Only applies to images explicitly marked with class + data-full
   ===================================================================== */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(10,8,9,0.95); display: none; align-items: center;
  justify-content: center; overflow: hidden; overscroll-behavior: contain; touch-action: none;
  opacity: 0; transition: opacity 0.2s ease;
  -webkit-user-select: none; user-select: none;
  padding: max(1rem, env(safe-area-inset-top, 0)) max(1rem, env(safe-area-inset-right, 0)) max(1rem, env(safe-area-inset-bottom, 0)) max(1rem, env(safe-area-inset-left, 0));
}
.lightbox-overlay.active { display: flex; opacity: 1; }
.lightbox-overlay img { max-width: 94vw; max-height: 88dvh; width: auto; border-radius: var(--radius-lg); box-shadow: 0 0 40px rgba(0,0,0,0.5); object-fit: contain; margin: auto; display: block; }
.lightbox-close {
  position: fixed; top: max(1rem, env(safe-area-inset-top, 0) + 0.5rem); right: max(1rem, env(safe-area-inset-right, 0) + 0.5rem);
  background: rgba(20,18,16,0.82); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.22); color: #fff; font-family: var(--font-mono);
  font-size: 1.5rem; font-weight: 700; width: 48px; height: 48px;
  border-radius: 50%; cursor: pointer; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  z-index: 10000; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none;
}
.lightbox-close:hover { background: rgba(255,255,255,0.18); }
.lightbox-image { cursor: zoom-in; }
