@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Space+Mono:wght@400;700&display=swap');

/* ─── TOKENS ─────────────────────────────────────────── */
:root {
  --black: #0d0d0d;
  --blue: #2656A6;
  --blue-dark: #213F97;
  --red: #E41F28;
  --red-dark: #A91E22;
  --white: #FFFFFF;
  --off-white: #E9E5E4;
  --font-sans: 'Space Grotesk', sans-serif;
  --font-serif: 'EB Garamond', serif;
  --font-mono: 'Space Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-sans);
  overflow-x: hidden;
  cursor: none;
}

/* ─── CUSTOM CURSOR ──────────────────────────────────── */
.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.05s;
}

.cursor-ring {
  width: 28px;
  height: 28px;
  border: 1px solid var(--blue);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.12s ease, border-color 0.2s;
}

/* ─── SCROLL PROGRESS ────────────────────────────────── */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--red);
  z-index: 1000;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--red);
}

/* ─── GLOBAL OVERLAYS ────────────────────────────────── */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 500;
  background: repeating-linear-gradient(to bottom,
      transparent 0px,
      transparent 3px,
      rgba(0, 0, 0, 0.06) 3px,
      rgba(0, 0, 0, 0.06) 4px);
}

.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 499;
  background-image:
    linear-gradient(rgba(38, 86, 166, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 86, 166, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ─── NAVBAR ─────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  mix-blend-mode: normal;
}

nav::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 48px;
  right: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue-dark), transparent);
  opacity: 0.4;
  transition: opacity 0.5s ease;
}

/* Hide the blue nav line from S8 onwards */
.nav-no-line::after {
  opacity: 0 !important;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--off-white);
  text-transform: uppercase;
}

.nav-logo span {
  color: var(--red);
}

.nav-counter {
  display: none;
}

/* ─── SECTION BASE ───────────────────────────────────── */
section {
  position: relative;
  min-height: 100vh;
}

/* ─── S1: HERO ───────────────────────────────────────── */
#s1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 120px 48px 80px;
  text-align: center;
  overflow: hidden;
}

.s1-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 40px;
  opacity: 0.7;
}

.s1-headline {
  font-family: var(--font-sans);
  font-size: clamp(52px, 8vw, 120px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--white);
  max-width: 900px;
  margin-bottom: 40px;
}

.s1-headline .hl-red {
  color: var(--red);
}

.s1-headline .hl-blue {
  color: var(--blue);
}

.s1-subline {
  font-family: var(--font-mono);
  font-size: clamp(12px, 1.4vw, 16px);
  color: var(--off-white);
  letter-spacing: 0.05em;
  opacity: 0.6;
  margin-bottom: 80px;
}

.s1-subline .arrow {
  color: var(--blue);
  margin: 0 6px;
}

.s1-subline .cursor-blink {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--red);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0
  }
}

.s1-corner {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--blue);
  opacity: 0.3;
  letter-spacing: 0.2em;
}

.s1-corner.tl {
  top: 100px;
  left: 48px;
}

.s1-corner.tr {
  top: 100px;
  right: 48px;
  text-align: right;
}

.s1-corner.bl {
  bottom: 80px;
  left: 48px;
}

.s1-corner.br {
  bottom: 80px;
  right: 48px;
  text-align: right;
}

.scroll-cue {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.4em;
  color: var(--off-white);
  opacity: 0.4;
  text-transform: uppercase;
}

.scroll-cue svg {
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(6px)
  }
}

/* corner brackets */
.bracket-tl,
.bracket-tr,
.bracket-bl,
.bracket-br {
  position: absolute;
  width: 24px;
  height: 24px;
}

.bracket-tl {
  top: 80px;
  left: 48px;
  border-top: 1px solid var(--blue);
  border-left: 1px solid var(--blue);
}

.bracket-tr {
  top: 80px;
  right: 48px;
  border-top: 1px solid var(--blue);
  border-right: 1px solid var(--blue);
}

