/* ============================================================
   TutorNestJK — scroll-driven build (Yimberzol design system)
   Continuous scroll choreography · GSAP/ScrollTrigger + Lenis
   Glass cursor · 3D text wall · giant scale · horizontal deck
   ============================================================ */

:root {
  /* Apple neutral palette */
  --paper: #f5f5f7;       /* light section bg */
  --paper-2: #fafafa;
  --black: #000000;       /* dark sections + hero */
  --ink: #1d1d1f;         /* primary text */
  --ink-2: #6e6e73;       /* secondary text */
  --ink-3: #86868b;       /* tertiary text */
  --light: #f5f5f7;       /* text on dark */
  --light-2: #a1a1a6;     /* secondary on dark */
  --iris-deep: #0071e3;   /* Apple blue accent / primary button */
  --iris: #0077ed;        /* hover / focus */
  --iris-bright: #2997ff; /* accent on dark backgrounds */
  --border-d: rgba(255, 255, 255, 0.18);
  --border-l: rgba(0, 0, 0, 0.10);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: var(--font);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow-x: clip; }
body {
  background: var(--black);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
}
html { scroll-padding-top: 80px; }
.jsec { scroll-margin-top: 80px; }
::selection { background: var(--iris-deep); color: #fff; }
img { display: block; }

.container { width: min(1180px, 90vw); margin: 0 auto; }
.center { text-align: center; }

h1, h2 { font-weight: 600; letter-spacing: -0.015em; line-height: 1.05; text-wrap: balance; }
h1 em, h2 em, .serif-em {
  font-family: inherit; font-style: normal; font-weight: 600; color: var(--iris-deep);
}

.label {
  font-size: 19px; font-weight: 600; letter-spacing: 0; color: var(--iris-deep);
  display: inline-flex; align-items: center; margin-bottom: 16px;
}
.label.center { justify-content: center; }

.card-kicker {
  font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--iris-deep); margin-bottom: 12px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 28px; border-radius: 100px;
  font-size: 15px; font-weight: 600; font-family: var(--font); letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
  will-change: transform;
}
.btn:active { transform: scale(0.97); }
.btn-sm { padding: 9px 20px; font-size: 14px; }
.btn-iris { background: var(--iris-deep); color: #fff; }
.btn-iris:hover { background: var(--iris); }
.btn-ghost { color: var(--light); border-color: var(--border-d); background: rgba(243, 238, 251, 0.05); }
.btn-ghost:hover { background: rgba(243, 238, 251, 0.12); }
.btn-record { color: #fff; background: rgba(243, 238, 251, 0.08); border-color: var(--border-d); }
.btn-record:hover { background: rgba(243, 238, 251, 0.16); }

/* ---------- glass cursor ---------- */
body.glass-cursor-on, body.glass-cursor-on * { cursor: none !important; }
.glass-cursor {
  position: fixed; top: 0; left: 0; width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border-radius: 50%; pointer-events: none; z-index: 300; opacity: 0;
  background: radial-gradient(circle at 32% 26%, rgba(255,255,255,0.18), rgba(255,255,255,0.02) 52%, rgba(255,255,255,0.10) 100%);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.55), inset 0 -3px 5px rgba(255,255,255,0.16), 0 6px 18px rgba(0,0,0,0.22);
  backdrop-filter: blur(3px) saturate(165%) brightness(1.05);
  -webkit-backdrop-filter: blur(3px) saturate(165%) brightness(1.05);
  transition: opacity 0.3s var(--ease); will-change: transform;
}
.glass-cursor.visible { opacity: 1; }

/* ---------- progress rail ---------- */
.rail {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--iris-deep), var(--iris-bright));
  z-index: 200; transition: width 0.1s linear;
}

