/* ==========================================================================
   Bildungsstätte Bahnhof Göhrde – Basis-Stylesheet
   Übergangsdesign: neutral gehalten, Farben/Fonts zentral über Variablen
   austauschbar (späteres Redesign: nur :root anpassen).
   Keine externen Fonts/CDNs → keine Datenübertragung an Dritte (DSGVO).
   ========================================================================== */

/* Open Sans lokal (Dateien in /fonts ablegen, z. B. via gwfh.mranftl.com).
   Fehlen sie, greift automatisch die Systemschrift. */
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: local("Open Sans"), local("OpenSans-Regular"), url("fonts/open-sans-v40-latin-regular.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: local("Open Sans SemiBold"), local("OpenSans-SemiBold"), url("fonts/open-sans-v40-latin-600.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: local("Open Sans Bold"), local("OpenSans-Bold"), url("fonts/open-sans-v40-latin-700.woff2") format("woff2"); }

:root {
  /* Farben aus dem Logo: Backsteinrot, Schwarz (Gleis), Weiß, Hellgrau */
  --c-bg: #ffffff;
  --c-surface: #f5f5f5;
  --c-text: #333333;
  --c-muted: #626262;
  --c-primary: #c0362a;      /* Logo-Rot */
  --c-primary-dark: #9e2b21;
  --c-primary-ink: #ffffff;
  --c-accent: #1a1a1a;       /* Logo-Schwarz */
  --c-line: #e4e4e4;

  --font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font-body);

  --radius: 12px;
  --maxw: 72rem;
  --space: clamp(1rem, 2.5vw, 1.5rem);
  --section: clamp(3.5rem, 8vw, 6.5rem);
}

/* ---------- Reset / Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; font-weight: 700; color: var(--c-accent); margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.5rem + 3vw, 3.8rem); letter-spacing: -.02em; }
h1 em, h2 em { font-style: normal; color: var(--c-primary); }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; font-family: var(--font-body); font-weight: 650; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--c-primary-dark); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 3px; border-radius: 4px; }

.container { width: min(100% - 2 * var(--space), var(--maxw)); margin-inline: auto; }
.narrow { max-width: 46rem; }
.muted { color: var(--c-muted); }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 650; letter-spacing: .12em;
  text-transform: uppercase; color: var(--c-primary); margin-bottom: .9rem;
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--c-primary); color: var(--c-primary-ink); padding: .7rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--c-bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 5rem; padding-block: .5rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--c-text); text-decoration: none; font-weight: 650; line-height: 1.2; }

.brand small { display: block; font-weight: 400; font-size: .78rem; color: var(--c-muted); }

.nav ul { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; }
.nav a { display: block; padding: .5rem .8rem; border-radius: 999px; color: var(--c-text); text-decoration: none; font-size: .95rem; }
.nav a:hover { background: var(--c-surface); color: var(--c-primary); }
.nav .nav-cta { background: var(--c-primary); color: var(--c-primary-ink); }
.nav .nav-cta:hover { background: var(--c-primary-dark); }

.nav-toggle { display: none; }
@media (max-width: 52rem) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .5rem;
    background: none; border: 1px solid var(--c-line); color: var(--c-text);
    border-radius: 999px; padding: .5rem .9rem; font: inherit; cursor: pointer;
  }
  .nav { position: absolute; inset: 100% 0 auto 0; background: var(--c-bg); box-shadow: 0 12px 24px -12px rgba(0,0,0,.18); display: none; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; padding: .75rem var(--space) 1.25rem; }
  .nav a { padding: .8rem 1rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(4rem, 10vw, 8rem) clamp(3rem, 8vw, 6rem); }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1.15fr .85fr; align-items: center; }
@media (max-width: 52rem) { .hero-grid { grid-template-columns: 1fr; } }
.hero .lead { font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); color: var(--c-muted); max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-visual {
  aspect-ratio: 4 / 5; border-radius: calc(var(--radius) * 1.5);
  background: var(--c-surface); color: var(--c-accent); position: relative; overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.35);
}
.hero-visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-visual figcaption {
  position: absolute; left: 1.25rem; bottom: 1.1rem; right: 1.25rem;
  font-size: .85rem; opacity: .85;
}

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.35rem; border-radius: 999px; font-weight: 600; text-decoration: none;
  border: 1.5px solid var(--c-primary); transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--c-primary); color: var(--c-primary-ink); border-color: var(--c-primary); }
.btn-primary:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); }
.btn-ghost { color: var(--c-accent); background: transparent; border-color: var(--c-accent); }

/* ---------- Facts ---------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--c-line); border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 52rem) { .facts { grid-template-columns: repeat(2, 1fr); } }
.fact { background: var(--c-surface); padding: 1.4rem 1.25rem; border-top: 3px solid var(--c-primary); }
.fact strong { display: block; font-family: var(--font-head); font-size: clamp(1.8rem, 1.4rem + 1.5vw, 2.5rem); line-height: 1; color: var(--c-accent); margin-bottom: .35rem; }
.fact span { font-size: .92rem; color: var(--c-muted); }

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section-alt { background: var(--c-surface); border-block: 1px solid var(--c-line); }
.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3rem); }

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

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); gap: 1.1rem; }
.card {
  background: var(--c-bg); border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 1.5rem;
}
.section:not(.section-alt) .card { background: var(--c-surface); }
.card svg { width: 3.1rem; height: 3.1rem; color: var(--c-primary); margin-bottom: 1rem; }
.card p { margin: 0; color: var(--c-muted); font-size: .97rem; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; }
.checklist li { position: relative; padding-left: 1.9rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 1.2rem; height: 1.2rem;
  background: var(--c-primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.6 12.9c1.7 1.2 3.2 2.9 4.6 4.8 3.1-4.6 6.9-8.8 12-12.3'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.6 12.9c1.7 1.2 3.2 2.9 4.6 4.8 3.1-4.6 6.9-8.8 12-12.3'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 4.6rem; top: .4rem; bottom: .4rem; width: 2px; background: repeating-linear-gradient(to bottom, var(--c-accent) 0 3px, transparent 3px 14px); }
.timeline li { display: grid; grid-template-columns: 4.6rem 1fr; gap: 1.5rem; padding-bottom: 1.6rem; position: relative; }
.timeline li::after { content: ""; position: absolute; left: calc(4.6rem - 5px); top: .5rem; width: 12px; height: 12px; border-radius: 50%; background: var(--c-primary); }
.timeline time { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; color: var(--c-accent); }
.timeline p { margin: 0; }
.timeline li > div { padding-left: .75rem; }

/* ---------- Kontakt ---------- */
.contact-box { background: var(--c-primary); color: var(--c-primary-ink); border-radius: calc(var(--radius) * 1.5); padding: clamp(1.75rem, 4vw, 3rem); }
.contact-box a { color: inherit; }
.contact-box h2 { color: inherit; }
.contact-box .eyebrow { color: inherit; opacity: .85; }
.contact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.contact-list li { display: grid; grid-template-columns: 1.7rem 1fr; gap: .9rem; align-items: start; }
.contact-list svg { width: 1.6rem; height: 1.6rem; margin-top: .2rem; opacity: .85; }
.contact-box .btn { border-color: currentColor; color: inherit; }
.contact-box .btn-primary { background: var(--c-primary-ink); color: var(--c-primary); border-color: var(--c-primary-ink); }