.bracket-bl {
  bottom: 60px;
  left: 48px;
  border-bottom: 1px solid var(--blue);
  border-left: 1px solid var(--blue);
}

.bracket-br {
  bottom: 60px;
  right: 48px;
  border-bottom: 1px solid var(--blue);
  border-right: 1px solid var(--blue);
}

/* ─── S2 / S3: IMAGE + TEXT ──────────────────────────── */
.img-text-section {
  display: grid;
  grid-template-columns: 55% 45%;
  min-height: 100vh;
  align-items: stretch;
}

.img-text-section.mirror {
  grid-template-columns: 45% 55%;
}

.img-text-section.mirror .its-img {
  order: 2;
}

.img-text-section.mirror .its-text {
  order: 1;
}

.its-img {
  position: relative;
  overflow: hidden;
}

.its-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.85) contrast(1.05);
}

.its-img::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--blue-dark);
  pointer-events: none;
  opacity: 0.5;
}

.img-data-label {
  position: absolute;
  bottom: 24px;
  left: 24px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--blue);
  background: rgba(13, 13, 13, 0.8);
  padding: 4px 10px;
  border-left: 2px solid var(--blue);
  text-transform: uppercase;
}

.its-text {
  padding: 120px 64px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid rgba(38, 86, 166, 0.15);
}

.its-text.right-pad {
  border-left: none;
  border-right: 1px solid rgba(38, 86, 166, 0.15);
  padding: 120px 64px 80px 64px;
}

.section-sys-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.4em;
  color: var(--blue);
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0.7;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4vw, 58px);
  font-weight: 500;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 16px;
}

.section-subheading {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--blue);
  letter-spacing: 0.03em;
  margin-bottom: 32px;
  max-width: 380px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(38, 86, 166, 0.2);
}

.section-body {
  font-family: var(--font-serif);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.85;
  color: var(--off-white);
  max-width: 480px;
}

.hl-red {
  color: var(--red);
  font-style: normal;
}

.hl-blue {
  color: var(--blue);
}

/* ─── S4 / S6: STACKED CARDS (PINNED) ───────────────── */
.card-stack-wrapper {
  position: relative;
}

.card-stack-header {
  padding: 120px 80px 60px;
  border-bottom: 1px solid rgba(38, 86, 166, 0.15);
}

.card-stack-header .section-sys-label {
  margin-bottom: 12px;
}

.card-stack-header .section-heading {
  margin-bottom: 8px;
}

.csh-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--blue);
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.card-pin-area {
  position: relative;
}

.card-scene {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.stack-card {
  position: absolute;
  width: min(92vw, 1160px);
  height: min(74vh, 560px);
  background: #111213;
  border: 1px solid rgba(38, 86, 166, 0.25);
  border-radius: 4px;
  display: grid;
  grid-template-columns: 360px 1fr;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  will-change: transform, opacity;
}

.stack-card .card-left {
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-num {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1;
  letter-spacing: -0.02em;
}

.card-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-title {
  font-family: var(--font-sans);
  font-size: clamp(17px, 1.8vw, 23px);
  font-weight: 600;
  color: var(--white);
  line-height: 1.25;
}

.card-body {
  font-family: var(--font-serif);
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--off-white);
  opacity: 0.85;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--red);
  text-transform: uppercase;
  border: 1px solid var(--red-dark);
  display: inline-block;
  padding: 3px 10px;
  width: fit-content;
}

/* IMAGE COLUMN — fills full height, cover, no bars */
.stack-card .card-right {
  overflow: hidden;
  position: relative;
}

.stack-card .card-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: brightness(0.92) contrast(1.06);
}

.card-right-overlay {
  display: none;
}

/* scroll spacer for pin */
.card-scroll-spacer {
  height: 300vh;
}

/* S6 — image on LEFT: flip columns so image (1fr) comes first */
.card-img-left {
  grid-template-columns: 1fr 360px;
}

.card-img-left .card-right {
  order: -1;
}

.card-overlay-right {
  display: none;
}




