/* GMD® Website – Stylesheet
   Fonts self-hosted (DSGVO: keine Anfragen an Drittserver). */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/assets/fonts/archivo-latin-standard-normal.woff2) format("woff2-variations");
  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: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/assets/fonts/archivo-latin-ext-standard-normal.woff2) format("woff2-variations");
  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;
}

:root {
  /* Markenfarben (GMD-CD) */
  --night: #0e1117;
  --night-2: #161a23;
  --line-dark: #2a3040;
  --glacier: #9da3c0;
  --snow: #e9ecf3;
  --paper: #f4f5f9;
  --ink: #151923;
  --ink-soft: #4a5163;
  --rule: #d9dce6;
  /* Gefahren-Farbcode (Information, nicht Dekoration) */
  --flood: #2fb8bf;   /* Hochwasser, Wildbach, Wasser */
  --rock: #e0843f;    /* Steinschlag, Felssturz */
  --seismic: #8a78e8; /* Seismik, Hangbewegung */
  --crowd: #4cbf80;   /* Personenstrom */
  --snowblue: #7fa7d9;/* Lawine */
  --fire: #d9574a;    /* Waldbrand */
  --focus: #ffd166;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --measure: 68ch;
  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 3.2vw, 2.4rem);
  --step-4: clamp(2.1rem, 4.2vw, 3.2rem);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-stretch: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-stretch: 112%; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 0.6em; }
h1 { font-size: var(--step-4); font-weight: 680; }
h2 { font-size: var(--step-3); font-weight: 650; }
h3 { font-size: var(--step-1); font-weight: 640; font-stretch: 106%; line-height: 1.25; }
p { margin: 0 0 1em; max-width: var(--measure); }
ul, ol { max-width: var(--measure); padding-left: 1.2em; }
li { margin-bottom: 0.35em; }

