/* ==========================================================================
   FOUNTN — Design System
   Type:  Host Grotesk (the family fiberflow.de uses; closest licensable
          match to Floema's commercial "Zimula", incl. its tight tracking)
   Ink:   #08120E, sampled from the droplet mark in the FOUNTN logo
   Water: the Ocean Swirl shader ramp, reused as the brand's dark palette
   ========================================================================== */

/* --- Fonts ---------------------------------------------------------------
   Self-hosted on purpose. Loading these from fonts.googleapis.com would send
   every visitor's IP to Google in the US before any consent — the exact
   practice LG München I ruled on (20.01.2022, Az. 3 O 17493/20). Serving them
   from our own origin removes the transfer entirely, so no consent banner and
   no disclosure are needed, and it drops two DNS+TLS handshakes.
   Host Grotesk is SIL OFL 1.1; see assets/fonts/OFL.txt.
   ------------------------------------------------------------------------ */

/* latin-ext */
@font-face {
  font-family: 'Host Grotesk';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../assets/fonts/host-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin — covers ä ö ü ß via U+0000-00FF */
@font-face {
  font-family: 'Host Grotesk';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../assets/fonts/host-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Tokens ------------------------------------------------------------- */

:root {
  /* Brand */
  --ink:        #08120E;
  --ink-80:     rgba(8, 18, 14, 0.80);
  /* 0.62 is the lightest this ink goes and still clears 4.5:1 on --paper
     (measured 5.1:1). Anything lighter is decoration only — never text. */
  --ink-62:     rgba(8, 18, 14, 0.62);
  --ink-32:     rgba(8, 18, 14, 0.32);
  --ink-12:     rgba(8, 18, 14, 0.12);
  --ink-06:     rgba(8, 18, 14, 0.06);

  --paper:      #F2EFEA;
  --paper-warm: #F7F5F1;
  --white:      #FFFFFF;

  /* Water ramp — identical to the hero shader's colour stops */
  --abyss:      #031C26;
  --deep:       #1B6CA8;
  --cyan:       #5AD2F4;
  --mist:       #EAF9FF;

  /* Semantic */
  --bg:            var(--paper);
  --surface:       var(--white);
  --text:          var(--ink);
  --text-muted:    var(--ink-62);
  --text-on-dark:  var(--mist);
  --muted-on-dark: rgba(234, 249, 255, 0.62);
  --border:        var(--ink-12);
  --border-on-dark: rgba(234, 249, 255, 0.16);
  --accent:        var(--deep);
  --accent-on-dark: var(--cyan);
  --focus:         var(--cyan);

  /* Type scale — 1.25 minor third, fluid */
  --step--1: clamp(0.83rem, 0.79rem + 0.18vw, 0.94rem);
  --step-0:  clamp(1rem, 0.96rem + 0.20vw, 1.13rem);
  --step-1:  clamp(1.25rem, 1.16rem + 0.42vw, 1.53rem);
  --step-2:  clamp(1.56rem, 1.40rem + 0.79vw, 2.07rem);
  --step-3:  clamp(1.95rem, 1.68rem + 1.36vw, 2.80rem);
  --step-4:  clamp(2.44rem, 1.99rem + 2.24vw, 3.78rem);
  --step-5:  clamp(2.60rem, 1.85rem + 3.20vw, 4.40rem);
  /* Tuned against the longest German word we ship ("selbstverständlich.") so it
     fits a 375px screen unbroken: ~33px at 375, ~88px at 1440. */
  --step-6:  clamp(2.06rem, 0.85rem + 5.16vw, 5.50rem);

  /* Spacing — 8px rhythm */
  --space-2xs: 0.5rem;
  --space-xs:  0.75rem;
  --space-s:   1rem;
  --space-m:   1.5rem;
  --space-l:   2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;
  --space-3xl: clamp(5rem, 10vw, 9rem);

  --container: 76rem;
  --container-narrow: 52rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --radius-s:  6px;
  --radius-m:  14px;
  --radius-l:  24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  /* Motion — one rhythm across the whole site */
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:   150ms;
  --dur-base:   260ms;
  --dur-slow:   420ms;
  --dur-reveal: 800ms;

  --shadow-s: 0 1px 2px rgba(8, 18, 14, 0.06), 0 2px 8px rgba(8, 18, 14, 0.04);
  --shadow-m: 0 2px 6px rgba(8, 18, 14, 0.06), 0 12px 32px rgba(8, 18, 14, 0.08);
  --shadow-l: 0 8px 24px rgba(8, 18, 14, 0.10), 0 32px 64px rgba(8, 18, 14, 0.12);

  /* Layers */
  --z-base: 0;
  --z-raised: 10;
  --z-nav: 100;
  --z-overlay: 1000;
}

/* --- Reset -------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Host Grotesk", ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Roboto, sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.011em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, canvas, video { display: block; max-width: 100%; }
img { height: auto; }

button, input, textarea, select { font: inherit; color: inherit; }

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

::selection { background: var(--cyan); color: var(--ink); }

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

/* --- Typography --------------------------------------------------------- */

h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.04em;  /* Floema's signature tightness */
  text-wrap: balance;
  overflow-wrap: break-word;
}

/* German compounds get long. Below the tablet breakpoint, let the browser
   hyphenate rather than let a word overhang the screen. */
@media (max-width: 640px) {
  h1, h2, .display { hyphens: auto; }
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); letter-spacing: -0.03em; line-height: 1.15; }
h4 { font-size: var(--step-1); letter-spacing: -0.025em; line-height: 1.25; }

