/* ==========================================================================
   SSOCS — Stylesheet
   Grundlage: BRAND.md. Abweichungen dort zuerst ändern.

   00  Tokens
   01  Reset & Basis
   02  Typografie
   03  Layout
   04  Komponenten
   05  Bewegung
   ========================================================================== */

/* ── Schriften, lokal ausgeliefert ─────────────────────────────────────────
   Inter, Inter Tight und JetBrains Mono stehen unter der SIL Open Font
   License. Bezogen von Google Fonts, hier aber selbst ausgeliefert:
   dadurch wird beim Seitenaufruf keine IP-Adresse an Google uebertragen
   und der Seitenaufbau wartet nicht auf eine fremde Verbindung.

   Es sind Variable Fonts — eine Datei deckt 400 bis 600 ab. Zugeschnitten
   auf die Zeichen, die auf dieser Seite wirklich vorkommen. latin-ext wird
   nur geladen, wenn ein Zeichen daraus gebraucht wird (z. B. in "Lestan").
   ──────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/inter-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;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/inter-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;
}

@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/inter-tight-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;
}

@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/inter-tight-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;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-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;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-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;
}

/* ── 00 Tokens ─────────────────────────────────────────────────────────── */

:root {
  /* Farbe — hell */
  --ink:        #16130F;
  --surface:    #F4F1EC;
  --raised:     #EAE5DC;
  --muted:      #6A6359;
  --ember:      #C8501E;
  --on-ember:   #FFFFFF;
  --line:       rgba(22, 19, 15, .12);
  --line-firm:  rgba(22, 19, 15, .24);
  --ink-inv:    #F4F1EC;
  --surface-inv:#16130F;

  /* Schrift */
  --font-display: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Schriftgrößen — fließend */
  --t-h1:    clamp(2.5rem,  6vw,   4.5rem);
  --t-h2:    clamp(1.85rem, 3.6vw, 2.9rem);
  --t-h3:    clamp(1.2rem,  1.9vw, 1.45rem);
  --t-lead:  clamp(1.05rem, 1.5vw, 1.25rem);
  --t-body:  1rem;
  --t-small: .875rem;
  --t-mono:  .72rem;

  /* Raster */
  --gutter:  clamp(1.25rem, 5vw, 5rem);
  --maxw:    1240px;
  --measure: 68ch;

  /* Abstände */
  --s-1: .25rem;  --s-2: .5rem;   --s-3: .75rem;  --s-4: 1rem;
  --s-5: 1.5rem;  --s-6: 2rem;    --s-7: 3rem;    --s-8: 4rem;
  --s-9: 6rem;    --s-10: 8rem;
  --section-y: clamp(4.5rem, 10vw, 9rem);

  /* Gerätefarben der iPhone-Darstellung. Bewusst in beiden Farbmodi identisch:
     ein Display ist dunkel, unabhängig davon, wie die Seite ringsum eingestellt ist.
     Deshalb stehen sie hier einmal und werden unten nicht gespiegelt. */
  --screen-bg:   #0B0B0D;
  --screen-card: #1C1C20;
  --screen-ink:  #F2F2F4;
  --screen-dim:  #9B9BA2;
  --screen-line: rgba(255, 255, 255, .09);
  --frame-hi:    #9A9AA0;
  --frame-mid:   #6B6B70;
  --frame-lo:    #37373B;
  --screen-alert: #C8501E;
  --on-screen-alert: #FFFFFF;
  /* Die Dynamic Island ist am echten Gerät physisch schwarz — in beiden Modi. */
  --screen-island: #000000;

  /* Radien */
  --r-sm: 4px;  --r-md: 8px;  --r-lg: 14px;

  /* Bewegung */
  --ease:  cubic-bezier(.22, .61, .36, 1);
  --fast:  160ms var(--ease);
  --slow:  400ms var(--ease);
}

