/* ═══════════════════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════════════════ */
:root {
  --black:       #000000;
  --white:       #ffffff;
  --red:         #FF333B;

  --surface:     rgba(255,255,255,0.04);
  --border:      rgba(255,255,255,0.08);
  --border-hi:   rgba(255,255,255,0.18);
  --muted:       rgba(255,255,255,0.35);
  --red-dim:     rgba(255,51,59,0.35);

  --mono: 'JetBrains Mono', monospace;

  --ease-expo:  cubic-bezier(0.16, 1, 0.3, 1);

  --pad: clamp(24px, 5vw, 72px);
  --max: 1320px;
}

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

html { scroll-behavior: auto; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth iframe { pointer-events: none; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
button { font-family: inherit; background: none; border: none; color: inherit; }
a      { color: inherit; text-decoration: none; }

::selection { background: var(--red); color: var(--white); }

/* ─── UTILITIES ──────────────────────────────────────── */
.mono      { font-family: var(--mono); }
.tag-label { font-size: 10px; letter-spacing: 4px; text-transform: uppercase; color: var(--muted); }

.badge-pill {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  border: 1px solid var(--red-dim);
  color: var(--red);
  padding: 8px 22px;
  border-radius: 100px;
  display: inline-block;
}

.ps-squad {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  border: 1px solid rgba(255,51,59,0.55);
  color: var(--white);
  padding: 7px 18px;
  border-radius: 100px;
  display: inline-block;
  align-self: flex-start; /* never stretch to full column width in flex context */
  margin-bottom: 28px;
}

.evidence-frame {
  border: 1px dashed var(--red-dim);
  border-radius: 10px;
  padding: 32px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  width: 100%;
  height: 100%;
}
.evidence-frame span {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.18);
}
.evidence-frame--lg { min-height: 100%; }

/* detail rows — shared by project slides */
.detail {
  border-left: 2px solid var(--border-hi);
  padding-left: 20px;
}
.detail-key {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.50);
  display: block;
  margin-bottom: 10px;
}
.detail-val {
  font-size: 15px;
  color: rgba(255,255,255,0.82);
  line-height: 1.8;
  font-weight: 300;
}
.detail-val--strong {
  color: var(--white);
  font-weight: 400;
  font-size: 16px;
}


/* ═══════════════════════════════════════════════════════════
   BACKGROUND BLOBS
   Large slow-moving circles drawn on a canvas inside this
   wrapper. CSS blur(80px)+contrast(3.5) merges nearby circles
   into smooth plasma blobs. Low wrapper opacity keeps the
   effect atmospheric rather than aggressive.
═══════════════════════════════════════════════════════════ */
.blob-field {
  position: fixed;
  inset: 0;
  filter: blur(52px) contrast(4);
  z-index: 1;
  pointer-events: none;
  opacity: 0.38;
  /* Promote to its own compositing layer so the expensive blur is
     rasterised once and cached; opacity changes during the hero → wheel
     transition then composite cheaply instead of re-running the filter. */
  will-change: opacity;
  transform: translateZ(0);
}

#blob-canvas {
  display: block;
  width: 100%;
  height: 100%;
}




/* ═══════════════════════════════════════════════════════════
   NAV
═══════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  padding: 20px var(--pad);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand { display: flex; align-items: center; gap: 14px; }
.nav-logo  { height: 28px; width: auto; display: block; object-fit: contain; }
.nav-logo--vmo2   { width: 62px;  height: 28px; }
.nav-logo--schmack { width: 62px; height: 28px; object-position: left center; }
.nav-x {
  font-size: 13px;
  color: rgba(255,255,255,0.25);
  line-height: 1;
}

.nav-right { display: flex; gap: 24px; }
.nav-tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-tag--dim { opacity: 0.5; }


/* ═══════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════ */
.s-hero {
  position: relative;
  z-index: 2;   /* above blob-field (1), below atmos-canvas (10) */
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px var(--pad) 80px;
  overflow: hidden;
}

.hero-grid { display: none; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
}

.hero-eyebrow {
  display: flex;
  gap: 20px;
  margin-bottom: 36px;
  opacity: 0;
}
.hero-eyebrow span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-eyebrow-sep { opacity: 0.3; }

.hero-hl {
  font-family: var(--mono);
  font-weight: 800;
  font-size: clamp(48px, 8.5vw, 110px);
  line-height: 0.93;
  letter-spacing: -3px;
  color: var(--white);
  margin-bottom: 36px;
}
.hero-hl .word { display: inline-flex; overflow: hidden; vertical-align: bottom; }
.hero-hl .char { display: inline-block; will-change: transform; }

.hero-sub {
  font-family: var(--mono);
  font-size: clamp(13px, 1.2vw, 16px);
  color: var(--muted);
  font-weight: 300;
  max-width: 500px;
  margin-bottom: 72px;
  opacity: 0;
}

