/* Lokal gehostete Schriften (kein Google Fonts / kein externes Nachladen) */
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("/assets/fonts/playfairdisplay-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/jost-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/caveat-600.woff2") format("woff2");
}

:root {
  --cream: #f7f2e7;
  --cream-soft: #fbf8f1;
  --ink: #1c1a17;
  --ink-soft: #4a463f;
  --ink-deep: #100e0c;
  --gold: #b8923f;
  --gold-light: #d9b76a;
  --gold-soft: #f6ecd8;
  --gold-dark: #8a6a2a;
  --teal: #1f5b66;
  --teal-light: #3f8a98;
  --teal-soft: #e4eeee;
  --line: #e3dac6;
  --line-dark: rgba(255, 255, 255, 0.14);
  --radius: 18px;
  --shadow: 0 10px 30px rgba(28, 26, 23, 0.08);
  --shadow-lift: 0 16px 36px rgba(28, 26, 23, 0.12);
  --glow-gold: 0 0 1px rgba(217, 183, 106, 0.9), 0 0 80px rgba(184, 146, 63, 0.35);
  --glow-teal: 0 0 1px rgba(63, 138, 152, 0.9), 0 0 80px rgba(31, 91, 102, 0.4);
  --serif: "Playfair Display", "Georgia", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --script: "Caveat", cursive;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-spring-out: cubic-bezier(0.34, 1.56, 0.64, 1); /* easeOutBack, easings.co - leichtes Überschwingen */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--cream);
  /* Feines Papier-Korn statt planer Flaeche - passt thematisch zu
     Schreibwaren und ist rein CSS (kein externes Bild, keine Ladezeit). */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  line-height: 1.6;
}

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

a { color: inherit; text-decoration: none; }

/* Sichtbar erst bei Tastatur-Fokus - liegt oben links ueber allem. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 8px 0;
  font-size: 0.9rem;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.05;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 5.5vw, 4.2rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }

p { margin: 0 0 1em; color: var(--ink-soft); }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide { max-width: 1320px; margin: 0 auto; padding: 0 24px; }

/* Kicker/Eyebrow-Muster mit Linien-Flankierung, wiederverwendbar ueber
   den Hero hinaus. */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 0.76rem;
  font-weight: 600;
}
.kicker::before { content: ""; width: 24px; height: 1px; background: currentColor; opacity: 0.55; }

/* Umriss-Text (nur Kontur, kein Fuellton) fuer Headline-Akzente. */
.text-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px currentColor;
}

/* Marquee: endlos laufendes Textband. Inhalt wird im Markup verdoppelt,
   die Animation verschiebt genau um die halbe Breite -> nahtlose Schleife.
   Pausiert bei Hover und respektiert prefers-reduced-motion. */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: inline-flex;
  width: max-content;
  animation: marqueeScroll 26s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 0 28px;
  white-space: nowrap;
}
.marquee-item::after { content: "\2726"; font-size: 0.7em; opacity: 0.5; }

.marquee-gold {
  background: var(--gold-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.marquee-gold .marquee-item {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--gold-dark);
}
.marquee-gold .marquee-item::after { color: var(--gold); opacity: 0.7; }
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* Scroll-Fortschrittsbalken, site-weit fix am oberen Rand (main.js setzt
   --scroll-progress ueber denselben rAF-throttled Handler wie der
   Hero-Parallax). */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left;
  background: linear-gradient(90deg, var(--gold), var(--teal));
  z-index: 200;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .scroll-progress { display: none; }
}

/* Dunkle Section fuer bewussten Hell/Dunkel-Wechsel. */
.section-dark {
  background: var(--ink-deep);
  color: rgba(255, 255, 255, 0.92);
  position: relative;
  overflow: hidden;
}
.section-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: rgba(255, 255, 255, 0.68); }

/* Asymmetrischer Intro-Block: grosses Kontur-Wort liegt als Textur hinter
   dem eigentlichen Text, statt zentriertem Standard-Header. */
