/* ============================================================
   KSMSKSMS — Design System
   „Retro-Futurism Space + Socialist Poster" · Cosmos-Palette
   Surface-Dualität: Creme = Dokumentenpapier · Navy = All
   Typo: Jost (Display, Futura-Erbe) · IBM Plex Sans (Body)
         · IBM Plex Mono (Telemetrie/Labels)
   ============================================================ */

:root {
  /* --- Cosmos-Palette (eingefroren 2026-07-06) --- */
  --bg-deep:  #0B0E1A;   /* Space-Navy Basis */
  --bg-mid:   #12172B;   /* erhöhte Flächen auf Navy */
  --bg-soft:  #1A2038;   /* Cards, Tabs auf Navy */

  --paper:    #EFE7D6;   /* Creme-Papier */
  --paper-2:  #E7DCC2;   /* tieferes Creme */

  --ink:      #16181F;   /* Headlines auf Papier */
  --ink-2:    #43453F;   /* Fließtext auf Papier */
  --muted:    #7A7A82;   /* Meta */

  --red:      #D9442C;   /* Akzent / CTA */
  --red-deep: #B83322;
  --cyan:     #7AD9C2;   /* System / Live (auf dunkel) */
  --cyan-ink: #1F7A62;   /* Cyan-Rolle als Text auf Papier (Kontrast) */
  --gold:     #C9A24A;   /* Planned / Sekundär (auf dunkel) */
  --gold-ink: #8A6D25;   /* Gold-Rolle als Text auf Papier (Kontrast) */

  /* --- Linien --- */
  --grid-line:        rgba(239, 231, 214, 0.08);
  --grid-line-strong: rgba(239, 231, 214, 0.22);
  --ink-line:         rgba(22, 24, 31, 0.14);
  --ink-line-strong:  rgba(22, 24, 31, 0.45);

  /* --- Typo --- */
  --font-display: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  --font-body:    "IBM Plex Sans", "Noto Sans", system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  /* Lede-Slot: kursives Plex statt Serife — editorialer Kontrast ohne Serifen */
  --font-serif:   "IBM Plex Sans", "Noto Sans", system-ui, sans-serif;

  /* --- System --- */
  --radius-sm: 2px;
  --radius:    6px;
  --shadow-hard: var(--ink);          /* pro Surface überschrieben */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 64px;                      /* Höhe der sticky Nav (Subnav dockt darunter an) */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

html, body { background: var(--bg-deep); color: var(--paper); }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }

