/* ═══════════════════════════════════════════════════════════════════
   MRS. SUMAN SINGH — A CINEMATIC TRIBUTE
   style.css · v2.0
   ─────────────────────────────────────────────────────────────────
   Design Language : Glassmorphism · Paper Textures · School Motifs
   Architecture    : 8-Act scroll-based storytelling
   Visual Layer    : Background images, SVG illustrations, parallax
   ═══════════════════════════════════════════════════════════════════ */


/* ───────────────────────────────────────────────────────────────────
   §0  CUSTOM PROPERTIES
   ─────────────────────────────────────────────────────────────────── */

:root {
  /* ── Palette ── */
  --bg-deep:          #0a0e1a;
  --bg-soft:          #0f1625;
  --bg-panel:         #121a2e;
  --primary:          #4a90d9;
  --primary-glow:     rgba(74, 144, 217, 0.35);
  --secondary:        #1e3a5f;
  --secondary-light:  #264a75;

  /* Glass */
  --glass:            rgba(255, 255, 255, 0.08);
  --glass-strong:     rgba(255, 255, 255, 0.15);
  --glass-border:     rgba(255, 255, 255, 0.12);
  --glass-border-strong: rgba(255, 255, 255, 0.22);
  --glass-blur:       8px;
  --glass-blur-strong: 12px;

  /* Text */
  --text-light:       #e8edf5;
  --text-dim:         #8a9bb5;
  --text-chalk:       #d4dce8;
  --text-muted:       #566a88;

  /* Warm accents */
  --sticky-yellow:    #f5c842;
  --sticky-pink:      #f0a0b0;
  --sticky-blue:      #7ecdf4;
  --stamp-red:        #c0392b;

  /* Comic */
  --comic-border:     #2a3f5f;

  /* Misc */
  --blackboard:       #1a2e1a;
  --blackboard-border:#3a4a3a;
  --gold:             #f5c842;
  --success-green:    #27ae60;
  --danger-red:       #e74c3c;

  /* ── Typography ── */
  --font-heading:     'Outfit', sans-serif;
  --font-body:        'Inter', sans-serif;
  --font-quote:       'Playfair Display', serif;
  --font-handwritten: 'Caveat', cursive;

  /* ── Spacing ── */
  --section-pad:      clamp(3rem, 8vw, 7rem);
  --section-pad-x:    clamp(1.25rem, 5vw, 4rem);
  --radius:           16px;
  --radius-sm:        10px;
  --radius-lg:        24px;

  /* ── Motion ── */
  --ease-out-expo:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quint:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring:      cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-base:  0.8s var(--ease-out-expo);
  --transition-fast:  0.45s var(--ease-out-expo);
  --transition-slow:  1.2s var(--ease-out-expo);

  /* ── Z-layers ── */
  --z-bg:             -1;
  --z-content:        1;
  --z-overlay:        10;
  --z-popup:          100;
  --z-audio:          100;
  --z-shutter:        1000;
}


/* ───────────────────────────────────────────────────────────────────
   §1  RESET & BASE
   ─────────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--sticky-blue));
  border-radius: 5px;
  border: 2px solid var(--bg-deep);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--sticky-blue);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-light);
  background: var(--bg-deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--sticky-blue); }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

::selection {
  background: var(--primary);
  color: var(--bg-deep);
}


/* ───────────────────────────────────────────────────────────────────
   §1.5 PRELOADER SCREEN
   ─────────────────────────────────────────────────────────────────── */

#site-preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(5, 8, 17, 0.35);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition: opacity 0.8s ease, visibility 0.8s;
}

#site-preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
}

.preloader-spinner {
  width: 55px;
  height: 55px;
  border: 3px solid rgba(74, 144, 217, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: preloaderSpin 1.1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
  box-shadow: 0 0 25px rgba(74, 144, 217, 0.25);
}

.preloader-text {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: var(--text-light);
  opacity: 0.8;
  text-transform: uppercase;
  min-height: 1.5em;
  text-align: center;
  transition: opacity 0.25s ease;
  text-shadow: 0 0 10px rgba(74, 144, 217, 0.15);
}

@keyframes preloaderSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


/* ───────────────────────────────────────────────────────────────────
   §2  EXPERIENCE WRAPPER & AMBIENT CANVAS
   ─────────────────────────────────────────────────────────────────── */

.experience-wrapper {
  position: relative;
  width: 100%;
  min-height: 100vh;
}

#ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-bg);
  pointer-events: none;
}


/* ───────────────────────────────────────────────────────────────────
   §3  ACT SECTION — shared base
   ─────────────────────────────────────────────────────────────────── */

.act-section {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  padding: var(--section-pad) var(--section-pad-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.act-section-wide {
  padding-left: 0;
  padding-right: 0;
}


/* ───────────────────────────────────────────────────────────────────
   §4  INTRO SHUTTER
   ─────────────────────────────────────────────────────────────────── */

#intro-shutter {
  position: fixed;
  inset: 0;
  z-index: var(--z-shutter);
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  overflow: hidden;
  pointer-events: auto;
}

#intro-shutter.dismissed {
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s 1.5s;
}

#intro-shutter.dismissed #shutter-bg,
#intro-shutter.dismissed .shutter-gradient-overlay {
  opacity: 0;
  transition: opacity 1.5s cubic-bezier(0.85, 0, 0.15, 1);
}

.shutter-half {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  background: #050811;
  z-index: 1;
  transition: transform 1.5s cubic-bezier(0.85, 0, 0.15, 1);
  will-change: transform;
}

.shutter-left {
  left: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.shutter-right {
  right: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

#intro-shutter.dismissed .shutter-left {
  transform: translateX(-100%);
}

#intro-shutter.dismissed .shutter-right {
  transform: translateX(100%);
}

.shutter-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

#intro-shutter.dismissed .shutter-content {
  opacity: 0;
  transform: scale(0.95);
}

.shutter-text {
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  max-width: 600px;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.shutter-text.visible {
  opacity: 1;
}

/* Typewriter cursor */
.shutter-text .cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--primary);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: cursorBlink 0.85s steps(1) infinite;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* Enter button */
.enter-btn {
  position: relative;
  padding: 14px 48px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border-strong);
  border-radius: 60px;
  cursor: pointer;
  overflow: hidden;
  opacity: 0;
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast),
              border-color var(--transition-fast),
              opacity 0.8s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 2rem;
}

.enter-btn.visible {
  opacity: 1;
  animation: borderGlowPulse 3s ease-in-out infinite;
}

.enter-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 40px var(--primary-glow),
              inset 0 0 40px rgba(74, 144, 217, 0.08);
  border-color: var(--primary);
}

.enter-btn:active {
  transform: scale(0.97);
}

@keyframes borderGlowPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(74, 144, 217, 0.12); }
  50%      { box-shadow: 0 0 30px var(--primary-glow); }
}


/* ───────────────────────────────────────────────────────────────────
   §5  ACT 1 — THE BELL
   ─────────────────────────────────────────────────────────────────── */

#act-bell {
  min-height: 120vh;
  justify-content: flex-start;
  padding-top: 15vh;
}

.assembly-text {
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--text-dim);
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity var(--transition-base), transform var(--transition-base);
  transform: translateY(20px);
  margin-bottom: 1rem;
}

