/* ============================================================
   THE VITRUVIAN LENS — Design System & Styles
   ============================================================ */

/* ------- Reset & Fonts ------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Inter:wght@300;400;500&family=JetBrains+Mono:wght@300;400&display=swap');

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

body {
  overflow-x: hidden;
}

:root {
  /* Palette */
  --parchment: #f5f0e8;
  --parchment-dark: #e8dfd2;
  --ink-sepia: #5c4a3a;
  --ink-dark: #2a1f14;
  --gold: #c9a96e;
  --gold-light: #e8d5a8;
  --cyan: #00d4ff;
  --cyan-muted: rgba(0, 212, 255, 0.5);
  --clinical-blue: #e8f0f8;
  --clinical-grid: #c0d8e8;
  --red-error: #ff4444;
  --signal-white: #ffffff;
  --signal-black: #050a14;
  --gray-50: #fafafa;
  --gray-100: #f0f0f0;
  --gray-200: #e0e0e0;
  --gray-300: #c0c0c0;
  --gray-400: #909090;
  --gray-500: #606060;
  --gray-600: #404040;
  --gray-700: #2a2a2a;
  --gray-800: #1a1a1a;
  --gray-900: #0f0f0f;

  /* Typography scale */
  --font-serif: 'Cormorant Garamond', 'Georgia', serif;
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --text-xs: clamp(0.65rem, 1.5vw, 0.75rem);
  --text-sm: clamp(0.8rem, 2vw, 0.9rem);
  --text-base: clamp(0.95rem, 2.5vw, 1.1rem);
  --text-lg: clamp(1.1rem, 3vw, 1.35rem);
  --text-xl: clamp(1.4rem, 4vw, 1.8rem);
  --text-2xl: clamp(1.8rem, 5vw, 2.5rem);
  --text-3xl: clamp(2.2rem, 6vw, 3.5rem);
  --text-display: clamp(2.8rem, 8vw, 5rem);

  /* Spacing */
  --space-xs: clamp(0.5rem, 1vw, 0.75rem);
  --space-sm: clamp(0.75rem, 2vw, 1rem);
  --space-md: clamp(1rem, 3vw, 1.5rem);
  --space-lg: clamp(1.5rem, 4vw, 2.5rem);
  --space-xl: clamp(2rem, 6vw, 4rem);
  --space-2xl: clamp(3rem, 8vw, 6rem);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-slow: 1.2s;
  --duration-medium: 0.6s;
  --duration-fast: 0.3s;
}

html {
  /* scroll-behavior handled by JS for dot clicks only */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-serif);
  background: var(--signal-black);
  color: var(--signal-white);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ------- Atmospheric Gradient Layer ------- */
.atmo-gradient {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  transition: background-color 2s ease;
}

/* ------- Prologue Breathing ------- */
.era-prologue {
  background: linear-gradient(180deg, #050a14 0%, #0a1628 50%, #050a14 100%);
  position: relative;
  color: var(--signal-white);
  min-height: 100vh;
  overflow: hidden;
}

#heroSphereCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.era-prologue .text-line.visible {
  animation: cosmic-breathe 6s ease-in-out infinite;
}

@keyframes cosmic-breathe {

  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.9;
  }

  50% {
    transform: translateY(-2px) scale(1.005);
    opacity: 1;
  }
}

/* ------- Scrollytelling Layout ------- */

.era {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: clip;
  /* overflow-x only — full 'overflow: clip/hidden' breaks position:sticky
     on mobile browsers (especially iOS Safari). Vertical must stay visible
     so the assembly canvas can stick during scroll. */
  transition: background-color 1s var(--ease-in-out);
  content-visibility: auto;
  contain-intrinsic-size: 100vh;
}

.era__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.era__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  padding: var(--space-lg) var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.era__spacer {
  height: 50vh;
}

/* ------- Progress Bar ------- */

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--cyan));
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
  z-index: 1000;
  transform-origin: left;
  transform: scaleX(0);
  will-change: transform;
}

/* ------- Era Indicator ------- */

.era-nav {
  position: fixed;
  left: var(--space-sm);
  bottom: var(--space-lg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.6s;
  background: rgba(5, 10, 20, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
}

.era-nav.visible {
  opacity: 1;
}

/* Timeline thread connecting dots */
.era-nav__thread {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 4px;
  width: 1px;
  background: linear-gradient(to bottom,
      var(--gold) 0%,
      var(--gold-light) 25%,
      rgba(255, 255, 255, 0.4) 45%,
      rgba(200, 210, 220, 0.3) 60%,
      rgba(0, 212, 255, 0.2) 75%,
      var(--cyan) 100%);
  opacity: 0.4;
  z-index: -1;
  animation: thread-pulse 4s ease-in-out infinite;
}

@keyframes thread-pulse {

  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.6;
  }
}

/* Each nav item = label + dot in a row */
.era-nav__item {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px 0;
  position: relative;
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  transition: opacity 0.3s;
}

.era-nav__item:hover {
  opacity: 1;
}

/* The label text */
.era-nav__label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  white-space: nowrap;
  transition: color 0.4s, opacity 0.4s;
  text-align: right;
}

.era-nav__item:hover .era-nav__label {
  color: rgba(255, 255, 255, 0.5);
}

.era-nav__item.active .era-nav__label {
  color: rgba(255, 255, 255, 0.7);
}

/* The dot circle */
.era-nav__dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  transition: all 0.4s var(--ease-out);
  flex-shrink: 0;
}

.era-nav__item:hover .era-nav__dot {
  transform: scale(1.4);
}

.era-nav__item.active .era-nav__dot {
  transform: scale(1.2);
  animation: dot-breathe 3s ease-in-out infinite;
}

@keyframes dot-breathe {

  0%,
  100% {
    transform: scale(1.2);
  }

  50% {
    transform: scale(1.4);
  }
}

/* Color-coded items — warm */
.era-nav__item--warm .era-nav__dot {
  border-color: var(--gold);
}

.era-nav__item--warm:hover .era-nav__dot,
.era-nav__item--warm.active .era-nav__dot {
  background: var(--gold);
  border-color: var(--gold);
}

.era-nav__item--warm.active .era-nav__label {
  color: var(--gold);
}

/* neutral */
.era-nav__item--neutral .era-nav__dot {
  border-color: rgba(200, 180, 140, 0.6);
}

.era-nav__item--neutral:hover .era-nav__dot,
.era-nav__item--neutral.active .era-nav__dot {
  background: rgba(200, 180, 140, 0.8);
  border-color: rgba(200, 180, 140, 0.8);
}

.era-nav__item--neutral.active .era-nav__label {
  color: rgba(200, 180, 140, 0.8);
}

/* cool */
.era-nav__item--cool .era-nav__dot {
  border-color: rgba(180, 195, 210, 0.5);
}

.era-nav__item--cool:hover .era-nav__dot,
.era-nav__item--cool.active .era-nav__dot {
  background: rgba(180, 195, 210, 0.7);
  border-color: rgba(180, 195, 210, 0.7);
}

.era-nav__item--cool.active .era-nav__label {
  color: rgba(180, 195, 210, 0.8);
}

/* void — smaller dot, no label */
.era-nav__item--void .era-nav__dot {
  border-color: rgba(255, 255, 255, 0.15);
  width: 5px;
  height: 5px;
  min-width: 5px;
  min-height: 5px;
}

.era-nav__item--void:hover .era-nav__dot,
.era-nav__item--void.active .era-nav__dot {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.5);
}

/* signal */
.era-nav__item--signal .era-nav__dot {
  border-color: var(--cyan-muted);
}

