/* ============================================
   XLIV — Main Site Styles
   ============================================ */

:root {
  --orange: #D44F00;
  --orange-light: #E8752E;
  --orange-glow: rgba(212, 79, 0, 0.12);
  --cream: #F5F0E8;
  --dark: #0F0F0F;
  --dark-mid: #1A1A1A;
  --grey: #6B6B6B;
  --grey-light: #9A9A9A;
  --white: #FAFAFA;
}

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

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  overflow-x: hidden;
  overflow-y: scroll;
}

body {
  background: var(--dark);
  color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── PANELS ── */
.panel {
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 4rem 2rem;
  z-index: 1;
}

.panel-inner {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.panel-inner.wide {
  max-width: 960px;
}


/* ── HERO ── */
.hero {
  text-align: center;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  height: 100vh;
  height: 100dvh;
}

.hero-stack {
  display: grid;
  place-items: center;
  flex: 1;
  width: 100%;
}

.hero-stack > * {
  grid-area: 1 / 1;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}

/* ── HERO XLIV WATERMARK ── */
.xliv-watermark {
  position: relative;
  transform: scale(15);
  font-family: 'Playfair Display', serif;
  font-size: clamp(20rem, 35vw, 45rem);
  font-weight: 700;
  color: rgba(212, 79, 0, 0.06);
  -webkit-text-stroke: 1px rgba(212, 79, 0, 0.06);
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.02em;
  z-index: 0;
  opacity: 0;
  animation: watermarkZoom 2.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.xliv-watermark::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background: radial-gradient(
    circle at center,
    rgba(15, 15, 15, 0.8) 0%,
    rgba(15, 15, 15, 0.4) 40%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

@keyframes watermarkZoom {
  0% {
    transform: scale(15);
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.hero-roman {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 2rem;
  font-weight: 500;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.3s;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1.15;
  max-width: 28ch;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.6s;
}

.hero h1 em {
  font-style: italic;
  color: var(--orange);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--grey-light);
  max-width: 40ch;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.9s;
}

.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--grey);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 1.4s;
  text-decoration: none;
}

.scroll-hint::after {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: var(--orange);
  margin: 1rem auto 0;
  animation: pulse 2s ease infinite;
}

/* Scroll cue — clickable area on all panels */
.scroll-cue {
  cursor: pointer;
  padding: 1rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

.panel-scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 2rem;
  z-index: 10;
  text-decoration: none;
}

.panel-scroll-cue::after {
  content: '';
  display: block;
  width: 1px;
  height: 30px;
  background: var(--orange);
  animation: pulse 2s ease infinite;
}

/* ── SECTION LABELS & TYPE ── */
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 2.5rem;
  font-weight: 500;
}

h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 2rem;
}

h2 em { font-style: italic; color: var(--orange); }

p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  color: var(--cream);
}

p.muted { color: var(--grey-light); }

/* ── DIVIDER (inline within panels) ── */
.divider-inline {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 3rem;
}

.divider-inline::before,
.divider-inline::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(212, 79, 0, 0.2);
}

.divider-inline span {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--orange);
  text-shadow: 0 0 8px rgba(212, 79, 0, 0.4), 0 0 20px rgba(212, 79, 0, 0.2), 0 0 40px rgba(212, 79, 0, 0.1);
  animation: glowPulse44 3s ease-in-out infinite;
}

@keyframes glowPulse44 {
  0%, 100% { text-shadow: 0 0 8px rgba(212, 79, 0, 0.3), 0 0 20px rgba(212, 79, 0, 0.15), 0 0 40px rgba(212, 79, 0, 0.05); }
  50% { text-shadow: 0 0 12px rgba(212, 79, 0, 0.6), 0 0 30px rgba(212, 79, 0, 0.3), 0 0 60px rgba(212, 79, 0, 0.15); }
}

/* ── THE 44 LEGENDS ── */
.legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.legend-card {
  background: var(--dark-mid);
  border: 1px solid rgba(212, 79, 0, 0.1);
  padding: 2.5rem 2rem;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}

/* Photo background approach */
.legend-card.has-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.04;
  z-index: 0;
  pointer-events: none;
}

.legend-card.has-photo > * {
  position: relative;
  z-index: 1;
}

.legend-card.card-jim::before    { background-image: url('../img/Jim.png'); }
.legend-card.card-ernie::before  { background-image: url('../img/Ernie.png'); opacity: 0.08; }
.legend-card.card-floyd::before  { background-image: url('../img/Floyd.png'); opacity: 0.08; }

/* 44 emblem approach (for comparison) */
.legend-card.has-emblem::before {
  content: '44';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
  font-family: 'Playfair Display', serif;
  font-size: 12rem;
  font-weight: 700;
  color: rgba(212, 79, 0, 0.06);
  z-index: 0;
  pointer-events: none;
  line-height: 1;
  letter-spacing: -0.02em;
}