.assembly-text.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-name {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(3rem, 10vw, 8rem);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text-light);
  position: relative;
  text-align: left;
  align-self: flex-start;
  padding-left: 8%;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  will-change: transform, opacity;
}

.hero-name .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px) rotate(2deg);
  transition: opacity 0.6s var(--ease-out-expo),
              transform 0.7s var(--ease-out-expo);
}

.hero-name .word.visible {
  opacity: 1;
  transform: translateY(0) rotate(0);
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(0.85rem, 2vw, 1.15rem);
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-left: 8%;
  align-self: flex-start;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--transition-base), transform var(--transition-base);
  transition-delay: 0.4s;
}

.hero-subtitle.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Floating glass photo panels */
/* Floating glass photo panels */
.glass-photo-layers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-content);
}

.glass-photo-layer {
  position: absolute;
  background: var(--glass);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  opacity: 0;
  transition: opacity var(--transition-slow), transform var(--transition-slow);
  will-change: transform, opacity;
  pointer-events: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* Sketch canvas overlay */
.sketch-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
}


/* ───────────────────────────────────────────────────────────────────
   §6  ACT 2 — LECTURES
   ─────────────────────────────────────────────────────────────────── */

#act-lectures {
  background:
    /* notebook lines */
    repeating-linear-gradient(
      to bottom,
      transparent,
      transparent 31px,
      rgba(74, 144, 217, 0.06) 31px,
      rgba(74, 144, 217, 0.06) 32px
    );
  position: relative;
}

/* Red margin line */
.notebook-bg {
  position: relative;
}

.doodle-margin {
  position: absolute;
  top: 0;
  left: clamp(40px, 8vw, 90px);
  bottom: 0;
  width: 2px;
  background: rgba(220, 80, 80, 0.18);
  z-index: 0;
}

/* Warning card */
.warning-card {
  position: relative;
  max-width: 540px;
  width: 100%;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  margin: 0 auto 3rem;
}

.warning-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--danger-red), var(--sticky-yellow));
  border-radius: var(--radius) var(--radius) 0 0;
}

.warning-card h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--danger-red);
  margin-bottom: 1.2rem;
}

.warning-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.warning-card li {
  font-size: 0.95rem;
  color: var(--text-dim);
  padding-left: 1.2em;
  position: relative;
}

.warning-card li::before {
  content: '⚠';
  position: absolute;
  left: 0;
  font-size: 0.75rem;
}

/* Floating idiom badges */
.idiom-float {
  display: inline-block;
  padding: 8px 20px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  background: rgba(15, 22, 37, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 40px;
  cursor: pointer;
  user-select: none;
  transition: transform var(--transition-fast),
              border-color var(--transition-fast),
              box-shadow var(--transition-fast);
  animation: idiomDrift 6s ease-in-out infinite alternate;
  will-change: transform;
}

.idiom-float:nth-child(2n)  { animation-delay: -1.5s; animation-duration: 7s; }
.idiom-float:nth-child(3n)  { animation-delay: -3s;   animation-duration: 5.5s; }
.idiom-float:nth-child(5n)  { animation-delay: -0.8s; animation-duration: 8s; }

@keyframes idiomDrift {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}

.idiom-float:hover {
  transform: translateY(-4px) scale(1.05);
  border-color: var(--primary);
  box-shadow: 0 4px 24px var(--primary-glow);
}

.idiom-float.active {
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow),
              0 0 60px rgba(74, 144, 217, 0.12);
  background: rgba(74, 144, 217, 0.12);
}

/* Moral Machine */
.moral-machine {
  position: relative;
  max-width: 580px;
  width: 100%;
  min-height: 200px;
  margin: 3rem auto;
  padding: clamp(2rem, 5vw, 3rem);
  background: var(--glass-strong);
  backdrop-filter: blur(var(--glass-blur-strong));
  -webkit-backdrop-filter: blur(var(--glass-blur-strong));
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow var(--transition-fast),
              transform var(--transition-fast);
  overflow: hidden;
}

.moral-machine::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary-glow), transparent 60%);
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.moral-machine:hover::before { opacity: 1; }

.moral-machine:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.moral-machine-text {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  line-height: 1.7;
  color: var(--text-light);
  text-align: center;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.moral-machine-text.shuffling {
  opacity: 0;
  transform: translateY(10px);
}

.moral-machine .tap-hint {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1.2rem;
}

/* Achievement popup */
.achievement-popup {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-popup) - 1;
  padding: 14px 32px;
  background: linear-gradient(135deg, rgba(245, 200, 66, 0.15), rgba(245, 200, 66, 0.05));
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(245, 200, 66, 0.3);
  border-radius: 60px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: top 0.6s var(--ease-spring);
  box-shadow: 0 8px 32px rgba(245, 200, 66, 0.12);
}

.achievement-popup.active {
  top: 28px;
}

.achievement-popup .achievement-icon {
  margin-right: 8px;
}


/* ───────────────────────────────────────────────────────────────────
   §7  ACT 3 — THE WALKOUT
   ─────────────────────────────────────────────────────────────────── */

#act-walkout {
  justify-content: center;
  align-items: center;
}

/* Noise meter */
.noise-meter-container {
  position: absolute;
  right: clamp(16px, 3vw, 40px);
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 200px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 100px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.noise-meter-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0%;
  background: linear-gradient(to top, var(--success-green), var(--sticky-yellow), var(--danger-red));
  border-radius: 100px;
  transition: height 0.3s ease;
  box-shadow: 0 0 12px rgba(231, 76, 60, 0.3);
}

.noise-meter-label {
  position: absolute;
  right: clamp(32px, 5vw, 60px);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* Freeze overlay — vignette */
.freeze-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.6) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.5s ease;
  z-index: 2;
}

.freeze-overlay.active {
  opacity: 1;
}

.walkout-text {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: clamp(1.3rem, 3.5vw, 2.4rem);
  color: var(--text-light);
  text-align: center;
  max-width: 680px;
  line-height: 1.6;
  z-index: 3;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.walkout-text.visible {
  opacity: 1;
  transform: scale(1);
}

/* Photos sliding from sides */
.photo-slide-left,
.photo-slide-right {
  position: absolute;
  top: 50%;
  width: clamp(160px, 25vw, 300px);
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition-slow), opacity var(--transition-slow);
  opacity: 0;
  z-index: 1;
}

.photo-slide-left {
  left: -30%;
  transform: translateY(-50%) rotate(-3deg);
}

.photo-slide-left.visible {
  left: 5%;
  opacity: 1;
}

.photo-slide-right {
  right: -30%;
  transform: translateY(-50%) rotate(3deg);
}

.photo-slide-right.visible {
  right: 5%;
  opacity: 1;
}

.photo-slide-left img,
.photo-slide-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Spotlight */
.spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 50% 60% at 50% 45%,
    rgba(74, 144, 217, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}


/* ───────────────────────────────────────────────────────────────────
   §8  ACT 4 — GOA
   ─────────────────────────────────────────────────────────────────── */

#act-goa {
  padding: 0;
}

.comic-container {
  width: 100%;
  height: 100vh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}

.comic-panel {
  width: 100%;
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--section-pad-x);
  position: relative;
}

