:root {
  --ink: #eef5ed;
  --muted: #9ba99e;
  --dim: #67736a;
  --black: #07100c;
  --black-2: #0b1711;
  --panel: #102019;
  --line: rgba(223, 240, 225, 0.16);
  --line-strong: rgba(223, 240, 225, 0.3);
  --acid: #77a9ff;
  --mint: #55dca0;
  --cyan: #65c7d1;
  --blue: #6faaf8;
  --warm: #f0cc72;
  --orange: #e58f60;
  --font-sans: "Manrope", sans-serif;
  --font-mono: "DM Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--black); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--black);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}
body::selection { background: var(--acid); color: var(--black); }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }

.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;
}

.page-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,.07);
}
.page-progress span { display: block; height: 100%; width: 0; background: var(--acid); }

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 4vw;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 9px; height: 9px; border: 1px solid var(--acid); border-radius: 50%; box-shadow: 0 0 18px rgba(119,169,255,.55); }
.header-tools { display: flex; align-items: center; gap: 30px; }
.header-meta { display: flex; gap: 30px; color: var(--muted); }
.live-dot::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 8px 1px 0; border-radius: 50%; background: var(--acid); }
.language-switcher { display: flex; align-items: center; gap: 5px; color: var(--dim); }
.language-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  cursor: pointer;
}
.language-button:hover { color: var(--ink); }
.language-button.active { color: var(--acid); }

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--black) url("assets/images/hero-wind-finland-blue.jpg") 68% center / cover no-repeat;
}
#windField, .hero-grid { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-grid {
  opacity: .3;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 7.15vw 7.15vw;
  mask-image: linear-gradient(to right, transparent, black 35%, black);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7,16,12,.94) 0%, rgba(7,16,12,.78) 40%, rgba(7,16,12,.24) 72%), linear-gradient(0deg, rgba(7,16,12,.72) 0%, transparent 42%, rgba(7,16,12,.18) 100%);
}
.hero-orbit { position: absolute; border: 1px solid rgba(119,169,255,.14); border-radius: 50%; }
.orbit-one { width: 56vw; height: 56vw; right: -5vw; top: 5vh; }
.orbit-two { width: 35vw; height: 35vw; right: 6vw; top: 16vh; }
.orbit-two::before, .orbit-one::before { content: ""; position: absolute; top: 50%; left: -3px; width: 5px; height: 5px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 22px var(--acid); }