::selection { background: var(--red); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
.surface-paper :focus-visible { outline-color: var(--red); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--red);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.skip-link:focus { left: 0; }

/* ============================================================
   SURFACES — Papier (Dokument) vs. Navy (All)
   ============================================================ */

.surface-cosmos {
  background: var(--bg-deep);
  color: var(--paper);
  position: relative;
  --shadow-hard: var(--paper);
}

.surface-paper {
  background: var(--paper);
  color: var(--ink);
  position: relative;
  --shadow-hard: var(--ink);
}

.surface-paper-2 {
  background: var(--paper-2);
  color: var(--ink);
  --shadow-hard: var(--ink);
}

/* Papierkorn — Dokument-Textur auf hellen Flächen */
.grain::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 0 0.06 0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.16;
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* Sternfeld — nur auf Navy */
.starfield {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 18%, var(--paper) 50%, transparent 50%),
    radial-gradient(1px 1px at 28% 73%, var(--paper) 50%, transparent 50%),
    radial-gradient(2px 2px at 45% 32%, var(--paper) 50%, transparent 50%),
    radial-gradient(1px 1px at 60% 12%, var(--paper) 50%, transparent 50%),
    radial-gradient(1px 1px at 70% 60%, var(--paper) 50%, transparent 50%),
    radial-gradient(1px 1px at 83% 25%, var(--paper) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 91% 80%, var(--gold) 50%, transparent 50%),
    radial-gradient(1px 1px at 7% 88%, var(--paper) 50%, transparent 50%),
    radial-gradient(1px 1px at 38% 88%, var(--paper) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 18% 42%, var(--red) 50%, transparent 50%);
  opacity: 0.7;
}
.starfield.dense {
  background-image:
    radial-gradient(1px 1px at 5% 10%, var(--paper) 50%, transparent 50%),
    radial-gradient(1px 1px at 15% 30%, var(--paper) 50%, transparent 50%),
    radial-gradient(1px 1px at 25% 70%, var(--paper) 50%, transparent 50%),
    radial-gradient(1px 1px at 35% 20%, var(--paper) 50%, transparent 50%),
    radial-gradient(1px 1px at 45% 90%, var(--paper) 50%, transparent 50%),
    radial-gradient(1px 1px at 55% 50%, var(--paper) 50%, transparent 50%),
    radial-gradient(1px 1px at 65% 15%, var(--paper) 50%, transparent 50%),
    radial-gradient(1px 1px at 75% 65%, var(--paper) 50%, transparent 50%),
    radial-gradient(1px 1px at 85% 35%, var(--paper) 50%, transparent 50%),
    radial-gradient(1px 1px at 95% 85%, var(--paper) 50%, transparent 50%),
    radial-gradient(2px 2px at 22% 55%, var(--gold) 50%, transparent 50%),
    radial-gradient(2px 2px at 78% 22%, var(--red) 50%, transparent 50%);
  opacity: 0.85;
}
/* zweite Sternschicht mit langsamem Puls */
.starfield.dense::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 45%, var(--paper) 50%, transparent 50%),
    radial-gradient(1px 1px at 50% 25%, var(--paper) 50%, transparent 50%),
    radial-gradient(1px 1px at 68% 82%, var(--paper) 50%, transparent 50%),
    radial-gradient(1px 1px at 88% 55%, var(--paper) 50%, transparent 50%);
  animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle {
  from { opacity: 0.15; }
  to   { opacity: 0.9; }
}
@media (prefers-reduced-motion: reduce) {
  .starfield.dense::after { animation: none; }
}

/* ============================================================
   TYPE SCALE
   ============================================================ */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.75;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.display-xl {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 4.8vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.015em;
}

.display-lg {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 4.4vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.display-md {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.005em;
}

.display-sm {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.2;
}

/* Lede — kursiv, leicht, editorialer Kontrapunkt zum geometrischen Display */
.serif-lede {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(19px, 1.6vw, 25px);
  line-height: 1.5;
  letter-spacing: 0.002em;
  font-style: italic;
}
.serif-lede strong { font-weight: 500; }

/* kursiver Akzent innerhalb von Headlines */
.accent-i {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0;
}

.body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.mono-xs {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================================
   LAYOUT
   ============================================================ */

/* Einheitliche Breite = Header-Raster (1480). Schmalere Container nur
   für gezielte Hervorhebung oder inhaltsarme Sektionen. */
.container { max-width: 1480px; margin: 0 auto; padding: 0 32px; position: relative; }
.container-narrow { max-width: 1080px; margin: 0 auto; padding: 0 32px; position: relative; }

.section { padding: 120px 0; position: relative; }
.section-sm { padding: 72px 0; position: relative; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 56px;
  gap: 32px;
  flex-wrap: wrap;
}
.section-head h2 { max-width: 760px; }
.section-head .eyebrow { margin-bottom: 16px; }
/* Rechte Spalte = Randnotiz: Linie oben verankert sie am Raster,
   statt frei neben der Headline zu hängen */
.section-head > p.body {
  max-width: 380px;
  opacity: 0.78;
  font-size: 15px;
  border-top: 1px solid var(--grid-line-strong);
  padding-top: 16px;
}
.surface-paper .section-head > p.body,
.surface-paper-2 .section-head > p.body {
  border-top-color: var(--ink-line-strong);
}
@media (max-width: 720px) {
  .section-head > p.body { border-top: 0; padding-top: 0; }
}

@media (max-width: 720px) {
  .container, .container-wide { padding: 0 20px; }
  .section { padding: 76px 0; }
  .section-head { margin-bottom: 36px; }
}

/* ============================================================
   KOMPONENTEN
   ============================================================ */

/* Frame — Karte mit Ecken-Ticks (technische Zeichnung) */
.frame {
  position: relative;
  border: 1px solid currentColor;
  padding: 28px;
}
.frame::before, .frame::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
}
.frame::before { top: -5px; left: -5px; border-right: 0; border-bottom: 0; background: var(--bg-deep); }
.frame::after { bottom: -5px; right: -5px; border-left: 0; border-top: 0; background: var(--bg-deep); }
.frame.on-paper::before, .frame.on-paper::after { background: var(--paper); }

/* Stempel — rundes Monogramm-Siegel */
.stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px; height: 84px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  position: relative;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
}

