/* ============================================================
   Abitur nachholen – Stylesheet v2 (modernisiert)
   Alle Farbpaare WCAG-AA-geprüft (≥ 4,5:1 für Fließtext)
   Tinte #1B2536 · Papier #F7F8F5 · Tafelgrün #22443A
   Signalrot #A8321F · Gold #F2C26B
   ============================================================ */

:root {
  --ink: #1b2536;          /* Text auf hell: 14,4:1 */
  --ink-soft: #39455c;
  --paper: #f7f8f5;
  --card: #ffffff;
  --board: #22443a;        /* Hero-Hintergrund */
  --board-deep: #1e3a31;
  --mark: #a8321f;         /* CTA/Akzent – Weiß darauf: 6,7:1 */
  --mark-deep: #8c2818;
  --gold: #f2c26b;         /* auf Hero-Grün: 6,5:1 */
  --line: #e2e6e3;
  --muted: #5a6478;        /* auf Weiß: 6,0:1 */
  --link: #23584a;         /* auf Weiß: 8,2:1 */
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(27, 37, 54, 0.06), 0 4px 12px rgba(27, 37, 54, 0.06);
  --shadow-md: 0 2px 4px rgba(27, 37, 54, 0.07), 0 12px 32px rgba(27, 37, 54, 0.10);
  --maxw: 1100px;
  --measure: 44em;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: var(--ink); }

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.18;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 1.2rem + 4vw, 3.4rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.55rem, 1.1rem + 2.2vw, 2.25rem); margin-bottom: 0.55em; }
h3 { font-size: 1.28rem; margin-bottom: 0.4em; margin-top: 1.4em; }

p { margin-bottom: 1.15em; max-width: var(--measure); text-wrap: pretty; }
strong { font-weight: 700; }
em { font-style: italic; }

a { color: var(--link); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: color 0.15s ease; }
a:hover { color: var(--mark); }
:where(a, button, input, select, summary):focus-visible {
  outline: 3px solid var(--mark);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(18px, 4vw, 28px); }

/* ---------- Kopfzeile ---------- */
.topbar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 66px; gap: 16px;
}
.brand {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.18rem; font-weight: 700;
  color: var(--ink); text-decoration: none;
  display: flex; align-items: center; gap: 10px;
}
.nav { display: flex; gap: clamp(14px, 2.5vw, 26px); flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--ink-soft);
  font-size: 0.95rem; font-weight: 600;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--mark); }
.nav a[aria-current="page"] { color: var(--mark); border-bottom-color: var(--mark); }

