/* Layout concept: an installer's spec sheet. Wide industrial type, steel
   rating plates for every installation, and the logo's navy / flame red /
   yellow used sparingly on a cool, navy-tinted paper. Single light look by choice. */
:root {
  --navy: #000074;        /* logo base */
  --navy-deep: #050532;   /* contact band */
  --flame: #d40000;       /* logo flame */
  --sun: #fed808;         /* logo yellow */
  --leaf: #3fb04f;        /* renewable green, end of the transition timeline */
  --ink: #12142e;         /* text, navy-biased near-black */
  --ink-soft: #4b4f6b;    /* secondary text */
  --paper: #f6f7fb;       /* page */
  --paper-tint: #eceef6;  /* alternate band */
  --steel: #dfe3ec;       /* rating plate */
  --steel-edge: #b4bbcb;
  --rule: #d5d9e5;
  --white: #ffffff;

  --f-display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* type scale (1.25) */
  --t-xs: .78rem;
  --t-sm: .9rem;
  --t-md: 1.0625rem;
  --t-text: 1.12rem;     /* running text, everywhere (same as the L'entreprise intro) */
  --t-lg: 1.3rem;
  --t-xl: clamp(1.6rem, 2.6vw, 2.2rem);
  --t-xxl: clamp(2.4rem, 5.6vw, 4.6rem);

  --wrap: 1180px;
  --header-h: 68px;
  /* one "page": the viewport below the fixed top bar */
  --screen: calc(100vh - var(--header-h) - env(safe-area-inset-top, 0px));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--t-md)/1.65 var(--f-body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--flame); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-display); font-stretch: 125%; line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h2 { font-size: var(--t-xl); font-weight: 800; color: var(--navy); }
h3 { font-size: var(--t-lg); font-weight: 800; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * max(16px, env(safe-area-inset-left, 0px)));
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 700px) {
  .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
}

.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: var(--white); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* Small uppercase labels, used for places and categories */
.label {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.label-light { color: rgb(255 255 255 / .6); }

/* ---------- Header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--paper); }
.site-header {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 50;
  background: rgb(246 247 251 / .9);
  backdrop-filter: blur(12px) saturate(1.3);
  border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand img { width: 34px; }
.brand-name { font-family: var(--f-display); font-stretch: 125%; font-weight: 900; font-size: 1.15rem; text-transform: uppercase; line-height: 1; display: grid; gap: 3px; }
.brand-name small { font-family: var(--f-mono); font-stretch: normal; font-weight: 500; font-size: .62rem; letter-spacing: .2em; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: var(--t-sm); padding: 8px 12px; border-radius: 4px; }
.nav a:hover { color: var(--navy); background: var(--paper-tint); }
.nav a.nav-phone {
  margin-left: 10px; font-family: var(--f-mono); font-weight: 500;
  color: var(--white); background: var(--navy); padding: 9px 14px;
}
.nav a.nav-phone:hover { background: var(--flame); color: var(--white); }

.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--navy); transition: transform .2s; }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px));
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--rule); border-radius: 0; font-size: var(--t-md); }
  .nav a.nav-phone { margin: 14px 0 0; text-align: center; border: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 22px; font-weight: 600; font-size: var(--t-sm);
  text-decoration: none; border: 2px solid var(--navy); border-radius: 2px;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-solid { background: var(--navy); color: var(--white); }
.btn-solid:hover { background: var(--flame); border-color: var(--flame); color: var(--white); }
.btn-line { color: var(--navy); }
.btn-line:hover { background: var(--navy); color: var(--white); }

/* ---------- Hero ---------- */
/* ---------- Intro: full-screen photo, logo flies into the top bar ----------
   --ip (intro progress) goes 0 → 1 over the first screen of scrolling (main.js).
   --hb (header bar) follows at the end of it. Both default to 1 = finished state,
   so without the script the page simply shows a normal top bar. */
:root { --ip: 1; --hb: 1; }

.intro { position: relative; height: 100vh; height: 100svh; background: var(--paper); }
.intro-stage {
  position: relative; height: 100vh; height: 100svh; overflow: hidden;
}
/* soft bottom edge, only while scrolling: sharp full-screen photo at rest,
   then the lower edge melts into the page as it rises */
.intro-ready .intro-stage {
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - var(--ip) * 34%), transparent 100%);
          mask-image: linear-gradient(180deg, #000 calc(100% - var(--ip) * 34%), transparent 100%);
}
.intro-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: 55% 55%;
}
.intro-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgb(5 5 50 / .25) 62%, rgb(5 5 50 / .62) 100%);
}
/* parallax: the photo rises slower than the page while it fades */
.intro-ready .intro-photo { opacity: calc(1 - var(--ip) * .7); transform: translateY(calc(var(--ip) * 28vh)) scale(calc(1.08 - var(--ip) * .08)); }
.intro-ready .intro-shade { opacity: calc(1 - var(--ip) * 1.4); }