.legend-card.has-emblem > * {
  position: relative;
  z-index: 1;
}

.legend-card.animate-in.visible {
  transition: opacity 0.7s ease, transform 0.2s ease, border-color 0.2s ease;
}

.legend-card.animate-in.visible:hover {
  border-color: rgba(212, 79, 0, 0.35);
  transform: translateY(0) scale(1.05) !important;
  z-index: 2;
}

.legend-number {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  font-weight: 700;
  color: rgba(212, 79, 0, 0.1);
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  line-height: 1;
}

.legend-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 0.3rem;
}

.legend-card .years {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--orange);
  letter-spacing: 0.15em;
  margin-bottom: 1.2rem;
}

.legend-card p {
  font-size: 0.92rem;
  color: var(--grey-light);
  margin-bottom: 0;
  line-height: 1.6;
}

/* ── QUOTE BLOCK ── */
.quote-content {
  text-align: center;
}

.quote-content blockquote {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--cream);
  position: relative;
  padding: 0 1rem;
}

.quote-content blockquote::before {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--orange);
  margin: 0 auto 2.5rem;
}

.quote-content cite {
  display: block;
  margin-top: 2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-style: normal;
  letter-spacing: 0.3em;
  color: var(--grey);
  text-transform: uppercase;
}

/* ── FOUNDERS ── */
.founders-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
}

.founder {
  border-top: 2px solid var(--orange);
  padding-top: 1.5rem;
}

.founder h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 0.2rem;
}

.founder .role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--orange);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.founder p {
  font-size: 0.95rem;
  color: var(--grey-light);
}

/* ── CLOSING ── */
.closing-content {
  text-align: center;
}

.closing-content .xliv-large {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  color: var(--orange);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.closing-url {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 200;
  letter-spacing: 0.35em;
  text-transform: lowercase;
  color: var(--white);
  margin-bottom: 3rem;
}

.closing-url span {
  color: var(--grey-light);
  font-weight: 300;
}

.closing-content p {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--grey-light);
  max-width: 42ch;
  margin: 0 auto;
}

/* ── TIMELINE ── */
.timeline {
  position: relative;
  margin-top: 2.5rem;
}


.timeline-line {
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(212, 79, 0, 0.15);
}

.timeline-nodes {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.timeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
  padding: 0 0.15rem;
  flex: 1;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(212, 79, 0, 0.3);
  border: 1px solid rgba(212, 79, 0, 0.5);
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.timeline-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(212, 79, 0, 0);
  transition: all 0.3s ease;
}

.timeline-node:hover .timeline-dot {
  background: var(--orange);
  transform: scale(1.3);
}

.timeline-node:hover .timeline-dot::after {
  background: rgba(212, 79, 0, 0.08);
}

.timeline-node.active .timeline-dot {
  background: var(--orange);
  transform: scale(1.5);
  box-shadow: 0 0 8px rgba(212, 79, 0, 0.4);
}

.timeline-node.active .timeline-dot::after {
  width: 32px;
  height: 32px;
  background: rgba(212, 79, 0, 0.15);
  animation: dotRadiate 2s ease-out infinite;
}

@keyframes dotRadiate {
  0% {
    width: 16px;
    height: 16px;
    background: rgba(212, 79, 0, 0.25);
  }
  100% {
    width: 40px;
    height: 40px;
    background: rgba(212, 79, 0, 0);
  }
}

.timeline-node.legend .timeline-dot {
  width: 12px;
  height: 12px;
  background: rgba(212, 79, 0, 0.5);
  border-width: 2px;
}

.timeline-node-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.5rem;
  color: var(--grey-light);
  letter-spacing: 0.05em;
  margin-top: 0.8rem;
  transform: rotate(-50deg);
  transform-origin: top center;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.timeline-node:hover .timeline-node-label,
.timeline-node.active .timeline-node-label {
  color: var(--orange);
}

/* Detail card — always visible, fixed height */
.timeline-detail {
  margin-top: 4rem;
  opacity: 1;
}

.timeline-detail-inner {
  border: 1px solid rgba(212, 79, 0, 0.15);
  background: var(--dark-mid);
  position: relative;
  height: 200px;
  overflow: hidden;
}

.timeline-strip {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  height: 100%;
}

.timeline-strip-item {
  min-width: 100%;
  max-width: 100%;
  padding: 1.5rem 2rem;
  flex-shrink: 0;
}

.timeline-strip-item h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 0.2rem;
}

.timeline-strip-item .detail-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--orange);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.timeline-strip-item p {
  font-size: 0.9rem;
  color: var(--grey-light);
  line-height: 1.7;
  margin-bottom: 0;
  max-width: 600px;
}

