/* ==========================================================================
   Sunward Roof – Website-Prototyp
   Design tokens first, then base, components, sections, responsive rules.
   Look: a light page with generous whitespace (one grotesk family, big medium-weight headlines, small grey labels in
   their own column), a dark evening hero the page slides over, gold as the single accent.
   ========================================================================== */

/* Two themes: light (default) and dark (html[data-theme="dark"], set by the footer switch, see js/main.js).
   Tokens are named by role, not colour, so each theme fills them with its own values. .tone-dark gives one element
   (hero, header over the hero) the dark values inside the light page; .tone-invert gives one element the other theme's
   values (Ablauf, and the header while it is over it): dark in the light theme, light in the dark theme. */
:root, :root[data-theme="dark"] .tone-invert {
  color-scheme: light;

  /* Surfaces – warm white page, a warm grey band (Leistungen, FAQ, footer), white tiles */
  --surface-950: #E9E2D5;
  --surface-900: #FFFFFF;
  --surface-850: #FAF8F4;  /* page */
  --surface-800: #F0EBE2;  /* bands, tiles on the page */

  /* Text – navy ink; all ≥ 5.5:1 on every light surface (faint 5.6, accent-text 5.5 on the band) */
  --text-strong: #111A25; /* headlines, strong values */
  --text: #18222E;        /* default text */
  --text-soft: #27313D;
  --muted: #3A434E;       /* body copy */
  --muted-2: #414953;     /* labels */
  --muted-3: #4F5660;     /* small grey labels ("Über uns", "Leistungen") */
  --faint: #5E5D57;       /* footnotes */
  --label: #3F4751;       /* nav */
  --hi: #0a121b;          /* text on hover */
  --ink-rgb: 22, 32, 43;      /* = text colour as channels, for hairlines and tints: rgba(var(--ink-rgb), .16) */
  --panel-rgb: 250, 248, 244; /* = page, for boxes that sit over content (menu button) */
  --line: rgba(var(--ink-rgb), .16);
  --line-soft: rgba(var(--ink-rgb), .08);

  /* Brand accent (gold). Buttons, outlines, active states. As text: --accent-text (labels, units, links) and
     --accent-hl (highlighted words in headlines, ≥ 4.6:1 on every light surface). */
  --accent: #E8A94B;
  --accent-hover: #F0BC66;
  --accent-text: #835412;
  --accent-hl: #9A5A0C;
  --on-accent: #16202B;
  --on-accent-rgb: 22, 32, 43;  /* = --on-accent as channels: field lines on the gold contact panel */

  /* Chart palette (validated: CVD ΔE 24, both ≥ 3:1 on #FAF7F1; 3.8 / 4.8 : 1 on the white calculator tiles).
     The dark theme uses the dark palette below. */
  --chart-solar: #B5741F;
  --chart-grid: #3A72C4;

  /* Text and lines drawn on the photos themselves (blueprint labels, module tag) – the same in both themes */
  --photo-text: #F3EADB;
  --photo-halo: #0f1924;
}
:root {
  /* Type: one grotesk family. Headlines 500 with tight tracking, body 400. */
  --font: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Layout */
  --wrap: 1560px;
  --gutter: 56px;
  --gap: 24px;                                  /* grid column gap */
  --pad: clamp(112px, 14vw, 220px);             /* top/bottom padding of a section */
  --stage-h: max(680px, 100svh);                /* pinned stages (hero, Ansatz). svh: does not change while the
                                                   mobile browser bars slide, so the page does not jump */
  /* left edge of the .wrap content, in viewport px */
  --copy-x: max(var(--gutter), (100vw - var(--wrap)) / 2 + var(--gutter));
}