/* ─── S7: GEOMETRY TERMINAL ──────────────────────────── */
#s7 {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.s7-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.s7-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.35) contrast(1.2) saturate(0.4);
}

.s7-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(13, 13, 13, 0.5) 0%, rgba(13, 13, 13, 0.9) 100%);
}

.s7-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  padding: 120px 48px;
  text-align: center;
}

.s7-landmark-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.5em;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.s7-landmark-label::before,
.s7-landmark-label::after {
  content: '';
  height: 1px;
  width: 60px;
  background: var(--red-dark);
}

.pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {

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

  50% {
    opacity: 0.4;
    transform: scale(0.6)
  }
}

.s7-heading {
  font-family: var(--font-sans);
  font-size: clamp(40px, 6vw, 88px);
  font-weight: 700;
  line-height: 1.0;
  margin-bottom: 16px;
}

.s7-subheading {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--blue);
  letter-spacing: 0.1em;
  margin-bottom: 40px;
}

.s7-body {
  font-family: var(--font-serif);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.85;
  color: var(--off-white);
  text-align: left;
  margin-bottom: 64px;
}

.s7-terminal {
  border: 1px solid var(--blue-dark);
  padding: 24px 32px;
  text-align: left;
  background: rgba(13, 13, 13, 0.8);
  position: relative;
}

.s7-terminal::before {
  content: 'SYS://FACE.PROC';
  position: absolute;
  top: -10px;
  left: 20px;
  background: var(--black);
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--blue);
  letter-spacing: 0.3em;
}

.terminal-line {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 2;
  color: var(--off-white);
  display: flex;
  gap: 16px;
}

.t-label {
  color: var(--blue);
  min-width: 120px;
}

.t-value {
  color: var(--white);
}

.t-value.red {
  color: var(--red);
}

.t-arrow {
  color: var(--blue-dark);
}

/* landmark dots canvas */
#landmark-canvas {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.25;
}

/* coord readouts */
.coord-stream {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--blue);
  opacity: 0.35;
  line-height: 1.8;
  letter-spacing: 0.05em;
  pointer-events: none;
  z-index: 6;
}

.coord-stream.left {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.coord-stream.right {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  text-align: right;
}

/* ─── REVEAL ANIMATIONS (set via JS) ─────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* ─── UTILITIES ──────────────────────────────────────── */
::selection {
  background: var(--blue-dark);
  color: var(--white);
}

::-webkit-scrollbar {
  width: 3px;
}

::-webkit-scrollbar-track {
  background: var(--black);
}

::-webkit-scrollbar-thumb {
  background: var(--blue-dark);
}

/* data decorations */
.data-line {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--blue);
  letter-spacing: 0.3em;
  opacity: 0.5;
  margin-top: 40px;
}

.data-line::before {
  content: '';
  height: 1px;
  width: 32px;
  background: var(--blue);
}

/* ─── S8 BINARY SECTION ─────────────────────────── */
.s8-binary-section {
  position: relative;
  background: var(--off-white);
  display: flex;
  flex-direction: column;
  /* NO overflow:hidden — it breaks position:sticky on the canvas */
  min-height: unset;
}

#binary-canvas-s8 {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  z-index: 1;              /* above section bg, below pin-scene (z-index:2) */
  margin-bottom: -100vh;  /* pull next element up so it overlaps the canvas */
}

/* ── Pin area: 500vh gives 4 image steps × 125vh ── */
#s8-pin-area {
  height: 500vh;
  position: relative;
  width: 100%;
}

/* ── The pinned viewport-height panel ── */
.s8-pin-scene {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 60px 48px 40px;
  position: relative;
  z-index: 2;
  /* transparent bg — binary chars on canvas show through gaps */
}

/* ── Header ── */
.s8-header {
  text-align: center;
}

.s8-sys-label {
  font-family: 'Courier New', Courier, monospace;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: #8B2A0D;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.s8-title {
  font-family: 'Courier New', Courier, monospace;
  font-size: 36px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* ── Slideshow: single image at a time ── */
.s8-slideshow {
  position: relative;
  width: min(72vw, 860px);
  height: min(55vh, 500px);
  flex-shrink: 0;
}

.s8-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  filter: grayscale(15%) contrast(1.08);
  will-change: opacity;
}