.era-nav__item--signal:hover .era-nav__dot,
.era-nav__item--signal.active .era-nav__dot {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
}

.era-nav__item--signal.active .era-nav__label {
  color: var(--cyan);
}

/* ------- Text Styles ------- */

.text-line {
  opacity: 0;
  transform: translateY(30px);
  font-size: var(--text-xl);
  font-weight: 300;
  line-height: 1.8;
  letter-spacing: 0.01em;
  margin-bottom: var(--space-sm);
}

.text-line.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.text-line--small {
  font-size: var(--text-base);
  opacity: 0.7;
  font-style: italic;
}

.text-line--emphasis {
  font-weight: 500;
  font-style: italic;
}

.text-line--sans {
  font-family: var(--font-sans);
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* ------- Era Title ------- */

.era__title {
  font-family: var(--font-serif);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0;
  margin-bottom: var(--space-xs);
  color: inherit;
}

.era__title.visible {
  opacity: 0.5;
  transition: opacity 1s var(--ease-out);
}

/* --- Heading Text Reveal (word-by-word) --- */
.era__title.title-reveal {
  opacity: 0.5;
  /* Let individual words handle visibility */
}

.era__title.title-reveal .title-reveal__word {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.era__title.title-revealed .title-reveal__word {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .era__title.title-reveal .title-reveal__word {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.era__subtitle {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 300;
  letter-spacing: 0.15em;
  opacity: 0;
  margin-bottom: var(--space-xl);
}

.era__subtitle.visible {
  opacity: 0.35;
  transition: opacity 1s var(--ease-out) 0.2s;
}

/* ============================================================
   ERA-SPECIFIC STYLES
   ============================================================ */

/* ------- PROLOGUE ------- */

.era-prologue {
  background: linear-gradient(180deg, #050a14 0%, #0a1628 50%, #050a14 100%);
  min-height: 100vh;
}

.era-prologue .text-line {
  font-size: var(--text-2xl);
  color: rgba(255, 255, 255, 0.8);
}

/* Grain Canvas Overlay (Enhanced) */
.grain-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.06;
  mix-blend-mode: overlay;
}

/* SVG Grain Layer (second layer for richer texture) */
.grain-overlay-svg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: 0.5;
}

/* Prologue Hero */
.prologue-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 2rem;
  position: relative;
  z-index: 2;
}

.prologue-artwork-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 1rem;
}

.prologue-byline {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 0.5rem;
}

/* Small Caption */
.prologue-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  opacity: 0;
  transform: translateY(15px);
}

.prologue-caption.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out);
}

.prologue-caption__title {
  font-family: var(--font-sans);
  font-size: clamp(0.6rem, 1.5vw, 0.85rem);
  font-weight: 300;
  letter-spacing: 0.35em;
  color: rgba(255, 255, 255, 0.45);
}

.prologue-caption__sub {
  font-family: var(--font-sans);
  font-size: clamp(0.55rem, 1.2vw, 0.75rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

/* Hero Question */
.prologue-question {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 8vw, 6.5rem);
  font-weight: 300;
  line-height: 1.15;
  text-align: center;
  color: #fff;
  margin: 0;
  opacity: 0;
  transform: translateY(30px);
}

.prologue-question.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 1.8s var(--ease-out) 0.3s, transform 1.8s var(--ease-out) 0.3s;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Word separator gap */
.prologue-title__main .letter-space {
  display: inline-block;
  width: 0.3em;
}

/* ------- Flip Cards (The Struggle) ------- */

.flip-card {
  perspective: 1000px;
  cursor: pointer;
  width: 100%;
  max-width: 320px;
}

.flip-card__inner {
  position: relative;
  width: 100%;
  aspect-ratio: 300 / 420;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card__inner {
  transform: rotateY(180deg);
}

.flip-card__front,
.flip-card__back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flip-card__front {
  justify-content: flex-start;
}

.flip-card__front .struggle-card__img {
  width: 100%;
  flex: 1;
}

.flip-card__back {
  transform: rotateY(180deg);
  justify-content: center;
  background: rgba(92, 74, 58, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.flip-card__back img {
  width: 100%;
  height: 80%;
  object-fit: contain;
  border-radius: 4px;
}

.flip-card__label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-align: center;
  opacity: 0.6;
  margin-top: 0.75rem;
  color: var(--ink-sepia);
}

.flip-card__hint {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0.3;
  margin-top: 0.5rem;
  color: var(--ink-sepia);
  transition: opacity 0.3s;
}

.flip-card:hover .flip-card__hint {
  opacity: 0.6;
}

/* ------- ERA 1: THE WORD ------- */

.era-word {
  background: var(--parchment);
  color: var(--ink-dark);
}

.era-word .era__title,
.era-word .era__subtitle {
  color: var(--ink-sepia);
}

.latin-block {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-style: italic;
  color: var(--ink-sepia);
  opacity: 0.6;
  max-width: 600px;
  margin: var(--space-lg) auto;
  line-height: 2;
  cursor: pointer;
  position: relative;
  padding: var(--space-md);
  border: 1px solid rgba(92, 74, 58, 0.15);
  border-radius: 2px;
  transition: opacity 0.4s;
}

.latin-block:hover {
  opacity: 0.8;
}

.latin-block__tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--ink-dark);
  color: var(--parchment);
  padding: var(--space-sm) var(--space-md);
  border-radius: 4px;
  font-style: normal;
  font-size: var(--text-sm);
  max-width: 400px;
  width: max-content;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s var(--ease-out);
  z-index: 10;
  line-height: 1.6;
}

.latin-block__tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--ink-dark);
}

.latin-block.show-tooltip .latin-block__tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.latin-hint {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  opacity: 0.4;
  margin-top: var(--space-xs);
  font-style: normal;
  letter-spacing: 0.1em;
}

.vitruvian-ghost {
  position: relative;
  width: clamp(200px, 50vw, 350px);
  height: clamp(200px, 50vw, 350px);
  margin: var(--space-xl) auto;
}

.vitruvian-ghost__svg {
  width: 100%;
  height: 100%;
}

/* --- Line-draw: initial hidden state (GSAP scroll-scrub handles the draw) --- */
.vitruvian-ghost__circle {
  stroke-dasharray: 880;
  /* ≈ 2π × 140 */
  stroke-dashoffset: 880;
}

.vitruvian-ghost__square {
  stroke-dasharray: 792;
  /* 4 × 198 */
  stroke-dashoffset: 792;
}

/* Reduced motion: show immediately */
@media (prefers-reduced-motion: reduce) {

  .vitruvian-ghost__circle,
  .vitruvian-ghost__square {
    stroke-dashoffset: 0;
  }
}

/* ------- ERA 2: THE STRUGGLE ------- */

.era-struggle {
  background: var(--parchment-dark);
  color: var(--ink-dark);
}

.struggle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  width: 100%;
  max-width: 700px;
  margin: var(--space-lg) auto;
}

@media (max-width: 600px) {
  .struggle-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
  }
}

.struggle-card {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(40px);
}

.struggle-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.8s var(--ease-out);
}

.struggle-card__img {
  width: 100%;
  height: auto;
  display: block;
  filter: sepia(0.3) contrast(0.9);
}

.struggle-card__overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s var(--ease-out);
  pointer-events: none;
}

.struggle-card__overlay.visible {
  opacity: 1;
}

.struggle-card__overlay svg {
  width: 100%;
  height: 100%;
}

.struggle-card__label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-align: center;
  margin-top: var(--space-xs);
  opacity: 0.5;
}