.hero-cue {
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0;
}
.hero-cue-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted); /* matches .hero-sub */
  animation: cue-label-pulse 2.6s ease-in-out infinite;
}
.hero-cue-track {
  width: 64px; height: 1px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
}
.hero-cue-fill {
  height: 1px;
  width: 100%;
  background: var(--red);
  box-shadow: 0 0 6px rgba(255,51,59,0.9), 0 0 14px rgba(255,51,59,0.35);
  animation: cue-scan 2.6s ease-in-out infinite;
  transform: translateX(-100%);
}
@keyframes cue-scan {
  0%   { transform: translateX(-100%); }
  38%  { transform: translateX(0%); }
  62%  { transform: translateX(0%); }
  100% { transform: translateX(100%); }
}
@keyframes cue-label-pulse {
  0%, 32%   { opacity: 0.2; }
  45%, 55%  { opacity: 0.75; }
  68%, 100% { opacity: 0.2; }
}

.hero-bolt {
  position: absolute;
  right: clamp(-80px, -5vw, -20px);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(180px, 22vw, 340px);
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}


/* ═══════════════════════════════════════════════════════════
   PROJECTS — pinned arc-wheel + slides
═══════════════════════════════════════════════════════════ */
.s-projects {
  position: relative;
  z-index: 2;
}

.proj-sticky {
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* ── Wheel column — floats over slides, no background ── */
.proj-wheel-col {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 160px;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

/* Decorative spinning ring */
.pw-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  pointer-events: none;
  z-index: 0;
}
#pw-ring-svg {
  display: block;
  width: 100%;
  height: 100%;
  will-change: transform;
}

/* Focal dot — marks active slot at column center-right */
.pw-focal {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 6px rgba(255,51,59,0.9), 0 0 16px rgba(255,51,59,0.4);
  opacity: 0.92;
  pointer-events: none;
  z-index: 3;
}

/* Fade mask — clip numbers at edges without adding any colour overlay */
.proj-wheel-col {
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 20%,
    black 80%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 20%,
    black 80%,
    transparent 100%
  );
}

/* Arc container — JS positions each num on the circle */
.proj-wheel {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Single arc item — absolute, JS sets transform via GSAP */
.pw-num {
  font-family: var(--mono);
  font-weight: 800;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1;
  letter-spacing: -2px;
  color: var(--white);
  opacity: 0;           /* JS sets initial opacity */
  position: absolute;
  right: 36px;
  top: 50%;
  user-select: none;
  will-change: transform, opacity, color;
  transform-origin: right center;
  white-space: nowrap;
  z-index: 10;
  text-shadow: 0 0 2px rgba(0,0,0,0.3);
}

.pw-num span {
  display: block;
  pointer-events: none;
}

/* Active state */
.pw-num.is-active {
  color: var(--red);
  opacity: 1;
}

/* ── Slides column ────────────────────────────────────── */
.proj-slides-col {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.proj-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}

.proj-slide[data-idx="0"] {
  opacity: 1;
  pointer-events: auto;
}

/* Two-column grid: text | visual */
.ps-inner {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
  padding: 80px clamp(32px, 4vw, 64px) 80px clamp(160px, 14vw, 200px);
}

/* ── Text side ── */
.ps-meta {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 18px;
}
.ps-n {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--red);
  display: none; /* desktop: wheel column shows the number */
}
.ps-tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}
.ps-title {
  font-family: var(--mono);
  font-weight: 800;
  font-size: clamp(26px, 3.5vw, 52px);
  letter-spacing: -2px;
  line-height: 0.95;
  color: var(--white);
  margin-bottom: 16px;
}
.ps-title .word { display: inline-flex; overflow: hidden; vertical-align: bottom; }
.ps-title .char { display: inline-block; will-change: transform; }

.ps-details {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* ── Visual side ── */
.ps-visual {
  display: flex;
  align-items: stretch;
  height: clamp(260px, 36vh, 480px);
}

/* Folder slides: both columns stretch to the same height as the text content */
.ps-inner:has(.folder-compare) {
  align-items: stretch;       /* grid track = text content height; visual stretches to match */
  grid-template-rows: auto;   /* row sized by content, not viewport */
  align-content: start;       /* stop the auto row expanding to fill the 100vh container */
}
.ps-inner:has(.folder-compare) .ps-visual {
  height: auto;   /* override the clamp() fixed height — let grid stretch decide */
  min-height: 0;
}
.ps-frame:has(.folder-compare) {
  height: 100%; /* propagate full height down to folder-compare */
}
.ps-frame {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}
/* Red border when frame holds a comparison slider */
.ps-frame:has(.compare-wrap) {
  border-color: rgba(255,51,59,0.45);
}

/* ── Calculated impact — standalone section (after the wheel, before closing) ── */
.s-impact {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px clamp(24px, 8vw, 130px);
}
.impact-inner {
  position: relative;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 96px);
  /* stretch: the right card group matches the height of the left text block
     (This month's numbers → Total value delivered → £2.4M → May 2026) */
  align-items: stretch;
}

.impact-bolt-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
  width: clamp(180px, 28vw, 400px);
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

.impact-left,
.impact-right { position: relative; z-index: 1; }

