/* Questverse Editorial Astronomical Atlas
 * Atelier Paper & Nocturne Observatory themes set in the Allo variable typeface.
 * House style: flat colour fields, square editorial geometry, zero hairline borders
 * outside data-ui/tables, zero gradients, zero static shadows, zero glassmorphism.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: var(--qv-background);
  --surface: var(--qv-card);
  --surface-alt: var(--qv-secondary);
  --field-deep: #1a3a3a;
  --field-deep-ink: #fffaf0;
  --field-deep-soft: #c6d4d0;
  --ink: var(--qv-foreground);
  --ink-soft: var(--qv-muted-foreground);
  --accent: var(--qv-primary);
  --accent-ink: var(--qv-primary-foreground);
  --gold: var(--qv-gold);
  --emerald: var(--qv-success);
  --ui-border: var(--qv-border);
  --margin: clamp(20px, 2.4vw, 36px);
  --font-display: "Allo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Allo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --space-section: clamp(96px, 11vw, 180px);
}

:root[data-theme="dark"] {
  --bg: #141416;
  --surface: #1d1d22;
  --surface-alt: #25252c;
  --field-deep: #142b2b;
  --field-deep-ink: #fffaf0;
  --field-deep-soft: #b8cac5;
  --ink: #f4f4f5;
  --ink-soft: #b4b4bc;
  --accent: #ff4d8b;
  --accent-ink: #ffffff;
  --link-ink: #ff6ba0;
  --gold: #e8b94a;
  --emerald: #22c55e;
  --ui-border: #2e2e36;
}

:root[data-theme="atelier"] {
  --bg: #fffaf0;
  --surface: #f4ede0;
  --surface-alt: #eae1cf;
  --field-deep: #1a3a3a;
  --field-deep-ink: #fffaf0;
  --field-deep-soft: #c6d4d0;
  --ink: #000000;
  --ink-soft: #4a4a4a;
  --accent: #ff4d8b;
  --accent-ink: #ffffff;
  --link-ink: #a8154e;
  --gold: #d4a024;
  --emerald: #2f8f62;
  --ui-border: #d8d4c7;
}

html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  overflow-x: clip;
  transition: background-color 240ms var(--ease-out), color 240ms var(--ease-out);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 12px 18px;
  font-weight: 600;
  z-index: 999;
}

.skip-link:focus {
  left: var(--margin);
  top: var(--margin);
}

/* Shared Buttons (flat, square corners, one shape across the page) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 22px;
  border: 0;
  border-radius: 0;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out), color 160ms var(--ease-out), opacity 160ms var(--ease-out);
}

.btn:hover {
  opacity: 0.9;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-secondary {
  background: var(--surface-alt);
  color: var(--ink);
}

/* ============================================================
   1. HERO — Narrow talk, wide headline + Interactive 3D Orrery
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: minmax(280px, 31%) 1fr;
  gap: clamp(20px, 2.6vw, 40px);
  padding: clamp(18px, 2vw, 28px) var(--margin) 0;
  align-items: stretch;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: inline-block;
  align-self: flex-start;
}

.hero-talk {
  margin-top: clamp(24px, 4vh, 52px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-standfirst {
  margin: 0;
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.4;
  max-width: 28ch;
  color: var(--ink);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-right {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(18px, 2.6vw, 36px);
  align-items: center;
  min-height: 28px;
}

.site-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  transition: color 160ms var(--ease-out);
}

.site-nav a:hover {
  color: var(--link-ink);
}

.hero-headline-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin: clamp(16px, 2.4vh, 28px) 0 clamp(16px, 2.2vh, 24px);
}

.hero-headline {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(48px, 6.4vw, 96px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--ink);
}

/* Signature Motion: Masked line reveal */
.line-mask {
  display: block;
  overflow: hidden;
  padding: 0.04em 0 0.14em;
  margin-bottom: -0.14em;
}

.line-inner {
  display: block;
  transform: translateY(108%);
  opacity: 0;
  animation: maskRise 860ms var(--ease-out) forwards;
}

.line-mask:nth-child(2) .line-inner {
  animation-delay: 110ms;
}

