/* ───────── Tokens ───────── */
:root {
  --bg: #0b0a1d;
  --bg-deep: #07061a;
  --surface: #141231;
  --surface-2: #1c1940;
  --line: rgba(163, 124, 255, 0.18);
  --line-strong: rgba(163, 124, 255, 0.45);
  --text: #efeaff;
  --muted: #aca6d6;
  --accent: #a37cff;
  --pink: #ff6fd8;
  --blue: #7b8cff;
  --gold: #ffc766;
  --danger: #ff8a8a;

  --font: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Space Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);
  --dur-fast: 180ms;
  --dur: 320ms;
  --dur-slow: 600ms;

  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 76px;

  --z-canvas: 0;
  --z-story: 10;
  --z-hit: 15;
  --z-sections: 20;
  --z-header: 50;
  --z-panel: 60;
  --z-tip: 70;
  --z-loader: 100;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 400; line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
.mono { font-family: var(--mono); }
.hl { color: var(--accent); }
.hl-m { color: var(--pink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: calc(var(--z-loader) + 1);
  background: var(--accent); color: var(--bg-deep); padding: 10px 16px; border-radius: 999px;
  font-weight: 500; text-decoration: none; transform: translateY(-160%);
  transition: transform var(--dur) var(--ease-out);
}
.skip-link:focus { transform: none; }

.eyebrow {
  font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px; font-weight: 500;
}
.eyebrow.hl { color: var(--accent); }

/* ───────── Canvas & chrome ───────── */
#scene {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: var(--z-canvas); display: block;
}

.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: calc(var(--z-header) + 1);
  pointer-events: none;
}
.progress span {
  display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, rgba(163, 124, 255, 0.2), var(--accent));
  box-shadow: 0 0 10px var(--accent);
}

#loader {
  position: fixed; inset: 0; z-index: var(--z-loader);
  display: grid; place-content: center; justify-items: center; gap: 18px;
  background: var(--bg); color: var(--muted); letter-spacing: 0.2em; text-transform: uppercase; font-size: 12px;
  transition: opacity 700ms var(--ease-out), visibility 700ms;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-ring {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong); border-top-color: var(--accent);
  animation: spin 1.1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────── Header ───────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-header);
  height: var(--header-h); padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.site-header::before {
  content: ''; position: absolute; inset: 0 0 -30px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(11, 10, 29, 0.85), rgba(11, 10, 29, 0));
  opacity: 0; transition: opacity var(--dur) var(--ease-out);
}
.site-header.solid::before { opacity: 1; }

.brand {
  font-size: 24px; font-weight: 500; letter-spacing: -0.01em; text-decoration: none;
  display: inline-flex; align-items: baseline; min-height: 44px; align-items: center;
}
.brand-logo {
  width: 50px; height: 50px; margin-right: 10px; border-radius: 50%; object-fit: cover; object-position: center;
  flex: none;
  /* the avatar files are pre-cropped and pre-sized (Media/avatar-50/100/150.png) so it stays crisp */
  box-shadow: 0 0 0 1px var(--line), 0 0 18px rgba(163, 124, 255, 0.35);
  transition: box-shadow var(--dur) var(--ease-out);
}
.brand:hover .brand-logo { box-shadow: 0 0 0 1px var(--line-strong), 0 0 24px rgba(163, 124, 255, 0.6); }
.brand-o {
  display: inline-block; width: 0.52em; height: 0.52em; margin: 0 0.02em; border-radius: 50%;
  border: 2px solid var(--accent); color: transparent; overflow: hidden; line-height: 0;
  box-shadow: 0 0 10px rgba(163, 124, 255, 0.6), inset 0 0 6px rgba(163, 124, 255, 0.5);
  transform: translateY(0.08em);
}

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  text-decoration: none; font-size: 15px; letter-spacing: 0.04em; color: var(--muted);
  border-radius: 999px; transition: color var(--dur-fast), background-color var(--dur-fast);
}
.site-nav a:hover { color: var(--text); background: rgba(163, 124, 255, 0.08); }
.site-nav a { white-space: nowrap; }
/* narrower desktops: tighter nav so "Broadcast Your Signal" stays on one line */
@media (max-width: 1100px) and (min-width: 821px) {
  .site-header { gap: 12px; }
  .site-nav ul { gap: 0; }
  .site-nav a { padding: 0 9px; font-size: 14px; letter-spacing: 0.02em; }
}
.site-nav a.active { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; }