.comic-panel-inner {
  position: relative;
  max-width: 700px;
  width: 100%;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 3px solid var(--comic-border);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 rgba(42, 63, 95, 0.3);
}

.comic-panel-number {
  position: absolute;
  top: -14px;
  left: 24px;
  padding: 4px 16px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bg-deep);
  background: var(--primary);
  border-radius: 6px;
}

.comic-text {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-light);
  line-height: 1.7;
}

.comic-text em {
  font-family: var(--font-quote);
  font-style: italic;
  color: var(--primary);
}

/* Stamp overlay */
.stamp-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg) scale(1.8);
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(1.2rem, 3vw, 2rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stamp-red);
  border: 4px solid var(--stamp-red);
  border-radius: 8px;
  padding: 10px 28px;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  transition: none;
  white-space: nowrap;
}

.stamp-overlay.active {
  animation: stampIn 0.6s var(--ease-spring) forwards;
}

@keyframes stampIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-12deg) scale(3);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-12deg) scale(0.9);
  }
  100% {
    opacity: 0.85;
    transform: translate(-50%, -50%) rotate(-12deg) scale(1);
  }
}

.goa-quote {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-dim);
  text-align: center;
  max-width: 500px;
  margin: 2rem auto;
  padding: 0 var(--section-pad-x);
}


/* ───────────────────────────────────────────────────────────────────
   §9  ACT 5 — MEMORY WALL
   ─────────────────────────────────────────────────────────────────── */

#act-memory {
  align-items: stretch;
}

/* Desk surface — CSS-generated wood texture */
.desk-surface {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(60, 40, 25, 0.04) 0px,
      rgba(80, 55, 35, 0.06) 2px,
      transparent 3px,
      transparent 12px
    ),
    linear-gradient(
      180deg,
      rgba(45, 30, 18, 0.25) 0%,
      rgba(35, 22, 12, 0.35) 100%
    );
  pointer-events: none;
}

/* Sticky notes container (Scattered Collage) */
.sticky-notes-collage {
  position: relative;
  z-index: var(--z-content);
  width: 100%;
  max-width: 1100px;
  height: 750px;
  margin: 2rem auto;
}

.sticky-note {
  position: absolute;
  left: var(--left);
  top: var(--top);
  width: var(--w, 220px);
  padding: 1.5rem;
  min-height: 180px;
  border-radius: 4px;
  font-family: var(--font-handwritten);
  font-size: 1.15rem;
  line-height: 1.5;
  color: #1a1a1a;
  cursor: pointer;
  transform: rotate(var(--rotate, 0deg));
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast),
              z-index 0s;
  will-change: transform;
  box-shadow: 2px 3px 12px rgba(0, 0, 0, 0.25),
              0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Sticky note colour variants (via data-color attribute) */
.sticky-note[data-color="yellow"] {
  background: linear-gradient(135deg, #f5c842, #e6b930);
}
.sticky-note[data-color="pink"] {
  background: linear-gradient(135deg, #f0a0b0, #e890a0);
}
.sticky-note[data-color="blue"] {
  background: linear-gradient(135deg, #7ecdf4, #6abde4);
}

/* Tape strip */
.sticky-note::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  width: 50px;
  height: 16px;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 2px;
}

.sticky-note:hover {
  transform: rotate(0deg) translateY(-8px) scale(1.03) !important;
  box-shadow: 4px 8px 24px rgba(0, 0, 0, 0.35),
              0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

/* Expanded state */
.sticky-note.open {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0) !important;
  width: 90vw;
  max-width: 420px;
  min-height: 260px;
  z-index: var(--z-popup);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
}

.sticky-note-content {
  display: none;
  margin-top: 0.5rem;
}

.sticky-note.open .sticky-note-content {
  display: block;
}

.sticky-note-author {
  font-family: var(--font-handwritten);
  font-size: 1rem;
  text-align: right;
  margin-top: 1rem;
  opacity: 0.7;
}


/* ───────────────────────────────────────────────────────────────────
   §10  ACT 6 — TIMELINE (Train Windows)
   ─────────────────────────────────────────────────────────────────── */

#act-timeline {
  padding: var(--section-pad) 0;
  align-items: stretch;
}

.train-track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 2rem;
  padding: 2rem var(--section-pad-x);
  position: relative;
  scrollbar-width: none;          /* Firefox */
}

.train-track::-webkit-scrollbar {
  display: none;                  /* Chrome / Safari */
}

/* Horizontal rail line */
.track-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    var(--glass-border) 10%,
    var(--glass-border) 90%,
    transparent
  );
  z-index: 0;
  pointer-events: none;
}

.train-window {
  flex: 0 0 auto;
  width: clamp(300px, 50vw, 560px);
  scroll-snap-align: center;
  position: relative;
  z-index: var(--z-content);
  border-radius: var(--radius-lg);
  overflow: hidden;
  /* train window frame */
  border: 4px solid var(--secondary-light);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.3),
              0 8px 40px rgba(0, 0, 0, 0.25);
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.train-window:hover {
  transform: scale(1.02);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.3),
              0 12px 48px rgba(0, 0, 0, 0.35);
}

.train-window-content {
  padding: clamp(1.2rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.train-window-content img {
  width: 100%;
  border-radius: var(--radius-sm);
  aspect-ratio: 16/10;
  object-fit: cover;
}

.train-window-content p {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.window-year {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 14px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--text-light);
  background: var(--glass-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 40px;
}

/* Parallax background */
.parallax-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.08;
  background-size: cover;
  background-position: center;
  will-change: transform;
}


/* ───────────────────────────────────────────────────────────────────
   §11  ACT 7 — CLASSROOM
   ─────────────────────────────────────────────────────────────────── */

#act-classroom {
  background: linear-gradient(
    180deg,
    var(--bg-deep) 0%,
    rgba(20, 35, 20, 0.3) 50%,
    var(--bg-deep) 100%
  );
}

.classroom-canvas-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

/* Blackboard */
.blackboard {
  position: relative;
  width: 100%;
  min-height: 340px;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: linear-gradient(
    160deg,
    #1a2e1a 0%,
    #162a16 40%,
    #1e321e 100%
  );
  border: 12px solid #3a3020;
  border-radius: 6px;
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, 0.4),
    0 8px 40px rgba(0, 0, 0, 0.4);
  /* chalk dust on borders */
  outline: 2px solid rgba(180, 180, 160, 0.08);
  outline-offset: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  align-content: center;
  justify-content: center;
}

/* Chalk tray */
.blackboard::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 5%;
  right: 5%;
  height: 12px;
  background: #3a3020;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.chalk-word {
  font-family: var(--font-handwritten);
  font-size: clamp(1.3rem, 3vw, 2.2rem);
  color: var(--text-chalk);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  text-shadow: 0 0 8px rgba(212, 220, 232, 0.15);
  /* Slight chalk texture via filter */
  filter: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'><filter id='chalk'><feTurbulence baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/><feDisplacementMap in='SourceGraphic' scale='1.2'/></filter></svg>#chalk");
}

.chalk-word.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Dust particles canvas */
.dust-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.35;
}


/* ───────────────────────────────────────────────────────────────────
   §12  ACT 8 — FAREWELL
   ─────────────────────────────────────────────────────────────────── */