@keyframes maskRise {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.orrery-stage {
  position: relative;
}

.hero-accent-callout {
  flex-shrink: 0;
  width: 240px;
  padding: 16px 20px;
  background: var(--field-deep);
  color: var(--field-deep-ink);
}

.callout-figure {
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.callout-caption {
  margin-top: 6px;
  font-size: 13px;
  color: var(--field-deep-soft);
}

.orrery-frame {
  background: var(--surface);
  overflow: hidden;
}

.orrery-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ctrl-btn {
  min-height: 36px;
  padding: 6px 12px;
  border: 0;
  border-radius: 0;
  background: var(--surface-alt);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), transform 140ms var(--ease-out);
}

.ctrl-btn:hover {
  background: var(--field-deep);
  color: var(--field-deep-ink);
}

.ctrl-btn:active {
  transform: scale(0.97);
}

.ctrl-btn.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

.orrery-viewport {
  position: relative;
  width: 100%;
  height: clamp(390px, 52vh, 520px);
  background: #0d1114;
  cursor: grab;
  user-select: none;
  touch-action: none;
  overflow: hidden;
}

:root[data-theme="atelier"] .orrery-viewport {
  background: #142b2b;
}

.orrery-viewport:active {
  cursor: grabbing;
}

.orrery-canvas,
.orrery-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.orrery-overlay {
  pointer-events: none;
}

.world-drawer {
  margin-top: auto;
  padding: 20px 22px;
  background: var(--surface);
  color: var(--ink);
}

.drawer-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.drawer-name {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
}

.drawer-meta {
  font-size: 13px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.drawer-summary {
  margin: 10px 0 12px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
}

.drawer-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 13px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}

.drawer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.drawer-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 600;
}

.drawer-link-secondary {
  background: var(--surface-alt);
  color: var(--ink);
}

.orrery-quickbar {
  display: flex;
  gap: 6px;
  padding: 12px 18px 16px;
  overflow-x: auto;
  background: var(--surface);
  scrollbar-width: thin;
}

.quick-world-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 12px;
  border: 0;
  border-radius: 0;
  background: var(--surface-alt);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}

.quick-world-btn:hover,
.quick-world-btn.is-active {
  background: var(--field-deep);
  color: var(--field-deep-ink);
}

.world-swatch {
  width: 9px;
  height: 9px;
  display: inline-block;
  flex-shrink: 0;
}

/* ============================================================
   2. SHOWCASE: Output index, live sheet — The Three Inner Worlds
   ============================================================ */
.section-worlds {
  display: grid;
  grid-template-columns: minmax(260px, 38%) 1fr;
  gap: clamp(28px, 4vw, 64px);
  padding: var(--space-section) var(--margin) 0;
  align-items: start;
}

.worlds-index {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 24px;
}