/* Farbe — dunkel. Systemvorgabe, sofern der Umschalter nicht auf hell steht. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink:        #EDE8E0;
    --surface:    #100E0B;
    --raised:     #191613;
    --muted:      #8C8479;
    --ember:      #E8743F;
    --on-ember:   #16130F;
    --line:       rgba(237, 232, 224, .14);
    --line-firm:  rgba(237, 232, 224, .28);
    --ink-inv:    #16130F;
    --surface-inv:#EDE8E0;
  }
}

/* Farbe — dunkel, ausdrücklich gewählt. Muss die Systemvorgabe überstimmen. */
:root[data-theme="dark"] {
  --ink:        #EDE8E0;
  --surface:    #100E0B;
  --raised:     #191613;
  --muted:      #8C8479;
  --ember:      #E8743F;
  --on-ember:   #16130F;
  --line:       rgba(237, 232, 224, .14);
  --line-firm:  rgba(237, 232, 224, .28);
  --ink-inv:    #16130F;
  --surface-inv:#EDE8E0;
}

/* ── 01 Reset & Basis ──────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
  overflow-x: hidden;
}

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

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

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

h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

/* Fokus nur bei Tastaturbedienung, dafür deutlich. */
:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: var(--ember); color: var(--on-ember); }

/* ── 02 Typografie ─────────────────────────────────────────────────────── */

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.05;
  text-wrap: balance;
}

h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.25; letter-spacing: -.02em; }

.lead {
  font-size: var(--t-lead);
  line-height: 1.55;
  color: var(--muted);
  max-width: 52ch;
  text-wrap: pretty;
}

p { max-width: var(--measure); text-wrap: pretty; }

/* Das wiederkehrende Mono-Label: Sektionsnummern, Kategorien, Einheiten. */
.label {
  font-family: var(--font-mono);
  font-size: var(--t-mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

.ember { color: var(--ember); }

/* ── 03 Layout ─────────────────────────────────────────────────────────── */

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

section { padding-block: var(--section-y); }

/* Kopfzeile einer Sektion: Mono-Nummer über der Überschrift, darunter eine Linie. */
.section-head {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding-bottom: var(--s-6);
  margin-bottom: var(--s-8);
  border-bottom: 1px solid var(--line);
}

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: var(--s-4);
  z-index: 999;
  padding: var(--s-3) var(--s-5);
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--r-md);
  transform: translateY(-200%);
  transition: transform var(--fast);
}
.skip-link:focus { transform: translateY(0); }

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

/* ── 04 Komponenten ────────────────────────────────────────────────────── */

/* Bildmarke inline: Balken folgen currentColor, Sollwert-Linie bleibt Glut. */
.mark { width: auto; color: var(--ink); }
.mark .setpoint { fill: var(--ember); }

.logo {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1;
  color: var(--ink);
}
.logo .mark { height: 1em; }
.logo-text { font-size: 1.15rem; }

/* Schaltflächen */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: .85rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: var(--t-small);
  font-weight: 500;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background var(--fast), color var(--fast), border-color var(--fast);
}

.btn-primary {
  background: var(--ember);
  color: var(--on-ember);
}
.btn-primary:hover { background: color-mix(in srgb, var(--ember) 86%, var(--ink)); }

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

/* Karte: Fläche und Linie statt Schatten. */
.card {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
}

/* ── 05 Bewegung ───────────────────────────────────────────────────────── */

/* Nur wenn JavaScript läuft, wird überhaupt etwas versteckt. Sonst bliebe der
   halbe Seiteninhalt bei abgeschaltetem oder fehlgeschlagenem Skript unsichtbar. */
.js .reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--slow), transform var(--slow);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ── 06 Kopfzeile & Navigation ─────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--fast), background var(--fast);
}
@supports (backdrop-filter: blur(1px)) {
  .nav { backdrop-filter: saturate(1.4) blur(14px); }
}
.nav.is-scrolled { border-bottom-color: var(--line); }

.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  min-height: 4.25rem;
}

.nav .logo { margin-right: auto; }

.nav-links {
  display: none;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 1.9rem);
  font-size: var(--t-small);
  font-weight: 500;
}
.nav-links a {
  position: relative;
  color: var(--muted);
  padding-block: .35rem;
  transition: color var(--fast);
}
.nav-links a:hover { color: var(--ink); }

/* Unterstreichung wächst aus der Mitte — nur Farbe und Linie, kein Springen. */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--ember);
  transform: scaleX(0);
  transition: transform var(--fast);
}
.nav-links a:hover::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: var(--s-2); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--muted);
  cursor: pointer;
  transition: color var(--fast), border-color var(--fast);
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-firm); }