.intro-asym { position: relative; overflow: hidden; padding-top: 0.15em; }
.intro-ghost {
  position: absolute;
  top: 0;
  left: -0.03em;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(4.5rem, 15vw, 12rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  z-index: 0;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
body.page-nachhilfe .intro-ghost { -webkit-text-stroke-color: rgba(31, 91, 102, 0.25); }
.intro-copy { position: relative; z-index: 1; max-width: 620px; }
.intro-copy h1 { margin-bottom: 0.4em; }

/* Zwei Karten leicht versetzt statt gespiegelt-symmetrisch. */
.two-col-overlap > :nth-child(2) { margin-top: 48px; }
@media (max-width: 860px) {
  .two-col-overlap > :nth-child(2) { margin-top: 0; }
}

/* Editorische Index-Liste als Alternative zum Icon-Karten-Grid - bricht
   den Karten-Rhythmus fuer diese eine Section bewusst auf. */
.index-list { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--line); }
.section-dark .index-list { border-top-color: var(--line-dark); }
.index-list li {
  display: flex;
  align-items: baseline;
  gap: 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.section-dark .index-list li { border-bottom-color: var(--line-dark); }
.index-list .index-num {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-light);
  flex: 0 0 auto;
  width: 40px;
}
.index-list h3 { margin-bottom: 4px; }
.index-list p { margin: 0; }
.section-dark .index-list h3 { color: #fff; }

/* Sticky-Stack: Admin-Leiste + Header kleben zusammen als ein Block am
   oberen Rand - egal wie hoch die Admin-Leiste ist (bricht auf schmalen
   Screens in zwei Zeilen um), kein hartkodierter Offset nötig. */
.sticky-stack { position: sticky; top: 0; z-index: 60; }

/* Admin bar (WordPress-artiger Umschalter zwischen Webseite & Backend) */
.admin-bar {
  background: var(--ink);
  color: #d8d3c6;
}
.admin-bar-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  font-size: 0.8rem;
  flex-wrap: wrap;
}
.admin-bar strong { color: #fff; }
.admin-bar-switch { color: #fff; font-weight: 600; }
.admin-bar-switch:hover { color: var(--gold-light); }
.admin-bar-right { display: flex; align-items: center; gap: 16px; }
.admin-bar-right a {
  color: #fff;
  font-weight: 600;
}
.admin-bar-right a:hover { color: var(--gold-light); }

/* Header */
/* Kein backdrop-filter: das sitzt sticky ueber der ganzen Seite und
   erzwingt in Safari auf dem Mac bei JEDEM Scroll-Frame ein teures
   Neu-Weichzeichnen von allem, was darunter vorbeischiebt - der
   bekannteste WebKit-Performance-Killer fuer sticky/fixed Header.
   Stattdessen ein deckenderer Hintergrund ohne Blur. */
.site-header {
  position: relative;
  background: rgba(247, 242, 231, 0.98);
  border-bottom: 1px solid var(--line);
}

/* Nachhilfe trägt einen eigenen Ton statt dem Standard-Creme der
   Startseite - Klasse kommt aus public_header.php, abgeleitet vom
   aktuellen Skriptnamen. Schreibwaren nutzt bewusst wieder das
   Standard-Creme wie die Startseite. */
body.page-nachhilfe { background-color: var(--teal-soft); }
body.page-nachhilfe .site-header { background: rgba(228, 238, 238, 0.98); }

/* Startseite bekommt einen weißen statt cremefarbenen Header. */
body.page-home .site-header { background: rgba(255, 255, 255, 0.98); }

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: 1140px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.2rem;
}

.brand img { height: 48px; width: auto; border-radius: 8px; }

nav.main-nav { display: flex; gap: 28px; align-items: center; }

nav.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}
nav.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s var(--ease-out);
}

nav.main-nav a:hover { color: var(--teal); }
nav.main-nav a:hover::after { transform: scaleX(1); }

