/* Naturraum König — Basis-Stylesheet (Variante 1a, Editorial Ruhe) */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --color-teal: #076d6b;
  --color-mauve: #6a4a5a;
  --color-sand: #d9c9b4;

  --bg: #faf8f4;
  --bg-alt: #efeae1;
  --bg-dark-section: #24312f;
  --text: #24312f;
  --text-muted: #4a4a44;
  --text-soft: #6a6a60;
  --border: rgba(0, 0, 0, 0.1);
  --card-bg: #ffffff;

  --font-base: 'Poppins', sans-serif;

  color-scheme: light dark;
}

:root[data-theme="dark"] {
  --bg: #14201f;
  --bg-alt: #1a2624;
  --bg-dark-section: #0c1615;
  --text: #f0ece3;
  --text-muted: #cbc7ba;
  --text-soft: #9a988e;
  --border: rgba(255, 255, 255, 0.12);
  --card-bg: #1e2b29;
}
:root[data-theme="light"] {
  --bg: #faf8f4;
  --bg-alt: #efeae1;
  --bg-dark-section: #24312f;
  --text: #24312f;
  --text-muted: #4a4a44;
  --text-soft: #6a6a60;
  --border: rgba(0, 0, 0, 0.1);
  --card-bg: #ffffff;
}

* { box-sizing: border-box; }

/* Checkbox hack: visually hidden but still clickable via <label for>. Used for
   dark-mode toggle (#theme-toggle-cb) and the mobile burger menu (#menu-toggle). */
.hidden-toggle {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Dark mode — pure CSS. The toggle acts as an "invert the device default" switch:
   unchecked = follow prefers-color-scheme; checked = flip it the other way.
   Trade-off vs. the JS version: the choice does not persist across reloads. */
body:has(#theme-toggle-cb:checked) {
  --bg: #14201f;
  --bg-alt: #1a2624;
  --bg-dark-section: #0c1615;
  --text: #f0ece3;
  --text-muted: #cbc7ba;
  --text-soft: #9a988e;
  --border: rgba(255, 255, 255, 0.12);
  --card-bg: #1e2b29;
}
@media (prefers-color-scheme: dark) {
  body:not(:has(#theme-toggle-cb:checked)) {
    --bg: #14201f;
    --bg-alt: #1a2624;
    --bg-dark-section: #0c1615;
    --text: #f0ece3;
    --text-muted: #cbc7ba;
    --text-soft: #9a988e;
    --border: rgba(255, 255, 255, 0.12);
    --card-bg: #1e2b29;
  }
  body:has(#theme-toggle-cb:checked) {
    --bg: #faf8f4;
    --bg-alt: #efeae1;
    --bg-dark-section: #24312f;
    --text: #24312f;
    --text-muted: #4a4a44;
    --text-soft: #6a6a60;
    --border: rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
  }
}

html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-base);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4 {
  font-family: var(--font-base);
  font-weight: 600;
  margin: 0;
  color: inherit;
}
h1 { font-size: 52px; line-height: 1.14; }
h2 { font-size: 36px; line-height: 1.2; }
h3 { font-size: 23px; line-height: 1.3; }

p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: var(--color-teal); text-decoration: none; }
a:hover { color: var(--color-mauve); }

/* =========================================================
   TOOLKIT — reusable building blocks for adding new sections
   ========================================================= */

/* --- Section shell: pick ONE background variant per section --- */
.section { padding: 90px 64px; }
.section--tight-top { padding-top: 20px; padding-bottom: 80px; }

.section--bg-base { background: var(--bg); color: var(--text); }
.section--bg-alt { background: var(--bg-alt); color: var(--text); }
.section--bg-dark { background: var(--bg-dark-section); color: #faf8f4; }

/* add on top of any bg variant to drop in a full-bleed background photo */
.section--bg-image { position: relative; overflow: hidden; }
.section__bg-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; opacity: 0.22;
}
.section__content { position: relative; }

/* --- Layout: two-column split (image+text or text+form) --- */
.split { display: grid; gap: 56px; align-items: center; }
.split--balanced { grid-template-columns: 1fr 1fr; }
.split--lead { grid-template-columns: 1.1fr 0.9fr; }       /* text leads, e.g. hero */
.split--media-lead { grid-template-columns: 0.85fr 1.15fr; } /* second column leads, e.g. about, contact */
.split__content { min-width: 0; }
.split__media { position: relative; min-width: 0; }

/* --- Layout: even card/content grid --- */
.grid { display: grid; gap: 40px; }
.grid--2 { grid-template-columns: 1fr 1fr; }

/* --- Layout: centered intro block above a grid/list --- */
.stack { max-width: 680px; }
.stack--intro { margin-bottom: 56px; }