p { text-wrap: pretty; }

.display {
  font-size: var(--step-6);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.lead {
  font-size: var(--step-1);
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--text-muted);
  max-width: 34ch;
}

.eyebrow {
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Correct heading level, smaller visual weight — keeps the document outline
   sequential without forcing an h4-sized step onto an h3 slot. */
.as-h4 {
  font-size: var(--step-1);
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.measure    { max-width: 62ch; }
.measure-sm { max-width: 46ch; }

.tabular { font-variant-numeric: tabular-nums; }

/* --- Layout ------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--space-3xl); }
.section-tight { padding-block: var(--space-2xl); }

/* Dark surfaces rebind the semantic tokens rather than relying on a hand-written
   override per component. Anything using var(--text-muted) inside a dark section
   is then automatically legible — without this, a component that forgets its own
   override renders dark ink on a dark ground. */
.section-dark,
.page-hero,
.footer {
  --text:       var(--mist);
  --text-muted: var(--muted-on-dark);
  --border:     var(--border-on-dark);
}

.section-dark {
  background: var(--abyss);
  color: var(--text-on-dark);
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 {
  color: var(--mist);
}
.section-dark .lead,
.section-dark .eyebrow { color: var(--muted-on-dark); }

.grid { display: grid; gap: var(--space-m); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.stack > * + * { margin-top: var(--space-s); }
.stack-l > * + * { margin-top: var(--space-l); }

/* --- Navigation --------------------------------------------------------- */

.nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  padding: var(--space-s) var(--gutter);
  padding-block-start: max(var(--space-s), env(safe-area-inset-top));
  transition: background var(--dur-base) var(--ease-out),
              backdrop-filter var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
  border-block-end: 1px solid transparent;
}

/* Over the hero shader: white text, no plate */
.nav[data-mode="over-hero"] {
  color: var(--mist);
}
.nav[data-mode="over-hero"] .nav-logo { filter: invert(1) brightness(2); }

/* Scrolled past the hero: frosted plate, ink text */
.nav[data-mode="scrolled"] {
  background: rgba(242, 239, 234, 0.72);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border-block-end-color: var(--border);
  color: var(--ink);
}

.nav-logo {
  height: clamp(30px, 2.6vw, 40px);
  width: auto;
  transition: filter var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.nav-brand:hover .nav-logo { transform: scale(1.03); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  list-style: none;
  padding: 0;
}

/* display:block is load-bearing — as an inline element the vertical padding
   doesn't push siblings apart, so the items overlap and the bottom border
   lands on the next item's text. */
.nav-link {
  position: relative;
  display: block;
  padding: 0.5rem 0.875rem;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: var(--radius-pill);
  transition: background var(--dur-fast) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out);
  opacity: 0.75;
}
.nav-link:hover {
  opacity: 1;
  background: color-mix(in srgb, currentColor 10%, transparent);
}
.nav-link[aria-current="page"] { opacity: 1; }
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-block-end: 0.25rem;
  inset-inline: 0.875rem;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
}

/* The mobile panel is position:fixed, so it paints above anything static in the
   same stacking context — including the close button. Lifting the bar's own
   contents into a positioned layer keeps them reachable while it's open. */
.nav-brand,
.nav-right { position: relative; z-index: 1; }

.nav-right { display: flex; align-items: center; gap: var(--space-xs); }

/* Language toggle */
.lang {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, currentColor 6%, transparent);
}

.lang-btn {
  position: relative;
  min-height: 32px;
  padding: 0 0.7rem;
  border: 0;
  background: transparent;
  border-radius: var(--radius-pill);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}

/* The pill stays visually 32px tall, but the tap area is a full 44x44 —
   size the hit box, not the chrome. */
.lang-btn::after {
  content: "";
  position: absolute;
  inset: 50% 50%;
  min-width: 44px;
  min-height: 44px;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
}
.lang-btn:hover { opacity: 1; }

/* Explicit pair, never `background: currentColor` — currentColor resolves to
   this rule's own `color`, which painted the pill and its label the same
   shade and made the selected language invisible. */
.lang-btn[aria-pressed="true"] {
  opacity: 1;
  background: var(--lang-on-bg);
  color: var(--lang-on-fg);
}

/* White pill on the dark hero... */
.nav[data-mode="over-hero"] {
  --lang-on-bg: var(--mist);
  --lang-on-fg: var(--abyss);
}
/* ...ink pill once the nav sits on paper — scrolled, or with the menu open. */
.nav[data-mode="scrolled"],
.nav[data-menu-open="true"] {
  --lang-on-bg: var(--ink);
  --lang-on-fg: var(--paper);
}

/* Mobile nav */
.nav-toggle { display: none; }

@media (max-width: 800px) {
  /* With the paper panel open behind it, the bar's own contents must switch to
     ink — otherwise the logo and the unselected language are white on paper. */
  .nav[data-menu-open="true"] { color: var(--ink); }
  .nav[data-menu-open="true"] .nav-logo { filter: none; }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, currentColor 6%, transparent);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-toggle svg { width: 20px; height: 20px; overflow: visible; }

  /* Burger -> X. fill-box so each line rotates about its own centre. */
  .nav-toggle .burger-line {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform var(--dur-base) var(--ease-out),
                opacity var(--dur-fast) var(--ease-out);
  }
  .nav-toggle[aria-expanded="true"] .burger-top {
    transform: translateY(6px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] .burger-mid {
    opacity: 0;
    transform: scaleX(0.2);
  }
  .nav-toggle[aria-expanded="true"] .burger-bot {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: calc(env(safe-area-inset-top) + 4.5rem) var(--gutter) var(--space-l);
    background: var(--paper);
    color: var(--ink);
    border-block-end: 1px solid var(--border);
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform var(--dur-slow) var(--ease-out),
                visibility 0s linear var(--dur-slow);
  }
  .nav-links[data-open="true"] {
    transform: translateY(0);
    visibility: visible;
    transition: transform var(--dur-slow) var(--ease-out), visibility 0s;
  }
  .nav-link {
    padding: var(--space-s) 0;
    font-size: var(--step-2);
    letter-spacing: -0.03em;
    opacity: 1;
    border-block-end: 1px solid var(--border);
    border-radius: 0;
  }
  .nav-link:hover { background: transparent; }
  .nav-link[aria-current="page"]::after { display: none; }
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--step-0);
  font-weight: 500;
  letter-spacing: -0.015em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--deep);
  box-shadow: var(--shadow-m);
}

