/* =========================================================
   Institut für Sicherheit und Verteidigung
   Design System
   ========================================================= */

:root {
  /* Flächen — heller, amtlich nüchterner Aufbau */
  --bg:        #FFFFFF;
  --bg-1:      #F4F6F6;
  --bg-2:      #EBEEEF;
  --line:      #D3D9DA;
  --line-soft: #E6EAEB;

  /* Text */
  --fg:        #111314;
  --fg-mid:    #4A5457;
  --fg-dim:    #6C7679;

  /* Akzent: dunkles Signalgrün, kontraststark auf Weiß */
  --acc:       #0F7A4C;
  --acc-deep:  #0A5537;
  --acc-soft:  #E7F3ED;
  --acc-glow:  rgba(15, 122, 76, .14);

  /* Hinweisfarben */
  --warn:      #9A5B00;
  --threat:    #B3261E;

  /* Typo */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Maße */
  --wrap: 1180px;
  --gut: clamp(20px, 5vw, 48px);
  --r: 3px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, canvas { display: block; max-width: 100%; }

a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--acc-soft); color: var(--fg); }

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

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--acc); color: #fff;
  padding: 10px 18px; z-index: 200; font-weight: 600;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- Typografie ---------- */

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.18;
  letter-spacing: -.015em;
  font-weight: 500;      /* nüchtern statt werblich */
  color: var(--fg);
}

h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); letter-spacing: -.022em; }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.35rem); letter-spacing: -.01em; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: clamp(1.06rem, 1.9vw, 1.28rem);
  line-height: 1.6;
  color: var(--fg-mid);
}

.muted { color: var(--fg-mid); }

strong { color: var(--fg); font-weight: 600; }

/* Mono-Label mit Kerbe – das wiederkehrende Struktur-Element */
.tag {
  display: inline-flex;
  align-items: flex-start;   /* Strich bleibt auf Höhe der ersten Zeile */
  gap: .6em;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--acc);
  margin-bottom: 1.1rem;
}
.tag::before {
  content: "";
  width: 22px; height: 1px;
  margin-top: .62em;
  flex-shrink: 0;
  background: var(--acc);
  opacity: .6;
}

.tag--warn { color: var(--warn); }
.tag--warn::before { background: var(--warn); }

/* ---------- Kopfzeile ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.top__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
}

.brand {
  display: flex;
  align-items: stretch;     /* Flagge nimmt die Höhe des Textblocks an */
  gap: 11px;
  color: var(--fg);
  text-decoration: none;
  min-width: 0;          /* erlaubt das Schrumpfen im Flex-Container */
}
.brand:hover { text-decoration: none; }

/* Nationalfarben als Balken, exakt so hoch wie der Text daneben */
.brand__mark {
  width: 9px;
  flex-shrink: 0;
  align-self: stretch;
  background: linear-gradient(to bottom,
    #000000 0 33.34%,
    #DD0000 33.34% 66.67%,
    #FFCE00 66.67% 100%);
}

.brand__txt { display: flex; flex-direction: column; justify-content: center; line-height: 1.26; min-width: 0; }
.brand__name { font-weight: 500; font-size: .82rem; letter-spacing: -.004em; line-height: 1.26; }
.brand__sub {
  font-family: var(--sans);
  font-size: .62rem;
  letter-spacing: .02em;
  color: var(--fg-dim);
  margin-top: 2px;
}

.nav { display: flex; align-items: center; gap: 6px; }

.nav a {
  color: var(--fg-mid);
  font-size: .92rem;
  padding: 9px 14px;
  border-radius: var(--r);
  text-decoration: none;
  transition: color .16s, background .16s;
}
.nav a:hover { color: var(--fg); background: var(--bg-2); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--acc); }

.nav__cta {
  margin-left: 8px;
  border: 1px solid var(--line);
  color: var(--fg) !important;
}
.nav__cta:hover { border-color: var(--acc); color: var(--acc) !important; }

