/* SeaPower — editorial scientific scrollytelling */
:root {
  --paper: #f1ece0;
  --paper-2: #e8e0cf;
  --ink: #0c1a26;
  --ink-2: #2a3744;
  --ink-mute: #5a6773;
  --sea-deep: #03192b;
  --sea-mid: #0a3148;
  --sea: #1a4d6b;
  --foam: #b8d4d8;
  --rust: #c97a3a;
  --rust-deep: #9c5a24;
  --line: #0c1a2620;
  --line-strong: #0c1a2640;
  --line-sea: #ffffff15;
  --line-sea-strong: #ffffff30;

  --serif: "Newsreader", "Source Serif 4", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

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

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

a { color: inherit; text-decoration: none; }

/* ——— Skip link & focus ——— */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.skip-link:focus { left: 16px; top: 16px; }

:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
  border-radius: 1px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ——— Mono labels ——— */
.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
.label .num {
  color: var(--rust);
  font-weight: 600;
  margin-right: 0.6em;
}

/* ——— Layout ——— */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}
.wrap-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ——— Nav ——— */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  mix-blend-mode: difference;
  color: #f1ece0;
}
.nav .brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 0.04em; }
.nav .brand-mark { width: 22px; height: 22px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { opacity: 0.7; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; }
.nav-cta { padding: 6px 14px; border: 1px solid currentColor; border-radius: 999px; opacity: 0.9; transition: opacity .2s; }
.nav-cta:hover { opacity: 1; }

/* mobile nav toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  color: inherit;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: transform .25s, opacity .25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ——— Hero ——— */
.hero {
  min-height: 100vh;
  padding: 140px 0 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.hero-eyebrow {
  display: flex; gap: 24px; align-items: baseline;
  margin-bottom: 80px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(48px, 7vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 14ch;
  text-wrap: balance;
}
.hero h1 em {
  font-style: italic;
  color: var(--sea);
  font-weight: 400;
}
.hero-meta {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
  margin-top: 80px;
}
.hero-meta .lede {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.35;
  font-weight: 300;
  max-width: 38ch;
  color: var(--ink-2);
}
.hero-meta .meta-cell .label { display: block; margin-bottom: 8px; }
.hero-meta .meta-cell .val {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 400;
}

/* Hero ocean strip */
.hero-strip {
  height: 180px;
  background: linear-gradient(180deg, transparent 0%, var(--sea-deep) 100%);
  position: relative;
  overflow: hidden;
  margin-top: 40px;
}
.hero-strip svg { position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; }

/* ——— Section chrome ——— */
.section {
  padding: 120px 0;
  border-bottom: 1px solid var(--line);
}
.section.dark {
  background: var(--sea-deep);
  color: var(--paper);
  border-bottom-color: var(--line-sea);
}
.section.dark .label { color: var(--foam); opacity: 0.7; }
.section.dark .label .num { color: var(--rust); }

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 64px;
}
.section.dark .section-head { border-bottom-color: var(--line-sea); }
.section-head h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.section-head .deck {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.45;
  font-weight: 300;
  color: var(--ink-2);
  max-width: 50ch;
}
.section.dark .section-head .deck { color: #d8cfba; }

/* ——— Big number / resource scale ——— */
.scale {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: end;
}
.scale .big {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(80px, 14vw, 220px);
  line-height: 0.85;
  letter-spacing: -0.05em;
}
.scale .big .unit { font-size: 0.32em; color: var(--foam); margin-left: 0.3em; letter-spacing: -0.02em; }
.scale .big .range { display: block; font-size: 0.42em; color: var(--rust); }
.scale-text p {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.5;
  font-weight: 300;
  margin-bottom: 16px;
  max-width: 56ch;
}
.scale-text p .hi { color: var(--rust); }

.scale-bars { margin-top: 80px; padding-top: 48px; border-top: 1px solid var(--line-sea); }
.scale-bars .bar-row {
  display: grid;
  grid-template-columns: 220px 1fr 120px;
  align-items: center;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-sea);
  font-family: var(--mono);
  font-size: 12px;
}
.scale-bars .bar-row .name { font-weight: 500; }
.scale-bars .bar-track { height: 14px; background: #ffffff10; position: relative; }
.scale-bars .bar-fill { height: 100%; background: var(--foam); transform-origin: left; transform: scaleX(0); transition: transform 1.2s cubic-bezier(.2,.7,.1,1); }
.scale-bars .bar-row.now .bar-fill { background: var(--rust); }
.scale-bars .bar-row.visible .bar-fill { transform: scaleX(var(--scale, 1)); }
.scale-bars .val { text-align: right; font-variant-numeric: tabular-nums; }

/* ——— Paradox (pinned) ——— */
.paradox {
  position: relative;
}
.paradox-stage {
  position: sticky;
  top: 80px;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
}
.paradox-text { padding-right: 48px; }
.paradox-text h3 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin: 16px 0 24px;
}
.paradox-text p {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.5;
  font-weight: 300;
  color: var(--ink-2);
  max-width: 40ch;
}
.paradox-stage svg { width: 100%; height: auto; max-height: 70vh; }
.paradox-spacer { height: 200vh; }

/* ——— Converter types — sticky panels ——— */
.converters {
  position: relative;
  background: var(--paper);
}
.converters-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 380px 1fr;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}
.conv-side {
  padding: 80px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--line);
  background: var(--paper-2);
}
.conv-counter {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  margin-bottom: 24px;
}
.conv-counter .cur { color: var(--rust); font-weight: 600; }
.conv-name {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.0;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  min-height: 2.2em;
}
.conv-desc {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 300;
  color: var(--ink-2);
  margin-bottom: 32px;
  min-height: 6em;
}
.conv-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.conv-stat .label { display: block; margin-bottom: 4px; }
.conv-stat .v { font-family: var(--serif); font-size: 22px; line-height: 1.1; }
.conv-stage {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #e9e1cd 0%, #b8c4c7 60%, #5b7882 100%);
}
.conv-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.conv-frame { position: absolute; inset: 0; opacity: 0; transition: opacity .4s; }
.conv-frame.active { opacity: 1; }