.btn-secondary {
  background: transparent;
  border-color: var(--ink-32);
  color: var(--ink);
}
.btn-secondary:hover {
  border-color: var(--ink);
  background: var(--ink-06);
}

/* On the hero / dark sections — the soft blue pill from fiberflow.de */
.btn-water {
  background: var(--cyan);
  color: var(--abyss);
}
.btn-water:hover {
  background: var(--mist);
  box-shadow: 0 8px 32px rgba(90, 210, 244, 0.35);
}

.btn-ghost-dark {
  background: rgba(234, 249, 255, 0.08);
  border-color: var(--border-on-dark);
  color: var(--mist);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-ghost-dark:hover {
  background: rgba(234, 249, 255, 0.16);
  border-color: rgba(234, 249, 255, 0.4);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

/* Arrow nudge on hover */
.btn .arrow {
  transition: transform var(--dur-base) var(--ease-out);
}
.btn:hover .arrow { transform: translateX(3px); }

/* Text link with underline sweep */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  padding-block: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size var(--dur-base) var(--ease-out);
}
.link-arrow:hover { background-size: 100% 1.5px; }
.link-arrow:hover .arrow { transform: translateX(3px); }

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100dvh;
  display: grid;
  place-items: end center;
  padding-block-end: clamp(3rem, 8vh, 6rem);
  padding-block-start: 8rem;
  background: var(--abyss);
  overflow: hidden;
  isolation: isolate;
}