.burger {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--fg);
  padding: 9px 11px;
  cursor: pointer;
  line-height: 0;
}

@media (max-width: 860px) {
  .burger { display: block; flex-shrink: 0; }
  .brand__name { font-size: .78rem; }
  .brand__sub { font-size: .58rem; }
  .top__in { gap: 14px; }
  .nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px var(--gut) 20px;
    background: var(--bg-1);
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 12px; font-size: 1rem; }
  .nav__cta { margin-left: 0; margin-top: 8px; text-align: center; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  font-family: var(--sans);
  font-size: .95rem;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: var(--r);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .14s, background .16s, border-color .16s, color .16s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--acc);
  color: #fff;
}
.btn--primary:hover { background: #45EE9B; }

.btn--ghost {
  border-color: var(--line);
  color: var(--fg);
  background: transparent;
}
.btn--ghost:hover { border-color: var(--acc); color: var(--acc); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2rem;
}

/* ---------- Sektionen ---------- */

.sec { padding: clamp(64px, 9vw, 116px) 0; position: relative; }
.sec--tight { padding: clamp(48px, 6vw, 72px) 0; }
.sec--alt {
  background: var(--bg-1);
  border-block: 1px solid var(--line-soft);
  position: relative;
  overflow: hidden;
}

/* Höhenlinien als Untergrund — bewusst an der Wahrnehmungsschwelle,
   sie soll Tiefe geben und nicht auffallen. */
.sec--alt::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/muster-topo.jpg") repeat;
  background-size: 560px;
  opacity: .13;
  filter: invert(1) grayscale(1) contrast(.55);   /* helle Fläche, feine dunkle Linien */
  pointer-events: none;
  z-index: 0;
}
.sec--alt > .wrap { position: relative; z-index: 1; }

.sec__head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }

.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* ---------- Karten ---------- */

.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 30px 28px;
  position: relative;
  transition: border-color .2s, transform .2s, background .2s;
}
.card:hover { border-color: #2A3B40; transform: translateY(-2px); }

.card__ico {
  width: 40px; height: 40px;
  margin-bottom: 18px;
  color: var(--acc);
}
.card h3 { margin-bottom: .45em; }
.card p { color: var(--fg-mid); font-size: .97rem; margin: 0; }

.card__no {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .16em;
  color: var(--acc);
  display: block;
  margin-bottom: 14px;
}

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

.hero {
  position: relative;
  min-height: clamp(600px, 88vh, 900px);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Vignette + Verlauf, damit der Text über der 3D-Szene lesbar bleibt */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(100deg, var(--bg) 8%, rgba(255,255,255,.95) 44%, rgba(255,255,255,.55) 64%, rgba(255,255,255,.15) 80%, rgba(255,255,255,.45) 100%),
    linear-gradient(to top, var(--bg) 1%, transparent 30%);
}

.hero__in { position: relative; z-index: 2; padding-block: 90px; width: 100%; }

.hero__txt { max-width: 660px; }

.hero h1 { margin-bottom: .55em; }
.hero h1 em {
  font-style: normal;
  color: var(--acc);
}

.hero .lead { max-width: 560px; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  max-width: 660px;
}
.hero__meta span { display: inline-flex; align-items: center; gap: .6em; }
.hero__meta span::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--acc);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- 3D-Abwehrszene (über die volle Seitenbreite) ---------- */

.stage {
  position: relative;
  width: 100%;
  background: var(--bg);
  overflow: hidden;
}

.stage__canvas {
  width: 100%;
  height: clamp(420px, 68vh, 760px);
  display: block;
}

/* Weiche Kanten oben und unten, damit die Szene in die Seite übergeht */
.stage::before,
.stage::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 90px;
  pointer-events: none;
  z-index: 2;
}
.stage::before { top: 0;    background: linear-gradient(to bottom, var(--bg) 2%, transparent 100%); }
.stage::after  { bottom: 0; background: linear-gradient(to top,    var(--bg) 2%, transparent 100%); }