/* Sonne im Hellmodus, Mond im Dunkelmodus — nie beides. */
.icon-btn .moon { display: none; }
:root[data-theme="dark"] .icon-btn .sun { display: none; }
:root[data-theme="dark"] .icon-btn .moon { display: block; }

.nav-panel {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.nav-panel nav {
  display: flex;
  flex-direction: column;
  padding-block: var(--s-4) var(--s-6);
}
.nav-panel a {
  display: flex;
  align-items: baseline;
  gap: var(--s-4);
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -.02em;
}
.nav-panel a:last-child { border-bottom: 0; }

@media (min-width: 860px) {
  .nav-links  { display: flex; }
  .nav-burger { display: none; }
  .nav-panel  { display: none; }
}

/* ── 10 Sektionen: Hero, Ausgangssituation, System, Funktionen ─────────── */

/* ==========================================================================
   SSOCS — Sektionen: Hero, 01 Ausgangssituation, 02 System, 03 Funktionen
   Ergaenzung zu assets/css/style.css. Ausschliesslich Tokens, keine Literalfarben.

   10  Hero          .hero-*
   11  01 Situation  .sit-*
   12  02 System     .sys-*
   13  03 Funktionen .fn-*
   ========================================================================== */

/* ── 10 Hero ───────────────────────────────────────────────────────────── */

.hero {
  padding-block: clamp(3rem, 9vw, 7rem) var(--section-y);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: var(--s-8);
}

@media (min-width: 62rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    column-gap: var(--s-9);
  }
}

.hero-main > * + * { margin-top: var(--s-5); }

.hero-kicker { margin-bottom: var(--s-6); }

.hero-title {
  /* Leitsatz traegt den Abschnitt allein — kein Bild, kein Verlauf. */
  max-width: 14ch;
}

.hero-lead { max-width: 46ch; }

.hero-base {
  color: var(--muted);
  font-size: var(--t-small);
  max-width: 48ch;
}
.hero-base strong { color: var(--ink); font-weight: 500; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-6);
}

/* Datenleiste: statische Beispielwerte, ausdruecklich als Darstellung gekennzeichnet. */
.hero-side {
  border-top: 1px solid var(--line-firm);
  padding-top: var(--s-4);
}

.hero-side-head { margin-bottom: var(--s-4); color: var(--ink); }

.hero-data { display: grid; }

.hero-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  padding-block: var(--s-3);
  border-bottom: 1px solid var(--line);
}

.hero-row dt { min-width: 0; }

.hero-value {
  font-size: var(--t-lead);
  font-weight: 500;
  white-space: nowrap;
}

.hero-data-note {
  margin-top: var(--s-4);
  text-transform: none;
  letter-spacing: .04em;
  line-height: 1.5;
  max-width: 38ch;
}

/* ── 11 01 Ausgangssituation ───────────────────────────────────────────── */

.sit-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: var(--s-7);
}

@media (min-width: 56rem) {
  .sit-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    column-gap: var(--s-8);
  }
}

.sit-text > p + p { margin-top: var(--s-5); }

.sit-aside { align-self: start; }

.sit-aside-head {
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: var(--s-4);
}

.sit-aside-body {
  font-size: var(--t-small);
  color: var(--muted);
  max-width: 34ch;
}

/* ── 12 02 System ──────────────────────────────────────────────────────── */

.sys-figure {
  margin-bottom: var(--s-8);
}

/* Diagramm: Farben nur ueber currentColor und var(--ember). */
.sys-diagram {
  display: none;
  width: 100%;
  height: auto;
  color: var(--ink);
}

.sys-node rect {
  fill: none;
  stroke: currentColor;
  stroke-opacity: .5;
  stroke-width: 1.25;
}

.sys-node-core rect {
  stroke: var(--ember);
  stroke-opacity: 1;
  stroke-width: 1.5;
}

.sys-node text {
  font-family: var(--font-mono);
  fill: currentColor;
  letter-spacing: .08em;
}

.sys-t1 { font-size: 13px; font-weight: 500; }
.sys-t2 { font-size: 10px; fill-opacity: .72; }