/* Pill */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* Fixe Breite: „Kontakt" vs. „Demo buchen" — Nav springt sonst
     horizontal beim Seitenwechsel */
  min-width: 136px;
  padding: 6px 12px;
  border: 1px solid currentColor;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); flex-shrink: 0; }
.pill.warn .dot { background: var(--gold); }
.pill.red .dot { background: var(--red); }

/* Button — Plakatdruck: harte Kante, harter Schatten */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  background: var(--red);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1.5px solid var(--red);
  position: relative;
  transition: transform 130ms var(--ease-out), box-shadow 130ms var(--ease-out);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--shadow-hard); }
.btn:active { transform: translate(0, 0); box-shadow: 1px 1px 0 var(--shadow-hard); }
/* Desktop: einheitliche CTA-Breite sitewide (lange Labels wachsen weiter) */
@media (min-width: 721px) {
  .btn { min-width: 240px; justify-content: center; }
}
/* Mobile: CTAs volle Breite sitewide; Mini-CTAs (Karten) bleiben kompakt */
@media (max-width: 720px) {
  .btn { width: 100%; justify-content: center; }
  .btn-sm { width: auto; }
}
.btn .arrow { transition: transform 200ms var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }
.btn:hover .arrow.arrow-down { transform: translateY(3px); }

.btn-ghost {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}
.btn-ink {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  --shadow-hard: var(--red);
}

/* Divider */
.hr-line { height: 1px; background: currentColor; opacity: 0.25; margin: 32px 0; }
.hr-dashed {
  height: 1px;
  background-image: linear-gradient(90deg, currentColor 50%, transparent 50%);
  background-size: 8px 1px;
  opacity: 0.4;
}

/* Index-Label 01 / 02 */
.idx {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  opacity: 0.6;
}

/* Status-Tag */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
}
.status.done {
  color: var(--cyan-ink);
  background: rgba(122, 217, 194, 0.14);
  border: 1px solid rgba(31, 122, 98, 0.35);
}
.surface-cosmos .status.done,
.dp-cell.is-live .status.done {
  color: var(--cyan);
  background: rgba(122, 217, 194, 0.12);
  border-color: rgba(122, 217, 194, 0.35);
}
.status.planned {
  color: var(--gold-ink);
  background: rgba(201, 162, 74, 0.12);
  border: 1px solid rgba(138, 109, 37, 0.35);
}
.surface-cosmos .status.planned { color: var(--gold); border-color: rgba(201, 162, 74, 0.35); }
.status.live {
  color: var(--red);
  background: rgba(217, 68, 44, 0.1);
  border: 1px solid rgba(217, 68, 44, 0.3);
}
.status .pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 currentColor; }
  70% { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .status .pulse { animation: none; }
}

