/* Markus Holzapfel – Mathematik · Mechanik · Nachhilfe

   Gestaltungsregeln (bitte beibehalten, damit die Seite ruhig bleibt):
   - eine Schrift (Systemschrift), nur Gewichte 400 / 600 / 700
   - feste Größen: Text 1rem · klein .9rem · H3 1.1rem · H2 ~2rem · H1 ~3rem
   - ein Radius für alles (8px), keine Schatten, keine Pillen, keine gestrichelten Rahmen
   - Farben: Text, gedämpfter Text, Linie, Navy/Blau als einziger Akzent
   - Abstände in 8er-Schritten (8 · 16 · 24 · 32 · 48 · 64 · 96)
   Hell/Dunkel: alle Farben hängen an Variablen (:root = hell, [data-theme="dark"] = dunkel),
   umgeschaltet per Schieberegler (theme.js), Standard = Systemeinstellung. */

:root {
  --bg: #fff;
  --surface: #fff;
  --soft: #f6f8fb;
  --ink: #1a2438;
  --heading: #0d2a56;
  --muted: #5b6780;
  --line: #e3e8f0;

  --accent: #2459ab;      /* Links und Hervorhebungen */
  --btn: #0d2a56;
  --btn-hover: #2459ab;
  --btn-line: #0d2a56;

  --bar-bg: rgba(255, 255, 255, .96);
  --switch-bg: #e6edf8;
  --contact-bg: #0d2a56;

  --radius: 8px;
  --wrap: 1080px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b1324;
  --surface: #121d35;
  --soft: #0f192e;
  --ink: #e4ebf7;
  --heading: #f2f6fd;
  --muted: #9db0cd;
  --line: #25344f;

  --accent: #8db7f6;
  --btn: #2f6fcc;
  --btn-hover: #2459ab;
  --btn-line: #6ea4f2;

  --bar-bg: rgba(11, 19, 36, .96);
  --switch-bg: #1c2c4d;
  --contact-bg: #08122a;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }

.wrap { position: relative; z-index: 1; width: min(100% - 48px, var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--btn); color: #fff; padding: 8px 16px; border-radius: var(--radius);
}
.skip:focus { top: 8px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Bildvarianten je nach Design (Logos/Zeichnungen gibt es hell und dunkel) */
.only-dark { display: none; }
:root[data-theme="dark"] .only-dark { display: block; }
:root[data-theme="dark"] .only-light { display: none; }

/* ---------- Typografie ---------- */
h1, h2, h3 { color: var(--heading); line-height: 1.2; margin: 0; letter-spacing: -.015em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.1rem); font-weight: 700; line-height: 1.12; }
h2 { font-size: clamp(1.65rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: 0; }
p { margin: 0; }

.eyebrow { font-size: .9rem; font-weight: 600; color: var(--accent); margin-bottom: 16px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; margin-top: 24px; }
.section-lead { color: var(--muted); max-width: 38em; margin-top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 24px; border-radius: var(--radius);
  background: var(--btn); color: #fff; text-decoration: none;
  font: inherit; font-weight: 600; border: 1px solid var(--btn);
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn-ghost { background: transparent; color: var(--heading); border-color: var(--btn-line); }
.btn-ghost:hover { background: var(--btn); color: #fff; border-color: var(--btn); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: .95rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.bar { position: relative; display: flex; align-items: center; gap: 24px; min-height: 64px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--heading); margin-right: auto; }
.brand img { width: 48px; height: auto; }
.brand strong { font-size: 1.05rem; font-weight: 700; }
.brand strong span { font-weight: 400; }

.nav { display: flex; gap: 32px; }
.nav a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--accent); }

/* Schieberegler Hell/Dunkel */
.theme-switch {
  flex: none; display: inline-flex; align-items: center; padding: 6px 0;
  border: 0; background: none; cursor: pointer; border-radius: 999px;
}
.theme-switch__track {
  position: relative; display: block; width: 52px; height: 28px; border-radius: 999px;
  background: var(--switch-bg); border: 1px solid var(--line);
}
.theme-switch__thumb {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--btn); color: #fff; display: grid; place-items: center;
  transition: transform .2s ease;
}
:root[data-theme="dark"] .theme-switch__thumb { transform: translateX(24px); }
.theme-switch svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.theme-switch .i-moon { display: none; }
:root[data-theme="dark"] .theme-switch .i-sun { display: none; }
:root[data-theme="dark"] .theme-switch .i-moon { display: block; }
@media (prefers-reduced-motion: reduce) { .theme-switch__thumb { transition: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 80px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }

.cta-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }

.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 0; margin: 40px 0 0; color: var(--muted); font-size: .9rem; }
.facts strong { color: var(--heading); font-weight: 600; }

.hero-photo { margin: 0; max-width: 420px; justify-self: end; }
.hero-photo img { width: 100%; border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 22%; }

/* Fotos im dunklen Design leicht abdunkeln */
:root[data-theme="dark"] .hero-photo img,
:root[data-theme="dark"] .about-photo img,
:root[data-theme="dark"] .gallery img { filter: brightness(.9); }