/* Dark theme and dark islands inside the light page: navy surfaces, cream text */
:root[data-theme="dark"], .tone-dark, :root:not([data-theme="dark"]) .tone-invert {
  color-scheme: dark;
  --surface-950: #0a121b;
  --surface-900: #0f1924;
  --surface-850: #101b27;
  --surface-800: #132130;
  --text-strong: #F3EADB;
  --text: #EFE6D8;
  --text-soft: #E3DACB;
  --muted: #D3CBBD;
  --muted-2: #CFC7B8;
  --muted-3: #BDB5A7;
  --faint: #A9A194;
  --label: #D9D2C5;
  --hi: #fff;
  --ink-rgb: 239, 230, 216;
  --panel-rgb: 15, 25, 36;
  --accent-hover: #F4C878;
  --accent-text: var(--accent);
  --accent-hl: var(--accent);
  /* validated for CVD on the dark surface */
  --chart-solar: #C4842C;
  --chart-grid: #5089D6;
}
.tone-dark, .tone-invert { color: var(--text); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* a modal dialog keeps the page still (the gutter keeps the scrollbar's width, so nothing shifts) */
html:has(dialog[open]) { overflow: hidden; scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--surface-850);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; }
a { color: var(--accent-text); text-decoration: none; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.band { background: var(--surface-800); }

/* --- Typography ---------------------------------------------------------- */
.h1, .h2, .h3, .h-xl { font-weight: 500; color: var(--text-strong); }
.h1 { font-size: clamp(52px, 6.6vw, 124px); line-height: .98; letter-spacing: -.035em; }
.h-xl { font-size: clamp(48px, 7.4vw, 136px); line-height: .98; letter-spacing: -.04em; }
.h2 { font-size: clamp(36px, 4.4vw, 78px); line-height: 1.04; letter-spacing: -.03em; }
.h2-sm { font-size: clamp(32px, 3.5vw, 62px); line-height: 1.08; letter-spacing: -.028em; }
.h3 { font-size: clamp(21px, 1.6vw, 27px); line-height: 1.2; letter-spacing: -.012em; }
.hl { color: var(--accent-hl); font-style: normal; }
.label { font-size: 15px; font-weight: 500; color: var(--muted-3); }
.lead { font-size: clamp(17px, 1.25vw, 21px); line-height: 1.55; color: var(--muted); }
.lead-strong { font-size: clamp(19px, 1.5vw, 25px); line-height: 1.35; font-weight: 500; letter-spacing: -.01em; color: var(--text-strong); }
.body { font-size: 16.5px; line-height: 1.65; color: var(--muted); }
.statement { font-size: clamp(24px, 2.5vw, 42px); line-height: 1.25; font-weight: 500; letter-spacing: -.022em; color: var(--text-strong); }
.caps { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.num { font-size: 14px; font-weight: 500; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.footnote { font-size: 12.5px; line-height: 1.6; color: var(--faint); }

/* --- Buttons & links ----------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 24px;
  background: var(--accent); color: var(--on-accent); border-radius: 0;
  font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: background-color .3s ease;
}
.btn:hover { color: var(--on-accent); background: var(--accent-hover); }
.ghost {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 2px;
  font-size: 15px; font-weight: 500; color: var(--text-strong); border-bottom: 1px solid rgba(var(--ink-rgb), .35);
  transition: border-color .3s ease;
}
.ghost:hover { color: var(--hi); border-bottom-color: var(--accent); }
.link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-size: 16px; font-weight: 500; color: var(--accent-text);
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 10px) / 0 1px no-repeat;
  transition: background-size .4s ease;
}
.link:hover { color: var(--accent-text); background-size: 100% 1px; }
.navlink { color: var(--label); padding: 10px 0; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat; transition: background-size .35s ease, color .3s; }
.navlink:hover { color: var(--hi); background-size: 100% 1px; }

/* --- Logo / header ------------------------------------------------------- */
.logo { display: flex; align-items: center; gap: 12px; color: var(--text-strong); }
.logo-mark { flex: none; }
.logo-mark path { fill: var(--accent); }
.logo-mark line { stroke: var(--accent); }
.logo-word { font-size: 19px; font-weight: 500; letter-spacing: -.015em; white-space: nowrap; }

/* Fixed header without a background: at the top the full nav (over the dark hero); once scrolled (.is-compact) the
   nav collapses and a menu button slides in, while the logo (mark + wordmark) always stays – past the hero over the
   translucent band below, so no header text runs over the content there. Hidden items collapse their width and are
   visibility: hidden, so they leave the tab order. */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; padding: 22px 0; pointer-events: none; color: var(--text);
  transition: padding .4s ease, background-color .4s ease, box-shadow .4s ease;
}
/* once scrolled past the hero, a translucent band in the colour of the section below, so text passing under the
   logo and buttons does not collide with them (over the hero the header stays transparent) */
.site-header.is-compact { padding: 12px 0; }
.site-header.is-compact:not(.over-hero) {
  background: rgba(var(--panel-rgb), .84); box-shadow: 0 1px 0 var(--line-soft);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.site-header .wrap { display: flex; align-items: center; }
.site-header a, .site-header button { pointer-events: auto; }
/* without js: the header stays over the hero (it is dark-toned there) and scrolls away with it; no menu button */
html:not(.js) .site-header { position: absolute; }
html:not(.js) .menu-btn { display: none; }
.site-header .logo { margin-right: auto; }
.navlinks {
  display: flex; gap: 34px; margin-right: 34px; font-size: 15px; white-space: nowrap; overflow: hidden;
  max-width: 760px; transition: max-width .6s ease, opacity .35s ease, visibility 0s;
}
.menu-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none; height: 48px; padding: 0; margin: 0;
  width: 0; overflow: hidden; opacity: 0; visibility: hidden; cursor: pointer;
  background: rgba(var(--panel-rgb), .92); border: 1px solid var(--line); color: var(--text-strong);
  transition: width .5s ease, margin .5s ease, opacity .35s ease, visibility 0s .5s, background-color .3s;
}
.menu-lines { display: flex; flex-direction: column; gap: 6px; width: 18px; }
.menu-lines i { display: block; height: 1.5px; background: currentColor; }
.menu-lines i:last-child { width: 12px; margin-left: auto; }
.site-header.is-compact .navlinks { max-width: 0; margin-right: 0; opacity: 0; visibility: hidden; transition: max-width .6s ease, opacity .25s ease, visibility 0s .6s; }
.site-header.is-compact .menu-btn { width: 48px; margin-right: 8px; opacity: 1; visibility: visible; transition: width .5s ease, margin .5s ease, opacity .35s ease .15s, visibility 0s; }
.btn-head { min-height: 48px; padding: 0 20px; gap: 0; }

/* Intro on page load: the header items drop in while the modules are laid onto the roof (pure CSS) */
@keyframes intro-down { from { opacity: 0; transform: translateY(-14px); } }
.site-header .logo, .site-header .navlink, .site-header .btn-head { animation: intro-down .9s cubic-bezier(.2,.7,.2,1) both; }
.site-header .logo { animation-delay: .15s; }
.site-header .navlink:nth-child(1) { animation-delay: .3s; }
.site-header .navlink:nth-child(2) { animation-delay: .37s; }
.site-header .navlink:nth-child(3) { animation-delay: .44s; }
.site-header .navlink:nth-child(4) { animation-delay: .51s; }
.site-header .navlink:nth-child(5) { animation-delay: .58s; }
.site-header .btn-head { animation-delay: .72s; }

/* Menu: a native modal <dialog> (focus stays inside, Esc closes, focus returns to the button) */
.menu {
  position: fixed; inset: 0 0 0 auto; margin: 0; width: min(520px, 100%); height: 100%; max-width: none; max-height: none;
  padding: 22px var(--gutter) 40px; border: 0; background: var(--surface-850); color: var(--text);
  flex-direction: column; gap: 40px; overflow-y: auto;
}
.menu[open] { display: flex; animation: menu-in .5s cubic-bezier(.2,.7,.2,1); }
@keyframes menu-in { from { transform: translateX(48px); opacity: 0; } }
.menu::backdrop { background: rgba(10, 18, 27, .5); }
.menu-top { display: flex; justify-content: space-between; align-items: center; min-height: 48px; }
.menu-close { width: 48px; height: 48px; border: 1px solid var(--line); background: transparent; color: var(--text-strong); font-size: 26px; line-height: 1; cursor: pointer; }
.menu-list { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.menu-list a {
  display: flex; align-items: baseline; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: clamp(26px, 2.6vw, 36px); font-weight: 500; letter-spacing: -.02em; color: var(--text-strong); transition: color .3s, padding .3s;
}
.menu-list a:hover { color: var(--accent-hl); padding-left: 6px; }
.menu-list span { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.menu .btn { align-self: flex-start; }

/* Contact dialog (js: [data-contact] opens it): the gold panel is the form. A card with the headline is raised over
   its top-left edge, the send button is a square on its bottom edge, starting where the card ends – the stagger of the
   page. Text on the gold uses --on-accent (8:1), field lines α .6 (3.4:1); the card and the square follow the theme.
   The dialog fills the viewport (transparent) so the panel can scroll on short screens; a click beside it closes. */
.contact {
  --ct-pad: clamp(40px, 4.6vw, 72px);              /* panel padding = gap between card and fields */
  --ct-rise: clamp(40px, 4.6vw, 72px);             /* how far the card stands above the panel */
  --ct-sq: clamp(184px, min(19vw, 27vh), 264px);   /* the send square */
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0;
  padding: calc(var(--ct-rise) + 32px) var(--gutter) 32px; border: 0; background: transparent; color: var(--text);
  overflow-y: auto; overscroll-behavior: contain;
}
.contact[open] { display: flex; }
.contact::backdrop { background: rgba(10, 18, 27, .62); }
.contact[open]::backdrop { animation: ct-fade .4s ease; }
.contact[open] .ct-panel { animation: ct-in .6s cubic-bezier(.2,.7,.2,1); }
@keyframes ct-fade { from { opacity: 0; } }
@keyframes ct-in { from { opacity: 0; transform: translateY(32px); } }
.ct-panel {
  position: relative; width: min(1200px, 100%); margin: auto;
  display: grid; grid-template-columns: minmax(0, 44fr) minmax(0, 56fr); column-gap: var(--ct-pad);
  padding: 0 var(--ct-pad); background: var(--accent); color: var(--on-accent);
}
.ct-panel :focus-visible { outline-color: var(--on-accent); }
.ct-panel a { color: var(--on-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ct-close {
  position: absolute; top: 14px; right: 14px; width: 48px; height: 48px; padding: 0; border: 0; cursor: pointer;
  background: transparent; color: var(--on-accent); transition: background-color .3s;
}
.ct-close::before, .ct-close::after { content: ""; position: absolute; left: 11px; right: 11px; top: 50%; height: 1.5px; margin-top: -.75px; background: currentColor; transform: rotate(45deg); }
.ct-close::after { transform: rotate(-45deg); }
.ct-close:hover { background: rgba(var(--on-accent-rgb), .1); }

.ct-card {
  grid-column: 1; grid-row: 1; margin-top: calc(-1 * var(--ct-rise));
  display: flex; flex-direction: column; gap: 22px; padding: clamp(36px, 3.6vw, 56px);
  background: var(--surface-900); color: var(--text);
}
.ct-title { font-size: clamp(38px, 3.9vw, 56px); line-height: 1; letter-spacing: -.035em; font-weight: 500; color: var(--text-strong); }
.ct-text { margin-top: auto; padding-top: 24px; max-width: 34ch; font-size: 17px; line-height: 1.55; color: var(--muted); }

.ct-fields {
  grid-column: 2; grid-row: 1; align-self: end; padding-top: calc(var(--ct-pad) + 24px);
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 26px 24px;
}
.ct-topic { grid-column: 1 / -1; margin: 0 0 4px; padding: 0; border: 0; min-width: 0; }
.ct-topic legend, .ct-field label { padding: 0; font-size: 14px; font-weight: 500; color: var(--on-accent); }
.ct-topic legend { margin-bottom: 12px; }
.ct-seg { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid rgba(var(--on-accent-rgb), .6); }
.ct-seg label { position: relative; display: flex; }
.ct-seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ct-seg span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; font-size: 15px; font-weight: 500; color: var(--on-accent); transition: background-color .2s, color .2s; }
.ct-seg label:hover span { background: rgba(var(--on-accent-rgb), .1); }
.ct-seg input:checked + span { background: var(--on-accent); color: var(--accent); }
.ct-seg input:focus-visible + span { outline: 2px solid var(--on-accent); outline-offset: 3px; }
.ct-field { grid-column: 1 / -1; display: flex; flex-direction: column; min-width: 0; }
.ct-w4 { grid-column: span 4; }
.ct-w3 { grid-column: span 3; }
.ct-w2 { grid-column: span 2; }
.ct-field .opt { font-weight: 400; }
.ct-field input, .ct-field textarea {
  width: 100%; min-height: 48px; margin: 0; padding: 8px 0 9px; border: 0; border-bottom: 1px solid rgba(var(--on-accent-rgb), .6);
  border-radius: 0; background: transparent; color: var(--on-accent); font: inherit; font-size: 20px; letter-spacing: -.01em;
  transition: border-color .2s, box-shadow .2s;
}
.ct-field textarea { min-height: 96px; resize: vertical; line-height: 1.4; }
.ct-field input:focus, .ct-field textarea:focus { outline: none; border-bottom-color: var(--on-accent); box-shadow: 0 1px 0 var(--on-accent); }
.ct-field [aria-invalid="true"] { border-bottom-color: var(--on-accent); box-shadow: 0 1px 0 var(--on-accent); }
.ct-field input:-webkit-autofill { -webkit-text-fill-color: var(--on-accent); box-shadow: 0 0 0 100px var(--accent) inset; caret-color: var(--on-accent); }
.ct-err { display: flex; gap: 8px; align-items: baseline; margin-top: 8px; font-size: 14px; font-weight: 500; line-height: 1.4; }
.ct-err::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--on-accent); color: var(--accent); font-size: 11px; font-weight: 600; transform: translateY(2px); }
.ct-err[hidden] { display: none; }

.ct-done { grid-column: 2; grid-row: 1; align-self: end; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-top: calc(var(--ct-pad) + 24px); }
.ct-done[hidden] { display: none; }
.ct-done-title { font-size: clamp(28px, 2.6vw, 42px); line-height: 1.08; letter-spacing: -.028em; font-weight: 500; outline: none; }
.ct-done p { max-width: 46ch; font-size: 17px; line-height: 1.55; }
.ct-back {
  min-height: 44px; margin-top: 8px; padding: 0 2px; border: 0; border-bottom: 1px solid rgba(var(--on-accent-rgb), .6); background: transparent;
  color: var(--on-accent); font-size: 15px; font-weight: 500; cursor: pointer; transition: border-color .3s;
}
.ct-back:hover { border-bottom-color: var(--on-accent); }
/* sent: the confirmation takes the fields' place (same grid cell, so the panel keeps its size) */
.ct-panel.is-done .ct-fields, .ct-panel.is-done .ct-send-row { visibility: hidden; }

.ct-send-row { grid-column: 2; grid-row: 2; display: flex; align-items: flex-end; gap: 32px; margin-left: calc(-1 * var(--ct-pad)); }
.ct-send {
  flex: none; width: var(--ct-sq); height: var(--ct-sq); display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  padding: clamp(24px, 2.4vw, 36px); border: 0; cursor: pointer; text-align: left;
  background: var(--surface-900); color: var(--accent-hl); font-size: clamp(26px, 2.3vw, 38px); font-weight: 500; line-height: 1.05; letter-spacing: -.028em;
  transition: color .3s;
}
.ct-send span { max-width: 6em; }
.ct-send svg { width: clamp(30px, 2.6vw, 40px); height: auto; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.ct-send:hover { color: var(--text-strong); }
.ct-send:hover svg { transform: translate(4px, -4px); }
.ct-note { padding-bottom: clamp(32px, 3.2vw, 48px); max-width: 300px; font-size: 13px; line-height: 1.55; }
.ct-direct { grid-column: 1; grid-row: 2; align-self: end; display: flex; flex-direction: column; gap: 8px; padding: 40px 24px clamp(32px, 3.2vw, 48px) 0; font-size: 15px; }
/* short laptop screens (768 px): a little tighter, so the panel fits without scrolling */
@media (min-width: 1001px) and (max-height: 860px) {
  .contact { --ct-rise: 44px; --ct-sq: 184px; }
  .ct-fields, .ct-done { padding-top: calc(var(--ct-pad) + 8px); }
  .ct-fields { row-gap: 18px; }
  .ct-field textarea { min-height: 72px; }
}
.ct-direct a { width: fit-content; font-size: clamp(19px, 1.45vw, 24px); font-weight: 500; letter-spacing: -.015em; text-underline-offset: 6px; overflow-wrap: anywhere; }

/* --- Scroll reveals (js: initReveals) --------------------------------------
   Hidden only under html.js, so without JavaScript everything is visible. Each element is revealed once, when it
   enters the viewport. --d (0, 1, 2 …) staggers siblings. Reduced motion: shown at once (see the end of the file). */
.js [data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity .9s ease, transform 1.1s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--d, 0) * 90ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
/* images: a wipe from left to right */
.js [data-reveal="wipe"] { opacity: 1; transform: none; clip-path: inset(0 100% 0 0); transition: clip-path 1.3s cubic-bezier(.7,0,.2,1); transition-delay: calc(var(--d, 0) * 90ms); }
.js [data-reveal="wipe"].is-in { clip-path: inset(0 0 0 0); }
/* headlines: every word rises out of its own mask (js wraps them: .w > .wi, --i = word index) */
.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .1em 0 .16em; margin: -.1em 0 -.16em; }
.js [data-split] .wi { display: inline-block; transform: translateY(125%); transition: transform 1s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 32ms); }
.js [data-split].is-in .wi { transform: none; }
/* statements: the words darken one by one with the scroll position (js: renderWords) */
.js [data-words] .wd { opacity: .2; transition: opacity .35s ease; }
.js [data-words] .wd.on { opacity: 1; }
/* images that drift a little slower than the page (js: renderParallax sets the transform) */
.img-wrap { position: relative; overflow: hidden; background: var(--surface-800); }
.img-wrap img { width: 100%; height: 100%; object-fit: cover; }
[data-parallax] { transform: scale(1.14); will-change: transform; }

/* ==========================================================================
   1. HERO + MODUL (pinned scroll scene) – always dark (.tone-dark on the section)
   The scene is one stage taller than the pinned distance: in that last stage the next section (.curtain, pulled up by
   one stage height) slides over the still pinned stage.
   ========================================================================== */
.scene { position: relative; height: calc(2 * var(--stage-h) + 1400px); background: var(--surface-950); }
.scene .anchor { position: absolute; left: 0; width: 1px; height: 1px; }
.stage { position: sticky; top: 0; height: var(--stage-h); overflow: hidden; background: var(--surface-950); }
.curtain { position: relative; z-index: 2; margin-top: calc(-1 * var(--stage-h)); background: var(--surface-850); }

/* The hero photo lives on a "plane" whose size/position JS computes (object-fit: cover by hand),
   so the SVG modules and the module polygon (photo pixel coordinates) line up exactly and the plane can zoom.
   The plane always has the photo's aspect ratio, so object-fit: fill = the SVG's preserveAspectRatio="none". */
.plane { position: absolute; transform-origin: 0 0; transition: transform .2s ease-out; }
.hero-media {
  --tilt: 0;  /* 0..1, set by js in the tilt phase: photo and modules dim and blur behind the lifted panel */
  position: absolute; inset: 0; transition: filter .3s ease;
  filter: brightness(calc(1 - .5 * var(--tilt))) saturate(calc(1 - .25 * var(--tilt))) blur(calc(1.2px * var(--tilt)));
}
.hero-media img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: fill; }
html:not(.js) .plane { inset: 0; }                    /* without js nobody sizes the plane: a plain cover photo */
html:not(.js) .hero-media img { object-fit: cover; }
.plane svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* SVG modules on the roof (geometry and laying animation: js/main.js) */
.arr-shadow { fill: #000; opacity: 0; }
.arr-mod { opacity: 0; }
.arr-frame { fill: #1d232b; stroke: rgba(210,218,228,.45); stroke-width: .7; }
.arr-glass { fill: url(#arrGlassFill); }
.arr-sheen { fill: url(#arrSheenFill); }
.arr-cells { fill: none; stroke: rgba(150,170,200,.16); stroke-width: .5; }
.arr-split { fill: none; stroke: rgba(150,170,200,.28); stroke-width: .7; }
.arr-plan path { fill: none; stroke: var(--accent); stroke-width: 1.3; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; opacity: 0; }
.arr-glow path { fill: none; opacity: 0; }
.arr-glow { mix-blend-mode: screen; }
.arr-bloom { stroke: var(--accent); stroke-width: 3; }
.arr-line { stroke: var(--accent-hover); stroke-width: 1; }
.mod-hole { fill: #0a121b; opacity: 0; transition: opacity .3s ease; }
.mod-outline { fill: rgba(232,169,75,.16); stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity .3s ease; }

.ov { position: absolute; inset: 0; pointer-events: none; transition: opacity .3s ease; }
/* The photo is a bright evening sky with the sun low on the left, just under the headline. The overlays stay out of
   the sun's way: .ov-hero only deepens the upper left (ends above the sun), the vignette darkens the top for the nav
   and the bottom for the statement. (The headline's own shade, .hero-copy h1::before, was removed on request.) */
.ov-hero {
  background: linear-gradient(90deg, rgba(14,24,35,.4) 0%, rgba(14,24,35,.18) 30%, rgba(14,24,35,0) 50%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 44%, transparent 56%);
          mask-image: linear-gradient(180deg, #000 0%, #000 44%, transparent 56%);
}
.ov-dim { opacity: 0; background: linear-gradient(90deg, rgba(10,18,27,.5) 0%, rgba(10,18,27,.62) 45%, rgba(10,18,27,.9) 72%); }
.ov-vignette { background: linear-gradient(180deg, rgba(14,24,35,.82) 0%, rgba(14,24,35,.56) 9%, rgba(14,24,35,0) 24%, rgba(14,24,35,0) 66%, rgba(14,24,35,.88) 100%); }
.ov-curtain { z-index: 6; opacity: 0; background: #0a121b; transition: none; }  /* darkens as the page covers the stage */

.mod-tag {
  position: absolute; display: flex; align-items: center; gap: 8px; white-space: nowrap;
  font-size: 11px; font-weight: 500; letter-spacing: .2em; color: var(--photo-text); opacity: 0;
  transition: opacity .3s ease, left .2s ease-out, top .2s ease-out;
}
.mod-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* The module that lifts off: a flat copy of it (cells, glass, frame) that js maps onto the module on the roof (a
   homography as matrix3d), lifts and tilts into the pose of the layer drawing, where the drawing takes over */
.panel3d {
  --fw: 6px;   /* frame width, set by js (≈ 3 % of the panel width, as on the roof) */
  position: absolute; z-index: 3; opacity: 0;
  transition: transform .2s ease-out, opacity .25s ease-out, left .2s ease-out, top .2s ease-out;
}
.pl-shadow { position: absolute; inset: 4%; background: rgba(0,0,0,.7); filter: blur(24px); opacity: 0; }
.pl-layer { position: absolute; inset: 0; }
.pl-cells {
  border-radius: 2px; background-color: #0c1626;
  background-image:
    linear-gradient(0deg, transparent calc(50% - 2px), #0a111c calc(50% - 2px), #0a111c calc(50% + 2px), transparent calc(50% + 2px)),
    repeating-linear-gradient(90deg, transparent 0, transparent calc(16.666% - 1px), rgba(196,208,226,.38) calc(16.666% - 1px), rgba(196,208,226,.38) 16.666%),
    repeating-linear-gradient(0deg, transparent 0, transparent calc(5.555% - 1px), rgba(196,208,226,.3) calc(5.555% - 1px), rgba(196,208,226,.3) 5.555%),
    linear-gradient(155deg, #23395c 0%, #101c30 55%, #0a1322 100%);
}
.pl-glass { border-radius: 2px; border: 1px solid rgba(255,255,255,.35); background: linear-gradient(125deg, rgba(255,255,255,.26) 0%, rgba(255,255,255,0) 32%, rgba(255,255,255,.1) 58%, rgba(255,255,255,0) 100%); }
/* dark anodised frame with a thin light edge – like the modules on the roof and the frame in the drawing */
.pl-frame { border-radius: 2px; border: var(--fw) solid #262b31; box-shadow: 0 0 0 1px rgba(210,218,228,.42), inset 0 0 0 1px rgba(0,0,0,.4); }

/* The six layers: the exploded drawing (#plSvg, the client's vector; fixed colours, like a photo) with the numbered
   list under it as a two-column legend (1–3 | 4–6), in the left half of the stage; ≤ 1000 px the drawing sits above
   the stats card with the names beside it. The drawing takes the height the list leaves (its box can be wider than the
   drawing – preserveAspectRatio meet); js reads the box to aim the panel at the drawing, stacks the layers in the
   frame, moves them apart with the scroll and reveals the list. */
.pl-fig {
  position: absolute; z-index: 3; left: var(--gutter); right: calc(48% + 40px); top: 96px; bottom: 36px;
  display: flex; flex-direction: column; justify-content: center; gap: clamp(18px, 3vh, 34px); pointer-events: none;
}
.pl-svg {
  flex: 1 1 0; min-height: 0; max-height: 670px; width: 100%; display: block; overflow: visible; opacity: 0;
  transition: opacity .25s ease-out;
}
.pl-l, .pl-badge { transition: transform .2s ease-out, opacity .2s ease-out; }
/* badges: the site's accent instead of the drawing's navy, so they match the list; js scales them up (around their
   centre) when the drawing is small, so they never get smaller than 22 px */
.pl-badge { transform-box: fill-box; transform-origin: center; opacity: 0; }
.pl-badge circle { fill: var(--accent); stroke: #0a121b; stroke-width: 2.5; }
.pl-badge text { font-family: var(--font); font-size: 25px; font-weight: 600; fill: var(--on-accent); }
.pl-legend { flex: none; display: flex; flex-direction: column; gap: 16px; }
.pl-legend .label { opacity: 0; transition: opacity .3s ease-out; }
.pl-list {
  list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, auto);
  grid-auto-flow: column; gap: clamp(12px, 2vh, 20px) clamp(20px, 2.4vw, 40px);
}
.pl-list li { display: flex; gap: 12px; opacity: 0; transform: translateY(10px); transition: opacity .3s ease-out, transform .3s ease-out; }
.pl-list .n {
  flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.pl-list .t { min-width: 0; display: flex; flex-direction: column; gap: 1px; padding-top: 1px; }
.pl-list b { font-size: 15px; font-weight: 500; line-height: 1.3; color: var(--text-strong); }
.pl-list .mat { font-size: 13px; line-height: 1.4; color: var(--muted-3); }
.pl-list .fn { margin-top: 4px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }

/* Hero copy: big headline upper left (above the sun), a short statement bottom right (over the darkened bottom band) */
.hero-copy {
  position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; justify-content: center; padding-bottom: 28vh;
  transition: opacity .25s ease, transform .25s ease;
}
.hero-copy .inner { max-width: 1100px; width: fit-content; }   /* = the longest line; 1100 px: „Mit sauberer Energie“ at 124 px stays on one line */
.hero-bottom { position: absolute; left: 0; right: 0; bottom: 40px; z-index: 4; transition: opacity .25s ease; }
.hero-bottom .wrap { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.hero-sub { position: relative; max-width: 400px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
/* a soft shade behind the statement only (it sits low on the house): keeps the gold words ≥ 4.5:1 */
.hero-sub::before {
  content: ""; position: absolute; inset: -70px -100px -50px -100px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(10,18,27,.66), rgba(10,18,27,.44) 55%, rgba(10,18,27,0));
}
.hero-sub .sub { font-size: clamp(18px, 1.45vw, 24px); line-height: 1.32; font-weight: 500; letter-spacing: -.012em; color: var(--text-strong); }
.scroll-hint { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text); }

/* … and once the last module has landed, js adds .is-revealed to #stage: the headline's words rise out of their
   masks, then the bottom row. Gated on .js (set in <head>) so the copy stays visible without JavaScript. Animates
   the children, because js sets opacity/transform on .hero-copy and .hero-bottom themselves while scrolling. */
.js .stage .hero-copy .wi { transform: translateY(125%); transition-delay: calc(.1s + var(--i, 0) * 70ms); transition-duration: 1.2s; }
.js .stage.is-revealed .hero-copy .wi { transform: none; }
.js .hero-bottom .wrap { opacity: 0; transform: translateY(24px); transition: opacity 1s ease .6s, transform 1.2s cubic-bezier(.2,.7,.2,1) .6s; }
.js .stage.is-revealed .hero-bottom .wrap { opacity: 1; transform: none; }

.mod-stats {
  position: absolute; left: 52%; right: var(--gutter); top: 100px; bottom: 36px; z-index: 4;
  display: flex; flex-direction: column; justify-content: center; gap: 16px; opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.mod-stats .h2 { font-size: clamp(32px, 3vw, 50px); }
.mod-stats .lead { font-size: 16px; max-width: 520px; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kpi { padding: 16px 10px 14px 16px; display: flex; flex-direction: column; gap: 6px; border-left: 1px solid var(--line); }
.kpi:first-child { padding-left: 0; border-left: 0; }
.kpi .v { font-size: clamp(30px, 2.6vw, 42px); font-weight: 500; letter-spacing: -.03em; line-height: 1; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: .45em; font-weight: 500; letter-spacing: 0; color: var(--accent-text); }
.kpi .l { font-size: 13px; color: var(--muted-2); }
.spec { display: flex; flex-direction: column; font-size: 15px; }
.spec > div {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); gap: 16px; padding: 9px 0;
  border-bottom: 1px solid rgba(var(--ink-rgb), .1); opacity: 0; transform: translateY(14px); transition: opacity .3s ease, transform .3s ease;
}
.spec dt { color: var(--muted-3); }
.spec dd { color: var(--text-strong); }
.sys-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 14px 18px;
  border: 1px solid rgba(232,169,75,.45); background: rgba(232,169,75,.06); opacity: 0; transition: opacity .3s ease;
}
.sys-strip .caps { font-size: 10px; letter-spacing: .22em; color: var(--accent-text); }
.sys-strip span:last-child { font-size: 15px; color: var(--text-strong); }

/* ==========================================================================
   2. ÜBER UNS – label column, title, a tall image under it, text column on the right
   ========================================================================== */
.intro { padding: var(--pad) 0; }
.intro-label { grid-column: 1 / 3; grid-row: 1; padding-top: .7em; }
.intro-title { grid-column: 3 / 9; grid-row: 1; align-self: start; }
.intro-img { grid-column: 3 / 6; grid-row: 2; margin-top: clamp(72px, 9vw, 160px); aspect-ratio: 1 / 1.42; }
.intro-text { grid-column: 9 / 13; grid-row: 1 / 3; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding-top: 10px; }
.intro-img-sm { width: 100%; aspect-ratio: 16 / 10; margin-bottom: 22px; }

/* ==========================================================================
   3. UNSER ANSATZ – pinned stage: copy left (the steps swap), the aerial with the blueprint right
   ========================================================================== */
.ansatz { position: relative; }
.ansatz-stage { position: relative; min-height: var(--stage-h); display: flex; align-items: center; padding: var(--pad) 0; }
.js .ansatz { height: calc(var(--stage-h) + 2400px); }
.js .ansatz-stage { position: sticky; top: 0; height: var(--stage-h); padding: 96px 0 56px; overflow: hidden; }
.ansatz-copy { position: relative; z-index: 2; }
.ansatz-copy > * { width: min(560px, 44vw - var(--copy-x) - 40px); }
.ansatz-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 36px; }
.step-count { font-size: 15px; font-weight: 500; color: var(--muted-3); font-variant-numeric: tabular-nums; }
.step-count span { color: var(--text-strong); }
.steps { display: flex; flex-direction: column; gap: 48px; }
.step { display: flex; flex-direction: column; gap: 18px; }
.step .h2 { font-size: clamp(34px, 3.5vw, 62px); }
.step-n { display: block; margin-bottom: 14px; font-size: 15px; letter-spacing: 0; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.step-res { font-size: clamp(18px, 1.4vw, 23px); font-weight: 500; letter-spacing: -.01em; color: var(--text-strong); }
.step .lead { font-size: 17px; }
/* with js: the steps are stacked in one grid cell and swap (opacity/rise) as the scroll progress passes them */
.js .steps { display: grid; }
.js .step { grid-area: 1 / 1; opacity: 0; transform: translateY(30px); visibility: hidden;
  transition: opacity .45s ease, transform .7s cubic-bezier(.2,.7,.2,1), visibility 0s .7s; }
.js .step.is-past { transform: translateY(-30px); }
.js .step.is-active { opacity: 1; transform: none; visibility: visible; transition: opacity .6s ease .12s, transform .8s cubic-bezier(.2,.7,.2,1) .12s, visibility 0s; }
.step-bar { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 44px; }
.step-bar li { display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--muted-3); transition: color .3s; }
.step-bar i { display: block; height: 2px; background: rgba(var(--ink-rgb), .14); background-image: linear-gradient(var(--accent), var(--accent)); background-repeat: no-repeat; background-size: 0 100%; }
.step-bar li.is-on { color: var(--text-strong); }
.ansatz-copy .footnote { margin-top: 18px; }

/* The aerial: img and svg share the box, object-fit: cover = xMidYMid slice, so the overlay stays mapped.
   The box is at least 1.05 : 1 (wider = more of the photo's width), so the roof (x 428–1574 of 2048) and its labels
   always fit; it bleeds to the right edge of the viewport and is at most the stage's height minus the paddings. */
.ansatz .media { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 54%; aspect-ratio: 1.05; max-height: calc(100% - 152px); margin-top: 20px; }
.ansatz .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.ansatz .media svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bp-label { font-family: var(--font); font-weight: 500; font-size: 19px; letter-spacing: 3px; fill: var(--photo-text); stroke: var(--photo-halo); stroke-width: 5px; paint-order: stroke; }
.bp-draw { fill: none; stroke: var(--accent); stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset .3s ease-out; }
.bp-fade { opacity: 0; transition: opacity .3s ease; }
.bp-dot-halo { fill: var(--accent); fill-opacity: .22; }
.bp-dot { fill: var(--accent); }
.bp-dim line { stroke: var(--photo-text); stroke-width: 1.5; }
/* Step 4: the gold plan, then SVG modules on the empty roof – same look as the hero modules (.arr-*), own gradients.
   transform-box: fill-box → scale() works around each module's own centre. */
.bp-plan { fill: rgba(232, 169, 75, .24); stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.ansatz .arr-glass { fill: url(#bpGlassFill); }
.ansatz .arr-sheen { fill: url(#bpSheenFill); }
.ansatz .arr-mod, .ansatz .arr-shadow { transform-box: fill-box; transform-origin: center; transition: opacity .3s ease, transform .3s ease-out; }

/* ==========================================================================
   4. LEISTUNGEN – staggered: first service beside the title, the next two lower down at different columns
   ========================================================================== */
.leistungen { padding: var(--pad) 0; }
.lst-label { grid-column: 1 / 3; grid-row: 1; padding-top: .7em; }
.lst-head { grid-column: 3 / 8; grid-row: 1; align-self: start; display: flex; flex-direction: column; gap: 28px; }
.lst-head .lead { max-width: 440px; }
.svc { display: flex; flex-direction: column; }
.svc .img-wrap { aspect-ratio: 4 / 3; }
.svc-1 { grid-column: 9 / 13; grid-row: 1; }
.svc-2 { grid-column: 2 / 6; grid-row: 2; margin-top: clamp(80px, 9vw, 160px); }
.svc-2 .img-wrap { aspect-ratio: 4 / 4.6; }
.svc-3 { grid-column: 7 / 11; grid-row: 2; margin-top: clamp(220px, 26vw, 440px); }
.svc-txt { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; max-width: 420px; }
.svc-txt p { font-size: 16.5px; line-height: 1.6; color: var(--muted); }
.also { grid-column: 1 / -1; grid-row: 3; margin-top: clamp(96px, 11vw, 180px); padding-top: 28px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px 48px; }
.also ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 40px; font-size: clamp(18px, 1.4vw, 22px); font-weight: 500; letter-spacing: -.01em; color: var(--text-strong); }

/* ==========================================================================
   5. UNSER VERSPRECHEN – centred title and statement; the house in the middle, the four steps around it
   ========================================================================== */
.versprechen { padding: var(--pad) 0; overflow: hidden; }
.vs-head { max-width: 1000px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.vs-statement { max-width: 1040px; margin: clamp(72px, 8vw, 128px) auto 0; padding: clamp(40px, 5vw, 72px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.vs-main { position: relative; margin-top: clamp(80px, 9vw, 150px); }
.vs-img {
  position: absolute; left: 50%; top: 50%; width: min(46%, 720px); aspect-ratio: 1.15; transform: translate(-50%, -50%);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 58%, transparent 100%);
          mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 58%, transparent 100%);
}
/* light (default): the navy wireframe render becomes a drawing on paper (inverted, hue turned back, warmed); it
   "lights up" by gaining contrast. Dark: the render itself, brightening. js sets --lit 0..1 while the steps fill. */
#promiseImg {
  --lit: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: 56% 50%; transform: scale(1.18); transition: filter .3s ease;
  filter: invert(1) hue-rotate(180deg) sepia(.35) saturate(1.2) contrast(calc(.55 + .45 * var(--lit)));
}
:root[data-theme="dark"] #promiseImg { filter: brightness(calc(.55 + .45 * var(--lit))) saturate(calc(.5 + .5 * var(--lit))); }
.glow { position: absolute; inset: 0; background: radial-gradient(circle at 56% 52%, rgba(232,169,75,.3) 0%, rgba(232,169,75,0) 42%); opacity: 0; transition: opacity .4s ease; }
.vs-steps { position: relative; list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: calc(min(46%, 720px) + 48px); row-gap: clamp(96px, 11vw, 190px); }
.tl-step { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 340px; }
.tl-step:nth-child(odd) { justify-self: end; text-align: right; align-items: flex-end; }
.tl-bar { align-self: stretch; height: 2px; margin-bottom: 18px; background: rgba(var(--ink-rgb), .14); }
.tl-bar i { display: block; width: 0; height: 100%; background: var(--accent); }
.tl-step .t { font-size: clamp(21px, 1.6vw, 27px); font-weight: 500; letter-spacing: -.012em; line-height: 1.2; color: var(--text-strong); margin-top: 4px; }
.tl-step .d { font-size: 16px; line-height: 1.5; color: var(--text-strong); }
.tl-step .g { font-size: 15px; line-height: 1.5; color: var(--muted-3); }
.js .tl-step .t { color: var(--muted-3); transition: color .3s; }
.js .tl-step.is-on .t { color: var(--text-strong); }
.js .tl-step .d, .js .tl-step .g { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
.tl-done { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: clamp(56px, 6vw, 96px); font-size: 16px; font-weight: 500; color: var(--text-strong); }
.js .tl-done { opacity: 0; transition: opacity .4s ease; }

/* ==========================================================================
   6. IHR DACH IN ZAHLEN – a band with a grid of tiles, the gold title tile first. Follows the theme: light = the
   warm band with white tiles (the 2 px gaps show the band), dark = the navy band with lighter tiles.
   ========================================================================== */
.zahlen {
  --z-band: var(--surface-800); --z-tile: var(--surface-900);
  --z-ctl: rgba(var(--ink-rgb), .5);   /* outlines of the controls: ≥ 3:1 on the white tile */
  position: relative; padding: var(--pad) 0; background: var(--z-band);
}
:root[data-theme="dark"] .zahlen { --z-band: var(--surface-950); --z-tile: var(--surface-800); --z-ctl: rgba(var(--ink-rgb), .35); }
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
.b-title {
  grid-column: 1 / 3; grid-row: 1 / 3; min-height: 440px; padding: clamp(28px, 3vw, 52px);
  display: flex; flex-direction: column; gap: 24px; background: var(--accent); color: var(--on-accent);
}
.b-title .label, .b-title .h2, .b-title p { color: var(--on-accent); }
.b-title .h2 { font-size: clamp(32px, 3.1vw, 56px); margin-top: auto; }
.b-title p:last-child { font-size: 16.5px; line-height: 1.6; max-width: 520px; }
.b-tile { min-width: 0; padding: clamp(22px, 2.2vw, 36px); background: var(--z-tile); display: flex; flex-direction: column; gap: 14px; }
.b-controls { grid-column: 3 / 5; justify-content: center; }
.b-bar, .b-months { grid-column: span 2; }
.kpi-tile { justify-content: flex-end; min-height: 200px; }
.kpi-tile .v { font-size: clamp(40px, 3.6vw, 64px); font-weight: 500; letter-spacing: -.035em; line-height: 1; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.kpi-tile .v small { font-size: .42em; letter-spacing: 0; color: var(--accent-text); }
.kpi-tile .l { font-size: 14px; color: var(--muted-2); }
.hh-group { display: flex; flex-wrap: wrap; gap: 8px; }
.hh-btn {
  min-height: 44px; padding: 0 18px; border-radius: 0; cursor: pointer;
  font-size: 15px; font-weight: 500; color: var(--text); background: transparent; border: 1px solid var(--z-ctl);
  transition: background .2s, color .2s, border-color .2s;
}
/* accent-text = gold in dark; in light a darker gold edge, so the selected fill stands out from the white tile */
.hh-btn:hover { border-color: var(--accent-text); }
.hh-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent-text); }
.switch { align-self: flex-start; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0; background: none; border: 0; color: var(--text); font-size: 15px; cursor: pointer; }
.switch .track { position: relative; width: 44px; height: 24px; border-radius: 12px; background: rgba(var(--ink-rgb), .1); border: 1px solid var(--z-ctl); transition: background .2s; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-strong); transition: left .2s; }
.switch[aria-pressed="true"] .track { background: var(--accent); }
.switch[aria-pressed="true"] .knob { left: 24px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; }
.chart-head span { font-size: 13px; color: var(--muted-3); }
.bar { display: flex; gap: 2px; height: 16px; margin-top: 8px; background: rgba(var(--ink-rgb), .06); border-radius: 4px; overflow: hidden; }
.bar > div { width: 0; transition: width .6s ease; }
.bar .a { background: var(--chart-solar); border-radius: 4px 0 0 4px; }
.bar .b { background: var(--chart-grid); border-radius: 0 4px 4px 0; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 14px; color: var(--label); }
.legend span { display: flex; align-items: center; gap: 8px; }
.legend i { display: block; width: 10px; height: 10px; border-radius: 2px; }
.legend b { color: var(--text-strong); font-weight: 500; }
.months { height: 170px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; border-bottom: 1px solid rgba(var(--ink-rgb), .25); padding-top: 22px; }
.mb { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.mb .col { width: 100%; max-width: 30px; height: 0; background: var(--chart-solar); border-radius: 4px 4px 0 0; transition: height .5s ease, filter .2s; }
.mb .mv { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--text-strong); white-space: nowrap; opacity: 0; transition: opacity .3s, bottom .5s ease; }
.mb:hover .mv { opacity: 1 !important; }
.mb:hover .col { filter: brightness(1.15); }
.month-labels { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; font-size: 11px; color: var(--muted-3); text-align: center; }
.zahlen .note { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; margin-top: 40px; }
.zahlen .note p { max-width: 820px; }

/* ==========================================================================
   7. ABLAUF – copy left (sticky while the tiles pass), three square tiles as a staircase (touching at the corners).
   .tone-invert on the section: it looks as it would in the other theme (dark island in the light page and vice versa).
   ========================================================================== */
.ablauf { padding: var(--pad) 0; background: var(--surface-850); }   /* = the other theme's page (.tone-invert) */
.ab-copy { grid-column: 1 / 6; align-self: start; position: sticky; top: 140px; display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }
.ab-copy .lead { max-width: 420px; }
.ab-tiles { grid-column: 7 / 13; list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.ab-tile {
  align-self: start; aspect-ratio: 1; padding: clamp(24px, 2.4vw, 40px); background: var(--surface-800);
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
}
.ab-tile:nth-child(1) { grid-column: 1; grid-row: 1; }
.ab-tile:nth-child(2) { grid-column: 2; grid-row: 2; }
.ab-tile:nth-child(3) { grid-column: 1; grid-row: 3; }
.ab-tile svg { margin-bottom: auto; }
.ab-tile svg * { stroke: var(--accent-text); }
.ab-tile p { font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 320px; }

/* ==========================================================================
   8. FAQ – native <details>; the plus turns into a minus
   ========================================================================== */
.faq { padding: var(--pad) 0; }
.faq-head { grid-column: 1 / 6; align-self: start; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.faq-head .body { max-width: 360px; }
.faq-list { grid-column: 7 / 13; border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 44px; padding: 24px 0;
  cursor: pointer; font-size: clamp(17px, 1.25vw, 20px); font-weight: 500; letter-spacing: -.01em; color: var(--text-strong);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { color: var(--hi); }
.plus { position: relative; flex: none; width: 14px; height: 14px; }
.plus::before, .plus::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -.75px; background: var(--accent-text); }
.plus::after { transform: rotate(90deg); transition: transform .3s ease; }
.qa[open] .plus::after { transform: rotate(0deg); }
.qa-a { padding: 0 56px 28px 0; }
.qa-a p { font-size: 16.5px; line-height: 1.65; color: var(--muted); max-width: 620px; }
.qa[open] .qa-a { animation: qa-in .45s ease; }
@keyframes qa-in { from { opacity: 0; transform: translateY(-6px); } }

/* ==========================================================================
   9. CTA – big type, then a text band that runs on its own (a CSS loop, gated on html.js). It keeps running under the
   mouse (a gold tile follows the pointer and says what a click does), pauses on keyboard focus and with its button
   (aria-pressed); reduced motion: still, no button.
   ========================================================================== */
.cta { padding: var(--pad) 0 0; overflow: hidden; }
.cta > .wrap > .label { margin-bottom: 28px; }
.cta .h-xl { max-width: 14ch; }
.cta-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px 48px; margin-top: clamp(48px, 5vw, 80px); }
.cta-row .lead { max-width: 520px; }
.actions { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.marquee-band { position: relative; margin-top: clamp(96px, 11vw, 180px); }
.marquee { display: block; padding: 26px 0 34px; border-top: 1px solid var(--line); overflow: hidden; white-space: nowrap; color: var(--text-strong); transition: color .3s; }
.marquee:hover { color: var(--accent-hl); }
.marquee:focus-visible { outline-offset: -4px; }
.marquee-track { display: inline-flex; will-change: transform; font-size: clamp(56px, 9vw, 164px); font-weight: 500; letter-spacing: -.045em; line-height: 1.05; }
.marquee-track > span { padding-right: .55em; }
.marquee-track b { font-weight: 500; color: var(--accent-hl); }
/* four identical spans, each wider than the viewport: moving the track by one span (25 %) loops seamlessly */
.js .marquee-track { animation: marquee 28s linear infinite; }
.marquee:focus-visible .marquee-track, .marquee-band.is-paused .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translate3d(-25%, 0, 0); } }
/* pointer tile (js "CTA text band"): beside the mouse pointer, vertically centred on it, flipped left near the right
   edge and never below the band (.cta clips there); only for a fine pointer that hovers, so touch never sees it.
   js sets `translate` (position, eased) and `transform-origin` (the side next to the pointer); CSS scales it in. */
.marquee-tip { display: none; }
.js .marquee-tip {
  --tip: clamp(120px, 9.5vw, 168px);
  position: absolute; top: 0; left: 0; width: var(--tip); height: var(--tip); padding: 18px 18px 16px;
  display: flex; flex-direction: column; justify-content: space-between; pointer-events: none;
  background: var(--accent); color: var(--on-accent); font-size: clamp(16px, 1.25vw, 20px); font-weight: 600; line-height: 1.2; letter-spacing: -.01em;
  opacity: 0; scale: .5; transition: opacity .2s, scale .35s cubic-bezier(.2, .8, .2, 1);
}
.js .marquee-tip.is-on { opacity: 1; scale: 1; }
.marquee.has-tip { color: var(--text-strong); }   /* the tile is the hover feedback; gold text would swallow it */
.marquee-tip svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: square; }
/* the stop button sits on the band's hairline, at the right edge of the content */
.marquee-ctl { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: flex-end; pointer-events: none; }
html:not(.js) .marquee-ctl { display: none; }
.marquee-toggle {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0; margin-top: -20px; pointer-events: auto; cursor: pointer;
  background: var(--surface-850); border: 1px solid var(--line); color: var(--text-strong); transition: border-color .3s;
}
.marquee-toggle:hover { border-color: var(--accent); }
.marquee-toggle svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.marquee-toggle .i-play { display: none; fill: currentColor; stroke-width: 1; }
.marquee-toggle[aria-pressed="true"] .i-play { display: inline; }
.marquee-toggle[aria-pressed="true"] .i-pause { display: none; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { padding: 72px 0 36px; }
.ft-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 32px 48px; padding-bottom: 56px; border-bottom: 1px solid var(--line); }
.ft-claim { font-size: 15px; line-height: 1.5; color: var(--muted-3); margin-right: auto; }
.ft-nav, .ft-legal { display: flex; flex-wrap: wrap; gap: 6px 30px; font-size: 15px; }
.ft-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px 32px; padding-top: 24px; }
/* Theme switch: two real buttons with aria-pressed (js: theme switch) */
html:not(.js) .theme-switch { display: none; }   /* the switch needs js */
.theme-switch { display: flex; align-items: center; gap: 16px; }
.theme-seg { display: flex; gap: 3px; padding: 3px; border: 1px solid rgba(var(--ink-rgb), .3); }
.theme-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 0; cursor: pointer;
  background: transparent; color: var(--label); font-size: 14px; font-weight: 500;
  transition: background .2s, color .2s;
}
.theme-btn svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; }
.theme-btn:hover { color: var(--hi); }
.theme-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
/* Switching themes cross-fades the page once (View Transitions; skipped under reduced motion – js) */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; }
.navlink[aria-current="page"] { color: var(--text-strong); background-size: 100% 1px; }

/* ==========================================================================
   10. Legal pages (impressum.html, datenschutz.html) – static, no js but the theme switch (js/theme.js):
   a plain header, the label in its own column beside the title, then a sticky aside (contents / meta) and the
   text column (≈ 68 ch). Placeholders for the client's data are .ph („[Straße und Hausnummer]“).
   ========================================================================== */
.legal-header { padding: 22px 0; }
.legal-header .wrap { display: flex; align-items: center; gap: 34px; font-size: 15px; }
.legal-header .logo { margin-right: auto; }
.legal { padding: clamp(64px, 8vw, 140px) 0 var(--pad); }
.legal-label { grid-column: 1 / 3; padding-top: .9em; }
.legal-intro { grid-column: 3 / 11; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.legal-intro .lead { max-width: 620px; }
.legal-draft {
  max-width: 620px; padding: 16px 20px; border-left: 2px solid var(--accent); background: var(--surface-800);
  font-size: 15px; line-height: 1.6; color: var(--muted);
}
.legal-draft strong, .legal-sec strong { font-weight: 600; color: var(--text-strong); }
.legal-body { margin-top: clamp(64px, 7vw, 120px); }
.legal-aside { grid-column: 1 / 4; align-self: start; position: sticky; top: 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.legal-toc ol { list-style: none; margin: 4px 0 0; padding: 0; }
.legal-toc a { display: flex; gap: 12px; padding: 7px 0; font-size: 15px; line-height: 1.35; color: var(--label); transition: color .3s; }
.legal-toc a:hover { color: var(--hi); }
.legal-toc .num { min-width: 1.7em; }
.legal-meta { font-size: 14px; line-height: 1.5; color: var(--faint); }
.legal-text { grid-column: 5 / 11; }
.legal-sec { padding: 34px 0 40px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.legal-sec h2 { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.legal-sec p, .legal-sec li, .legal-sec address { font-size: 16.5px; line-height: 1.7; color: var(--muted); max-width: 68ch; }
.legal-sec address { font-style: normal; }
.legal-sec * + p, .legal-sec * + ul, .legal-sec * + address { margin-top: 14px; }
.legal-sec ul { padding-left: 1.15em; }
.legal-sec li + li { margin-top: 4px; }
.legal-sec li::marker { color: var(--accent-text); }
.legal-sec p a, .legal-sec li a, .legal-sec address a {
  color: var(--accent-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em;
}
.legal-sec p a:hover, .legal-sec li a:hover, .legal-sec address a:hover { text-decoration-color: var(--accent); }
.legal-box { padding: 22px 24px; border: 1px solid rgba(var(--ink-rgb), .3); }   /* Art. 21: separate and prominent */
.ph { color: var(--text-strong); background: rgba(var(--ink-rgb), .07); padding: 0 .25em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .hide-md { display: none !important; }
  .intro-text { grid-column: 8 / 13; }
  .intro-title { grid-column: 3 / 8; }
  .ab-copy { grid-column: 1 / 6; }
  .ab-tiles { grid-column: 6 / 13; }
  .pl-list .fn { display: none; }   /* the left half is narrow: layer + material only */
}
@media (max-width: 1000px) {
  .hide-sm { display: none !important; }
  /* header: always the menu button, no inline nav */
  .navlinks { display: none; }
  .site-header .menu-btn { width: 48px; margin-right: 8px; opacity: 1; visibility: visible; }
  .mod-stats { left: 14px; right: 14px; top: auto; bottom: 14px; max-height: 58%; padding: 18px; gap: 12px; justify-content: flex-start; overflow: hidden; background: rgba(var(--panel-rgb),.94); border: 1px solid rgba(var(--ink-rgb), .14); }
  .mod-stats .h2 { font-size: 30px; }
  /* the drawing above the stats card, the names beside it */
  .pl-fig { left: 14px; right: 14px; top: 84px; bottom: calc(58% + 24px); flex-direction: row; align-items: center; justify-content: center; gap: 14px; }
  .pl-svg { flex: none; width: min(60%, calc((var(--stage-h) * .42 - 108px) * 780 / 815)); height: auto; max-height: none; aspect-ratio: 780 / 815; }
  .pl-legend { flex: 0 1 auto; min-width: 0; }
  .pl-legend .label, .pl-list .mat { display: none; }
  .pl-list { display: flex; flex-direction: column; gap: 9px; hyphens: auto; }   /* „Einbettungs-folie“ in the narrow column */
  .pl-list li { gap: 8px; align-items: center; }
  .pl-list .n { width: 18px; height: 18px; font-size: 10.5px; }
  .pl-list .t { padding-top: 0; }
  .pl-list b { font-size: 13px; line-height: 1.25; }

  /* one column; the stagger becomes a left/right offset */
  .grid { grid-template-columns: minmax(0, 1fr); }
  .grid > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
  .intro-label, .lst-label { padding-top: 0; margin-bottom: 20px; }
  .intro-text { margin-top: 56px; max-width: 560px; }
  .intro-img-sm { display: none; }
  .intro-img { width: 64%; margin: 64px 0 0 auto; }
  .svc { max-width: 520px; }
  .svc-1 { margin-top: 64px; }
  .svc-2 { margin: 80px 0 0 auto; width: 82%; }
  .svc-3 { margin-top: 80px; width: 82%; }
  .ab-copy { position: static; margin-bottom: 56px; }
  .faq-head { margin-bottom: 48px; }
  .legal-label { padding-top: 0; margin-bottom: 20px; }
  .legal-aside { position: static; margin-bottom: 48px; }

  /* Ansatz: copy on top, the aerial under it, full width (with js it fills the rest of the pinned stage, but stays at
     least 1.05 : 1 like on desktop, so the whole roof and the sun dots on its eaves fit; any rest centres the stage) */
  .ansatz-stage { flex-direction: column; align-items: stretch; }
  .js .ansatz-stage { padding: 88px 0 0; justify-content: center; }
  .ansatz-copy > * { width: auto; max-width: 620px; }
  .ansatz-head { margin-bottom: 20px; }
  .step .h2 { font-size: clamp(30px, 6vw, 44px); }
  .step { gap: 12px; }
  .step-n { margin-bottom: 8px; }
  .step-bar { margin-top: 22px; }
  .ansatz .media { position: relative; top: auto; transform: none; width: 100%; max-height: none; margin-top: 20px; }
  .js .ansatz .media { flex: 1 1 auto; min-height: 200px; max-height: calc(100vw / 1.05); aspect-ratio: auto; }

  /* Versprechen: the house on top, steps in two columns under it */
  .vs-img { position: relative; left: auto; top: auto; transform: none; width: min(100%, 620px); margin: 0 auto 48px; }
  .vs-steps { column-gap: 40px; row-gap: 56px; }
  .tl-step:nth-child(odd) { justify-self: start; text-align: left; align-items: flex-start; }

  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b-title, .b-controls, .b-bar, .b-months { grid-column: 1 / -1; grid-row: auto; }
  .b-title { min-height: 0; }

  /* contact: one column – card (narrower, so the close button keeps its corner), fields, send bar, direct link */
  .contact { --ct-pad: 40px; --ct-rise: 40px; }
  .ct-panel { width: min(680px, 100%); grid-template-columns: minmax(0, 1fr); }
  .ct-card { margin-right: 32px; }
  .ct-fields, .ct-done { grid-column: 1; grid-row: 2; padding-top: 40px; }
  .ct-send-row { grid-column: 1; grid-row: 3; flex-direction: column-reverse; align-items: stretch; gap: 20px; margin: 36px 0 0; }
  .ct-send { width: 100%; height: auto; min-height: 112px; flex-direction: row; align-items: flex-end; gap: 24px; }
  .ct-send span { max-width: none; }
  .ct-note { max-width: none; padding-bottom: 0; }
  .ct-direct { grid-column: 1; grid-row: 4; padding: 36px 0 40px; }
}
@media (max-width: 760px) {
  :root { --gutter: 22px; --gap: 16px; --pad: clamp(80px, 22vw, 104px); }
  .h1 { font-size: 46px; }
  .h2 { font-size: 36px; }
  .hero-copy { justify-content: flex-start; padding: 128px 0 0; }
  .hero-bottom { bottom: 28px; }
  .hero-bottom .wrap { flex-direction: column-reverse; align-items: flex-start; gap: 22px; }
  /* phones: the bottom row is full width over the white wall – the dark band starts higher instead of the shade */
  .hero-sub::before { display: none; }
  /* its top is deeper than on desktop: the wordmark stays in the header while the photo zooms to the bright sky */
  .ov-vignette { background: linear-gradient(180deg, rgba(14,24,35,.8) 0%, rgba(14,24,35,.62) 6%, rgba(14,24,35,0) 22%, rgba(14,24,35,0) 46%, rgba(14,24,35,.84) 68%, rgba(14,24,35,.92) 100%); }
  .scroll-hint { font-size: 13px; }
  .step .lead { font-size: 15px; line-height: 1.5; }
  .step-bar span { display: none; }
  .vs-steps { grid-template-columns: minmax(0, 1fr); }
  .kpi-tile { min-height: 150px; }
  .ab-tiles { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ab-tile:nth-child(n) { grid-column: 1; grid-row: auto; aspect-ratio: auto; min-height: 240px; }   /* one width, no stagger */
  .qa-a { padding-right: 0; }
  .ft-claim { margin-right: 0; flex-basis: 100%; }
  .contact { --ct-pad: 22px; padding: calc(var(--ct-rise) + 24px) 12px 12px; }
  .ct-close { top: 8px; right: 8px; }
  .ct-card { margin-right: 40px; padding: 30px 26px 32px; gap: 16px; }
  .ct-text { padding-top: 8px; font-size: 16px; }
  .ct-fields { gap: 22px 16px; }
  .ct-w4, .ct-w3, .ct-w2 { grid-column: 1 / -1; }
  .ct-send { min-height: 96px; font-size: 26px; }
}
@media (max-width: 420px) {
  .hide-xs { display: none; }
  .btn-head { padding: 0 14px; }
  /* the wordmark always stays, so the header row is tightened to fit 360 px (≥ 12 px before the menu button) */
  .site-header .logo { gap: 8px; }
  .site-header .logo-mark { width: 34px; height: auto; }
  .site-header .logo-word { font-size: 17px; }
  .site-header .menu-btn, .site-header.is-compact .menu-btn { width: 44px; margin-right: 6px; }
}
@media (max-width: 359px) {   /* 320 px phones: a little more */
  .site-header .wrap { padding: 0 16px; }
  .site-header .logo { gap: 6px; }
  .site-header .logo-mark { width: 30px; }
  .site-header .logo-word { font-size: 15px; }
  .btn-head { padding: 0 12px; }
  /* the layer names keep to ≤ 2 lines, so the list stays between the header and the stats card */
  .pl-fig { gap: 10px; }
  .pl-svg { width: min(54%, calc((var(--stage-h) * .42 - 108px) * 780 / 815)); }
  .pl-list { gap: 7px; }
  .pl-list b { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js [data-reveal], .js [data-reveal="wipe"] { opacity: 1; transform: none; clip-path: none; }
  .js [data-split] .wi, .js .stage .hero-copy .wi { transform: none; }
  .js [data-words] .wd { opacity: 1; }
  .marquee-ctl { display: none; }   /* the band stands still – nothing to stop */
}
