/* ===========================================================================
   reeh.at — One-Pager. Ein Stylesheet, keine externen Ressourcen.
   Farbschema über Tokens: hell als Basis, dunkel per prefers-color-scheme
   und per data-theme="dark" (Schalter im Header). Der Guard
   :root:not([data-theme="light"]) sorgt dafür, dass eine bewusste Wahl
   "hell" die Systemvorliebe schlägt.
   ========================================================================= */

:root {
  --bg:        #fbfaf8;
  --bg-alt:    #f2f0ec;
  --surface:   #ffffff;
  --border:    #e2ded7;
  --text:      #22201d;
  --muted:     #64605a;
  --accent:    #2f8b7d;
  --accent-ink:#1f6b5f;
  --shadow:    0 1px 2px rgba(34, 32, 29, .05), 0 8px 24px rgba(34, 32, 29, .06);
  --radius:    14px;
  --maxw:      52rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #15171a;
    --bg-alt:    #1b1e22;
    --surface:   #1f2329;
    --border:    #2e343c;
    --text:      #e8e6e3;
    --muted:     #a2a8b0;
    --accent:    #56c3b1;
    --accent-ink:#7fd5c6;
    --shadow:    0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  }
}

:root[data-theme="dark"] {
  --bg:        #15171a;
  --bg-alt:    #1b1e22;
  --surface:   #1f2329;
  --border:    #2e343c;
  --text:      #e8e6e3;
  --muted:     #a2a8b0;
  --accent:    #56c3b1;
  --accent-ink:#7fd5c6;
  --shadow:    0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;   /* gegen den klebenden Header bei Ankersprüngen */
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 1rem; }

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .6rem; }
h1 { font-size: clamp(1.9rem, 5.5vw, 2.9rem); }
h2 { font-size: clamp(1.35rem, 3.6vw, 1.8rem); margin-bottom: 1.2rem; }
h3 { font-size: 1.0625rem; }
p  { margin: 0 0 1rem; }
.small { font-size: .9rem; color: var(--muted); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: .6rem 1rem; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------------ Header */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-stuck { border-bottom-color: var(--border); box-shadow: var(--shadow); }

.header-inner { display: flex; align-items: center; gap: .75rem; height: 4rem; }

.brand { display: flex; align-items: center; gap: .55rem; font-weight: 650; text-decoration: none; color: var(--text); }
.brand-mark {
  display: grid; place-items: center; width: 1.9rem; height: 1.9rem;
  border-radius: 9px; background: var(--accent); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
}
.brand-name { font-size: 1rem; }

.site-nav { margin-left: auto; display: flex; gap: .25rem; }
.site-nav a {
  padding: .4rem .6rem; border-radius: 8px; text-decoration: none;
  color: var(--muted); font-size: .94rem;
}
.site-nav a:hover { color: var(--text); background: var(--bg-alt); }
.site-nav a.active { color: var(--accent-ink); background: color-mix(in srgb, var(--accent) 12%, transparent); }

.header-tools { display: flex; align-items: center; gap: .4rem; }

.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.lang-switch button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font: inherit; font-size: .78rem; font-weight: 600; padding: .32rem .5rem;
}
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: #fff; }

.icon-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  border-radius: 9px; width: 2rem; height: 2rem; cursor: pointer; font-size: .95rem; line-height: 1;
}
.icon-btn:hover { color: var(--text); }
.burger { display: none; }

.progress { height: 2px; background: transparent; }
.progress-bar { height: 100%; width: 0; background: var(--accent); }

/* ------------------------------------------------------------------ Inhalt */

.hero { padding: clamp(3rem, 9vw, 5.5rem) 0 clamp(2rem, 6vw, 3.5rem); }
.kicker { color: var(--accent-ink); font-weight: 650; font-size: .92rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: .5rem; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 40rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }

.btn {
  display: inline-block; padding: .6rem 1.1rem; border-radius: 10px;
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem;
  border: 1px solid var(--accent);
}
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-alt); color: var(--text); border-color: var(--border); }

.section { padding: clamp(2.5rem, 7vw, 4rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-legal { background: var(--bg); border-top: 1px solid var(--border); }
.section-legal h2 { font-size: 1.15rem; margin-top: 2rem; }
.section-legal h2:first-of-type { margin-top: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .9rem; }
/* Vier Karten in drei Spalten ergäben 3 + 1 — deshalb hier fix zwei Spalten. */
.cards.two { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.15rem 1.25rem; box-shadow: var(--shadow);
}
.card h3 { color: var(--accent-ink); margin-bottom: .35rem; }
.card p { margin: 0; color: var(--muted); font-size: .97rem; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 1.25rem; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 1.4rem .25rem; }
.timeline li::before {
  content: ""; position: absolute; left: -1.62rem; top: .55rem;
  width: .6rem; height: .6rem; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px var(--bg-alt);
}
.timeline li:last-child { padding-bottom: 0; }
.tl-when { display: block; font-size: .82rem; font-weight: 650; color: var(--accent-ink); letter-spacing: .03em; text-transform: uppercase; }
.tl-what strong { display: block; }
.tl-what span { color: var(--muted); font-size: .97rem; }

dl.contact, dl.legal { display: grid; grid-template-columns: minmax(8rem, 14rem) 1fr; gap: .5rem 1.25rem; margin: 0; }
dl.contact dt, dl.legal dt { color: var(--muted); font-size: .9rem; }
dl.contact dd, dl.legal dd { margin: 0; }
dl.contact dd { font-size: 1.05rem; }
dl.legal dd { font-size: .97rem; }
.mail { cursor: pointer; }

/* ------------------------------------------------------------------ Footer */

.site-footer { border-top: 1px solid var(--border); padding: 1.5rem 0; background: var(--bg); }
.footer-inner { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; align-items: baseline; justify-content: space-between; }
.site-footer p { margin: 0; }

.to-top {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 30;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; font-size: 1rem; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* ------------------------------------------------------- Reveal (nur mit JS) */

.has-js .reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.has-js .reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------------- Mobil */

@media (max-width: 46rem) {
  .burger { display: inline-block; }
  /* Ohne sichtbare Navigation trägt nichts mehr das margin-left:auto —
     sonst klebt die Werkzeugleiste links am Logo. */
  .header-tools { margin-left: auto; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 4rem;
    flex-direction: column; gap: 0;
    background: var(--surface); border-block: 1px solid var(--border);
    padding: .4rem 1rem .8rem; box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .65rem .4rem; font-size: 1rem; }
  .cards.two { grid-template-columns: 1fr; }
  dl.contact, dl.legal { grid-template-columns: 1fr; gap: .1rem; }
  dl.contact dd, dl.legal dd { margin-bottom: .8rem; }
}