/* ---------- nav ---------- */
.nav-shell { position: fixed; top: 0; left: 0; right: 0; z-index: 120; transition: color 0.6s var(--ease); }
.nav-inner {
  width: min(1280px, 94vw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; padding: 20px 0;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 32px; }
.nav-links a { color: inherit; text-decoration: none; font-size: 15px; font-weight: 500; opacity: 0.72; transition: opacity 0.25s var(--ease); }
.nav-links a:hover { opacity: 1; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav--dark { color: var(--light); }
.nav--light { color: var(--ink); }
.nav--light .btn-record { color: var(--ink); border-color: var(--border-l); background: rgba(24,18,34,0.05); }
.nav--light .btn-record:hover { background: rgba(24,18,34,0.1); }
.burger { display: none; flex-direction: column; gap: 6px; background: none; border: none; padding: 8px; cursor: pointer; }
.burger span { width: 22px; height: 2px; border-radius: 2px; background: var(--iris-deep); transition: transform 0.3s var(--ease); }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- stage & sections ---------- */
.stage { position: relative; perspective: 1500px; perspective-origin: 50% 50%; }
.jsec {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  overflow: hidden; padding: 110px 0 70px; transform-style: preserve-3d;
}
.jsec[data-theme="light"] { background: var(--paper); color: var(--ink); }
.jsec[data-theme="dark"] { background: var(--black); color: var(--light); }

.sreveal, .sreveal-r {
  opacity: 0; transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--d, 0) * 1ms);
}
.sreveal { transform: translateY(38px); }
.sreveal-r { transform: translateX(60px); }
.jsec.play .sreveal, .jsec.play .sreveal-r { opacity: 1; transform: none; }

/* ============================================================
   0 · HERO
   ============================================================ */
.hero { padding: 0; background: #000; }
.hero-media { position: absolute; inset: -8% 0; z-index: 0; will-change: transform; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 50%; }
.hero-media canvas.hero-gl { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s var(--ease) 1.4s; }
.hero-media canvas.hero-gl.on { opacity: 1; }
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(14,10,24,0.5) 0%, rgba(14,10,24,0.2) 35%, rgba(14,10,24,0.72) 85%, var(--black) 100%),
    radial-gradient(ellipse 90% 70% at 28% 60%, rgba(14,10,24,0.32), transparent 60%);
}
.hero-inner { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5.4rem); line-height: 1.02; max-width: 17ch; text-shadow: 0 2px 40px rgba(14,10,24,0.5); }
.hero h1 em { color: var(--light); }
.hero-sub { margin-top: 26px; max-width: 470px; font-size: 17.5px; color: var(--light-2); }

/* hero search */
.hero-search {
  margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: rgba(243,238,251,0.07); border: 1px solid var(--border-d);
  padding: 12px; border-radius: 18px; max-width: 720px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.hero-search input, .hero-search select {
  background: rgba(14,10,24,0.55); border: 1px solid var(--border-d); color: var(--light);
  padding: 13px 15px; border-radius: 11px; outline: none; font: inherit; font-size: 15px;
}
.hero-search input { flex: 1; min-width: 200px; }
.hero-search input::placeholder { color: var(--light-2); }
.hero-search select { color: var(--light); }
.hero-search select option { color: #111; }
.hero-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 14px; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--light-2);
}
.scroll-cue span { width: 22px; height: 34px; border: 1.5px solid var(--border-d); border-radius: 99px; position: relative; }
.scroll-cue span::after {
  content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--light); animation: cueDot 1.8s ease-in-out infinite;
}
@keyframes cueDot { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(13px); opacity: 0; } 100% { opacity: 0; } }

/* ============================================================
   1 · HOW IT WORKS — horizontal deck
   ============================================================ */