/* static lockup (no-JS / reduced motion): sits in the sky */
.intro-lockup {
  position: absolute; left: 50%; top: 25%; translate: -50% -50%;
  display: flex; align-items: center; gap: 14px; color: var(--navy);
}
.intro-lockup img { width: clamp(64px, 9vw, 110px); }
.intro-lockup .brand-name { font-size: clamp(1.8rem, 5vw, 3.6rem); gap: 8px; }
.intro-lockup .brand-name small { font-size: .32em; }
.intro-ready .intro-lockup { visibility: hidden; }

.intro-title {
  position: absolute; left: 0; right: 0; bottom: 22%;
  margin-inline: auto; width: min(100% - 32px, 15em);
  text-align: center; color: var(--white);
  font-size: clamp(2rem, 5.4vw, 4.4rem); font-weight: 900; line-height: 1; letter-spacing: -0.02em;
  text-shadow: 0 2px 24px rgb(5 5 50 / .45);
}
.intro-ready .intro-title { opacity: calc(1 - var(--ip) * 3.2); transform: translateY(calc(var(--ip) * 18vh)); }

.intro-cue {
  position: absolute; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); translate: -50% 0;
  display: grid; justify-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: var(--t-xs); letter-spacing: .2em; text-transform: uppercase;
  color: rgb(255 255 255 / .85); text-decoration: none;
}
.intro-cue span { width: 1px; height: 36px; background: linear-gradient(rgb(255 255 255 / .9), transparent); }
.intro-cue:hover { color: var(--white); }
.intro-ready .intro-cue { opacity: calc(1 - var(--ip) * 5); }
@media (prefers-reduced-motion: no-preference) {
  .intro-cue span { animation: cue 1.8s ease-in-out infinite; transform-origin: top; }
  @keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
}
.intro-credit {
  position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  font-family: var(--f-mono); font-size: .62rem; color: rgb(255 255 255 / .6);
}
.intro-credit a { color: inherit; }
.intro-ready .intro-credit { opacity: calc(1 - var(--ip) * 3); }
@media (max-width: 700px) {
  .intro-credit { left: max(16px, env(safe-area-inset-left, 0px)); text-align: center; }
  .intro-cue { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .intro-title { bottom: 26%; }
}

/* header: bar fades in around the flying brand */
.intro-ready .site-header {
  background: rgb(246 247 251 / calc(var(--hb) * .9));
  border-bottom-color: rgb(213 217 229 / var(--hb));
  backdrop-filter: none;
}
.intro-ready .site-header.is-solid { backdrop-filter: blur(12px) saturate(1.3); }
.intro-ready .nav, .intro-ready .nav-toggle, .intro-ready .scroll-progress { opacity: var(--hb); }
.intro-ready .site-header:not(.is-solid) .nav,
.intro-ready .site-header:not(.is-solid) .nav-toggle { pointer-events: none; visibility: hidden; }
.intro-ready .brand { transform-origin: 0 0; will-change: transform; }
.intro-ready:not(.intro-live) .brand { visibility: hidden; }
/* over the photo, the big logo lights up in white */
.intro-ready .site-header:not(.is-solid) .brand:hover { color: var(--white); }

/* ---------- L'entreprise: fills the screen right after the intro ---------- */
.hero {
  min-height: var(--screen);
  display: grid; align-items: center;
  padding-block: 40px;
}
.hero-inner { display: grid; gap: clamp(40px, 7vh, 88px); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px clamp(32px, 5vw, 72px); align-items: end;
}
.kicker { display: flex; align-items: center; gap: 12px; font-family: var(--f-mono); font-size: var(--t-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.tricolor { display: inline-flex; width: 36px; height: 6px; background: linear-gradient(90deg, var(--navy) 0 50%, var(--sun) 50% 75%, var(--flame) 75%); }
.hero h2 { margin-top: 22px; }
/* the big statement titles share one size */
.hero h2, .transition h2, .svc-aside h2, .depth-text h2, .h-head h2, .partner h2, .contact h2 {
  font-size: clamp(2rem, 4vw, 3.3rem); font-weight: 900;
  line-height: 1; letter-spacing: -0.02em;
}
.hero h2, .svc-aside h2, .h-head h2, .partner h2 { color: var(--navy); }
.hero-lead { max-width: 34em; font-size: 1.12rem; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
}

.choice { display: grid; gap: 14px; }
.facts {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 2px solid var(--navy);
}
.facts li { padding: 22px 24px 8px 0; color: var(--ink-soft); font-size: var(--t-sm); }
.facts li + li { padding-left: 24px; border-left: 1px solid var(--rule); }
.facts b {
  display: flex; align-items: baseline; gap: 6px; margin-bottom: 14px;
  font-family: var(--f-display); font-stretch: 125%; font-weight: 900;
  font-size: clamp(2.2rem, 3.6vw, 3.2rem); line-height: 1; letter-spacing: -0.02em;
  color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.facts b sup { font-size: .5em; color: var(--flame); align-self: flex-start; }
.facts b small { font-family: var(--f-mono); font-stretch: normal; font-weight: 500; font-size: var(--t-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.facts strong { display: block; margin-bottom: 4px; font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: var(--t-md); text-transform: uppercase; color: var(--ink); }
@media (max-width: 1000px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts li:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 520px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts li, .facts li + li { padding: 18px 0; border-left: 0; }
  .facts li + li { border-top: 1px solid var(--rule); }
}

/* small tags: technologies, variants */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span {
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 9px; border: 1px solid var(--steel-edge); border-radius: 2px; color: var(--ink); background: var(--white);
}

/* ---------- Rating plate (plaque signalétique) ---------- */
.plate {
  position: relative;
  background: linear-gradient(180deg, #e7eaf1, var(--steel));
  border: 1px solid var(--steel-edge);
  border-radius: 3px;
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  color: var(--ink);
}
/* four rivets */
.plate::before, .plate::after {
  content: ""; position: absolute; top: 44px; bottom: 8px; width: 6px; pointer-events: none;
  background:
    radial-gradient(circle at 3px 3px, #9aa2b4 2.2px, transparent 2.6px) top / 6px 6px no-repeat,
    radial-gradient(circle at 3px 3px, #9aa2b4 2.2px, transparent 2.6px) bottom / 6px 6px no-repeat;
}
.plate::before { left: 6px; }
.plate::after { right: 6px; }
.plate-head {
  display: flex; align-items: center; gap: 8px;
  background: var(--navy); color: var(--white);
  padding: 9px 16px; letter-spacing: .1em; text-transform: uppercase; font-size: .7rem;
  border-radius: 2px 2px 0 0;
}
.plate-head img { background: var(--white); border-radius: 2px; padding: 1px; width: 16px; height: auto; }
.plate dl { margin: 0; padding: 10px 22px 14px; }
.plate dl div { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--steel-edge); }
.plate dl div:last-child { border-bottom: 0; }
.plate dt { color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; font-size: .68rem; padding-top: 2px; }
.plate dd { margin: 0; font-weight: 500; font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .plate dl { padding-inline: 18px; } .plate dl div { grid-template-columns: minmax(0, 7.5em) minmax(0, 1fr); } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-tint { background: var(--paper-tint); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 56px); max-width: 760px; }

/* ---------- Transition énergétique ---------- */
.transition { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(40px, 6vw, 96px); align-items: center; }
.transition .section-head { margin-bottom: 0; align-content: start; }
.transition-body { display: grid; gap: 32px; color: var(--ink-soft); font-size: 1.08rem; }
.timeline {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  position: relative; font-size: var(--t-sm);
}
/* the line runs from grey (fossil) to the logo's yellow and red (renewable heat) */
.timeline::before {
  content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 3px;
  background: linear-gradient(90deg, var(--steel-edge) 0 22%, var(--navy) 50%, var(--sun) 80%, var(--flame));
}
.timeline li { position: relative; padding: 30px 16px 0 0; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 0; width: 17px; height: 17px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--navy);
}
.timeline li:first-child::before { border-color: var(--steel-edge); }
.timeline li:last-child::before { border-color: var(--flame); background: var(--sun); }
.timeline span { display: block; margin-bottom: 4px; font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: var(--t-md); color: var(--navy); }
.timeline li:last-child { color: var(--ink); }
@media (max-width: 860px) {
  .transition { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .timeline { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .timeline::before { left: 7px; right: auto; top: 0; bottom: 0; width: 3px; height: auto; background: linear-gradient(180deg, var(--steel-edge) 0 20%, var(--navy) 50%, var(--sun) 80%, var(--flame)); }
  .timeline li { padding: 0 0 0 34px; }
}

/* ---------- Full-screen blocks between the intro and the projects ---------- */
.screen { min-height: var(--screen); display: grid; align-content: center; padding-block: 48px; }
/* dark page, so each full screen reads as its own page */
.screen-dark { background: var(--navy-deep); color: rgb(255 255 255 / .78); }
.screen-dark h2 { color: var(--white); }
.screen-dark .label { color: rgb(255 255 255 / .6); }
/* from fossil (flame red) to renewable (green): each step takes its colour on the line */
.screen-dark .timeline li:nth-child(1) { --c: #ff4a3d; }  /* brighter than the logo red, readable on deep blue */
.screen-dark .timeline li:nth-child(2) { --c: #f07a00; }
.screen-dark .timeline li:nth-child(3) { --c: #b8c51c; }
.screen-dark .timeline li:nth-child(4) { --c: var(--leaf); }
.screen-dark .timeline span { color: var(--c); }
.screen-dark .timeline li:last-child { color: var(--white); }
.screen-dark .timeline li::before { background: var(--navy-deep); border-color: var(--c); }
.screen-dark .timeline li:last-child::before { background: var(--leaf); }
.screen-dark .timeline::before { background: linear-gradient(90deg, #ff4a3d, #f07a00 33%, var(--sun) 55%, #b8c51c 70%, var(--leaf)); }
@media (max-width: 600px) {
  .screen-dark .timeline::before { background: linear-gradient(180deg, #ff4a3d, #f07a00 33%, var(--sun) 55%, #b8c51c 70%, var(--leaf)); }
}

/* ---------- Prestations: sticky index on the left, details scroll on the right ---------- */
.svc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px clamp(40px, 6vw, 96px); align-items: start; }
.svc-aside { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--header-h)); height: var(--screen); display: grid; gap: 36px; align-content: center; }
.svc-aside .section-head { margin-bottom: 0; }
.svc-index { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--navy); }
.svc-index a {
  display: grid; gap: 2px; padding: 14px 0 14px 24px; position: relative;
  border-bottom: 1px solid var(--rule); text-decoration: none;
  font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: var(--t-lg);
  color: var(--steel-edge); transition: color .25s;
}
.svc-index a span { font-family: var(--f-mono); font-stretch: normal; font-weight: 500; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: inherit; }
.svc-index a::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 12px; height: 3px; margin-top: -1px;
  background: var(--flame); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.svc-index a:hover { color: var(--ink-soft); }
.svc-index a.is-active { color: var(--navy); }
.svc-index a.is-active::before { transform: scaleX(1); }

.svc-list { display: grid; }
.energy {
  min-height: var(--screen); display: grid; gap: 14px; align-content: center;
  padding-block: 40px; border-bottom: 1px solid var(--rule);
}
.energy:last-child { border-bottom: 0; }
.energy-photo { margin: 0 0 14px; position: relative; overflow: hidden; background: var(--steel); }
.energy-photo img { width: 100%; aspect-ratio: 16 / 9; max-height: 42vh; object-fit: cover; }
.energy-photo figcaption, .panel-visual figcaption {
  position: absolute; right: 0; bottom: 0; padding: 3px 8px;
  font-family: var(--f-mono); font-size: .6rem; color: rgb(255 255 255 / .85); background: rgb(5 5 50 / .45);
}
.energy-photo figcaption a, .panel-visual figcaption a { color: inherit; }
.energy .chips { margin-top: 4px; }
.energy h3 { font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 900; color: var(--navy); line-height: 1; }
.energy-intro { font-size: 1.1rem; color: var(--ink-soft); max-width: 34em; }

@media (max-width: 860px) {
  .svc { grid-template-columns: minmax(0, 1fr); }
  .svc-aside { position: static; }
  .svc-index { display: none; }
  .svc-aside { height: auto; padding-top: 56px; }
  .energy:first-child { border-top: 2px solid var(--navy); margin-top: 32px; }
}

/* ---------- Depth diagram (pinned while the probes drill) ---------- */
.depth-pin { position: relative; }
.depth-sticky { padding-block: clamp(64px, 9vw, 112px); }
.depth-pin.is-pinned .depth-sticky {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--header-h));
  height: calc(100vh - var(--header-h)); display: flex; align-items: center; padding-block: 24px;
}
.depth { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px clamp(32px, 5vw, 72px); align-items: center; }
.depth-text { display: grid; gap: 16px; color: var(--ink-soft); }
.depth-readout {
  margin-top: 12px; font-family: var(--f-display); font-stretch: 125%; font-weight: 900;
  font-size: clamp(3rem, 7vw, 5.5rem); line-height: 1; color: var(--navy); font-variant-numeric: tabular-nums;
}
.depth-readout span { color: var(--flame); }
.depth-figure { background: var(--white); border: 1px solid var(--rule); padding: clamp(12px, 2.5vw, 28px); min-width: 0; }
.depth-figure svg { display: block; width: 100%; height: auto; max-height: calc(100vh - var(--header-h) - 120px); font-family: var(--f-mono); }
.d-earth { fill: #f1ede6; }
.d-ground { stroke: #5b8a3c; stroke-width: 4; }
.d-axis line { stroke: var(--ink-soft); stroke-width: 1; }
.d-axis text { fill: var(--ink-soft); font-size: 11px; text-anchor: end; }
.d-axis .d-grid { stroke: #ddd5c8; stroke-dasharray: 3 4; }
.d-cursor { stroke: var(--flame); stroke-width: 1; stroke-dasharray: 2 4; }
.d-name { fill: var(--navy); font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: 14px; text-anchor: middle; }
.d-spec { fill: var(--ink-soft); font-size: 11px; text-anchor: middle; }
.d-probe { stroke: var(--navy); stroke-width: 3; stroke-linecap: round; }
.d-tip { fill: var(--flame); transition: transform .2s; transform-box: fill-box; transform-origin: center; }
.d-tip.is-pending { transform: scale(0); }
.d-total { fill: var(--flame); font-size: 11px; }
@media (max-width: 860px) {
  .depth { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .depth-readout { margin-top: 0; font-size: 2.6rem; }
  .depth-pin.is-pinned .depth-text > p:not(.depth-readout):not(.label) { display: none; }
}
@media (max-width: 560px) {
  .d-name { font-size: 17px; }
  .d-spec, .d-total { font-size: 13px; }
  .d-axis text { font-size: 14px; }
}

/* ---------- Projects: horizontal track ---------- */
.h-scroll { position: relative; padding-bottom: clamp(64px, 9vw, 112px); }
.h-sticky { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-content: center; }
.h-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; }
.h-controls { display: flex; align-items: center; gap: 12px; font-family: var(--f-mono); font-size: var(--t-sm); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.h-bar { width: 120px; height: 2px; background: var(--rule); position: relative; overflow: hidden; }
.h-bar span { position: absolute; inset: 0; background: var(--navy); transform-origin: left; transform: scaleX(.25); }
.h-btn { width: 44px; height: 44px; border: 1px solid var(--navy); background: transparent; color: var(--navy); font-size: 1.1rem; cursor: pointer; }
.h-btn:hover { background: var(--navy); color: var(--white); }
.h-btn:disabled { opacity: .3; cursor: default; background: transparent; color: var(--navy); }

/* default (no JS, small screens): native swipe carousel */
.h-track {
  --edge: max(16px, env(safe-area-inset-left, 0px), calc((100vw - var(--wrap)) / 2 + 32px));
  display: flex; gap: clamp(16px, 3vw, 40px);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge);
  padding: 4px var(--edge) 12px; scrollbar-width: none;
}
.h-track::-webkit-scrollbar { display: none; }
.panel {
  flex: 0 0 min(88vw, 1080px); scroll-snap-align: start;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(24px, 4vw, 48px); align-items: start;
  background: var(--paper); border: 1px solid var(--rule); padding: clamp(18px, 3vw, 32px);
}
.panel-info { display: grid; gap: 14px; align-content: start; justify-items: start; }
.panel-info > * { max-width: 100%; }
.panel-info h3 { font-size: clamp(1.5rem, 2.8vw, 2.2rem); color: var(--navy); }
.panel-info > p:not(.label):not(.chips) { color: var(--ink-soft); font-size: var(--t-sm); }

/* heating power on a shared 0–100 kW scale, so sizes compare panel to panel */
.power { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 4px 16px; width: 100%; }
.power b {
  grid-row: span 2; font-family: var(--f-display); font-stretch: 125%; font-weight: 900;
  font-size: clamp(2.2rem, 3.4vw, 3rem); line-height: .9; color: var(--flame); font-variant-numeric: tabular-nums;
}
.power b small { margin-left: 6px; font-family: var(--f-mono); font-stretch: normal; font-weight: 500; font-size: var(--t-xs); letter-spacing: .1em; color: var(--ink-soft); }
.power-bar { height: 8px; background: var(--paper-tint); border: 1px solid var(--rule); position: relative; }
.power-bar span { position: absolute; inset: 0 auto 0 0; width: calc(var(--kw) * 1%); background: linear-gradient(90deg, var(--sun), var(--flame)); }
.power-scale { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .08em; color: var(--ink-soft); }

.panel-visual { margin: 0; position: relative; overflow: hidden; background: var(--steel); min-height: 0; }
.panel-visual > img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.panel-visual figcaption { left: 0; right: auto; top: 0; bottom: auto; }
.panel-visual .plate { margin: 0; }
@media (min-width: 861px) {
  .panel-visual .plate {
    position: absolute; right: 16px; bottom: 16px; width: min(380px, calc(100% - 32px));
    box-shadow: 0 10px 30px rgb(5 5 50 / .28);
  }
}

/* technical-room photos: thumbnails without JS, a lightbox with it */
.tech { width: 100%; }
.tech summary {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
  font-family: var(--f-mono); font-size: var(--t-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--navy);
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.tech summary::-webkit-details-marker { display: none; }
.tech summary::before { content: "▸"; }
.tech summary:hover { color: var(--flame); }
.tech .gallery { margin-top: 12px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tech .gallery a, .tech .gallery a:first-child { grid-column: auto; aspect-ratio: 1; }
.panel-info .btn { margin-top: 6px; }

/* pinned mode (large screens, JS): vertical scroll drives the track sideways */
.h-scroll.is-pinned { padding-bottom: 0; }
.h-scroll.is-pinned .h-sticky {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--header-h));
  height: calc(100vh - var(--header-h)); overflow: hidden; padding-block: 24px;
}
.h-scroll.is-pinned .h-track { overflow: visible; scroll-snap-type: none; will-change: transform; }
.h-scroll.is-pinned .panel { scroll-snap-align: none; }
/* the track takes whatever height the (now larger) title leaves */
.h-scroll.is-pinned .h-sticky { grid-template-rows: auto minmax(0, 1fr); align-content: stretch; gap: 20px; }
.h-scroll.is-pinned .h-track { min-height: 0; }
.h-scroll.is-pinned .panel { flex-basis: min(80vw, 1120px); max-height: 640px; align-self: center; height: 100%; align-items: stretch; grid-template-rows: minmax(0, 1fr); }
.h-scroll.is-pinned .panel-info { overflow: hidden; gap: 12px; }
.h-scroll.is-pinned .panel-visual > img { height: 100%; aspect-ratio: auto; }
.h-scroll.is-pinned .plate dl { padding-block: 6px 8px; }
.h-scroll.is-pinned .plate dl div { padding: 3px 0; }

.gallery { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; min-width: 0; }
.gallery a { display: block; overflow: hidden; aspect-ratio: 1; background: var(--steel); max-width: 100%; }
.gallery a:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery a:hover img { transform: scale(1.04); }

.split { display: grid; gap: 10px; margin-top: 12px; font-size: var(--t-sm); }
.split-row { display: grid; grid-template-columns: 11em minmax(0, 1fr) 3.5em; align-items: center; gap: 12px; }
.split-row b { font-family: var(--f-mono); font-weight: 500; text-align: right; color: var(--navy); font-variant-numeric: tabular-nums; }
.split-bar { height: 10px; background: var(--paper-tint); border: 1px solid var(--rule); }
.split-bar span { display: block; height: 100%; width: var(--v); background: var(--sun); }
.split-note { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-soft); }

@media (max-width: 860px) {
  .panel { grid-template-columns: minmax(0, 1fr); flex-basis: 86vw; gap: 16px; align-content: start; }
  /* photo on top, then the story, the rating plate last */
  .panel-visual { display: contents; }
  .panel-visual > img { order: -2; }
  .panel-visual figcaption { order: -1; position: static; margin-top: -10px; padding: 0; background: none; color: var(--ink-soft); }
  .panel-visual .plate { order: 1; }
  .split-row { grid-template-columns: minmax(0, 1fr) 3.5em; }
  .split-row .split-bar { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- Scroll progress + scroll-linked touches ---------- */
.scroll-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: linear-gradient(90deg, var(--navy) 0 60%, var(--sun) 60% 80%, var(--flame) 80%);
  transform-origin: left; transform: scaleX(var(--p, 0));
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .section-head, .facts li, .timeline li, .energy > *, .partner-body, .contact-main {
      animation: settle linear both; animation-timeline: view(); animation-range: entry 0% entry 60%;
    }
    @keyframes settle { from { transform: translateY(32px); opacity: .35; } }
  }
}

/* ---------- Partner ---------- */
.partner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(32px, 5vw, 64px); }
.partner .section-head { margin-bottom: 0; align-content: start; }
.partner-body { display: grid; gap: 16px; color: var(--ink-soft); max-width: 40em; }
.partner-logo {
  justify-self: start; margin-top: 8px;
  display: flex; align-items: center; gap: 20px;
  background: var(--white); border: 1px solid var(--rule); padding: 14px 20px;
  text-decoration: none; font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-soft);
}
.partner-logo:hover { border-color: var(--navy); color: var(--navy); }
.partner-logo img { width: 150px; }
@media (max-width: 760px) { .partner { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Contact ---------- */
.contact { background: var(--navy-deep); color: var(--white); padding-block: clamp(64px, 9vw, 112px); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.contact-main { max-width: 760px; }
.contact-main { display: grid; gap: 16px; }
.contact h2 { color: var(--white); }
.contact-phone {
  margin-top: 8px;
  font-family: var(--f-display); font-stretch: 125%; font-weight: 900;
  font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -0.02em;
  color: var(--sun); text-decoration: none; font-variant-numeric: tabular-nums;
}
.contact-phone:hover { color: var(--white); }
.contact-hours { color: rgb(255 255 255 / .7); }
.contact-list { margin: 16px 0 0; display: grid; border-top: 1px solid rgb(255 255 255 / .15); }
.contact-list div { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid rgb(255 255 255 / .15); }
.contact-list dt { font-family: var(--f-mono); font-size: var(--t-xs); letter-spacing: .12em; text-transform: uppercase; color: rgb(255 255 255 / .55); padding-top: 3px; }
.contact-list dd { margin: 0; }
.contact a:not(.contact-phone) { color: var(--white); }
.contact a:not(.contact-phone):hover { color: var(--sun); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep); color: rgb(255 255 255 / .55);
  border-top: 1px solid rgb(255 255 255 / .12);
  font-family: var(--f-mono); font-size: var(--t-xs); letter-spacing: .06em;
  padding-block: 24px calc(24px + env(safe-area-inset-bottom, 0px));
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; }
.footer-brand { display: flex; align-items: center; gap: 8px; color: var(--white); text-transform: uppercase; letter-spacing: .12em; }
.footer-brand img { background: var(--white); padding: 2px; border-radius: 2px; }

/* ---------- Lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; }
.lightbox[open] { display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; align-items: center; }
.lightbox::backdrop { background: rgb(5 5 50 / .92); }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 12px; }
.lightbox img { max-height: 84vh; max-width: 100%; }
.lightbox figcaption { color: var(--white); font-family: var(--f-mono); font-size: var(--t-xs); letter-spacing: .04em; text-align: center; padding: 0 8px; }
.lightbox button { width: 48px; height: 48px; justify-self: center; border: 1px solid rgb(255 255 255 / .3); background: transparent; color: var(--white); font-size: 28px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: var(--white); color: var(--navy); }
.lb-close { position: absolute; top: calc(16px + env(safe-area-inset-top, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); }
@media (max-width: 600px) {
  .lightbox[open] { grid-template-columns: minmax(0, 1fr); }
  .lb-prev, .lb-next { position: absolute; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
  .lb-prev { left: 20px; }
  .lb-next { right: 20px; }
}

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

.file-meta { font-family: var(--f-mono); font-size: var(--t-xs); color: rgb(255 255 255 / .55); margin-left: 6px; }


.screen-dark .transition-body { color: rgb(255 255 255 / .78); }
@media (max-height: 800px) { .energy-photo img { max-height: 34vh; } .energy h3 { font-size: clamp(2rem, 3.6vw, 2.8rem); } }

/* One reading size for every block of running text */
.hero-lead, .facts li, .transition-body, .timeline, .energy-intro, .depth-text,
.panel-info > p:not(.label):not(.chips), .split, .partner-body, .contact-hours {
  font-size: var(--t-text); line-height: 1.65;
}
.facts strong { font-size: var(--t-md); }
@media (max-height: 800px) {
  .h-scroll.is-pinned .panel-info { gap: 8px; }
  .h-scroll.is-pinned .split { margin-top: 4px; gap: 6px; }
}
/* short screens: keep the big title, make the services index compact so the column fits */
@media (max-height: 860px) and (min-width: 861px) {
  .svc-aside { gap: 24px; }
  .svc-index a { padding-block: 9px; font-size: var(--t-md); }
  .svc-index a span { display: none; }
}

/* ---------- Drilling page on the same deep blue as the transition page ---------- */
.depth-pin { background: var(--navy-deep); color: rgb(255 255 255 / .78); }
.depth-pin .depth-text { color: rgb(255 255 255 / .78); }
.depth-pin .label { color: rgb(255 255 255 / .6); }
.depth-pin h2 { color: var(--white); }
.depth-pin .depth-readout { color: var(--white); }
.depth-pin .depth-readout span { color: var(--sun); }
.depth-pin .depth-figure { background: rgb(255 255 255 / .04); border-color: rgb(255 255 255 / .14); }
.depth-pin .d-earth { fill: #2a2140; }
.depth-pin .d-ground { stroke: #7fb356; }
.depth-pin .d-axis line { stroke: rgb(255 255 255 / .5); }
.depth-pin .d-axis text { fill: rgb(255 255 255 / .65); }
.depth-pin .d-axis .d-grid { stroke: rgb(255 255 255 / .16); }
.depth-pin .d-name { fill: var(--white); }
.depth-pin .d-spec { fill: rgb(255 255 255 / .65); }
.depth-pin .d-probe { stroke: var(--sun); }
.depth-pin .d-cursor { stroke: var(--sun); }
.depth-pin .d-total { fill: var(--sun); }
@media (max-height: 800px) {
  .h-scroll.is-pinned .h-head { row-gap: 8px; }
  .h-scroll.is-pinned .split-note { display: none; }
  .h-scroll.is-pinned .panel-info .chips span { padding-block: 2px; }
  .h-scroll.is-pinned .power b { font-size: 2.2rem; }
}