/* ── Slide counter ── */
.s8-slide-indicator {
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: #8B2A0D;
  text-transform: uppercase;
}

/* ── Text block: shown below pin zone ── */
.s8-text-block {
  max-width: 860px;
  text-align: center;
  padding: 100px 48px 120px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.s8-def-line1 {
  font-family: 'Courier New', Courier, monospace;
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 20px;
  line-height: 1.5;
}

.s8-def-line2 {
  font-family: 'Courier New', Courier, monospace;
  font-size: 20px;
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1.9;
}

.s8-hl-red {
  color: #8B2A0D;
  font-weight: 700;
}



/* ─── S9 BINARY SECTION ─────────────────────────── */
.s9-binary-section {
  position: relative;
  min-height: 100vh;
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* canvas fills the section */
#binary-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* centered content layer */
.s9-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 72px;
  padding: 80px 48px;
  max-width: 1300px;
  width: 100%;
}

/* ── Flowchart ── */
.s9-flowchart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: nowrap;
  color: #1a1a1a;
  width: 100%;
}

.s9-flow-node {
  flex-shrink: 0;
}

.s9-flow-label {
  font-family: 'Courier New', Courier, monospace;
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.4;
  white-space: nowrap;
}

.s9-flow-arrow {
  flex-shrink: 0;
  width: 120px;
  display: flex;
  align-items: center;
  color: #1a1a1a;
  padding: 0 12px;
}

.s9-flow-arrow svg {
  width: 100%;
  height: 20px;
  display: block;
}

/* ── Definition text ── */
.s9-definition {
  text-align: center;
  max-width: 880px;
}

.s9-def-line1 {
  font-family: 'Courier New', Courier, monospace;
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 16px;
  line-height: 1.5;
}

.s9-def-line2 {
  font-family: 'Courier New', Courier, monospace;
  font-size: 22px;
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1.7;
}

.s9-hl-red {
  color: #8B2A0D;
  font-weight: 700;
}


/* ═══════════════════════════════════════════════
   S10 — LAYERS INTRO
═══════════════════════════════════════════════ */
.s10-section {
  min-height: 100vh;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.s10-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.s10-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--blue);
  text-transform: uppercase;
}

.s10-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 80px);
  font-weight: 700;
  color: var(--off-white);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.s10-sub {
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.6vw, 18px);
  color: rgba(233,229,228,1.0);
  letter-spacing: 0.08em;
  line-height: 1.7;
}

.s10-streams {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 16px;
}

.s10-stream {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.s10-stream-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--blue);
  letter-spacing: 0.2em;
}

.s10-stream-label {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--off-white);
  letter-spacing: 0.05em;
}

.s10-divider {
  font-family: var(--font-mono);
  color: rgba(233,229,228,1.0);
  font-size: 20px;
  margin-top: 12px;
}


/* ═══════════════════════════════════════════════
   S11 / S12 / S13 — SHARED LAYER SECTION STYLES
═══════════════════════════════════════════════ */
.layer-section {
  height: 400vh;
  position: relative;
  background: var(--black);
}

/* The pinned viewport-height scene */
.layer-scene {
  height: 100vh;
  display: flex;
  position: sticky;
  top: 0;
  overflow: hidden;
  background: var(--black);
  /* each scene is fully opaque — prevents other sections bleeding through */
  isolation: isolate;
}

/* ── LEFT: heading + progress bar ── */
.layer-left {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;   /* top-to-bottom reading order */
  padding: 72px 40px 56px 56px;
  border-right: 1px solid rgba(38,86,166,0.18);
  gap: 0;
  position: relative;
  z-index: 2;
  height: 100vh;
  box-sizing: border-box;
}

.layer-left .layer-tag     { margin-bottom: 14px; }
.layer-left .layer-heading { margin-bottom: 24px; }
.layer-left .layer-role    { margin-bottom: 0; }