.stage__hud {
  position: absolute;
  top: 30px;
  left: max(var(--gut), calc((100% - var(--wrap)) / 2 + var(--gut)));
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--acc);
  pointer-events: none;
  z-index: 3;
}
.stage__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--acc);
  animation: ping 2s ease-out infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(15,122,76,.45); }
  70%  { box-shadow: 0 0 0 11px rgba(15,122,76,0); }
  100% { box-shadow: 0 0 0 0 rgba(15,122,76,0); }
}

.stage__stats {
  position: absolute;
  bottom: 30px;
  left: max(var(--gut), calc((100% - var(--wrap)) / 2 + var(--gut)));
  right: max(var(--gut), calc((100% - var(--wrap)) / 2 + var(--gut)));
  display: flex;
  gap: 30px;
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-dim);
  pointer-events: none;
  z-index: 3;
}
.stage__stats b {
  color: var(--acc);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stage__stats .is-threat { color: var(--threat); }
.stage__stats .is-threat b { color: var(--threat); }

.stage__toggle {
  position: absolute;
  top: 26px;
  right: max(var(--gut), calc((100% - var(--wrap)) / 2 + var(--gut)));
  background: rgba(255,255,255,.82);
  border: 1px solid var(--line);
  color: var(--fg-mid);
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: var(--r);
  cursor: pointer;
  z-index: 3;
  transition: color .16s, border-color .16s;
}
.stage__toggle:hover { color: var(--acc); border-color: var(--acc); }

.stage__fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  color: var(--fg-mid);
  font-size: .95rem;
  z-index: 4;
}
.stage.is-fallback .stage__fallback { display: flex; }
.stage.is-fallback .stage__hud,
.stage.is-fallback .stage__stats,
.stage.is-fallback .stage__toggle { display: none; }

@media (max-width: 700px) {
  .stage__stats { gap: 16px; font-size: .58rem; justify-content: space-between; }
  .stage__canvas { height: clamp(360px, 56vh, 460px); }
}

/* ---------- Ablauf / Schritte ---------- */

.steps {
  display: grid;
  gap: 0;
  counter-reset: s;
  border-top: 1px solid var(--line);
}

.step {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 28px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.step__no {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .14em;
  color: var(--acc);
  padding-top: .35em;
}

.step h3 { margin-bottom: .35em; }
.step p { color: var(--fg-mid); margin: 0; max-width: 62ch; }

@media (max-width: 640px) {
  .step { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- Kennzahlen / Bedrohungsbild ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.fact { background: var(--bg-1); padding: 30px 26px; }

.fact__val {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -.03em;
  color: var(--acc);
  line-height: 1.1;
  display: block;
  margin-bottom: .3em;
  font-variant-numeric: tabular-nums;
}
.fact p { font-size: .92rem; color: var(--fg-mid); margin: 0; }
.fact cite {
  display: block;
  margin-top: .9em;
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  font-style: normal;
}

/* Sektion mit Fotohintergrund: das Bild bleibt weit hinten, der Text führt */
.sec--foto {
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
.sec--foto::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/sektoren.jpg") center / cover no-repeat;
  opacity: .9;
  filter: saturate(.9);
  z-index: 0;
}
.sec--foto::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    /* oben genug Weiß für die Überschrift, zur Mitte hin wird das Bild frei */
    linear-gradient(to bottom, var(--bg) 0%, rgba(255,255,255,.8) 14%, rgba(255,255,255,.24) 44%, rgba(255,255,255,.34) 76%, var(--bg) 100%);
}
.sec--foto > .wrap { position: relative; z-index: 2; }

/* ---------- Sektoren-Liste ---------- */

.sectors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: rgba(211, 217, 218, .9);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.sector {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(3px);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background .2s;
}
.sector:hover { background: #fff; }

.sector svg { width: 26px; height: 26px; color: var(--acc); }
.sector b { font-size: .97rem; font-weight: 600; }
.sector span { font-size: .86rem; color: var(--fg-dim); line-height: 1.5; }

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

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg-1);
  padding: 32px 30px;
}

.panel h3 { color: var(--acc); font-family: var(--mono); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 1.2em; }

/* E-Mail als eigener, klickbarer Block — sie ist der Hauptkontaktweg
   und zu lang für eine zweispaltige Zeile. */
.panel__mail {
  display: block;
  margin-bottom: 22px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--acc);
  font-family: var(--mono);
  font-size: .82rem;
  line-height: 1.5;
  word-break: normal;      /* Umbruch nur an den gesetzten <wbr>-Stellen */
  overflow-wrap: break-word;
  text-decoration: none;
  transition: border-color .16s, background .16s;
}
.panel__mail:hover {
  border-color: var(--acc);
  background: var(--bg-2);
  text-decoration: none;
}

