/* =================================================================
   Sunwave · site styles (the "chapters" design, version 2; product pages add catalog.css)
   After Stephan's Kimi build (sunwave.kimi.page, 2026-10-27): paper grey, heavy uppercase Archivo, mono kickers,
   full-screen chapters that pin while the next one slides over them. Plain CSS; site.js sets --p (0..1) per chapter.
   ================================================================= */
:root {
  --paper: #F4F5F5;
  --ink: #0B0B0C;
  --orange: #F06000;
  --orange-text: #C24E00;       /* orange for small text on paper (contrast) */
  --black-70: rgba(0, 0, 0, 0.7);
  --black-55: rgba(0, 0, 0, 0.55);
  --black-10: rgba(0, 0, 0, 0.1);
  --paper-70: rgba(244, 245, 245, 0.7);
  --paper-15: rgba(244, 245, 245, 0.15);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: "Archivo", "Arial Black", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: clamp(16px, 3.4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--display); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
body.is-locked { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.wrap { width: 100%; max-width: 1600px; margin-inline: auto; padding-inline: var(--gutter); }

/* =================================================================
   Type
   ================================================================= */
.kicker {
  display: flex; align-items: center; gap: 14px; margin: 0 0 22px;
  font: 400 11px/1.4 var(--mono); letter-spacing: 0.32em; text-transform: uppercase; color: var(--black-55);
}
/* no rule before or after the kicker (Tazio 2026-11-04) */
.kicker__n { color: var(--orange); }
.kicker--ink { color: var(--paper-70); }

.display {
  margin: 0; font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-variation-settings: "wdth" 112; letter-spacing: -0.022em; line-height: 0.92;
  font-size: clamp(2.5rem, 9.4vw, 7.4rem);
}
.display--md { font-size: clamp(2.3rem, 8vw, 6.3rem); }
.display--sm { font-size: clamp(2rem, 5vw, 3.6rem); line-height: 0.98; }
.display .line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.display .line > span { display: block; }
@media (max-width: 599px) { .display { font-variation-settings: "wdth" 100; } }
/* phones: the hero headline in two lines, "Energy" / "without limits.", sized to the screen */
@media (max-width: 599px) { .ch--hero .display { font-size: 9vw; } .ch--hero .display .line > span { white-space: nowrap; } }

.body { margin: 22px 0 0; max-width: 38ch; font-size: clamp(1rem, 1.05vw, 1.15rem); line-height: 1.62; color: rgba(0, 0, 0, 0.68); }
.body strong { color: var(--ink); font-weight: 700; }
.body--ink { color: var(--paper-70); }
/* ledes with set line breaks (Tazio 2026-10-27): <br class="br-d"> breaks on desktop only, "br-m" on phones only,
   "br-a" on both; .body--lines / .body--lines-m make the lines keep to them (no 38ch wrap) on desktop / phones.
   Tablets wrap naturally. On the narrowest phones the set lines shrink a hair so the longest one fits at 360px. */
.br-d, .br-m, .br-a { display: none; }
@media (min-width: 1000px) {
  .br-d, .br-a { display: inline; }
  .body--lines { max-width: none; white-space: nowrap; }
}
/* phone-only and not-on-phones bits (Tazio 2026-10-27) */
.show-m { display: none; }
.show-m-i { display: none; }
@media (max-width: 799px) { .hide-m { display: none; } .show-m { display: block; } .show-m-i { display: inline; } }
.quote__mnotes .body { margin-top: 0; }
/* closing line on phones: three lines, THE FUTURE RUNS / ON STORED / SUNLIGHT., sized so the first fits */
@media (max-width: 799px) { .close .display { font-size: 8.4vw; } .close .display .line > span { white-space: nowrap; } }
@media (max-width: 799px) {
  .br-m, .br-a { display: inline; }
  .body--lines-m { max-width: none; white-space: nowrap; font-size: min(1rem, 4.35vw); }
}
.mono-line { margin: 14px 0 0; font: 400 15px/1.5 var(--mono); letter-spacing: 0.02em; color: var(--orange-text); }

/* key figures under a chapter: mono label, heavy value */
.figs { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 28px 0 0; padding: 0; }
.figs > div { border-top: 1px solid var(--black-10); padding-top: 10px; min-width: 110px; }
.figs dt { font: 400 10px/1.4 var(--mono); letter-spacing: 0.24em; text-transform: uppercase; color: var(--black-55); }
.figs dd { margin: 4px 0 0; font-weight: 800; font-variation-settings: "wdth" 108; font-size: clamp(1.15rem, 1.6vw, 1.5rem); letter-spacing: -0.01em; }

/* =================================================================
   Buttons and links
   ================================================================= */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 22px; border: 1px solid transparent;
  font: 400 11px/1 var(--mono); letter-spacing: 0.32em; text-transform: uppercase; cursor: pointer; background: none;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.btn--line { border-color: rgba(0, 0, 0, 0.35); color: var(--ink); }
.btn--line:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--on-ink { border-color: rgba(244, 245, 245, 0.4); color: var(--paper); }
.btn--on-ink:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn--orange { background: var(--orange); color: #fff; }
.btn--orange:hover { background: var(--ink); }
.btn--orange-line { border-color: var(--orange); color: var(--orange-text); }
.btn--orange-line:hover { background: var(--orange); color: #fff; }
.link {
  font: 400 11px/1.4 var(--mono); letter-spacing: 0.24em; text-transform: uppercase; color: var(--black-70);
  background: none; border: 0; padding: 4px 0; cursor: pointer; border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.link:hover { color: var(--orange-text); border-color: currentColor; }
.link--ink { color: var(--paper-70); }
.link--ink:hover { color: var(--orange); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
/* phones: buttons with tighter tracking, so the longest label ("Explore large-scale systems") keeps its arrow at 360px */
@media (max-width: 799px) { .btn { letter-spacing: 0.22em; padding-inline: 16px; white-space: nowrap; } }
@media (max-width: 380px) { .btn { letter-spacing: 0.16em; } }

/* =================================================================
   Nav
   ================================================================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 72px;
  transition: transform 0.5s var(--ease), background-color 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-solid { background: rgba(244, 245, 245, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--black-10); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.nav__brand img { height: 40px; width: auto; }
.nav__links { display: none; gap: 40px; margin-inline: auto; }
.nav__links a { font: 400 11px/1 var(--mono); letter-spacing: 0.32em; text-transform: uppercase; color: var(--black-70); transition: color 0.3s; }
.nav__links a:hover { color: var(--orange-text); }
.nav__cta { display: none; padding: 12px 18px; }
.nav__burger { margin-left: auto; width: 44px; height: 44px; display: inline-flex; flex-direction: column; justify-content: center; gap: 6px; background: none; border: 0; cursor: pointer; }
.nav__burger span { width: 24px; height: 1.5px; background: var(--ink); margin-inline: auto; transition: transform 0.35s var(--ease); }
.nav__burger.is-open span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }
@media (min-width: 1000px) {
  .nav__links, .nav__cta { display: flex; }
  .nav__burger { display: none; }
}

/* language menu (navbar) */
/* text for screen readers only (every page loads this file) */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lang { position: relative; }
/* right-hand group (quote button, language, menu button). Desktop: three columns, logo | links | group, so the links
   stay centred on the page; the quote button takes the middle of the space between "Contact" and the language button,
   which sits at the right edge of the content area */
.nav__end { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav__burger { margin-left: 0; }
@media (min-width: 1000px) {
  .nav__inner { display: grid; grid-template-columns: 1fr auto 1fr; column-gap: 0; }
  .nav__brand { justify-self: start; }
  .nav__links { margin-inline: 0; }
  .nav__end { margin-left: 0; gap: 0; }
  /* centred, then 50px closer to the language button (Tazio 2026-10-27); eased in from 1100 to 1250px wide, where the
     gap is too small for the full shift */
  .nav__end .nav__cta { margin-inline: auto; position: relative; left: clamp(0px, calc((100vw - 1100px) / 3), 50px); }
  .nav__end .lang__btn { justify-content: flex-end; padding-right: 0; }  /* the label on the content edge, its tap area reaching inward */
}
/* "EN ▼" in the nav links' type (Tazio 2026-11-12, in place of the translate icon); the logo's grey (Tazio 2026-10-27) */
.lang__btn { min-width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 2px; background: none; border: 0; color: #707070; cursor: pointer; transition: color 0.3s; font: 400 12px/1 var(--mono); letter-spacing: 0.2em; }
.lang__code { margin-right: -0.2em; }  /* no trailing letter-space before the caret */
.lang__caret { font-size: 8px; transition: transform 0.3s; }
.lang__btn[aria-expanded="true"] .lang__caret { transform: rotate(180deg); }
.lang__btn:hover, .lang__btn[aria-expanded="true"] { color: var(--orange-text); }
.lang__menu { position: absolute; top: calc(100% + 8px); right: 0; margin: 0; padding: 6px 0; list-style: none; width: max-content; background: #fff; border: 1px solid var(--black-10); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1); z-index: 5; }
.lang__menu a { display: flex; gap: 12px; padding: 10px 18px; font-size: 14px; color: var(--black-70); }  /* the list as wide as its longest entry (Tazio 2026-10-27) */
.lang__menu b { font: 500 11px/1.6 var(--mono); letter-spacing: 0.16em; min-width: 22px; }
.lang__menu a:hover, .lang__menu a[aria-current="page"] { color: var(--orange-text); background: rgba(240, 96, 0, 0.05); }
body:has(.mobile-menu.is-open) .lang { visibility: hidden; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 45; background: var(--ink); color: var(--paper);
  display: flex; flex-direction: column; justify-content: center; gap: 40px; padding: 96px var(--gutter) 48px;
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu.is-open { opacity: 1; }
.mobile-menu__links { display: flex; flex-direction: column; gap: 6px; }
.mobile-menu__links a { font-weight: 800; text-transform: uppercase; font-size: clamp(1.75rem, 9vw, 3.6rem); line-height: 1.1; letter-spacing: -0.02em; }
.mobile-menu .btn { align-self: flex-start; }
/* the burger stays reachable above the open menu */
body:has(.mobile-menu.is-open) .nav { background: transparent; border-color: transparent; backdrop-filter: none; transform: none; }
body:has(.mobile-menu.is-open) .nav__burger span { background: var(--paper); }
body:has(.mobile-menu.is-open) .nav__brand img { filter: brightness(0) invert(1); }

/* =================================================================
   Chapter rail (desktop): ticks, the active one long and orange
   ================================================================= */
.rail { position: fixed; right: 24px; top: 50%; transform: translateY(-50%); z-index: 40; display: none; flex-direction: column; align-items: flex-end; gap: 12px; }
.rail__num { font: 400 11px/1 var(--mono); letter-spacing: 0.32em; color: var(--orange); margin-bottom: 8px; }
.rail i { display: block; width: 12px; height: 1px; background: rgba(0, 0, 0, 0.2); transition: width 0.5s var(--ease), background-color 0.4s; }
.rail i.is-on { width: 28px; background: var(--orange); }
body.on-ink .rail i:not(.is-on) { background: rgba(244, 245, 245, 0.25); }
@media (min-width: 1000px) { .rail { display: flex; } }

/* =================================================================
   Chapters: the stage pins for the chapter's height, the next chapter slides over it (negative margin)
   ================================================================= */
.ch { position: relative; height: 260svh; --p: 0; --z: 0; --out: clamp(0, (var(--p) - 0.42) / 0.58, 1); }
/* scroll effects, the subtle option Tazio picked (2026-10-27): the photo zooms out 5% while the chapter is alone on
   screen (--z, done before the next chapter's edge shows). As the next one covers it (--out), the stage used to sink
   2.5%, which uncovered a hard-edged strip of page along its sides; now it fades to white from the sides instead
   (desktop; phones have neither). 260svh = 60svh of pinned reading before the next chapter appears. */
:root { --zoom: 0.05; }
.ch--over { margin-top: -100vh; margin-top: -100lvh; }
/* the stage is as tall as the screen with the browser bars hidden (lvh), so a phone never shows a strip of the next
   section or white when the address bar slides away (Tazio 2026-10-27); the copy stays within the screen with the
   bars shown (svh, see .ch__content). Desktop: lvh = svh = vh. */
.ch__stage { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; background: var(--paper); }
.ch__stage > * { transform-origin: 50% 100%; }
/* as the next chapter covers this one, a soft white rises from both sides (Tazio 2026-10-27: no hard white line). Only
   on the first four chapters (hero, infrastructure, battery, inverter); the others are simply covered (Tazio). */
@media (min-width: 800px) {
  :is([data-ch="00"], [data-ch="01"], [data-ch="02"], [data-ch="03"]) > .ch__stage::after {
    content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: var(--out);
    background: linear-gradient(to right, var(--paper), rgba(244, 245, 245, 0) 16%, rgba(244, 245, 245, 0) 84%, var(--paper));
  }
}
.ch--dark .ch__stage { background: var(--ink); color: var(--paper); }

.ch__media { position: absolute; inset: 0; overflow: hidden; }
.ch__media picture { display: block; width: 100%; height: 100%; }
.ch__media img, .ch__media video { width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1 + var(--zoom) - var(--zoom) * var(--z))); will-change: transform; }
.ch__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(244, 245, 245, 0.96), rgba(244, 245, 245, 0.72) 30%, rgba(244, 245, 245, 0.16) 58%, rgba(244, 245, 245, 0) 78%),
    linear-gradient(to right, rgba(244, 245, 245, 0.86), rgba(244, 245, 245, 0.3) 38%, rgba(244, 245, 245, 0) 62%);
}
.ch--dark .ch__scrim {
  background:
    linear-gradient(to top, rgba(11, 11, 12, 0.95), rgba(11, 11, 12, 0.72) 32%, rgba(11, 11, 12, 0.2) 60%, rgba(11, 11, 12, 0.05) 80%),
    linear-gradient(to right, rgba(11, 11, 12, 0.85), rgba(11, 11, 12, 0.3) 40%, rgba(11, 11, 12, 0) 64%);
}
.ch__content {
  position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: 96px; padding-bottom: clamp(40px, 9vh, 112px);
  padding-bottom: calc(clamp(40px, 9vh, 112px) + 100lvh - 100svh);  /* clear of the bars when they show */
}

/* pale photo chapters (infrastructure, energy at scale; Tazio 2026-10-27: the containers were washed out): a lighter
   fade, only where the text sits, and a little more contrast and colour in the photo itself */
.ch--clear .ch__media img { filter: contrast(1.18) saturate(1.2) brightness(0.96); }
/* desktop keeps the standard fade (Tazio 2026-10-27); phones get the lighter one */
@media (max-width: 799px) {
  .ch--clear .ch__scrim { background: linear-gradient(to top, rgba(244, 245, 245, 0.9) 14%, rgba(244, 245, 245, 0.62) 34%, rgba(244, 245, 245, 0.25) 50%, rgba(244, 245, 245, 0) 62%); }
}

/* Capture more (blue panels): the white fade reaches a little higher, up to the eyebrow (Tazio 2026-10-27) */
.ch--solar .ch__scrim {
  background:
    linear-gradient(to top, rgba(244, 245, 245, 0.96), rgba(244, 245, 245, 0.78) 38%, rgba(244, 245, 245, 0.5) 62%, rgba(244, 245, 245, 0.18) 76%, rgba(244, 245, 245, 0) 88%),
    linear-gradient(to right, rgba(244, 245, 245, 0.86), rgba(244, 245, 245, 0.3) 38%, rgba(244, 245, 245, 0) 62%);
}
@media (max-width: 799px) {
  .ch--solar .ch__scrim { background: linear-gradient(to top, rgba(244, 245, 245, 0.97) 34%, rgba(244, 245, 245, 0.85) 52%, rgba(244, 245, 245, 0.5) 64%, rgba(244, 245, 245, 0) 80%); }
}

/* render chapters (AI renders of our own products, see index.html): the product sits closer to the middle of the
   photo, so the headline is a size smaller */
.ch--render .display { font-size: clamp(2.5rem, 6vw, 5.4rem); }
@media (max-width: 799px) {
  .ch__scrim { background: linear-gradient(to top, rgba(244, 245, 245, 0.97) 30%, rgba(244, 245, 245, 0.7) 54%, rgba(244, 245, 245, 0.1) 78%); }
  .ch--dark .ch__scrim { background: linear-gradient(to top, rgba(11, 11, 12, 0.96) 34%, rgba(11, 11, 12, 0.6) 60%, rgba(11, 11, 12, 0.15) 85%); }
  .figs { gap: 12px 24px; margin-top: 20px; }
  .figs > div { min-width: 0; }
  .body { margin-top: 16px; }
  .actions { margin-top: 22px; }
}
@media (max-height: 760px) and (max-width: 799px) { .body { font-size: 0.95rem; } }

/* chapters on an AI render of our own product (Pro Cube): landscape render on desktop, portrait render on phones
   (<picture> in index.html), product in the upper half there and the text over the empty floor */
.ch--render .ch__scrim {
  background:
    linear-gradient(to top, rgba(244, 245, 245, 0.9), rgba(244, 245, 245, 0.4) 16%, rgba(244, 245, 245, 0) 32%),
    linear-gradient(to right, rgba(244, 245, 245, 0.88), rgba(244, 245, 245, 0.45) 30%, rgba(244, 245, 245, 0) 48%);
}
@media (max-width: 799px) {
  /* phones: the portrait render fills the screen's height (Tazio 2026-10-27; it was screen-wide from the top with plain
     beige below), anchored at the top so the product stays in the upper part */
  .ch--render .ch__media img { object-position: 50% 0%; }
  .ch--render .ch__stage { background: #EFEAE3; }
  /* the copy sits on its own beige, as tall as the text block on any phone: solid behind the text, fading into the
     photo over the 80px above the label (Tazio 2026-10-27: legibility); the stage's fade is not needed then */
  .ch--render .ch__scrim { background: none; }
  .ch--render .ch__content {
    position: absolute; left: 0; right: 0; bottom: 0; height: auto; padding-top: 80px;
  }
  /* a soft beige fade behind the copy, there from the start (Tazio 2026-10-27: no fade-in, and lighter than the solid
     beige it was): clear at the top, about 70% by the eyebrow, 85% at the bottom */
  .ch--render .ch__content::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(to bottom, rgba(239, 234, 227, 0), rgba(239, 234, 227, 0.7) 80px, rgba(239, 234, 227, 0.85));
  }
  .ch--render [data-lines] .line > span { --s: 0.12; }
  .ch--render [data-lines] .line:nth-child(2) > span { --s: 0.2; }
  .ch--render .ch__content > :not(.display) { --s: 0.42; }
  /* a shorter text block so it starts below the battery: figures on one row, no tagline */
  .ch--render .mono-line { display: none; }
  .ch--render .figs { flex-wrap: nowrap; gap: 14px; }
  .ch--render .figs > div { flex: 1 1 0; }
  .ch--render .figs dt { letter-spacing: 0.12em; }
  .ch--render .figs dd { font-size: 1.05rem; }
}

/* Copy reveals, tied to the scroll position (Tazio 2026-10-27, like the Kimi build): site.js gives every section below
   the hero --r, 0 when its background fills the screen and 1 after 35% of a screen more (smoothed). Each piece of copy
   starts at its own --s and takes 0.4 of that run (--e, eased out), so the headline lines rise first, then the rest;
   it stops wherever the scroll stops and runs backwards on the way up. */
.line > span, .ch__content > *, .ink .wrap > .kicker, .ink .wrap > .body, .close .btn, .quote__head > *,
.flow::before, .flow li, .stats, .marks {
  --e0: clamp(0, (var(--r, 1) - var(--s, 0)) / 0.4, 1);
  --e: calc(var(--e0) * (2 - var(--e0)));
}
[data-lines] .line > span { transform: translateY(calc((1 - var(--e)) * 105%)); }
[data-lines] .line:nth-child(2) > span { --s: 0.08; }
[data-lines] .line:nth-child(3) > span { --s: 0.16; }
.ch__content > :not(.display), .ink .wrap > .kicker, .ink .wrap > .body, .close .btn, .quote__head > * {
  --s: 0.3; opacity: var(--e); transform: translateY(calc((1 - var(--e)) * 18px));
}
.quote__head > :nth-child(-n+2) { --s: 0; }

/* the hero is on screen at load: its copy comes in on a timer instead (site.js adds .is-on) */
.ch--hero .line > span, .ch--hero .ch__content > * { --r: 0; }
.ch--hero [data-lines] .line > span { transition: transform 1.1s var(--ease); }
.ch--hero [data-lines] .line:nth-child(2) > span { transition-delay: 0.08s; }
.ch--hero .ch__content > :not(.display) { transition: opacity 0.9s var(--ease) 0.25s, transform 0.9s var(--ease) 0.25s; }
.ch--hero.is-on .line > span, .ch--hero.is-on .ch__content > * { --r: 1; }

/* =================================================================
   Ink sections (system, proof)
   ================================================================= */
.ink { position: relative; background: var(--ink); color: var(--paper); padding: clamp(96px, 14vh, 160px) 0 clamp(80px, 12vh, 140px); min-height: 100vh; min-height: 100lvh; }
.ink--grid, .grid-bg { background-size: 64px 64px; }
.ink--grid { background-color: var(--ink); background-image: linear-gradient(rgba(244, 245, 245, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(244, 245, 245, 0.05) 1px, transparent 1px); }
.grid-bg { background-color: #fff; background-image: linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px); }

/* one system: four nodes on an orange line that draws itself. Granular (Tazio 2026-10-27): the line follows the
   diagram's own --r over 60% of a screen of scrolling (site.js), a glowing point leads it, and each step comes in as the
   line reaches it (nodes at 0, 1/3, 2/3 and 1 of the line) */
.flow {
  list-style: none; margin: clamp(56px, 9vh, 96px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative;
  --l: clamp(0, var(--r, 1) / 0.92, 1);
}
.flow::before {
  content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 28px; height: 1px;
  background: linear-gradient(90deg, rgba(240, 96, 0, 0.55), var(--orange) 60%, #FF7A1A);
  transform: scaleX(var(--l)); transform-origin: left;
}
.flow::after {
  content: ""; position: absolute; top: 28px; left: calc(12.5% + 75% * var(--l)); width: 7px; height: 7px; margin: -3px 0 0 -3.5px;
  border-radius: 50%; background: #FF7A1A; pointer-events: none;
  box-shadow: 0 0 0 4px rgba(240, 96, 0, 0.18), 0 0 16px 3px rgba(255, 122, 26, 0.55);
  opacity: min(var(--l) * 12, (1 - var(--l)) * 12, 1);  /* only while the line is drawing */
}
.flow li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 0 8px; }
.flow__n {
  width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgba(244, 245, 245, 0.25); background: var(--ink);
  display: grid; place-items: center; font: 400 12px/1 var(--mono); color: var(--orange); margin-bottom: 18px; position: relative; z-index: 1;
}
.flow b { font-weight: 800; text-transform: uppercase; font-variation-settings: "wdth" 108; font-size: clamp(1.1rem, 1.6vw, 1.5rem); letter-spacing: -0.01em; }
.flow li > span:last-child { font: 400 10px/1.5 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: rgba(244, 245, 245, 0.5); max-width: 22ch; }
/* each step comes in over a short stretch as the line reaches its node */
.flow li { --s: 0; --e0: clamp(0, (var(--r, 1) - var(--s)) / 0.14, 1); opacity: var(--e); transform: translateY(calc((1 - var(--e)) * 16px)); }
.flow li:nth-child(2) { --s: 0.27; }
.flow li:nth-child(3) { --s: 0.58; }
.flow li:nth-child(4) { --s: 0.86; }
@media (max-width: 799px) {
  .flow { grid-template-columns: 1fr; gap: 28px; }
  .flow::before { left: 28px; right: auto; top: 28px; bottom: 28px; width: 1px; height: auto; transform: scaleY(var(--l)); transform-origin: top; background: var(--orange); }
  .flow::after { left: 28px; top: calc(28px + (100% - 56px) * var(--l)); margin: -3.5px 0 0 -3px; }
  .flow li { flex-direction: row; text-align: left; align-items: center; gap: 18px; padding: 0; flex-wrap: wrap; }
  .flow__n { margin: 0; flex: none; }
  .flow li > span:last-child { flex-basis: 100%; max-width: none; padding-left: 74px; margin-top: -14px; }
}

/* factory points */
.points { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 10px 36px; }
.points li { font-size: 13px; color: var(--paper-70); display: flex; gap: 12px; }
.points span { font: 400 10px/2 var(--mono); color: var(--orange); }
@media (max-width: 599px) { .points { grid-template-columns: 1fr; } }

/* proof */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(48px, 8vh, 88px); border: 1px solid var(--paper-15); }
.stats > div { padding: 28px 24px 32px; border-right: 1px solid var(--paper-15); }
.stats > div:last-child { border-right: 0; }
.stats__k { margin: 0; font: 400 10px/1.4 var(--mono); letter-spacing: 0.28em; text-transform: uppercase; color: var(--orange); }
.stats__v { margin: 18px 0 0; font-weight: 800; font-variation-settings: "wdth" 112; font-size: clamp(2.2rem, 4.2vw, 3.8rem); line-height: 1; letter-spacing: -0.02em; }
.stats__v small { font-size: 0.42em; font-weight: 500; letter-spacing: 0; color: var(--paper-70); }
.marks { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 12px 16px; }
/* desktop: one row from edge to edge, evenly spaced (Tazio 2026-10-27) */
@media (min-width: 1000px) { .marks { display: flex; justify-content: space-between; gap: 16px; } }
.marks li { font: 400 11px/1.4 var(--mono); letter-spacing: 0.22em; color: rgba(244, 245, 245, 0.5); }
/* stats and marks: their own --r (site.js, from their own position) */
.stats, .marks { --s: 0; opacity: var(--e); transform: translateY(calc((1 - var(--e)) * 18px)); }
@media (max-width: 799px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div:nth-child(2) { border-right: 0; }
  .stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--paper-15); }
}

/* proof (10) and closing line (11) are pinned chapters since 2026-11-04 (Tazio: behave like the sections above): the
   stage holds, the copy comes in once it fills the screen (--r of the chapter), the next section slides over it.
   Stats and certification marks follow the headline in the chapter's own reveal. */
.ch--proof .ch__content > .marks { --s: 0.42; }
@media (max-width: 799px) {
  .ch--proof .ch__content { padding-top: 76px; }
  .ch--proof .stats { margin-top: 32px; }
  .ch--proof .stats > div { padding: 16px 14px 18px; }
  .ch--proof .stats__v { margin-top: 10px; font-size: 2rem; }
  .ch--proof .marks { margin-top: 24px; gap: 8px 12px; }
}

/* energy system (05), pinned since 2026-11-04: the dark grid on the stage; taller than a chapter (340svh) so the step
   line has its own stretch of scrolling after the copy is in (site.js: from 30% to 105% of a screen past the top) and
   is done before the factory chapter slides over. The diagram keeps its own --r, so the chapter's fade skips it. */
.ch--system { height: 340svh; }
.ch--system .ch__stage {
  background-color: var(--ink); background-size: 64px 64px;
  background-image: linear-gradient(rgba(244, 245, 245, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(244, 245, 245, 0.05) 1px, transparent 1px);
}
.ch--system .ch__content > .flow { opacity: 1; transform: none; }
@media (max-width: 799px) {
  /* one phone screen: smaller step circles, closer steps (the line runs through the circles' centres, 22px in) */
  .ch--system .ch__content { padding-top: 72px; }
  .ch--system .flow { margin-top: 28px; gap: 14px; }
  .ch--system .flow::before { left: 22px; top: 22px; bottom: 22px; }
  .ch--system .flow::after { left: 22px; top: calc(22px + (100% - 44px) * var(--l)); }
  .ch--system .flow__n { width: 44px; height: 44px; }
  .ch--system .flow li { gap: 14px; }
  .ch--system .flow li > span:last-child { padding-left: 58px; margin-top: -12px; }
}

/* closing line: centred on its stage */
.close .ch__content { justify-content: center; align-items: center; text-align: center; gap: 44px; padding-bottom: 96px; }

/* =================================================================
   Quote form
   ================================================================= */
.quote { position: relative; background: var(--paper); padding: clamp(96px, 14vh, 160px) 0; border-top: 1px solid var(--black-10); }
.quote__inner { display: grid; gap: 56px; }
@media (min-width: 1000px) { .quote__inner { grid-template-columns: 5fr 7fr; gap: 80px; } }
.quote__note { margin: 22px 0 0; padding-left: 16px; border-left: 1px solid var(--orange); max-width: 40ch; font-size: 14px; color: var(--black-55); }
.quote__form { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 28px; align-content: start; }
@media (max-width: 599px) { .quote__form { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field label, .field legend { font: 400 10px/1.4 var(--mono); letter-spacing: 0.26em; text-transform: uppercase; color: var(--black-55); padding: 0; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 0; padding: 10px 0; transition: border-color 0.3s;
}
.field textarea { resize: vertical; border: 1px solid rgba(0, 0, 0, 0.18); padding: 12px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange); }
.field [aria-invalid="true"] { border-color: #C0262D; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 10px; margin-top: 6px; }  /* fills the width: 4 columns where they fit, else 2 (Tazio 2026-10-27) */
@media (max-width: 799px) { .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.choice { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.choices .choice { display: flex; white-space: nowrap; border: 1px solid rgba(0, 0, 0, 0.18); padding: 10px 14px; transition: border-color 0.3s, background-color 0.3s; }
.choices .choice:has(input:checked) { border-color: var(--orange); background: rgba(240, 96, 0, 0.06); }
@media (max-width: 380px) { .choices .choice { padding-inline: 10px; gap: 8px; letter-spacing: 0.12em; } }
.choice input { accent-color: var(--orange); width: 16px; height: 16px; margin: 0; }
.consent { font-size: 13px; color: var(--black-70); align-items: flex-start; }
.consent input { margin-top: 2px; }
/* phones: bigger, darker form labels (Tazio 2026-11-12: many of Stephan's clients are middle-aged, 10 px was hard to read);
   the product checkboxes stay one line in their half-width boxes */
@media (max-width: 799px) {
  .field label, .field legend { font-size: 13px; letter-spacing: 0.12em; color: var(--black-70); }
  .choices .choice { font-size: 12px; letter-spacing: 0.08em; }
  .consent { font-size: 14px; }
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.quote__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.quote__actions .btn[disabled] { opacity: 0.6; cursor: progress; }
.quote__status { margin: 0; font-size: 14px; color: var(--black-70); }
.quote__status.is-ok { color: var(--orange-text); }
.quote__status.is-error { color: #C0262D; }
.quote__form.is-sent .field, .quote__form.is-sent .consent, .quote__form.is-sent .btn { display: none; }

/* =================================================================
   Footer
   ================================================================= */
.footer { background: var(--paper); border-top: 1px solid var(--black-10); padding: clamp(64px, 9vw, 104px) 0 32px; overflow: hidden; }
.footer__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 24px; }
/* phones: the three link columns on one row under the brand, product names shortened (Tazio 2026-10-27) */
@media (max-width: 899px) { .footer__grid { grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 32px 12px; } }
@media (max-width: 380px) { .footer__col a { font-size: 14px; } }
/* the three link columns aligned to their place on the row, left / centre / right, on every screen (Tazio 2026-10-27) */
.footer__col:nth-of-type(2) { align-items: center; text-align: center; }
.footer__col:nth-of-type(3) { align-items: flex-end; text-align: right; }
@media (min-width: 900px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer__brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer__brand { grid-column: auto; } }
.footer__brand img { height: 44px; width: auto; }
.footer__brand p { margin: 16px 0 0; white-space: nowrap; font-size: min(14px, 4vw); color: var(--black-55); }  /* two lines, the break after "storage," (Tazio 2026-10-27) */
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col a { font-size: 15px; color: var(--black-70); transition: color 0.3s; }
.footer__col a:hover { color: var(--orange-text); }
.footer__h { margin: 0 0 6px; font: 400 10px/1.4 var(--mono); letter-spacing: 0.28em; text-transform: uppercase; color: var(--orange-text); }
/* the two office addresses, under the link columns (Tazio 2026-11-12) */
.footer__offices { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--black-10); }
.footer__offices address { font-style: normal; font-size: 14px; line-height: 1.6; color: var(--black-55); }
.footer__offices .footer__h { display: block; }
@media (max-width: 699px) { .footer__offices { grid-template-columns: 1fr; gap: 20px; margin-top: 36px; } }
.footer__giant {
  margin: clamp(56px, 8vw, 96px) auto 0; padding-top: 32px; border-top: 1px solid var(--black-10);
  font-weight: 800; text-transform: uppercase; font-variation-settings: "wdth" 112; letter-spacing: -0.03em;
  font-size: clamp(3.2rem, 13vw, 13rem); line-height: 0.86; color: rgba(0, 0, 0, 0.055);
}
.footer__base { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 40px; }
.footer__base p { margin: 0; font: 400 10px/1.6 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: rgba(0, 0, 0, 0.45); }
/* phones: the copyright on one line (Tazio 2026-10-27) */
@media (max-width: 799px) { .footer__base .footer__copy { white-space: nowrap; letter-spacing: 0.06em; } }
.credit a { color: inherit; transition: color 0.3s; }
.credit a:hover { color: var(--orange-text); }

/* =================================================================
   Lightbox (driven by /main.js)
   ================================================================= */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: clamp(16px, 4vw, 48px); }
.lightbox[hidden] { display: none; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(11, 11, 12, 0.9); backdrop-filter: blur(4px); }
.lightbox__dialog { position: relative; z-index: 1; width: min(1100px, 100%); }
.lightbox__video { width: 100%; max-height: 82vh; background: #000; }
.lightbox__close { position: absolute; top: -52px; right: 0; width: 44px; height: 44px; border: 1px solid rgba(244, 245, 245, 0.3); background: none; color: var(--paper); font-size: 24px; cursor: pointer; }
.lightbox__close:hover { background: var(--orange); border-color: var(--orange); }

/* =================================================================
   Reduced motion: no pinning tricks, everything in place
   ================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ch, .ch--hero { height: auto; }
  .ch--over { margin-top: 0; }
  .ch__stage { position: relative; min-height: 100svh; height: auto; }
  .ch__stage::after { display: none; }
  .ch__media img, .ch__media video { transform: none; }
  [data-lines] .line > span, .ch__content > :not(.display), .flow li, .flow::before, .flow::after, .stats, .marks, .ink .wrap > .kicker, .ink .wrap > .body, .close .btn, .quote__head > * { transform: none !important; opacity: 1 !important; transition: none; }
}


/* =================================================================
   404 page (build.py)
   ================================================================= */
.lost { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 120px 0 80px; }
.lost__brand { position: absolute; top: 18px; left: var(--gutter); }
.lost__brand img { height: 40px; width: auto; }