/* Push progress nav to the bottom of the left column */
.layer-left .layer-progress {
  margin-top: auto;
}

.layer-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--blue);
  text-transform: uppercase;
}

.layer-heading {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 800;
  color: var(--off-white);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.layer-role {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.layer-role-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(233,229,228,1.0);
  text-transform: uppercase;
}

.layer-role-desc {
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(233,229,228,1.0);
  line-height: 1.6;
  letter-spacing: 0.04em;
}

/* ── Progress nav — sits below system role ── */
.layer-progress {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 20px;
  border-top: 1px solid rgba(38,86,166,0.15);
}

.lp-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  position: relative;
  cursor: default;
}

/* vertical connector line between dots */
.lp-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 5px;
  top: calc(50% + 8px);
  width: 1px;
  height: calc(100% - 4px);
  background: rgba(38,86,166,0.2);
}

.lp-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid rgba(38,86,166,0.35);
  background: transparent;
  flex-shrink: 0;
  transition: background 0.35s ease, border-color 0.35s ease,
              box-shadow 0.35s ease;
}

.lp-item.active .lp-dot {
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 0 8px rgba(38,86,166,0.6);
}

.lp-item span {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(233,229,228,1.0);
  text-transform: uppercase;
  transition: color 0.35s ease;
}

.lp-item.active span {
  color: var(--off-white);
}

/* ── RIGHT: content panels ── */
.layer-right {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.layer-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 56px 48px 20px;
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.layer-panel.active {
  opacity: 1;
  pointer-events: auto;
}

/* Panel label (sub-heading inside the right area) */
.lpanel-label {
  position: absolute;
  top: 36px;
  left: 56px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: rgba(233,229,228,1.0);
  text-transform: uppercase;
}

/* Video + image fill */
.layer-panel video,
.layer-panel img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

/* Sketchfab iframe container */
.sketchfab-embed-wrapper {
  width: 100%;
  height: calc(100vh - 140px);
  position: relative;
}

.sketchfab-embed-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 4px;
}

/* Dual layout: 3D + image or image + video side by side */
.lpanel-dual {
  display: flex;
  gap: 20px;
  width: 100%;
  height: calc(100vh - 140px);
  align-items: stretch;
}

.lpanel-dual > * {
  flex: 1;
  min-width: 0;
  border-radius: 4px;
  overflow: hidden;
}

.lpanel-dual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: unset;
  border-radius: 4px;
}

.lpanel-dual video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: unset;
  border-radius: 4px;
}

.lpanel-dual .sketchfab-embed-wrapper {
  height: 100%;
}

/* ═══════════════════════════════════════════════
   STATS BAR — bottom of each layer panel
═══════════════════════════════════════════════ */

/* Media container: fills available space above the stats bar */
.lpanel-media {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lpanel-media video,
.lpanel-media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

.lpanel-media .sketchfab-embed-wrapper {
  width: 100%;
  height: 100%;
}

.lpanel-media.lpanel-dual {
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: stretch;
}

.lpanel-media.lpanel-dual > * {
  flex: 1;
  min-width: 0;
  border-radius: 4px;
  overflow: hidden;
}

.lpanel-media.lpanel-dual img,
.lpanel-media.lpanel-dual video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: unset;
}

/* Stats bar strip */
.stats-bar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  width: 100%;
  border-top: 1px solid rgba(38,86,166,0.22);
  margin-top: 12px;
  padding-top: 10px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 14px;
  border-right: 1px solid rgba(38,86,166,0.12);
  flex: 1;
  min-width: 110px;
}

.stat-item:last-child {
  border-right: none;
}

.sk {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(233,229,228,0.3);
  text-transform: uppercase;
  white-space: nowrap;
}

.sv {
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(233,229,228,1.0);
  letter-spacing: 0.04em;
}

.sv-flag {
  color: var(--blue);
}