/* progress dots */
.conv-progress {
  position: absolute;
  right: 32px; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 12px;
  z-index: 5;
}
.conv-progress .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ffffff40;
  transition: all .3s;
}
.conv-progress .dot.active { background: var(--rust); transform: scale(1.4); }

.converters-spacer > div { height: 100vh; }

/* ——— Architecture diagram ——— */
.arch {
  background: var(--sea-deep);
  color: var(--paper);
}
.arch-diagram {
  margin-top: 64px;
  position: relative;
  height: 520px;
  border: 1px solid var(--line-sea);
  border-radius: 2px;
  overflow: hidden;
}
.arch-diagram svg { width: 100%; height: 100%; display: block; }
.arch-legend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 48px;
}
.arch-legend .item {
  border-top: 1px solid var(--line-sea);
  padding-top: 16px;
}
.arch-legend h4 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  margin: 8px 0 8px;
}
.arch-legend p {
  font-size: 13px;
  line-height: 1.5;
  color: #c8bfaa;
}

/* ——— DC concept ——— */
.dc-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 64px;
  align-items: start;
}
.dc-spec-block {
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 40px;
}
.dc-spec-block h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  margin-bottom: 32px;
  line-height: 1.1;
}
.dc-spec-row {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  align-items: baseline;
  gap: 16px;
}
.dc-spec-row .k { color: var(--ink-mute); }
.dc-spec-row .v { font-family: var(--serif); font-size: 18px; }
.dc-spec-row .v.hi { color: var(--rust); }
.dc-cards { display: flex; flex-direction: column; gap: 16px; }
.dc-card {
  border: 1px solid var(--line);
  padding: 28px;
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
  background: var(--paper);
}
.dc-card .ico {
  width: 48px; height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.dc-card h4 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 8px;
}
.dc-card p {
  font-size: 14px; line-height: 1.55;
  color: var(--ink-2);
}

/* ——— Site map ——— */
.sites {
  background: var(--sea-deep);
  color: var(--paper);
}
.world {
  margin-top: 48px;
  border-top: 1px solid var(--line-sea);
  border-bottom: 1px solid var(--line-sea);
  padding: 32px 0;
}
.world svg { width: 100%; height: auto; display: block; }

.site-list {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.site-list .site {
  padding: 24px 24px 24px 0;
  border-right: 1px solid var(--line-sea);
}
.site-list .site:last-child { border-right: 0; }
.site-list .site:not(:first-child) { padding-left: 24px; }
.site .site-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--rust);
  letter-spacing: 0.1em;
}
.site .site-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  margin: 8px 0 8px;
  letter-spacing: -0.005em;
}
.site p {
  font-size: 13px; line-height: 1.5; color: #c8bfaa; margin-bottom: 12px;
}
.site .site-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--foam);
}

/* ——— LCOE chart ——— */
.chart-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: end;
}
.chart {
  position: relative;
  height: 480px;
  border-left: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  padding: 0 16px 0 0;
}
.chart-y-axis {
  position: absolute;
  left: -56px; top: 0; bottom: 0;
  width: 48px;
}
.chart-y-axis .y-tick {
  position: absolute;
  right: 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
  text-align: right;
  transform: translateY(50%);
}
.chart-grid {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  pointer-events: none;
}
.chart-grid .gline {
  position: absolute; left: 0; right: 0;
  border-top: 1px dashed var(--line);
}
.chart-bars {
  position: absolute;
  inset: 0 16px 0 0;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  padding: 16px 24px 0;
}
.chart-col {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: stretch;
  position: relative;
  height: 100%;
  justify-content: flex-end;
}
.chart-bar {
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--line);
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 1.2s cubic-bezier(.2,.7,.1,1);
}
.chart-col.visible .chart-bar { transform: scaleY(1); }
.chart-col .label-row {
  position: absolute;
  bottom: -56px;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
}
.chart-col .label-row .name {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
}
.chart-col.hi .chart-bar { background: var(--rust); border-color: var(--rust-deep); }
.chart-col .midline {
  position: absolute;
  left: -3px; right: -3px;
  border-top: 1px solid var(--ink);
  pointer-events: none;
}
.chart-col .top-label {
  position: absolute;
  top: -28px; left: 0; right: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink);
}