.struggle-verdict {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: var(--red-error);
  opacity: 0;
  margin-top: var(--space-sm);
  font-style: italic;
}

.struggle-verdict.visible {
  opacity: 0.8;
  transition: opacity 0.6s 0.4s;
}

/* ------- ERA 3: THE SOLUTION ------- */

.era-solution {
  background: var(--parchment);
  color: var(--ink-dark);
}

.solution-figure {
  position: relative;
  width: clamp(260px, 70vw, 500px);
  margin: var(--space-lg) auto;
}

.solution-figure__img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}

.solution-figure__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}

.solution-figure__overlay.visible {
  opacity: 1;
}

/* Da Vinci Dual Views */
.dual-views {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin: var(--space-lg) auto;
  max-width: 500px;
}

.dual-view {
  flex: 1;
  text-align: center;
}

.dual-view__svg {
  width: 100%;
  max-width: 180px;
  height: auto;
  opacity: 0.85;
}

.dual-view__caption {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: rgba(200, 180, 140, 0.6);
  margin-top: var(--space-xs);
  line-height: 1.5;
  font-style: italic;
}

.geometry-toggles {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.toggle-btn {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: 1px solid rgba(92, 74, 58, 0.3);
  background: transparent;
  color: var(--ink-sepia);
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.3s;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-btn:hover,
.toggle-btn.active {
  background: var(--ink-dark);
  color: var(--parchment);
  border-color: var(--ink-dark);
}

.geometry-legend {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  margin-top: var(--space-sm);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  opacity: 0;
  transition: opacity 0.4s;
  flex-wrap: wrap;
}

.geometry-legend.visible {
  opacity: 0.6;
}

.geometry-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.geometry-legend__swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.geometry-legend__swatch--circle {
  background: var(--cyan);
}

.geometry-legend__swatch--square {
  background: var(--gold);
}

/* ------- ERA 4: THE CAGE (Le Corbusier) ------- */

.era-cage {
  background: var(--clinical-blue);
  color: var(--gray-700);
  font-family: var(--font-sans);
}

.era-cage .text-line {
  font-family: var(--font-sans);
}

.era-cage .era__title {
  color: var(--gray-500);
}

/* ------- THE CRACK ------- */

.era-crack {
  background:
    linear-gradient(to bottom, rgba(106, 122, 138, 0.85), rgba(42, 42, 58, 0.92)),
    url('../img/jama-vitruvian-study.png') center/cover no-repeat;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-sans);
}

.era-crack .era__title {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--text-xl);
  font-weight: 300;
  font-style: italic;
}

.era-crack .text-line {
  font-family: var(--font-sans);
  font-weight: 300;
}

.era-crack .bridge-block .text-line {
  font-size: var(--text-sm);
  line-height: 2;
  opacity: 0.75;
  font-style: italic;
}

.era-crack .bridge-block .text-line--emphasis {
  font-size: var(--text-base);
  opacity: 0.9;
  color: rgba(0, 212, 255, 0.8);
}

.era-crack .bridge-block {
  border-left-color: rgba(0, 212, 255, 0.2);
}

/* Signal Definition Tooltip */
.signal-tooltip-trigger {
  position: relative;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: help;
}

.signal-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  padding: 12px 16px;
  background: rgba(8, 12, 20, 0.95);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  z-index: 100;
  pointer-events: none;
}

.signal-tooltip-trigger:hover .signal-tooltip,
.signal-tooltip-trigger:focus .signal-tooltip {
  display: block;
}

/* Nussbaum Panel */
.toggle-btn--crack {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.5);
}

.toggle-btn--crack:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.8);
}

.nussbaum-panel {
  max-width: 600px;
  margin: var(--space-md) auto;
  padding: var(--space-md) var(--space-lg);
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid rgba(0, 212, 255, 0.3);
  border-radius: 0 8px 8px 0;
  animation: fadeSlideIn 0.5s var(--ease-out);
}

.nussbaum-panel__text {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-style: italic;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.nussbaum-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.nussbaum-step {
  text-align: center;
  padding: var(--space-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.nussbaum-step__who {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(0, 212, 255, 0.7);
  margin-bottom: 0.5rem;
}

.nussbaum-step__what {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.nussbaum-step__what strong {
  color: var(--cyan);
}

.nussbaum-step__label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.nussbaum-panel__note {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  font-style: italic;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.nussbaum-panel__note em {
  color: rgba(0, 212, 255, 0.6);
  font-style: italic;
}

@media (max-width: 600px) {
  .nussbaum-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Modulor Display (image + diagram) --- */

.modulor-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  margin: var(--space-lg) auto;
  max-width: 700px;
  opacity: 0;
  transform: translateY(20px);
}

.modulor-display.visible {
  opacity: 1;
  transform: translateY(0);
  transition: all 1.2s var(--ease-out);
}

.modulor-display__image {
  flex: 0 0 40%;
  max-width: 250px;
}

.modulor-display__image img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  opacity: 0.85;
  filter: contrast(1.05);
}

.modulor-display__diagram {
  flex: 0 0 50%;
  max-width: 280px;
}

.modulor-figure__svg {
  width: 100%;
  height: auto;
}

/* Proportions overlay — hidden by default, toggled via JS */
.modulor-proportions-overlay {
  transition: opacity 0.6s var(--ease-out);
}

.modulor-proportions-overlay.visible {
  opacity: 1 !important;
}

/* --- Le Corbusier Quote Panel --- */

.corbusier-panel {
  max-width: 600px;
  margin: var(--space-md) auto;
  padding: var(--space-md) var(--space-lg);
  background: rgba(42, 42, 42, 0.04);
  border-left: 3px solid rgba(180, 150, 50, 0.4);
  border-radius: 0 8px 8px 0;
  animation: fadeSlideIn 0.5s var(--ease-out);
}

.corbusier-panel__quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-sm);
  line-height: 1.8;
  color: var(--gray-600);
  margin-bottom: var(--space-sm);
}

.corbusier-panel__source {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--gray-400);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-sm);
}

.corbusier-panel__note {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--gray-500);
  line-height: 1.7;
}

.corbusier-panel__diagram {
  margin-top: var(--space-lg);
  text-align: center;
}

.corbusier-panel__diagram img {
  max-width: 100%;
  height: auto;
  filter: invert(0.85) hue-rotate(180deg);
  opacity: 0.8;
  border-radius: 6px;
}

.corbusier-panel__diagram-caption {
  font-family: var(--font-sans);
  font-size: 0.75em;
  color: var(--gray-600);
  margin-top: var(--space-xs);
  opacity: 0.6;
}

.corbusier-panel__diagram-caption a {
  color: var(--gray-500);
  text-decoration: underline;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

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

/* --- Dark toggle buttons (for Era 5) --- */

.toggle-btn--dark {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.5);
}

.toggle-btn--dark:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.8);
}

.toggle-btn--dark.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.5);
  color: rgba(255, 255, 255, 0.9);
}

/* --- Signal Panel (Era 5 expandable panels) --- */

.signal-panel {
  max-width: 600px;
  margin: var(--space-md) auto;
  padding: var(--space-md) var(--space-lg);
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid rgba(100, 149, 237, 0.3);
  border-radius: 0 8px 8px 0;
  animation: fadeSlideIn 0.5s var(--ease-out);
}

@media (min-width: 768px) {
  .signal-panel {
    max-width: 750px;
  }
}

.signal-panel__title {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(0, 212, 255, 0.7);
  margin-bottom: var(--space-sm);
}

.signal-panel__text {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: var(--space-sm);
}

.signal-panel__link {
  margin-top: var(--space-sm);
}