.sound-btn {
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; color: var(--accent);
  background: rgba(163, 124, 255, 0.08); border: 1.5px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(163, 124, 255, 0.08);
  transition: box-shadow var(--dur) var(--ease-out), background-color var(--dur-fast), transform var(--dur-fast);
}
.sound-btn:hover { background: rgba(163, 124, 255, 0.16); }
.sound-btn:active { transform: scale(0.95); }
.sound-btn .wave { opacity: 0; transition: opacity var(--dur); }
.sound-btn[aria-pressed='true'] { box-shadow: 0 0 0 6px rgba(163, 124, 255, 0.16), 0 0 22px rgba(163, 124, 255, 0.35); }
.sound-btn[aria-pressed='true'] .wave { opacity: 1; }
.sound-btn[aria-pressed='true'] .mute { opacity: 0; }
.sound-btn[aria-pressed='true'] .w2 { animation: pulse 1.6s ease-in-out infinite; }

@keyframes pulse { 50% { opacity: 0.3; } }

/* ───────── Journey ───────── */
#journey { position: relative; height: 1300vh; pointer-events: none; z-index: var(--z-story); }
.story { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; }

.chapter {
  position: absolute; left: 50%; top: 21vh; width: min(880px, calc(100% - 2 * var(--gutter)));
  transform: translate(-50%, 24px); opacity: 0; text-align: center;
  text-shadow: 0 2px 24px rgba(11, 10, 29, 0.9);
  will-change: opacity, transform;
}
.chapter .big { font-size: clamp(30px, 4.6vw, 58px); line-height: 1.16; font-weight: 400; margin: 0; }
.chapter .mid { font-size: clamp(20px, 2.3vw, 28px); line-height: 1.3; margin: 0; }

.chapter.chapter-intro { top: 50%; transform: translate(-50%, -50%); opacity: 1; }
.chapter-intro h1 {
  font-size: clamp(48px, 9vw, 124px); font-weight: 300; letter-spacing: -0.02em; line-height: 0.98;
}
.intro-cta { margin-top: 44px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.cta-row { display: flex; align-items: center; justify-content: center; gap: 16px 18px; flex-wrap: wrap; }
/* the main action: Send a signal */
.cta-signal {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 12px;
  min-height: 62px; padding: 0 34px 0 28px; border-radius: 999px; text-decoration: none; text-shadow: none;
  background: var(--pink); color: var(--bg-deep); font-size: 19px; font-weight: 500; letter-spacing: 0.03em;
  box-shadow: 0 0 0 8px rgba(255, 111, 216, 0.12), 0 0 36px rgba(255, 111, 216, 0.5);
  animation: signalpulse 2.8s ease-in-out infinite;
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast);
}
.cta-signal:hover { transform: scale(1.04); background: #ff86df; }
.cta-signal:active { transform: scale(0.97); }
@keyframes signalpulse { 50% { box-shadow: 0 0 0 14px rgba(255, 111, 216, 0.05), 0 0 48px rgba(255, 111, 216, 0.7); } }
/* the second option: Play the journey */
.hero-play {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 12px; cursor: pointer;
  min-height: 54px; padding: 0 22px 0 6px; border-radius: 999px; text-shadow: none;
  background: rgba(11, 10, 29, 0.55); border: 1px solid var(--line-strong); color: var(--text);
  font-size: 16px; letter-spacing: 0.03em;
  transition: border-color var(--dur-fast), background-color var(--dur-fast), transform var(--dur-fast) var(--ease-out);
}
.hero-play-icon {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: rgba(163, 124, 255, 0.18); border: 1.5px solid var(--accent);
  box-shadow: 0 0 18px rgba(163, 124, 255, 0.4);
}
.hero-play-icon svg { margin-left: 2px; }
.hero-play:hover { border-color: var(--accent); background: rgba(163, 124, 255, 0.14); }
.hero-play:active { transform: scale(0.97); }

/* Send a signal link in the gallery */
.gallery-signal {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; margin-top: 4px; min-height: 46px; padding: 0 20px 0 16px;
  border-radius: 999px; text-decoration: none; font-weight: 500; letter-spacing: 0.02em;
  color: var(--pink); border: 1px solid rgba(255, 111, 216, 0.55); background: rgba(255, 111, 216, 0.08);
  transition: background-color var(--dur-fast), box-shadow var(--dur-fast);
}
.gallery-signal:hover { background: rgba(255, 111, 216, 0.16); box-shadow: 0 0 22px rgba(255, 111, 216, 0.35); }
.scroll-cue {
  margin: 0; display: inline-flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted);
}
.scroll-cue span {
  width: 1px; height: 46px; background: linear-gradient(var(--accent), transparent);
  animation: cue 2.2s var(--ease-out) infinite; transform-origin: top;
}
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