#act-farewell {
  min-height: 150vh;
  justify-content: flex-start;
  padding-top: 20vh;
}

.farewell-container {
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.farewell-letter {
  font-family: var(--font-quote);
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  line-height: 1.9;
  color: var(--text-dim);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-base), transform var(--transition-base),
              color var(--transition-base);
}

.farewell-letter.visible {
  opacity: 1;
  transform: translateY(0);
  color: var(--text-light);
}

.farewell-highlight {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--primary) !important;
  font-weight: 500;
}

.signature-block {
  font-family: var(--font-handwritten);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: var(--text-dim);
  text-align: right;
  margin-top: 3rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.signature-block.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Final black screen */
.final-black {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0d1e15; /* chalkboard green */
  background-image: radial-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 24px 24px;
  z-index: var(--z-shutter);
  opacity: 0;
  pointer-events: none;
  transition: opacity 2s ease;
}

.final-black.active {
  opacity: 1;
  pointer-events: auto;
}

.credits-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.6;
}

.credits-wrapper {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  width: 90%;
  max-width: 800px;
}

.final-text {
  font-family: var(--font-heading);
  font-weight: 300;
  text-align: center;
  color: #fff;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.5s var(--ease-out-expo), transform 1.5s var(--ease-out-expo);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}

.final-text.visible {
  opacity: 1;
  transform: translateY(0);
}

.final-text-dismiss {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-chalk);
}

.final-text-remain {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-family: var(--font-quote);
  color: var(--sticky-blue);
  font-style: italic;
}

.final-text-quote {
  font-family: var(--font-quote);
  font-size: clamp(1.2rem, 3.5vw, 2.2rem);
  color: var(--sticky-yellow);
}

.final-text-credits {
  font-family: var(--font-handwritten);
  font-size: clamp(1.6rem, 4.5vw, 2.8rem);
  color: var(--primary);
  margin-top: 1rem;
}


/* ───────────────────────────────────────────────────────────────────
   §13  SCROLL REVEAL SYSTEM
   ─────────────────────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  will-change: transform, opacity;
  transition: all var(--transition-base);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-left {
  transform: translateX(-80px);
}

.reveal-right {
  transform: translateX(80px);
}

.reveal-up {
  transform: translateY(60px);
}

.reveal-scale {
  transform: scale(0.8);
}

/* Stagger children */
.reveal-stagger > .reveal:nth-child(1)  { transition-delay: 0.05s; }
.reveal-stagger > .reveal:nth-child(2)  { transition-delay: 0.12s; }
.reveal-stagger > .reveal:nth-child(3)  { transition-delay: 0.19s; }
.reveal-stagger > .reveal:nth-child(4)  { transition-delay: 0.26s; }
.reveal-stagger > .reveal:nth-child(5)  { transition-delay: 0.33s; }
.reveal-stagger > .reveal:nth-child(6)  { transition-delay: 0.40s; }
.reveal-stagger > .reveal:nth-child(7)  { transition-delay: 0.47s; }
.reveal-stagger > .reveal:nth-child(8)  { transition-delay: 0.54s; }
.reveal-stagger > .reveal:nth-child(9)  { transition-delay: 0.61s; }
.reveal-stagger > .reveal:nth-child(10) { transition-delay: 0.68s; }


/* ───────────────────────────────────────────────────────────────────
   §14  AUDIO TOGGLE
   ─────────────────────────────────────────────────────────────────── */

.audio-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: var(--z-audio);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  font-size: 0.8rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: background var(--transition-fast),
              border-color var(--transition-fast),
              transform var(--transition-fast);
}

.audio-toggle:hover {
  background: var(--glass-strong);
  border-color: var(--glass-border-strong);
  transform: scale(1.05);
}

.audio-toggle .speaker-icon {
  font-size: 1rem;
}

/* Sound bars animation */
.audio-toggle .sound-bars {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 14px;
}

.audio-toggle .sound-bars span {
  display: block;
  width: 2px;
  background: var(--primary);
  border-radius: 2px;
  animation: soundBar 0.9s ease-in-out infinite alternate;
}

.audio-toggle .sound-bars span:nth-child(1) { height: 4px;  animation-delay: 0s; }
.audio-toggle .sound-bars span:nth-child(2) { height: 8px;  animation-delay: 0.15s; }
.audio-toggle .sound-bars span:nth-child(3) { height: 5px;  animation-delay: 0.3s; }
.audio-toggle .sound-bars span:nth-child(4) { height: 10px; animation-delay: 0.45s; }

.audio-toggle.muted .sound-bars span {
  animation: none;
  height: 3px;
  background: var(--text-muted);
}

@keyframes soundBar {
  0%   { height: 3px; }
  100% { height: 14px; }
}


/* ───────────────────────────────────────────────────────────────────
   §15  UTILITY CLASSES
   ─────────────────────────────────────────────────────────────────── */

/* Glassmorphism */
.glass {
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

.glass-strong {
  background: var(--glass-strong);
  backdrop-filter: blur(var(--glass-blur-strong));
  -webkit-backdrop-filter: blur(var(--glass-blur-strong));
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius);
}

/* Gradient text */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--sticky-blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Shimmer loading */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 40%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.06) 60%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: shimmerSlide 2.4s ease-in-out infinite;
}

@keyframes shimmerSlide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Font utilities */
.font-handwritten {
  font-family: var(--font-handwritten);
}

.font-quote {
  font-family: var(--font-quote);
  font-style: italic;
}