.deck { padding: 0; flex-direction: row; overflow: hidden; background: #ffffff; }
.deck-track { display: flex; align-items: center; height: 100svh; will-change: transform; padding: 0 16px; }
.deck-panel {
  position: relative; flex: none; width: min(72vw, 1080px); height: calc(100svh - 150px);
  margin: 0 14px; border-radius: 36px; display: flex; align-items: flex-end;
  padding: clamp(34px, 4vw, 72px); overflow: hidden; text-decoration: none; color: #111;
}
.deck-panel-inner { position: relative; z-index: 2; max-width: 780px; will-change: transform; }
.deck-index {
  position: absolute; bottom: clamp(28px, 4vh, 56px); right: clamp(34px, 5vw, 80px);
  font-size: clamp(6rem, 18vw, 16rem); font-weight: 800; letter-spacing: -0.05em; line-height: 0.78;
  color: rgba(0,0,0,0.05); z-index: 1; pointer-events: none;
}
.deck-panel .card-kicker { color: #8a8780; font-size: clamp(12px, 1vw, 15px); margin-bottom: clamp(14px, 2vh, 22px); }
.deck-panel h3 {
  font-size: clamp(2.1rem, 5vw, 4.4rem); font-weight: 800; letter-spacing: -0.035em;
  line-height: 1.02; margin-bottom: clamp(16px, 2.2vh, 26px); max-width: 15ch; color: #0e0e0e;
}
.deck-desc { font-size: clamp(1rem, 1.3vw, 1.3rem); line-height: 1.5; color: var(--ink-2); max-width: 46ch; }
.deck-intro { background: #f5f5f7; }
.deck-intro .label { color: var(--iris-deep); }
.deck-intro h2 { font-size: clamp(2.6rem, 7.5vw, 6.4rem); font-weight: 600; letter-spacing: -0.025em; line-height: 1; color: #1d1d1f; }
.deck-intro h2 em { color: var(--iris-deep); }
.deck-hint { margin-top: clamp(24px, 4vh, 40px); font-size: 13px; letter-spacing: 0.02em; color: var(--ink-3); }
.deck-panel[data-fill="violet"]  { background: #f4f1fb; }
.deck-panel[data-fill="emerald"] { background: #eef9f4; }
.deck-panel[data-fill="rose"]    { background: #fcf0f3; }
.deck-panel[data-fill="indigo"]  { background: #eef1fb; }
.deck-panel[data-fill="cta"]     { background: #f5f0fb; }

/* Kashmiri cartoon art on the deck cards */
.deck-art {
  position: absolute; top: clamp(34px, 5vh, 70px); left: clamp(34px, 4vw, 72px); z-index: 1;
  width: clamp(96px, 12vw, 168px); height: clamp(96px, 12vw, 168px);
  display: grid; place-items: center;
  background: rgba(255,255,255,0.6); border-radius: 28px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.06);
  animation: deckArtFloat 6s var(--ease) infinite;
}
.deck-art svg { width: 64%; height: 64%; display: block; }
@keyframes deckArtFloat { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }

/* card 3 — text up top, cartoon kids parade along the bottom */
.deck-panel.deck-kids { align-items: flex-start; }
.kid-parade {
  position: absolute; left: 0; bottom: clamp(20px, 4vh, 48px); z-index: 2;
  display: flex; gap: clamp(20px, 3vw, 48px); width: max-content; align-items: flex-end;
  padding-left: clamp(34px, 4vw, 72px); will-change: transform;
}
.kid { flex: none; width: clamp(58px, 7vw, 96px); }
.kid svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 10px 14px rgba(0,0,0,0.12)); animation: kidBob 3.5s var(--ease) infinite; }
.kid:nth-child(2n) svg { animation-delay: .5s; }
.kid:nth-child(3n) svg { animation-delay: 1s; }
@keyframes kidBob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-7px) rotate(2deg); } }
/* no-GSAP / mobile: kids slide continuously instead of on scroll */
body:not(.gsap-on) .kid-parade { animation: kidSlide 22s linear infinite; }
@keyframes kidSlide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.deck-cta-link {
  position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 10px;
  margin-top: clamp(22px, 3vh, 34px); padding: 15px 30px; border-radius: 100px;
  background: #111; color: #fff; font-weight: 700; font-size: 16px;
}
body:not(.gsap-on) .deck-track { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
body:not(.gsap-on) .deck-panel { scroll-snap-align: center; }

/* ============================================================
   2 · BROWSE — search + 3D category boxes
   ============================================================ */
.browse { min-height: auto; align-items: flex-start; padding: 120px 0 100px; }
.browse-inner { width: min(1180px, 90vw); }
.browse-head { margin-bottom: 30px; }
.browse-head h2 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
.browse-head h2 em { color: var(--iris-deep); }
.browse-sub { color: var(--ink-2); font-size: 18px; margin-top: 10px; }

/* search + filter bar */
.search-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: #fff; border: 1px solid var(--border-l); border-radius: 18px;
  padding: 12px; box-shadow: 0 4px 18px rgba(0,0,0,0.05); margin-bottom: 44px;
}
.search-bar input, .search-bar select {
  background: #f5f5f7; border: 1px solid transparent; color: var(--ink);
  padding: 13px 15px; border-radius: 11px; font: inherit; font-size: 15px; outline: none;
}
.search-bar input { flex: 1; min-width: 220px; }
.search-bar input::placeholder { color: var(--ink-3); }
.search-bar input:focus, .search-bar select:focus { border-color: var(--iris); background: #fff; }

/* 3D animated category boxes */
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px;
  perspective: 1100px;
}
.cat-box {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--border-l); border-radius: 20px;
  padding: 26px 24px; min-height: 170px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.05);
  transform-style: preserve-3d; will-change: transform;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease);
}
.cat-box:hover { box-shadow: 0 26px 60px rgba(0,0,0,0.16); border-color: rgba(0,113,227,0.4); }
.cat-ico {
  font-size: 30px; line-height: 1; margin-bottom: auto;
  width: 56px; height: 56px; display: grid; place-items: center;
  background: #f5f5f7; border-radius: 16px; transform: translateZ(30px);
}
.cat-name { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); transform: translateZ(18px); }
.cat-meta { font-size: 14px; color: var(--ink-3); transform: translateZ(12px); }
.cat-more { background: #f5f5f7; border-style: dashed; border-color: rgba(0,113,227,0.45); }
.cat-more .cat-ico { background: #fff; color: var(--iris-deep); }
.cat-more .cat-name, .cat-more .cat-meta { color: var(--iris-deep); }

/* ============================================================
   3 · STATS — 3D animated counters
   ============================================================ */
.stats { justify-content: center; }
.stats-inner { width: min(1180px, 90vw); text-align: center; }
.stats .label { color: var(--light-2); }
.stats h2 { color: var(--light); font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: clamp(40px, 6vh, 72px); }
.stats h2 em { color: var(--iris-bright); }
.stats-row { display: flex; justify-content: center; align-items: stretch; flex-wrap: wrap; gap: clamp(14px, 2vw, 24px); }
.stat-card {
  flex: 1 1 0; min-width: 200px; max-width: 320px; border-radius: 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: clamp(40px, 6vh, 64px) 24px;
  background: linear-gradient(160deg, rgba(41,151,255,0.18), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.16), 0 24px 60px rgba(0,0,0,0.4);
}
.stat-num {
  display: block; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: #fff;
  font-size: clamp(2.6rem, 5.5vw, 4.2rem); text-shadow: 0 2px 14px rgba(0,0,0,0.3);
}
.stat-label { display: block; margin-top: 12px; color: rgba(255,255,255,0.85); font-size: clamp(0.95rem, 1.2vw, 1.15rem); padding: 0 14px; }
@media (max-width: 760px) { .stats-row { flex-direction: column; align-items: center; } .stat-card { width: 100%; max-width: 360px; } }

/* ============================================================
   4 · REGISTER/BOOK CTA + footer
   ============================================================ */
.donate { flex-direction: column; justify-content: center; gap: clamp(28px, 5vh, 56px); position: relative; }
.donate-inner { position: relative; z-index: 2; }
.donate-head { text-align: center; margin-bottom: 8px; }
.donate-head h2 { font-size: clamp(2rem, 4.8vw, 3.6rem); color: var(--light); }
.donate-head h2 em { color: var(--iris-bright); }
.roller-line { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.roller-intro { color: var(--light-2); font-size: 17px; }
.roller { position: relative; display: inline-block; width: 200px; height: 46px; border-radius: 100px; background: rgba(243,238,251,0.08); box-shadow: inset 0 0 0 1px var(--border-d); overflow: hidden; perspective: 400px; }
.roller span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 16px; color: var(--iris-bright); opacity: 0; transform: translateY(70%) rotateX(-70deg); transition: transform 0.55s var(--ease), opacity 0.45s var(--ease); }
.roller span.on { opacity: 1; transform: none; }
.roller span.out { opacity: 0; transform: translateY(-70%) rotateX(70deg); }

.donate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 430px)); justify-content: center; gap: 20px; }
.donate-card {
  position: relative; display: block; padding: 34px 32px; border-radius: 20px; text-decoration: none;
  background: #1d1d1f; border: 1px solid rgba(255,255,255,0.1); color: var(--light);
  box-shadow: 0 18px 50px rgba(0,0,0,0.4);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.donate-card:hover { transform: translateY(-5px); box-shadow: 0 26px 64px rgba(0,0,0,0.55); }
.donate-card .card-kicker { color: var(--iris-bright); }
.donate-card h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; color: var(--light); }
.donate-card > p { color: var(--light-2); font-size: 15px; margin-bottom: 20px; }
.donate-url { display: inline-block; font-size: 14px; font-weight: 600; color: var(--iris-bright); border: 1px solid var(--border-d); border-radius: 100px; padding: 7px 16px; }
.donate-arrow { position: absolute; top: 30px; right: 30px; font-size: 22px; color: var(--light-2); transition: transform 0.4s var(--ease), color 0.4s var(--ease); }
.donate-card:hover .donate-arrow { transform: translate(4px, -4px); color: var(--iris-bright); }