.signal-panel__link a {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: rgba(0, 212, 255, 0.7);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.3s;
}

.signal-panel__link a:hover {
  color: rgba(0, 212, 255, 1);
}

/* --- Responsive: stack on mobile --- */
@media (max-width: 600px) {
  .modulor-display {
    flex-direction: column;
    gap: var(--space-md);
  }

  .modulor-display__image,
  .modulor-display__diagram {
    flex: 0 0 auto;
    max-width: 220px;
  }
}

/* --- Square → Pixel Dissolve Transition --- */

.dissolve-transition {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-xl) 0;
  opacity: 0;
  transform: translateY(20px);
}

.dissolve-transition.visible {
  opacity: 1;
  transform: translateY(0);
  transition: all 1.2s var(--ease-out);
}

.dissolve-svg {
  width: clamp(120px, 30vw, 200px);
  height: auto;
}

.dissolve-transition.visible .pixel {
  animation: pixelFloat 3s var(--ease-out) calc(var(--delay) * 1s) infinite;
}

@keyframes pixelFloat {
  0% {
    opacity: 1;
    transform: translate(0, 0);
  }

  100% {
    opacity: 0;
    transform: translate(calc(var(--drift) * 1px), -30px);
  }
}

.dissolve-caption {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--gray-400);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: var(--space-md);
}

/* ------- ERA 5: THE SIGNAL ------- */

.era-signal {
  background: var(--signal-black);
  color: var(--signal-white);
  font-family: var(--font-sans);
}

.era-signal .text-line {
  font-family: var(--font-sans);
  font-weight: 300;
}

/* --- Three.js Sphere Container --- */

.sphere-container {
  position: relative;
  width: clamp(260px, 50vw, 400px);
  height: clamp(260px, 50vw, 400px);
  margin: var(--space-lg) auto;
  opacity: 0;
  transform: translateY(30px);
}

.sphere-container.visible {
  opacity: 1;
  transform: translateY(0);
  transition: all 1.2s var(--ease-out);
}

#sphereCanvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.sphere-labels {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.sphere-label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.35;
}

.sphere-label--top {
  color: rgba(255, 255, 255, 0.6);
}

.sphere-label--bottom {
  color: rgba(255, 255, 255, 0.35);
}

/* --- 16-Tile Grid (Chiastic Fold) --- */

.tiles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  width: clamp(260px, 65vw, 420px);
  margin: var(--space-lg) auto;
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s var(--ease-out);
}

.tiles-grid.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Concentric Circle Visualizations */
.concentric-pair {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  align-items: flex-start;
  margin: var(--space-lg) auto;
  max-width: 700px;
  flex-wrap: wrap;
}

.concentric-view {
  flex: 1;
  min-width: 240px;
  max-width: 300px;
  text-align: center;
}

.concentric-view__title {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.2rem;
}

.concentric-view__subtitle {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  letter-spacing: 0.15em;
  color: rgba(0, 212, 255, 0.7);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
}

.concentric-svg {
  width: 100%;
  height: auto;
  cursor: pointer;
}

.concentric-svg .ring {
  transition: opacity 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

.concentric-svg .ring:hover {
  opacity: 0.85;
  stroke: rgba(0, 212, 255, 0.8);
  stroke-width: 2;
}

.concentric-view__caption {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
  margin-top: var(--space-sm);
  line-height: 1.6;
}

.concentric-view__caption em {
  color: rgba(0, 212, 255, 0.5);
}

.chiasm-sphere-wrap {
  width: 100%;
  aspect-ratio: 1;
  max-width: 300px;
  margin: 0 auto;
  position: relative;
}

.chiasm-sphere-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  border-radius: 50%;
}

.ring-tooltip {
  position: fixed;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(0, 212, 255, 0.4);
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 6px 12px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.ring-tooltip.visible {
  opacity: 1;
}

/* ===== ENHANCED ERA 5 STYLES ===== */

.philosophy-shift {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  margin: 6vh 0;
  flex-wrap: wrap;
}

.shift-panel {
  flex: 1;
  min-width: 280px;
  max-width: 350px;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  text-align: center;
}

.shift-panel--old {
  border-color: rgba(201, 169, 110, 0.3);
}

.shift-panel--new {
  border-color: rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.03);
}

.shift-label {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
}

/* ============================================================
   THE VOID — Transition between Matter and Signal
   ============================================================ */

.era-transition {
  background-color: #000;
  color: #fff;
  position: relative;
  z-index: 10;
}

.transition-scroll-container {
  position: relative;
  width: 100%;
}

.transition-canvas-wrap {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 1;
}

#explosionCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

.transition-waypoint {
  height: 100vh;
  position: relative;
  pointer-events: none;
}

/* Glitch Text Effect */
.glitch-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.glitch-text {
  font-family: "Courier New", monospace;
  font-size: clamp(2rem, 5vw, 5rem);
  font-weight: bold;
  position: relative;
  color: #fff;
  letter-spacing: -0.05em;
  animation: glitch-skew 3s infinite linear alternate-reverse;
}

/* Glitch pseudo-elements removed — clean text only */
.glitch-text::before,
.glitch-text::after {
  display: none;
}

.glitch-text-sub {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 2vw, 1.5rem);
  letter-spacing: 0.5em;
  opacity: 0;
  margin-top: 2rem;
  color: var(--accent-cyan, #00D4FF);
}

/* CRT Scanlines */
.scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom,
      rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 50%,
      rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.2));
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 1;
}