.impact-hero-block { margin: 16px 0 0; }
.impact-prefix {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 12px;
}
.impact-main {
  font-family: var(--mono);
  font-weight: 100;
  font-size: clamp(56px, 9vw, 112px);
  letter-spacing: -4px;
  line-height: 1;
  color: var(--white);
  /* scramble flicker */
  transition: none;
}
.impact-period {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-top: 12px;
}

.impact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;   /* two parallel cards, side by side */
  grid-auto-rows: 1fr;              /* cards fill the row height */
  gap: 16px;
  height: 100%;                     /* match the left text block height */
}
.impact-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 24px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease;
  /* Value on top, label beneath — centred so the two cards read symmetrically */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.impact-stat:hover {
  border-color: rgba(255, 51, 59, 0.45);
}
/* subtle scan line on stats */
.impact-stat::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0; right: 0;
  height: 40%;
  background: linear-gradient(to bottom, transparent, rgba(255,51,59,0.04), transparent);
  animation: stat-scan 3.5s ease-in-out infinite;
}
@keyframes stat-scan {
  0%   { top: -40%; }
  100% { top: 140%; }
}
.stat-val {
  font-family: var(--mono);
  font-size: 46px;
  font-weight: 200;
  letter-spacing: -1px;
  line-height: 1;
  color: var(--white);
  margin-bottom: 14px;   /* value on top, label beneath */
}
.stat-key {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.5;
}

/* Desktop: the cards are tall (matched to the left text block), so use a
   big number and a wide gap to the label — fills the open space. */
@media (min-width: 801px) {
  .impact-stat { padding: 34px 28px; }
  .stat-val { font-size: 84px; margin-bottom: 58px; }
  .stat-key { font-size: 11px; letter-spacing: 2.5px; }
}


/* ═══════════════════════════════════════════════════════════
   CLOSING
═══════════════════════════════════════════════════════════ */
.s-closing {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px var(--pad);
  overflow: hidden;
  border-top: 1px solid var(--border);
}

.closing-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

.closing-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.closing-logo { margin-bottom: 28px; }

.closing-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 28px;
  opacity: 0;
}
.closing-cat {
  width: clamp(80px, 10vw, 120px);
  height: auto;
  display: block;
  margin: 0 auto;
}

.closing-hl {
  font-family: var(--mono);
  font-weight: 800;
  font-size: clamp(32px, 6.5vw, 82px);
  letter-spacing: -2px;
  line-height: 1.0;
  color: var(--white);
  margin-bottom: 28px;
}

.closing-sub {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
  font-weight: 300;
  margin-bottom: 32px;
  max-width: 440px;
}

.replay-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  padding: 10px 20px;
  margin-bottom: 40px;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.replay-btn:hover {
  color: var(--white);
  border-color: rgba(255,51,59,0.5);
}

/* ── Closing action row ── */
.closing-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}
/* Remove the margin that was on replay-btn alone */
.closing-actions .replay-btn { margin-bottom: 0; }

/* Export / share button */
.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 51, 59, 0.65);
  border: 1px solid rgba(255, 51, 59, 0.3);
  border-radius: 100px;
  padding: 10px 20px;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.export-btn:hover {
  color: var(--white);
  border-color: rgba(255, 51, 59, 0.7);
  background: rgba(255, 51, 59, 0.06);
}

/* ── Burst particles ── */
.burst-particle {
  position: fixed;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}
.closing-sig {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.15);
}

.closing-bolt {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  opacity: 0.06;
  pointer-events: none;
}

/* Typewriter cursor — closing headline */
.tw-cursor {
  display: inline-block;
  color: var(--white);
  animation: tw-blink 0.65s step-end infinite;
  margin-left: 2px;
}
@keyframes tw-blink { 50% { opacity: 0; } }

/* Typewriter cursor — project slide detail text */
.slide-cursor {
  display: inline;
  color: var(--red);
  font-weight: 300;
  text-shadow: 0 0 10px rgba(255,51,59,0.7);
  animation: slide-blink 0.55s step-end infinite;
}
@keyframes slide-blink { 50% { opacity: 0; } }

/* Leading dash in typed content */
.slide-dash {
  color: var(--red);
  text-shadow: 0 0 8px rgba(255,51,59,0.5);
}

/* Loading dots before Impact reveal */
.impact-loading-dots {
  display: inline-block;
  color: var(--red);
  text-shadow: 0 0 10px rgba(255,51,59,0.6);
  letter-spacing: 5px;
  font-size: 15px;
  animation: dots-pulse 0.75s ease-in-out infinite;
}
@keyframes dots-pulse {
  0%, 100% { opacity: 0.25; }
  50%       { opacity: 1; }
}


/* ═══════════════════════════════════════════════════════════
   SCROLL NARRATIVE — atmosphere + vignette
═══════════════════════════════════════════════════════════ */
.atmos-canvas {
  position: fixed;
  inset: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 10;
}

