/* Thermo Turbines — site styles
   Layout concept: an engineering drawing. Off-white drafting ground with a faint grid,
   navy ink, line-drawn systems, and one solid block of colour per section.
   Colours and type come from design.md (navy/slate/off-white, Manrope 500/800).
   The Wind to Heat section uses the red theme from the heat concept deck. */

/* Manrope (SIL Open Font License, see assets/fonts/OFL.txt), self-hosted so no
   visitor data is sent to a third-party font service. */
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/manrope-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("../fonts/manrope-latin-800-normal.woff2") format("woff2");
}

:root {
  /* Brand palette (design.md) */
  --navy-900: #0F1E33;
  --navy-700: #3A4B63;
  --slate-600: #5B6675;
  --slate-400: #8C98A7;
  --slate-300: #A9B4C2;
  --slate-200: #C9D1DA;
  --off-white: #F4F6F8;
  /* Heat theme (Vindvarme til varmeværker deck) */
  --red: #A4161A;
  --red-tint: #F1E2DF;

  /* Type: Manrope only, weights 500 and 800 */
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-hero: clamp(2.3rem, 1.3rem + 3.3vw, 3.75rem);
  --fs-h1: clamp(2.2rem, 1.3rem + 3.2vw, 3.5rem);
  --fs-h2: clamp(1.7rem, 1.1rem + 2vw, 2.55rem);
  --fs-h3: 1.15rem;
  --fs-lead: clamp(1.08rem, 1rem + .4vw, 1.28rem);
  --fs-body: 1.0625rem;
  --fs-small: .9375rem;
  --fs-label: .75rem;

  --wrap: 1200px;
  --band-pad: clamp(64px, 8vw, 112px);
  --header-h: 76px;
  /* One rotor speed for the turbines on Home, Wind to Heat and Wind to Cool.
     site.js sets --rotor-delay from the clock so every page shows the same blade angle. */
  --rotor-period: 16s;
  color-scheme: light;
}

/* ---------- Theme tokens ---------- */
.site {
  --bg: var(--off-white);
  --surface: var(--bg);
  --ink: var(--navy-900);
  --ink-2: var(--slate-600);
  --rule: var(--slate-200);
  --accent: var(--navy-900);
  --accent-ink: var(--off-white);
  --accent-ink-2: var(--slate-300);
  --tint: color-mix(in srgb, var(--slate-200) 42%, var(--off-white));
  --line: var(--accent);
  --eyebrow: var(--slate-600);
  --draw-fill: var(--surface);
  --grid-line: color-mix(in srgb, var(--navy-900) 6%, transparent);
}
.theme-heat {
  --accent: var(--red);
  --accent-ink: var(--off-white);
  --accent-ink-2: color-mix(in srgb, var(--off-white) 80%, var(--red));
  --tint: var(--red-tint);
  --eyebrow: var(--red);
  --grid-line: color-mix(in srgb, var(--red) 7%, transparent);
}
.band--tint { --surface: var(--tint); --draw-fill: var(--tint); }
.band--dark,
.site-footer {
  --surface: var(--navy-900);
  --ink: var(--off-white);
  --ink-2: var(--slate-300);
  --rule: var(--navy-700);
  --line: var(--off-white);
  --eyebrow: var(--slate-300);
  --draw-fill: var(--navy-900);
  --grid-line: color-mix(in srgb, var(--off-white) 6%, transparent);
}
.band--accent,
.hero--concept {
  --surface: var(--accent);
  --ink: var(--accent-ink);
  --ink-2: var(--accent-ink-2);
  --rule: color-mix(in srgb, var(--accent-ink) 28%, transparent);
  --line: var(--accent-ink);
  --eyebrow: var(--accent-ink-2);
  --draw-fill: var(--accent);
  --grid-line: color-mix(in srgb, var(--off-white) 8%, transparent);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--off-white);
  color: var(--navy-900);
  font-family: var(--font);
  font-weight: 500;
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.site { background: var(--bg); color: var(--ink); overflow-x: clip; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-weight: 800; color: var(--ink); text-wrap: balance; overflow-wrap: break-word; }
:lang(da) h1, :lang(da) h2, :lang(da) h3 { -webkit-hyphens: auto; hyphens: auto; }
h1 { font-size: var(--fs-h1); line-height: 1.06; letter-spacing: -.02em; }
h2 { font-size: var(--fs-h2); line-height: 1.12; letter-spacing: -.015em; }
h3 { font-size: var(--fs-h3); line-height: 1.3; }
p { max-width: 65ch; text-wrap: pretty; }
strong, b { font-weight: 800; }
address { font-style: normal; }
img, svg { max-width: 100%; }
img { display: block; height: auto; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--line); outline-offset: 3px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
@media (min-width: 900px) {
  .wrap {
    padding-left: max(40px, env(safe-area-inset-left, 0px));
    padding-right: max(40px, env(safe-area-inset-right, 0px));
  }
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--navy-900); color: var(--off-white);
  padding: 10px 16px; font-weight: 800; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  font-size: var(--fs-label);
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--eyebrow);
  line-height: 1.4;
}
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2); }