.note { font-size: .9rem; color: var(--c-muted); border-left: 3px solid var(--c-primary); padding-left: 1rem; margin-top: 1.5rem; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 2.5rem; font-size: .93rem; color: #cfcfcf; background: var(--c-accent); border-top: 4px solid var(--c-primary); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; }
.footer-inner ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.footer-inner a { color: #fff; }

/* ---------- Rechtstexte ---------- */
.legal { padding-block: clamp(3rem, 7vw, 5rem); }
.legal h1 { font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem); }
.legal h2 { font-size: 1.45rem; margin-top: 2.5rem; }
.legal h3 { margin-top: 1.6rem; }
.legal address { font-style: normal; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .35rem; }

/* Platzhalter – vor Livegang ersetzen, dann diese Regel löschen */
.todo { background: #fff2b3; color: #4a3b00; padding: 0 .3em; border-radius: 4px; font-weight: 600; }

@media print {
  .site-header, .skip-link, .hero-actions, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- Ergänzungen: Logo, Hero-Bild, Formular, Karte ---------- */
.brand img { height: clamp(3rem, 2.4rem + 2vw, 4.2rem); width: auto; }
.hero-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.form { display: grid; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-size: .95rem; font-weight: 600; }
.form input, .form textarea {
  font: inherit; font-weight: 400; color: var(--c-text); background: var(--c-surface);
  border: 1.5px solid var(--c-line); border-radius: 10px; padding: .8rem .95rem; width: 100%;
}
.form input:focus, .form textarea:focus { border-color: var(--c-primary); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary) 25%, transparent); }
.form textarea { min-height: 9rem; resize: vertical; }
.form .consent { display: grid; grid-template-columns: auto 1fr; gap: .7rem; font-weight: 400; font-size: .9rem; color: var(--c-muted); align-items: start; }
.form .consent input { width: 1.15rem; height: 1.15rem; margin-top: .25rem; accent-color: var(--c-primary); }
.form .hp { position: absolute; left: -9999px; }
.form h3, .contact-form-title { font-size: 1.5rem; }
.form button { justify-self: start; cursor: pointer; font: inherit; font-weight: 600; }

.map-consent {
  position: relative; min-height: 26rem; border-radius: calc(var(--radius) * 1.5); overflow: hidden;
  background:
    linear-gradient(rgba(26,26,26,.9), rgba(26,26,26,.9)),
    repeating-linear-gradient(45deg, transparent 0 22px, rgba(255,255,255,.06) 22px 24px),
    repeating-linear-gradient(-45deg, transparent 0 22px, rgba(255,255,255,.06) 22px 24px);
  color: #fff; display: grid; place-items: center; text-align: center; padding: 2rem;
}
.map-consent p { max-width: 34rem; margin-inline: auto; font-size: .95rem; }
.map-consent a { color: inherit; }
.map-consent .btn { margin-top: .5rem; background: var(--c-primary); color: #fff; border-color: var(--c-primary); cursor: pointer; font: inherit; font-weight: 600; }
.map-consent iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