.sys-link line {
  stroke: currentColor;
  stroke-opacity: .7;
  stroke-width: 1.25;
}
.sys-link polygon {
  fill: currentColor;
  fill-opacity: .7;
}

/* Senkrechte Entsprechung fuer schmale Bildschirme. */
.sys-chain {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.sys-chain-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: var(--s-4);
  padding-block: var(--s-4);
  padding-left: var(--s-4);
  border-bottom: 1px solid var(--line);
  border-left: 2px solid transparent;
}

.sys-chain-num { color: var(--muted); }

.sys-chain-name {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -.02em;
  font-size: var(--t-h3);
  line-height: 1.2;
}

.sys-chain-sub {
  grid-column: 2;
  margin-top: var(--s-1);
  text-transform: none;
  letter-spacing: .04em;
}

.sys-chain-core { border-left-color: var(--ember); }

/* Die beiden Bedienwege sind gleichrangig: gleiche Nummer, eingerueckt als Verzweigung. */
.sys-chain-split { padding-left: var(--s-6); }

@media (min-width: 44rem) {
  .sys-diagram { display: block; }
  .sys-chain { display: none; }
}

.sys-figcaption {
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  font-size: var(--t-small);
  color: var(--muted);
  max-width: var(--measure);
  text-wrap: pretty;
}

.sys-notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: var(--s-6) var(--s-6);
}

.sys-note {
  border-top: 1px solid var(--line-firm);
  padding-top: var(--s-4);
}

.sys-note h3 { margin-bottom: var(--s-3); }

.sys-note p {
  font-size: var(--t-small);
  color: var(--muted);
  max-width: 34ch;
}

/* ── 13 03 Funktionen ──────────────────────────────────────────────────── */

.fn-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: var(--s-7) var(--s-7);
}

.fn-item {
  border-top: 1px solid var(--line-firm);
  padding-top: var(--s-4);
}

.fn-num { margin-bottom: var(--s-3); }

.fn-num-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.fn-num-row .fn-num { margin-bottom: 0; }

.fn-item h3 { margin-bottom: var(--s-3); }

.fn-item p:not(.fn-num):not(.fn-num-row) {
  font-size: var(--t-small);
  color: var(--muted);
  max-width: 36ch;
}

/* Zurueckhaltender Mono-Chip statt farbigem Badge. */
.fn-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--t-mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  border: 1px solid var(--line-firm);
  border-radius: 999px;
  padding: .1rem .6rem;
  line-height: 1.6;
  white-space: nowrap;
}

.fn-item-optional { border-top-color: var(--ember); }

/* ── 20 Sektionen: Sicherheit, App, Team, Partner, Kontakt, Footer ─────── */

/* ==========================================================================
   SSOCS — Abschnitte 04 bis 08 und Fussbereich
   Ergaenzung zu assets/css/style.css. Ausschliesslich Tokens, keine Literalfarben.

   04  Sicherheit      .sec-
   05  App             .app-
   06  Projekt & Team  .team-
   07  Partner         .part-
   08  Kontakt         .kon-
   09  Fussbereich     .foot-
   ========================================================================== */

/* ── 04 Sicherheit ─────────────────────────────────────────────────────── */

.sec-lead {
  margin-bottom: var(--s-7);
}

.sec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: var(--s-5);
}

.sec-item {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

/* Optionale Ziele bleiben als Mono-Zeile gekennzeichnet, nicht als Farbmarke. */
.sec-opt {
  order: -1;
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--line);
}

.sec-item p:not(.label) {
  color: var(--muted);
  font-size: var(--t-small);
  max-width: none;
}

/* ── 05 App ────────────────────────────────────────────────────────────── */

.app-layout {
  display: grid;
  gap: var(--s-8);
  align-items: start;
}
@media (min-width: 900px) {
  .app-layout {
    grid-template-columns: auto 1fr;
    gap: clamp(var(--s-7), 6vw, var(--s-10));
  }
}

.app-figure { margin: 0; }

/* Luft ringsum, damit die seitlichen Tasten nicht abgeschnitten werden. */
.app-stage {
  display: flex;
  justify-content: center;
  padding-inline: var(--s-2);
}