.grid-bg {
  background-color: var(--surface);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: -1px -1px;
}

/* ---------- Buttons and links ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 12px 24px;
  font-weight: 800; font-size: .95rem; letter-spacing: .02em;
  text-decoration: none;
  background: var(--accent); color: var(--accent-ink);
  border: 2px solid var(--accent);
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--heat { --accent: var(--red); }
.btn--light { background: var(--off-white); color: var(--accent); border-color: var(--off-white); }
.btn--light:hover { background: transparent; color: var(--off-white); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.text-link {
  font-weight: 800; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: 5px; text-decoration-color: var(--line);
}
.text-link:hover { text-decoration-color: var(--ink); }

/* ---------- Header ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; z-index: 60;
  height: env(safe-area-inset-top, 0px); background: var(--off-white);
}
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--off-white) 94%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--slate-200);
  --ink: var(--navy-900); --line: var(--accent);
}
.site-header__inner { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 34px); min-height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--navy-900); }
.logo .mark { width: 50px; height: 50px; flex: none; }
.wordmark { display: flex; flex-direction: column; line-height: 1; }
.wordmark__1 { font-weight: 800; font-size: 19px; letter-spacing: .04em; color: var(--navy-900); }
.wordmark__2 {
  font-weight: 500; font-size: 9.5px; letter-spacing: .42em; color: var(--slate-600);
  margin-top: 6px; padding-left: .6em;
}
.logo--reversed .wordmark__1 { color: var(--off-white); }
.logo--reversed .wordmark__2 { color: var(--slate-300); }

.site-nav { order: 1; margin-left: auto; }
.site-nav ul { list-style: none; padding: 0; display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }

/* Language button (Dansk / English) */
.lang-switch {
  order: 2; flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 8px 14px;
  font-weight: 800; font-size: .85rem; letter-spacing: .04em;
  color: var(--navy-900); text-decoration: none;
  border: 1.5px solid var(--slate-300);
  transition: border-color .2s, background-color .2s;
}
.lang-switch:hover { border-color: var(--navy-900); }
.lang-switch__icon { width: 16px; height: 16px; flex: none; }
.site-nav a {
  display: inline-block; padding: 8px 0;
  font-weight: 800; font-size: .92rem; letter-spacing: .02em;
  color: var(--navy-900); text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color .2s;
}
.site-nav a:hover { border-bottom-color: var(--slate-300); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.nav-toggle { display: none; }

@media (max-width: 899px) {
  .lang-switch { order: 1; margin-left: auto; min-height: 42px; padding: 8px 12px; }
  @media (max-width: 420px) {
    .site-header__inner { gap: 10px; }
    .nav-toggle { padding: 9px 12px; }
    .nav-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  }
  @media (max-width: 350px) { .lang-switch__icon { display: none; } }
  .nav-toggle { order: 2; min-height: 42px; min-width: 46px; justify-content: center; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px;
    background: none; border: 1.5px solid var(--navy-900); color: var(--navy-900);
    padding: 9px 14px; font-weight: 800; font-size: .85rem; letter-spacing: .06em; cursor: pointer;
  }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block; width: 16px; height: 2px; background: currentColor; position: relative; transition: transform .2s;
  }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -5px; }
  .nav-toggle__bars::after { top: 5px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--off-white); border-bottom: 1px solid var(--slate-200);
    padding: 8px max(20px, env(safe-area-inset-right, 0px)) 20px max(20px, env(safe-area-inset-left, 0px));
  }
  .js .site-nav:not(.is-open) { display: none; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li + li { border-top: 1px solid var(--slate-200); }
  .site-nav a { display: block; padding: 14px 0; font-size: 1.05rem; border-bottom: 0; }
  .site-nav a[aria-current="page"] { color: var(--accent); }
  .site-nav a[aria-current="page"]::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 10px; vertical-align: middle; }
  .logo .mark { width: 42px; height: 42px; }
  .wordmark__1 { font-size: 17px; }
  .wordmark__2 { font-size: 8.5px; }
}