/* ── SITE NAV ── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 2.5rem;
  z-index: 200;
  pointer-events: none;
  text-align: center;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  padding-bottom: 3rem;
}

.site-nav a {
  pointer-events: auto;
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px rgba(212, 79, 0, 0.4);
  text-decoration: none;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
}


.site-nav a:hover {
  -webkit-text-stroke: 1px rgba(212, 79, 0, 0.7);
}

/* ── FOOTER ── */
.site-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--grey);
  letter-spacing: 0.15em;
  z-index: 1;
}

.site-footer .footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--grey);
}

/* ── PANEL BACKGROUNDS ── */

/* Shared watermark base */
.panel-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.panel-inner, .panel-inner.wide {
  position: relative;
  z-index: 1;
}

/* 1. THE NUMBER — 44 lands first, text assembles around it */
.panel-number { overflow: hidden; }

.number-headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 2rem;
}

.number-headline em { font-style: italic; color: var(--orange); }

.nh-44 {
  display: inline-block;
  font-size: 1.5em;
  font-weight: 700;
  color: var(--orange);
  margin: 0 0.15em;
  opacity: 0;
  transform: scale(4);
  text-shadow: 0 0 40px rgba(212, 79, 0, 0.6), 0 0 80px rgba(212, 79, 0, 0.3);
  position: relative;
  z-index: 10;
  /* Exit transition — 44 lingers longest */
  transition: opacity 0.8s ease-in-out 0.4s, transform 1s ease-in-out 0.4s, text-shadow 1s ease-in-out 0.4s;
}

.nh-44.visible {
  animation: fourtyFourEntrance 1.8s ease-in-out forwards;
}

@keyframes fourtyFourEntrance {
  0% {
    opacity: 0;
    transform: scale(4);
    text-shadow: 0 0 40px rgba(212, 79, 0, 0.6), 0 0 80px rgba(212, 79, 0, 0.3);
  }
  15% {
    opacity: 1;
    transform: scale(4);
    text-shadow: 0 0 40px rgba(212, 79, 0, 0.6), 0 0 80px rgba(212, 79, 0, 0.3);
  }
  50% {
    opacity: 1;
    transform: scale(4);
    text-shadow: 0 0 30px rgba(212, 79, 0, 0.5), 0 0 60px rgba(212, 79, 0, 0.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    text-shadow: 0 0 8px rgba(212, 79, 0, 0.3), 0 0 20px rgba(212, 79, 0, 0.1);
  }
}

.nh-text {
  display: inline;
  opacity: 0;
  transform: translateY(24px);
  /* Exit: text leaves first (no delay) */
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

/* Number panel — late arrivals (wait for 44 to have the stage) */
.animate-in.nh-late { transition-delay: 1.3s; }
.animate-in.nh-late-2 { transition-delay: 1.6s; }

/* On exit, text leaves immediately, 44 lingers */
.animate-in.nh-late:not(.visible) { transition-delay: 0s; }
.animate-in.nh-late-2:not(.visible) { transition-delay: 0s; }

/* 2. THE LEGENDS — drifting diagonal jersey lines */
.panel-legends { overflow: hidden; }
.panel-legends::before {
  content: '';
  position: absolute;
  inset: -100%;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 40px,
    rgba(212, 79, 0, 0.04) 40px,
    rgba(212, 79, 0, 0.04) 41px
  );
  pointer-events: none;
  z-index: 0;
  animation: driftLines 20s linear infinite;
}

@keyframes driftLines {
  0% { transform: translate(0, 0); }
  100% { transform: translate(57px, 57px); }
}

/* 3. THE TIMELINE — video background + radial pulse */
.panel-timeline { overflow: hidden; }
.timeline-bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 0.25;
  z-index: 0;
  pointer-events: none;
}
.panel-timeline::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background:
    radial-gradient(circle at center, transparent 20%, rgba(212, 79, 0, 0.06) 40%, transparent 60%),
    radial-gradient(circle at center, transparent 50%, rgba(212, 79, 0, 0.04) 70%, transparent 85%);
  animation: radarPulse 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes radarPulse {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(0.9); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* 4. THE COMPANY — XLIV scrolling marquee, rotated */
.panel-company { overflow: hidden; }
.wm-xliv-scroll {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  transform: translate(-50%, -50%) rotate(-8deg);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  overflow: hidden;
}
.wm-xliv-track {
  display: flex;
  white-space: nowrap;
  animation: xlivScroll 600s linear infinite;
  width: max-content;
}
.wm-xliv-track span {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(18rem, 50vw, 55rem);
  color: transparent;
  -webkit-text-stroke: 2px rgba(212, 79, 0, 0.08);
  letter-spacing: -0.02em;
  line-height: 1;
  padding: 0 0.15em;
  flex-shrink: 0;
}
@keyframes xlivScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.panel-company::after {
  display: none;
}

/* 5. THE FOUNDERS — no background */

/* 6. WHAT WE BUILD — circuit/node grid */
.panel-build { overflow: hidden; }
.panel-build::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(212, 79, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 79, 0, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}
.panel-build::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 20%,
    rgba(15, 15, 15, 0.05) 30%,
    rgba(15, 15, 15, 0.15) 40%,
    rgba(15, 15, 15, 0.35) 50%,
    rgba(15, 15, 15, 0.6) 60%,
    rgba(15, 15, 15, 0.85) 70%,
    rgba(15, 15, 15, 0.95) 80%
  );
  pointer-events: none;
  z-index: 0;
}