/* iPhone 16 Pro. Alle Innenmaße sind Gerätepunkte: --u ist ein Punkt,
   abgeleitet aus der Gesamtbreite (402 Bildschirm + 2 × 10 Rahmen = 422). */
.app-device {
  --dw: clamp(240px, 26vw, 330px);
  --u: calc(var(--dw) / 422);
  position: relative;
  width: var(--dw);
  aspect-ratio: 422 / 894;
  padding: calc(10 * var(--u));
  border-radius: calc(65 * var(--u));
  /* Einzige Verlaufsfläche der Seite: der Titanrahmen. Flach wirkt er aufgeklebt. */
  background:
    linear-gradient(100deg,
      var(--frame-lo)  0%,
      var(--frame-hi)  14%,
      var(--frame-mid) 38%,
      var(--frame-mid) 62%,
      var(--frame-hi)  86%,
      var(--frame-lo)  100%);
}

/* Seitentasten — sie geben dem Gerät erst die Silhouette. */
.app-key {
  position: absolute;
  width: calc(3 * var(--u));
  border-radius: calc(1.5 * var(--u));
  background: var(--frame-lo);
}
.app-key-action   { left: calc(-2 * var(--u)); top: calc(148 * var(--u)); height: calc(34 * var(--u)); }
.app-key-vol-up   { left: calc(-2 * var(--u)); top: calc(208 * var(--u)); height: calc(64 * var(--u)); }
.app-key-vol-down { left: calc(-2 * var(--u)); top: calc(284 * var(--u)); height: calc(64 * var(--u)); }
.app-key-power    { right: calc(-2 * var(--u)); top: calc(238 * var(--u)); height: calc(104 * var(--u)); }

/* Der Bildschirm. Die dunkle Innenkante trennt ihn vom Rahmen. */
.app-glass {
  position: relative;
  height: 100%;
  border-radius: calc(55 * var(--u));
  overflow: hidden;
  background: var(--screen-bg);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .75);
}

.app-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  /* Innerhalb des Displays ist die Systemschrift richtig, nicht die Markenschrift. */
  font-family: -apple-system, 'SF Pro Text', 'Inter', system-ui, sans-serif;
  color: var(--screen-ink);
  font-size: calc(15 * var(--u));
  line-height: 1.3;
}

.app-statusbar {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(54 * var(--u));
  padding: calc(4 * var(--u)) calc(26 * var(--u)) 0;
}
.app-clock {
  font-size: calc(16 * var(--u));
  font-weight: 600;
  letter-spacing: calc(.2 * var(--u));
}
.app-icons { display: flex; align-items: center; gap: calc(5 * var(--u)); }
.app-ic { height: auto; }
.app-ic-cell { width: calc(18 * var(--u)); }
.app-ic-wifi { width: calc(17 * var(--u)); }
.app-ic-batt { width: calc(27 * var(--u)); }

/* Dynamic Island, kein Notch. */
.app-island {
  position: absolute;
  z-index: 3;
  top: calc(11 * var(--u));
  left: 50%;
  transform: translateX(-50%);
  width: calc(125 * var(--u));
  height: calc(36 * var(--u));
  border-radius: calc(18 * var(--u));
  background: var(--screen-island);
}

.app-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--u));
  /* Unten Sicherheitsabstand für den Home-Indikator. */
  padding: calc(6 * var(--u)) calc(18 * var(--u)) calc(34 * var(--u));
}

.app-titlebar { flex: 0 0 auto; }
.app-large-title {
  margin: 0;
  max-width: none;
  font-size: calc(30 * var(--u));
  font-weight: 700;
  letter-spacing: calc(-.6 * var(--u));
  line-height: 1.1;
}
.app-sub {
  margin: calc(3 * var(--u)) 0 0;
  max-width: none;
  font-size: calc(12 * var(--u));
  color: var(--screen-dim);
}

.app-tag {
  align-self: flex-start;
  max-width: none;
  margin: 0;
  padding: calc(3 * var(--u)) calc(8 * var(--u));
  border: 1px solid var(--screen-line);
  border-radius: calc(6 * var(--u));
  font-family: var(--font-mono);
  font-size: calc(9 * var(--u));
  letter-spacing: calc(.9 * var(--u));
  text-transform: uppercase;
  color: var(--screen-dim);
}