.deflist { margin: 0; }
.deflist div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: .93rem;
}
.deflist div:last-child { border-bottom: 0; padding-bottom: 0; }
.deflist dt { color: var(--fg-mid); margin: 0; }
.deflist dd { margin: 0; text-align: right; font-family: var(--mono); font-size: .85rem; color: var(--fg); }

/* ---------- Hinweis-Box ---------- */

.note {
  border: 1px solid var(--line);
  border-left: 2px solid var(--acc);
  background: var(--bg-1);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 22px 26px;
  font-size: .93rem;
  color: var(--fg-mid);
}
.note strong { display: block; margin-bottom: .3em; color: var(--fg); }

/* ---------- CTA-Band ---------- */

.band {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    radial-gradient(680px 220px at 12% 0%, rgba(15,122,76,.07), transparent 70%),
    var(--bg-1);
  padding: clamp(38px, 6vw, 62px);
  text-align: center;
}

/* Radarskala hinter dem Aufruf — nur als Andeutung von Tiefe */
.band::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: min(150%, 900px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: url("../img/muster-radar.jpg") center / contain no-repeat;
  opacity: .1;
  filter: invert(1) grayscale(1) contrast(.6);
  pointer-events: none;
}
.band > * { position: relative; z-index: 1; }
.band h2 { max-width: 20ch; margin-inline: auto; }
.band p { max-width: 56ch; margin-inline: auto; color: var(--fg-mid); }
.band .btn-row { justify-content: center; }

/* ---------- Formular ---------- */

.form { display: grid; gap: 20px; }

.field { display: flex; flex-direction: column; gap: 8px; }

.field label {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-mid);
}
.field label .req { color: var(--acc); }

.field input,
.field select,
.field textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--fg);
  font-family: var(--sans);
  font-size: .97rem;
  padding: 13px 15px;
  width: 100%;
  transition: border-color .16s, background .16s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--acc);
  background: var(--bg-1);
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236C7679' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 17px;
  padding-right: 42px;
}

.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 620px) { .form__row { grid-template-columns: 1fr; } }

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: .86rem;
  color: var(--fg-mid);
  line-height: 1.55;
}
.check input { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--acc); flex-shrink: 0; }

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

/* ---------- Fußzeile ---------- */

.foot {
  border-top: 1px solid var(--line);
  background: var(--bg-1);
  padding: clamp(48px, 6vw, 72px) 0 32px;
  font-size: .92rem;
}

.foot__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
@media (max-width: 760px) { .foot__grid { grid-template-columns: 1fr 1fr; gap: 32px; } .foot__brand { grid-column: 1 / -1; } }

.foot__brand p { color: var(--fg-dim); max-width: 38ch; font-size: .9rem; margin-top: 1em; }

.foot h4 {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 1.1em;
}