/* --- Media: image (+ optional caption / badge / decorative block) --- */
.media { position: relative; overflow: hidden; }
.media img { width: 100%; object-fit: cover; border: 1px solid var(--border); display: block; }
.media--tall img { height: 520px; }
.media--std img { height: 460px; }
.media--wide img { height: 340px; }
.media--full-bleed { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.media--full-bleed img { height: 420px; border: none; }
.media__caption { margin-top: 12px; font-size: 12px; color: var(--text-soft); font-style: italic; }

.accent-block { position: absolute; bottom: -22px; left: -22px; width: 120px; height: 120px; background: var(--color-sand); z-index: -1; }

.badge {
  position: absolute; background: var(--card-bg); border: 1px solid var(--border);
  padding: 14px 18px; text-align: center; box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.badge--tr { top: 20px; right: -16px; }
.badge__num { font-size: 26px; font-weight: 600; color: var(--color-teal); line-height: 1; }
.badge__label { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-soft); margin-top: 4px; }

/* --- Text helpers --- */
.eyebrow {
  font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--color-teal); margin-bottom: 18px;
}
.eyebrow--invert { color: var(--color-sand); }

.subtitle { font-size: 14.5px; color: var(--color-mauve); margin: 4px 0 18px; }

.lead { font-size: 16.5px; line-height: 1.7; color: var(--text-muted); margin-bottom: 18px; }
.lead:last-of-type { margin-bottom: 0; }

.pull-quote { font-style: italic; color: var(--color-mauve); line-height: 1.4; font-size: 22px; margin: 22px 0; }
.pull-quote--lg { font-size: 30px; line-height: 1.5; }
.pull-quote--invert { color: var(--color-sand); }

.fine-print { font-size: 13.5px; color: var(--text-soft); border-top: 1px solid var(--border); padding-top: 18px; }
.fine-print--list { border-top: none; padding-top: 0; line-height: 2; }

.list-dash { margin: 20px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--text-muted); line-height: 2; }
.list-dash--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 40px; font-size: 15.5px; line-height: 1.6; }

/* --- Cards --- */
.card { background: var(--card-bg); }
.card--divider { border-top: 2px solid var(--accent, var(--color-teal)); padding-top: 28px; background: transparent; }
.card--dashed { border: 1.5px dashed var(--border); border-radius: 4px; padding: 30px; }
.card__quote { font-size: 12px; font-family: ui-monospace, Menlo, monospace; color: var(--text-soft); margin-bottom: 14px; }
.card__source { font-size: 14px; color: var(--text-soft); }

/* --- Buttons --- */
.btn {
  display: inline-block; padding: 15px 30px; border-radius: 2px;
  font-size: 15px; font-weight: 500; font-family: var(--font-base);
  cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--color-teal); color: #fff; }
.btn-primary:hover { background: var(--color-mauve); color: #fff; }
.btn-secondary { background: transparent; border-color: currentColor; color: inherit; }
.btn-secondary:hover { border-color: var(--color-teal); color: var(--color-teal); }
.cta-group { display: flex; gap: 16px; margin-top: 20px; }

/* --- Form --- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid input, .form-grid textarea {
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 2px;
  font-size: 15px; font-family: var(--font-base); background: var(--card-bg); color: var(--text);
}
.form-grid input:focus, .form-grid textarea:focus { outline: none; border-color: var(--color-teal); }
.form-grid .full { grid-column: span 2; }
.form-grid textarea { resize: none; }
.form-grid button { grid-column: span 2; justify-self: start; padding: 16px 36px; }

/* --- Accordion (pure HTML/CSS via <details>/<summary>) --- */
.accordion { max-width: 820px; }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 0;
  font-size: 17px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  color: var(--color-teal);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.accordion-item[open] summary::after { content: '\2212'; }
.accordion-item .accordion-body {
  padding: 0 0 24px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-muted);
}

/* =========================================================
   Page chrome — nav, theme toggle, footer (not content sections)
   ========================================================= */

.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 64px; position: sticky; top: 0; z-index: 100;
  background: var(--bg); border-bottom: 1px solid transparent;
  transition: padding 0.2s ease, background-color 0.25s ease, border-color 0.2s ease;
}
.nav.scrolled { padding-top: 14px; padding-bottom: 14px; border-bottom-color: var(--border); box-shadow: 0 2px 16px rgba(0,0,0,0.06); }
.nav.scrolled .nav-logo .logo { height: 60px; }
/* Note: the scroll-triggered shrink (.scrolled) previously needed JS to toggle the class;
   without JS the nav keeps a single fixed size while remaining sticky. */
