/* ============================================
   FINTECH FAILURE MUSEUM
   Design System: Financial Times × Apple × Stripe
   ============================================ */

:root {
  --bg: #050608;
  --bg-secondary: #101418;
  --card: #171B20;
  --text: #FFFFFF;
  --text-secondary: #AEB6C2;
  --accent: #CDA349;
  --red: #D64545;
  --blue: #3F8CFF;
  --green: #49C87B;
  --border: rgba(255, 255, 255, 0.06);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: auto; /* Lenis handles smooth */
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

body.engineer-mode {
  --accent: #3F8CFF;
}

/* Custom Cursor */
.cursor, .cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
}

.cursor {
  width: 8px;
  height: 8px;
  background: #fff;
  transform: translate(-50%, -50%);
  transition: width 0.2s var(--ease), height 0.2s var(--ease);
}

.cursor.expand {
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid #fff;
}

.cursor-follower {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), opacity 0.3s;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 500;
  letter-spacing: -0.02em;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 32rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  padding: 0 1.5rem;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s;
}

.nav.scrolled {
  background: rgba(5, 6, 8, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  transition: color 0.25s;
}

.nav-links a:hover {
  color: var(--text);
}

.engineer-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: none;
  transition: all 0.3s var(--ease);
  border-radius: 2px;
}

.engineer-toggle:hover,
.engineer-toggle.active {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-menu-btn {
  display: none;
  background: none;
  border: none;
  width: 28px;
  height: 20px;
  position: relative;
  cursor: none;
}

.nav-menu-btn span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--text);
  position: absolute;
  left: 0;
  transition: all 0.3s;
}

.nav-menu-btn span:first-child { top: 4px; }
.nav-menu-btn span:last-child { bottom: 4px; }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu a {
  color: var(--text);
  font-size: 1.5rem;
  text-decoration: none;
  font-family: var(--font-serif);
}

/* HERO */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

#mapCanvas {
  width: 100%;
  height: 100%;
  opacity: 0.35;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 10vw, 7.5rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 28rem;
  margin: 0 auto 3rem;
  line-height: 1.7;
  font-weight: 300;
}

.btn-enter {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--text);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.4s var(--ease);
  cursor: none;
}

.btn-enter:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(205, 163, 73, 0.05);
}

.scroll-hint {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 2;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--text-secondary), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* STATS */
.stats {
  padding: 8rem 0 6rem;
  background: var(--bg);
}

.stat-number {
  font-family: var(--font-serif);
  font-variant-numeric: tabular-nums;
}

.stat-suffix {
  font-family: var(--font-serif);
  font-size: 0.6em;
  vertical-align: super;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.4s;
  cursor: none;
}

.stat-card:hover {
  transform: translateY(-6px);
  border-color: rgba(205, 163, 73, 0.35);
}

.stat-card-inner {
  padding: 2rem 1.75rem;
}

.stat-card h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.stat-loss {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.stat-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.stat-tag {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(205, 163, 73, 0.3);
  padding: 0.25rem 0.6rem;
}

/* TIMELINE */
.timeline-section {
  padding: 6rem 0 8rem;
  position: relative;
  overflow: hidden;
}

.timeline-wrapper {
  overflow-x: auto;
  padding: 4rem 0;
  scrollbar-width: none;
}

.timeline-wrapper::-webkit-scrollbar {
  display: none;
}

.timeline-track {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: max-content;
  padding: 0 10vw;
  position: relative;
}

.timeline-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
  transform: translateY(-50%);
}

.timeline-node {
  position: relative;
  width: 180px;
  flex-shrink: 0;
  text-align: center;
  cursor: none;
  z-index: 2;
}

.timeline-node .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--text-secondary);
  margin: 0 auto 1.25rem;
  transition: all 0.4s var(--ease);
}

.timeline-node:hover .dot,
.timeline-node.active .dot {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.4);
  box-shadow: 0 0 20px rgba(205, 163, 73, 0.4);
}

.timeline-node .year {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
  transition: color 0.3s;
}

.timeline-node:hover .year,
.timeline-node.active .year {
  color: var(--accent);
}

.timeline-node .label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  max-width: 140px;
  margin: 0 auto;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.timeline-node:hover .label {
  opacity: 1;
}

.timeline-detail {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2.5rem;
  transform: translateY(100%);
  transition: transform 0.5s var(--ease);
  z-index: 500;
  max-height: 40vh;
  overflow-y: auto;
}

.timeline-detail.open {
  transform: translateY(0);
}

.timeline-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.75rem;
  cursor: none;
  line-height: 1;
}

/* COLLECTION / GALLERY */
.collection {
  padding: 6rem 0 8rem;
  background: var(--bg-secondary);
}

.collection-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.45rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: none;
  transition: all 0.3s;
  border-radius: 2px;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

.collection-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.55rem 1.25rem;
  font-size: 0.8rem;
  cursor: none;
  transition: all 0.3s;
  border-radius: 2px;
}

.btn-secondary:hover,
.btn-secondary.active {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #050608;
  padding: 0.9rem 2rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  font-weight: 500;
  border: none;
  cursor: none;
  transition: all 0.3s var(--ease);
}

.btn-primary:hover {
  background: #e0b85c;
  transform: translateY(-2px);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-auto-rows: 20px;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 3rem auto 0;
  padding: 0 2rem;
}

.gallery-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  cursor: none;
  transition: transform 0.5s var(--ease), border-color 0.4s, box-shadow 0.4s;
  position: relative;
}

.gallery-card:hover {
  transform: translateY(-8px);
  border-color: rgba(205, 163, 73, 0.4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.gallery-card .card-media {
  height: 160px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.gallery-card .card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--card), transparent 60%);
}

