/* ============================================================
   Tech for Tomorrow - stylesheet
   Plain CSS only, no frameworks.
   Visual language: deep slate-teal, clean sans type, leaf-green
   and sky-cyan accents. Animations show the science itself:
   sunlight travels to the panels, current flows to the home,
   windows light up, turbines turn.
   Sections: 1 tokens 2 base 3 progress+nav 4 hero 5 ribbon
             6 sections+cards 7 widgets 8 game+quiz 9 diagrams
             10 footer 11 motion 12 responsive
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #0b1118;          /* deep slate, night sky */
  --panel: #131c26;       /* card panels */
  --panel-2: #0e1520;     /* deeper panel */
  --line: #24333f;        /* hairline borders */
  --ink: #ecf3f6;         /* main text */
  --muted: #96a7b5;       /* secondary text */
  --accent: #6fdc8c;      /* leaf green - nature */
  --sage: #5ec8e6;        /* sky cyan - tech */
  --amber: #f5b942;       /* the sun */
  --ease: cubic-bezier(.16,1,.3,1);
  --sans: Arial, Helvetica, sans-serif;
  --radius: 6px;
}

/* ---------- 2. Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.65;
  overflow-x: clip;
}
h1, h2, h3, .serif { font-family: var(--sans); font-weight: 800; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button, a, input { touch-action: manipulation; }
::selection { background: var(--accent); color: var(--bg); }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 4px;
}
.container { max-width: 1400px; margin: 0 auto; }
.grad-text { color: var(--accent); } /* kept name; now just the gold accent */

/* eyebrow: the tiny spaced label above titles */
.eyebrow, .section-tag {
  display: inline-block; font-size: 10px; letter-spacing: 2.2px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 22px;
}

/* ---------- 3. Progress bar + nav ---------- */
.progress {
  position: fixed; z-index: 95; left: 0; top: 0;
  height: 2px; width: 0; background: linear-gradient(90deg, var(--accent), var(--sage)); pointer-events: none;
}
.nav {
  position: sticky; top: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  height: 80px; padding: 0 5vw;
  background: rgba(16,18,16,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-brand { display: flex; align-items: center; gap: 14px; font: 800 19px var(--sans); letter-spacing: -0.02em; white-space: nowrap; }
.nav-brand svg { width: 26px; height: 26px; }
.brand-accent { color: var(--accent); font-style: normal; }
.nav-brand .brand-sub {
  font: 9px var(--sans); letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--muted); font-style: normal; max-width: 120px; line-height: 1.5; white-space: normal;
}
.nav-links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; font-size: 12px; }
.nav-links a { padding: 12px 0; color: var(--muted); border: none; border-radius: 0; transition: color .3s; }
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--accent); background: none; box-shadow: inset 0 -2px 0 var(--accent); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 12px; color: var(--ink); font-size: 1.1rem;
}
.motion-toggle {
  border: 1px solid var(--line); background: transparent; border-radius: 30px;
  padding: 8px 14px; font-size: 11px; color: var(--muted); white-space: nowrap;
}
.motion-toggle span { color: var(--accent); margin-left: 5px; }

/* ---------- 4. Hero ---------- */
.hero {
  position: relative; max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: center;
  min-height: 640px; overflow: hidden; isolation: isolate;
}
.hero-grid-bg {
  position: absolute; inset: 0; z-index: -2; opacity: .16;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 75px 75px;
  -webkit-mask-image: linear-gradient(90deg, black, transparent 82%);
  mask-image: linear-gradient(90deg, black, transparent 82%);
}
.orb {
  position: absolute; border-radius: 50%; width: 560px; height: 560px;
  background: radial-gradient(ellipse, rgba(111,220,140,.09), transparent 65%);
  left: -120px; top: -220px; pointer-events: none; z-index: -1;
  animation: drift 16s ease-in-out infinite alternate;
}
.orb.orb-two {
  width: 480px; height: 480px; left: auto; right: -160px; top: auto; bottom: -180px;
  background: radial-gradient(ellipse, rgba(94,200,230,.11), transparent 65%);
  animation: drift 22s ease-in-out infinite alternate-reverse;
}
@keyframes drift { to { transform: translate(120px, 80px); } }
.hero-copy { padding: 60px 0 40px 5vw; z-index: 2; }
.hero h1 {
  font-size: clamp(52px, 6.4vw, 92px); line-height: 1.02;
  letter-spacing: -3px; margin: 0 0 22px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(92deg, var(--accent), var(--sage));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tagline { font: 600 15px var(--sans); letter-spacing: 3px; text-transform: uppercase; color: var(--sage); margin-bottom: 24px; }
.theme-line { color: var(--muted); font-size: 14px; max-width: 480px; margin: 0 0 30px; }
.theme-line em { color: var(--ink); }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-art { position: relative; align-self: end; }
.hero-scene { display: block; width: 118%; margin-left: -18%; }
.hero-note {
  position: absolute; left: 5vw; bottom: 26px; z-index: 3;
  font-size: 9px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted);
}