/* scramble animation state */
@keyframes scramble-flicker {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

.sv.scrambling {
  color: var(--blue);
  animation: scramble-flicker 80ms linear infinite;
}

/* ── Layer note (left panel, below progress) ── */
.layer-note {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.7;
  color: rgba(233,229,228,1.0);
  border-left: 1.5px solid rgba(38,86,166,0.45);
  padding-left: 12px;
  margin-top: auto;
  padding-top: 16px;
  opacity: 1;
}

/* ══════════════════════════════════════════════
   S14 — THE ABSTRACTION OF ANATOMY
══════════════════════════════════════════════ */

.s14-section {
  background: var(--black);
  color: var(--off-white);
  font-family: var(--font-mono);
  isolation: isolate;
  padding-bottom: 80px;
}

/* ── Main text block ── */
.s14-text {
  max-width: 780px;
  margin: 0 auto;
  padding: 120px 40px 80px;
  text-align: center;
}

.s14-preheading {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(233,229,228,1.0);
  margin-bottom: 24px;
}

.s14-heading {
  font-family: var(--font-sans);
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--off-white);
  margin-bottom: 48px;
}

.s14-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.8;
  color: rgba(233,229,228,1.0);
  margin-bottom: 40px;
}

.s14-body p { margin: 0; }

.s14-question {
  font-size: 15px;
  line-height: 2;
  border-left: 2px solid rgba(38,86,166,0.6);
  text-align: left;
  padding-left: 20px;
  margin-top: 8px !important;
}

.s14-question em {
  color: var(--off-white);
  font-style: italic;
}

.s14-divider {
  width: 60px;
  height: 1px;
  background: rgba(38,86,166,0.5);
  margin: 40px auto;
}

.s14-intro-line {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(233,229,228,1.0);
  text-transform: uppercase;
  margin-bottom: 28px;
}

/* ── Clickable links list ── */
.s14-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(233,229,228,0.08);
}

.s14-link {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 24px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(233,229,228,0.08);
  color: var(--off-white);
  font-family: var(--font-serif);
  font-size: 18px;
  font-style: italic;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}

.s14-link:last-child { border-bottom: none; }
.s14-link:hover { background: rgba(38,86,166,0.07); }
.s14-link.open { background: rgba(38,86,166,0.10); }

.s14-link-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(233,229,228,1.0);
  font-style: normal;
  min-width: 20px;
}

.s14-link-text { flex: 1; }
.s14-link-text em { color: rgba(233,229,228,1.0); font-size: 15px; }

.s14-link-arrow {
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 18px solid rgba(233,229,228,1);
  background-color: transparent;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-top-color 0.4s;
  display: inline-block;
}

.s14-link.open .s14-link-arrow { transform: rotate(180deg); border-top-color: var(--blue); }

/* ── Expandable panels ── */
.s14-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  background: #0a0a0a;
  border-top: 0;
}

.s14-panel.open {
  max-height: 2000px;
}

.s14-panel-inner {
  padding: 0 40px 60px;
}