/* Section headings (act labels) */
.act-label {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Horizontal divider */
.divider-line {
  width: 60px;
  height: 1px;
  background: var(--glass-border-strong);
  margin: 2rem auto;
}

/* Backdrop overlay for modals */
.backdrop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: var(--z-popup) - 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.backdrop-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Hide scrollbar globally but allow scroll */
.no-scrollbar {
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ───────────────────────────────────────────────────────────────────
   §16  RESPONSIVE — TABLET  (≤ 768px)
   ─────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {

  :root {
    --glass-blur:        14px;
    --glass-blur-strong: 22px;
  }

  .hero-name {
    font-size: clamp(2.4rem, 9vw, 4.5rem);
    padding-left: 5%;
  }

  .hero-subtitle {
    padding-left: 5%;
    font-size: 0.8rem;
  }

  /* Photo panels shrink + reposition */
  .glass-photo-layer .photo-panel:nth-child(1) {
    width: 140px;
    height: 180px;
    top: 8%;
    right: 4%;
  }

  .glass-photo-layer .photo-panel:nth-child(2) {
    width: 110px;
    height: 110px;
    bottom: 22%;
    right: 6%;
  }

  .glass-photo-layer .photo-panel:nth-child(3) {
    display: none;
  }

    /* Sticky notes collage responsive grid */
    .sticky-notes-collage {
      height: auto !important;
      display: grid !important;
      grid-template-columns: repeat(2, 1fr) !important;
      gap: 1rem !important;
      padding: 1rem !important;
    }
    .sticky-notes-collage .sticky-note {
      position: relative !important;
      left: auto !important;
      top: auto !important;
      width: auto !important;
      transform: rotate(var(--mobile-rotate, 0deg)) !important;
      min-height: 150px !important;
    }

  .sticky-note {
    min-height: 150px;
    padding: 1.2rem;
  }

  /* Train windows full width */
  .train-window {
    width: 85vw;
  }

  /* Noise meter smaller */
  .noise-meter-container {
    height: 140px;
    right: 12px;
  }

  .walkout-text {
    font-size: clamp(1.1rem, 3vw, 1.6rem);
  }

  .photo-slide-left,
  .photo-slide-right {
    width: clamp(120px, 35vw, 180px);
  }

  /* Comic panels */
  .comic-panel-inner {
    padding: 1.5rem;
  }

  /* Blackboard */
  .blackboard {
    min-height: 240px;
    padding: 1.5rem;
    border-width: 8px;
  }

  /* Farewell */
  .farewell-container {
    gap: 2rem;
  }

  .final-text-dismiss {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }

  /* Reveal distances smaller */
  .reveal-left  { transform: translateX(-50px); }
  .reveal-right { transform: translateX(50px); }
  .reveal-up    { transform: translateY(40px); }
}


/* ───────────────────────────────────────────────────────────────────
   §17  RESPONSIVE — MOBILE  (≤ 480px)
   ─────────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {

  :root {
    --glass-blur:        10px;
    --glass-blur-strong: 16px;
  }

  body {
    font-size: 15px;
  }

  .hero-name {
    font-size: clamp(2rem, 11vw, 3rem);
    padding-left: 4%;
  }

  .hero-subtitle {
    padding-left: 4%;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
  }

  .assembly-text {
    font-size: 0.9rem;
  }

  /* Single column everything */
  .sticky-notes-grid {
    grid-template-columns: 1fr;
  }

  .train-window {
    width: 92vw;
  }

  .comic-panel-inner {
    padding: 1.2rem;
    border-width: 2px;
  }

  .comic-text {
    font-size: 0.95rem;
  }

  .stamp-overlay {
    font-size: 0.9rem;
    padding: 6px 16px;
    border-width: 3px;
  }

  /* Audio toggle compact */
  .audio-toggle {
    padding: 6px 12px;
    top: 12px;
    right: 12px;
    font-size: 0.7rem;
  }

  /* Photos hide on very small */
  .photo-slide-left,
  .photo-slide-right {
    display: none;
  }

  .noise-meter-container {
    height: 100px;
  }

  /* Blackboard */
  .blackboard {
    min-height: 200px;
    border-width: 6px;
  }

  .chalk-word {
    font-size: clamp(1rem, 4vw, 1.5rem);
  }

  /* Farewell */
  .farewell-letter {
    font-size: 1rem;
    line-height: 1.7;
  }

  .farewell-highlight {
    font-size: 1.15rem;
  }

  .final-text-dismiss {
    font-size: clamp(1.5rem, 10vw, 2.2rem);
  }

  .final-text-remain {
    font-size: 0.8rem;
  }

  /* Reveal distances smaller */
  .reveal-left  { transform: translateX(-30px); }
  .reveal-right { transform: translateX(30px); }
  .reveal-up    { transform: translateY(30px); }
}


/* ───────────────────────────────────────────────────────────────────
   §18  PREFERS-REDUCED-MOTION
   ─────────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-up,
  .reveal-scale {
    transform: none !important;
    opacity: 1 !important;
  }

  .idiom-float {
    animation: none;
  }
}


/* ───────────────────────────────────────────────────────────────────
   §19  PRINT STYLES (graceful fallback)
   ─────────────────────────────────────────────────────────────────── */

@media print {
  body {
    background: #fff;
    color: #111;
  }

  #intro-shutter,
  .audio-toggle,
  #ambient-canvas,
  .noise-meter-container,
  .freeze-overlay,
  .spotlight,
  .desk-surface,
  .dust-particles,
  .sketch-overlay {
    display: none !important;
  }

  .act-section {
    min-height: auto;
    page-break-inside: avoid;
  }

  .glass,
  .glass-strong {
    background: rgba(0, 0, 0, 0.03);
    backdrop-filter: none;
    border-color: #ccc;
  }

  .hero-name { color: #111; }
  .farewell-letter { color: #333; }
}


/* ───────────────────────────────────────────────────────────────────
   §20  MISSING ELEMENT STYLES
   ─────────────────────────────────────────────────────────────────── */

/* ── Intro Shutter ── */
.shutter-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem;
  text-align: center;
}

/* ── Hero Content (Act 1) ── */
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
}

.hero-name-line {
  display: block;
}

.hero-name-accent {
  background: linear-gradient(135deg, var(--primary), var(--sticky-blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.assembly-text-container {
  position: relative;
  z-index: 2;
  text-align: center;
  min-height: 80px;
}

/* Glass photo layers container */
.glass-photo-layers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.glass-photo-layer {
  position: absolute;
  top: calc(50% + var(--y, 0%));
  left: calc(50% + var(--x, 0%));
  transform: rotate(var(--rotate, 0deg));
  background: var(--glass);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  width: clamp(120px, 18vw, 220px);
  animation: floatGlass 8s ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  pointer-events: auto;
  opacity: 1;
}

.glass-photo-layer img {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes floatGlass {
  0% { transform: rotate(var(--rotate, 0deg)) translateY(0); }
  100% { transform: rotate(var(--rotate, 0deg)) translateY(-15px); }
}

/* ── Section Titles ── */
.section-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--text-dim);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Warning Card Internals ── */
.warning-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--danger-red);
  margin-bottom: 0.8rem;
}

.warning-icon {
  font-size: 1.2rem;
}

.warning-subtitle {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.warning-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.warning-list li {
  font-size: 0.95rem;
  color: var(--text-dim);
  padding-left: 1.5em;
  position: relative;
}

.warning-list li::before {
  content: '⚠';
  position: absolute;
  left: 0;
  font-size: 0.75rem;
}

/* ── Idioms Container ── */
.idioms-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 2rem 0;
  max-width: 700px;
  margin: 0 auto;
}

.idiom-emoji {
  font-size: 1.1rem;
  margin-right: 6px;
}

.idiom-text {
  font-weight: 500;
}

/* ── Moral Machine Internals ── */
.moral-machine-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.moral-machine-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 1.5rem;
  padding: 8px 24px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(74, 144, 217, 0.1);
  border: 1px solid rgba(74, 144, 217, 0.25);
  border-radius: 40px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.moral-machine-btn:hover {
  background: rgba(74, 144, 217, 0.2);
  transform: scale(1.05);
}

/* ── Achievement Popup Layout ── */
.achievement-popup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.achievement-text {
  display: flex;
  flex-direction: column;
}

.achievement-title {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.achievement-desc {
  font-weight: 400;
  font-size: 0.75rem;
  opacity: 0.8;
}

/* ── Walkout Section ── */
.walkout-content {
  position: relative;
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: center;
  z-index: 2;
}

.event-intro {
  text-align: center;
}

.freeze-moment {
  position: relative;
  width: 100%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.freeze-moment.active {
  opacity: 1;
}

.walkout-subtext {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-muted);
}

.walkout-punchline {
  text-align: center;
}

.punchline-text {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.punchline-first {
  color: var(--text-dim);
}

.punchline-then {
  color: var(--primary);
}

.noise-meter-track {
  width: 8px;
  height: 100%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--glass-border);
}

.noise-meter-caption {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: vertical-rl;
  margin-top: 8px;
}

/* ── Photo Gallery ── */
.photo-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  width: 100%;
  max-width: 800px;
}

.glass-photo-frame {
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition-fast);
}

.glass-photo-frame:hover {
  transform: scale(1.02);
}

.glass-photo-frame img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.photo-caption {
  display: block;
  padding: 0.8rem 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
}

/* ── Comic Panel Internals ── */
.comic-panel-content {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.comic-emoji {
  display: block;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.comic-panel-content h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--text-light);
  margin-bottom: 0.8rem;
}

.comic-panel-content p {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.goa-subquote {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ── Sticky Note Internals ── */
.sticky-note-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
  justify-content: center;
}

.sticky-note-pin {
  font-size: 1.2rem;
}

.sticky-note-label {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1a1a1a;
}

.sticky-note.open .sticky-note-front {
  display: none;
}

/* ── Desk Surface (non-absolute for memory section) ── */
#act-memory .desk-surface {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  border-radius: var(--radius-lg);
  background:
    repeating-linear-gradient(
      90deg,
      rgba(60, 40, 25, 0.04) 0px,
      rgba(80, 55, 35, 0.06) 2px,
      transparent 3px,
      transparent 12px
    ),
    linear-gradient(
      180deg,
      rgba(45, 30, 18, 0.25) 0%,
      rgba(35, 22, 12, 0.35) 100%
    );
}

/* ── Train Track Wrapper ── */
.train-track-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.train-window-img-wrap {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.train-window-img-wrap img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

/* ── Classroom Scene ── */
.classroom-scene {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

.classroom-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  border-radius: var(--radius);
}

.blackboard-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  align-content: center;
}

.chalk-word-final {
  width: 100%;
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 3rem) !important;
  margin-top: 1rem;
  color: var(--sticky-yellow) !important;
}

