/* DPSG Stamm Heilig Kreuz Detmold – Theme
 * Farben aus dem bisherigen Template (DPSG-Blau #003056, Rot #b5152b, Stufenfarben), neu gebaut:
 * mobil zuerst, Kontraste >= 4,5:1 fuer Text, kein JavaScript noetig, keine externen Ressourcen. */

@font-face { font-family: "Bitter"; src: url("../fonts/Bitter_400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Bitter"; src: url("../fonts/Bitter_700.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --blue: #003056;
  --blue-soft: #e6edf2;
  --red: #b5152b;
  --text: #1a1a1a;
  --muted: #4a5663;
  --bg: #ffffff;
  --surface: #f3f6f8;
  --line: #ccd6dd;
  --link: #003f8a;
  --link-hover: #b5152b;
  --focus: #ffb300;
  --tone-neutral: #003056;
  --tone-woelflinge: #ff6600;
  --tone-juffis: #2f53a7;
  --tone-pfadis: #00823c;
  --tone-rover: #cc1f2f;
  --font-head: "Bitter", Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue: #0b2a43;
    --blue-soft: #14283a;
    --text: #e8edf1;
    --muted: #aab6c2;
    --bg: #0e1720;
    --surface: #16222e;
    --line: #2d3d4c;
    --link: #8ec1f0;
    --link-hover: #ffb3bd;
    --tone-neutral: #8ec1f0;
    --tone-woelflinge: #ff8a3d;
    --tone-juffis: #7f9cf0;
    --tone-pfadis: #3fc477;
    --tone-rover: #ff6b78;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1.0625rem/1.65 var(--font-body); }
img { max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: 62rem; margin-inline: auto; padding-inline: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Fokus und Sprunglink */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .75rem 1rem; background: var(--focus); color: #000; font-weight: 700; border-radius: 0 0 var(--radius) var(--radius); }
.skip-link:focus { top: 0; }

/* Links */
a { color: var(--link); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--link-hover); text-decoration-thickness: .14em; }

/* Kopfbereich */
.site-header { background: var(--blue); color: #fff; border-bottom: 6px solid var(--red); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding-block: .75rem; }
.brand { display: flex; align-items: center; gap: .85rem; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-logo { width: 3.4rem; height: auto; background: #fff; border-radius: 6px; padding: 2px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-top { font-size: .8rem; letter-spacing: .02em; opacity: .92; }
.brand-name { font: 700 1.2rem/1.2 var(--font-head); }

.nav-toggle { appearance: none; background: transparent; color: #fff; border: 2px solid #fff; border-radius: var(--radius); min-height: 2.75rem; min-width: 2.75rem; padding: .4rem 1rem; font: 600 1rem var(--font-body); cursor: pointer; }
.nav-toggle[aria-expanded="true"] { background: #fff; color: var(--blue); }

.main-nav { flex-basis: 100%; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.main-nav a { display: block; padding: .8rem .25rem; min-height: 2.75rem; color: #fff; text-decoration: none; border-top: 1px solid rgba(255, 255, 255, .25); font-weight: 600; }
.main-nav a:hover { color: #fff; text-decoration: underline; }
.main-nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--red); padding-left: .85rem; background: rgba(255, 255, 255, .1); }
.js .main-nav:not(.is-open) { display: none; }

@media (min-width: 52rem) {
  .nav-toggle { display: none !important; }
  .js .main-nav:not(.is-open), .main-nav { display: block; flex-basis: auto; }
  .main-nav ul { flex-direction: row; flex-wrap: wrap; gap: .1rem .25rem; }
  .main-nav a { border-top: 0; border-bottom: 4px solid transparent; padding: .6rem .7rem; }
  .main-nav a:hover { border-bottom-color: rgba(255, 255, 255, .6); text-decoration: none; }
  .main-nav a[aria-current="page"] { box-shadow: none; padding-left: .7rem; background: none; border-bottom-color: var(--red); }
}

/* Inhalt */
main { display: block; padding-block: 0 3rem; }
.content { padding-top: 1.5rem; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; color: var(--blue); margin: 1.6em 0 .5em; }
@media (prefers-color-scheme: dark) { h1, h2, h3, h4 { color: #cfe4f7; } }
h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); margin-top: .4em; }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.8rem); }
h3 { font-size: 1.2rem; }
.page-title { margin-bottom: 1.25rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46rem; margin: 0 0 1rem; }
.block { margin-block: 2rem; }
.block > h2:first-child { margin-top: 0; }
.rich-text { max-width: 44rem; }
.rich-text > :first-child { margin-top: 0; }
.rich-text > :last-child { margin-bottom: 0; }
.rich-text ul, .rich-text ol { padding-left: 1.4rem; }
.rich-text li { margin-block: .25rem; }
.rich-text table { border-collapse: collapse; width: 100%; }
.rich-text th, .rich-text td { border: 1px solid var(--line); padding: .5rem .75rem; text-align: left; vertical-align: top; }
.rich-text blockquote { margin: 1rem 0; padding: .25rem 1rem; border-left: 4px solid var(--red); background: var(--surface); }

.info-box { background: var(--blue-soft); border-left: 6px solid var(--blue); border-radius: var(--radius); padding: 1rem 1.25rem; }
@media (prefers-color-scheme: dark) { .info-box { border-left-color: #8ec1f0; } }
.info-box > h2 { font-size: 1.25rem; margin: 0 0 .4rem; }

/* Startseite */
.hero { background: linear-gradient(180deg, var(--blue-soft), var(--bg)); padding-block: 1.5rem 1rem; }
.hero-inner { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; text-align: center; }
.hero-logo { width: min(11rem, 55vw); height: auto; }
.hero-text h1 { margin-top: 0; }
.hero-text .lead { margin-inline: auto; }
@media (min-width: 40rem) {
  .hero-inner { flex-direction: row; text-align: left; gap: 2.5rem; }
  .hero-text .lead { margin-inline: 0; }
}

/* Karten */
.cards { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.cards-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-top: 8px solid var(--tone-neutral); border-radius: var(--radius); padding: 1rem 1.25rem 1.25rem; display: flex; flex-direction: column; }
.card.tone-woelflinge { border-top-color: var(--tone-woelflinge); }
.card.tone-juffis { border-top-color: var(--tone-juffis); }
.card.tone-pfadis { border-top-color: var(--tone-pfadis); }
.card.tone-rover { border-top-color: var(--tone-rover); }
.card-icon { align-self: flex-start; width: 3.5rem; height: auto; margin-bottom: .25rem; }
.card-title { margin: .25rem 0 0; font-size: 1.3rem; }
.card { scroll-margin-top: 1rem; }
.card:target { outline: 3px solid var(--focus); outline-offset: 2px; }
.card-subtitle { margin: .1rem 0 .6rem; font-weight: 600; color: var(--muted); }
.card .rich-text { max-width: none; }
.card-link { margin: auto 0 0; padding-top: .75rem; }
.card-link a { font-weight: 600; }

/* Fusszeile */
.site-footer { background: var(--blue); color: #fff; border-top: 6px solid var(--red); padding-block: 2rem; font-size: .975rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #fff; text-decoration-thickness: .16em; }
.footer-inner { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.footer-title { font: 700 1.1rem var(--font-head); margin: 0 0 .5rem; }
.footer-col address { font-style: normal; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-block: .1rem; }
.footer-col li a { display: inline-block; padding-block: .35rem; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print {
  .site-header, .site-footer, .skip-link { display: none; }
  body { color: #000; background: #fff; }
  a { color: #000; }
}