/* WebGL canvas — sits behind everything, never intercepts scroll */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  touch-action: pan-y;
}

/* Static fallback: shown when WebGL is unavailable or motion is reduced */
.hero-fallback {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(120% 90% at 50% 45%, #1B6CA8 0%, #0A3550 42%, #031C26 100%),
    var(--abyss);
}

/* Legibility scrim so the headline always clears 4.5:1 over moving water */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(3, 28, 38, 0.55) 0%,
    rgba(3, 28, 38, 0.18) 28%,
    rgba(3, 28, 38, 0.42) 62%,
    rgba(3, 28, 38, 0.88) 100%
  );
}

/* width:100% is load-bearing — the grid's `justify-items: center` would
   otherwise size this to max-content and push the headline off-screen. */
.hero-inner {
  position: relative;
  width: 100%;
  text-align: center;
  color: var(--mist);
  max-width: 60rem;
  padding-inline: var(--gutter);
}

.hero h1 {
  font-size: var(--step-6);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: var(--mist);
  text-shadow: 0 2px 40px rgba(3, 28, 38, 0.5);
}

.hero-sub {
  margin-inline: auto;
  margin-block-start: var(--space-m);
  max-width: 44ch;
  font-size: var(--step-1);
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: rgba(234, 249, 255, 0.86);
  text-shadow: 0 1px 24px rgba(3, 28, 38, 0.6);
}

.hero-cta {
  margin-block-start: var(--space-l);
  justify-content: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  margin-block-end: var(--space-m);
  border: 1px solid rgba(234, 249, 255, 0.24);
  border-radius: var(--radius-pill);
  background: rgba(3, 28, 38, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(234, 249, 255, 0.9);
}

.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(90, 210, 244, 0.7);
  animation: pulse 2.4s var(--ease-out) infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(90, 210, 244, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(90, 210, 244, 0); }
  100% { box-shadow: 0 0 0 0 rgba(90, 210, 244, 0); }
}

/* --- Page hero (sub-page) ----------------------------------------------- */

.page-hero {
  padding-block: clamp(9rem, 18vh, 13rem) var(--space-2xl);
  background: var(--abyss);
  color: var(--mist);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset-block-start: -30%;
  inset-inline-start: 50%;
  width: 120%;
  aspect-ratio: 2 / 1;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(27, 108, 168, 0.55), transparent 70%);
  pointer-events: none;
}
.page-hero > * { position: relative; }

/* --- Legal pages -------------------------------------------------------- */

.legal { max-width: 60ch; }

.legal h2 {
  font-size: var(--step-2);
  letter-spacing: -0.03em;
  margin-block-start: var(--space-xl);
}
.legal h2:first-of-type { margin-block-start: 0; }

.legal h3 {
  font-size: var(--step-1);
  margin-block-start: var(--space-l);
}

.legal p { margin-block-start: var(--space-s); color: var(--text-muted); }
.legal p strong { color: var(--text); font-weight: 500; }

.legal a {
  color: var(--accent);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  word-break: break-word;
}
.legal a:hover { background-size: 100% 2px; }

.legal address {
  margin-block-start: var(--space-s);
  font-style: normal;
  color: var(--text);
  line-height: 1.7;
}

.legal-list {
  margin-block-start: var(--space-s);
  padding-inline-start: 1.25rem;
  color: var(--text-muted);
}
.legal-list li { margin-block-start: var(--space-2xs); padding-inline-start: 0.25rem; }

.legal-rule { margin-block: var(--space-xl); }

/* --- Flow connector ------------------------------------------------------ */