.narrative-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 11;
  /* Static gradient — JS animates only its opacity (cheap, composited)
     instead of rebuilding the gradient string every scroll frame, which
     forced a full-screen repaint and stuttered the hero → wheel scroll. */
  background: radial-gradient(ellipse at 50% 110%, rgba(255,51,59,0.26) 0%, transparent 55%);
  opacity: 0;
  will-change: opacity;
}


/* ═══════════════════════════════════════════════════════════
   BEFORE / AFTER — FOLDER TAB REVEAL
═══════════════════════════════════════════════════════════ */

/* Allow tabs to protrude above the ps-frame border */
.ps-frame:has(.folder-compare) {
  overflow: visible;
  border: none;
  background: transparent;
}

/* Outer wrapper — flex column so tab-row sits above the body */
.folder-compare {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ── Tab row — sits above the folder body ── */
.fc-tab-row {
  display: flex;
  align-items: flex-end; /* tabs hang from the bottom of this row */
  gap: 4px;
  flex-shrink: 0;
  padding-left: 2px;
  position: relative;
  z-index: 3;
}

.fc-tab {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 6px 16px 6px;
  border-radius: 6px 6px 0 0;
  border: 1px solid rgba(255,51,59,0.38);
  border-bottom: 1px solid rgba(255,51,59,0.38);
  color: rgba(255,255,255,0.7);
  background: transparent;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: color 0.25s ease, border-color 0.25s ease, padding-top 0.25s ease;
}

/* Active tab — taller, red text, solid black bg to seal seam with body */
.fc-tab.is-active {
  padding-top: 10px;
  color: var(--red);
  background: #000;
  border-color: rgba(255,51,59,0.55);
  border-bottom-color: #000; /* covers body's top border — no seam */
  margin-bottom: -1px;
  z-index: 2;
}

/* Carousel (project 02) tab carries no text — size it to match the
   "BEFORE" label tab in project 01 so the folder reads consistently. */
.fc-tab:empty {
  box-sizing: border-box;
  min-width: 78px;
  min-height: 29px;
}

/* ── Folder body — solid black with red stroke ── */
.fc-body {
  flex: 1;
  position: relative;
  border: 1px solid rgba(255,51,59,0.55);
  border-radius: 0 12px 12px 12px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  z-index: 1;
}

/* ── Closed state — solid black, shimmer + blink invite ── */
.fc-placeholder {
  position: absolute;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

/* Shimmer sweep */
.fc-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 45%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 51, 59, 0.06) 45%,
    rgba(255, 51, 59, 0.10) 50%,
    rgba(255, 51, 59, 0.06) 55%,
    transparent 100%
  );
  animation: fc-shimmer 3.2s ease-in-out infinite;
}

@keyframes fc-shimmer {
  0%   { left: -80%; }
  100% { left: 140%; }
}

/* Blinking "TAP TO OPEN" text */
.fc-placeholder-text {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 51, 59, 0.7);
  animation: fc-tap-blink 2s ease-in-out infinite;
}

@keyframes fc-tap-blink {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1;   }
}

/* ── Image faces (stacked inside body) ── */
.fc-face {
  position: absolute;
  inset: 14px; /* mount / breathing room around the screenshot */
  overflow: hidden;
  border-radius: 4px;
  will-change: transform, opacity;
  z-index: 1;
}

.fc-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;      /* show full diagram, no cropping */
  object-position: center center;
  display: block;
  pointer-events: none;
}

/* Expand button — icon-only square, bottom-right corner */
.compare-expand-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 44px;  /* min touch target */
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  z-index: 30;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.compare-expand-btn:hover {
  color: #fff;
  border-color: rgba(255,51,59,0.45);
  background: rgba(255,51,59,0.15);
}


/* ═══════════════════════════════════════════════════════════
   COMPARISON LIGHTBOX
═══════════════════════════════════════════════════════════ */

.compare-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}
.compare-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.clb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  cursor: pointer;
}

.clb-inner {
  position: relative;
  width: 90vw;
  max-width: 1380px;
  height: 84vh;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.clb-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.clb-title {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.3);
}

.clb-close {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 3px;
  color: rgba(255,255,255,0.4);
  font-size: 10px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.clb-close:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}

.clb-stage {
  flex: 1;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  /* Hide expand button inside lightbox — no nested lightbox */
}
.clb-stage .compare-expand-btn { display: none; }

@media (max-width: 600px) {
  .clb-inner { width: 96vw; height: 80vh; }
  .compare-grip { width: 32px; height: 32px; }
}