.chapter-split {
  top: 13vh; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 6vw, 96px);
  width: min(1100px, calc(100% - 2 * var(--gutter)));
}
.chapter-split > div:first-child { color: var(--muted); }

/* ───────── Gallery ───────── */
#gallery {
  position: relative; z-index: calc(var(--z-hit) + 1); min-height: 100vh; min-height: 100dvh;
  padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
  pointer-events: none;
}
.gallery-side {
  width: min(340px, 32vw); pointer-events: auto;
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
body.panel-open .gallery-side { opacity: 0; transform: translateX(-16px); pointer-events: none; }
.gallery-side h2 { font-size: clamp(28px, 2.6vw, 38px); margin-bottom: 16px; }
.gallery-hint { display: flex; gap: 10px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.gallery-hint svg { flex: none; margin-top: 3px; color: var(--accent); }

.piece-list { list-style: none; margin: 20px 0 0; padding: 0; border-top: 1px solid var(--line); counter-reset: piece; }
.piece-list li { border-bottom: 1px solid var(--line); }
.piece-list button {
  width: 100%; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px;
  min-height: 48px; padding: 8px 4px; background: none; border: 0; cursor: pointer; text-align: left;
  color: var(--text); transition: background-color var(--dur-fast), color var(--dur-fast);
}
.piece-list button:hover, .piece-list button[aria-current='true'] { background: rgba(163, 124, 255, 0.07); }
.piece-list .pl-num { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.piece-list .pl-title { font-size: 16px; line-height: 1.25; }
.piece-list .pl-place { display: block; font-size: 13px; color: var(--muted); }
.piece-list .pl-dot { width: 10px; height: 10px; transform: rotate(30deg); clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%); }

.globe-hit {
  position: fixed; left: 0; top: 0; width: 10px; height: 10px; border-radius: 50%;
  z-index: var(--z-hit); touch-action: none; cursor: grab; display: none;
}
.globe-hit.active { display: block; }
.globe-hit.dragging { cursor: grabbing; }
.globe-hit.over-pin { cursor: pointer; }
.globe-hit:focus-visible { outline: 1px dashed var(--line-strong); outline-offset: 8px; }

.pin-tip {
  position: fixed; left: 0; top: 0; z-index: var(--z-tip); pointer-events: none;
  padding: 8px 12px; border-radius: 6px; background: rgba(11, 10, 29, 0.92);
  border: 1px solid var(--line-strong); font-size: 14px; line-height: 1.3; white-space: nowrap;
  opacity: 0; transform: translate(-50%, calc(-100% - 18px)) scale(0.96);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.pin-tip.show { opacity: 1; transform: translate(-50%, calc(-100% - 18px)); }
.pin-tip small { display: block; color: var(--muted); font-size: 12px; }

/* ───────── North-up globe button ───────── */
.globe-reset {
  position: fixed; right: var(--gutter); bottom: 24px; z-index: calc(var(--z-hit) + 2);
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px;
  border-radius: 999px; cursor: pointer; font-size: 14px; letter-spacing: 0.04em; color: var(--text);
  background: rgba(11, 10, 29, 0.8); border: 1px solid var(--line-strong); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility 0s linear var(--dur),
    border-color var(--dur-fast), box-shadow var(--dur-fast), right 520ms var(--ease-out);
}
.globe-reset svg { color: var(--accent); }
.globe-reset:hover { border-color: var(--accent); box-shadow: 0 0 18px rgba(163, 124, 255, 0.3); }
.globe-reset:active { transform: scale(0.97); }
body.gallery-on .globe-reset {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility 0s,
    border-color var(--dur-fast), box-shadow var(--dur-fast), right 520ms var(--ease-out);
}
body.panel-open .globe-reset { right: calc(min(460px, 100%) + 20px); }

/* ───────── Story rail (right edge) ───────── */
.rail {
  position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: calc(var(--z-header) - 1);
  transition: opacity var(--dur) var(--ease-out), visibility 0s;
}
body.panel-open .rail { opacity: 0; visibility: hidden; transition: opacity var(--dur) var(--ease-out), visibility 0s linear var(--dur); }
.rail ol { list-style: none; margin: 0; padding: 0; position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rail-track {
  position: absolute; left: 50%; top: 14px; bottom: 14px; width: 1px; transform: translateX(-50%);
  background: rgba(172, 166, 214, 0.28); pointer-events: none;
}
.rail-fill {
  position: absolute; inset: 0; background: var(--accent); transform-origin: top; transform: scaleY(0);
  box-shadow: 0 0 8px rgba(163, 124, 255, 0.8);
}
.rail ol button {
  position: relative; width: 28px; height: 28px; display: grid; place-items: center;
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--text);
}
.rail-dot { display: block; border-radius: 50%; transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-fast); }
.rail .major .rail-dot { width: 10px; height: 10px; border: 1.5px solid var(--muted); background: var(--bg); }
.rail .minor .rail-dot { width: 4px; height: 4px; background: var(--muted); }
.rail .passed .rail-dot { border-color: var(--accent); }
.rail .minor.passed .rail-dot { background: var(--accent); }
.rail .active .rail-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 10px rgba(163, 124, 255, 0.9); transform: scale(1.25); }
.rail .minor.active .rail-dot { transform: scale(1.8); }
.rail ol button:hover .rail-dot { transform: scale(1.45); border-color: var(--text); }
.rail-label {
  position: absolute; right: 34px; top: 50%; white-space: nowrap; pointer-events: none;
  padding: 5px 10px; border-radius: 6px; font-size: 13px; letter-spacing: 0.04em;
  background: rgba(11, 10, 29, 0.9); border: 1px solid var(--line-strong);
  opacity: 0; transform: translate(6px, -50%);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.rail ol button:hover .rail-label, .rail ol button:focus-visible .rail-label { opacity: 1; transform: translate(0, -50%); }
.rail ol button:focus-visible { outline-offset: 0; border-radius: 50%; }
/* ───────── Autoplay button (top of the rail) ───────── */
.rail-play {
  position: relative; display: grid; place-items: center; width: 34px; height: 34px; margin: 0 auto 10px;
  border-radius: 50%; cursor: pointer; padding: 0; color: var(--accent);
  background: rgba(11, 10, 29, 0.85); border: 1.5px solid var(--accent);
  box-shadow: 0 0 0 5px rgba(163, 124, 255, 0.1);
  transition: box-shadow var(--dur) var(--ease-out), background-color var(--dur-fast), transform var(--dur-fast);
}
.rail-play:hover { background: rgba(163, 124, 255, 0.18); }
.rail-play:active { transform: scale(0.94); }
.rail-play .i-pause { display: none; }
.rail-play[aria-pressed='true'] .i-play { display: none; }
.rail-play[aria-pressed='true'] .i-pause { display: block; }
.rail-play[aria-pressed='true'] { box-shadow: 0 0 0 5px rgba(163, 124, 255, 0.18), 0 0 18px rgba(163, 124, 255, 0.55); animation: playpulse 2.4s ease-in-out infinite; }
@keyframes playpulse { 50% { box-shadow: 0 0 0 8px rgba(163, 124, 255, 0.08), 0 0 26px rgba(163, 124, 255, 0.7); } }
.rail-play .rail-label { right: 42px; }
.rail-play:hover .rail-label, .rail-play:focus-visible .rail-label { opacity: 1; transform: translate(0, -50%); }
/* On the landing screen the big play button takes over; the rail one returns once you're under way. */
.rail .rail-play { transition: box-shadow var(--dur) var(--ease-out), background-color var(--dur-fast), transform var(--dur-fast), opacity var(--dur) var(--ease-out), visibility 0s; }
body.at-top:not(.autoplaying) .rail .rail-play {
  opacity: 0; visibility: hidden; transform: scale(0.8);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility 0s linear var(--dur);
}
/* ───────── Piece panel ───────── */
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: var(--z-panel);
  width: min(460px, 100%); overflow-y: auto; overscroll-behavior: contain;
  padding: calc(var(--header-h) + 8px) 32px 32px;
  background: rgba(11, 10, 29, 0.94); border-left: 1px solid var(--line);
  backdrop-filter: blur(10px);
  transform: translateX(104%); visibility: hidden;
  transition: transform 520ms var(--ease-out), visibility 0s linear 520ms;
}
.panel.open { transform: none; visibility: visible; transition: transform 520ms var(--ease-out), visibility 0s; }
.panel-close {
  position: absolute; top: calc(var(--header-h) - 52px); right: 20px;
  width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 50%;
  transition: background-color var(--dur-fast), border-color var(--dur-fast);
}
.panel-close:hover { border-color: var(--accent); }
.panel-media {
  aspect-ratio: 4 / 5; border-radius: 8px; overflow: hidden; margin: 12px 0 20px;
  position: relative; background: var(--surface); border: 1px solid var(--line);
}
.panel-media img { width: 100%; height: 100%; object-fit: cover; }
.panel-media .ph {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px;
  color: var(--muted); font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase;
  background:
    radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--piece, var(--accent)) 45%, transparent), transparent 55%),
    radial-gradient(circle at 75% 70%, rgba(163, 124, 255, 0.25), transparent 50%),
    radial-gradient(rgba(239, 234, 255, 0.14) 1px, transparent 1.4px) 0 0 / 12px 12px,
    var(--bg-deep);
}
.panel-kicker { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.panel-title { font-size: 34px; margin-bottom: 6px; }
.panel-place { color: var(--accent); margin-bottom: 18px; }
.panel-meta { display: grid; grid-template-columns: repeat(3, auto); gap: 14px 20px; margin: 0 0 20px; padding: 14px 0; border-block: 1px solid var(--line); }
.panel-meta dt { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.panel-meta dd { margin: 2px 0 0; font-size: 15px; line-height: 1.35; }
.panel-desc { color: #dcd6f7; line-height: 1.7; }
.panel-actions { margin: 24px 0; }
.panel-nav { display: flex; justify-content: space-between; gap: 12px; }
.panel-nav button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; cursor: pointer;
  background: none; border: 1px solid var(--line); border-radius: 999px; color: var(--muted);
  transition: color var(--dur-fast), border-color var(--dur-fast);
}
.panel-nav button:hover { color: var(--text); border-color: var(--line-strong); }

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 26px; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: var(--bg-deep); border: 0; font-weight: 500; font-size: 16px;
  text-decoration: none; letter-spacing: 0.02em;
  box-shadow: 0 0 0 0 rgba(163, 124, 255, 0.4);
  transition: box-shadow var(--dur) var(--ease-out), transform var(--dur-fast), background-color var(--dur-fast);
}
.btn:hover { box-shadow: 0 0 0 6px rgba(163, 124, 255, 0.14), 0 0 26px rgba(163, 124, 255, 0.35); }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ───────── Content sections ───────── */
.page-section {
  position: relative; z-index: var(--z-sections);
  background: var(--bg-deep); padding: clamp(80px, 12vw, 160px) 0;
  border-top: 1px solid var(--line);
}
#about { box-shadow: 0 -60px 80px 20px var(--bg-deep); }
.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.page-section h2 { font-size: clamp(34px, 4.6vw, 60px); font-weight: 300; margin-bottom: 28px; }
.page-section p { color: var(--muted); max-width: 62ch; }

.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.portrait { margin: 0; }
.portrait-frame {
  aspect-ratio: 4 / 5; border-radius: 10px; border: 1px solid var(--line); display: grid; place-content: center;
  color: var(--muted); letter-spacing: 0.24em; text-transform: uppercase; font-size: 12px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 91, 214, 0.18), transparent 45%),
    radial-gradient(rgba(163, 124, 255, 0.22) 1px, transparent 1.4px) 0 0 / 14px 14px,
    var(--surface);
}
.portrait figcaption { font-size: 12px; color: var(--muted); margin-top: 10px; }
.about-copy p { font-size: 18px; }
.stats { list-style: none; padding: 0; margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 16px 48px; }
.stats li { display: grid; }
.stat-num { font-family: var(--mono); font-size: 34px; color: var(--accent); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.ex-list { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--line); }
.ex-list li {
  display: grid; grid-template-columns: 200px 1fr auto; gap: 8px 32px; align-items: center;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.ex-date { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.ex-title { font-size: clamp(20px, 2vw, 26px); line-height: 1.25; }
.ex-venue { display: block; color: var(--muted); font-size: 15px; margin-top: 2px; }
.ex-tag {
  justify-self: end; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
}
.ex-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ex-tag.now { color: var(--blue); border-color: rgba(123, 140, 255, 0.5); }
.ex-tag.upcoming { color: var(--accent); }
.ex-tag.past { color: var(--muted); border-color: var(--line); }

.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); }
.contact-direct { margin-top: 24px; }
.email-link { font-size: clamp(20px, 2.2vw, 26px); color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.email-link:hover { border-color: var(--accent); }
.socials { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.socials a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--muted);
  transition: color var(--dur-fast), border-color var(--dur-fast);
}
.socials a:hover { color: var(--text); border-color: var(--line-strong); }