.classroom-quote {
  position: relative;
  z-index: 2;
  text-align: center;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--text-dim);
  max-width: 600px;
}

/* ── Farewell Internals ── */
.farewell-letter {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.farewell-line {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  line-height: 1.9;
  color: var(--text-dim);
}

.farewell-thanks {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.farewell-thank-line {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 600;
  color: var(--text-light);
  text-align: center;
}

.signature-line {
  font-size: clamp(1rem, 2vw, 1.3rem);
  margin-bottom: 1rem;
}

.signature-names {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.signature-names span {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--primary);
}

.signature-school {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  margin-top: 0.5rem;
  color: var(--text-muted);
}

/* ── Mobile photo gallery fix ── */
@media (max-width: 768px) {
  .photo-gallery {
    grid-template-columns: 1fr;
  }
  
  .glass-photo-layer {
    width: clamp(100px, 25vw, 160px);
  }
}

@media (max-width: 480px) {
  .glass-photo-layers {
    display: none;
  }
  
  .idioms-container {
    gap: 0.6rem;
  }
  
  .idiom-float {
    font-size: 0.75rem;
    padding: 6px 14px;
  }
}


/* ───────────────────────────────────────────────────────────────────
   §21  ACT BACKGROUND IMAGES & OVERLAYS
   ─────────────────────────────────────────────────────────────────── */

.act-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.15;
  pointer-events: none;
  transition: opacity 1s ease;
}

.act-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.08;
  pointer-events: none;
  mix-blend-mode: screen;
}



.act-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--bg-deep) 0%,
    transparent 15%,
    transparent 85%,
    var(--bg-deep) 100%
  );
  z-index: 1;
}


/* ───────────────────────────────────────────────────────────────────
   §22  SVG DECORATIVE ILLUSTRATIONS
   ─────────────────────────────────────────────────────────────────── */

.svg-deco {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  opacity: 0.6;
}

/* ── Act 1 SVGs ── */
.svg-deco-flag {
  top: 10%;
  right: 8%;
  animation: svgFloat 8s ease-in-out infinite alternate;
}

.svg-birds {
  position: absolute;
  top: 8%;
  left: 5%;
  z-index: 1;
  pointer-events: none;
  animation: svgDrift 12s ease-in-out infinite alternate;
}

.hero-deco-line {
  margin-top: 1rem;
  margin-left: 8%;
  opacity: 0.6;
}

/* ── Act 2 SVGs ── */
.svg-deco-book {
  top: 8%;
  right: 5%;
  animation: svgFloat 7s ease-in-out infinite alternate;
  animation-delay: -2s;
}

.svg-deco-pencil {
  bottom: 10%;
  left: 4%;
  animation: svgFloat 9s ease-in-out infinite alternate;
  animation-delay: -4s;
}

/* ── Act 3 SVGs ── */
.svg-deco-mic {
  bottom: 15%;
  left: 6%;
  animation: svgFloat 6s ease-in-out infinite alternate;
}