/* Ticker */
.ticker {
  background: var(--ink);
  color: var(--paper);
  padding: 14px 0;
  overflow: hidden;
  border-top: 1px solid rgba(239, 231, 214, 0.15);
  border-bottom: 1px solid rgba(239, 231, 214, 0.15);
  position: relative;
}
.ticker-track {
  display: inline-flex;
  gap: 60px;
  white-space: nowrap;
  animation: ticker-scroll 50s linear infinite;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ticker-track > span { display: inline-flex; gap: 60px; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}
.ticker-item { display: inline-flex; align-items: center; gap: 16px; }
.ticker-item .blob { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }
.ticker-item.red .blob { background: var(--red); }
.ticker-item.gold .blob { background: var(--gold); }

/* Window — minimalistischer Browser-/Fenster-Rahmen für Screenshots
   (gleiche Sprache wie die Recon-Konsole: drei Dots + Mono-Titel) */
.window {
  border: 1px solid var(--ink-line-strong);
  background: var(--paper);
  overflow: hidden;
  border-radius: 8px;
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--ink-line);
  background: var(--paper-2);
}
.window-bar .w-dots { display: flex; gap: 6px; }
.window-bar .w-dot { width: 9px; height: 9px; border-radius: 50%; }
.w-dot.r { background: var(--red); }
.w-dot.g { background: var(--gold); }
.w-dot.c { background: var(--cyan); }
.window-bar .w-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.6;
}
.window > img { display: block; width: 100%; height: auto; }
.surface-cosmos .window { border-color: var(--grid-line-strong); background: var(--bg-deep); }
.surface-cosmos .window-bar { background: var(--bg-mid); border-bottom-color: var(--grid-line-strong); }

/* Gate-Strip — schmaler Hinweis-/Teaser-Streifen */
.gate-strip {
  margin-top: 32px;
  padding: 20px 24px;
  border: 1px dashed var(--ink-line-strong);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}
.surface-cosmos .gate-strip { border-color: var(--grid-line-strong); }
.gate-strip .gate-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--cyan-ink);
}
.surface-cosmos .gate-strip .gate-tag { color: var(--cyan); }
.gate-strip .display-sm { margin-bottom: 4px; }
.gate-strip .mono { font-size: 12px; opacity: 0.75; }
@media (max-width: 720px) {
  .gate-strip { grid-template-columns: 1fr; gap: 12px; }
}

/* Chip — Tech-Tags, Skills */
.chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid currentColor;
  opacity: 0.75;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* Instrumenten-Leiste — Kennwerte (Hero-Stats) */
.hero-stats {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--grid-line-strong);
}
.surface-paper .hero-stats { border-top-color: var(--ink-line-strong); }
.hero-stat {
  padding: 20px 24px 4px 0;
  border-right: 1px solid var(--grid-line);
}
.surface-paper .hero-stat { border-right-color: var(--ink-line); }
.hero-stat + .hero-stat { padding-left: 24px; }
/* 3er-Raster: erster Stat jeder Reihe ohne Einzug, letzter ohne Trennlinie
   (statt first/last-child — es gibt inzwischen zwei Reihen) */
.hero-stat:nth-child(3n + 1) { padding-left: 0; }
.hero-stat:nth-child(3n) { border-right: 0; }
.hero-stat:last-child { border-right: 0; }
.hero-stat .hs-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.hero-stat .hs-value.red { color: var(--red); }
.hero-stat .hs-value.cyan { color: var(--cyan); }
.hero-stat .hs-value.gold { color: var(--gold); }
.hero-stat .hs-value small {
  display: block;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.85;
  margin-top: 2px;
  letter-spacing: 0;
}
.hero-stat .mono-xs { opacity: 0.6; margin-top: 8px; }
@media (max-width: 720px) {
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stat {
    border-right: 0;
    border-bottom: 1px solid var(--grid-line);
    padding: 14px 0 12px;
  }
  .hero-stat + .hero-stat { padding-left: 0; }
  .hero-stat:last-child { border-bottom: 0; }
  .hero-stat .hs-value { font-size: 26px; }
}