/* 7. CLOSING — XLIV zoom-in watermark (handled via JS + existing .xliv-large) */
.panel-closing { overflow: hidden; }
.panel-closing::before {
  content: 'XLIV';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(3);
  font-family: 'Playfair Display', serif;
  font-size: clamp(14rem, 30vw, 35rem);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 2px rgba(212, 79, 0, 0.1);
  letter-spacing: -0.02em;
  line-height: 1;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.2s ease;
}
.panel-closing.in-view::before {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Scroll-triggered animations */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.animate-in.delay-1 { transition-delay: 0.1s; }
.animate-in.delay-2 { transition-delay: 0.2s; }
.animate-in.delay-3 { transition-delay: 0.3s; }
.animate-in.delay-4 { transition-delay: 0.4s; }
.animate-in.delay-5 { transition-delay: 0.5s; }
.animate-in.delay-6 { transition-delay: 0.6s; }
.animate-in.delay-7 { transition-delay: 0.7s; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  html {
    scroll-snap-type: none;
    scrollbar-width: none;
  }
  html::-webkit-scrollbar { display: none; }

  .panel {
    min-height: auto;
    scroll-snap-align: none;
    padding: 5rem 1.25rem 3rem;
  }

  .panel.hero {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .panel-scroll-cue { display: none; }

  .site-nav { padding: 1.2rem 1.5rem; }

  /* Hero */
  .hero h1 {
    font-size: clamp(1.6rem, 7vw, 2.4rem);
    max-width: 100%;
  }
  .hero-sub {
    font-size: 0.9rem;
    max-width: 32ch;
  }

  /* Watermark — smaller scale range to prevent overflow */
  .xliv-watermark {
    font-size: clamp(8rem, 40vw, 14rem);
  }

  @keyframes watermarkZoom {
    0% {
      transform: scale(6);
      opacity: 0;
    }
    40% {
      opacity: 1;
    }
    100% {
      transform: scale(1);
      opacity: 1;
    }
  }

  /* Section headings */
  h2 { font-size: clamp(1.4rem, 5.5vw, 2rem); }

  /* Legends */
  .legend-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .legend-card { padding: 2rem 1.5rem; }
  .legend-card p { font-size: 0.85rem; }

  /* Quote */
  .quote-content blockquote { font-size: 1.1rem; }

  /* Founders */
  .founders-grid { grid-template-columns: 1fr; gap: 2rem; }

  /* Timeline — horizontal scroll for the dots */
  .timeline-line { top: 28px; }
  .timeline-nodes {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    padding: 16px 0 1rem;
    scrollbar-width: none;
  }
  .timeline-nodes::-webkit-scrollbar { display: none; }
  .timeline-node {
    min-width: 40px;
    flex: 0 0 auto;
    padding: 6px 0;
    overflow: visible;
  }
  .timeline-dot {
    width: 14px;
    height: 14px;
  }
  .timeline-node.legend .timeline-dot {
    width: 16px;
    height: 16px;
  }
  .timeline-node-label { font-size: 0.4rem; }
  .timeline-detail { margin-top: 2rem; }
  .timeline-detail-inner { height: auto; min-height: 180px; overflow: hidden; }
  .timeline-strip-item { padding: 1.25rem; }
  .timeline-strip-item h3 { font-size: 1.1rem; }
  .timeline-strip-item p { font-size: 0.8rem; line-height: 1.6; }


  /* Panel backgrounds — scale down */
  .wm-xliv-track span { font-size: clamp(6rem, 25vw, 14rem); }
  .panel-closing::before { font-size: clamp(8rem, 45vw, 14rem); }
  .panel-build::before { background-size: 40px 40px; }

  /* Closing */
  .closing-content .xliv-large { font-size: clamp(2.5rem, 12vw, 4rem); }
  .closing-url { font-size: 0.9rem; letter-spacing: 0.25em; }
  .closing-content p { font-size: 1rem; }

  /* Footer */
  .site-footer {
    padding: 1.5rem;
    gap: 0.75rem;
    font-size: 0.5rem;
  }

  /* Body text sizing */
  p { font-size: 0.95rem; }
}