.svg-spotlight-rays {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* ── Act 4 SVGs ── */
.svg-deco-palm-left {
  bottom: 0;
  left: 2%;
  opacity: 0.4;
}

.svg-deco-palm-right {
  bottom: 0;
  right: 2%;
  opacity: 0.4;
}

.svg-waves {
  position: absolute;
  bottom: 5%;
  left: 0;
  z-index: 0;
  pointer-events: none;
  animation: svgDrift 10s ease-in-out infinite alternate;
}

/* ── Act 5 SVGs ── */
.svg-deco-envelope {
  top: 10%;
  right: 8%;
  animation: svgFloat 7s ease-in-out infinite alternate;
  animation-delay: -1s;
}

.svg-deco-pen {
  bottom: 15%;
  left: 6%;
  animation: svgFloat 8s ease-in-out infinite alternate;
  animation-delay: -3s;
}

/* ── Act 6 SVGs ── */
.svg-deco-train {
  top: 12%;
  right: 5%;
  animation: svgDrift 15s ease-in-out infinite alternate;
}

/* ── Act 7 SVGs ── */
.svg-deco-desk {
  bottom: 12%;
  left: 5%;
  opacity: 0.4;
}

.svg-deco-window {
  top: 8%;
  right: 6%;
  opacity: 0.4;
  animation: svgFloat 10s ease-in-out infinite alternate;
}

/* ── Act 8 SVGs ── */
.svg-deco-heart {
  top: 15%;
  left: 8%;
  animation: svgPulse 4s ease-in-out infinite;
}

.svg-deco-grad {
  top: 10%;
  right: 8%;
  animation: svgFloat 9s ease-in-out infinite alternate;
  animation-delay: -2s;
}

/* ── SVG Animations ── */
@keyframes svgFloat {
  0%   { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes svgDrift {
  0%   { transform: translateX(0); }
  100% { transform: translateX(30px); }
}

@keyframes svgPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(1.1); opacity: 0.8; }
}

/* ── Intro Shutter Bell SVG ── */
.shutter-bell-svg {
  margin-bottom: 1.5rem;
  animation: bellSwing 3s ease-in-out infinite;
}

@keyframes bellSwing {
  0%, 100% { transform: rotate(0deg); }
  25%      { transform: rotate(8deg); }
  75%      { transform: rotate(-8deg); }
}


/* ───────────────────────────────────────────────────────────────────
   §23  DESKTOP WIDESCREEN OPTIMIZATIONS (≥ 1024px)
   ─────────────────────────────────────────────────────────────────── */

@media (min-width: 1024px) {
  /* Larger section padding for desktop */
  .act-section {
    padding: clamp(5rem, 10vh, 10rem) clamp(3rem, 8vw, 8rem);
  }

  /* Hero name resized and aligned left on desktop to avoid overlaps */
  .hero-name {
    font-size: clamp(3.5rem, 5.5vw, 5.5rem);
    padding-left: 0;
  }

  .hero-subtitle {
    padding-left: 0;
    font-size: 1.15rem;
    letter-spacing: 0.12em;
  }

  .hero-deco-line {
    margin-left: 0;
    width: 300px;
  }

  /* Glass photo layers larger and more spread on desktop */
  .glass-photo-layer {
    width: clamp(180px, 16vw, 280px);
  }

  /* Warning card wider on desktop */
  .warning-card {
    max-width: 640px;
  }

  /* Idioms in a wider grid */
  .idioms-container {
    max-width: 900px;
    gap: 1.2rem;
  }

  /* Moral machine wider */
  .moral-machine {
    max-width: 680px;
  }

  /* Walkout content wider */
  .walkout-content {
    max-width: 1000px;
  }

  /* Photo gallery two columns with larger images */
  .photo-gallery {
    max-width: 1000px;
    gap: 2rem;
  }

  .glass-photo-frame img {
    aspect-ratio: 16/9;
  }

  /* Comic panels in 2x2 grid on desktop instead of scroll-snap */
  .comic-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    height: auto;
    overflow: visible;
    scroll-snap-type: none;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
  }

  .comic-panel {
    min-height: auto;
    padding: 2rem;
    scroll-snap-align: none;
  }

  /* Sticky notes in 4-column grid on desktop */
  .sticky-notes-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1100px;
  }

  /* Train windows larger */
  .train-window {
    width: clamp(400px, 40vw, 560px);
  }

  /* Blackboard wider */
  .blackboard {
    max-width: 700px;
    min-height: 380px;
  }

  /* Farewell wider */
  .farewell-container {
    max-width: 800px;
  }

  /* Section titles larger */
  .section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
  }

  /* Punchline larger */
  .punchline-text {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
  }

  /* Goa quote larger */
  .goa-quote {
    max-width: 650px;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
  }

  /* Classroom scene wider */
  .classroom-scene {
    max-width: 900px;
  }

  /* Farewell text larger */
  .farewell-line {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  }

  .farewell-highlight {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
  }

  .farewell-thank-line {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  }

  /* Final text larger */
  .final-text-dismiss {
    font-size: clamp(3rem, 6vw, 5.5rem);
  }

  .final-text-remain {
    font-size: clamp(1rem, 2vw, 1.5rem);
  }
  
  /* SVG decorations larger on desktop */
  .svg-deco-flag { width: 100px; }
  .svg-birds { width: 400px; }
  .svg-deco-book { width: 130px; }
  .svg-deco-pencil { width: 30px; }
  .svg-deco-mic { width: 60px; }
  .svg-deco-palm-left { width: 160px; }
  .svg-deco-palm-right { width: 160px; }
  .svg-deco-envelope { width: 110px; }
  .svg-deco-pen { width: 18px; }
  .svg-deco-train { width: 240px; }
  .svg-deco-desk { width: 180px; }
  .svg-deco-window { width: 110px; }
  .svg-deco-heart { width: 65px; }
  .svg-deco-grad { width: 90px; }
}


/* ───────────────────────────────────────────────────────────────────
   §24  ULTRA-WIDE DESKTOP (≥ 1440px)
   ─────────────────────────────────────────────────────────────────── */

@media (min-width: 1440px) {
  .hero-name {
    font-size: 10rem;
  }

  .act-section {
    padding: 10rem 10rem;
  }

  .comic-container {
    max-width: 1200px;
  }

  .sticky-notes-grid {
    max-width: 1200px;
  }

  .walkout-content {
    max-width: 1100px;
  }

  .photo-gallery {
    max-width: 1100px;
  }

  .train-window {
    width: 500px;
  }

  .farewell-container {
    max-width: 900px;
  }

  .classroom-scene {
    max-width: 1000px;
  }
}


/* ═══════════════════════════════════════════════════════════════════
   §25  REDESIGNED ELEMENTS & TRIBUTE EXPERIENCES
   ─────────────────────────────────────────────────────────────────── */

/* ── Shutter Cinematic Upgrades ── */
#shutter-bg {
  position: absolute;
  inset: -60px;
  background-image: url('assets/images/shutter_bg.png');
  background-size: cover;
  background-position: center;
  z-index: 0;
  filter: brightness(0.65) contrast(1.15) saturate(1.1);
  animation: shutterBgPan 25s ease-in-out infinite alternate;
}

.shutter-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(74, 144, 217, 0.55), rgba(138, 74, 217, 0.4), rgba(126, 205, 244, 0.55), rgba(74, 144, 217, 0.35));
  background-size: 400% 400%;
  animation: movingShutterGrad 10s ease infinite alternate;
  z-index: 0;
}

#intro-shutter .shutter-half {
  background: rgba(5, 8, 17, 0.25);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1;
}

#intro-shutter .shutter-content {
  z-index: 2;
}

#intro-shutter .enter-btn {
  box-shadow: 0 0 20px rgba(74, 144, 217, 0.2), inset 0 0 15px rgba(255,255,255,0.05);
  animation: enterBtnGlow 2s infinite alternate;
}

@keyframes shutterBgPan {
  0% { transform: scale(1.1) translate(0, 0); }
  50% { transform: scale(1.18) translate(-1.5%, 1%); }
  100% { transform: scale(1.1) translate(1.5%, -1%); }
}

@keyframes movingShutterGrad {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes enterBtnGlow {
  0% {
    box-shadow: 0 0 15px rgba(74, 144, 217, 0.2), inset 0 0 10px rgba(255,255,255,0.05);
    border-color: rgba(74, 144, 217, 0.35);
  }
  100% {
    box-shadow: 0 0 35px rgba(74, 144, 217, 0.65), inset 0 0 20px rgba(74, 144, 217, 0.15);
    border-color: var(--primary);
  }
}

/* ── Hero Split Layout ── */
.hero-split-container {
  display: flex;
  width: 100%;
  max-width: 1200px;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
  position: relative;
  z-index: 2;
  gap: 3rem;
}

.hero-left-side {
  flex: 1.2;
  text-align: left;
}

.hero-right-side {
  flex: 0.8;
  position: relative;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-left-side .hero-name {
  padding-left: 0 !important;
  margin-left: 0 !important;
}

.hero-left-side .hero-deco-line {
  margin-left: 0 !important;
}

.hero-left-side .hero-subtitle {
  padding-left: 0 !important;
  margin-left: 0 !important;
  text-align: left !important;
}

.hero-right-side .glass-photo-layers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-right-side .glass-photo-layer {
  position: absolute;
  top: calc(50% + var(--y, 0%));
  left: calc(50% + var(--x, 0%));
  transform: rotate(var(--rotate, 0deg));
  width: clamp(140px, 15vw, 240px);
  pointer-events: auto;
}

@media (max-width: 768px) {
  .hero-split-container {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  .hero-left-side {
    max-width: 100%;
  }
  .hero-right-side {
    max-width: 100%;
    width: 100%;
    height: 380px;
  }
  .hero-left-side .hero-name {
    text-align: center;
  }
  .hero-left-side .hero-deco-line {
    margin: 1.5rem auto 0 auto !important;
  }
}

/* ── Flashcards Grid & Interactive 3D Cards ── */
.flashcards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.2rem;
  width: 100%;
  max-width: 1200px;
  margin-top: 2rem;
  z-index: 2;
  perspective: 1200px;
}

.flashcard-wrapper {
  height: 390px;
  perspective: 1200px;
}

.flashcard {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.85s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
}

@media (min-width: 1024px) {
  .flashcard-wrapper:hover .flashcard {
    transform: rotateY(180deg);
  }
}

.flashcard.flipped {
  transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 15px 35px rgba(0,0,0,0.25);
}

.flashcard-front {
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 2.2rem;
  z-index: 2;
  transform: rotateY(0deg);
  position: relative;
}

.card-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 14, 26, 0.95) 0%, rgba(10, 14, 26, 0.5) 55%, rgba(10, 14, 26, 0.1) 100%);
  z-index: 1;
}