.cursor-blob { position: absolute; top: 0; left: 0; width: 440px; height: 440px; border-radius: 50%; pointer-events: none; mix-blend-mode: screen; filter: blur(70px); opacity: 0; transition: opacity 0.7s var(--ease); background: radial-gradient(circle, rgba(41,151,255,0.45), rgba(0,113,227,0.25) 45%, transparent 72%); transform: translate(-50%, -50%); z-index: 1; }
.cursor-blob.live { opacity: 0.5; }

.foot {
  position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  width: min(1180px, 90vw); margin: 30px auto 0; padding-top: 22px; border-top: 1px solid var(--border-d);
  font-size: 13px; color: var(--light-2);
}
.foot-links { display: flex; gap: 20px; }
.foot-links a { color: var(--light-2); text-decoration: none; transition: color 0.25s var(--ease); }
.foot-links a:hover { color: var(--iris-bright); }

/* ============================================================
   MODAL (native <dialog>) — booking + tutor registration
   ============================================================ */
.modal {
  border: none; border-radius: 26px; padding: 0; max-width: 560px; width: min(560px, 92vw);
  color: var(--ink); background: var(--paper); box-shadow: 0 40px 120px rgba(0,0,0,0.5);
}
.modal::backdrop { background: rgba(10,6,18,0.55); backdrop-filter: blur(4px); }
.modal-form { position: relative; padding: 38px 34px; }
.modal-close { position: absolute; top: 16px; right: 18px; background: none; border: none; font-size: 28px; line-height: 1; color: var(--ink-3); cursor: pointer; }
.modal-close:hover { color: var(--ink); }
.modal-form h3 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.modal-meta { color: var(--ink-2); margin: 6px 0 22px; font-size: 15px; }
.modal-fields { display: flex; flex-direction: column; gap: 16px; }
.modal-fields label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.modal-fields input, .modal-fields select, .modal-fields textarea {
  background: #fff; border: 1px solid var(--border-l); color: var(--ink);
  padding: 12px 14px; border-radius: 11px; font: inherit; outline: none;
}
.modal-fields input:focus, .modal-fields select:focus, .modal-fields textarea:focus { border-color: var(--iris); }
.modal-fields .btn { justify-content: center; margin-top: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal-success { background: rgba(0,113,227,0.1); border: 1px solid var(--iris); color: var(--ink); padding: 16px; border-radius: 12px; margin-bottom: 18px; font-size: 15px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }

/* ============================================================
   3D scene transitions
   ============================================================ */
.scene-in { transform-origin: 50% 0%; will-change: transform, opacity; }
.hero-media, .hero-inner { will-change: transform; }
.donate-inner { perspective: 1000px; }
.donate-grid { perspective: 1100px; }
.donate-card { will-change: transform; transform-style: preserve-3d; }
.manifesto-pin { transform-style: preserve-3d; }
.donate-card.sreveal { transform: translateY(48px) rotateX(-16deg); transform-origin: 50% 100%; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .nav-inner { padding: 14px 0; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 130; flex-direction: column; gap: 0;
    background: rgba(14,10,24,0.98); color: var(--light); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-d); padding: 4px 0 10px;
    box-shadow: 0 24px 44px rgba(0,0,0,0.4);
    transform: translateY(-140%); opacity: 0; pointer-events: none;
    transition: transform 0.45s var(--ease), opacity 0.3s var(--ease);
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 15px 6vw; font-size: 16px; opacity: 0.92; border-top: 1px solid rgba(255,255,255,0.07); }
  .burger { display: flex; }
  /* declutter the bar — primary actions live inside the menu on mobile */
  .nav-actions .btn { display: none; }
  .browse-grid { grid-template-columns: 1fr; }
  .filters { position: static; flex-direction: column; }
  .deck-panel { padding: clamp(28px, 8vw, 70px); }
  .deck-index { font-size: clamp(6rem, 30vw, 12rem); }
  .donate-grid { grid-template-columns: 1fr; }
  .foot { justify-content: center; text-align: center; }
}
@media (max-width: 520px) {
  .hero h1 { font-size: clamp(2.4rem, 11vw, 3.2rem); }
  .giant { font-size: clamp(3.2rem, 22vw, 6rem); }
  .statement-lines { font-size: clamp(2rem, 12vw, 3.4rem); }
}