.s14-panel-header {
  padding: 40px 0 28px;
  border-bottom: 1px solid rgba(233,229,228,0.08);
  margin-bottom: 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.s14-panel-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.s14-panel-role {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(233,229,228,1.0);
  letter-spacing: 0.06em;
}

.s14-conf {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  opacity: 0.85;
}

/* ── Tricolumn layout ── */
.s14-tricolumn {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}

/* ── Data columns ── */
.s14-datacol {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.s14-sublayer {
  border: 1px solid rgba(233,229,228,0.07);
  border-left: 2px solid var(--accent, rgba(38,86,166,0.5));
  padding: 16px;
  background: rgba(255,255,255,0.015);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.s14-sl-name {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--off-white);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.s14-sl-type {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(233,229,228,1.0);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.s14-sl-score {
  font-family: var(--font-mono);
  font-size: 10px;
  margin-bottom: 12px;
}

.s14-datagrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 12px;
  flex: 1;
  align-content: start;
}

.s14-cell {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(233,229,228,0.06);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.s14-cell-full { grid-column: 1 / -1; }

.s14-dk {
  font-size: 8px;
  color: rgba(233,229,228,1.0);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.s14-dv {
  font-size: 11px;
  color: var(--off-white);
}

.s14-note {
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.7;
  color: rgba(233,229,228,1.0);
  border-left: 1.5px solid rgba(233,229,228,0.1);
  padding-left: 8px;
}

.s14-note em {
  color: rgba(233,229,228,1.0);
  font-style: italic;
}

/* ── Video column ── */
.s14-videocol {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.s14-videocol video {
  width: 82%;
  height: auto;
  object-fit: contain;
  border: 1px solid rgba(233,229,228,0.1);
  display: block;
}

/* ── Verdict mini ── */
.s14-verdict-mini {
  border: 1px solid rgba(233,229,228,0.1);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255,255,255,0.02);
}

.s14-vm-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(233,229,228,1.0);
}

.s14-vm-row span:last-child { font-size: 11px; }

/* ══════════════════════════════════════════════
   INTERSTITIAL TEXT SECTIONS — S15–S18
══════════════════════════════════════════════ */

.interstitial {
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 80px 40px;
  isolation: isolate;
}

/* Alternating subtle separator */
.interstitial + .interstitial {
  border-top: 1px solid rgba(233,229,228,0.05);
}

.interstitial-inner {
  max-width: 760px;
  width: 100%;
  text-align: center;
  animation: interstitial-fade-up 1s ease both;
}

@keyframes interstitial-fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.interstitial-text {
  margin: 0;
  padding: 0;
}

/* ── S15: Single sharp statement ── */
.interstitial-sharp {
  font-family: var(--font-sans);
  font-size: clamp(28px, 4.5vw, 58px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--off-white);
}

/* ── S16: Longer paragraph ── */
.interstitial-body {
  font-family: var(--font-serif);
  font-size: clamp(16px, 2.2vw, 24px);
  font-weight: 400;
  line-height: 1.85;
  color: rgba(233,229,228,1.0);
  max-width: 680px;
  margin: 0 auto;
}

/* ── S17: Definition — mono with blue rule ── */
.interstitial-definition {
  font-family: var(--font-mono);
  font-size: clamp(15px, 2vw, 22px);
  line-height: 2.2;
  color: var(--off-white);
  border-left: 2px solid rgba(38,86,166,0.7);
  text-align: left;
  padding-left: 32px;
  display: inline-block;
}

/* ── S18: Antithesis — large italic serif ── */
.interstitial-antithesis {
  font-family: var(--font-serif);
  font-size: clamp(20px, 3vw, 40px);
  font-style: italic;
  font-weight: 500;
  line-height: 1.6;
  color: var(--off-white);
  letter-spacing: 0.01em;
}

/* ── SITE DISCLAIMER ── */
.site-disclaimer {
  text-align: center;
  padding: 40px 20px;
  background: var(--black);
}

.site-disclaimer p {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--off-white);
  opacity: 0.5;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ─── MOBILE RESPONSIVENESS ──────────────────────────── */
@media (max-width: 768px) {
  /* Global / Nav */
  body {
    cursor: auto;
  }
  .cursor-dot, .cursor-ring {
    display: none !important;
  }
  nav {
    padding: 16px 20px;
  }
  .nav-logo {
    font-size: 9px;
  }

  /* S1: Hero */
  #s1 {
    padding: 100px 24px 60px;
  }
  .s1-headline {
    font-size: clamp(40px, 12vw, 52px);
    margin-bottom: 24px;
  }
  .s1-corner, .bracket-tl, .bracket-tr, .bracket-bl, .bracket-br {
    display: none;
  }

  /* S2 / S3: Image + Text */
  .img-text-section, .img-text-section.mirror {
    grid-template-columns: 1fr;
    grid-template-rows: 50vh auto;
    min-height: auto;
  }
  .its-img {
    order: 1 !important;
  }
  .its-text, .its-text.right-pad {
    order: 2 !important;
    padding: 60px 24px;
    border: none;
  }
  .section-heading {
    font-size: clamp(28px, 8vw, 36px);
  }

  /* S4 / S6: Stacked Cards */
  .card-stack-header {
    padding: 80px 24px 40px;
  }
  .stack-card, .stack-card.card-img-left {
    grid-template-columns: 1fr;
    grid-template-rows: 40vh auto;
    height: auto;
    min-height: 65vh;
  }
  .stack-card .card-right {
    order: -1 !important;
  }
  .stack-card .card-left {
    padding: 24px;
    gap: 20px;
  }
  .card-num {
    font-size: 32px;
  }

  /* S7: Geometry Terminal */
  .s7-content {
    padding: 80px 24px;
  }
  .s7-heading {
    font-size: clamp(32px, 8vw, 40px);
  }
  .s7-terminal {
    padding: 24px 16px;
    overflow-x: auto;
  }
  .terminal-line {
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
  }
  .coord-stream {
    display: none;
  }

  /* S8: Binary Pinned */
  .s8-pin-scene {
    padding: 80px 20px 40px;
  }
  .s8-title {
    font-size: 24px;
  }
  .s8-slideshow {
    width: 100%;
    height: 40vh;
  }
  .s8-text-block {
    padding: 60px 24px 80px;
  }
  .s8-def-line1 {
    font-size: 20px;
  }
  .s8-def-line2 {
    font-size: 16px;
  }

  /* S9: Flowchart */
  .s9-content {
    padding: 60px 24px;
    gap: 40px;
  }
  .s9-flowchart {
    flex-direction: column;
    gap: 16px;
  }
  .s9-flow-arrow {
    transform: rotate(90deg);
    width: 40px;
    margin: 16px 0;
  }
  .s9-def-line1 {
    font-size: 20px;
  }
  .s9-def-line2 {
    font-size: 16px;
  }

  /* S10: Layers Intro */
  .s10-title {
    font-size: clamp(28px, 8vw, 40px);
  }
  .s10-streams {
    flex-direction: column;
    gap: 16px;
  }
  .s10-divider {
    transform: rotate(90deg);
    margin: 8px 0;
  }

  /* S11-S13: Layer Scenes */
  .layer-scene {
    flex-direction: column;
  }
  .layer-left {
    width: 100%;
    height: auto;
    padding: 80px 24px 24px;
    border-right: none;
    border-bottom: 1px solid rgba(38,86,166,0.18);
    flex-shrink: 0;
  }
  .layer-right {
    flex: 1;
  }
  .layer-progress {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
  }
  .lp-item:not(:last-child)::after {
    display: none; /* Hide vertical connectors */
  }
  .layer-note {
    display: none;
  }
  .layer-panel {
    padding: 24px;
  }
  .lpanel-label {
    top: 12px;
    left: 24px;
  }
  .lpanel-dual {
    flex-direction: column;
  }
  .stats-bar {
    flex-direction: column;
    gap: 8px;
    border-top: none;
  }
  .stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(38,86,166,0.12);
    padding: 8px 0;
  }
  .stat-item:last-child {
    border-bottom: none;
  }

  /* S14: Abstraction */
  .s14-text {
    padding: 80px 24px 40px;
  }
  .s14-heading {
    font-size: clamp(28px, 8vw, 36px);
  }
  .s14-tricolumn {
    grid-template-columns: 1fr;
  }
  .s14-panel-inner {
    padding: 0 24px 40px;
  }
  .s14-panel-header {
    flex-direction: column;
    gap: 12px;
  }
  .s14-videocol {
    position: relative;
    top: 0;
    margin-top: 24px;
  }
  .s14-videocol video {
    width: 100%;
  }

  /* Interstitial Sections */
  .interstitial {
    padding: 60px 24px;
    height: auto;
    min-height: 50vh;
  }
  .interstitial-sharp {
    font-size: clamp(24px, 6vw, 28px);
  }
  .interstitial-body {
    font-size: 16px;
  }
  .interstitial-definition {
    font-size: 14px;
    padding-left: 16px;
  }
  .interstitial-antithesis {
    font-size: 18px;
  }
}