/* Static Noise */
.noise {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.1'/%3E%3C/svg%3E");
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   TRIPTYCH — Three mini particle scenes side by side
   ============================================================ */

.triptych-section {
  background: #000;
  padding: 4rem 2rem 6rem;
  position: relative;
  z-index: 10;
}

.triptych-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.triptych-card {
  flex: 1;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.triptych-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
}

.triptych-canvas-wrap canvas {
  display: block;
}

.vitruvian-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.triptych-label {
  margin-top: 1.2rem;
  font-family: var(--font-sans);
  font-size: clamp(0.75rem, 1.2vw, 0.95rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.triptych-title {
  text-align: center;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 2vw, 1.6rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 0.4rem;
}

.triptych-subtitle {
  text-align: center;
  font-family: var(--font-sans);
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin: 0 0 0.5rem;
}

.triptych-attribution {
  text-align: center;
  font-family: var(--font-serif);
  font-size: clamp(0.7rem, 0.9vw, 0.85rem);
  font-style: italic;
  color: rgba(255, 255, 255, 0.25);
  margin: 0 0 3rem;
}

.triptych-caption {
  margin-top: 0.5rem;
  font-family: var(--font-sans);
  font-size: clamp(0.65rem, 0.9vw, 0.8rem);
  font-style: italic;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  letter-spacing: 0.02em;
}

/* Responsive: stack on small screens */
@media (max-width: 768px) {
  .triptych-row {
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
  }

  .triptych-card {
    max-width: 280px;
  }
}

/* ── TRIPTYCH FLOW — animated particle stream ──────── */
.triptych-flow-section {
  padding: 0 var(--space-lg) var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto;
}

.triptych-flow-wrap {
  width: 100%;
  aspect-ratio: 2;
  max-height: 70vh;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.triptych-flow-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.triptych-flow-caption {
  text-align: center;
  font-size: 0.95rem;
  color: var(--cyan);
  margin-top: var(--space-md);
  letter-spacing: 0.04em;
  opacity: 0.7;
}

/* Desktop: make the triptych animation much larger */
@media (min-width: 900px) {
  .triptych-flow-section {
    max-width: none;
    width: 90vw;
    margin-left: calc(50% - 45vw);
    margin-right: calc(50% - 45vw);
  }

  .triptych-flow-wrap {
    aspect-ratio: 4 / 3;
    max-height: 85vh;
  }
}

/* Glitch Clip Animations */
@keyframes glitch-skew {
  0% {
    transform: skew(0deg);
  }

  20% {
    transform: skew(-2deg);
  }

  40% {
    transform: skew(1deg);
  }

  60% {
    transform: skew(-1deg);
  }

  80% {
    transform: skew(2deg);
  }

  100% {
    transform: skew(0deg);
  }
}




.shift-premise {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  line-height: 1.5;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.shift-premise em {
  color: var(--cyan);
  font-style: normal;
  font-weight: 600;
}

.shift-panel--old .shift-premise em {
  color: var(--gold);
}

.shift-visual {
  margin-top: 1.5rem;
}

.shift-icon {
  width: 100%;
  max-width: 200px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.shift-arrow {
  font-size: 3rem;
  color: var(--cyan);
  opacity: 0.6;
  animation: pulse-arrow 2s ease-in-out infinite;
}

@keyframes pulse-arrow {

  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* Demonstration section */
.demonstration-title {
  text-align: center;
  margin-bottom: 3vh;
}

.demonstration-title h3 {
  font-family: var(--font-sans);
  font-size: var(--text-2xl);
  color: var(--cyan);
  margin-bottom: 1rem;
  font-weight: 600;
}

.demonstration-title p {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.6);
}

.squares-to-sphere-container {
  width: 100%;
  max-width: 800px;
  margin: 4vh auto;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

#transformCanvas {
  width: 100%;
  height: 500px;
  display: block;
  margin-bottom: 2rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.transform-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.transform-btn {
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all 0.3s var(--ease-out);
}

.transform-btn:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--cyan);
  color: var(--cyan);
}

.transform-btn.active {
  background: rgba(0, 212, 255, 0.2);
  border-color: var(--cyan);
  color: var(--cyan);
}

.transform-explanation {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.8;
}

.transform-explanation p {
  margin-bottom: 0.5rem;
}

.transform-explanation strong {
  color: var(--cyan);
}

/* Responsive */
@media (max-width: 768px) {
  .philosophy-shift {
    flex-direction: column;
    gap: 2rem;
  }

  .shift-arrow {
    transform: rotate(90deg);
    font-size: 2rem;
  }

  #transformCanvas {
    height: 400px;
  }
}

.tile {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.4s var(--ease-out);
  overflow: hidden;
}

/* Depth-based tile colors: white(0) → black(6) */
.tile--depth-0 {
  background: #ffffff;
  color: #0a0a0a;
}

.tile--depth-1 {
  background: #e8e8e5;
  color: #0a0a0a;
}

.tile--depth-2 {
  background: #c8c8c2;
  color: #0a0a0a;
}

.tile--depth-3 {
  background: #9a9a95;
  color: #0a0a0a;
}

.tile--depth-4 {
  background: #666660;
  color: #ffffff;
}

.tile--depth-5 {
  background: #3a3a38;
  color: #ffffff;
}

.tile--depth-6 {
  background: #0a0a0a;
  color: #ffffff;
}

.tile__label {
  font-family: var(--font-sans);
  font-size: clamp(0.45rem, 1.5vw, 0.6rem);
  letter-spacing: 0.08em;
  opacity: 0;
  text-align: center;
  padding: 4px;
  line-height: 1.3;
  transition: opacity 0.3s;
  color: inherit;
}

.tile__letter {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 400;
  opacity: 0.4;
  position: absolute;
  transition: opacity 0.3s;
  color: inherit;
}

.tile:hover .tile__label,
.tile.active .tile__label {
  opacity: 0.9;
}

.tile:hover .tile__letter,
.tile.active .tile__letter {
  opacity: 0;
}

.tile:hover {
  transform: scale(1.05);
  z-index: 2;
}

@media (max-width: 600px) {
  .sphere-container {
    width: clamp(220px, 70vw, 320px);
    height: clamp(220px, 70vw, 320px);
  }
}

/* ── Signal Definition Block (Philosophical Climax) ── */
.signal-definition-block {
  max-width: 550px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  border-left: 2px solid rgba(0, 212, 255, 0.4);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.signal-definition-block.revealed {
  opacity: 1;
  transform: translateY(0);
}

.signal-definition-block__label {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.7em;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0, 212, 255, 0.6);
  margin-bottom: var(--space-md);
}

.signal-definition-block__body {
  font-family: var(--font-serif, Georgia, serif);
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--gray-400);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.signal-definition-block__body:last-child {
  margin-bottom: 0;
}

.signal-definition-block__body em {
  color: #fff;
  font-style: italic;
}

.signal-definition-block__body--accent {
  color: rgba(0, 212, 255, 0.85);
  font-style: normal;
  font-weight: 400;
}

/* ── Witness Card Parallax (3D tilt on hover) ── */
.witness-card {
  transition: transform 0.15s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
}

.closing-block {
  margin-top: var(--space-2xl);
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
}

.closing-block.visible {
  opacity: 1;
  transform: translateY(0);
  transition: all 1.2s var(--ease-out);
}

.closing-text {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-style: italic;
  font-weight: 300;
  margin-bottom: var(--space-lg);
}

.signature {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-style: italic;
  opacity: 0.4;
  margin-bottom: var(--space-xl);
}

.closing-links {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-lg);
}

.closing-link {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  transition: all 0.3s;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.closing-link:hover {
  color: var(--signal-white);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ------- Breathing Animation (Era 5 circles) ------- */

@keyframes breathe {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

.concentric-circles.breathing .concentric-ring {
  animation: breathe 6s ease-in-out infinite;
}

.concentric-circles.breathing .concentric-ring:nth-child(2) {
  animation-delay: 0.15s;
}

.concentric-circles.breathing .concentric-ring:nth-child(3) {
  animation-delay: 0.3s;
}

.concentric-circles.breathing .concentric-ring:nth-child(4) {
  animation-delay: 0.45s;
}

.concentric-circles.breathing .concentric-ring:nth-child(5) {
  animation-delay: 0.6s;
}

.concentric-circles.breathing .concentric-ring:nth-child(6) {
  animation-delay: 0.75s;
}

.concentric-circles.breathing .concentric-ring:nth-child(7) {
  animation-delay: 0.9s;
}

.concentric-circles.breathing .concentric-ring:nth-child(8) {
  animation-delay: 1.05s;
}

/* ------- Parchment Texture ------- */

.parchment-texture {
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(92, 74, 58, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(92, 74, 58, 0.03) 0%, transparent 50%),
    linear-gradient(to bottom, var(--parchment), var(--parchment-dark));
}

/* ------- Clinical Grid ------- */

.clinical-grid-bg {
  background-image:
    linear-gradient(rgba(192, 216, 232, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(192, 216, 232, 0.3) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ------- Responsive ------- */

@media (max-width: 480px) {
  .era__content {
    padding: var(--space-md) var(--space-sm);
  }

  .text-line {
    font-size: var(--text-lg);
    line-height: 1.7;
  }

  .era-nav {
    right: 8px;
  }

  .era-nav__label {
    display: none;
  }

  .geometry-toggles {
    flex-direction: column;
    align-items: center;
  }

  .toggle-btn {
    width: 100%;
    max-width: 220px;
  }
}

/* ------- Loading / Initial State ------- */

.era .text-line:nth-child(1) {
  transition-delay: 0.1s;
}

.era .text-line:nth-child(2) {
  transition-delay: 0.3s;
}

.era .text-line:nth-child(3) {
  transition-delay: 0.5s;
}

.era .text-line:nth-child(4) {
  transition-delay: 0.7s;
}

.era .text-line:nth-child(5) {
  transition-delay: 0.9s;
}

.era .text-line:nth-child(6) {
  transition-delay: 1.1s;
}

/* Smooth cross-era background transition */
.era-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s;
}

/* ------- Focus Visible ------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ------- Bridge Block ------- */
.bridge-block {
  border-left: 2px solid rgba(0, 212, 255, 0.3);
  padding-left: var(--space-md);
  margin-top: var(--space-md);
  text-align: left;
  max-width: 700px;
}

/* ------- Signal Definition ------- */
.signal-definition {
  border-left: 2px solid rgba(255, 255, 255, 0.15);
  padding-left: var(--space-md);
  text-align: left;
  max-width: 700px;
}

/* ------- Concession ------- */
.concession {
  font-style: italic;
  color: rgba(255, 255, 255, 0.55);
}

/* ------- So What Block ------- */
.so-what-block {
  border-top: 1px solid rgba(0, 212, 255, 0.2);
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
  padding: var(--space-lg) var(--space-md);
  margin-top: var(--space-lg);
  max-width: 700px;
  text-align: left;
}

.so-what-title {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  letter-spacing: 0.08em;
  color: rgba(0, 212, 255, 0.8);
  margin-bottom: var(--space-md);
}

/* ------- Tooltip Overflow Fixes ------- */
.latin-block__tooltip {
  width: min(400px, 85vw);
  white-space: normal;
}

.ring-tooltip {
  max-width: 70vw;
}

/* ------- Reduced Motion ------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .progress-bar {
    display: none;
  }
}

/* ------- Signal Cursor Ring (scoped to ERA 5) ------- */
.signal-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  border: 1.5px solid rgba(0, 212, 255, 0.6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
  mix-blend-mode: difference;
}

.signal-cursor-ring__dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.signal-cursor-ring--hover {
  width: 48px;
  height: 48px;
  border-color: rgba(0, 212, 255, 0.9);
}

.signal-cursor-ring--hover .signal-cursor-ring__dot {
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
}

.signal-cursor-ring--click {
  width: 22px;
  height: 22px;
  border-color: rgba(255, 255, 255, 0.9);
}

/* Restore cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
  .signal-cursor-ring {
    display: none;
  }
}

/* --- Chiasm Beats (Fragment / Synthesis / Resonance text labels) --- */
.chiasm-beats {
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 5vw, 4rem);
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.chiasm-beat {
  flex: 1;
  max-width: 260px;
  cursor: pointer;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: all 0.4s var(--ease-out);
}

.chiasm-beat:hover {
  border-color: rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.04);
}

.chiasm-beat.active {
  border-color: rgba(0, 212, 255, 0.5);
  background: rgba(0, 212, 255, 0.08);
}

.chiasm-beat__label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.6rem;
}

.chiasm-beat__text {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.01em;
}

/* --- Works Section --- */
.works-section {
  text-align: center;
  padding: var(--space-lg) 0;
}

.works-title {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 1.5rem;
}

.works-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.works-link {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.works-link:hover {
  color: var(--cyan);
  letter-spacing: 0.12em;
}

/* Responsive: stack beats vertically on mobile */
@media (max-width: 600px) {
  .chiasm-beats {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .chiasm-beat {
    max-width: 100%;
  }
}

/* =============================================
   FROM SQUARE TO CIRCLE — ASSEMBLY SECTION
   ============================================= */

.assembly-intro {
  text-align: center;
  margin-bottom: 4vh;
}

.assembly-intro__title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.assembly-intro__text {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.8;
  max-width: 520px;
  margin: 0 auto;
}

.assembly-section {
  position: relative;
  width: 100%;
}

.assembly-canvas-wrap {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.assembly-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.assembly-stage-label {
  position: absolute;
  bottom: 3vh;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(0, 212, 255, 0.5);
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.assembly-waypoint {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6vw;
  z-index: 2;
  pointer-events: none;
}

.assembly-waypoint:first-of-type {
  margin-top: -100vh;
  /* overlap the first waypoint with the sticky canvas */
}

.assembly-caption {
  max-width: 280px;
  text-align: right;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: auto;
}

.assembly-caption.visible {
  opacity: 1;
  transform: translateX(0);
}

.assembly-caption__number {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: rgba(0, 212, 255, 0.3);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.assembly-caption__title {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.6rem;
}

.assembly-caption__text {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.7;
}

.assembly-caption__text em {
  color: rgba(0, 212, 255, 0.6);
  font-style: italic;
}

/* Mobile: captions below canvas */
@media (max-width: 768px) {
  .assembly-waypoint {
    justify-content: center;
    padding-right: 0;
    padding: 0 5vw;
  }

  .assembly-caption {
    text-align: center;
    max-width: 100%;
  }
}

/* ── CHIASTIC SPHERE CANVASES ──────────────────────── */
.chiasm-sphere-wrap {
  width: 100%;
  aspect-ratio: 1;
  max-width: 300px;
  margin: 0 auto;
  border-radius: 4px;
  overflow: hidden;
}

.chiasm-sphere-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ============================================================
   ARTWORK LIGHTBOX
   ============================================================ */
.artwork-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  backdrop-filter: blur(10px);
}

.artwork-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.artwork-lightbox__close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 2.5rem;
  cursor: pointer;
  transition: color 0.3s;
  z-index: 10001;
}

.artwork-lightbox__close:hover {
  color: var(--cyan);
}

.artwork-lightbox__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 90vw;
  max-height: 90vh;
}

.artwork-lightbox__image {
  max-width: 70vw;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.artwork-lightbox__info {
  text-align: center;
}

.artwork-lightbox__title {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.75rem;
}

.artwork-lightbox__link {
  display: inline-block;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  padding: 0.6rem 1.5rem;
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.artwork-lightbox__link:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--cyan);
}

/* ============================================================
   ARTWORK VIEW BUTTONS (on concentric views)
   ============================================================ */
.artwork-view-btn {
  display: block;
  margin: 1rem auto 0;
  background: none;
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  padding: 0.5rem 1.2rem;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.artwork-view-btn:hover {
  background: rgba(0, 212, 255, 0.08);
  border-color: var(--cyan);
}

/* ============================================================
   SPHERE STAGE SLIDER
   ============================================================ */
.sphere-slider {
  max-width: 600px;
  margin: 4vh auto;
  padding: 2rem;
  text-align: center;
}

.sphere-slider__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.sphere-slider__track {
  position: relative;
}

.sphere-slider__input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.sphere-slider__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
  transition: box-shadow 0.3s;
}

.sphere-slider__input::-webkit-slider-thumb:hover {
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
}

.sphere-slider__input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
}

.sphere-slider__stages {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.35);
}

.sphere-slider__stages span {
  transition: color 0.3s;
}

.sphere-slider__stages span.active {
  color: var(--cyan);
}

/* ============================================================
   CORRESPONDENCE SECTION
   ============================================================ */
.correspondence {
  text-align: center;
  padding: 6vh var(--side-pad) 2vh;
}

.correspondence__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 1rem;
}

.correspondence__text {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-style: italic;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
}

.correspondence__button {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  text-decoration: none;
  padding: 0.8rem 2rem;
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 4px;
  transition: all 0.3s ease;
  margin-bottom: 3vh;
}

.correspondence__button:hover {
  background: rgba(0, 212, 255, 0.08);
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  text-align: center;
  padding: 6vh var(--side-pad) 5vh;
}

.site-footer__social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.site-footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  transition: transform 0.3s, opacity 0.3s;
  opacity: 0.4;
}

.site-footer__social a:hover {
  transform: translateY(-2px);
  opacity: 0.8;
}

.site-footer__social svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  color: rgba(255, 255, 255, 0.7);
}

.site-footer__social a:hover svg {
  color: var(--cyan);
}

.site-footer__bottom {
  margin-top: 1rem;
}

.site-footer__name {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  margin-bottom: 0.5rem;
}

.site-footer__copyright {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 600px) {
  .artwork-lightbox__image {
    max-width: 95vw;
    max-height: 60vh;
  }

  .sphere-slider {
    padding: 1.5rem;
  }

  .site-footer__social {
    gap: 1rem;
  }
}

/* ============================================================
   WITNESS CARDS — Portrait vignettes for each era's protagonist
   ============================================================ */

.witness-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin: var(--space-lg) auto;
  max-width: 320px;
  text-align: center;
}

.witness-card__portrait {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.witness-card__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.witness-card__info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.witness-card__name {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.witness-card__dates {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.4;
}

/* --- Signature --- */
.witness-card__signature {
  width: 100px;
  height: auto;
  opacity: 0.3;
  transition: opacity 0.4s var(--ease-out);
  margin-top: 0.2rem;
}

.witness-card:hover .witness-card__signature {
  opacity: 0.55;
}

/* Light-mode signature (dark ink on white bg -> inverted for dark theme) */
.witness-card__signature--light {
  filter: invert(1);
  width: 120px;
}

/* --- Variant: Sepia (ancient eras) --- */
.witness-card--sepia .witness-card__portrait {
  border-color: rgba(92, 74, 58, 0.25);
}

.witness-card--sepia .witness-card__portrait img {
  filter: sepia(0.4) contrast(0.85) brightness(0.95);
}

.witness-card--sepia .witness-card__name {
  color: var(--ink-sepia, rgba(92, 74, 58, 0.9));
}

.witness-card--sepia .witness-card__dates {
  color: var(--ink-sepia, rgba(92, 74, 58, 0.5));
}

.witness-card--sepia .witness-card__signature {
  filter: sepia(0.6) brightness(0.4);
}

/* --- Variant: Clinical (Le Corbusier) --- */
.witness-card--clinical .witness-card__portrait {
  border-color: rgba(42, 42, 42, 0.3);
}

.witness-card--clinical .witness-card__portrait img {
  filter: grayscale(1) contrast(1.1);
}

.witness-card--clinical .witness-card__name {
  color: rgba(42, 42, 42, 0.85);
  font-family: var(--font-sans);
  font-weight: 300;
}

.witness-card--clinical .witness-card__dates {
  color: rgba(42, 42, 42, 0.4);
}

.witness-card--clinical .witness-card__signature {
  filter: grayscale(1) brightness(0.3);
}

/* --- Variant: Signal (Avery Lake) --- */
.witness-card--signal .witness-card__portrait {
  border-color: rgba(0, 212, 255, 0.15);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.05);
}

.witness-card--signal .witness-card__portrait img {
  filter: none;
}

.witness-card--signal .witness-card__name {
  color: rgba(255, 255, 255, 0.9);
}

.witness-card--signal .witness-card__dates {
  color: var(--cyan-muted, rgba(0, 212, 255, 0.5));
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.05em;
}

/* --- Dual portrait (Avery Lake) --- */
.witness-card__dual {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.witness-card__dual .witness-card__portrait {
  width: 120px;
  height: 120px;
}

.witness-card__portrait--process {
  opacity: 0.7;
  transition: opacity 0.4s var(--ease-out);
}

.witness-card:hover .witness-card__portrait--process {
  opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .witness-card__portrait {
    width: 110px;
    height: 110px;
  }

  .witness-card__dual .witness-card__portrait {
    width: 95px;
    height: 95px;
  }

  .witness-card__signature {
    width: 80px;
  }

  .witness-card__signature--light {
    width: 100px;
  }
}

/* ============================================================
   BIBLIOGRAPHY / SOURCES SECTION
   ============================================================ */

.bibliography-section {
  padding: var(--space-xl) var(--space-md);
  text-align: center;
  background: var(--signal-black);
}

.bibliography-toggle {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0.8rem 1.5rem;
  cursor: pointer;
  transition: all 0.4s var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.bibliography-toggle:hover {
  color: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.25);
}

.bibliography-toggle[aria-expanded="true"] {
  border-color: rgba(0, 212, 255, 0.2);
  color: rgba(255, 255, 255, 0.5);
}

.bibliography-toggle__icon {
  transition: transform 0.3s var(--ease-out);
  display: inline-block;
}

.bibliography-toggle[aria-expanded="true"] .bibliography-toggle__icon {
  transform: rotate(45deg);
}

.bibliography-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s var(--ease-out), opacity 0.4s;
  opacity: 0;
}

.bibliography-panel[hidden] {
  display: block;
  max-height: 0;
  opacity: 0;
}

.bibliography-panel.open {
  max-height: 2000px;
  opacity: 1;
}

.bibliography-panel__inner {
  max-width: 700px;
  margin: 0 auto;
  padding: var(--space-xl) 0;
  text-align: left;
}

.bibliography-heading {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin: var(--space-lg) 0 var(--space-sm);
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bibliography-heading:first-child {
  margin-top: 0;
}

.bibliography-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bibliography-list li {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.45);
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.bibliography-list li strong {
  color: rgba(255, 255, 255, 0.65);
  font-weight: 400;
}

.bibliography-list li a {
  color: var(--cyan-muted, rgba(0, 212, 255, 0.5));
  text-decoration: none;
  transition: color 0.3s;
}

.bibliography-list li a:hover {
  color: var(--cyan, #00D4FF);
  text-decoration: underline;
}

/* =============================================
   DEEP DIVE OVERLAY
   ============================================= */

body.deepdive-active {
  overflow: hidden !important;
}

.deep-dive-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--bg, #080C14);
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.deep-dive-overlay.active {
  display: block;
  opacity: 1;
}

.deep-dive-overlay__close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9010;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(8, 12, 20, 0.6);
}

.deep-dive-overlay__close:hover {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 212, 255, 0.4);
  background: rgba(0, 212, 255, 0.08);
}

.deep-dive-overlay__scroll {
  min-height: 100%;
}

.deep-dive-overlay__header {
  text-align: center;
  padding: 12vh 2rem 6vh;
  max-width: 650px;
  margin: 0 auto;
}

.deep-dive-overlay__header .assembly-intro__title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: 1rem;
}

.deep-dive-overlay__header .assembly-intro__text {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.8;
}

/* Chiasm content wrapper inside overlay */
.deep-dive-chiasm {
  max-width: var(--content-max, 700px);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.deep-dive-overlay__footer {
  text-align: center;
  padding: 8vh 2rem 12vh;
}

.deep-dive-overlay__return {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.8rem 2rem;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.deep-dive-overlay__return:hover {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 212, 255, 0.4);
  background: rgba(0, 212, 255, 0.06);
}

/* Assembly sticky canvas works inside overlay scroll */
.deep-dive-overlay .assembly-canvas-wrap {
  position: sticky;
  top: 0;
}

/* Ensure sphere slider is visible inside overlay */
.deep-dive-overlay .sphere-slider {
  padding: 2rem var(--space-md) 4rem;
}

/* ═══════════════════════════════════════════════════
   SIGNAL STREAM — Chatbot-Style Interface
   ═══════════════════════════════════════════════════ */

.signal-stream {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.signal-stream.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Chatbot header bar */
.signal-stream__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0, 212, 255, 0.1);
  margin-bottom: 0;
}

.signal-stream__header-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #00d4ff;
  flex-shrink: 0;
}

.signal-stream__header-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.signal-stream__header-name {
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.04em;
}

.signal-stream__header-status {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: rgba(0, 212, 255, 0.5);
}

/* Chat container */
.signal-stream__chat {
  background: rgba(8, 12, 24, 0.6);
  border: 1px solid rgba(0, 212, 255, 0.08);
  border-radius: 1rem;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Message blocks — styled as chat messages */
.signal-stream__block {
  padding: 1.5rem 2rem;
  min-height: 120px;
}

.signal-stream__block+.signal-stream__block {
  border-top: 1px solid rgba(0, 212, 255, 0.06);
}

.signal-stream__label {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0, 212, 255, 0.45);
  margin-bottom: 1.5rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.signal-stream__label.visible {
  opacity: 1;
}

.signal-stream__line {
  font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
  font-style: italic;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 2;
  margin-bottom: 0.6rem;
  min-height: 2em;
}

.signal-stream__line em {
  color: #fff;
  font-style: italic;
}

.signal-stream__line--accent {
  color: rgba(0, 212, 255, 0.8);
  font-style: normal;
}

.signal-stream__line--plain {
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-style: normal;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.9;
}

.signal-stream__line--plain em {
  color: #fff;
  font-style: normal;
  font-weight: 500;
}

.signal-stream__line--bullet {
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-style: normal;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.9;
  padding-left: 0.5rem;
}

.signal-stream__line--bullet em {
  color: var(--accent, #00d4ff);
  font-style: normal;
}

/* Inline typing cursor */
.signal-cursor {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: var(--accent, #00d4ff);
  margin-left: 2px;
  animation: signal-blink 0.6s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes signal-blink {
  50% {
    opacity: 0;
  }
}

/* Prompt Buttons — styled like chatbot suggestion chips */
.signal-stream__prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
  padding: 1.2rem 2rem;
  border-top: 1px solid rgba(0, 212, 255, 0.06);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s;
  pointer-events: none;
}

.signal-stream__prompts.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.signal-stream__btn {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: rgba(0, 212, 255, 0.6);
  background: rgba(0, 212, 255, 0.04);
  border: 1px solid rgba(0, 212, 255, 0.15);
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 2rem;
  position: relative;
  overflow: hidden;
}

.signal-stream__btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.06), transparent);
  transition: left 0.4s;
}

.signal-stream__btn:hover {
  border-color: rgba(0, 212, 255, 0.4);
  color: var(--accent, #00d4ff);
  background: rgba(0, 212, 255, 0.08);
}

.signal-stream__btn:hover::before {
  left: 100%;
}

.signal-stream__btn.active {
  border-color: rgba(0, 212, 255, 0.5);
  color: var(--accent, #00d4ff);
  background: rgba(0, 212, 255, 0.1);
}

/* Counter + Meta */
.signal-stream__counter {
  padding: 0 2rem;
  margin-top: 1rem;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.12);
  opacity: 0;
  transition: opacity 0.6s ease;
}

.signal-stream__counter.visible {
  opacity: 1;
}

.signal-stream__meta {
  padding: 0 2rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
  font-style: italic;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.08);
  opacity: 0;
  transition: opacity 1.5s ease;
  text-align: center;
}

.signal-stream__meta.visible {
  opacity: 1;
}

/* Framing Question */
.signal-question {
  text-align: center;
  opacity: 1;
  transform: none;
}

.signal-question.visible {
  opacity: 1;
  transform: none;
}

.signal-question__text {
  font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
  font-style: italic;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.02em;
}

/* Segments within signal stream */
.signal-stream__segment {
  margin-bottom: 1.2rem;
}

.signal-stream__segment:empty {
  display: none;
  margin: 0;
}

/* Embedded elements (deep dive button etc.) */
.signal-stream__embed {
  padding: 1.5rem 0;
  text-align: center;
}

.signal-stream__embed .toggle-btn {
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════
   INLINE GROQ CHATBOT — within Signal section
   ═══════════════════════════════════════════════════ */

.signal-inline-chat {
  max-width: 900px;
  margin: 2rem auto 0;
  padding: 0 var(--space-md);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.signal-inline-chat.visible {
  opacity: 1;
  transform: translateY(0);
}

.signal-inline-chat__container {
  background: rgba(8, 12, 24, 0.6);
  border: 1px solid rgba(0, 212, 255, 0.08);
  border-radius: 1rem;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.signal-inline-chat__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.5rem;
  border-bottom: 1px solid rgba(0, 212, 255, 0.08);
}

.signal-inline-chat__header-icon {
  font-size: 0.75rem;
  color: rgba(0, 212, 255, 0.6);
}

.signal-inline-chat__header-text {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 212, 255, 0.5);
}

.signal-inline-chat__messages {
  min-height: 80px;
  max-height: 400px;
  overflow-y: auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 212, 255, 0.15) transparent;
}

.signal-inline-chat__msg {
  max-width: 85%;
  padding: 0.8rem 1.1rem;
  border-radius: 0.8rem;
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
}

.signal-inline-chat__msg--bot {
  align-self: flex-start;
  text-align: left;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.1);
  border-radius: 0.2rem 0.8rem 0.8rem 0.8rem;
}