/* ═══════════════════════════════════════════════════════════
   PRINT / PDF EXPORT
   Triggered by window.print() from the EXPORT PDF button.
   Each project slide + the impact slide becomes one A4 page.
═══════════════════════════════════════════════════════════ */
@media print {

  /* ─── Portrait A4 ────────────────────────────────────── */
  @page { size: A4 portrait; margin: 16mm 18mm; }

  /* Force colour rendering */
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  /* ─── Hide screen-only chrome ───────────────────────── */
  .lock-screen,
  .blob-field,
  .atmos-canvas,
  .narrative-overlay,
  .cur, .cur-shadow,
  .nav,
  .s-hero,
  .s-closing,
  .compare-lightbox,
  .proj-wheel-col,
  .compare-expand-btn,
  .fc-tab-row,
  .impact-bolt-bg,
  .burst-particle { display: none !important; }

  /* ─── Page root ──────────────────────────────────────── */
  html, body {
    background: #000 !important;
    overflow: visible !important;
    height: auto !important;
  }

  /* ─── Unstick project container ─────────────────────── */
  .s-projects { height: auto !important; }

  .proj-sticky {
    position: static !important;
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    grid-template-columns: 1fr !important;
  }

  .proj-slides-col {
    position: static !important;
    top: auto !important;
    height: auto !important;
    overflow: visible !important;
    display: block !important;
    width: 100% !important;
  }

  /* ─── Each slide → one portrait page ────────────────── */
  .proj-slide {
    position: static !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: none !important;
    clip-path: none !important;
    transform: none !important;
    inset: auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    page-break-after: always;
    break-after: page;
  }
  .proj-slide:last-child {
    page-break-after: avoid;
    break-after: avoid;
  }

  /* Brand footer on every page */
  .proj-slide::after {
    content: 'VMO2 × SCHMACK  ·  MAY 2026  ·  MONTHLY HIGHLIGHTS';
    display: block !important;
    font-family: var(--mono);
    font-size: 7px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.22) !important;
    text-align: right;
    margin-top: 14px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 51, 59, 0.18);
  }

  /* ─── Portrait layout: text stacked above images ─────── */
  .ps-inner {
    display: block !important;   /* single column — text then images */
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
  }

  /* ── Text block ── */
  .ps-text {
    display: block !important;
    margin-bottom: 20px !important;
  }
  .ps-n {
    display: block !important;
    font-size: 9px !important;
    letter-spacing: 4px !important;
    margin-bottom: 6px !important;
    color: var(--red) !important;
  }
  .ps-title {
    font-size: 26px !important;
    letter-spacing: -1px !important;
    line-height: 1.05 !important;
    color: #fff !important;
    margin-bottom: 10px !important;
  }
  .ps-title .word { overflow: visible !important; }
  .ps-title .char { transform: none !important; opacity: 1 !important; }

  .ps-squad {
    display: inline-block !important;
    margin-bottom: 14px !important;
  }

  /* Two-column detail row (OUTCOME | IMPACT) on the same line */
  .ps-details {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
  }
  .detail { padding-left: 0 !important; }
  .detail-key {
    display: block !important;
    font-size: 8px !important;
    letter-spacing: 3px !important;
    margin-bottom: 5px !important;
    color: rgba(255,255,255,0.45) !important;
  }
  .detail-val, .detail-val--strong {
    opacity: 1 !important;
    transform: none !important;
    font-size: 11px !important;
    line-height: 1.5 !important;
    color: #fff !important;
  }
  .detail-val--strong { color: var(--red) !important; }

  /* ── Image block ── */
  .ps-visual {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    width: 100% !important;
  }
  .ps-frame {
    height: auto !important;
    overflow: visible !important;
    border: none !important;
    width: 100% !important;
  }
  .folder-compare {
    display: block !important;
    height: auto !important;
    width: 100% !important;
  }

  /* BEFORE + AFTER images side by side */
  .fc-body {
    display: flex !important;
    flex-direction: row !important;
    height: 260px !important;   /* fixed height — enough for portrait screenshots */
    overflow: hidden !important;
    background: #000 !important;
    border: 1px solid rgba(255, 51, 59, 0.4) !important;
    border-radius: 10px !important;
    gap: 0 !important;
  }
  .fc-placeholder { display: none !important; }

  .fc-face {
    position: static !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    opacity: 1 !important;
    clip-path: none !important;
    transform: none !important;
    inset: auto !important;
    padding: 10px !important;
    overflow: hidden !important;
  }
  .fc-face--before { border-right: 1px solid rgba(255,51,59,0.2) !important; }

  .fc-face--before::before { content: 'BEFORE'; }
  .fc-face--after::before  { content: 'AFTER';  }
  .fc-face--before::before,
  .fc-face--after::before {
    display: block !important;
    font-family: var(--mono);
    font-size: 7px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3) !important;
    margin-bottom: 6px;
    flex-shrink: 0;
  }
  .fc-img {
    position: static !important;
    width: 100% !important;
    height: 100% !important;
    flex: 1 !important;
    object-fit: contain !important;
    object-position: center top !important;
  }

  /* ─── Calculated Impact slide ────────────────────────── */
  .proj-slide--impact .ps-inner {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 32px !important;
    align-items: center !important;
  }
  .impact-main {
    font-size: 64px !important;
    letter-spacing: -3px !important;
    opacity: 1 !important;
    transform: none !important;
    color: #fff !important;
    line-height: 1 !important;
  }
  .impact-prefix, .impact-period {
    opacity: 1 !important;
    color: rgba(255,255,255,0.45) !important;
  }
  .stat-val {
    font-size: 32px !important;
    opacity: 1 !important;
    transform: none !important;
    color: #fff !important;
  }
  .stat-key {
    font-size: 9px !important;
    opacity: 1 !important;
    transform: none !important;
    color: rgba(255,255,255,0.45) !important;
  }
  .impact-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
  }
  .impact-stat {
    opacity: 1 !important;
    transform: none !important;
  }

} /* end @media print */


