/* =========================================================================
   Waldbaden mit Peter — Design-System
   Basiert auf dem Moodboard "Waldbademeister" (Farben, Schriften, Stimmung).
   Cinematic Dunkelwald als Basis, Herbstakzente, Nebellicht.
   ========================================================================= */

/* ---- Design-Tokens ---------------------------------------------------- */
:root {
  /* Farbwelt (aus dem Moodboard) */
  --waldnacht:   #0a1a0f;   /* Basis-Hintergrund, tiefste Tiefe */
  --waldnacht-2: #122218;   /* leicht aufgehellt */
  --rinde:       #2c1810;   /* warmes Dunkelbraun */
  --rinde-2:     #3d2318;
  --moos:        #3a5a2c;   /* Primärgrün */
  --moos-light:  #5a7a4c;   /* helleres Moos, Labels */
  --herbstfeuer: #c4622d;   /* Akzent / Haupt-CTA */
  --herbstfeuer-hell: #d47a3d;
  --goldlicht:   #d4a030;   /* sekundärer Akzent, Highlights */
  --goldlicht-hell: #e4b840;
  --nebel:       #b8bfaa;   /* gedämpftes Licht, Fließtext auf dunkel */
  --morgendunst: #d4dbc8;
  --lichtstrahl: #e8dfc0;
  --creme:       #f0ebe0;   /* hellster Ton, Überschriften auf dunkel */

  /* Semantische Zuordnung — Standard: dunkles, cinematisches Thema */
  --bg:          var(--waldnacht);
  --bg-elev:     #14241a;            /* erhöhte Flächen (Karten) */
  --text:        var(--creme);
  --text-soft:   var(--nebel);
  --text-faint:  rgba(184, 191, 170, 0.55);
  --accent:      var(--herbstfeuer);
  --accent-2:    var(--goldlicht);
  --line:        rgba(184, 191, 170, 0.14);  /* Hairlines */
  --line-strong: rgba(184, 191, 170, 0.28);

  /* Typografie */
  --font-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --font-body:    'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Fluide Typo-Skala (clamp: mobil → desktop) */
  --step--1: clamp(0.82rem, 0.78rem + 0.2vw, 0.92rem);
  --step-0:  clamp(1rem,    0.95rem + 0.25vw, 1.12rem);
  --step-1:  clamp(1.2rem,  1.1rem + 0.5vw,  1.45rem);
  --step-2:  clamp(1.5rem,  1.3rem + 1vw,    2.05rem);
  --step-3:  clamp(1.9rem,  1.55rem + 1.75vw, 2.9rem);
  --step-4:  clamp(2.35rem, 1.8rem + 2.75vw,  4rem);
  --step-5:  clamp(2.8rem,  1.9rem + 4.5vw,   5.4rem);

  /* Abstände (8px-Raster, fluide für große Sprünge) */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  --space-7: clamp(5rem, 3.5rem + 6vw, 9rem);

  /* Form */
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Schatten & Tiefe */
  --shadow:    0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 6px 20px rgba(0, 0, 0, 0.35);
  --glow-accent: 0 8px 30px rgba(196, 98, 45, 0.35);

  /* Bewegung */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 0.2s;
  --t:      0.4s;
  --t-slow: 0.8s;

  /* Layout */
  --container: 1120px;
  --container-narrow: 760px;
  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--step-0);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

img, svg, picture, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }

/* ---- Typografie ------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { max-width: 68ch; }
strong { font-weight: 600; color: var(--text); }

.display {
  font-family: var(--font-display);
  font-weight: 600;
}
.italic { font-style: italic; }

/* Eyebrow / Sektions-Label (kodiert Struktur, kein Dekor) */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--moos-light);
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

/* Lead-Absatz */
.lead {
  font-size: var(--step-1);
  color: var(--text-soft);
  font-weight: 300;
}

/* Akzent-Textfarbe */
.text-accent { color: var(--accent); }
.text-gold   { color: var(--accent-2); }