/* split-word cascade (words slide up, staggered) */
.wk { display: inline-flex; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; vertical-align: bottom; }
.wi { display: inline-block; will-change: transform; }
.split-ready [data-split] .wi {
  transform: translateY(118%) rotate(4deg); opacity: 0;
  transition: transform .85s var(--ease) calc(var(--i) * 45ms), opacity .5s linear calc(var(--i) * 45ms);
}
.split-ready [data-split].in .wi { transform: none; opacity: 1; }

/* ---------- buttons: bordered editorial pills ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 40px;
  padding: 13px 22px; font-size: 12px; letter-spacing: .4px; color: var(--ink);
  background: transparent; transition: border-color .35s, background .35s, color .35s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { border-color: var(--accent); color: var(--accent); box-shadow: none; }
.btn-primary:hover { background: var(--accent); color: #0b1118; }
.btn-ghost { color: var(--muted); }

/* ---------- 5. Ribbon marquee ---------- */
.marquee {
  overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 16px 0; background: transparent;
}
.marquee-track {
  display: flex; gap: 44px; width: max-content;
  animation: marqueeMove 30s linear infinite;
  font: 600 13px var(--sans); letter-spacing: 3px; text-transform: uppercase; color: var(--muted);
}
.marquee-track b { color: var(--accent); font-weight: 400; }
@keyframes marqueeMove { to { transform: translateX(-50%); } }