/* Logo: inline SVG (<use>), color follows --logo-color via currentColor */
.logo {
  display: block; height: 80px; width: auto; aspect-ratio: 566.9 / 410;
  color: var(--logo-color, var(--color-teal)); fill: currentColor;
  transition: height .25s ease, color .25s ease;
}
.nav-logo .logo { --logo-color: var(--color-teal); }
body:has(#theme-toggle-cb:checked) .nav-logo .logo { --logo-color: var(--color-sand); }
@media (prefers-color-scheme: dark) {
  body:not(:has(#theme-toggle-cb:checked)) .nav-logo .logo { --logo-color: var(--color-sand); }
  body:has(#theme-toggle-cb:checked) .nav-logo .logo { --logo-color: var(--color-teal); }
}
.nav-links { display: flex; align-items: center; gap: 36px; font-size: 14.5px; }
.nav-links a { color: var(--text); }
.nav-links a:hover { color: var(--color-teal); }
.nav-links a.btn-primary { color: #fff; }
.nav-links a.btn-primary:hover { color: #fff; }

.burger {
  display: none; width: 32px; height: 32px; border: none; background: none; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 6px; padding: 0;
}
.burger span { display: block; width: 22px; height: 2px; background: var(--text); transition: transform 0.3s ease, opacity 0.2s ease; }
.burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-link-wrap { display: contents; }

.theme-toggle {
  position: relative; width: 56px; height: 30px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-alt); cursor: pointer; padding: 0; flex-shrink: 0;
}
.theme-toggle .track-icon { position: absolute; top: 50%; transform: translateY(-50%); font-size: 13px; line-height: 1; }
.theme-toggle .track-icon.sun { left: 7px; color: #f5c542; }
.theme-toggle .track-icon.moon { right: 7px; color: var(--text-soft); }
.theme-toggle .knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--color-teal); transition: transform 0.25s ease, background-color 0.25s ease; }
body:has(#theme-toggle-cb:checked) .theme-toggle .knob { transform: translateX(26px); background: var(--color-mauve); }
@media (prefers-color-scheme: dark) {
  body:not(:has(#theme-toggle-cb:checked)) .theme-toggle .knob { transform: translateX(26px); background: var(--color-mauve); }
  body:has(#theme-toggle-cb:checked) .theme-toggle .knob { transform: none; background: var(--color-teal); }
}

.site-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 32px 64px; background: var(--bg-dark-section); color: var(--color-sand); font-size: 13.5px;
}
.site-footer .logo { height: 96px; --logo-color: var(--color-sand); }

/* =========================================================
   Mobile-first refinements (up to 900px)
   ========================================================= */
@media (max-width: 900px) {
  .section { padding: 48px 20px; }
  .section--tight-top { padding-top: 0; padding-bottom: 44px; }

  h1 { font-size: 28px; line-height: 1.22; }
  h2 { font-size: 24px; }
  h3 { font-size: 19px; }

  .split { grid-template-columns: 1fr; display: flex; flex-direction: column; gap: 24px; }
  .split__media { order: -1; margin: 0 -20px; }
  .split__media .media img, .split__media.media img { border: none; }
  .media--tall img { height: 62vh; min-height: 320px; max-height: 460px; }
  .media--std img { height: 300px; }
  .media--wide img { height: 220px; }
  .media--full-bleed img { height: 260px; }
  .accent-block { display: none; }
  .badge--tr { top: auto; right: 20px; bottom: 16px; padding: 10px 14px; }

  .grid--2 { grid-template-columns: 1fr; gap: 32px; }
  .list-dash--grid { grid-template-columns: 1fr; }

  .cta-group { flex-direction: column; gap: 12px; }
  .cta-group .btn { width: 100%; text-align: center; }

  .pull-quote { font-size: 19px; }
  .pull-quote--lg { font-size: 20px; }

  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: 1; }
  .form-grid button { width: 100%; text-align: center; }

  .accordion-item summary { font-size: 15.5px; padding: 18px 0; }
  .accordion-item .accordion-body { font-size: 14.5px; padding-bottom: 20px; }

  /* Nav + burger */
  .nav { padding: 14px 20px; }
  .nav.scrolled { padding-top: 10px; padding-bottom: 10px; }
  .nav-logo .logo { height: 56px; }
  .burger { display: flex; }
  .nav-links {
    position: fixed; top: 0; right: 0; height: 100vh; width: 260px; max-width: 80vw;
    background: var(--bg); flex-direction: column; align-items: flex-start; justify-content: flex-start;
    padding: 88px 28px 28px; gap: 22px; font-size: 16px;
    transform: translateX(100%); transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: none; z-index: 90;
  }
  body:has(#menu-toggle:checked) .nav-links { transform: translateX(0); box-shadow: -8px 0 24px rgba(0,0,0,0.18); }
  .nav-links.open { transform: translateX(0); box-shadow: -8px 0 24px rgba(0,0,0,0.18); }
  .nav-close { position: absolute; top: 22px; right: 24px; width: 32px; height: 32px; border: none; background: none; cursor: pointer; }
  .nav-close::before, .nav-close::after { content: ''; position: absolute; top: 50%; left: 50%; width: 20px; height: 2px; background: var(--text); }
  .nav-close::before { transform: translate(-50%, -50%) rotate(45deg); }
  .nav-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
  .nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 80; cursor: pointer; }
  body:has(#menu-toggle:checked) .nav-overlay { display: block; }

  .site-footer { flex-direction: column; gap: 12px; text-align: center; padding: 28px 20px; }
}