/* Bridges two same-toned sections that would otherwise just sit next to each
   other. Reads as a falling line of water: on-brand, and it marks the step
   from "the problem we solve" to "who we solve it for". Decorative only. */
.flow-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: var(--space-m);
}

.flow-line {
  width: 1.5px;
  height: clamp(56px, 9vw, 104px);
  border-radius: 2px;
  background: linear-gradient(to bottom, transparent, var(--deep));
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 1000ms var(--ease-out);
}

.flow-dot {
  width: 7px;
  height: 7px;
  margin-block-start: -1px;
  border-radius: 50%;
  background: var(--deep);
  transform: scale(0);
  transition: transform 420ms var(--ease-out) 760ms;
}

.flow-link.is-visible .flow-line { transform: scaleY(1); }
.flow-link.is-visible .flow-dot  { transform: scale(1); }

/* --- Cards -------------------------------------------------------------- */

.card {
  padding: var(--space-l);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-m);
  border-color: var(--ink-32);
}

.card-dark {
  background: rgba(234, 249, 255, 0.04);
  border-color: var(--border-on-dark);
}
.card-dark:hover {
  background: rgba(234, 249, 255, 0.07);
  border-color: rgba(234, 249, 255, 0.32);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

/* Also carries the sector tag lists, which are real content — so this stays
   readable and gets its "quiet" from tracking, not from low contrast. */
.card-num {
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.section-dark .card-num { color: var(--muted-on-dark); }

.card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-block-end: var(--space-m);
  border-radius: var(--radius-m);
  background: var(--ink-06);
  color: var(--deep);
}
.card-icon svg { width: 22px; height: 22px; }
.section-dark .card-icon {
  background: rgba(90, 210, 244, 0.12);
  color: var(--cyan);
}

.card h3 { margin-block-end: var(--space-2xs); }
.card p { color: var(--text-muted); }
.section-dark .card p { color: var(--muted-on-dark); }

/* Cards with a CTA: push the button to the bottom so buttons line up across
   the row even when the copy above differs in length. */
.card-flex {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.card-cta { align-self: flex-start; margin-block-start: var(--space-l); }
/* auto absorbs the free space so buttons align across the row... */
.card-flex .card-cta { margin-block-start: auto; }
/* ...and the element above it keeps a real gap when there is no free space. */
.card-flex > :nth-last-child(2) { margin-block-end: var(--space-l); }

/* --- Stats -------------------------------------------------------------- */

.stat-value {
  font-size: var(--step-4);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  margin-block-start: var(--space-2xs);
  font-size: var(--step--1);
  color: var(--text-muted);
}
.section-dark .stat-label { color: var(--muted-on-dark); }

/* --- Team --------------------------------------------------------------- */

.team-photo {
  border-radius: var(--radius-l);
  overflow: hidden;
  background: var(--ink-06);
  aspect-ratio: 4 / 3;
}
.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  transition: transform 1.2s var(--ease-out);
}
.team-photo:hover img { transform: scale(1.03); }

.person-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--deep), var(--abyss));
  color: var(--mist);
  font-size: var(--step-0);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-block-end: var(--space-s);
  overflow: hidden;
  flex: none;
}
.person-avatar img { width: 100%; height: 100%; object-fit: cover; }

.person-name { font-size: var(--step-1); letter-spacing: -0.025em; }
.person-role {
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--deep);
  margin-block-start: 2px;
}
.person-bio {
  margin-block-start: var(--space-2xs);
  font-size: var(--step-0);
  color: var(--text-muted);
}

/* --- Station SVG -------------------------------------------------------- */