/* ---------- 6. Sections, cards, stats ---------- */
.section { padding: 90px 5vw; max-width: 1400px; margin: 0 auto; }
.section-title {
  font-size: clamp(34px, 4.2vw, 60px); line-height: 1.12; letter-spacing: -1.6px;
  margin: 0 0 18px;
}
.section-title::after { content: none; }
.section-sub { color: var(--muted); font-size: 15px; max-width: 520px; margin-bottom: 40px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: linear-gradient(145deg, #1d211b, #151813);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 24px; transition: border-color .4s, transform .4s var(--ease);
}
.card:hover { border-color: #76664d; transform: translateY(-5px); box-shadow: none; background: linear-gradient(145deg, #1d211b, #151813); }
.card h3 { font-size: 23px; letter-spacing: -.5px; margin: 14px 0 12px; }
.card p { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.icon svg { width: 1.9rem; height: 1.9rem; stroke: var(--accent); }
.bin-emoji svg { width: 1.5rem; height: 1.5rem; stroke: currentColor; display: block; margin: 0 auto 4px; }
.item-emoji svg { width: 2.4rem; height: 2.4rem; stroke: var(--accent); vertical-align: middle; margin-right: 8px; }
.icon { font-size: 1.9rem; line-height: 1; background: none; border: none; box-shadow: none; width: auto; height: auto; margin: 0; }
.card-kicker { display: flex; justify-content: space-between; font-size: 9px; color: var(--accent); letter-spacing: 1.2px; margin-bottom: 16px; text-transform: uppercase; }
.card-link { display: inline-block; margin-top: 10px; font-size: 12px; color: var(--accent); }
.card-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* stats */
.stat {
  text-align: left; position: relative; overflow: visible;
  border-top: 1px solid var(--line); padding: 22px 10px 0 0;
  background: none; border-radius: 0;
}
.stat::before { content: none; }
.stat .num {
  font: 800 clamp(34px, 3.6vw, 50px) var(--sans); letter-spacing: -0.02em;
  color: var(--accent); font-variant-numeric: tabular-nums; letter-spacing: -1px;
}
.stat .label { font-size: 11px; color: var(--muted); margin-top: 8px; line-height: 1.6; }

/* chips under page heroes */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.chip {
  font-size: 11px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: transparent;
}
.chip b { color: var(--accent); font-weight: 600; }

/* inner page hero */
.page-hero { padding: 80px 5vw 40px; max-width: 1400px; margin: 0 auto; }
.page-hero h1 { font-size: clamp(38px, 5vw, 68px); letter-spacing: -2px; line-height: 1.05; margin: 0 0 18px; }
.page-hero h1 em { color: var(--accent); font-style: italic; }
.page-hero .intro { color: var(--muted); font-size: 15px; max-width: 560px; }
.hero-icon { display: none; } /* editorial style: no emoji badge box */

/* ---------- 7. Widgets (calculators, pledge, forms) ---------- */
.widget {
  background: var(--panel); border: 1px solid #424b38; border-radius: var(--radius);
  padding: 28px;
}
.widget h3 { font-size: 24px; letter-spacing: -.4px; margin: 0 0 14px; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.7; }
.hint a, .cap a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.field { margin: 18px 0; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field output { color: var(--accent); font-family: var(--sans); font-weight: 700; font-size: 17px; }
input[type=range] { width: 100%; accent-color: var(--accent); height: 40px; cursor: pointer; background: transparent; }
input[type=text], input[type=number], select {
  width: 100%; background: var(--panel-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; font-size: 14px;
}
input:focus { border-color: var(--accent); outline: none; }
.result-box { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.val { font: 800 clamp(26px, 2.6vw, 38px) var(--sans); color: var(--accent); font-variant-numeric: tabular-nums; }
.cap { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.fact { font-size: 12px; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 12px; margin-top: 16px; line-height: 1.7; }
.tick { color: var(--sage); }

/* tabs (innovations filter) */
.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.tab {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 30px; padding: 9px 16px; font-size: 12px; transition: all .3s;
}
.tab:hover { border-color: var(--accent); color: var(--accent); }
.tab.active { background: var(--accent); border-color: var(--accent); color: #1b2117; }

/* ---------- 8. Game + quiz + pledge ---------- */
.bins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.bin {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 10px; text-align: center; color: var(--ink); font-size: 13px;
  transition: border-color .3s, transform .3s;
}
.bin:hover, .bin:focus-visible { border-color: var(--accent); transform: translateY(-3px); }
.bin-emoji, .item-emoji { font-size: 2rem; display: block; margin-bottom: 8px; }
.item-emoji { font-size: 2.6rem; }
.game-item { text-align: center; padding: 18px 10px; }
.game-over-box { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.game-over-box svg { width: 2.2rem; height: 2.2rem; stroke: var(--accent); }
.game-over-title { font-size: 1.15rem; font-weight: 600; }
.final-score { font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.game-feedback { font-size: 13px; min-height: 22px; margin-top: 12px; }
.game-feedback.good { color: var(--sage); }
.game-feedback.bad { color: #d98a7e; }
.quiz-opt {
  display: flex; width: 100%; text-align: left; justify-content: space-between; gap: 14px;
  background: transparent; border: 1px solid #333b3266; border-radius: 4px;
  padding: 14px 16px; font-size: 13px; color: var(--ink); margin-bottom: 10px; transition: background .25s, border-color .25s;
}
.quiz-opt:hover { background: #f4eed312; border-color: var(--accent); }
.quiz-opt.correct { border-color: var(--sage); background: #93a68a22; }
.quiz-opt.wrong { border-color: #d98a7e; background: #d98a7e18; }
.pledge-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
.pledge-item {
  border: 1px solid var(--line); border-radius: 30px; padding: 9px 16px;
  font-size: 12px; color: var(--muted); background: transparent; cursor: pointer; transition: all .3s;
}
.pledge-item.taken, .pledge-item:hover { border-color: var(--sage); color: var(--sage); }
.ring-bg, .ring-fg { fill: none; stroke-width: 7; }
.ring-bg { stroke: var(--line); }
#pledgeRing { stroke: var(--accent); stroke-linecap: round; }

/* ---------- 9. Diagrams (inline SVG panels) ---------- */
.diagram-card {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 22px 16px; margin-bottom: 30px;
}
.diagram-card.center { text-align: center; }
.diagram-title { font: 700 19px var(--sans); margin: 0 0 14px; text-align: center; letter-spacing: -.2px; }
.flow-diagram { display: block; width: min(100%, 880px); margin: 0 auto; }
.flow-vertical { display: none; }
.svg-label { fill: var(--muted); font-size: 13px; letter-spacing: .12em; text-anchor: middle; font-weight: 600; font-family: var(--sans); }
.svg-flow-label { fill: var(--accent); font-size: 12px; text-anchor: middle; font-family: var(--sans); }
.flow-line { fill: none; stroke: var(--sage); stroke-width: 2; stroke-dasharray: 7 7; animation: dashMove 1.1s linear infinite; }
@keyframes dashMove { to { stroke-dashoffset: -14; } }
.rain-drops line { animation: rainBlink 1.6s ease-in-out infinite; }
.rain-drops line:nth-child(2) { animation-delay: .4s; }
.rain-drops line:nth-child(3) { animation-delay: .8s; }
.rain-drops line:nth-child(4) { animation-delay: 1.2s; }
@keyframes rainBlink { 0%,100% { opacity: .25; } 50% { opacity: 1; } }
.tank-water { animation: waterSway 3s ease-in-out infinite alternate; }
@keyframes waterSway { from { transform: translateY(0); } to { transform: translateY(-4px); } }
.sun-rays { animation: spin 36s linear infinite; transform-box: fill-box; transform-origin: center; }
.blades { animation: spin 5s linear infinite; transform-box: fill-box; transform-origin: center; }
.blades.slow { animation-duration: 8s; }
@keyframes spin { to { transform: rotate(360deg); } }


/* ============ cinematic scroll scenes ============ */
.scenes { position: relative; }
.scene {
  position: sticky; top: 0;
  min-height: 100vh; min-height: 100svh;
  overflow: hidden;
  display: grid; place-items: center;
  background: #0b1118;
}
.scene-bg { position: absolute; inset: 0; }
.scene-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene-shade { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5,9,12,.62), rgba(5,9,12,.28) 45%, rgba(5,9,12,.78)); }
#scene-tomorrow .scene-shade { background: linear-gradient(180deg, rgba(5,9,12,.42), rgba(5,9,12,.10) 45%, rgba(5,9,12,.55)); }
.scene-copy { position: relative; z-index: 2; text-align: center; padding: 0 22px; max-width: 1020px; }
.scene-kicker { letter-spacing: .38em; text-transform: uppercase; font-size: .8rem; font-weight: 700; color: var(--accent); }
#scene-cost .scene-kicker { color: #f0a35e; }
.scene-title {
  font-size: clamp(2.7rem, 7.6vw, 6.2rem);
  font-weight: 900; line-height: .98; letter-spacing: -.015em; text-transform: uppercase;
  margin: 14px 0 0; text-shadow: 0 6px 34px rgba(0,0,0,.55);
}
.scene-sub { color: #cfd8dc; max-width: 560px; margin: 20px auto 0; font-size: 1.06rem; line-height: 1.55; }
.scene-src { display: block; margin-top: 8px; font-size: .8rem; letter-spacing: .06em; color: rgba(207,216,220,.6); text-transform: uppercase; }
.scene-stage-wrap { container-type: size; }
.scene-stage {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: max(100cqw, 177.7cqh);
  height: calc(max(100cqw, 177.7cqh) / 1.77683);
}
.scene-stage img { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-cta { justify-content: center; margin-top: 28px; }
/* Scrubbed entrances: JS drives opacity/transform/filter per frame from
   scroll progress. Before the first frame (or with JS off) content is
   simply visible; .js-scrub hides items only until the engine paints. */
.js-scrub .scene [data-scrub] { opacity: 0; }
/* Dwell slots: with JS, each scene becomes a 180vh-tall track and its
   .scene-pin (the visible 100vh) sticks inside it. Margins on sticky
   elements eat their own stick range, so the height lives on the track. */
.js-scrub .scene { position: relative; height: 180vh; min-height: 0; overflow: visible; display: block; }
.js-scrub .scene-pin { position: sticky; top: 0; left: 0; width: 100%; height: 100vh; height: 100svh; overflow: hidden;
  display: grid; place-items: center; background: #0b1118; box-sizing: border-box; }
.motion-off .scene { height: auto; min-height: 100vh; position: sticky; }
.motion-off .scene-pin { position: static; height: auto; min-height: 100vh; }
.motion-off .scene [data-scrub], .no-js .scene [data-scrub] { opacity: 1 !important; transform: none !important; filter: none !important; }
.scene [data-scrub] { will-change: transform, opacity; }
.scene-bg { will-change: transform; }
@media (prefers-reduced-motion: reduce) {
  .scene { height: auto !important; min-height: 100vh !important; }
  .scene-pin { position: static !important; height: auto !important; min-height: 100vh !important; }
  .scene [data-scrub] { opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* hero scene: the solar story, told in motion
   sunlight travels sun -> panel, panel glows on arrival,
   current flows panel -> home, windows light up in sequence */
.beam {
  stroke: var(--amber); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 3 12; opacity: .85;
  animation: dashMove15 1s linear infinite;
}
@keyframes dashMove15 { to { stroke-dashoffset: -15; } }
.panel-glow { fill: rgba(94,200,230,0); animation: pulseGlow 3.2s ease-in-out infinite; }
.panel-glow.g2 { animation-delay: 1.6s; }
@keyframes pulseGlow { 0%,100% { fill: rgba(94,200,230,0); } 50% { fill: rgba(94,200,230,.32); } }
.wire {
  fill: none; stroke: var(--accent); stroke-width: 2.5;
  stroke-dasharray: 6 8; stroke-linecap: round;
  animation: dashMove .8s linear infinite;
}
.window { fill: rgba(245,185,66,0); animation: winGlow 5s ease-in-out infinite; }
.window.w2 { animation-delay: 1.4s; }
@keyframes winGlow {
  0%,25% { fill: rgba(245,185,66,0); }
  45%,75% { fill: rgba(245,185,66,.95); }
  95%,100% { fill: rgba(245,185,66,0); }
}
.cloud { animation: cloudDrift 12s ease-in-out infinite alternate; }
.cloud.c2 { animation-duration: 17s; animation-delay: -6s; }
@keyframes cloudDrift { from { transform: translateX(0); } to { transform: translateX(26px); } }
.earth-scene { display: block; width: min(60vw, 240px); margin: 0 auto; }
.leaf-orbit { animation: spin 14s linear infinite; transform-box: view-box; transform-origin: 130px 130px; }
.diagram-note { text-align: center; color: var(--muted); font-size: 12px; margin: 12px auto 0; max-width: 560px; line-height: 1.7; }

/* ---------- 10. Footer ---------- */
footer { padding: 50px 5vw 35px; border-top: 1px solid var(--line); }
.footer-word {
  font: 800 clamp(48px, 11vw, 150px)/1 var(--sans);
  letter-spacing: -4px; color: #2b3947; display: flex;
  justify-content: space-between; align-items: baseline; gap: 20px;
}
.footer-word span { font: 600 .3em var(--sans); color: var(--sage); letter-spacing: 2px; text-transform: uppercase; }
.foot-logo { display: none; }
footer .foot-meta { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: 10px; color: var(--muted); margin-top: 34px; }
footer .foot-meta a { color: var(--accent); }

/* ---------- 11. Motion: reveal + kill switches ---------- */
.reveal { opacity: 1; }
.js-motion .reveal { opacity: 0; transform: translateY(25px); }
.js-motion .reveal.visible { animation: fadeInUp .9s var(--ease) both; }
@keyframes fadeInUp { from { opacity: 0; transform: translate3d(0,25px,0); } to { opacity: 1; transform: translate3d(0,0,0); } }
.motion-off *, .motion-off *::before, .motion-off *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}
.motion-off .reveal, .motion-off [data-split] .wi { opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js-motion .reveal, .split-ready [data-split] .wi { opacity: 1 !important; transform: none !important; }
  .marquee-track { animation: none !important; flex-wrap: wrap; width: 100%; }
}

/* ---------- 12. Responsive ---------- */
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero { min-height: 560px; }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 80px; }
  .nav { height: auto; min-height: 66px; padding: 0 5vw; gap: 12px; flex-wrap: wrap; } /* grows when the menu opens */
  .nav-brand { font-size: 21px; }
  .brand-accent { color: var(--accent); font-style: normal; }
.nav-brand .brand-sub { display: none; }
  .nav-toggle { display: block; }
  .motion-toggle { display: none; } /* still applied via OS setting */
  .nav-links { display: none; width: 100%; flex-direction: column; gap: 2px; padding: 8px 0 14px; }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 9px 2px; font-size: 14px; }
  .hero { display: flex; flex-direction: column; min-height: 0; }
  .hero-copy { padding: 46px 6vw 0; }
  .hero h1 { font-size: clamp(44px, 13vw, 68px); letter-spacing: -2px; }
  .hero-art { width: 100%; margin-top: 8px; }
  .hero-scene { width: 100%; margin-left: 0; } /* whole teaching scene fits mobile width */
  .hero-note { display: none; }
  .section { padding: 60px 6vw; }
  .page-hero { padding: 56px 6vw 26px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .bins { grid-template-columns: repeat(2, 1fr); }
  .result-grid { grid-template-columns: 1fr; }
  /* diagrams swap to their stacked vertical variant - no sideways scrolling */
  .flow-diagram { display: none; }
  .flow-vertical { display: block; width: min(100%, 340px); margin: 0 auto; }
  .diagram-card { overflow-x: visible; }
}

/* ---------- 13. Cinematic image-led hero (home) ---------- */
.hero-cine {
  position: relative; display: flex; align-items: flex-end;
  min-height: 88vh; padding: 0; overflow: hidden;
}
.hero-media { position: absolute; inset: 0; container-type: size; }
/* stage keeps the picture's aspect ratio and covers the hero, so the rotor
   overlays stay glued to the painted towers on every screen size.
   cover math: width = max(container w, container h x 1.777) */
.hero-stage {
  position: absolute; top: 62%; left: 50%;
  width: max(100cqw, 177.7cqh);
  height: calc(max(100cqw, 177.7cqh) / 1.77683);
}
.hero-stage img, .hero-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media .kenburns {
  animation: heroZoomStage 26s ease-in-out infinite alternate;
  will-change: transform;
}
.hero-media .kenburns img { animation: focusIn 1.8s ease-out both; }
@keyframes heroZoomStage {
  from { transform: translate(-50%,-62%) scale(1); }
  to   { transform: translate(-50%,-62%) scale(1.1); }
}
@keyframes heroZoomStageM {
  from { transform: translate(-66%,-60%) scale(1); }
  to   { transform: translate(-66%,-60%) scale(1.1); }
}

/* turbine rotors: real spinning blades over the painted towers */
.rotor { position: absolute; transform: translate(-50%,-50%); }
.rotor .spin { animation: spin 6s linear infinite; transform-box: view-box; transform-origin: 50% 50%; }
.rotor .spin.s5 { animation-duration: 5s; }
.rotor .spin.s6 { animation-duration: 6s; }
.rotor .spin.s7 { animation-duration: 7s; }
.rotor .spin.s9 { animation-duration: 9s; }
.rotor .spin.s8 { animation-duration: 8s; }
.rotor .spin.s10 { animation-duration: 10s; }
.rotor path { fill: rgba(232,240,244,.9); }
.rotor svg, svg.rotor { filter: drop-shadow(0 0 3px rgba(4,10,14,.45)); }
.rotor circle { fill: #d7dee4; }
.rotor.r1 { left: 72.97%; top: 27.6%; width: 5.0%; }
.rotor.r2 { left: 79.1%;  top: 24.2%; width: 6.0%; }
.rotor.r3 { left: 86.5%;  top: 18.6%; width: 7.2%; }
.rotor.r4 { left: 16.5%;  top: 32.4%; width: 2.9%; }
.rotor.r5 { left: 21.6%;  top: 34.0%; width: 2.4%; }
.rotor.r6 { left: 91.9%;  top: 21.0%; width: 6.2%; }
@keyframes focusIn { from { filter: blur(14px) brightness(.85); } to { filter: blur(0) brightness(1); } }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11,17,24,.94) 0%, rgba(11,17,24,.45) 34%, rgba(11,17,24,.12) 60%, rgba(11,17,24,.35) 100%);
}
.hero-cine .hero-copy {
  position: relative; z-index: 2; max-width: 640px;
  margin: 120px auto 76px 5vw; padding: 40px 44px;
  background: rgba(11,17,24,.30);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  border: 1px solid rgba(236,243,246,.14); border-radius: 18px;
}
.hero-cine .hero-copy h1 { text-shadow: 0 2px 30px rgba(0,0,0,.45); }
.hero-cine .theme-line { text-shadow: 0 1px 14px rgba(0,0,0,.6); }
.hero-cine .hero-note { z-index: 3; }
@media (max-width: 700px) {
  /* phone: full-screen hero, text panel anchored low so the aurora video
     gets the whole upper area; panel stays compact and readable */
  .hero-cine { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; }
  .hero-cine .hero-copy { margin: 0 5vw 26px; padding: 24px 22px; }
  .hero-cine .hero-copy h1 { font-size: clamp(40px, 12vw, 52px); }
  .hero-note { bottom: 8px; }
  .hero-media .kenburns { animation-name: heroZoomStageM; }
}

/* ---------- 14. Hero atmosphere layers (all pure CSS) ---------- */
.fx { position: absolute; inset: 0; pointer-events: none; }


/* stars: two dot layers twinkling at different rhythms */
.fx-stars { top: 0; height: 45%; background-repeat: no-repeat; }
.fx-stars.s1 {
  background-image:
    radial-gradient(1.6px 1.6px at 12% 28%, rgba(255,255,255,.95), transparent 60%),
    radial-gradient(1.3px 1.3px at 24% 12%, rgba(255,255,255,.8), transparent 60%),
    radial-gradient(1.8px 1.8px at 38% 34%, rgba(255,255,255,.9), transparent 60%),
    radial-gradient(1.2px 1.2px at 47% 8%, rgba(255,255,255,.75), transparent 60%),
    radial-gradient(1.5px 1.5px at 58% 26%, rgba(255,255,255,.85), transparent 60%),
    radial-gradient(1.3px 1.3px at 71% 10%, rgba(255,255,255,.8), transparent 60%),
    radial-gradient(1.7px 1.7px at 84% 30%, rgba(255,255,255,.9), transparent 60%),
    radial-gradient(1.2px 1.2px at 93% 14%, rgba(255,255,255,.7), transparent 60%);
  animation: twinkle 4s ease-in-out infinite;
}
.fx-stars.s2 {
  background-image:
    radial-gradient(1.4px 1.4px at 7% 40%, rgba(255,255,255,.8), transparent 60%),
    radial-gradient(1.7px 1.7px at 19% 20%, rgba(255,255,255,.9), transparent 60%),
    radial-gradient(1.2px 1.2px at 33% 16%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1.6px 1.6px at 52% 36%, rgba(255,255,255,.85), transparent 60%),
    radial-gradient(1.4px 1.4px at 65% 18%, rgba(255,255,255,.8), transparent 60%),
    radial-gradient(1.9px 1.9px at 78% 6%, rgba(255,255,255,.95), transparent 60%),
    radial-gradient(1.3px 1.3px at 89% 22%, rgba(255,255,255,.75), transparent 60%);
  animation: twinkle 5.5s ease-in-out infinite 1.2s;
}
@keyframes twinkle { 0%,100% { opacity: .25; } 50% { opacity: 1; } }

/* mist: a soft pale band drifting along the valley */
.fx-mist {
  top: auto; bottom: 10%; height: 24%;
  background: linear-gradient(90deg, transparent 0%, rgba(190,215,235,.12) 25%, rgba(190,215,235,.05) 50%, rgba(190,215,235,.14) 75%, transparent 100%);
  background-size: 220% 100%;
  filter: blur(6px);
  animation: mistDrift 34s linear infinite alternate;
}
@keyframes mistDrift { from { background-position: 0% 0; } to { background-position: 100% 0; } }

/* fireflies: small warm glowing dots wandering over the valley */
.fx-fireflies { position: absolute; inset: 0; pointer-events: none; }
.fly {
  position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle, #ffe9a8, rgba(255,200,90,0) 70%);
}
.fly.f1 { left: 16%; top: 64%; animation: float1 9s ease-in-out infinite; }
.fly.f2 { left: 34%; top: 74%; animation: float2 11s ease-in-out infinite 1.5s; }
.fly.f3 { left: 52%; top: 60%; animation: float1 12s ease-in-out infinite 3s; }
.fly.f4 { left: 68%; top: 70%; animation: float2 10s ease-in-out infinite .8s; }
.fly.f5 { left: 84%; top: 58%; animation: float1 13s ease-in-out infinite 2.2s; }
.fly.f6 { left: 26%; top: 82%; animation: float2 8s ease-in-out infinite 4s; }
@keyframes float1 {
  0%,100% { transform: translate(0,0); opacity: .95; }
  25% { transform: translate(24px,-30px); }
  50% { transform: translate(-8px,-52px); opacity: .45; }
  75% { transform: translate(-26px,-18px); }
}
@keyframes float2 {
  0%,100% { transform: translate(0,0); opacity: .5; }
  30% { transform: translate(-30px,-24px); opacity: .95; }
  60% { transform: translate(14px,-48px); }
  80% { transform: translate(28px,-10px); opacity: .7; }
}

/* ================= Cinematic engine v2 ================= */
/* char cascade masks (finer version of .wk/.wi) */
.ck { display: inline-flex; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; vertical-align: bottom; }
.ci { display: inline-block; will-change: transform; }
.split-ready [data-split-chars] .ci {
  opacity: 0; transform: translateY(112%);
  transition: transform .8s var(--ease), opacity .5s var(--ease);
  transition-delay: calc(var(--i) * 34ms);
}
.split-ready [data-split-chars].in .ci { transform: none; opacity: 1; }
.motion-off [data-split-chars] .ci { opacity: 1 !important; transform: none !important; }

/* hero staged opening */
.js-motion .hero-seq { opacity: 0; transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js-motion .hero-seq.in { opacity: 1; transform: none; }
.motion-off .hero-seq { opacity: 1 !important; transform: none !important; }

/* hand-drawn circle around "Tomorrow" */
.hero-copy { position: relative; }

/* fact chips inside scenes */
.scene-chips { display: flex; gap: 14px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: rgba(8,14,20,.55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-radius: 16px; padding: 13px 20px; max-width: 300px; text-align: left;
}
.chip b { display: block; font-size: 1.3rem; font-weight: 800; color: var(--accent); letter-spacing: -.01em; }
#scene-cost .chip b { color: #f0a35e; }
.chip span { display: block; margin-top: 4px; font-size: .82rem; line-height: 1.45; color: #b9c6cf; }

/* valley finale scene (all-vector illustration, everything animated together) */
.valley { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.va-aurora { animation: vaWave 9s ease-in-out infinite alternate; }
.va-aurora.b { animation-duration: 12s; animation-delay: -4s; }
@keyframes vaWave {
  from { transform: translateX(-80px) skewX(-3deg); }
  to   { transform: translateX(85px) skewX(3.5deg); }
}
.va-stars .st { fill: #d9ecff; animation: vaTwinkle 4.5s ease-in-out infinite; }
.va-stars .st.d1 { animation-delay: 1.4s; }
.va-stars .st.d2 { animation-delay: 2.9s; animation-duration: 6s; }
@keyframes vaTwinkle { 0%,100% { opacity: .25; } 50% { opacity: 1; } }
.va-river-line { animation: dashMove 1.6s linear infinite; }
.va-houses { fill: #14304a; }
.va-houses path { fill: #0e2438; }
.va-panels path:first-child { fill: #1a4258; }
.v-turb .spin { animation: spin 6s linear infinite; transform-box: view-box; transform-origin: 50% 50%; }
.v-turb .spin.s5 { animation-duration: 5s; }
.v-turb .spin.s7 { animation-duration: 7s; }
.v-turb .spin.s9 { animation-duration: 9s; }
.v-turb path { fill: rgba(226,238,242,.92); }
.v-turb circle { fill: #d7dee4; }
.va-flies { bottom: 6%; top: auto; height: 40%; }
.motion-off .va-aurora, .motion-off .va-stars .st, .motion-off .va-river-line,
.motion-off .v-turb .spin, .motion-off .panel-glow, .motion-off .window { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .va-aurora, .va-stars .st, .va-river-line, .v-turb .spin, .panel-glow, .window { animation: none !important; }
}

/* magnetic buttons */
.magnet { will-change: transform; }

/* mobile: chips stack tighter, scenes dwell shorter */
@media (max-width: 700px) {
  .js-scrub .scene { height: 165vh; }
  .chip { padding: 10px 14px; max-width: 46%; }
  .chip b { font-size: 1.05rem; }
  .chip span { font-size: .72rem; }
}

/* footer credit line */
.foot-credit { margin-top: 16px; font-size: 11px; letter-spacing: .4px; color: var(--muted); opacity: .85; text-align: center; }

/* ---------- 15. Cinematic page heroes (inner pages) ---------- */
.page-cine { min-height: 72vh; }
.page-cine .hero-copy { margin: 100px auto 60px 5vw; }
.page-cine .hero-copy .section-tag { display: inline-block; margin-bottom: 14px; }
.page-cine .hero-copy h1 { font-size: clamp(36px, 4.6vw, 60px); letter-spacing: -2px; line-height: 1.05; margin: 0 0 14px; }
.page-cine .hero-copy h1 em { color: var(--accent); font-style: italic; }
.page-cine .hero-copy p { color: var(--muted); font-size: 15px; max-width: 560px; margin: 0; }
.page-cine .chips { margin-top: 20px; }
@media (max-width: 700px) {
  .page-cine { min-height: 88vh; min-height: 88svh; }
  .page-cine .hero-copy h1 { font-size: clamp(32px, 9.5vw, 44px); letter-spacing: -1px; }
  .page-cine .hero-copy p { font-size: 14px; }
}