.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot ul a { color: var(--fg-mid); text-decoration: none; }
.foot ul a:hover { color: var(--acc); }

.foot__bar {
  border-top: 1px solid var(--line-soft);
  padding-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* ---------- Rechtstexte ---------- */

.legal { max-width: 760px; }
.legal h2 { font-size: 1.35rem; margin-top: 2.4em; }
.legal h2:first-of-type { margin-top: 0; }
.legal h3 { font-size: 1.05rem; margin-top: 1.8em; }
.legal p, .legal li { color: var(--fg-mid); font-size: .97rem; }
.legal ul { padding-left: 1.2em; display: grid; gap: .5em; margin-bottom: 1.2em; }
.legal address { font-style: normal; color: var(--fg); line-height: 1.8; }

/* ---------- Seitenkopf (Unterseiten) ---------- */

.phead {
  padding: clamp(60px, 8vw, 100px) 0 clamp(40px, 5vw, 60px);
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(760px 300px at 20% -10%, rgba(15,122,76,.05), transparent 70%),
    var(--bg);
}
.phead h1 { max-width: 18ch; }
.phead .lead { max-width: 62ch; }

/* Seitenkopf mit 3D-Szene im Hintergrund — gleicher Aufbau wie der Hero
   der Startseite: die Szene liegt hinter dem Text, ein Verlauf hält ihn lesbar. */
.phead--3d {
  position: relative;
  overflow: hidden;
  min-height: clamp(500px, 72vh, 720px);
  display: flex;
  align-items: center;
  padding-block: clamp(60px, 7vw, 96px);
}

.phead--3d .wrap { position: relative; z-index: 2; width: 100%; }
.phead--3d .lead { max-width: 52ch; }

.phead__scene {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.phead__canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.phead--3d::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(100deg, var(--bg) 8%, rgba(255,255,255,.95) 44%, rgba(255,255,255,.55) 64%, rgba(255,255,255,.15) 80%, rgba(255,255,255,.45) 100%),
    linear-gradient(to top, var(--bg) 1%, transparent 30%);
}

/* ---------- Mobil: 3D-Fläche oben, Text darunter ----------
   Statt Text über der Szene werden beide gestapelt. Die 3D-Fläche bekommt
   den oberen Teil und darf großzügig ausfallen, der Text steht darunter. */
@media (max-width: 760px) {

  .hero,
  .phead--3d {
    display: block;
    min-height: auto;
    align-items: initial;
    padding-top: 0;
  }

  /* Die Szene rückt im Fluss nach oben, der Text folgt darunter */
  .phead--3d { display: flex; flex-direction: column; }
  .phead--3d .phead__scene { order: -1; position: relative; inset: auto; }

  .hero__canvas,
  .phead__canvas {
    position: relative;
    inset: auto;
    width: 100%;
    height: min(62vh, 480px);
    min-height: 380px;
  }

  /* Verlauf nur noch über der 3D-Fläche, als Übergang zum Text */
  .hero::after,
  .phead--3d::after {
    top: 0;
    bottom: auto;
    height: min(62vh, 480px);
    min-height: 380px;
    background: linear-gradient(to bottom,
      rgba(255,255,255,.25) 0%,
      rgba(255,255,255,.04) 42%,
      rgba(255,255,255,.6) 82%,
      var(--bg) 100%);
  }

  .hero__in { padding-block: 4px 56px; }
  .hero__meta { margin-top: 2rem; padding-top: 1.2rem; }
  .phead--3d { padding-block: 0 clamp(40px, 7vw, 60px); }
  .phead--3d .wrap { padding-top: 20px; }
}

/* ---------- Einblend-Animation ---------- */

.rise { transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }

/* Ausgeblendet wird nur, wenn JavaScript läuft — ohne JS bleibt alles sichtbar */
.js .rise { opacity: 0; transform: translateY(18px); }
.js .rise.is-in { opacity: 1; transform: none; }

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