/* ==========================================================================
   BASE – Reset, Design-Tokens, Schriften, Typografie
   Junge Kantorei St. Martin. Farben/Schriften 1:1 aus dem Elementor-Kit der
   alten Seite; Abweichungen nur laut _planung/plan.md (D-Nummern).
   ========================================================================== */

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

:root {
  /* === FARBEN (Elementor-Kit alt) === */
  --color-primaer:    #E6005B;  /* Pink: Überschriften, Menü, Leisten */
  --color-sekundaer:  #0A3041;  /* Dunkelblau: Karten, aktiver Menüpunkt */
  --color-akzent:     #DBA314;  /* Gold: Buttons, Datum auf Dunkelblau */
  --color-link:       #DB0057;  /* D20: Pink für Links im Fließtext, etwas dunkler (AA auf Hellgrau) */
  --color-creme:      #FFF9E8;
  --color-seite:      #F7F8F9;  /* Seitenhintergrund alt */
  --color-weiss:      #FFFFFF;

  /* D1: Fließtext dunkler (#7A7A7A alt -> #595959, Kontrast ca. 7:1) */
  --color-text:       #595959;
  --color-text-dunkel:#222222;
  --color-border:     #DDDDDD;

  /* === TYPOGRAFIE === */
  --font-body:  'Roboto', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-slab:  'Roboto Slab', Georgia, serif;

  --fs-sm:   0.875rem;   /* 14px */
  --fs-base: 1.0625rem;  /* 17px wie alt; D6: auf dem Handy nicht kleiner */
  --fs-md:   1.25rem;    /* 20px (H5 alt) */
  --fs-lg:   1.5rem;
  --fs-xl:   1.8125rem;  /* 29px (H3 alt) */
  --fs-2xl:  2.625rem;   /* 42px (H1 alt) */

  /* === ABSTÄNDE (D16: ein Raster für alle Abschnitte) === */
  --space-2xs: 0.25rem;
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.25rem;   /* 20px – Elementor-Widget-Abstand alt */
  --space-lg:  2rem;
  --space-xl:  3rem;
  --space-2xl: 4.5rem;
  --section-py: var(--space-2xl);

  /* === LAYOUT === */
  --max-width:   1140px;  /* Container-Breite alt */
  --max-text:    46rem;   /* D6: Zeilenlänge Fließtext begrenzen */
  --gutter:      1.25rem;
  --header-h:      64px;  /* Kopfzeile nach dem Scrollen (schmal, dergies 03.12.2026; alt 105px) */
  --header-h-oben: 150px; /* Kopfzeile oben mit großem Logo (halbe Höhe des Kopfbereichs) */

  --radius-sm: 4px;
  --radius-md: 10px;      /* Reiter alt; einheitlich für alle Buttons, Kästen und Bilder (dergies 03.12.2026) */

  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.12);
  --shadow-lg: 2px 8px 23px 3px rgba(0, 0, 0, 0.2);

  --transition: 200ms ease;

  --tap: 44px;            /* D10: Mindestgröße Tippflächen */
}

@media (max-width: 1024px) {
  :root {
    --header-h: 60px;
    --header-h-oben: 96px;
    --fs-2xl: 2.125rem;
    --fs-xl:  1.5rem;
  }
}

@media (max-width: 767px) {
  :root {
    --section-py: var(--space-xl);
    --gutter: 1rem;
    --fs-2xl: 1.875rem;
  }
}

/* === SCHRIFTEN (lokal, keine Verbindung zu Google) ===
   Roboto ist eine variable Schrift: eine Datei deckt 400–600 ab. */
@font-face {
  font-family: 'Roboto';
  src: url('/fonts/roboto-latin.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  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: 'Roboto';
  src: url('/fonts/roboto-latin-ext.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  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;
}
@font-face {
  font-family: 'Roboto Slab';
  src: url('/fonts/roboto-slab-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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: 'Roboto Slab';
  src: url('/fonts/roboto-slab-latin-ext.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

/* Seitenhintergrund wie alt: helles Grau mit goldenen Noten.
   Desktop fixiert (Parallax-Eindruck), D18: auf dem Handy normal scrollend. */
body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-seite);
  background-image: url('/img/hintergrund/noten-700.webp');
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (min-width: 1025px) {
  body {
    background-image: url('/img/hintergrund/noten.webp');
    background-attachment: fixed;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-primaer);
}

h1 { font-size: var(--fs-2xl); margin-bottom: var(--space-md); }
h2 { font-size: var(--fs-xl);  margin-bottom: var(--space-md); }
h3 { font-size: var(--fs-xl);  margin-bottom: var(--space-md); }
h4 { font-size: var(--fs-lg);  margin-bottom: var(--space-sm); }
h5 { font-size: var(--fs-md);  margin-bottom: var(--space-sm); }

p, ul, ol, table {
  margin-bottom: var(--space-md);
}
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

strong { font-weight: 600; }

a {
  color: var(--color-primaer);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-sekundaer); }

/* Links im Fließtext erkennbar (nicht nur über Farbe) */
.text a:not(.btn), .prose a:not(.btn) { color: var(--color-link); text-decoration: underline; text-underline-offset: 2px; }
.text a:not(.btn):hover, .prose a:not(.btn):hover { color: var(--color-sekundaer); }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol { padding-left: 1.5rem; }

button { font: inherit; color: inherit; cursor: pointer; }

/* D13: sichtbarer Tastatur-Fokus */
:focus-visible {
  outline: 3px solid var(--color-sekundaer);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* D13: Skip-Link sichtbar, sobald er den Fokus hat */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  background: var(--color-sekundaer);
  color: #fff;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  z-index: 10000;
  font-weight: 600;
}
.skip-link:focus {
  top: var(--space-sm);
  color: #fff;
}
