/* Public site: home page (index.html), Ratgeber (worker/blog.ts) and 404. No JavaScript; light/dark follows the OS. */
@font-face {
  font-family: 'Inter Variable';
  src: url('/fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f7f5f0;
  --surface: #fcfbf8;
  --surface-2: #efece5;
  --border: #e2ddd3;
  --text: #15171a;
  --muted: #4a4f57;
  --faint: #6b7078;
  --accent: #e87722;
  --accent-text: #a84d00; /* 4.5:1 on --bg */
  --on-accent: #15171a;
  --ink: #15171a; /* always-dark panels (hero shot, final CTA) */
  --ink-text: #f2efe9;
  --ink-muted: #c9c4ba;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(21 23 26 / 0.06), 0 12px 32px rgb(21 23 26 / 0.08);
  --font: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --wrap: 72rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1012;
    --surface: #16181b;
    --surface-2: #1d2024;
    --border: #2a2e33;
    --text: #ecedee;
    --muted: #b3b8bd;
    --faint: #9aa0a6;
    --accent-text: #f39a5c;
    --ink: #1d2024;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px rgb(0 0 0 / 0.45);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font: 400 1.0625rem/1.6 var(--font); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.eyebrow { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 0.9rem; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 40rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; min-height: 48px; padding: 0 1.4em; border-radius: 999px; font-weight: 600; text-decoration: none; border: 1px solid transparent; transition: transform 140ms, background 140ms; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: #f08a3c; }
.btn-ghost { color: var(--text); border-color: var(--border); background: var(--surface); }
.btn-sm { min-height: 38px; padding: 0 1.05em; font-size: 0.95rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6rem 0 1rem; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a:not(.btn) { color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--text); }
.brand, .btn { white-space: nowrap; }
@media (max-width: 640px) { .nav .nav-extra { display: none; } .nav { gap: 14px; } }
@media (max-width: 420px) { .nav a:not(.btn) { display: none; } }

/* Hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(32px, 5vw, 64px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-note { font-size: 0.92rem; color: var(--faint); }
.shot { background: var(--ink); border-radius: 18px; padding: 10px; box-shadow: var(--shadow); }
.shot img { border-radius: 10px; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* Systems strip */
.strip { border-block: 1px solid var(--border); background: var(--surface); padding: 22px 0; }
.strip p { margin: 0 0 10px; font-size: 0.85rem; color: var(--faint); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.strip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.strip li { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: 0.95rem; color: var(--muted); background: var(--bg); }

/* Sections */
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 44rem; margin-bottom: 2.2rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; margin-bottom: 14px; }
.steps p, .features p, .rooms p { color: var(--muted); margin: 0; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.feature svg { width: 28px; height: 28px; color: var(--accent-text); margin-bottom: 14px; }
.rooms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 16px; }
.rooms a { display: block; height: 100%; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: border-color 140ms, transform 140ms; }
.rooms a:hover { border-color: var(--accent); transform: translateY(-2px); }
.rooms h3::after { content: ' →'; color: var(--accent-text); }
@media (max-width: 860px) { .steps, .features { grid-template-columns: 1fr; } }

/* Article cards (home + Ratgeber) */
.cards { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 16px; }
.card a { display: flex; flex-direction: column; height: 100%; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.card a:hover { border-color: var(--accent); }
.card p { color: var(--muted); font-size: 0.97rem; flex: 1; }
.card time { font-size: 0.85rem; color: var(--faint); }
[data-latest] { padding: clamp(48px, 8vw, 96px) 0 0; }

/* FAQ */
.faq-list { max-width: 48rem; }
.faq-list details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq-list summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; color: var(--accent-text); font-size: 1.4rem; line-height: 1; }
.faq-list details[open] summary::after { content: '–'; }
.faq-list details p { color: var(--muted); margin: 12px 0 0; }

/* Dark call-to-action band */
.band { background: var(--ink); color: var(--ink-text); border-radius: 22px; padding: clamp(32px, 6vw, 64px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.band p { color: var(--ink-muted); margin: 0; }
.band h2 { color: var(--ink-text); }
.band .btn-ghost { background: transparent; color: var(--ink-text); border-color: #3a3f46; }

/* Ratgeber pages */
.page { padding-top: clamp(28px, 5vw, 56px); padding-bottom: clamp(48px, 8vw, 96px); }
.crumbs { font-size: 0.9rem; color: var(--faint); margin-bottom: 1.5rem; }
.crumbs a { color: var(--faint); }
.prose { max-width: 44rem; }
.prose h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.prose h2 { font-size: 1.55rem; margin-top: 2.2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.meta { color: var(--faint); font-size: 0.95rem; }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 2rem 0; padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); }
.cta p { margin: 0; flex: 1 1 18rem; }
.note { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); font-size: 0.9rem; color: var(--muted); }
.badge { display: inline-block; padding: 2px 8px; margin-right: 4px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; }
.related { margin-top: 3rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0 40px; margin-top: clamp(48px, 8vw, 96px); font-size: 0.92rem; color: var(--faint); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; }
.site-footer a { color: var(--muted); }