/* Gruppierte Karten, wie iOS sie setzt. */
.app-card {
  margin: 0;
  padding: calc(13 * var(--u)) calc(14 * var(--u));
  border-radius: calc(16 * var(--u));
  background: var(--screen-card);
}

.app-cap {
  margin: 0;
  max-width: none;
  font-size: calc(11 * var(--u));
  color: var(--screen-dim);
}
.app-big {
  margin: calc(1 * var(--u)) 0 0;
  max-width: none;
  font-size: calc(46 * var(--u));
  font-weight: 600;
  line-height: 1;
  letter-spacing: calc(-1.4 * var(--u));
  font-variant-numeric: tabular-nums;
}
.app-unit { font-size: calc(20 * var(--u)); font-weight: 500; color: var(--screen-dim); }
.app-note {
  margin: calc(7 * var(--u)) 0 0;
  max-width: none;
  font-size: calc(10.5 * var(--u));
  line-height: 1.35;
  color: var(--screen-dim);
}

.app-readouts { display: flex; flex-direction: column; }
.app-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: calc(10 * var(--u));
  padding-block: calc(6 * var(--u));
  border-bottom: 1px solid var(--screen-line);
}
.app-row:first-child { padding-top: 0; }
.app-row:last-child { padding-bottom: 0; border-bottom: 0; }
.app-row dt { font-size: calc(12 * var(--u)); color: var(--screen-dim); }
.app-row dd {
  margin: 0;
  font-size: calc(12.5 * var(--u));
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Die Startfreigabe fuellt den verbleibenden Platz auf dem Bildschirm. */
.app-ready { flex: 0 0 auto; }
.app-ready .app-cap { margin-bottom: calc(8 * var(--u)); }
.app-ready-list { margin: 0; display: flex; flex-direction: column; }
.app-ready-list .app-row:first-child { padding-top: 0; }

/* Die primaere Aktion der App — die einzige Flaeche, die Glut vollflaechig nutzt. */
.app-go {
  margin: auto 0 0;
  flex: 0 0 auto;
  max-width: none;
  padding: calc(13 * var(--u));
  border-radius: calc(14 * var(--u));
  background: var(--screen-alert);
  color: var(--on-screen-alert);
  font-size: calc(15 * var(--u));
  font-weight: 600;
  text-align: center;
  letter-spacing: calc(.2 * var(--u));
}

.app-home {
  position: absolute;
  bottom: calc(8 * var(--u));
  left: 50%;
  transform: translateX(-50%);
  width: calc(144 * var(--u));
  height: calc(5 * var(--u));
  border-radius: calc(2.5 * var(--u));
  background: var(--screen-ink);
  opacity: .32;
}

.app-caption {
  display: block;
  margin-top: var(--s-5);
  text-align: center;
  text-transform: none;
  letter-spacing: 0;
}

.app-text > h3:first-child { margin-top: 0; }
.app-subhead { margin-top: var(--s-6); }

.app-list { margin-top: var(--s-4); }
.app-list li {
  padding-block: var(--s-3);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.app-list li:last-child { border-bottom: 0; }

.app-text p { margin-top: var(--s-4); color: var(--muted); }

/* ── 06 Projekt & Team ─────────────────────────────────────────────────── */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: var(--s-6);
}

.team-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  margin: 0;
}

/* Bildflaeche steht vor dem Foto: feste Proportion, kein Nachruecken. */
.team-photo {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--raised);
}

.team-initials {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--t-h3);
  letter-spacing: .12em;
  color: var(--muted);
}

.team-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Einheitlicher Satz laut BRAND.md, Abschnitt 6: Graustufen mit Warmstich. */
  filter: grayscale(1) contrast(1.05) sepia(.16) saturate(1.1);
  transition: filter var(--slow);
  /* Fehlt die Aufnahme, bleibt der Alternativtext unsichtbar. */
  color: transparent;
  font-size: 0;
}

/* Fehlende Datei: Flaeche und Initialen statt Fehlersymbol. */
.team-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--raised);
}
.team-img::before {
  content: attr(data-initials);
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--t-h3);
  letter-spacing: .12em;
  color: var(--muted);
}