/* Spec-Table — Datenblatt */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 13px;
}
.spec-table tr { border-bottom: 1px solid var(--ink-line); }
.spec-table tr:last-child { border-bottom: 0; }
.spec-table td { padding: 12px 0; vertical-align: top; }
.spec-table td:first-child {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  opacity: 0.7;
  width: 200px;
}

/* ============================================================
   NAV  (PARTIAL: nav)
   ============================================================ */

/* Initial (am Seitenanfang) transparent, ab Scroll geblurte Fläche */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 250ms ease, border-color 250ms ease, backdrop-filter 250ms ease;
}
.nav.is-scrolled {
  background: rgba(11, 14, 26, 0.69);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--grid-line-strong);
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  /* exakt --nav-h hoch: sonst klafft zwischen Nav-Ende und Subnav (top: 64px)
     ein durchsichtiger Spalt in der Blur-Fläche */
  min-height: var(--nav-h);
  padding: 10px 32px;
  max-width: 1480px;
  margin: 0 auto;
}
.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav-links a { opacity: 0.7; transition: opacity 150ms, color 150ms; padding: 6px 0; }
.nav-links a:hover { opacity: 1; }
.nav-links a.active { opacity: 1; color: var(--red); }
.nav .pill { transition: background 150ms, color 150ms; }
.nav .pill:hover { background: var(--paper); color: var(--ink); }

/* Wordmark — ksms·ksms */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 24px;
  line-height: 1;
}
.wordmark .wm-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--red);
  align-self: center;
  margin: 0 2px;
}
.wordmark-lg { font-size: 32px; }

/* Subnav — Seiten-Anker (Flight-Manual-Register), dockt sticky unter der Nav an.
   Transparenz-Verhalten identisch zur Haupt-Nav. */
.subnav {
  position: sticky;
  /* 1px unter die Nav gezogen: die Trennlinie (Nav-Border) liegt damit auf
     der geblurten Subnav-Fläche statt als durchsichtiger Spalt dazwischen */
  top: calc(var(--nav-h) - 1px);
  z-index: 45;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 250ms ease, border-color 250ms ease, backdrop-filter 250ms ease;
}
.subnav.is-scrolled {
  background: rgba(11, 14, 26, 0.69);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--grid-line-strong);
}
.subnav-inner {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: center;
  padding: 10px 32px;
  max-width: 1480px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav a {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
  white-space: nowrap;
  transition: opacity 150ms, color 150ms;
  padding: 4px 0;
}
.subnav a:hover { opacity: 0.9; }
.subnav a.active { opacity: 1; color: var(--cyan); }
/* Mobile: kein Seiten-Register */
@media (max-width: 720px) {
  .subnav { display: none; }
}

/* Mobile Menu */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--paper);
  transition: transform 200ms var(--ease-out), opacity 150ms;
}
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg-deep);
  display: none;
  flex-direction: column;
  padding: 96px 32px 48px;
}
.menu-overlay.is-open { display: flex; }
.menu-overlay .starfield { opacity: 0.5; }
.menu-links { list-style: none; position: relative; }
.menu-links a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 8vw, 44px);
  padding: 10px 0;
  border-bottom: 1px solid var(--grid-line);
}
.menu-links a .idx { font-size: 11px; }
.menu-links a.active { color: var(--red); }
.menu-close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px;
}
body.menu-open { overflow: hidden; }

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

/* ============================================================
   FOOTER  (PARTIAL: footer)
   ============================================================ */

.footer {
  background: var(--bg-deep);
  color: var(--paper);
  border-top: 1px solid var(--grid-line-strong);
  padding: 72px 0 32px;
  position: relative;
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 48px;
  margin-bottom: 56px;
  position: relative;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 4px 0;
}
.footer-col li a { opacity: 0.8; transition: opacity 150ms, color 150ms; }
.footer-col li a:hover { opacity: 1; color: var(--red); }
/* Recon = Produktbereich, abgesetzt von der Company-Navigation */
.footer-product {
  border: 1px solid rgba(217, 68, 44, 0.4);
  background: rgba(217, 68, 44, 0.06);
  padding: 16px 18px 12px;
  margin: -16px 0 0 -18px;
}
.footer-product h4 { color: var(--red); opacity: 0.9; }
.footer-logo {
  width: 44px;
  height: auto;
  opacity: 0.85;
  margin-bottom: 4px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--grid-line-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  opacity: 0.55;
  position: relative;
}