/* ---------- Sektionen ---------- */
.section { padding: 96px 0; }
.section-soft { background: var(--soft); }

.cards { display: grid; gap: 24px; margin-top: 48px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.card p { color: var(--muted); font-size: .95rem; }

/* ---------- Über mich ---------- */
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: center; }
.about-photo { margin: 0; max-width: 400px; }
.about-photo img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; }

.cv { margin: 32px 0 0; display: grid; border-top: 1px solid var(--line); }
.cv > div { display: grid; grid-template-columns: 112px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cv dt { color: var(--muted); font-size: .95rem; }
.cv dd { margin: 0; color: var(--muted); }
.cv dd strong { color: var(--heading); font-weight: 600; }

.quote { margin: 32px 0 0; padding-left: 24px; border-left: 3px solid var(--accent); }
.quote p { font-size: 1.1rem; color: var(--heading); }

/* ---------- Ablauf ---------- */
.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step-no { display: block; font-size: .9rem; font-weight: 600; color: var(--accent); margin-bottom: 8px; }
.steps p { color: var(--muted); margin-top: 8px; max-width: 24em; }

/* ---------- Preise ---------- */
.rates { list-style: none; margin: auto 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.rates li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.rates span { color: var(--muted); font-size: .95rem; }
.rates strong { color: var(--heading); font-size: 1.25rem; font-weight: 600; white-space: nowrap; }
.rates small { font-size: .9rem; font-weight: 400; color: var(--muted); }
.price-notes { margin: 32px 0 0; padding-left: 20px; color: var(--muted); font-size: .95rem; max-width: 46em; }
.price-notes li + li { margin-top: 8px; }

/* ---------- Galerie ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 48px; align-items: start; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { margin-top: 12px; font-size: .9rem; color: var(--muted); }
.hobbies { margin-top: 32px; color: var(--muted); font-size: .95rem; }

/* ---------- Kontakt (in beiden Designs dunkel) ---------- */
.contact { background: var(--contact-bg); color: #fff; }
.contact h2 { color: #fff; }
.contact .section-lead { color: #c4d3ec; }
.contact-card { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .16); color: #fff; text-decoration: none; transition: background .15s; }
a.contact-card:hover { background: rgba(255, 255, 255, .1); }
.contact-card .label { font-size: .9rem; color: #9fbbea; }
.contact-card .value { font-size: 1.15rem; font-weight: 600; overflow-wrap: anywhere; }
.vcard-row { margin-top: 32px; }
.contact .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .5); }
.contact .btn-ghost:hover { background: #fff; color: #0d2a56; border-color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); border-top: 1px solid var(--line); padding: 48px 0; }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 48px; justify-content: space-between; }
.foot img { width: 220px; }
.foot nav { display: flex; gap: 24px; }
.foot nav a { color: var(--ink); font-size: .95rem; }
.foot p { color: var(--muted); font-size: .9rem; }

.callbar { display: none; }

/* ---------- Rechtstexte ---------- */
.legal { padding: 64px 0 96px; max-width: 760px; }
.legal h1 { font-size: 2rem; margin-bottom: 24px; }
.legal h2 { font-size: 1.15rem; font-weight: 600; margin: 32px 0 8px; }
.legal p, .legal li { color: var(--ink); }
.legal ul { padding-left: 20px; }
.legal .legal-note { background: #fff4e5; color: #3a1d00; border: 1px solid #f5b25f; border-radius: var(--radius); padding: 16px; margin-bottom: 32px; font-size: .95rem; }
.legal .legal-note a { color: #5c2f00; }

/* ---------- Prüfmodus: offene Punkte orange markieren ----------
   Aktiv, solange <body class="review"> gesetzt ist. Zum Veröffentlichen die Klasse
   "review" am <body> entfernen (alle Seiten) – dann verschwinden Banner, Boxen und Markierungen. */
:root { --orange: #f08a00; --orange-soft: #ffe3bf; --orange-ink: #5c2f00; }

.review-banner, .offen-box, .offen-tag { display: none; }
.section-tight { padding: 0; }
.review .section-tight { padding: 0 0 8px; }

.review .review-banner { display: block; background: var(--orange); color: #2b1600; text-align: center; font-size: .9rem; padding: 8px 16px; }
.review .review-banner a { color: #2b1600; text-decoration-thickness: 2px; }
.review .review-banner .offen { background: #fff; color: #2b1600; }

.review .offen {
  background: var(--orange-soft); color: var(--orange-ink);
  box-shadow: inset 0 -2px 0 var(--orange); border-radius: 4px; padding: 0 4px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.review .contact .offen { background: #ffd199; color: #3a1d00; }

.review .offen-tag {
  display: inline-block; vertical-align: middle; margin-left: 12px;
  background: var(--orange); color: #2b1600; border-radius: 999px;
  font-size: .75rem; font-weight: 600; padding: 2px 12px; letter-spacing: 0;
}

.review .offen-box {
  display: block; margin-top: 32px; padding: 16px 24px;
  background: #fff4e5; color: var(--orange-ink);
  border: 2px dashed var(--orange); border-radius: var(--radius); font-size: .95rem;
}
.review .offen-box strong { color: #2b1600; }
.review .offen-box ul { margin: 8px 0 0; padding-left: 20px; }
.review .contact .offen-box { background: rgba(240, 138, 0, .16); color: #ffe3bf; border-color: #f5b25f; }
.review .contact .offen-box strong { color: #fff; }

/* Seite "Offene Punkte" */
.open-list { counter-reset: q; list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 16px; }
.open-list > li {
  counter-increment: q; position: relative; padding: 16px 24px 16px 64px;
  background: #fff4e5; color: #3a1d00; border: 2px solid var(--orange); border-radius: var(--radius);
}
.open-list > li::before {
  content: counter(q); position: absolute; left: 16px; top: 16px;
  width: 32px; height: 32px; display: grid; place-items: center;
  background: var(--orange); color: #2b1600; font-weight: 700; border-radius: 50%;
}
.open-list h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 8px; color: #2b1600; }
.open-list ul { margin: 8px 0 0; padding-left: 20px; }
.open-list li li { margin-top: 4px; color: #3a1d00; }
.open-list .hint { color: #6b4a1f; font-size: .9rem; margin-top: 8px; }

/* ---------- Cookie-Hinweis (reiner Info-Hinweis, die Seite setzt keine Cookies) ---------- */
.cookie-hinweis {
  position: fixed; z-index: 70; left: 16px; bottom: 16px; max-width: 440px;
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px;
}
.cookie-hinweis[hidden] { display: none; }
.cookie-hinweis p { font-size: .9rem; line-height: 1.5; color: var(--muted); }
.cookie-hinweis strong { color: var(--heading); font-weight: 600; }
.cookie-hinweis .btn { flex: none; }

/* ---------- Hintergrundzeichnungen (Statik/Reibung) mit Parallax ---------- */
.hero, #kontakt { position: relative; overflow: clip; }
.deko { position: absolute; z-index: 0; max-width: none; height: auto; pointer-events: none; user-select: none; will-change: transform; }
.deko-balken { width: min(900px, 80vw); left: -4%; top: 40%; opacity: .16; }
.deko-ebene-hell { width: min(620px, 90vw); right: -48px; bottom: -64px; opacity: .16; }
:root[data-theme="dark"] .deko-balken { opacity: .2; }
@media print { .deko { display: none; } }

/* ---------- Tablet / Mobil ---------- */
@media (max-width: 980px) {
  .about, .hero-grid { gap: 48px; }
  .cards-3 { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .bar { justify-content: center; }
  .brand { margin-right: 0; }
  .theme-switch { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }

  .hero { padding: 48px 0 64px; }
  .section { padding: 64px 0; }
  .hero-grid, .about { grid-template-columns: 1fr; }
  .cards-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .gallery { grid-template-columns: 1fr; }

  /* mittig ausgerichtet */
  .hero-copy, .about-copy, .steps, .gallery figure, .foot { text-align: center; }
  .lead, .section-lead, .steps p { margin-inline: auto; }
  .section .wrap > h2 { text-align: center; }
  .cta-row { flex-direction: column; align-items: stretch; max-width: 360px; margin-inline: auto; }
  .facts { flex-direction: column; align-items: center; gap: 4px; margin-top: 32px; }
  .hero-photo, .about-photo { justify-self: center; margin-inline: auto; max-width: 320px; }
  .card { text-align: center; align-items: center; }
  .rates { width: 100%; text-align: left; }
  .price { align-items: stretch; text-align: center; }
  .cv > div { grid-template-columns: 1fr; gap: 4px; text-align: center; }
  .quote { border-left: 0; padding-left: 0; margin-inline: auto; max-width: 30em; text-align: center; }
  .quote::before { content: ""; display: block; width: 32px; height: 3px; background: var(--accent); margin: 0 auto 16px; }
  .price-notes { margin-inline: auto; max-width: 30em; text-align: left; }
  .hobbies, .vcard-row { text-align: center; }
  .contact-card { align-items: center; text-align: center; }
  .foot { flex-direction: column; align-items: center; }
  .foot nav { justify-content: center; }

  .deko-balken { width: 170vw; left: -40vw; top: 34%; opacity: .16; }
  .deko-ebene-hell { width: 135vw; right: -50vw; bottom: -40px; opacity: .2; }
}

@media (max-width: 600px) {
  body { font-size: 16px; padding-bottom: 76px; }
  .wrap { width: min(100% - 40px, var(--wrap)); }
  .brand img { width: 44px; }
  .bar .btn-small { display: none; } /* Anrufen sitzt unten in der festen Leiste */

  .callbar {
    position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px;
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
    background: var(--bar-bg); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
  }

  .cookie-hinweis { left: 12px; right: 12px; max-width: none; gap: 12px; padding: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .cookie-hinweis .detail { display: none; }
  .cookie-hinweis p { font-size: .85rem; }
}

@media (max-width: 420px) {
  .brand strong { font-size: .95rem; }
  .theme-switch__track { width: 46px; height: 26px; }
  .theme-switch__thumb { width: 18px; height: 18px; }
  :root[data-theme="dark"] .theme-switch__thumb { transform: translateX(20px); }
}