.card-front-content {
  position: relative;
  z-index: 2;
}

.card-front-content h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.55rem;
  color: #fff;
  margin-bottom: 0.4rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

.card-front-content p {
  font-size: 0.9rem;
  color: var(--sticky-blue);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}

.flashcard-back {
  background: rgba(12, 18, 32, 0.88);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.2rem;
  z-index: 1;
  text-align: left;
}

.flashcard-back h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 0.5rem;
}

.flashcard-back p {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-dim);
}

.card-rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.card-rules-list li {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-dim);
}

.card-rules-list strong {
  color: var(--sticky-yellow);
}

.dict-phrase {
  display: block;
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--sticky-yellow);
  margin-bottom: 0.2rem;
}

.dict-meaning {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.8rem;
}

.dict-meaning:last-child {
  margin-bottom: 0;
}

@media (max-width: 1024px) {
  .flashcards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 640px) {
  .flashcards-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .flashcard-wrapper {
    height: 350px;
  }
}

/* ── Scattered Grid Memory Wall ── */
#act-memory .sticky-notes-collage {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 3.5rem 2rem !important;
  padding: 3rem 2rem !important;
  height: auto !important;
  position: relative !important;
}

.sticky-notes-collage .sticky-note {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  width: 100% !important;
  max-width: var(--w, 230px) !important;
  margin: 0 auto !important;
  transform: translate(var(--offset-x, 0px), var(--offset-y, 0px)) rotate(var(--rotate, 0deg)) !important;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo), z-index 0.4s !important;
  z-index: 1;
}

/* Dynamically scatter cards in the DOM grid cells */
.sticky-note:nth-child(2n) {
  --offset-y: 15px;
  --offset-x: -10px;
}
.sticky-note:nth-child(3n) {
  --offset-y: -20px;
  --offset-x: 12px;
}
.sticky-note:nth-child(4n) {
  --offset-y: 10px;
  --offset-x: -15px;
}
.sticky-note:nth-child(5n) {
  --offset-y: -10px;
  --offset-x: 8px;
}

.sticky-notes-collage .sticky-note:hover {
  transform: translate(var(--offset-x, 0px), calc(var(--offset-y, 0px) - 15px)) rotate(0deg) scale(1.06) !important;
  z-index: 10 !important;
  box-shadow: 0 15px 35px rgba(0,0,0,0.4) !important;
}

.sticky-notes-collage .sticky-note.open {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) rotate(0deg) scale(1.1) !important;
  width: 90vw !important;
  max-width: 500px !important;
  height: auto !important;
  min-height: 280px !important;
  z-index: 1000 !important;
  box-shadow: 0 35px 75px rgba(0,0,0,0.65) !important;
  margin: 0 !important;
}

@media (max-width: 992px) {
  #act-memory .sticky-notes-collage {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem 1.5rem !important;
  }
  .sticky-note:nth-child(n) {
    transform: translate(0, 0) rotate(var(--mobile-rotate, 0deg)) !important;
  }
  .sticky-notes-collage .sticky-note:hover {
    transform: rotate(0deg) scale(1.04) !important;
  }
}

@media (max-width: 550px) {
  #act-memory .sticky-notes-collage {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
}

/* ── Enter Climax Button Styling ── */
.enter-climax-btn {
  position: relative;
  padding: 14px 44px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, rgba(74, 144, 217, 0.15), rgba(126, 205, 244, 0.08));
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border-strong);
  border-radius: 50px;
  cursor: pointer;
  overflow: hidden;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 0 20px rgba(74, 144, 217, 0.15);
}

.enter-climax-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 40px rgba(74, 144, 217, 0.5), inset 0 0 20px rgba(74, 144, 217, 0.1);
  border-color: var(--primary);
}

.enter-climax-btn:active {
  transform: scale(0.97);
}

/* ── Climax Overlay Experience ── */
#climax-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  width: 100vw;
  height: 100vh;
  display: none;
  opacity: 0;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}

.climax-bg {
  position: absolute;
  inset: -35px;
  background-size: cover;
  background-position: center;
  z-index: 0;
  transition: background-image 1.5s ease-in-out, background-color 1.5s ease-in-out, filter 1.5s ease-in-out;
  animation: climaxBgPan 30s ease-in-out infinite alternate;
}

.climax-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(74, 144, 217, 0.2), rgba(10, 14, 26, 0.92), rgba(126, 205, 244, 0.12));
  background-size: 400% 400%;
  animation: movingShutterGrad 12s ease infinite alternate;
  z-index: 1;
}

#climax-overlay .credits-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.climax-slides {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 900px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.climax-slide {
  position: absolute;
  opacity: 0;
  transform: translateY(30px);
  transition: none; /* Controlled via GSAP */
  text-align: center;
  width: 100%;
}

.quote-text {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  line-height: 1.5;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.85);
  font-weight: 500;
  max-width: 800px;
  margin: 0 auto;
}

.cSlide3 .quote-text,
.chalk-font {
  font-family: var(--font-handwritten) !important;
  color: var(--text-chalk) !important;
  font-size: clamp(2rem, 6vw, 4.2rem) !important;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5) !important;
}

.black-slide-text {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.credits-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.credits-quote {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  color: var(--sticky-yellow);
  text-shadow: 0 2px 15px rgba(0,0,0,0.6);
  line-height: 1.6;
}

.credits-author {
  font-family: var(--font-handwritten);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--sticky-blue);
  opacity: 0.9;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

@keyframes climaxBgPan {
  0% { transform: scale(1.15) translate(0, 0); }
  50% { transform: scale(1.23) translate(1%, -1.5%); }
  100% { transform: scale(1.15) translate(-1%, 1.5%); }
}

.reset-experience-btn {
  margin-top: 2rem;
  padding: 0.8rem 1.8rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: all var(--transition-fast) ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 10;
  pointer-events: auto;
}

.reset-experience-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(74, 144, 217, 0.35);
  transform: translateY(-2px);
}

.reset-experience-btn svg {
  transition: transform var(--transition-fast) ease;
}

.reset-experience-btn:hover svg {
  transform: translateX(-4px);
}

/* ═══════════════════════════════════════════════════════════════════
   END OF STYLESHEET
   ═══════════════════════════════════════════════════════════════════ */