.hero-content { position: relative; z-index: 2; width: min(1260px, 92vw); margin: auto; padding: 140px 0 100px; }
.eyebrow, .kicker {
  margin: 0 0 22px;
  color: var(--acid);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 950px;
  margin: 0;
  font-size: clamp(64px, 10.5vw, 164px);
  font-weight: 300;
  line-height: .82;
  letter-spacing: -.075em;
}
.hero h1 em, .closing h2 em { color: var(--acid); font-family: Georgia, serif; font-weight: 400; }
.hero-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 50px; margin-top: 70px; padding-left: 28vw; }
.hero-bottom > p { max-width: 520px; margin: 0; color: #c2cdc4; font-size: clamp(16px, 1.35vw, 21px); }
.hero-stat { display: flex; align-items: flex-end; gap: 14px; min-width: 235px; padding-bottom: 5px; }
.hero-stat-value { color: var(--acid); font-size: 42px; font-weight: 300; line-height: 1; letter-spacing: -.05em; }
.hero-stat span:last-child { color: var(--muted); font-family: var(--font-mono); font-size: 10px; line-height: 1.5; text-transform: uppercase; }
.scroll-cue { position: absolute; z-index: 2; bottom: 28px; left: 4vw; display: flex; align-items: center; gap: 18px; color: var(--muted); font-family: var(--font-mono); font-size: 10px; text-decoration: none; text-transform: uppercase; letter-spacing: .08em; }
.scroll-line { display: block; width: 54px; height: 1px; background: var(--acid); transform-origin: left; animation: pulseLine 2s ease-in-out infinite; }
@keyframes pulseLine { 0%, 100% { transform: scaleX(.2); opacity: .4; } 50% { transform: scaleX(1); opacity: 1; } }

.chapter { position: relative; padding: 150px 5vw; border-bottom: 1px solid var(--line); }
.section-index { color: var(--dim); font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; }
.chapter-intro { min-height: 120vh; overflow: hidden; }
.chapter-intro > :not(#windField):not(.hero-grid):not(.hero-orbit) { position: relative; z-index: 1; }
.chapter-intro #windField { opacity: .85; }
.chapter-intro .hero-grid { opacity: .18; }
.chapter-intro .orbit-one { right: -5vw; top: 8vh; }
.chapter-intro .orbit-two { right: 6vw; top: 19vh; }
.intro-statement { max-width: 1040px; margin: 20vh auto 0; }
.intro-statement h2, .map-intro h2, .mix-copy h2, .perspective h2 {
  margin: 0;
  font-size: clamp(42px, 6vw, 92px);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -.055em;
}
.body-large { max-width: 760px; margin: 50px 0 0 auto; color: #bac6bc; font-size: clamp(18px, 1.7vw, 26px); line-height: 1.6; }
strong { color: var(--ink); font-weight: 600; }
.threshold-numbers { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 1180px; margin: 150px auto 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.threshold-number { padding: 42px 36px; border-right: 1px solid var(--line); }
.threshold-number:last-child { border-right: 0; }
.big-number { color: var(--acid); font-size: clamp(64px, 8vw, 110px); font-weight: 300; line-height: 1; letter-spacing: -.07em; }
.number-unit { color: var(--acid); font-size: 22px; }
.threshold-number p { max-width: 220px; margin: 18px 0 0; color: var(--muted); font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; }

.chart-chapter { background: #e8eee6; color: #0a1610; padding-bottom: 180px; }
.chart-chapter .section-index { color: #6c766e; }
.chart-story { display: grid; grid-template-columns: .8fr 1.4fr; gap: 7vw; max-width: 1400px; margin: 100px auto 0; }
.chart-copy h2 { max-width: 520px; margin: 0 0 30px; font-size: clamp(42px, 5vw, 74px); font-weight: 300; line-height: 1.03; letter-spacing: -.055em; }
.chart-copy > p:not(.kicker) { max-width: 450px; color: #465149; font-size: 17px; }
.chart-chapter .kicker { color: #377955; }
.milestone { display: grid; grid-template-columns: 70px 1fr; gap: 20px; margin-top: 75px; padding-top: 22px; border-top: 1px solid rgba(10,22,16,.24); }
.milestone-year { font-family: var(--font-mono); font-size: 13px; }
.milestone p { margin: 0; color: #566159; font-size: 13px; }
.chart-panel { min-width: 0; }
.chart-heading { display: flex; justify-content: space-between; gap: 25px; margin-bottom: 24px; }
.chart-label { margin: 0; font-weight: 600; }
.chart-unit { margin: 2px 0 0; color: #667168; font-family: var(--font-mono); font-size: 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-family: var(--font-mono); font-size: 10px; }
.legend span { display: flex; align-items: center; gap: 7px; }
.swatch { display: inline-block; width: 17px; height: 2px; }
.swatch.wind { background: #43865f; }
.swatch.hydro { background: #5995a2; }
.swatch.nuclear { background: #1a2b22; }
.line-chart-wrap { position: relative; width: 100%; min-height: 520px; }
#lineChart { width: 100%; height: 520px; overflow: visible; }
.grid-line { stroke: rgba(10,22,16,.12); stroke-width: 1; }
.axis-text { fill: #6b756d; font-family: var(--font-mono); font-size: 10px; }
.series-path { fill: none; stroke-width: 2.2; }
.focus-line { stroke: rgba(10,22,16,.3); stroke-width: 1; stroke-dasharray: 3 4; }
.focus-year { fill: #0a1610; font-family: var(--font-mono); font-size: 11px; font-weight: 500; }
.line-hit { fill: transparent; cursor: crosshair; }
.chart-instruction { margin: 12px 0 0; color: #788178; font-family: var(--font-mono); font-size: 9px; text-align: right; text-transform: uppercase; letter-spacing: .08em; }
.data-tooltip { position: absolute; z-index: 5; min-width: 150px; padding: 12px 14px; color: var(--ink); background: #0b1711; border: 1px solid rgba(255,255,255,.18); pointer-events: none; opacity: 0; transform: translate(-50%, -110%); font-family: var(--font-mono); font-size: 10px; line-height: 1.65; transition: opacity .18s ease; }
.data-tooltip.visible { opacity: 1; }

.map-chapter { position: relative; padding: 150px 5vw 160px; background: var(--black-2); border-bottom: 1px solid var(--line); }
.map-intro { max-width: 1100px; margin: 0 auto 100px; }
.map-intro h2 { max-width: 900px; }
.map-intro > p:last-child { max-width: 650px; margin: 34px 0 0 auto; color: var(--muted); font-size: 18px; }
.map-experience { max-width: 1400px; margin: 0 auto; }
.map-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric-tabs, .definition-toggle { display: flex; flex-wrap: wrap; gap: 8px; }
.metric-button, .definition-button, .play-button {
  appearance: none;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  background: transparent;
  padding: 9px 17px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.metric-button:hover, .definition-button:hover { color: var(--ink); border-color: var(--ink); }
.metric-button.active, .definition-button.active { color: var(--black); background: var(--acid); border-color: var(--acid); }
.play-button { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.play-button:hover { border-color: var(--acid); }
.play-icon { width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 7px solid currentColor; }
.play-button.playing .play-icon { width: 7px; height: 8px; border: 0; border-left: 2px solid currentColor; border-right: 2px solid currentColor; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); min-height: 710px; border-bottom: 1px solid var(--line); }
.map-canvas-wrap { position: relative; min-width: 0; border-right: 1px solid var(--line); background: radial-gradient(circle at 50% 45%, rgba(58,128,88,.11), transparent 52%); }
#finlandMap { width: 100%; height: 710px; }
.region-path { stroke: rgba(230,244,232,.34); stroke-width: .8; vector-effect: non-scaling-stroke; cursor: pointer; transition: stroke .18s ease; }
.region-path:hover, .region-path:focus { stroke: var(--ink); stroke-width: 1.8; outline: none; }
.map-label { fill: var(--ink); font-family: var(--font-mono); font-size: 9px; text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: rgba(7,16,12,.85); stroke-width: 3px; }
.map-value-label { fill: var(--muted); font-family: var(--font-mono); font-size: 8px; text-anchor: middle; pointer-events: none; }
.map-scale { position: absolute; left: 24px; bottom: 24px; display: flex; align-items: center; gap: 10px; color: var(--dim); font-family: var(--font-mono); font-size: 8px; }
.map-scale i { display: block; width: 100px; height: 4px; background: linear-gradient(90deg, #15251d, var(--acid)); }
.map-detail { padding: 75px 7%; }
.map-detail-label { margin: 0 0 24px; color: var(--muted); font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.map-detail h3 { margin: 0; font-size: clamp(30px, 3vw, 48px); font-weight: 300; line-height: 1.05; letter-spacing: -.04em; }
.map-detail-value { display: flex; align-items: baseline; gap: 10px; margin-top: 35px; color: var(--acid); font-size: clamp(50px, 5vw, 82px); font-weight: 300; line-height: 1; letter-spacing: -.06em; }
.map-detail-value small { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0; }
.map-detail > p:not(.map-detail-label) { min-height: 52px; margin: 20px 0 50px; color: var(--muted); font-size: 13px; }
.region-ranking { margin: 0; padding: 0; list-style: none; counter-reset: region; }
.region-ranking li { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; padding: 13px 0; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--font-mono); font-size: 9px; }
.region-ranking li::before { counter-increment: region; content: "0" counter(region); color: var(--dim); }
.region-ranking li strong { font-weight: 400; font-variant-numeric: tabular-nums; }
.timeline-control { display: grid; grid-template-columns: auto minmax(0,1fr) auto 80px; align-items: center; gap: 18px; padding: 24px 0 12px; color: var(--muted); font-family: var(--font-mono); font-size: 9px; }
.timeline-control output { color: var(--acid); font-size: 24px; text-align: right; }
input[type="range"] { width: 100%; accent-color: var(--acid); cursor: pointer; }
.map-note { margin: 0; color: var(--dim); font-family: var(--font-mono); font-size: 8px; }

.mix-chapter { padding-top: 170px; padding-bottom: 180px; }
.mix-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 8vw; max-width: 1300px; margin: 100px auto 0; align-items: center; }
.mix-copy h2 { font-size: clamp(44px, 5vw, 76px); }
.mix-copy > p:not(.kicker):not(.mix-explanation) { max-width: 510px; color: var(--muted); font-size: 17px; }
.definition-toggle { margin-top: 40px; }
.mix-explanation { min-height: 55px; max-width: 450px; margin-top: 28px; color: #c2cdc4; font-family: var(--font-mono); font-size: 11px; }
.mix-visual { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(170px, .5fr); align-items: center; gap: 28px; }
#mixChart { width: 100%; height: auto; aspect-ratio: 1; overflow: visible; }
.mix-center-value { fill: var(--ink); font-family: var(--font-sans); font-size: 56px; font-weight: 300; text-anchor: middle; letter-spacing: -.05em; }
.mix-center-label { fill: var(--muted); font-family: var(--font-mono); font-size: 8px; text-anchor: middle; text-transform: uppercase; }
.mix-legend { display: flex; flex-direction: column; gap: 15px; }
.mix-legend-row { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 9px; color: var(--muted); font-family: var(--font-mono); font-size: 9px; }
.mix-legend-row i { width: 6px; height: 6px; border-radius: 50%; }
.mix-legend-row.active { color: var(--ink); }

.perspective { padding: 180px 5vw; color: #0a1610; background: var(--acid); }
.perspective .kicker { color: #315229; }
.perspective-inner { max-width: 1180px; margin: auto; }
.perspective h2 { max-width: 980px; }
.perspective .body-large { color: #263d2d; }
.perspective strong { color: #07100c; }
.comparison-bars { max-width: 820px; margin: 110px 0 0 auto; }
.comparison-row { margin-top: 34px; }
.comparison-label { display: flex; justify-content: space-between; margin-bottom: 12px; font-family: var(--font-mono); font-size: 11px; }
.comparison-label strong { font-size: 22px; font-weight: 400; }
.comparison-track { height: 2px; background: rgba(7,16,12,.24); }
.comparison-track span { display: block; width: var(--share); height: 100%; background: var(--black); transform: scaleX(0); transform-origin: left; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.comparison-bars.is-visible .comparison-track span { transform: scaleX(1); }

.closing { position: relative; min-height: 92vh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 160px 5vw; text-align: center; overflow: hidden; }
.closing::before { content: ""; position: absolute; width: 70vw; height: 70vw; border: 1px solid var(--line); border-radius: 50%; }
.closing-compass { position: absolute; width: 42vw; height: 42vw; border: 1px solid var(--line); border-radius: 50%; animation: slowSpin 35s linear infinite; }
.closing-compass::before, .closing-compass::after { content: ""; position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background: var(--line); }
.closing-compass::after { transform: rotate(90deg); }
.closing-compass span { position: absolute; top: -4px; left: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 25px var(--acid); }
@keyframes slowSpin { to { transform: rotate(360deg); } }
.closing > *:not(.closing-compass) { position: relative; z-index: 1; }
.closing h2 { margin: 0; font-size: clamp(50px, 7.8vw, 118px); font-weight: 300; line-height: .96; letter-spacing: -.065em; }
.closing-copy { max-width: 630px; margin: 42px auto 0; color: var(--muted); font-size: 17px; }
.back-to-top { margin-top: 55px; color: var(--acid); font-family: var(--font-mono); font-size: 10px; text-decoration: none; text-transform: uppercase; }
.back-to-top span { display: inline-block; margin-left: 12px; transition: transform .2s; }
.back-to-top:hover span { transform: translateY(-4px); }

footer { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 8vw; padding: 70px 5vw; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--font-mono); font-size: 9px; }
footer p { max-width: 550px; margin: 0; }
.footer-title { margin-bottom: 13px; color: var(--ink); text-transform: uppercase; letter-spacing: .1em; }
.source-links { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.source-links a { text-decoration: none; }
.source-links a:hover { color: var(--acid); }
.footer-stamp { align-self: start; color: var(--ink); font-size: 16px; font-weight: 600; line-height: 1.3; text-decoration: none; white-space: nowrap; }
.footer-stamp:hover { color: var(--acid); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 960px) {
  .header-meta span:first-child { display: none; }
  .hero-bottom { padding-left: 10vw; }
  .chart-story, .mix-grid { grid-template-columns: 1fr; }
  .chart-copy { max-width: 680px; }
  .milestone { margin-top: 45px; }
  .map-layout { grid-template-columns: 1fr; }
  .map-canvas-wrap { border-right: 0; border-bottom: 1px solid var(--line); }
  .map-detail { padding: 50px 5%; }
  .map-detail > p:not(.map-detail-label) { margin-bottom: 35px; }
  .region-ranking { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 20px; }
  .mix-visual { max-width: 750px; }
  footer { grid-template-columns: 1fr 1fr; }
  .footer-stamp { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .site-header { padding: 20px; }
  .header-meta { display: none; }
  .header-tools { gap: 0; }
  .hero-content { width: calc(100% - 40px); padding-top: 115px; }
  .hero h1 { font-size: clamp(58px, 19vw, 100px); }
  .hero-bottom { flex-direction: column; align-items: flex-start; margin-top: 45px; padding-left: 0; }
  .scroll-cue { left: 20px; }
  .chapter, .map-chapter, .mix-chapter { padding: 100px 20px; }
  .chapter-intro { min-height: auto; }
  .intro-statement { margin-top: 100px; }
  .intro-statement h2, .map-intro h2, .mix-copy h2, .perspective h2 { font-size: 43px; }
  .body-large { margin-top: 30px; }
  .threshold-numbers { grid-template-columns: 1fr; margin-top: 90px; }
  .threshold-number { border-right: 0; border-bottom: 1px solid var(--line); padding: 32px 10px; }
  .threshold-number:last-child { border-bottom: 0; }
  .chart-story, .mix-grid { margin-top: 70px; }
  .chart-heading { flex-direction: column; }
  .line-chart-wrap, #lineChart { min-height: 400px; height: 400px; }
  .map-intro { margin-bottom: 65px; }
  .map-toolbar { align-items: flex-end; }
  .metric-tabs { max-width: 230px; }
  .play-label { display: none; }
  #finlandMap { height: 590px; }
  .map-layout { min-height: 590px; }
  .map-detail { padding: 45px 0; }
  .region-ranking { grid-template-columns: 1fr; }
  .timeline-control { grid-template-columns: auto 1fr auto; gap: 10px; }
  .timeline-control output { grid-column: 1 / -1; grid-row: 1; text-align: left; }
  .timeline-control span, .timeline-control input { grid-row: 2; }
  .mix-visual { grid-template-columns: 1fr; }
  .mix-legend { display: grid; grid-template-columns: 1fr 1fr; }
  .perspective { padding: 110px 20px; }
  .comparison-bars { margin-top: 75px; }
  .closing { padding: 110px 20px; }
  .closing::before { width: 130vw; height: 130vw; }
  .closing-compass { width: 85vw; height: 85vw; }
  footer { grid-template-columns: 1fr; padding: 55px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