.team-card:hover .team-img,
.team-card:focus-within .team-img {
  filter: grayscale(.15) contrast(1.02) saturate(1.02);
}

.team-body {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.team-task {
  color: var(--muted);
  font-size: var(--t-small);
  max-width: none;
}

.team-foot {
  display: grid;
  gap: var(--s-6);
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  border-top: 1px solid var(--line);
}

@media (min-width: 48rem) {
  .team-foot {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

.team-sup h3 {
  margin-bottom: var(--s-4);
}

.team-sup-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.team-sup-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-2) var(--s-4);
}

.team-sup-row dt {
  flex: 0 0 auto;
  min-width: 13rem;
}

.team-sup-row dd {
  font-size: var(--t-small);
}

.team-meta {
  line-height: 1.8;
  max-width: 34ch;
}

/* ── 07 Partner ────────────────────────────────────────────────────────── */

.part-list {
  display: grid;
  gap: var(--s-6);
}

@media (min-width: 48rem) {
  .part-list {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-8);
  }
}

.part-item {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}

.part-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding-bottom: var(--s-1);
  border-bottom: 1px solid var(--line);
  transition: border-color var(--fast), color var(--fast);
}
.part-link:hover {
  border-bottom-color: var(--ember);
  color: var(--ember);
}

.part-arrow {
  flex: 0 0 auto;
  width: .62em;
  height: .62em;
  opacity: .7;
}

.part-note {
  color: var(--muted);
  font-size: var(--t-small);
}

/* ── 08 Kontakt ────────────────────────────────────────────────────────── */

.kon-layout {
  display: grid;
  gap: var(--s-8);
  align-items: start;
}

@media (min-width: 60rem) {
  .kon-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
    gap: var(--s-9);
  }
}

.kon-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

.kon-field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.kon-field label {
  font-family: var(--font-mono);
  font-size: var(--t-mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}

.kon-field input,
.kon-field textarea {
  width: 100%;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line-firm);
  border-radius: var(--r-md);
  background: var(--raised);
  color: var(--ink);
  font-size: var(--t-body);
  line-height: 1.5;
  transition: border-color var(--fast);
}

.kon-field textarea {
  resize: vertical;
  min-height: 9rem;
}

.kon-field input:hover,
.kon-field textarea:hover {
  border-color: var(--ink);
}

.kon-field input::placeholder,
.kon-field textarea::placeholder {
  color: var(--muted);
}

.kon-submit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4);
}

.kon-status {
  font-family: var(--font-mono);
  font-size: var(--t-mono);
  letter-spacing: .06em;
  color: var(--muted);
  margin: 0;
}

.kon-privacy {
  margin-top: var(--s-5);
  color: var(--muted);
  font-size: var(--t-small);
}

.kon-inline {
  border-bottom: 1px solid var(--line-firm);
  transition: border-color var(--fast), color var(--fast);
}
.kon-inline:hover {
  border-bottom-color: var(--ember);
  color: var(--ember);
}

.kon-side {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

.kon-address {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  font-style: normal;
}

.kon-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-2);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  font-size: var(--t-small);
  line-height: 1.7;
}

.kon-block a {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}

/* ── 09 Fussbereich ────────────────────────────────────────────────────── */

.foot {
  padding-block: var(--s-8) var(--s-6);
  border-top: 1px solid var(--line);
}

.foot-top {
  display: grid;
  gap: var(--s-8);
}

@media (min-width: 48rem) {
  .foot-top {
    grid-template-columns: minmax(14rem, 22rem) minmax(0, 1fr);
    gap: var(--s-9);
  }
}

.foot-brand {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.foot-claim {
  color: var(--muted);
  font-size: var(--t-small);
  max-width: 34ch;
}

.foot-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: var(--s-6);
}

.foot-col {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.foot-head {
  font-size: var(--t-mono);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .12em;
}

.foot-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.foot-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-small);
  color: var(--muted);
  transition: color var(--fast);
}
.foot-link:hover {
  color: var(--ink);
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3) var(--s-5);
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}

.foot-base p {
  margin: 0;
}

/* ── Bewegung ──────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .team-img {
    transition: none;
  }
}