.gallery-card .card-year {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  z-index: 2;
}

.gallery-card .card-body {
  padding: 1.5rem;
}

.gallery-card h3 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-family: var(--font-serif);
}

.gallery-card .card-loss {
  font-size: 1.1rem;
  color: var(--red);
  margin-bottom: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.gallery-card .card-cat {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.gallery-card .card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Masonry heights via JS classes */
.gallery-card.h1 { grid-row: span 14; }
.gallery-card.h2 { grid-row: span 16; }
.gallery-card.h3 { grid-row: span 18; }
.gallery-card.h4 { grid-row: span 20; }

/* WHY */
.why {
  padding: 8rem 0;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto 5rem;
  padding: 0 2rem;
}

.why-card {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card);
  transition: border-color 0.3s;
}

.why-card:hover {
  border-color: rgba(205, 163, 73, 0.3);
}

.why-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 1.25rem;
  opacity: 0.7;
}

.why-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.why-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.root-cause {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: 0 2rem;
}

.root-cause h3 {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  color: var(--text-secondary);
}

.root-visual {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.root-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 3px solid;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.root-ring .pct {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
}

.root-ring .lbl {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* FEATURED STORY */
.featured {
  position: relative;
  background: var(--bg);
}

.featured-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
  opacity: 0.15;
}

.featured-header {
  text-align: center;
}

.featured-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 6rem);
  margin-bottom: 0.5rem;
}

.featured-meta {
  color: var(--text-secondary);
  font-size: 1rem;
}

.story-screens {
  position: relative;
  z-index: 2;
}

.story-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

.story-content {
  max-width: 640px;
  text-align: center;
}

.story-time {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.story-content h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.story-content p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.7;
}

.loss-counter {
  margin-top: 3rem;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card);
}

.loss-value {
  display: block;
  font-family: var(--font-serif);
  font-size: 3.5rem;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

.loss-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lessons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2.5rem;
  text-align: left;
}

.lesson-card {
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.lesson-card h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.lesson-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ENGINEER PANEL */
.engineer-panel {
  padding: 6rem 0;
  background: var(--bg-secondary);
  display: none;
}

body.engineer-mode .engineer-panel {
  display: block;
}

.engineer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.engineer-header {
  text-align: center;
  margin-bottom: 3rem;
}

.engineer-header h2 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.engineer-header p {
  color: var(--text-secondary);
}

.engineer-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.eng-tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.6rem 1.25rem;
  font-size: 0.8rem;
  cursor: none;
  transition: all 0.3s;
  border-radius: 2px;
}

.eng-tab.active,
.eng-tab:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.eng-pane {
  display: none;
  animation: fadeIn 0.4s var(--ease);
}

.eng-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.arch-diagram {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.arch-node {
  padding: 0.75rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.arch-node.warn {
  border-color: var(--accent);
  color: var(--accent);
}

.arch-node.danger {
  border-color: var(--red);
  color: var(--red);
}

.arch-node.loss {
  border-color: var(--red);
  background: rgba(214, 69, 69, 0.1);
  color: var(--red);
  font-weight: 500;
}

.arch-arrow {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.eng-note {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 60ch;
  margin: 0 auto;
  text-align: center;
}

.code-block {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.75rem;
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  overflow-x: auto;
  white-space: pre;
}

.sequence-list {
  list-style: none;
  max-width: 640px;
  margin: 0 auto;
}

.sequence-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.sequence-list li strong {
  color: var(--accent);
  margin-right: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.hard-lessons {
  list-style: none;
  max-width: 700px;
  margin: 0 auto;
}

.hard-lessons li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  padding-left: 1.5rem;
  position: relative;
}

.hard-lessons li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* CTA */
.cta {
  padding: 8rem 2rem;
  text-align: center;
  background: var(--bg);
}

.cta h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}

.cta p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* FOOTER */
.footer {
  padding: 4rem 2rem 3rem;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 2rem;
  align-items: end;
}

.footer-brand h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 280px;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.25s;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-credit {
  color: var(--text-secondary);
  font-size: 0.8rem;
  opacity: 0.7;
}

/* INCIDENT OVERLAY */
.incident-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
  overflow-y: auto;
}

.incident-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.overlay-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2rem;
  z-index: 2001;
  cursor: none;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s;
}

.overlay-close:hover {
  background: rgba(255,255,255,0.05);
}

.overlay-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
}

.overlay-hero {
  margin-bottom: 4rem;
}

.overlay-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1rem;
}

.overlay-meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.overlay-meta strong {
  color: var(--red);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  display: block;
}

.overlay-story p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.overlay-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.overlay-section h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 8, 0.9);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-inner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2.5rem;
  max-width: 560px;
  width: 90%;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: none;
}

.compare-selects {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.compare-selects select {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem;
  font-size: 0.9rem;
  border-radius: 3px;
  cursor: none;
}

.compare-result {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  body {
    cursor: auto;
  }
  .cursor, .cursor-follower {
    display: none;
  }
  .nav-links {
    display: none;
  }
  .nav-menu-btn {
    display: block;
  }
  .stats-grid,
  .why-grid {
    grid-template-columns: 1fr;
  }
  .lessons-grid {
    grid-template-columns: 1fr;
  }
  .gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .gallery-card.h1,
  .gallery-card.h2,
  .gallery-card.h3,
  .gallery-card.h4 {
    grid-row: auto;
  }
  .arch-diagram {
    flex-direction: column;
  }
  .arch-arrow {
    transform: rotate(90deg);
  }
  .hero-title {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }
  .section-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }
}

/* Utility */
.hidden {
  display: none !important;
}

/* Lenis recommended */
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
.lenis.lenis-scrolling iframe {
  pointer-events: none;
}