.station-figure {
  display: grid;
  place-items: center;
  padding: var(--space-l);
  background: linear-gradient(160deg, #0A2E3E 0%, var(--abyss) 100%);
  border: 1px solid var(--border-on-dark);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.station-svg { width: 100%; max-width: 300px; height: auto; }

/* Water rising in the bottle */
.water-fill { transform-origin: center bottom; }
.station-figure:not([data-static]) .water-fill {
  animation: fill 4.5s var(--ease-in-out) infinite;
}
@keyframes fill {
  0%, 8%    { transform: scaleY(0); opacity: 0; }
  15%       { opacity: 1; }
  55%, 78%  { transform: scaleY(1); opacity: 1; }
  92%, 100% { transform: scaleY(1); opacity: 0; }
}

/* Falling stream */
.station-figure:not([data-static]) .stream {
  animation: stream 4.5s linear infinite;
}
@keyframes stream {
  0%, 6%   { opacity: 0; }
  12%, 62% { opacity: 0.9; }
  70%, 100% { opacity: 0; }
}

/* Ad frames cycling on the pDOOH screen */
.ad-frame { opacity: 0; }
.station-figure:not([data-static]) .ad-frame {
  animation: adcycle 9s var(--ease-in-out) infinite;
}
.station-figure:not([data-static]) .ad-frame:nth-of-type(2) { animation-delay: 3s; }
.station-figure:not([data-static]) .ad-frame:nth-of-type(3) { animation-delay: 6s; }
@keyframes adcycle {
  0%, 2%    { opacity: 0; transform: translateY(4px); }
  6%, 30%   { opacity: 1; transform: translateY(0); }
  34%, 100% { opacity: 0; transform: translateY(-4px); }
}

/* --- Sector split (sub-page) -------------------------------------------- */

.sector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 900px) { .sector { grid-template-columns: 1fr; } }

.sector-sticky {
  position: sticky;
  top: calc(var(--space-xl) + 2rem);
}
@media (max-width: 900px) { .sector-sticky { position: static; } }

.benefit-list { list-style: none; padding: 0; }
.benefit-list li {
  display: flex;
  gap: var(--space-s);
  padding-block: var(--space-s);
  border-block-end: 1px solid var(--border);
}
.section-dark .benefit-list li { border-block-end-color: var(--border-on-dark); }
.benefit-list li:last-child { border-block-end: 0; }

.benefit-check {
  flex: none;
  width: 22px;
  height: 22px;
  margin-block-start: 3px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--deep);
  color: var(--mist);
}
.section-dark .benefit-check { background: var(--cyan); color: var(--abyss); }
.benefit-check svg { width: 12px; height: 12px; }

.benefit-title { font-weight: 500; letter-spacing: -0.015em; }
.benefit-desc {
  font-size: var(--step--1);
  color: var(--text-muted);
  margin-block-start: 2px;
}
.section-dark .benefit-desc { color: var(--muted-on-dark); }

/* --- Tag ---------------------------------------------------------------- */

.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--text-muted);
}
.section-dark .tag {
  border-color: var(--border-on-dark);
  color: var(--muted-on-dark);
}

/* --- Footer ------------------------------------------------------------- */

.footer {
  padding-block: var(--space-2xl) var(--space-l);
  padding-block-end: max(var(--space-l), env(safe-area-inset-bottom));
  background: var(--abyss);
  color: var(--muted-on-dark);
}
.footer a:hover { color: var(--mist); }
/* width:auto is required — the <img> carries width/height attributes, so
   setting height alone leaves it stretched to the file's native 461px. */
.footer-logo { height: 34px; width: auto; filter: invert(1) brightness(2); }

/* Social — the icon is the whole link, so the box carries the touch target
   (48, not 44: fractional layout resolves 44 a hair short). */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-block-start: var(--space-m);
  margin-inline-start: -0.75rem;   /* optically align the glyph with the logo */
  border-radius: var(--radius-pill);
  color: var(--muted-on-dark);
  transition: color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.social-link svg { width: 22px; height: 22px; }
.social-link:hover {
  color: var(--mist);
  background: rgba(234, 249, 255, 0.08);
  transform: translateY(-2px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-l);
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

/* 0.58 is the lightest this reads and still clears 4.5:1 on --abyss at 14px.
   0.4 measured 3.57:1 and failed. */
.footer-head {
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(234, 249, 255, 0.58);
  margin-block-end: var(--space-s);
}
.footer-list { list-style: none; padding: 0; }
.footer-list li + li { margin-block-start: 0.5rem; }

/* --- Partner row (in the dark footer) ----------------------------------- */

.partners {
  margin-block-start: var(--space-xl);
  padding-block-start: var(--space-l);
  border-block-start: 1px solid var(--border-on-dark);
}

.partners { text-align: center; }

.partners-label {
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(234, 249, 255, 0.58);
  margin-block-end: var(--space-l);
}

.partners-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 7vw, 5rem);
}