nav.main-nav a.active { color: var(--teal); }
nav.main-nav a.active::after { background: var(--gold); transform: scaleX(1); }
body.page-nachhilfe nav.main-nav a.active::after { background: var(--teal); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Hero - Vollbild-Cinema-Look mit Foto, riesiger Headline und Scroll-Zoom */
.hero {
  --p: 0; /* Scroll-Fortschritt 0 -> 1, wird per JS beim Scrollen gesetzt */
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  color: #fff;
  padding: 70px 24px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url("/assets/img/hero-schreibwaren.webp") center 58% / cover no-repeat;
  z-index: 0;
  animation: heroBgReveal 1.4s var(--ease-out) backwards;
}

/* Einmaliger "Reveal" beim Laden der Seite: Hintergrund zoomt sanft rein,
   Textblöcke fahren nacheinander gestaffelt hoch (70ms-Stagger, siehe
   Emil-Kowalski-Regel: 30-80ms zwischen Elementen, nie alles auf einmal).
   Läuft komplett separat vom Scroll-Parallax (--p) und übergibt danach
   nahtlos an dieses. */
@keyframes heroBgReveal {
  from { opacity: 0; transform: scale(1.1); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes heroReveal {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Korn ist direkt als zusaetzlicher (statischer) background-image-Layer mit
   eigener Deck-Opazitaet in die SVG gebacken, statt als separates
   mix-blend-mode-Pseudoelement ueber dem animierenden .hero-bg: eine
   Blend-Mode-Ebene ueber einer sich staendig skalierenden Ebene erzwingt
   pro Frame ein teures Neu-Compositing - das war die Hauptursache fuer das
   Ruckeln beim Scrollen im Hero. .hero-overlay selbst ist statisch und
   kann als eigene Ebene einmalig zusammengesetzt werden. */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 65% 58% at 50% 46%, rgba(8, 7, 10, 0.6), transparent 72%),
    linear-gradient(
      to bottom,
      rgba(8, 7, 10, 0.72) 0%,
      rgba(8, 7, 10, 0.34) 26%,
      rgba(8, 7, 10, 0.42) 62%,
      rgba(8, 7, 10, 0.84) 100%
    );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
}

/* Hero-Inhalt (Text + Buttons) bewegt sich bewusst NICHT mehr mit dem
   Scrollen mit - nur noch die einmalige Eintritts-Animation beim Laden.
   Der frühere Scroll-Parallax (transform/opacity per calc(var(--p)...))
   verursachte in Safari sichtbares Zittern, aus demselben Grund wie das
   .hero-bg-Scale (siehe dort) - daher komplett entfernt statt weiter
   optimiert. */
.hero-parallax {
  animation: heroReveal 700ms var(--ease-out) backwards;
}
.hero-eyebrow.hero-parallax { animation-delay: 0ms; }
.hero-logo-wrap.hero-parallax { animation-delay: 70ms; }
.hero .tagline.hero-parallax { animation-delay: 140ms; }
.hero .lead.hero-parallax { animation-delay: 210ms; }
.hero-ctas.hero-parallax { animation-delay: 280ms; }

.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-light);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  margin-bottom: 22px;
}
.hero-eyebrow::before,
.hero-eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

/* Logo-Grafik im Hero (ersetzt den früheren "NO5"-Schriftzug als Text).
   drop-shadow statt box-shadow, damit der Schatten der freigestellten
   PNG-Form folgt statt einem rechteckigen Bounding-Box-Schatten - plus ein
   heller Glow, damit sich die überwiegend dunkle Grafik vom dunklen
   Hero-Foto abhebt. */
.hero-logo-wrap { margin: 0; }

.hero-logo-mark {
  display: block;
  width: min(560px, 72vw);
  height: auto;
  margin: 0 auto 18px;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 46px rgba(255, 255, 255, 0.22));
}

.hero .tagline {
  font-family: var(--script);
  font-size: 1.7rem;
  color: #fff;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.55);
  margin-bottom: 22px;
}

.hero .lead {
  max-width: 540px;
  margin: 0 auto 36px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-ctas-linebreak { flex-basis: 100%; height: 0; }

.hero-scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  width: 22px;
  height: 22px;
  z-index: 2;
  color: #fff;
  opacity: calc(0.75 - var(--p) * 3);
  animation:
    heroScrollBounce 1.8s var(--ease-in-out) infinite,
    heroCueReveal 500ms var(--ease-out) 1050ms backwards;
}
@keyframes heroScrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}
@keyframes heroCueReveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Schreibwaren-Icons "fliegen" beim Laden der Seite mit Feder-Kurve
   (leichtes Überschwingen) von außen ins Bild und setzen sich - die
   2D-Antwort auf ein 3D-Splash-Intro: dieselbe "die Szene baut sich vor
   dir auf"-Energie, nur mit Transform/Opacity statt echter Physik-Sim. */
.hero-assemble {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.55));
}