.signal-inline-chat__msg--user {
  align-self: flex-end;
  background: rgba(0, 212, 255, 0.14);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 0.8rem 0.2rem 0.8rem 0.8rem;
  color: rgba(255, 255, 255, 0.95);
}

.signal-inline-chat__msg--typing {
  align-self: flex-start;
  background: rgba(0, 212, 255, 0.04);
  border: 1px solid rgba(0, 212, 255, 0.08);
  border-radius: 0.2rem 0.8rem 0.8rem 0.8rem;
  padding: 0.8rem 1.2rem;
}

.signal-inline-chat__typing-dots {
  display: flex;
  gap: 4px;
}

.signal-inline-chat__typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #00D4FF;
  opacity: 0.4;
  animation: inlineChatDot 1.4s ease-in-out infinite;
}

.signal-inline-chat__typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.signal-inline-chat__typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes inlineChatDot {

  0%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.signal-inline-chat__input-area {
  display: flex;
  gap: 0.5rem;
  padding: 0.8rem 1.2rem;
  border-top: 1px solid rgba(0, 212, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.signal-inline-chat__input {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(0, 212, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.6rem 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.signal-inline-chat__input:focus {
  border-color: rgba(0, 212, 255, 0.35);
}

.signal-inline-chat__input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.signal-inline-chat__send {
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 0.5rem;
  color: #00D4FF;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.signal-inline-chat__send:hover {
  background: rgba(0, 212, 255, 0.22);
}

.signal-inline-chat__powered {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.1);
  text-align: center;
  padding: 0.5rem;
}

@media (max-width: 600px) {
  .signal-stream {
    padding: 0 var(--space-sm);
  }

  .signal-stream__block {
    padding: 1.2rem 1rem;
  }

  .signal-inline-chat {
    padding: 0 var(--space-sm);
  }
}

/* ═══════════════════════════════════════════════ */
/* Reduced Motion — respect user preferences      */
/* ═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .scanline,
  .glitch-overlay,
  .era-nav__thread {
    animation: none !important;
  }

  html.lenis,
  html.lenis body {
    scroll-behavior: auto;
  }
}

/* ===== MOBILE: hide sidebar nav ===== */
@media (max-width: 768px) {
  .era-nav {
    display: none !important;
  }
}