/* ---------- Mobile-Nav-Toggle (Hamburger) ---------- */
.nav-toggle {
  display: none;
  flex-shrink: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px; height: 42px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(242, 194, 107, 0.16), transparent 60%),
    radial-gradient(800px 600px at -10% 110%, rgba(255, 255, 255, 0.07), transparent 55%),
    linear-gradient(160deg, #2a5447 0%, var(--board) 55%, var(--board-deep) 100%);
  color: #eef4ef;
  position: relative;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
  padding-top: clamp(48px, 8vw, 84px);
  padding-bottom: clamp(48px, 8vw, 84px);
}
.hero h1 { color: #ffffff; margin-bottom: 0.45em; }
.hero-intro { font-size: clamp(1rem, 0.95rem + 0.4vw, 1.18rem); color: #e4ede7; max-width: 34em; margin-bottom: 0; }
.hero .breadcrumb, .hero .breadcrumb a { color: rgba(188, 208, 197, 0.9); }
.hero .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.hero .kicker::before { content: ""; width: 26px; height: 2px; background: var(--gold); }
.hero-art { width: 100%; height: auto; display: block; filter: drop-shadow(0 24px 40px rgba(0,0,0,0.28)); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Hero Key-Facts-Bar ---------- */
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 20px 0 0;
  max-width: 28em;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.14);
}
.hero-fact {
  flex: 1 1 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 13px 16px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}
.hero-fact:last-child { border-right: none; }
.hero-fact__num {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.hero-fact__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  hyphens: auto;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 1.02rem;
  padding: 15px 28px;
  border-radius: 999px;
  border: none; cursor: pointer;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.btn-primary { background: var(--mark); color: #fff; box-shadow: 0 6px 18px rgba(168, 50, 31, 0.35); }
.btn-primary:hover { background: var(--mark-deep); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(168, 50, 31, 0.4); }
.btn-ghost { background: rgba(255, 255, 255, 0.06); color: #fff; border: 2px solid rgba(255, 255, 255, 0.65); }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.12); color: #fff; }

/* ---------- Abschnitte ---------- */
.section { padding: clamp(48px, 8vw, 80px) 0; }
.section.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section .intro { max-width: var(--measure); }

.eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--mark);
  margin-bottom: 10px;
}

/* ---------- „Das Wichtigste in Kürze" ---------- */
.tldr {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 6px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(20px, 3.5vw, 32px);
  margin-top: 34px;
}
.tldr h2, .tldr h3 { font-size: 1.2rem; margin: 0 0 12px; }
.tldr ul { list-style: none; }
.tldr li { padding-left: 28px; position: relative; margin-bottom: 8px; }
.tldr li::before { content: "→"; position: absolute; left: 0; color: var(--mark); font-weight: 700; }

/* ---------- Karten ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin-top: 34px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card::before {
  content: "";
  position: absolute; inset: 0 auto auto 0;
  width: 100%; height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--board), var(--gold));
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.section.alt .card { background: var(--paper); }
.card h3 { margin-top: 4px; }
.card h3 a { text-decoration: none; }
.card .more { margin-top: auto; font-weight: 700; }

/* ---------- Tabellen ---------- */
.table-scroll {
  overflow-x: auto; margin: 28px 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  background: var(--card);
}
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
caption {
  caption-side: top; text-align: left;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.08rem; font-weight: 600;
  padding: 16px 18px;
  border-bottom: 3px solid var(--board);
}
th, td { padding: 12px 18px; text-align: left; vertical-align: top; }
thead th {
  background: var(--ink); color: #fff;
  font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase;
  position: sticky; top: 0;
}
tbody tr { border-top: 1px solid var(--line); }
tbody tr:nth-child(even) { background: #f4f6f4; }
tbody tr:hover { background: #ecf1ed; }
td a { word-break: break-word; }

.grade-pass td:last-child { font-weight: 700; color: var(--link); }
.grade-fail { color: var(--mark); font-weight: 700; }

/* ---------- Listen ---------- */
.checklist { list-style: none; margin: 0 0 1.2em; max-width: var(--measure); }
.checklist li { padding-left: 36px; position: relative; margin-bottom: 12px; }
.checklist li::before {
  content: "✓";
  position: absolute; left: 0; top: 2px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--board); color: #fff;
  font-size: 0.85rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
ol.steps { counter-reset: step; list-style: none; margin: 16px 0 1.2em; max-width: var(--measure); }
ol.steps li { counter-increment: step; padding-left: 50px; position: relative; margin-bottom: 18px; }
ol.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #fdf3e0;
  border: 2px solid var(--mark);
  color: var(--mark);
  font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
}
ul.plain { margin: 0 0 1.2em 1.2em; max-width: var(--measure); }
ul.plain li { margin-bottom: 8px; }

/* ---------- FAQ ---------- */
details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  padding: 4px 22px;
  transition: box-shadow 0.18s ease;
}
details:hover { box-shadow: var(--shadow-sm); }
details[open] { box-shadow: var(--shadow-sm); border-color: #cdd6d0; }
summary {
  cursor: pointer; font-weight: 700;
  padding: 16px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; font-size: 1.5rem; color: var(--mark); flex: 0 0 auto;
  transition: transform 0.2s ease;
}
details[open] summary::after { transform: rotate(45deg); }
details p { padding-bottom: 18px; }

/* ---------- Hinweisbox ---------- */
.note {
  border-left: 6px solid var(--gold);
  background: #fdf6e7;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 28px 0;
}
.note p { margin-bottom: 0; }

/* ---------- Lead-Formular ---------- */
.lead {
  background:
    radial-gradient(700px 400px at 90% 0%, rgba(242, 194, 107, 0.14), transparent 55%),
    linear-gradient(150deg, #233048 0%, #16213a 100%);
  color: #e7ebf2;
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 60px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 48px);
  align-items: center;
  box-shadow: var(--shadow-md);
}
.lead h2 { color: #fff; }
.lead p { color: #ccd5e4; }
.lead .benefits { list-style: none; margin-top: 18px; }
.lead .benefits li { padding-left: 30px; position: relative; margin-bottom: 11px; }
.lead .benefits li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }
form.leadform { display: grid; gap: 15px; }
form.leadform .row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
form.leadform label {
  display: block; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: #b9c4d6; margin-bottom: 6px;
}
form.leadform input, form.leadform select {
  width: 100%;
  padding: 14px 15px;
  border-radius: 12px;
  border: 1px solid #4a5876;
  background: #2a3a5c;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
form.leadform input:focus, form.leadform select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(242, 194, 107, 0.25);
  outline: none;
}
form.leadform input::placeholder { color: #93a1b8; }
form.leadform .btn-primary { width: 100%; justify-content: center; font-size: 1.08rem; padding: 17px; }
.form-hint { font-size: 0.8rem; color: #aab6c9; max-width: none; }
.form-success {
  display: none;
  background: #2a5447;
  border: 1px solid #3d7a64;
  color: #fff; font-weight: 600;
  padding: 16px 18px; border-radius: 12px;
}

/* ---------- Footer ---------- */
footer {
  background: var(--board-deep);
  color: #d3e2d8;
  padding: 44px 0 32px;
  margin-top: 72px;
  font-size: 0.93rem;
}
footer a { color: #fff; }
footer .cols { display: flex; gap: 40px; flex-wrap: wrap; justify-content: space-between; }
footer .legal { margin-top: 28px; color: #a9c4b4; font-size: 0.83rem; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 0.86rem; padding: 14px 0 0; }
.breadcrumb ol { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb li + li::before { content: "›"; margin-right: 8px; }

/* ---------- Responsiv ---------- */
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { max-width: 420px; margin: 24px auto 0; }
  .lead { grid-template-columns: 1fr; }
  .hero-facts { max-width: none; }
}

@media (max-width: 560px) {
  /* Hamburger-Menü */
  .nav-toggle { display: flex; }

  /* Mobile-Nav-Panel mit @starting-style-Animation (CSS 2024+) */
  .nav {
    display: none;
    position: absolute;
    inset: 100% 0 auto 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    flex-direction: column;
    padding: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(27, 37, 54, 0.12);
    z-index: 100;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.22s ease, transform 0.22s ease,
                display 0.22s allow-discrete;
  }
  .nav.is-open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }
  @starting-style {
    .nav.is-open {
      opacity: 0;
      transform: translateY(-6px);
    }
  }

  .nav a {
    padding: 16px clamp(18px, 5vw, 28px);
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
  }
  .nav a:last-child { border-bottom: none; }

  /* Key-Facts 2 × 2 auf kleinen Displays */
  .hero-facts { background: transparent; border: none; gap: 8px; }
  .hero-fact {
    flex: 1 1 calc(50% - 4px);
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
  }

  /* Gestapelte CTAs */
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { justify-content: center; }

  .hero-art { max-width: 280px; }

  form.leadform .row { grid-template-columns: 1fr; }
}