.skip { position: absolute; left: -999px; top: 0; background: var(--focus); color: #000; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }

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

/* ---------- Header ---------- */
.site-header { background: var(--night); color: var(--snow); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line-dark); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo { height: 2.25rem; width: auto; max-width: 170px; display: block; }
@media (max-width: 600px) { .brand-logo { height: 1.85rem; max-width: 140px; } }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.4rem; align-items: center; max-width: none; }
.nav li { margin: 0; }
.nav a { white-space: nowrap; text-decoration: none; font-size: .95rem; color: #c9cddb; padding: .4rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--glacier); }
.header-actions { display: flex; align-items: center; gap: .9rem; }
.lang a { font-size: .85rem; color: #aab0c6; text-decoration: none; border: 1px solid var(--line-dark); padding: .25rem .55rem; border-radius: var(--radius); }
.lang a:hover { color: #fff; border-color: var(--glacier); }
.login { font-size: .85rem; color: #aab0c6; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line-dark); color: var(--snow); font: inherit; font-size: .9rem; padding: .4rem .7rem; border-radius: var(--radius); cursor: pointer; }

@media (max-width: 1080px) {
  .menu-toggle { display: inline-block; margin-left: auto; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--night); border-bottom: 1px solid var(--line-dark); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gutter) 1.25rem; }
  .nav a { display: block; padding: .8rem 0; border-bottom: 1px solid var(--line-dark); font-size: 1.05rem; }
  .nav a[aria-current="page"] { border-bottom-color: var(--line-dark); color: var(--glacier); }
  .header-actions .login { display: none; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-block; font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; padding: .85rem 1.3rem; border-radius: var(--radius); border: 2px solid transparent; cursor: pointer; line-height: 1.2; }
.btn-primary { background: var(--glacier); color: var(--night); }
.btn-primary:hover { background: #b7bcd4; }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.06); }
.on-light .btn-primary { background: var(--night); color: #fff; }
.on-light .btn-primary:hover { background: #2a3040; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* ---------- Hero ---------- */
.hero { background: var(--night); color: var(--snow); padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { color: #fff; }
.hero .claim { color: var(--glacier); font-size: 1rem; margin-bottom: 1.1rem; font-weight: 500; }
.hero .lead { font-size: var(--step-1); color: #c3c8d8; line-height: 1.5; }
.page-hero { background: var(--night); color: var(--snow); padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.2rem, 5vw, 3.5rem); }
.page-hero h1 { color: #fff; max-width: 22ch; }
.page-hero .lead { font-size: var(--step-1); color: #c3c8d8; line-height: 1.5; max-width: 60ch; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Einzugsgebiet-Schema (Signaturelement) */
.catchment { width: 100%; }
.catchment svg { width: 100%; height: auto; display: block; }
.catchment .contour { fill: none; stroke: #2c3345; stroke-width: 1.2; }
.catchment .contour.major { stroke: #3a4258; stroke-width: 1.6; }
.catchment .stream { fill: none; stroke: var(--flood); stroke-width: 3; stroke-linecap: round; opacity: .85; }
.catchment .node { fill: var(--night); stroke: var(--flood); stroke-width: 2; }
.catchment .node-core { fill: var(--flood); opacity: 0; }
.catchment .village { fill: #3a4258; }
.catchment .rail { stroke: #6c7390; stroke-width: 2; stroke-dasharray: 6 5; fill: none; }
.catchment .dock { fill: none; stroke: var(--glacier); stroke-width: 2; }
.catchment text { fill: #9aa1b8; font-family: var(--font); font-size: 14px; }
.catchment-caption { font-size: .8rem; color: #8a90a8; margin-top: .5rem; }
@media (prefers-reduced-motion: no-preference) {
  .catchment .node-core { animation: pulse 5.6s ease-out 1 forwards; }
  @keyframes pulse { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: .9; } }
}
@media (prefers-reduced-motion: reduce) { .catchment .node-core { opacity: .9; } }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section.dark { background: var(--night-2); color: var(--snow); border-top: 0; }
.section.dark + .section { border-top: 0; }
.section.dark h2, .section.dark h3 { color: #fff; }
.section.dark p, .section.dark li { color: #c3c8d8; }
.section-head { max-width: 70ch; margin-bottom: 2.2rem; }
.section-head p { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); }
.dark .section-head p { color: #b9bfd1; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* Kette: Now-Casting > Frühwarnung > Lagebild (echte Abfolge) */
.chain { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; max-width: none; counter-reset: stage; }
.chain li { position: relative; padding: 1.6rem 1.6rem 1.6rem 0; margin: 0; border-top: 3px solid var(--glacier); counter-increment: stage; }
.chain li + li { padding-left: 1.6rem; border-left: 1px solid var(--line-dark); }
.chain .stage-no::before { content: counter(stage); display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 2px solid var(--glacier); color: var(--glacier); font-weight: 700; font-size: .95rem; margin-bottom: .9rem; }
.chain .when { display: block; font-size: .9rem; color: var(--glacier); margin-bottom: .4rem; }
.chain h3 { margin-bottom: .5rem; }
@media (max-width: 860px) {
  .chain { grid-template-columns: 1fr; }
  .chain li, .chain li + li { padding: 1.4rem 0; border-left: 0; }
}
.note { font-size: .92rem; border-left: 3px solid var(--glacier); padding: .6rem 0 .6rem 1rem; margin-top: 2rem; max-width: 75ch; }
.dark .note { color: #aeb4c8; }

/* Gefahrenliste mit Farbcode */
.hazards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; max-width: none; }
.hazards li { margin: 0; padding: 1.2rem 0 1.2rem 1.2rem; border-bottom: 1px solid var(--rule); border-left: 4px solid var(--c, var(--glacier)); }
.hazards h3 { margin-bottom: .3rem; }
.hazards p { margin: 0; color: var(--ink-soft); }
.hazards a { text-decoration: none; }
.hazards a:hover h3 { text-decoration: underline; }
@media (max-width: 760px) { .hazards { grid-template-columns: 1fr; } }
.c-flood { --c: var(--flood); } .c-rock { --c: var(--rock); } .c-seismic { --c: var(--seismic); }
.c-crowd { --c: var(--crowd); } .c-snow { --c: var(--snowblue); } .c-fire { --c: var(--fire); }

/* Bausteine (Definition-Liste statt Kartenraster) */
.blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem 2.5rem; margin: 0; }
.blocks div { border-top: 1px solid var(--rule); padding-top: 1rem; }
.dark .blocks div { border-top-color: var(--line-dark); }
.blocks dt { font-weight: 650; font-stretch: 108%; font-size: var(--step-1); margin-bottom: .4rem; }
.blocks dd { margin: 0; color: var(--ink-soft); }
.dark .blocks dd { color: #b9bfd1; }

/* Prozessschritte */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; max-width: 72ch; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.6rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); margin: 0; }
.steps li::before { content: counter(s); font-weight: 700; font-stretch: 115%; font-size: 1.35rem; color: var(--ink-soft); }
.steps h3 { margin-bottom: .25rem; }
.steps p { margin: 0; }

/* Referenzen */
.ref { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1.5rem, 4vw, 3rem); padding: 2.5rem 0; border-bottom: 1px solid var(--rule); align-items: start; }
.ref:first-of-type { padding-top: 0; }
.ref h3 { font-size: var(--step-2); }
.ref .meta { font-size: .92rem; color: var(--ink-soft); margin-bottom: 1rem; }
.tag { display: inline-block; font-size: .8rem; padding: .15rem .55rem; border-radius: 99px; border: 1px solid var(--c, var(--rule)); color: var(--ink); margin: 0 .35rem .35rem 0; }
.tag::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--c, var(--glacier)); margin-right: .4rem; vertical-align: .05em; }
@media (max-width: 860px) { .ref { grid-template-columns: 1fr; } }

/* Medien & Bilder */
.media { margin: 0; position: relative; }
.media img { width: 100%; aspect-ratio: var(--ar, 4 / 3); object-fit: cover; border-radius: var(--radius); background: #dfe2ea; }
.media.missing, .media .ph { display: none !important; }
.media figcaption { font-size: .8rem; color: var(--ink-soft); margin-top: .5rem; }

/* Faktenzeile mit Quellen */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem 2.5rem; margin: 2rem 0 0; }
.facts div { border-top: 3px solid var(--flood); padding-top: .9rem; }
.facts dt { font-size: var(--step-2); font-weight: 700; font-stretch: 115%; line-height: 1.15; }
.facts dd { margin: .35rem 0 0; color: var(--ink-soft); font-size: .95rem; }
.facts dd a { font-size: .85rem; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--rule); padding: 1rem 0; max-width: 78ch; }
.faq summary { cursor: pointer; font-weight: 620; font-size: var(--step-1); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.5rem; line-height: 1; color: var(--ink-soft); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: .8rem 0 0; }

/* Zitat */
.quote { font-size: var(--step-2); font-stretch: 106%; line-height: 1.35; max-width: 40ch; margin: 0; font-weight: 500; }
.quote-by { margin-top: 1rem; color: var(--ink-soft); font-size: .95rem; }

/* CTA-Band */
.cta-band { background: var(--night); color: var(--snow); padding: clamp(3rem, 6vw, 4.5rem) 0; }
.cta-band h2 { color: #fff; max-width: 24ch; }
.cta-band p { color: #c3c8d8; }

/* Formular */
.form { display: grid; gap: 1.1rem; max-width: 680px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }
.field label, .field legend { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
.field .hint { font-weight: 400; color: var(--ink-soft); font-size: .85rem; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: .7rem .8rem; border: 1px solid #a9afc2; border-radius: var(--radius); background: #fff; color: var(--ink);
}
.field textarea { min-height: 9rem; resize: vertical; }
.field fieldset { border: 0; padding: 0; margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; }
.checks label { font-weight: 400; display: inline-flex; gap: .45rem; align-items: center; margin: 0; }
.consent label { font-weight: 400; display: flex; gap: .6rem; align-items: flex-start; }
.consent input { margin-top: .35rem; }
.field [aria-invalid="true"] { border-color: #b3261e; }
.error-text { color: #b3261e; font-size: .88rem; margin-top: .3rem; }
.hp { position: absolute; left: -5000px; }
.form-status { padding: 1rem 1.1rem; border-radius: var(--radius); display: none; }
.form-status.ok { display: block; background: #e3f4ea; border: 1px solid #4cbf80; }
.form-status.err { display: block; background: #fbe9e7; border: 1px solid #b3261e; }

.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; }
.contact-cards address { font-style: normal; line-height: 1.7; }

/* Prüfhinweise – vor Veröffentlichung entfernen */
.check { background: #fff4cc; color: #5a4300; font-size: .78em; padding: .05em .35em; border-radius: 3px; font-weight: 600; white-space: normal; }
body.hide-checks .check { display: none; }

/* Breadcrumb */
.crumbs { font-size: .85rem; color: #8a90a8; margin-bottom: 1.2rem; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: #555c72; }
.crumbs a { color: #aab0c6; }

/* Footer */
.site-footer { background: var(--night); color: #aab0c6; padding: 3.5rem 0 2rem; font-size: .95rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { font-size: 1rem; color: #fff; font-stretch: 100%; margin-bottom: .8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: #c9cddb; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer address { font-style: normal; line-height: 1.7; }
.site-footer .legal { border-top: 1px solid var(--line-dark); margin-top: 2.5rem; padding-top: 1.2rem; display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: space-between; font-size: .85rem; }
@media (max-width: 860px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .cols { grid-template-columns: 1fr; } }

.prose h2 { margin-top: 2rem; font-size: var(--step-2); }
.prose h3 { margin-top: 1.5rem; }
.muted { color: var(--ink-soft); }
.small { font-size: .88rem; }

@media print { .site-header, .site-footer, .cta-band, .menu-toggle { display: none; } body { background: #fff; } }
.ref h4 { font-size: 1rem; font-weight: 650; margin: 1.1rem 0 .3rem; font-stretch: 104%; }
.tag.plain::before { display: none; }
.two-col .facts { grid-template-columns: 1fr; margin-top: 0; }
.nav ul { gap: 1.25rem; }
.brand-claim, .login { white-space: nowrap; }
@media (max-width: 1240px) { .header-actions .login { display: none; } }