/* ============================================================
   SCROLL-REVEAL — dezent, einmalig
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 550ms var(--ease-out), transform 550ms var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   CTA-CARD + FORMULAR — shared (Recon-CTA, Kontakt)
   ============================================================ */

.cta-card {
  border: 1.5px solid var(--paper);
  padding: 48px;
  position: relative;
  background: var(--bg-deep);
}
.cta-card::before, .cta-card::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--red);
}
.cta-card::before { top: -12px; left: -12px; border-right: 0; border-bottom: 0; background: var(--bg-deep); }
.cta-card::after { bottom: -12px; right: -12px; border-left: 0; border-top: 0; background: var(--bg-deep); }
.cta-card .form-tag { opacity: 0.6; margin-bottom: 24px; }
.cta-fields { display: flex; flex-direction: column; gap: 18px; }
.cta-fields label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
}
.cta-fields input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--paper);
  color: var(--paper);
  padding: 8px 0;
  font-family: var(--font-display);
  font-size: 18px;
  margin-top: 4px;
  border-radius: 0;
}
.cta-fields input:focus { outline: none; border-bottom-color: var(--cyan); }
.cta-fields input::placeholder { color: var(--paper); opacity: 0.35; }
.cta-fields textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--paper);
  color: var(--paper);
  padding: 8px 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  margin-top: 4px;
  border-radius: 0;
  resize: vertical;
  min-height: 96px;
}
.cta-fields textarea:focus { outline: none; border-bottom-color: var(--cyan); }
.cta-fields textarea::placeholder { color: var(--paper); opacity: 0.35; }
.cta-fields .btn { margin-top: 12px; justify-content: center; }
.cta-note { opacity: 0.5; margin-top: 8px; }
.form-success {
  display: none;
  padding: 14px 16px;
  border: 1px solid var(--cyan);
  background: rgba(122, 217, 194, 0.08);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.6;
}
form.is-sent .form-success { display: block; }
form.is-sent .cta-fields { display: none; }
@media (max-width: 640px) { .cta-card { padding: 32px 24px; } }

/* ============================================================
   HERO-SCHLEIER — beide via site.js injiziert (nur Motiv-Heroes)
   ============================================================ */

/* Statischer Top-Schleier: subtiler dunkler Blur-Verlauf von oben,
   damit die transparente Nav auch auf hellen Motiven lesbar bleibt.
   Auf Mobile übernimmt das der vertikale Hero-Schleier. */
.hero-topveil {
  position: absolute;
  inset: 0 0 auto 0;
  height: 180px;
  z-index: 1;
  pointer-events: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: linear-gradient(180deg, rgba(11, 14, 26, 0.34), rgba(11, 14, 26, 0));
  mask-image: linear-gradient(180deg, black 0%, rgba(0, 0, 0, 0.45) 50%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, black 0%, rgba(0, 0, 0, 0.45) 50%, transparent 100%);
}
@media (max-width: 900px) {
  .hero-topveil { display: none; }
}

/* Scroll-Schleier: legt sich beim Runterscrollen ganz leicht schräg über
   die obere Hero-Hälfte — Blur-Stärke + Deckung laufen mit --hero-scroll
   (0..1, gesetzt von site.js; bleibt 0 bei prefers-reduced-motion). */
.hero-scrollveil {
  position: absolute;
  inset: 0 0 42% 0;
  z-index: 1;
  pointer-events: none;
  opacity: var(--hero-scroll, 0);
  backdrop-filter: blur(calc(var(--hero-scroll, 0) * 8px));
  -webkit-backdrop-filter: blur(calc(var(--hero-scroll, 0) * 8px));
  background: linear-gradient(171deg, rgba(11, 14, 26, 0.30) 0%, rgba(11, 14, 26, 0) 72%);
  mask-image: linear-gradient(171deg, black 26%, transparent 94%);
  -webkit-mask-image: linear-gradient(171deg, black 26%, transparent 94%);
}