/* ═══════════════════════════════════════════════════════════
   LOCK SCREEN
   Full-screen gate. Blobs animate behind it; page content is
   hidden until correct password is entered.
═══════════════════════════════════════════════════════════ */
.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Semi-transparent so the blob field shows through */
  background: rgba(0, 0, 0, 0.78);
}

/* While lock screen is in the DOM, hide every sibling EXCEPT the blobs */
.lock-screen ~ * { visibility: hidden; }
.lock-screen ~ .blob-field { visibility: visible; }

.lock-card {
  position: relative;
  background: #000;
  border: 1px solid rgba(255, 51, 59, 0.42);
  border-radius: 20px;
  padding: 52px 64px 48px;
  width: min(420px, 88vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Multi-layer glow matching the folder-compare aesthetic */
  box-shadow:
    0 0 0 1px rgba(255, 51, 59, 0.08),
    0 0 40px rgba(255, 51, 59, 0.08),
    0 32px 80px rgba(0, 0, 0, 0.9);
}

/* ── Lock icon ── */
.lock-icon-wrap {
  width: 48px;
  height: 48px;
  margin-bottom: 28px;
  color: var(--white);
}
.lock-svg {
  width: 100%;
  height: 100%;
  overflow: visible; /* shackle animates outside viewBox */
}
/* The shackle group — transform origin is set by GSAP at runtime */
#lock-shackle-g { overflow: visible; }

/* ── Text ── */
.lock-eyebrow {
  font-size: 9px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  text-align: center;
}
.lock-title {
  font-family: var(--mono);
  font-size: clamp(17px, 1.8vw, 22px);
  font-weight: 300;
  letter-spacing: -0.3px;
  color: var(--white);
  margin-bottom: 36px;
  text-align: center;
}

/* ── Dot indicators ── */
.lock-dots {
  display: flex;
  gap: 14px;
  margin-bottom: 28px;
}
.ld {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}
.ld.is-filled {
  background: var(--red);
  border-color: var(--red);
  transform: scale(1.15);
}

/* ── Hidden input (captures keystrokes invisibly) ── */
.lock-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

/* ── Status hint ── */
.lock-hint {
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.2);
  text-align: center;
  transition: color 0.2s;
}
.lock-hint.is-error {
  color: var(--red);
}

/* ── Wrong-password shake (applied to card via GSAP) ── */
@keyframes lock-card-shake {
  0%, 100% { transform: translateX(0); }
  15%       { transform: translateX(-9px); }
  35%       { transform: translateX(9px); }
  55%       { transform: translateX(-6px); }
  75%       { transform: translateX(6px); }
  90%       { transform: translateX(-3px); }
}
.lock-card.is-shaking {
  animation: lock-card-shake 0.42s ease;
}

@media (max-width: 560px) {
  .lock-card { padding: 40px 28px 36px; }
  .lock-title { font-size: 16px; margin-bottom: 28px; }
}


/* ═══════════════════════════════════════════════════════════
   CUSTOM CURSOR  (desktop only — hidden on touch devices via JS)
═══════════════════════════════════════════════════════════ */

/* Hide the OS cursor — desktop pointer devices only, never on mobile */
@media (pointer: fine) and (min-width: 801px) {
  *, *::before, *::after { cursor: none !important; }
}

/* Keep cursor elements invisible on mobile regardless */
@media (max-width: 800px) {
  .cur, .cur-shadow { display: none !important; }
}