/* ---- Layout ----------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 0.5rem + 3vw, 2.5rem);
}
.container.narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--space-7); position: relative; }
.section.tight { padding-block: var(--space-6); }

.section-head { max-width: var(--container-narrow); margin-bottom: var(--space-5); }
.section-head .eyebrow { margin-bottom: var(--space-2); }
.section-head h2 { margin-bottom: var(--space-3); }

/* Sektions-Themen (gleiche Palette, andere Gewichtung) */
.section--mist {
  background: linear-gradient(180deg, var(--morgendunst), var(--lichtstrahl));
  --text: var(--rinde);
  --text-soft: #4a3b2e;
  --text-faint: rgba(44, 24, 16, 0.5);
  --bg-elev: #fffaf0;
  --line: rgba(44, 24, 16, 0.14);
  --line-strong: rgba(44, 24, 16, 0.26);
  color: var(--text);
}
.section--bark {
  background: linear-gradient(180deg, var(--rinde), var(--waldnacht));
}
.section--moss {
  background:
    radial-gradient(ellipse 60% 80% at 80% 10%, rgba(58, 90, 44, 0.35) 0%, transparent 60%),
    var(--waldnacht);
}

/* Feine Trennlinie */
.divider {
  width: 64px; height: 1px;
  background: linear-gradient(to right, transparent, var(--moos-light), transparent);
  margin-inline: auto;
}

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step-0);
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 0.95em 1.6em;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t) var(--ease),
              background var(--t) var(--ease),
              border-color var(--t) var(--ease),
              color var(--t) var(--ease);
  will-change: transform;
}
.btn:focus-visible { outline: 2px solid var(--goldlicht); outline-offset: 3px; }

/* Primär = Herbstfeuer (Haupt-CTA) */
.btn--primary {
  background: linear-gradient(135deg, var(--herbstfeuer), var(--herbstfeuer-hell));
  color: var(--creme);
  box-shadow: var(--glow-accent);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(196, 98, 45, 0.5); }

/* Sekundär = Outline */
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* Gold-Variante (z. B. für hellere Sektionen) */
.btn--gold {
  background: linear-gradient(135deg, var(--goldlicht), var(--goldlicht-hell));
  color: var(--waldnacht);
}
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(212, 160, 48, 0.4); }

.btn--lg { font-size: var(--step-1); padding: 1.05em 1.9em; }

/* Text-Link mit Pfeil */
.link-arrow {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-weight: 600; color: var(--accent);
  transition: gap var(--t) var(--ease), color var(--t) var(--ease);
}
.link-arrow::after { content: '→'; transition: transform var(--t) var(--ease); }
.link-arrow:hover { color: var(--goldlicht); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---- Karten ----------------------------------------------------------- */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  transition: transform var(--t) var(--ease),
              border-color var(--t) var(--ease),
              box-shadow var(--t) var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

/* ---- Reduzierte Bewegung respektieren -------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---- Scroll-Reveal (per IntersectionObserver in main.js aktiviert) ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---- Barrierefreiheit ------------------------------------------------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-2); top: -100px;
  background: var(--accent); color: var(--creme);
  padding: 0.6em 1em; border-radius: var(--radius-sm); z-index: 200;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: var(--space-2); }

/* ---- Cursor-Schein ----------------------------------------------------
   Ein weicher Lichtschein, der dem Mauszeiger mit leichter Verzögerung
   nachzieht und den Hintergrund darunter nur ganz leicht aufhellt.
   Keine eigene Farbe: 'soft-light' mit Weiß passt sich jeder Sektion an.
   Wird ausschließlich per JS erzeugt (feiner Zeiger, keine reduced-motion). */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 520px; height: 520px;
  margin: -260px 0 0 -260px;          /* auf den Mittelpunkt zentriert; JS verschiebt per transform */
  border-radius: 50%;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  background: radial-gradient(closest-side,
              rgba(255, 255, 255, 0.12),
              rgba(255, 255, 255, 0.05) 45%,
              transparent 72%);
  mix-blend-mode: soft-light;
  transition: opacity 0.6s var(--ease);
  will-change: transform;
}
.cursor-glow.is-on { opacity: 1; }

/* ---- Bildschutz (Deterrent): Bilder nicht ziehbar/markierbar ---------- */
img { -webkit-user-drag: none; -khtml-user-drag: none; user-select: none; -webkit-user-select: none; }