/* ============================================================
   PAGE TRANSITIONS — natives View-Transitions-API (wie mk-ghost-theme)
   Progressive Enhancement: Browser ohne Support ignorieren das komplett.
   ============================================================ */

@view-transition {
  navigation: auto;
}
/* Crossfade ~666ms wie im MK-Theme */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 666ms;
  animation-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);
}
::view-transition-image-pair(root) {
  will-change: opacity;
}
@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

/* ============================================================
   HEAD-OBJECT — Syd-Mead-Freisteller neben der Randnotiz
   ============================================================ */

/* Mit Objektgruppe: nicht umbrechen — Gruppe bleibt rechts neben der
   Headline und schrumpft bei Platzmangel, statt unter den Titel zu rutschen */
.section-head:has(.head-note-group) { flex-wrap: nowrap; }
.section-head:has(.head-note-group) > div:first-child { flex: 0 1 auto; min-width: 0; }
.head-note-group {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 36px;
  flex: 0 1 auto;
  min-width: 0;
}
.head-note-group > p.body {
  max-width: 380px;
  min-width: 220px;
  flex: 0 1 auto;
  opacity: 0.78;
  font-size: 15px;
  border-top: 1px solid var(--grid-line-strong);
  padding-top: 16px;
}
.surface-paper .head-note-group > p.body,
.surface-paper-2 .head-note-group > p.body {
  border-top-color: var(--ink-line-strong);
}
.head-object {
  margin: 0;
  flex: 0 1 auto;
  width: clamp(240px, 24vw, 380px);
  min-width: 170px;
}
.head-object img {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 1000px) {
  /* Unterhalb: wieder umbrechen lassen, sonst wird es neben der Headline zu eng */
  .section-head:has(.head-note-group) { flex-wrap: wrap; }
}
@media (max-width: 720px) {
  /* Mobile: Objekt über der Notiz */
  .head-note-group { flex-direction: column; align-items: flex-start; gap: 20px; }
  .head-note-group > p.body { border-top: 0; padding-top: 0; }
  .head-object { width: 220px; }
}

/* ============================================================
   CTA-/SECTION-MOTIF — shared (Unterseiten-CTA-Baender, Recon-Kontakt)
   ============================================================ */

/* ---- CTA-Band mit Seiten-Motiv (Bild per Body-Klasse), wie Recon-Teaser:
   Motiv rechts auf ::after (Scroll-Parallax), Verlauf links auf ::before ---- */
.cta-motif {
  position: relative;
  overflow: hidden;
  background: var(--bg-deep);
}
.cta-motif::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--cta-img) right center / cover no-repeat, var(--bg-deep);
  transform: scale(calc(1 + 0.04 * var(--bg-scroll, 0.5))) translate3d(0, calc((var(--bg-scroll, 0.5) - 0.5) * 20px), 0);
  transform-origin: 70% center;
  will-change: transform;
}
.cta-motif::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, var(--bg-deep) 0%, rgba(11, 14, 26, 0.9) 30%, rgba(11, 14, 26, 0.55) 60%, rgba(11, 14, 26, 0.3) 100%);
}
.cta-motif > .container { position: relative; z-index: 2; }
.cta-motif .starfield { display: none; }
@media (min-width: 901px) {
  .cta-motif { padding: 144px 0; }
}
/* Mobile: horizontaler Pan statt Zoom (Motiv-Ebene 150% breit) */
@media (max-width: 900px) {
  .cta-motif::after {
    inset: 0 -25%;
    transform: translate3d(calc((var(--bg-scroll, 0.5) - 0.5) * 20%), 0, 0);
  }
}