.world-buttons {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.world-index-btn {
  border: 0;
  background: transparent;
  padding: 6px 0;
  font-size: clamp(36px, 4.4vw, 68px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink-soft);
  cursor: pointer;
  text-align: left;
  transition: color 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.world-index-btn:hover {
  color: var(--ink);
  transform: translateX(6px);
}

.world-index-btn.is-active {
  color: var(--ink);
}

.worlds-note {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  max-width: 34ch;
  color: var(--ink);
}

.worlds-stage {
  background: var(--surface);
  padding: clamp(24px, 4vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

.world-sheet {
  background: var(--bg);
  color: var(--ink);
  padding: clamp(22px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: opacity 200ms var(--ease-out);
}

.sheet-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.sheet-name {
  font-size: clamp(28px, 2.8vw, 40px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
}

.sheet-version {
  font-size: 16px;
  font-weight: 600;
  color: var(--link-ink);
  font-variant-numeric: tabular-nums;
}

.sheet-tagline {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

.sheet-desc {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
}

.sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.sheet-table th,
.sheet-table td {
  text-align: left;
  padding: 10px 0;
  border-bottom: 1px solid var(--ui-border);
  vertical-align: top;
}

.sheet-table th {
  width: 34%;
  font-weight: 600;
  color: var(--ink-soft);
}

.sheet-table td {
  color: var(--ink);
}

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.worlds-plate {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.worlds-plate img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.worlds-plate figcaption {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* ============================================================
   3. FEATURES: Fixed output, live controls — Operate the Atlas
   ============================================================ */
.section-lab {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  padding-top: var(--space-section);
  align-items: start;
}

.lab-sticky-col {
  position: sticky;
  top: 0;
  min-height: 100svh;
  background: var(--field-deep);
  color: var(--field-deep-ink);
  padding: clamp(28px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lab-stage {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.lab-visual-frame {
  overflow: hidden;
  background: #0d1c1c;
}

.lab-visual-frame img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
}

.lab-stage:hover .lab-visual-frame img {
  transform: scale(1.03);
}

.lab-inspector {
  background: var(--bg);
  color: var(--ink);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.inspector-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.inspector-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}

.inspector-nodes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.node-chip {
  padding: 6px 12px;
  background: var(--surface-alt);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.inspector-quote {
  margin: 0;
  padding: 16px 18px;
  background: var(--surface);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inspector-quote p {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
}

.inspector-quote cite {
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.lab-controls-col {
  padding: 56px var(--margin) 96px 0;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: clamp(56px, 9vh, 108px);
}

.section-title {
  margin: 0;
  font-size: clamp(36px, 3.8vw, 54px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.lab-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lab-block h3 {
  margin: 0;
  font-size: clamp(24px, 2.2vw, 30px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.lab-block p {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 6px;
}

.seg-btn {
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 0;
  background: var(--surface-alt);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), transform 140ms var(--ease-out);
}

.seg-btn:hover {
  background: var(--field-deep);
  color: var(--field-deep-ink);
}

.seg-btn:active {
  transform: scale(0.97);
}

.seg-btn.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

.handoff-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
}

.field-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.field-input {
  min-height: 44px;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--ink);
  border: 0;
  border-radius: 0;
  font-size: 15px;
}

.slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  padding-top: 6px;
}

.slider-wrap input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  height: 28px;
  cursor: pointer;
}

/* ============================================================
   4. HOW IT WORKS: Stages as one bar + Shared Crates + Mosaic
   ============================================================ */
.section-stages {
  padding: var(--space-section) var(--margin) 0;
}

.stages-heading {
  margin: 0 0 48px;
  font-size: clamp(38px, 5.4vw, 84px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 16ch;
}

.stage-bar {
  display: flex;
  gap: 6px;
  min-height: clamp(160px, 21vh, 220px);
}

.stage-segment {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.stage-1 {
  background: var(--field-deep);
  color: var(--field-deep-ink);
}

.stage-2 {
  background: var(--accent);
  color: var(--accent-ink);
}

.stage-3 {
  background: var(--gold);
  color: #141416;
}

.stage-4 {
  background: var(--surface-alt);
  color: var(--ink);
}

.stage-duration {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stage-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.stage-clauses {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.stage-clauses p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}

.pillar-strip {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.pillar-block {
  background: var(--surface);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.pillar-name {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
}

.pillar-role {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}

.pillar-target {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.archival-mosaic {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.mosaic-cell {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.mosaic-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease-out);
}

.mosaic-cell:hover img {
  transform: scale(1.04);
}

.mosaic-tile {
  background: var(--field-deep);
  color: var(--field-deep-ink);
  padding: clamp(22px, 2.5vw, 36px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mosaic-tile-stat {
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.mosaic-tile-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--field-deep-ink);
}

/* ============================================================
   5. STATS: Figures inside a sentence — Live Monorepo Ephemeris
   ============================================================ */
.section-ephemeris {
  margin-top: var(--space-section);
  padding: clamp(88px, 12vw, 150px) var(--margin);
  background: var(--surface);
  display: flex;
  align-items: center;
}

.ephemeris-statement {
  margin: 0 auto;
  max-width: 1120px;
  font-size: clamp(28px, 3.6vw, 56px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--ink-soft);
}

.ephemeris-statement strong {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ============================================================
   6. LIST: Day tabs, banded agenda — Twelve Worlds Directory
   ============================================================ */
.section-directory {
  padding: var(--space-section) var(--margin) var(--space-section);
}

.directory-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}

.directory-title {
  margin: 0;
  font-size: clamp(32px, 3.8vw, 56px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
  display: flex;
  flex-direction: column;
}

.title-soft {
  color: var(--ink-soft);
}

.title-strong {
  color: var(--ink);
}

.directory-body {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 184px 1fr;
  gap: 32px;
  align-items: start;
}

.shell-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shell-tab {
  min-height: 62px;
  padding: 12px 16px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
}

.shell-tab:hover {
  background: var(--surface-alt);
}

.shell-tab.is-active {
  background: var(--field-deep);
  color: var(--field-deep-ink);
}

.shell-tab-name {
  font-size: 16px;
  font-weight: 700;
}

.shell-tab-count {
  font-size: 13px;
  opacity: 0.78;
  font-variant-numeric: tabular-nums;
}

.service-bands {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.service-band {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 78px;
  padding: 16px 22px;
  background: var(--surface);
}

.service-band:nth-child(even) {
  background: var(--surface-alt);
}

.band-orbit {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.band-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.band-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.band-desc {
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-soft);
}

.band-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.band-meta {
  font-size: 14px;
  color: var(--ink-soft);
  text-align: right;
}

.band-fly-btn {
  min-height: 36px;
  padding: 6px 12px;
  border: 0;
  border-radius: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.band-fly-btn:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

.band-open-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--link-ink);
  white-space: nowrap;
}

/* ============================================================
   7. FOOTER: Contact as the headline
   ============================================================ */
.site-footer {
  background: var(--field-deep);
  color: var(--field-deep-ink);
  min-height: 82svh;
  padding: clamp(32px, 4vw, 56px) var(--margin) clamp(28px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 56px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-notes {
  max-width: 52ch;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-notes p {
  margin: 0;
  font-size: 15px;
  color: var(--field-deep-soft);
}

.footer-wordmark {
  font-size: 18px;
  font-weight: 700;
  color: var(--field-deep-ink);
}

.footer-top-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--field-deep-ink);
}

.footer-display-link {
  display: inline-block;
  font-size: clamp(44px, 9.2vw, 148px);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.04em;
  color: var(--field-deep-ink);
  transition: color 180ms var(--ease-out);
}

.footer-display-link:hover {
  color: var(--gold);
}

.footer-bottom {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px 36px;
  align-items: end;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14px;
  font-weight: 600;
}

.credits {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--field-deep-soft);
}

.credits a {
  color: var(--field-deep-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-stamp {
  font-size: 14px;
  color: var(--field-deep-soft);
  white-space: nowrap;
}

/* Scroll Reveal (progressive: visible by default if JS fails) */
.js-ready .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 640ms var(--ease-out), transform 640ms var(--ease-out);
}

.js-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .line-inner,
  .js-ready .reveal {
    animation: none;
    transition: none;
    transform: none;
    opacity: 1;
  }
}

/* ============================================================
   TABLET & MOBILE COMPOSITIONS (<= 1024px, <= 720px)
   ============================================================ */
@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-left {
    min-height: auto;
    gap: 24px;
  }

  .hero-talk {
    margin-top: 0;
  }

  .hero-headline-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-worlds {
    grid-template-columns: 1fr;
  }

  .worlds-stage {
    grid-template-columns: 1fr;
  }

  .section-lab {
    grid-template-columns: 1fr;
  }

  .lab-sticky-col {
    position: relative;
    min-height: auto;
  }

  .lab-controls-col {
    padding: 40px var(--margin) 0;
    max-width: none;
  }

  .pillar-strip {
    grid-template-columns: 1fr;
  }

  .archival-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directory-body {
    grid-template-columns: 1fr;
  }

  .shell-tabs {
    flex-direction: row;
    overflow-x: auto;
  }

  .shell-tab {
    min-width: 136px;
    flex-shrink: 0;
  }

  .footer-bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hero-headline {
    font-size: clamp(44px, 13.5vw, 64px);
    line-height: 0.9;
  }

  .orrery-viewport {
    height: 440px;
  }

  .world-drawer {
    position: static;
    width: 100%;
  }

  .world-buttons {
    flex-direction: row;
    overflow-x: auto;
    width: 100%;
    gap: 20px;
  }

  .world-index-btn {
    font-size: 28px;
  }

  .stage-bar {
    flex-direction: column;
    min-height: auto;
  }

  .stage-segment {
    min-height: 92px;
  }

  .stage-clauses {
    grid-template-columns: 1fr;
  }

  .pillar-strip {
    grid-template-columns: 1fr;
  }

  .archival-mosaic {
    grid-template-columns: 1fr;
  }

  .service-band {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .band-actions {
    justify-content: space-between;
  }

  .footer-display-link {
    font-size: clamp(36px, 11.8vw, 62px);
  }
}