/* mobile deck → vertical stack */
@media (max-width: 900px) {
  .deck { flex-direction: column; overflow: visible; padding: 96px 0 64px; }
  .deck-track { flex-direction: column; align-items: stretch; height: auto; width: min(540px, 88vw); margin: 0 auto; padding: 0; gap: 18px; }
  .deck-panel { width: 100%; height: auto; margin: 0; border-radius: 18px; align-items: flex-start; padding: 30px 26px; box-shadow: 0 8px 30px rgba(0,0,0,0.08); }
  .deck-panel.deck-rise { opacity: 0; transform: translateY(40px) scale(0.97); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
  .deck-panel.deck-rise.in { opacity: 1; transform: none; }
  .deck-panel h3 { font-size: clamp(1.7rem, 6.5vw, 2.2rem); max-width: none; margin-bottom: 12px; }
  .deck-desc { font-size: 1rem; max-width: none; }
  .deck-index { top: 22px; right: 24px; bottom: auto; font-size: 3.2rem; line-height: 1; }
  .deck-cta-link { margin-top: 20px; }
  .deck-intro { background: transparent; box-shadow: none; padding: 0 4px 4px; }
  .deck-intro h2 { font-size: clamp(2.1rem, 9vw, 3rem); }
  .deck-hint { display: none; }
  /* hide the cartoon art on the deck cards for a cleaner mobile stack */
  .deck-art, .kid-parade { display: none; }
}

/* ---------- mobile browse: 2-row horizontally-scrolling category shelf ---------- */
@media (max-width: 760px) {
  .browse { padding: 90px 0 70px; }
  .cat-grid {
    display: grid; grid-auto-flow: column; grid-template-columns: none;
    grid-template-rows: repeat(2, 1fr); grid-auto-columns: 46%;
    gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
    padding: 4px 4px 14px; margin: 0 -4px;
  }
  .cat-grid::-webkit-scrollbar { height: 5px; }
  .cat-grid::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 99px; }
  .cat-box { min-height: 130px; padding: 18px 16px; scroll-snap-align: start; }
  .cat-ico { width: 44px; height: 44px; font-size: 24px; border-radius: 13px; }
  .cat-name { font-size: 16px; }
  .cat-meta { font-size: 12px; }
  /* stack the search + filter bar */
  .search-bar { flex-direction: column; align-items: stretch; }
  .search-bar input, .search-bar select, .search-bar .btn { width: 100%; }
  /* stack the hero search */
  .hero-search { flex-direction: column; align-items: stretch; }
  .hero-search input, .hero-search select, .hero-search .btn { width: 100%; }
}

/* ---------- accessibility ---------- */
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 400; padding: 10px 18px; border-radius: 100px;
  background: var(--iris-deep); color: #fff; font-weight: 600; font-size: 14px; text-decoration: none;
  transform: translateY(-160%); transition: transform 0.25s var(--ease);
}
.skip-link:focus { transform: translateY(0); }
*:focus-visible { outline: 3px solid var(--iris); outline-offset: 3px; }

/* ---------- static / fallback motion ---------- */
.static-fallback .giant, .static-fallback .scene-out, .static-fallback .scene-in,
.static-fallback .donate-card, .static-fallback .donate-head { transform: none !important; opacity: 1 !important; }
.static-fallback .giant { letter-spacing: -0.05em !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .sreveal, .sreveal-r { opacity: 1 !important; transform: none !important; }
  .sline .word { color: #b07cff !important; }
  .giant { transform: none !important; letter-spacing: -0.05em !important; }
  .scene-in, .donate-card { transform: none !important; opacity: 1 !important; }
}