.chart-text h4 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 16px;
}
.chart-text p {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 300;
  color: var(--ink-2);
  margin-bottom: 16px;
}

/* ——— Roadmap ——— */
.roadmap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 48px;
  border-top: 1px solid var(--line);
}
.phase {
  padding: 32px 24px;
  border-right: 1px solid var(--line);
  position: relative;
}
.phase:last-child { border-right: 0; }
.phase .yr {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--rust);
  letter-spacing: 0.1em;
  font-weight: 600;
}
.phase h4 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  margin: 12px 0 16px;
  line-height: 1.1;
}
.phase ul {
  list-style: none;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-2);
}
.phase ul li {
  padding-left: 16px;
  position: relative;
  margin-bottom: 6px;
}
.phase ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.65em;
  width: 6px; height: 1px;
  background: var(--rust);
}

/* ——— Footer ——— */
.footer {
  background: var(--sea-deep);
  color: var(--paper);
  padding: 120px 0 48px;
}
.footer-cta {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.0;
  font-weight: 300;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin-bottom: 80px;
  text-wrap: balance;
}
.footer-cta em { font-style: italic; color: var(--foam); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--line-sea);
}
.footer-grid .brand-block { display: flex; flex-direction: column; gap: 16px; }
.footer-grid .brand-block .tag { font-family: var(--serif); font-style: italic; font-size: 18px; color: #c8bfaa; max-width: 28ch; }
.footer-col-h { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--foam); margin-bottom: 16px; }
.footer-col ul { list-style: none; font-size: 14px; line-height: 1.9; }
.footer-bottom {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--line-sea);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: #8a8270;
  letter-spacing: 0.06em;
}

/* ——— Reveal ——— */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s, transform .8s; }
.reveal.in { opacity: 1; transform: none; }

/* ——— Animations ——— */
@keyframes wave-shift {
  0% { transform: translateX(0); }
  100% { transform: translateX(-200px); }
}
@keyframes bob-anim {
  0%,100% { transform: translateY(-4px); }
  50% { transform: translateY(8px); }
}
@keyframes flap-anim {
  0%,100% { transform: rotate(-12deg); }
  50% { transform: rotate(8deg); }
}
@keyframes snake-anim {
  0%,100% { transform: translateY(-3px); }
  50% { transform: translateY(3px); }
}
@media (prefers-reduced-motion: no-preference) {
  .wave-anim { animation: wave-shift 4s linear infinite; transform-origin: center; }
  .bob       { animation: bob-anim 2.6s ease-in-out infinite; transform-origin: center; }
  .flap      { animation: flap-anim 2.4s ease-in-out infinite; transform-origin: 400px 490px; }
  .snake     { animation: snake-anim 3s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; }
  .bar-fill, .chart-bar { transition: none; }
}

/* ——— Responsive ——— */
@media (max-width: 900px) {
  .wrap, .wrap-narrow { padding: 0 24px; }
  .nav { padding: 14px 24px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    top: 60px; right: 0;
    width: min(82vw, 320px);
    background: var(--ink);
    color: var(--paper);
    flex-direction: column;
    padding: 24px;
    gap: 18px;
    border-left: 1px solid var(--line-sea);
    transform: translateX(110%);
    transition: transform .35s cubic-bezier(.2,.7,.1,1);
    z-index: 99;
    box-shadow: -8px 0 32px rgba(0,0,0,0.25);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { opacity: 0.9; font-size: 14px; padding: 6px 0; }
  .nav-cta { display: none; }
  .nav { mix-blend-mode: normal; color: var(--ink); background: rgba(241,236,224,0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .hero-meta, .scale, .dc-grid, .chart-wrap, .arch-legend, .footer-grid, .roadmap, .site-list, .section-head { grid-template-columns: 1fr; gap: 32px; }
  .paradox-stage { grid-template-columns: 1fr; height: auto; position: static; }
  .paradox-spacer { display: none; }
  .converters-pin { grid-template-columns: 1fr; height: auto; position: static; }
  .conv-stage { height: 60vh; }
  .converters-spacer { display: none; }
  .scale-bars .bar-row { grid-template-columns: 1fr; gap: 8px; }
  .roadmap .phase { border-right: 0; border-bottom: 1px solid var(--line); }
  .site-list .site { border-right: 0; border-bottom: 1px solid var(--line-sea); padding: 24px 0 !important; }
}