/* Main cursor: white ring + centre dot */
.cur {
  position: fixed;
  top: 0; left: 0;
  width: 26px; height: 26px;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  opacity: 0; /* JS shows on first move */
  will-change: transform;
}
.cur-ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  /* transform-origin must stay centre so GSAP scale/scaleX works correctly */
  transform-origin: center center;
  will-change: transform, opacity, border-width;
}
.cur-dot {
  position: absolute;
  top: 50%; left: 50%;
  width: 4px; height: 4px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* Red ghost — lags behind on fast moves */
.cur-shadow {
  position: fixed;
  top: 0; left: 0;
  width: 26px; height: 26px;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  border: 1.5px solid rgba(255, 51, 59, 0.75);
  border-radius: 50%;
  opacity: 0;
  will-change: transform, opacity;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .ps-inner { gap: clamp(24px, 3vw, 48px); }
}

@media (max-width: 800px) {
  /* ── Hero section visible on mobile ── */

  /* ── Wheel: appears within project slide content, not fixed header ── */
  .proj-wheel-col {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 120px;
    overflow: visible;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12px;
    pointer-events: auto;
    z-index: 10;
    background: transparent;  /* No shadow gradient */
  }
  /* Hide desktop-only decorations */
  .pw-ring, .pw-focal { display: none; }
  /* Numbers: arc positioning (JS calculates x/y) */
  .pw-num {
    position: absolute;
    right: auto;
    font-size: clamp(28px, 7vw, 44px);
    transform-origin: center center;
    color: white;
    font-weight: 600;
  }

  /* ── Slide area: wheel now inside slides ── */
  .proj-sticky     { overflow: visible; position: relative; }
  .proj-slides-col { top: 0; overflow: visible; position: relative; }
  .proj-slide      { overflow-y: auto; -webkit-overflow-scrolling: touch; padding-top: 120px; position: relative; }

  /* Wheel visibility controlled by JavaScript based on active slide */
  .proj-wheel-col.is-hidden { display: none; }

  /* ── Content layout ── */
  .ps-inner {
    grid-template-columns: 1fr;
    gap: 16px;   /* tighter vertical gap between text and folder */
    padding: 16px 20px 16px 20px;
  }
  /* Project number label — hidden on desktop, shown above title on mobile */
  .ps-n {
    display: block;
    font-size: 10px;
    letter-spacing: 4px;
    margin-bottom: 8px;
  }
  /* Compact text for mobile */
  .ps-title { font-size: 24px; letter-spacing: -1px; margin-bottom: 10px; }
  .ps-squad { margin-bottom: 14px; padding: 5px 14px; }
  .ps-details { gap: 16px; }
  .detail-key { margin-bottom: 6px; }
  .detail-val { font-size: 13px; line-height: 1.55; user-select: text; }
  .detail-val--strong { font-size: 14px; }
  .detail { padding-left: 14px; }
  /* Mobile: show impact slide, keep scroll cue visible */
  .hero-cue { display: flex; }

  /* Folder: fixed comfortable height — content above it scrolls into view */
  .ps-visual { height: 220px; }
  .ps-inner:has(.folder-compare) .ps-visual { height: 220px; }
  .ps-inner:has(.folder-compare) { align-content: normal; }
  /* Two parallel cards side by side on mobile too */
  .impact-grid { grid-template-columns: 1fr 1fr; }
  /* Impact section stacks to one column on mobile */
  .s-impact { min-height: auto; padding: 80px 20px; }
  .impact-inner { grid-template-columns: 1fr; gap: 28px; }
}

/* ═══════════════════════════════════════════════════════════
   IMAGE CAROUSEL (Project 2)
═══════════════════════════════════════════════════════════ */

/* Allow carousel folder tab to protrude above the ps-frame */
.ps-frame:has(.image-carousel) {
  overflow: visible;
  border: none;
  background: transparent;
}

.image-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255,51,59,0.55);
  border-radius: 0 12px 12px 12px;
  margin-top: 16px;
}

.image-carousel::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 2px;
  width: 96px;
  height: 16px;
  background: #000;
  border: 1px solid rgba(255, 51, 59, 0.55);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  z-index: 10;
}

.carousel-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  z-index: 20;
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: auto;
  border-radius: inherit;
  overflow: hidden;
}

/* Shimmer sweep (same as fc-placeholder) */
.carousel-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 45%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 51, 59, 0.06) 45%,
    rgba(255, 51, 59, 0.10) 50%,
    rgba(255, 51, 59, 0.06) 55%,
    transparent 100%
  );
  animation: carousel-shimmer 3.2s ease-in-out infinite;
}

@keyframes carousel-shimmer {
  0%   { left: -80%; }
  100% { left: 140%; }
}

.carousel-placeholder.hidden {
  opacity: 0;
  pointer-events: none;
}

.carousel-placeholder-text {
  position: relative;
  z-index: 1;
  font-family: var(--mono);
  font-size: 9px; /* match project 01 .fc-placeholder-text */
  letter-spacing: 0.28em;
  color: rgba(255, 51, 59, 0.7);
  text-transform: uppercase;
  animation: carousel-tap-blink 2s ease-in-out infinite;
}

@keyframes carousel-tap-blink {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1;   }
}

.carousel-track {
  width: 100%;
  height: 100%;
  position: relative; /* slides stack absolutely on top of each other */
  overflow: hidden;
}

/* Slides stack and crossfade. No CSS transforms — avoids GPU-layer
   repaint glitches some mobile browsers hit with a translated track,
   which previously left the second image blank. */
.carousel-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
}

.carousel-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.carousel-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-hi);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: var(--white);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 15;
}

.image-carousel.is-revealed .carousel-nav,
.folder-compare.is-revealed .carousel-nav {
  display: flex;
  pointer-events: auto;
}

.carousel-nav:hover {
  background: rgba(255, 51, 59, 0.4);
  border-color: var(--red);
  transform: translateY(-50%) scale(1.05);
}

.carousel-nav--prev {
  left: 12px;
}

.carousel-nav--next {
  right: 12px;
}

.carousel-expand-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  z-index: 30;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
}

.carousel-expand-btn:hover {
  color: #fff;
  border-color: rgba(255,51,59,0.45);
  background: rgba(255,51,59,0.15);
}