/* ---------- Sections ---------- */
.band { background: var(--surface); color: var(--ink); padding-block: var(--band-pad); }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 780px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head p:not(.eyebrow) { color: var(--ink-2); }
.section-head--row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; max-width: none; }
.section-head--row > div { display: flex; flex-direction: column; gap: 16px; }

.callout {
  margin-top: clamp(28px, 3vw, 40px);
  max-width: none;
  background: var(--tint);
  padding: 24px clamp(20px, 3vw, 36px);
  font-size: clamp(1.1rem, 1rem + .5vw, 1.32rem);
  line-height: 1.45;
  color: var(--ink);
}
.band--tint .callout { background: var(--bg); }

/* ---------- Hero ---------- */
.hero { color: var(--ink); padding-block: clamp(48px, 7vw, 96px) clamp(48px, 6vw, 88px); border-bottom: 1px solid var(--rule); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, .8fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.hero__copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.hero__copy .actions { margin-top: 8px; }
.hero--home h1 { font-size: var(--fs-hero); line-height: 1.04; }
.hero__art { display: flex; justify-content: center; min-width: 0; }
.hero__art--mark .mark { width: min(100%, 420px); height: auto; aspect-ratio: 1; }
.hero--home .chain-label { margin-top: clamp(48px, 6vw, 80px); margin-bottom: 20px; }
.hero--page { padding-block: clamp(56px, 7vw, 96px) clamp(48px, 6vw, 80px); }
.hero--page .wrap { display: flex; flex-direction: column; gap: 20px; }
.hero--page .lead { max-width: 60ch; }
.hero--concept { border-bottom: 0; }
.hero--concept h1 { font-size: var(--fs-hero); line-height: 1.04; }
.hero--concept .lead { color: var(--ink-2); }
.hero-turbine { width: 100%; max-width: 340px; height: auto; color: var(--ink); }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__art { order: -1; justify-content: flex-start; }
  .hero__art--mark .mark { width: 168px; }
  .hero-turbine { max-width: 170px; }
}

/* ---------- Process chain (hero) and steps (CTA) ---------- */
.chain, .steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chain li, .steps li { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 40px 16px 0 0; min-width: 0; }
.chain li::before, .steps li::before {
  content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: var(--line);
}
.chain li:last-child::before, .steps li:last-child::before { display: none; }
.chain__node, .steps__node {
  position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--surface); z-index: 1;
}
.chain__node--end, .steps__node--end { background: var(--line); }
.chain strong, .steps strong { font-size: 1.05rem; line-height: 1.35; }
.chain span:not(.chain__node) { color: var(--ink-2); font-size: var(--fs-small); line-height: 1.45; }
.steps__n { font-size: var(--fs-small); color: var(--ink-2); }
.chain--compact { margin-top: 12px; }
.hero--concept .chain__node { background: var(--accent); }
.hero--concept .chain__node--end { background: var(--line); }