.hero-icon {
  position: absolute;
  top: var(--top);
  left: var(--left);
  width: var(--size, 26px);
  height: var(--size, 26px);
  color: #fff;
  animation: heroIconAssemble 900ms var(--ease-spring-out) var(--delay, 0ms) both;
}
.hero-icon svg { width: 100%; height: 100%; display: block; }

@keyframes heroIconAssemble {
  from {
    opacity: 0;
    transform: translate(var(--fx), var(--fy)) rotate(calc(var(--rx) + var(--fr))) scale(0.3);
  }
  60% { opacity: 1; }
  to {
    opacity: var(--rest-op, 0.45);
    transform: translate(0, 0) rotate(var(--rx)) scale(1);
  }
}

@media (max-width: 720px) {
  .hero-assemble { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-icon {
    animation: none;
    opacity: var(--rest-op, 0.45);
    transform: rotate(var(--rx));
  }
}

/* Reduziert, nicht null: Bewegung (Zoom, Verschiebung) fällt komplett weg,
   ein kurzes Ein-/Ausblenden bleibt - das hilft weiter zu verstehen, was
   erscheint, ohne irgendwas zu verschieben oder zu skalieren. */
@keyframes heroFadeReduced {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg { transform: none !important; animation: heroFadeReduced 300ms ease !important; }
  .hero-parallax { transform: none !important; opacity: 1 !important; animation: heroFadeReduced 250ms ease !important; }
  .hero-scroll-cue { animation: none; }
}

@media (max-width: 560px) {
  .hero { min-height: 86vh; padding: 60px 20px; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(-1px) scale(0.97); }

.btn-gold {
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 65%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(184, 146, 63, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-gold:hover {
  background: linear-gradient(180deg, var(--gold-light), #a37f34 70%);
  box-shadow: 0 14px 30px rgba(184, 146, 63, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-teal {
  background: linear-gradient(180deg, #2d7183, var(--teal) 65%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(31, 91, 102, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-teal:hover {
  background: linear-gradient(180deg, #2d7183, #17454e 70%);
  box-shadow: 0 14px 30px rgba(31, 91, 102, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--cream); }

/* Variante für dunkle Flächen (z.B. Hero-Foto) - heller Rand/Text statt ink. */
.btn-outline-light { background: transparent; border-color: rgba(255, 255, 255, 0.7); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Scroll-Reveal: Karten/Kacheln blenden beim Reinscrollen gestaffelt ein
   (IntersectionObserver in main.js schaltet .is-visible). Nur transform +
   opacity, reduced-motion zeigt Endzustand sofort ohne Bewegung. */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  will-change: transform, opacity;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.reveal:nth-child(1) { transition-delay: 0ms; }
.reveal:nth-child(2) { transition-delay: 60ms; }
.reveal:nth-child(3) { transition-delay: 120ms; }
.reveal:nth-child(4) { transition-delay: 180ms; }
.reveal:nth-child(5) { transition-delay: 240ms; }
.reveal:nth-child(6) { transition-delay: 300ms; }
.reveal:nth-child(7) { transition-delay: 360ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Text-Reveal (fuer Headlines) statt Fade-Up (fuer Karten) - Bewegungs-
   hierarchie folgt Inhaltshierarchie. Bewusst NUR transform + opacity statt
   clip-path: clip-path-Animationen sind in Safari auf dem Mac deutlich
   teurer/ruckelanfaelliger als in Chrome (kein zuverlaessiges Compositing),
   waehrend transform/opacity ueberall gleich guenstig sind. Der aeussere
   Wrapper (.reveal, ueberflow:hidden) bildet das Sichtfenster, das innere
   Element schiebt sich von unten hinein - optisch fast identisch zum
   Clip-Path-Wipe, nur ohne dessen Kosten. Das .reveal-Element bleibt selbst
   unclipped bis :has() overflow:hidden setzt, damit IntersectionObserver es
   weiterhin korrekt als sichtbar erkennt. */
.reveal-mask-inner {
  display: block;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.7s var(--ease-out), opacity 0.7s var(--ease-out);
}
/* padding-bottom gibt Unterlängen (g, y, p, q, j) Platz, die das
   overflow:hidden der Mask sonst abschneidet (z.B. "Anmeldung"). */
.reveal:has(.reveal-mask-inner) { opacity: 1; transform: none; overflow: hidden; padding-bottom: 0.15em; }
.reveal.is-visible .reveal-mask-inner { transform: translateY(0); opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .reveal-mask-inner { transform: none; opacity: 1; transition: none; }
}

/* Sections */
section { padding: 84px 0 96px; }

section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
body.page-nachhilfe section.alt { border-top: none; border-bottom: none; }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 50px; }

.section-lead { padding: 56px 0 40px; }
.section-empty { padding: 80px 0; text-align: center; }

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
}

.col-layout {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  align-items: start;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  /* opacity mit aufgenommen, obwohl hier nie animiert: .reveal (frueher in
     der Cascade) will ebenfalls opacity ueber transition fahren, eine
     spaeter deklarierte transition-Shorthand ohne opacity wuerde das sonst
     stillschweigend ausser Kraft setzen (Reveal-Fade wuerde hart springen
     statt einzublenden). */
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), opacity 0.6s var(--ease-out);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
body.page-nachhilfe .card { border-color: var(--teal); }
.card-narrow { max-width: 640px; margin: 0 auto; }

.price-two-col { grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) {
  .price-two-col { grid-template-columns: 1fr; }
}
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.price-row:last-child { border-bottom: none; }
.price-value { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-terms { max-width: 640px; margin: 32px auto 0; text-align: center; }
.price-terms p { font-size: 0.9rem; }

.badge-pill {
  display: inline-block;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.badge-pill-gold { background: var(--gold-soft); color: var(--gold-dark); margin-left: 8px; }

.centered-note { max-width: 640px; margin: 16px auto 0; text-align: center; }

/* Icon-Feature-Grid - ersetzt flache Bullet-Listen durch scanbare Karten.
   Teal auf der Nachhilfe-Seite, Gold auf der Schreibwaren-Seite (gleiche
   Farblogik wie die CTA-Buttons je Bereich). */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin: 32px 0;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), opacity 0.6s var(--ease-out);
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
body.page-nachhilfe .feature-card { border-color: var(--teal); }
.feature-card-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-soft);
  color: var(--teal);
}
.feature-card-icon svg { width: 22px; height: 22px; }
/* Textspalte muss als Flex-Kind schrumpfen duerfen (sonst kein Default-
   min-width:0) und lange, unteilbare Woerter (z.B. "Kleingruppenunterricht")
   selbst umbrechen statt ueber den Kachel-Rand zu laufen. */
.feature-card > div { min-width: 0; overflow-wrap: break-word; }
.feature-card-icon-gold { background: var(--gold-soft); color: var(--gold-dark); }
.feature-card h3 { font-size: 1.02rem; margin-bottom: 4px; }
.feature-card p { font-size: 0.88rem; margin: 0; color: var(--ink-soft); }

/* Nummerierter Ablauf (z.B. "So funktioniert's" beim Materiallisten-Upload). */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 36px 0;
}
.process-step { text-align: center; }
.process-step-num {
  width: 40px;
  height: 40px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.process-step h3 { font-size: 1rem; margin-bottom: 6px; }
.process-step p { font-size: 0.88rem; margin: 0; color: var(--ink-soft); }
.section-dark .process-step h3 { color: #fff; }
.section-dark .process-step p { color: rgba(255, 255, 255, 0.68); }

/* Öffnungszeiten-Übersicht auf der Startseite: editorisches Zwei-Spalten-
   Layout (Headline+Text / Tages-Chips), aktueller Wochentag per PHP
   (date('N')) ermittelt und über die Chip-Farbe abgesetzt statt per Badge. */
.hours-grid-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(320px, 1.15fr);
  gap: 56px;
  align-items: center;
}

@media (max-width: 860px) {
  .hours-grid-layout { grid-template-columns: 1fr; }
}

.hours-eyebrow {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  color: var(--teal);
  font-size: 1rem;
  margin-bottom: 14px;
}

.hours-headline {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  line-height: 1.15;
  margin-bottom: 20px;
}
.hours-headline em { font-style: italic; color: var(--gold); }

.hours-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 20px;
  margin-bottom: 0;
}

/* 12 Spalten, damit Zeile 1 (4 Kacheln x 3 Spalten) und Zeile 2 (3 Kacheln
   x 4 Spalten) beide exakt die volle Breite ausfüllen - Wochentage sind
   immer 7, daher feste nth-child-Aufteilung statt generischem Grid-Wrap. */
.hours-chip-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.hours-chip-grid .hours-chip { grid-column: span 3; }
.hours-chip-grid .hours-chip:nth-child(5),
.hours-chip-grid .hours-chip:nth-child(6),
.hours-chip-grid .hours-chip:nth-child(7) { grid-column: span 4; }

@media (max-width: 640px) {
  .hours-chip-grid { grid-template-columns: repeat(2, 1fr); }
  .hours-chip-grid .hours-chip,
  .hours-chip-grid .hours-chip:nth-child(5),
  .hours-chip-grid .hours-chip:nth-child(6),
  .hours-chip-grid .hours-chip:nth-child(7) { grid-column: auto; }
}

.hours-chip {
  background: var(--teal);
  color: #fff;
  border-radius: 16px;
  padding: 18px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.hours-chip-day { font-weight: 700; font-size: 1rem; }
.hours-chip-time {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: var(--sans);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.92);
}
.hours-chip-time-line { display: block; }

.hours-chip.is-today { background: var(--gold); }

.hours-chip.is-closed {
  background: transparent;
  border: 1.5px dashed var(--line);
}
.hours-chip.is-closed .hours-chip-day { color: var(--ink-soft); }
.hours-chip.is-closed .hours-chip-time { color: var(--ink-soft); opacity: 0.85; }

.section-dark .hours-eyebrow { color: var(--gold-light); }
.section-dark .hours-note { color: rgba(255, 255, 255, 0.5); }
.section-dark .hours-chip.is-closed { border-color: rgba(255, 255, 255, 0.25); }
.section-dark .hours-chip.is-closed .hours-chip-day,
.section-dark .hours-chip.is-closed .hours-chip-time { color: rgba(255, 255, 255, 0.55); }

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-grid .full { grid-column: 1 / -1; }

@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.field .hint { font-size: 0.78rem; color: var(--ink-soft); margin-top: 4px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(31, 91, 102, 0.12);
}

textarea { resize: vertical; min-height: 100px; }

.checkbox-row { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 4px; }
.checkbox-row input { width: auto; margin-top: 4px; }
.checkbox-row label { font-size: 0.85rem; color: var(--ink-soft); }

.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.92rem;
}
.alert-success { background: #e6f3e8; color: #245c33; border: 1px solid #bfe2c6; }
.alert-error { background: #fbe9e7; color: #8c2f22; border: 1px solid #f3c6bd; }
.beleg-download { margin-top: 14px; }

/* Footer */
footer.site-footer {
  background: var(--ink);
  color: #cfc9bd;
  padding: 50px 0 24px;
}
footer.site-footer .inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}
footer.site-footer h4 { color: #fff; font-size: 1rem; }
footer.site-footer .inner p { color: #b6b0a3; }
.footer-address-label { color: #fff; font-weight: 600; }
footer.site-footer .footer-about { max-width: 260px; }
footer.site-footer a:hover { color: var(--gold-light); }
footer.site-footer .fine-print {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 18px;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: #9c968a;
}

@media (max-width: 720px) {
  nav.main-nav {
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    margin-top: 8px;
    background: var(--cream-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
    gap: 14px;
    display: none;
  }
  nav.main-nav.open { display: flex; }
  .nav-toggle { display: inline-block; }
}

/* ---------------- Admin ---------------- */
.admin-body { background: var(--cream-soft); min-height: 100vh; }

.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 240px;
  background: var(--ink);
  color: #d8d3c6;
  padding: 26px 20px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.admin-sidebar .brand { color: #fff; margin-bottom: 4px; font-family: var(--serif); font-size: 1.15rem; }
.admin-sidebar .visit-site { display: block; margin-bottom: 26px; font-size: 0.8rem; color: #9c968a; }
.admin-sidebar .visit-site:hover { color: var(--gold-light); }
.admin-sidebar nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
  font-size: 0.92rem;
  color: #d8d3c6;
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { background: rgba(255,255,255,0.08); color: #fff; }
.admin-sidebar .logout { margin-top: 30px; }

.powered-by {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
  color: #9c968a;
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.powered-by:hover { color: var(--gold-light); }
.powered-by img { border-radius: 50%; display: block; }

.admin-sidebar .powered-by { margin-top: auto; }

/* Gleicher Button wie in der Sidebar (kompakt, ohne Trennlinie), aber
   mittig statt linksbündig, da die restliche Login-Karte auch zentriert ist. */
.powered-by-light {
  margin: 22px auto 0;
  padding-top: 0;
  border-top: none;
  width: auto;
  justify-content: center;
  color: var(--ink-soft);
}
.powered-by-light:hover { color: var(--gold); }

dialog.zfeer-dialog {
  border: none;
  border-radius: 20px;
  padding: 40px 44px 32px;
  max-width: 360px;
  width: calc(100% - 40px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  text-align: center;
  color: var(--ink);
}
dialog.zfeer-dialog::backdrop { background: rgba(20, 18, 15, 0.55); backdrop-filter: blur(2px); }
.zfeer-dialog-logo { width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 18px; }
.zfeer-dialog h3 { font-size: 1.5rem; margin-bottom: 10px; }
.zfeer-dialog-version { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 4px; }
.zfeer-dialog-credit { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 24px; }
.zfeer-dialog-actions { display: flex; justify-content: flex-end; }

.admin-main { flex: 1; padding: 34px; max-width: 1200px; min-width: 0; }

@media (max-width: 860px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    min-height: auto;
    position: sticky;
    top: 0;
    z-index: 60;
    padding: 14px 18px;
  }
  .admin-sidebar .brand { margin-bottom: 10px; }
  .admin-sidebar .visit-site { margin-bottom: 12px; }
  .admin-sidebar nav { display: flex; flex-wrap: wrap; gap: 6px; }
  .admin-sidebar nav a { margin-bottom: 0; padding: 8px 12px; }
  .admin-sidebar .logout { margin-top: 12px; }
  .admin-sidebar .powered-by { margin-top: 12px; }
  .admin-main { padding: 20px 16px; }
  th, td { padding: 10px 12px; }
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
  flex-wrap: wrap;
  gap: 12px;
}
.admin-topbar-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.stat-card .num { font-family: var(--serif); font-size: 1.9rem; font-weight: 700; }
.stat-card .label { font-size: 0.82rem; color: var(--ink-soft); }

.table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: var(--cream-soft); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
}
.badge-neu { background: #e4eeee; color: var(--teal); }
.badge-progress { background: #fbeed8; color: var(--gold); }
.badge-ready { background: #dcefe0; color: #2b7a3f; }
.badge-done { background: #ece9e2; color: #6b6559; }

.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-tabs a {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.85rem;
  background: #fff;
}
.filter-tabs a.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Section-Karten mit Drag & Drop zum Sortieren */
.section-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
}
.section-card.dragging { opacity: 0.4; }
.drag-handle {
  cursor: grab;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--ink-soft);
  user-select: none;
  padding: 4px;
  flex-shrink: 0;
}
.drag-handle:active { cursor: grabbing; }
.section-card-info { flex: 1; min-width: 160px; }
.section-card-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Layout-Picker für den 'spalten'-Blocktyp */
.layout-picker { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.layout-option {
  cursor: pointer;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 90px;
  position: relative;
}
.layout-option input { position: absolute; opacity: 0; pointer-events: none; }
.layout-option.active { border-color: var(--teal); background: var(--teal-soft); }
.layout-preview { display: flex; gap: 3px; width: 100%; height: 26px; }
.layout-preview i { display: block; background: var(--gold); border-radius: 3px; opacity: 0.55; font-style: normal; }
.layout-option.active .layout-preview i { opacity: 1; }
.layout-label { font-size: 0.72rem; color: var(--ink-soft); }

.column-editor { margin-bottom: 14px; }
.column-editor h4 { margin-bottom: 14px; }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  padding: 24px;
}
.login-card { max-width: 380px; width: 100%; text-align: center; }
.login-card > img { height: 64px; margin: 0 auto 18px; }
.login-card h2 { font-size: 1.5rem; margin-bottom: 6px; }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px 28px; margin: 20px 0 28px; }
.detail-grid dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); margin-bottom: 3px; }
.detail-grid dd { margin: 0; font-weight: 500; }

.status-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }

.back-link { display: inline-block; margin-bottom: 18px; font-size: 0.88rem; color: var(--teal); }

.small-muted { color: var(--ink-soft); font-size: 0.85rem; }