.clb-stage .carousel-expand-btn { display: none; }

/* Carousel inside lightbox should fill entire stage */
.clb-stage .image-carousel {
  margin-top: 0;
  border-radius: 10px;
  height: 100%;
  width: 100%;
}

.clb-stage .image-carousel::before {
  display: none;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE NAVIGATION: Header wheel + swipe
═══════════════════════════════════════════════════════════ */

/* Hidden by default on desktop — only shown on mobile */
.proj-mobile-header { display: none; }
.proj-swipe-wrapper { display: contents; }

@media (max-width: 768px) {
  /* Hide desktop wheel on mobile */
  .proj-wheel-col { display: none !important; }

  /* Section flows in the page (not pinned): the sticky header stays put
     while the project content scrolls vertically beneath it. */
  .proj-sticky {
    height: auto !important;
    min-height: 100vh;
    overflow: visible !important;
    position: relative;
    display: block;
  }

  /* Mobile wheel header — sticks to the top while content scrolls.
     Transparent: the numbers sit on the (black) project backdrop with no box. */
  .proj-mobile-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    width: 100%;
    height: 88px;
    background: transparent;
    z-index: 50;
    transition: opacity 0.35s ease;
  }
  /* Hidden once the numbers section takes over the screen */
  .proj-mobile-header.is-hidden { opacity: 0; pointer-events: none; }

  .proj-mobile-numbers {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;  /* contain the drum motion at the edges */
  }

  /* Drum numbers — absolutely centred; JS positions each via transform,
     so they glide left↔right with the same inertia as the desktop wheel. */
  .pmn {
    position: absolute;
    left: 50%;
    top: 50%;
    font-family: var(--mono);
    font-weight: 700;
    font-size: 30px;
    letter-spacing: 1px;
    line-height: 1;
    color: #ffffff;          /* inactive = white (dimmed via JS opacity) */
    white-space: nowrap;
    will-change: transform, opacity;
  }
  .pmn.active { color: var(--red); }   /* centred number = red */

  /* Slides column: relative box whose height JS sets to the active
     project, so the whole page scrolls to reveal the full folder. */
  .proj-slides-col {
    position: relative !important;
    width: 100%;
    height: auto;
    overflow: visible !important;
  }

  /* Slides stack at the top of the column; only the active one shows. */
  .proj-slide {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: auto !important;
    display: block !important;
    overflow: visible !important;
    padding-top: 0 !important;
    -webkit-overflow-scrolling: auto;
  }

  /* ─── Mobile project content layout ─────────────────── */
  /* Convert desktop 2-column grid to mobile single-column */
  .ps-inner {
    display: block !important;
    grid-template-columns: auto !important;
    grid-template-rows: auto !important;
    gap: 0 !important;
    width: 100% !important;
    height: auto !important;
    padding: 40px 20px !important;
    align-items: auto !important;
    align-content: auto !important;
  }

  /* Text content area */
  .ps-meta {
    margin-bottom: 12px !important;
  }

  .ps-n {
    display: block !important;
    font-size: 9px !important;
    margin-bottom: 6px !important;
  }

  .ps-title {
    font-size: clamp(20px, 6vw, 28px) !important;
    line-height: 1.1 !important;
    margin-bottom: 12px !important;
  }

  .ps-title .word {
    overflow: visible !important;
  }

  .ps-title .char {
    transform: none !important;
    opacity: 1 !important;
  }

  .ps-squad {
    margin-bottom: 12px !important;
  }

  /* Stack OUTCOME and IMPACT vertically on mobile */
  .ps-details {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    margin-bottom: 24px !important;
  }

  .detail {
    padding-left: 0 !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid rgba(255, 51, 59, 0.15);
  }

  .detail:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .detail-key {
    font-size: 8px !important;
    letter-spacing: 2px !important;
    margin-bottom: 6px !important;
    color: rgba(255, 255, 255, 0.45) !important;
  }

  .detail {
    padding-left: 12px !important;
  }

  .detail-val,
  .detail-val--strong {
    font-size: 13px !important;
    line-height: 1.6 !important;
    opacity: 1 !important;
    transform: none !important;
  }

  /* Visual content area — needs an explicit height on mobile so the
     folder body (and the images inside it) have room. With height:auto
     the flex/100%-height chain collapsed the body to ~0, hiding images. */
  .ps-visual {
    display: block !important;
    width: 100% !important;
    height: 320px !important;
    min-height: 0 !important;
  }

  .ps-frame {
    width: 100% !important;
    height: 100% !important;
    overflow: visible !important;
    border-radius: 12px !important;
  }

  /* Carousel on mobile */
  .carousel-placeholder-text {
    font-size: 9px !important;
  }
}

@media (max-width: 560px) {
  .proj-wheel-col { display: block; } /* keep wheel — it's the top bar on mobile */
  .proj-sticky    { grid-template-columns: 1fr; }
  .nav-tag--dim   { display: none; }
  .pw-num { font-size: clamp(24px, 6vw, 36px); }
}