@media (max-width: 640px) {
  .chain, .steps { grid-template-columns: minmax(0, 1fr); }
  .chain li, .steps li { padding: 0 0 22px 42px; }
  .chain li::before, .steps li::before { left: 11px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
}

/* ---------- Home: the detour ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.split .section-head { margin-bottom: 0; }
.routes { display: grid; gap: 16px; }
.route { border: 1px solid var(--rule); padding: clamp(20px, 2.6vw, 28px); display: grid; gap: 18px; }
.route--tt { border: 2px solid var(--line); }
.route__label { font-size: var(--fs-label); font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.route--tt .route__label { color: var(--ink); }
.route__steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; }
.route__steps li {
  position: relative; display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 54px; padding: 8px 10px; border: 1.5px solid var(--slate-400);
  font-weight: 800; font-size: .86rem; line-height: 1.25; background: var(--surface);
}
.route__steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 50%; right: -21px; width: 14px; height: 2px; background: var(--slate-400);
}
.route__steps li:not(:last-child)::before {
  content: ""; position: absolute; top: 50%; right: -21px; width: 7px; height: 7px;
  border-top: 2px solid var(--slate-400); border-right: 2px solid var(--slate-400);
  transform: translateY(-50%) rotate(45deg);
}
@media (max-width: 560px) {
  .route__steps { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .route__steps li { min-height: 44px; }
  .route__steps li:not(:last-child)::after { top: auto; bottom: -18px; right: auto; left: 50%; width: 2px; height: 14px; }
  .route__steps li:not(:last-child)::before { top: auto; bottom: -19px; right: auto; left: calc(50% - 2.5px); transform: rotate(135deg); }
}
.route__steps .is-bottleneck {
  border-style: dashed; border-color: var(--navy-900);
  background: repeating-linear-gradient(135deg, var(--slate-200) 0 2px, transparent 2px 7px);
}
.route--tt .route__steps li { border-color: var(--line); }
.route--tt .route__steps li:last-child { background: var(--line); color: var(--surface); }
.route--tt .route__steps li:not(:last-child)::after { background: var(--line); }
.route--tt .route__steps li:not(:last-child)::before { border-color: var(--line); }
.route__costs { list-style: none; padding: 0; display: grid; gap: 6px; font-size: var(--fs-small); color: var(--ink-2); }
.route__costs li { position: relative; padding-left: 22px; }
.route__costs li::before { content: ""; position: absolute; left: 0; top: .72em; width: 12px; height: 2px; background: var(--slate-400); }
.route--tt .route__costs { color: var(--ink); }
.route--tt .route__costs li::before { width: 8px; height: 8px; top: .5em; border-radius: 50%; background: var(--line); }

@media (max-width: 960px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Home: applications ---------- */
.apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.app {
  display: flex; flex-direction: column; gap: 14px;
  padding: clamp(28px, 4vw, 48px);
  text-decoration: none;
  transition: transform .25s ease;
}
.app:hover { transform: translateY(-3px); }
.app .icon { width: 64px; height: 64px; margin-bottom: 12px; }
.app h3 { font-size: clamp(1.7rem, 1.2rem + 1.4vw, 2.3rem); line-height: 1.1; letter-spacing: -.01em; color: inherit; }
.app p:not(.eyebrow) { color: inherit; opacity: .86; }
.app .eyebrow { color: inherit; opacity: .78; }
.app__link { margin-top: auto; padding-top: 12px; font-weight: 800; }
.app:hover .app__link { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.app--heat { background: var(--red); color: var(--off-white); }
.app--cool { background: var(--off-white); color: var(--navy-900); }
@media (max-width: 760px) { .apps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Numbered cards (benefits, challenges, research questions) ---------- */
.benefits, .challenges, .questions { list-style: none; padding: 0; display: grid; gap: clamp(14px, 1.6vw, 20px); }
.benefits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.challenges { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.questions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.benefit, .challenge, .question {
  border: 1px solid var(--rule);
  padding: clamp(22px, 2.4vw, 30px);
  display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 16px; row-gap: 12px; align-content: start;
}
.benefit h3, .question h3 { align-self: center; }
.benefit p, .challenge p, .question p { grid-column: 1 / -1; color: var(--ink-2); font-size: var(--fs-small); line-height: 1.6; }
.challenge .num { grid-column: 1; }
.challenge__kicker { grid-column: 1 / -1; font-size: var(--fs-label); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-top: 6px; }
.challenge h3 { grid-column: 1 / -1; font-size: 1.3rem; }
.num {
  width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid var(--line); color: var(--line);
  display: grid; place-items: center;
  font-weight: 800; font-size: .95rem; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.num--filled { background: var(--line); color: var(--surface); }
@media (max-width: 960px) { .benefits, .challenges { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .benefits, .challenges, .questions { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Background path (heat) ---------- */
.path { list-style: none; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); gap: 52px; }
.path__step { position: relative; border: 1px solid var(--rule); padding: clamp(22px, 2.6vw, 32px); display: flex; flex-direction: column; gap: 8px; }
.path__step:not(:first-child)::before {
  content: ""; position: absolute; left: -33px; top: 50%; width: 13px; height: 13px;
  border-top: 3px solid var(--line); border-right: 3px solid var(--line);
  transform: translateY(-50%) rotate(45deg);
}
.path__node { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); margin-bottom: 10px; }
.path__n { font-size: var(--fs-label); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.path__step h3 { font-size: 1.35rem; }
.path__step p { color: var(--ink-2); }
.path__step--bottleneck { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.path__step--bottleneck h3 { color: var(--accent-ink); }
.path__step--bottleneck .path__n { color: var(--accent-ink-2); }
.path__step--bottleneck .path__node { background: var(--accent-ink); border-color: var(--accent-ink); }
.path__step--bottleneck ul { padding-left: 1.1em; display: grid; gap: 4px; }
@media (max-width: 860px) {
  .path { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .path__step:not(:first-child)::before { left: 50%; top: -27px; transform: translateX(-50%) rotate(135deg); }
}

/* ---------- System diagram ---------- */
.diagram-wrap { display: grid; gap: 12px; }
.diagram-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rule);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  padding: clamp(12px, 2vw, 28px);
  --draw-fill: var(--bg);
}
.diagram { display: block; width: 100%; min-width: 720px; height: auto; }
.diagram-wrap figcaption { font-size: var(--fs-small); color: var(--ink-2); font-weight: 800; }
.scroll-hint { display: none; font-weight: 500; }
@media (max-width: 800px) { .scroll-hint { display: inline; } }

.dg-label { font-family: var(--font); font-weight: 500; font-size: 13px; letter-spacing: .08em; fill: var(--ink); }
.dg-label--strong { font-weight: 800; }
.dg-label--muted { fill: var(--ink-2); font-size: 11.5px; }
.dg-label--case { letter-spacing: .02em; font-size: 14px; font-weight: 800; fill: var(--line); }
.dg-line { stroke: var(--line); stroke-width: 2; stroke-linejoin: round; }
.dg-line--bold { stroke-width: 2.5; }
.dg-line--faint { stroke-width: 1.25; opacity: .55; }
.dg-pipe { stroke: var(--line); stroke-width: 3.5; fill: none; }
.dg-pipe--thin { stroke-width: 1.75; }
.dg-flow { stroke: var(--bg); stroke-width: 1.4; fill: none; stroke-dasharray: 4 10; stroke-linecap: round; animation: flow 1.1s linear infinite; }
.dg-dash { stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 5 5; fill: none; }
.dg-box { fill: var(--bg); stroke: var(--line); stroke-width: 1.5; }
.dg-ground { stroke: var(--slate-400); stroke-width: 1.5; }
.dg-grid { stroke: var(--slate-400); stroke-width: 1.5; fill: none; }
.dg-tank-fill { fill: var(--line); transform-box: fill-box; transform-origin: 50% 100%; animation: level 9s ease-in-out infinite; }
.dg-turbine { color: var(--line); }
.dg-turbine .rotor { animation: spin 5s linear infinite; }

/* ---------- Rotors ---------- */
.rotor { transform-box: view-box; transform-origin: 0 0; }
.mark--spin .rotor,
.hero-turbine .rotor { animation: spin var(--rotor-period) linear var(--rotor-delay, 0s) infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flow { to { stroke-dashoffset: -28; } }
@keyframes level { 0%, 100% { transform: scaleY(.5); } 50% { transform: scaleY(.95); } }

/* ---------- Storage ---------- */
.storage { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .7fr) minmax(0, .85fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.storage__copy { display: flex; flex-direction: column; gap: 16px; }
.storage__copy p:not(.eyebrow) { color: var(--ink-2); }
.storage__tank { display: flex; justify-content: center; }
.tank { width: 100%; max-width: 250px; height: auto; }
.tank__fill { fill: var(--line); transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(.8); transition: transform 1.6s cubic-bezier(.65, 0, .35, 1); }
.storage[data-state="low"] .tank__fill { transform: scaleY(.24); }
.tank__in, .tank__out { transition: opacity .6s; }
.tank__out { opacity: .2; }
.storage[data-state="low"] .tank__in { opacity: .2; }
.storage[data-state="low"] .tank__out { opacity: 1; }
.tank__label { font-family: var(--font); font-weight: 800; font-size: 11px; letter-spacing: .1em; fill: var(--ink); }
.storage__states { display: grid; gap: 12px; }
.state {
  display: grid; gap: 4px; text-align: left;
  background: none; border: 0; border-top: 2px solid var(--rule);
  padding: 16px 0 18px; color: var(--ink); cursor: pointer;
  transition: border-color .3s, opacity .3s;
}
.state[aria-pressed="true"] { border-top-color: var(--line); }
.state[aria-pressed="false"] { opacity: .55; }
.state:hover { opacity: 1; }
.state__kicker { font-size: var(--fs-label); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--eyebrow); }
.state strong { font-size: 1.3rem; line-height: 1.3; }
.state span:last-child { color: var(--ink-2); font-size: var(--fs-small); }
@media (max-width: 960px) {
  .storage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .storage__copy { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .storage { grid-template-columns: minmax(0, 1fr); }
  .tank { max-width: 200px; }
}

/* ---------- Technology equation ---------- */
.equation {
  display: grid; align-items: stretch; gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.15fr);
}
.eq { border: 1px solid var(--rule); padding: clamp(20px, 2.2vw, 28px); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.eq__dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); margin-bottom: 12px; }
.eq__kicker { font-size: var(--fs-label); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.eq h3 { font-size: 1.25rem; }
.eq p { color: var(--ink-2); font-size: var(--fs-small); }
.eq__op { align-self: center; font-weight: 800; font-size: 2.2rem; line-height: 1; color: var(--line); }
.eq--system { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.eq--system h3 { color: var(--accent-ink); }
.eq--system .eq__dot { background: var(--accent-ink); border-color: var(--accent-ink); }
.eq--system .eq__kicker, .eq--system p { color: var(--accent-ink-2); }
@media (max-width: 960px) {
  .equation { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .eq__op { justify-self: center; font-size: 1.8rem; }
}

/* ---------- CTA band ---------- */
.cta__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(36px, 5vw, 80px); align-items: center; }
.cta__grid > div { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.cta__grid > div p:not(.eyebrow) { color: var(--ink-2); }
.cta__grid .btn { margin-top: 8px; }
.cta__grid--single { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 900px) { .cta__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.about__photo { display: grid; gap: 14px; max-width: 260px; }
.about__photo img { width: 100%; border: 1px solid var(--slate-400); padding: 6px; background: var(--bg); }
.about__photo figcaption { display: grid; gap: 2px; }
.about__photo figcaption span { font-size: var(--fs-label); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.about__photo .profile-link {
  justify-self: start; margin-top: 10px;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 8px 14px;
  font-weight: 800; font-size: .85rem; letter-spacing: .04em;
  color: var(--navy-900); text-decoration: none;
  border: 1.5px solid var(--navy-900);
  transition: background-color .2s, color .2s;
}
.about__photo .profile-link:hover { background: var(--navy-900); color: var(--off-white); }
.profile-link__icon { width: 12px; height: 12px; flex: none; }
.about__copy { display: flex; flex-direction: column; gap: 18px; }
.about__copy p:not(.eyebrow):not(.callout) { color: var(--ink-2); }
.about__copy .callout { margin-top: 8px; font-weight: 800; }
@media (max-width: 760px) {
  .about { grid-template-columns: minmax(0, 1fr); }
  .about__photo { max-width: 200px; }
}

/* ---------- Research entries ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  padding: 8px 16px; min-height: 40px;
  font-weight: 800; font-size: .85rem; letter-spacing: .02em;
  background: transparent; color: var(--ink); border: 1.5px solid var(--ink); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.entries { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.entry { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 12px 32px; padding: 28px 0; border-bottom: 1px solid var(--rule); }
.entry[hidden] { display: none; }
.entry__meta { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: var(--fs-small); color: var(--ink-2); }
.tag {
  font-size: var(--fs-label); font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  border: 1.5px solid var(--ink); color: var(--ink); padding: 3px 8px; line-height: 1.4;
}
.entry--heat .tag { border-color: var(--red); color: var(--red); }
.entry__topic { font-size: var(--fs-small); }
.entry__body { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.entry__body h3 { font-size: 1.3rem; }
.entry__body p { color: var(--ink-2); }
.empty-state { border: 1.5px dashed var(--slate-400); padding: 28px; color: var(--ink-2); }
@media (max-width: 700px) { .entry { grid-template-columns: minmax(0, 1fr); } .entry__meta { flex-direction: row; flex-wrap: wrap; align-items: center; } }

/* ---------- Contact ---------- */
.band--contact { padding-block: clamp(48px, 6vw, 88px) var(--band-pad); }
.contact { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, .9fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.profiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.card-profile {
  aspect-ratio: 85 / 55;
  background: var(--navy-900); color: var(--off-white);
  padding: clamp(22px, 2.4vw, 30px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  min-width: 0;
}
.card-profile__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.card-profile__top > div { min-width: 0; }
.card-profile h3 { color: var(--off-white); font-size: clamp(1.15rem, 1rem + .6vw, 1.5rem); line-height: 1.15; }
/* Keep each name on one line: the size follows the card's width
   (card width minus the 54px mark and 16px gap, divided by the length of the longest name). */
@supports (font-size: 1cqi) {
  .card-profile { container-type: inline-size; }
  .card-profile h3 { white-space: nowrap; font-size: clamp(.95rem, calc((100cqi - 72px) / 10.4), 1.65rem); }
}
.card-profile__title { margin-top: 8px; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-300); }
.card-profile .mark { width: 54px; height: 54px; flex: none; }
.card-profile__details {
  border-top: 1px solid var(--navy-700); padding-top: 16px;
  display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 16px; row-gap: 6px; align-items: baseline;
}
.card-profile__details dt { font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--slate-300); }
.card-profile__details dd { min-width: 0; overflow-wrap: anywhere; }
.card-profile__details a { color: var(--off-white); text-decoration: none; font-variant-numeric: tabular-nums; }
.card-profile__details a:hover { text-decoration: underline; text-underline-offset: 4px; }
.card-profile :focus-visible { outline-color: var(--off-white); }
.contact__office { border-top: 2px solid var(--line); padding-top: 20px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.contact__office address { line-height: 1.7; }
@media (max-width: 1080px) { .contact { grid-template-columns: minmax(0, 1fr); } .contact__office { max-width: 420px; } }
@media (max-width: 640px) { .profiles { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: var(--off-white); padding-block: clamp(56px, 6vw, 80px) 28px; }
.site:not(.theme-heat) main:has(> .band--dark:last-child, > .band--accent:last-child) + .site-footer { border-top: 1px solid var(--navy-700); }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1.2fr) minmax(0, .9fr); gap: 32px; }
.site-footer__brand { display: flex; flex-direction: column; gap: 18px; }
.site-footer__brand p { color: var(--slate-300); max-width: 28ch; }
.footer-label { font-size: var(--fs-label); font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--slate-300); margin-bottom: 14px; }
.footer-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.footer-list li { display: flex; flex-direction: column; min-width: 0; }
.footer-list li span { color: var(--slate-300); font-size: var(--fs-small); }
.footer-list a { color: var(--off-white); text-decoration: none; overflow-wrap: anywhere; }
.footer-list a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer address { color: var(--off-white); line-height: 1.7; }
.site-footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--navy-700);
  font-size: var(--fs-small); color: var(--slate-300);
}
@media (max-width: 900px) { .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .site-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .site-footer__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