/* Each logo is a link: pad the box out to a 44px hit target while the artwork
   itself stays at its own optical size. */
/* 48, not 44: fractional layout resolved a 44px min-height to 43.99 and
   missed the minimum touch target by a sub-pixel. */
.partner-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: var(--space-2xs);
  border-radius: var(--radius-s);
  opacity: 0.85;
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.partner-link:hover { opacity: 1; transform: translateY(-2px); }

.partner-link img { width: auto; max-width: 100%; object-fit: contain; }

/* Sized by optical weight, not by a shared box height: HTWK is a wide, short
   wordmark, S13 is a tall stacked mark. Equal heights made S13 look tiny. */
.partner-htwk img { height: 30px; }
.partner-s13 img  { height: 56px; }

@media (max-width: 600px) {
  .partners-logos { gap: var(--space-l); }
  .partner-htwk img { height: 24px; }
  .partner-s13 img  { height: 44px; }
}

/* --- Förderung band (very bottom of the page) ---------------------------- */

/* Pure white, not --paper: the supplied logo sheet has an opaque white
   background baked in, so any other tone would show as a pale rectangle. */
.foerderung {
  background: #FFFFFF;
  padding-block: var(--space-l);
  color: var(--ink);
}

.foerderung-label {
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-block-end: var(--space-m);
}

.foerderung-inner {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  flex-wrap: wrap;
}

.foerderung-logos {
  width: 100%;
  max-width: 520px;
  height: auto;
  flex: none;
}

.foerderung-text {
  flex: 1 1 26rem;
  min-width: 0;
  font-size: var(--step--1);
  line-height: 1.55;
  color: var(--text-muted);
}
.foerderung-text + .foerderung-text { margin-block-start: var(--space-2xs); }

@media (max-width: 760px) {
  .foerderung-inner { flex-direction: column; align-items: flex-start; }
  .foerderung-logos { max-width: 100%; }
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  justify-content: space-between;
  align-items: center;
  margin-block-start: var(--space-xl);
  padding-block-start: var(--space-m);
  border-block-start: 1px solid var(--border-on-dark);
  font-size: var(--step--1);
  color: rgba(234, 249, 255, 0.58);
}

/* --- Scroll reveal ------------------------------------------------------ */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-reveal) var(--ease-out),
              transform var(--dur-reveal) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Headline that wipes up line by line.
   The clip box is pushed 0.22em below the line box (and pulled back with an
   equal negative margin, so layout is unchanged) — otherwise overflow:hidden
   crops the descenders of g/j/p against our tight 0.98 line-height.
   translateY must exceed that padding to still hide the line at rest. */
.reveal-line {
  display: block;
  overflow: hidden;
  padding-block-end: 0.22em;
  margin-block-end: -0.22em;
}
.reveal-line > span {
  display: block;
  transform: translateY(130%);
  transition: transform 900ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.is-visible .reveal-line > span,
.hero.is-ready .reveal-line > span { transform: translateY(0); }

/* Hero intro chrome fades in after the headline */
.hero-fade {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur-reveal) var(--ease-out),
              transform var(--dur-reveal) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.hero.is-ready .hero-fade { opacity: 1; transform: none; }

/* --- Utilities ---------------------------------------------------------- */

.skip-link {
  position: absolute;
  inset-block-start: -100%;
  inset-inline-start: var(--gutter);
  z-index: var(--z-overlay);
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0 0 var(--radius-m) var(--radius-m);
  font-weight: 500;
}
.skip-link:focus { inset-block-start: 0; }

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

.rule { height: 1px; background: var(--border); border: 0; }
.section-dark .rule { background: var(--border-on-dark); }

.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }

/* --- Reduced motion ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }

  /* Content must never be stuck invisible when motion is off */
  [data-reveal],
  .hero-fade {
    opacity: 1 !important;
    transform: none !important;
  }
  .reveal-line > span { transform: none !important; }

  /* Drawn with scale, so "transform: none" would leave it at full size —
     which is what we want here: show it, just don't animate it. */
  .flow-line { transform: scaleY(1) !important; }
  .flow-dot  { transform: scale(1) !important; }

  .hero-canvas { display: none; }   /* static gradient shows through */
  .hero-dot { animation: none; }
  .team-photo:hover img { transform: none; }
}