.contact-form { display: grid; gap: 18px; align-content: start; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; letter-spacing: 0.06em; color: var(--text); }
.req { color: var(--pink); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(163, 124, 255, 0.2); }
.field [aria-invalid='true'] { border-color: var(--danger); }
.err { color: var(--danger) !important; font-size: 14px; margin: 0; min-height: 0; }
.form-status { margin: 0; font-size: 15px; }
.form-status.ok { color: var(--blue) !important; }

.site-footer { position: relative; z-index: var(--z-sections); background: var(--bg-deep); border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 88px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.footer-inner a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.footer-inner a:hover { color: var(--accent); }

/* Zenith Archive credit: the standard footer line used across Zenith sites */
.site-footer { --zenith-credit-color: var(--muted); }
.zenith-credit { margin: 0; padding: 4px 16px 22px; text-align: center; }
.zenith-credit a {
  display: inline-flex; align-items: center; gap: 7px; min-height: 24px;
  font-family: 'Montserrat', var(--font);
  font-size: var(--zenith-credit-size, 0.75rem); font-weight: 400; line-height: 1;
  color: var(--zenith-credit-color, currentColor); opacity: 0.75; text-decoration: none;
  transition: opacity 0.2s, color 0.2s;
}
.zenith-credit a:hover,
.zenith-credit a:focus-visible { opacity: 1; color: var(--zenith-credit-hover, #cbb8e6); }
/* landing-screen copy of the credit, pinned to the bottom of the first screen */
.landing-credit {
  --zenith-credit-color: var(--muted);
  position: fixed; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: var(--z-story);
  padding: 0; pointer-events: none;
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility 0s;
}
.landing-credit a { pointer-events: auto; }
body.scrolled .landing-credit, body.signal-open .landing-credit {
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility 0s linear var(--dur);
}
/* wordmark: bold, wide-tracked capitals, a step brighter than "Powered by" */
.zenith-credit-name {
  letter-spacing: 0.22em; text-transform: uppercase; font-weight: 700;
  color: var(--zenith-credit-name-color, var(--text));
  transition: color 0.2s;
}
.zenith-credit a:hover .zenith-credit-name,
.zenith-credit a:focus-visible .zenith-credit-name { color: inherit; }

.noscript { position: relative; z-index: 30; padding: 16px; background: var(--surface); text-align: center; }

/* ───────── No WebGL fallback ───────── */
body.no-webgl #journey { height: auto; }
body.no-webgl .story { position: static; height: auto; overflow: visible; padding: 120px 0 40px; display: grid; gap: 72px; }
body.no-webgl .chapter { position: static; transform: none; opacity: 1; margin-inline: auto; left: auto; }

/* ───────── Reduced motion: static story, no scroll-scrub ───────── */
body.rm #journey { height: auto; }
body.rm .story { position: relative; height: auto; overflow: visible; padding: 18vh 0 10vh; display: grid; gap: 22vh; }
body.rm .chapter { position: static; transform: none; opacity: 1; margin-inline: auto; left: auto;
  background: rgba(11, 10, 29, 0.78); padding: 28px; border-radius: 12px; }
body.rm .chapter-intro { background: none; }
body.rm .scroll-cue span { animation: none; }

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

/* ───────── Responsive ───────── */
@media (max-width: 960px) {
  .gallery-side { width: min(320px, 40vw); }
}

@media (max-width: 820px) {
  :root { --header-h: 64px; }
  .globe-reset { bottom: 16px; right: 16px; }
  /* slim story rail, with room kept for it on the right */
  .rail { right: 2px; }
  .rail ol { gap: 0; }
  .rail ol button { width: 24px; height: 26px; }
  .rail-play { width: 28px; height: 28px; margin-bottom: 8px; }
  .rail .major .rail-dot { width: 8px; height: 8px; }
  .rail-track { top: 13px; bottom: 13px; }
  .wrap { width: auto; margin-left: 16px; margin-right: 30px; }
  .chapter { width: calc(100% - 16px - 30px); left: calc(50% - 7px); }
  #gallery { padding-right: 30px; }
  body.panel-open .globe-reset { opacity: 0; visibility: hidden; }
  .brand-logo { width: 50px; height: 50px; margin-right: 10px; }
  .menu-btn {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; cursor: pointer;
    background: rgba(11, 10, 29, 0.6); border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px;
  }
  .menu-lines, .menu-lines::before { display: block; width: 16px; height: 1.5px; background: currentColor; position: relative; transition: transform var(--dur) var(--ease-out); }
  .menu-lines::before { content: ''; position: absolute; top: 5px; }
  .menu-lines { transform: translateY(-2.5px); }
  .menu-btn[aria-expanded='true'] .menu-lines { transform: rotate(45deg); }
  .menu-btn[aria-expanded='true'] .menu-lines::before { transform: translateY(-5px) rotate(-90deg); }

  .site-nav {
    position: fixed; top: var(--header-h); left: 12px; right: 12px; padding: 8px;
    background: rgba(11, 10, 29, 0.97); border: 1px solid var(--line); border-radius: 14px;
    opacity: 0; transform: translateY(-8px); visibility: hidden;
    transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility 0s linear var(--dur);
  }
  .site-nav.open { opacity: 1; transform: none; visibility: visible; transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
  .site-nav ul { flex-direction: column; }
  .site-nav a { width: 100%; min-height: 48px; font-size: 17px; }

  .chapter { top: 14vh; }
  .chapter-split { grid-template-columns: 1fr; gap: 28px; top: 11vh; }

  #gallery { display: flex; flex-direction: column; padding-bottom: 32px; }
  .gallery-side { width: 100%; display: contents; }
  .gallery-side .eyebrow, .gallery-side h2, .gallery-hint { max-width: 520px; }
  .gallery-side h2 { font-size: 26px; }
  .gallery-hint { font-size: 14px; }
  .piece-list {
    margin-top: 58vh; background: rgba(11, 10, 29, 0.86); border: 1px solid var(--line); border-radius: 12px;
    padding: 4px 12px; pointer-events: auto;
  }
  body.panel-open .piece-list { opacity: 0; }

  .panel { width: 100%; top: auto; max-height: 86dvh; border-left: 0; border-top: 1px solid var(--line-strong);
    border-radius: 18px 18px 0 0; padding: 60px 20px 28px; transform: translateY(104%); }
  .panel-close { top: 10px; right: 12px; }
  .panel-media { aspect-ratio: 16 / 10; }
  .panel-meta { grid-template-columns: 1fr 1fr; }

  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 380px; }
  .ex-list li { grid-template-columns: 1fr auto; }
  .ex-date { grid-column: 1 / -1; }
}
