/* ==========================================================================
   Nestfunk – Stylesheet
   Designsprache wie alexander.kune.de (Tokens, Kopfzeile, Abschnitte, Karten),
   Akzentfarben aus dem App-Icon: Nachtblau, im dunklen Schema Mondgelb.
   Keine externen Ressourcen: keine Web-Fonts, keine Frameworks, kein Tracking.
   ========================================================================== */

:root {
  --bg:            #fbfaf8;
  --bg-alt:        #f3f1ed;
  --surface:       #ffffff;
  --surface-2:     #f7f5f2;
  --border:        #e2ded7;
  --border-strong: #cec8be;
  --text:          #1a1d21;
  --text-muted:    #5d6570;
  --accent:        #2e3d8a;
  --accent-hover:  #222e6c;
  --accent-soft:   #e8eaf6;
  --accent-text:   #ffffff;
  --moon:          #e9b649;
  --night:         #1b2350;
  --shadow:        0 1px 2px rgba(26, 29, 33, .04), 0 8px 24px rgba(26, 29, 33, .06);
  --shadow-lift:   0 2px 4px rgba(26, 29, 33, .05), 0 14px 36px rgba(26, 29, 33, .10);

  --radius:    14px;
  --radius-sm: 9px;
  --maxw:      1120px;
  --gutter:    clamp(1rem, 5vw, 3rem);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #0f1120;
    --bg-alt:        #141729;
    --surface:       #181c31;
    --surface-2:     #1e2239;
    --border:        #2a2f4a;
    --border-strong: #3b4163;
    --text:          #e9e8f0;
    --text-muted:    #a0a3b8;
    --accent:        #f2c46b;
    --accent-hover:  #f7d692;
    --accent-soft:   #2c2818;
    --accent-text:   #1d1a0e;
    --shadow:        0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .32);
    --shadow-lift:   0 2px 4px rgba(0, 0, 0, .34), 0 14px 36px rgba(0, 0, 0, .44);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg:            #0f1120;
  --bg-alt:        #141729;
  --surface:       #181c31;
  --surface-2:     #1e2239;
  --border:        #2a2f4a;
  --border-strong: #3b4163;
  --text:          #e9e8f0;
  --text-muted:    #a0a3b8;
  --accent:        #f2c46b;
  --accent-hover:  #f7d692;
  --accent-soft:   #2c2818;
  --accent-text:   #1d1a0e;
  --shadow:        0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .32);
  --shadow-lift:   0 2px 4px rgba(0, 0, 0, .34), 0 14px 36px rgba(0, 0, 0, .44);
  color-scheme: dark;
}

/* --- Grundlagen ---------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

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

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

a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
  text-underline-offset: .18em;
}
a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  margin: 0 0 .5em;
  line-height: 1.2;
  letter-spacing: -.018em;
  font-weight: 650;
  text-wrap: balance;
}

p { margin: 0 0 1rem; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
code { font-family: var(--font-mono); font-size: .9em; overflow-wrap: anywhere; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  padding: .85rem 1.25rem;
  background: var(--accent); color: var(--accent-text);
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* --- Kopfzeile ----------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--border);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header { backdrop-filter: saturate(1.5) blur(12px); }
}
.site-header > .container { display: flex; align-items: center; gap: 1rem; min-height: 4.25rem; }

.brand {
  display: flex; align-items: center; gap: .7rem;
  margin-right: auto; padding: .35rem 0;
  color: var(--text); text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand-text { display: flex; flex-direction: column; gap: .05rem; }
.brand strong { font-size: 1.02rem; font-weight: 650; letter-spacing: -.01em; }
.brand-text span { font-size: .715rem; color: var(--text-muted); letter-spacing: .075em; text-transform: uppercase; }

.site-nav ul { display: flex; align-items: center; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: block; padding: .6rem .7rem; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: .92rem; font-weight: 550; text-decoration: none;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }

.header-tools { display: flex; align-items: center; gap: .4rem; padding-left: .3rem; border-left: 1px solid var(--border); }

.lang-switch, .theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: .5rem .7rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-muted);
  font: inherit; font-size: .82rem; font-weight: 650; letter-spacing: .04em;
  text-decoration: none; cursor: pointer;
}
.lang-switch:hover, .theme-toggle:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-dark { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-dark { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-light { display: none; }
}

@media (max-width: 860px) {
  html { scroll-padding-top: 9rem; }
  .site-header > .container { flex-wrap: wrap; min-height: 0; gap: .45rem 1rem; padding-block: .45rem; }
  .header-tools { border-left: 0; padding-left: 0; }
  .site-nav {
    order: 3; width: calc(100% + 2 * var(--gutter));
    overflow-x: auto; scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter);
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav ul { gap: .1rem; padding-bottom: .15rem; }
  .site-nav a { display: flex; align-items: center; min-height: 44px; white-space: nowrap; }
}
@media (max-width: 560px) { .brand-text span { display: none; } }

/* --- Abschnitte ---------------------------------------------------------- */

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
@media (min-width: 950px) {
  .section-head {
    max-width: none; display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    column-gap: clamp(2rem, 5vw, 4rem); align-items: start;
  }
  .section-head > .eyebrow { grid-column: 1; grid-row: 1; }
  .section-head > h2 { grid-column: 1; grid-row: 2; margin-bottom: 0; }
  .section-head > p { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
}

.eyebrow {
  display: block; margin-bottom: .7rem;
  color: var(--accent); font-size: .765rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase;
}
.badge {
  display: inline-block; margin-left: .4rem; padding: .1rem .55rem;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-size: .7rem; letter-spacing: .08em; vertical-align: .15em;
}
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.section-head p { color: var(--text-muted); font-size: 1.06rem; margin-bottom: 0; }

/* --- Hero ---------------------------------------------------------------- */

.hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 7vw, 5rem); border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); letter-spacing: -.032em; margin-bottom: .3rem; }
.hero-role { margin-bottom: 1.4rem; color: var(--text-muted); font-size: clamp(1.05rem, 2.2vw, 1.2rem); font-weight: 550; }
.hero-lead { max-width: 56ch; font-size: clamp(1.02rem, 1.7vw, 1.14rem); }
.hero-icon {
  width: clamp(140px, 20vw, 200px); aspect-ratio: 1;
  border-radius: 22.5%; box-shadow: var(--shadow-lift);
}

.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.9rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 44px; padding: .7rem 1.3rem;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn--primary { background: var(--accent); color: var(--accent-text); box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--accent-hover); color: var(--accent-text); }
.btn--ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn svg { width: 17px; height: 17px; flex: none; }

.facts {
  display: flex; flex-wrap: wrap; gap: .4rem 1.75rem;
  margin: clamp(2.25rem, 4.5vw, 3rem) 0 0; padding: 1.4rem 0 0;
  border-top: 1px solid var(--border); list-style: none;
  color: var(--text-muted); font-size: .93rem;
}
.facts li::before { content: "☾"; margin-right: .45rem; color: var(--moon); }

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-icon { order: -1; width: 112px; }
}

/* --- Karten -------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(285px, 100%), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}
.card {
  padding: clamp(1.4rem, 2.5vw, 1.85rem);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; margin-bottom: 1rem;
  border-radius: 11px; background: var(--accent-soft); color: var(--accent);
}
.card-icon svg { width: 21px; height: 21px; }
.card h3 { font-size: 1.09rem; margin-bottom: .45rem; }
.card p, .card li { color: var(--text-muted); font-size: .95rem; }
.card ul { margin: 0; padding-left: 1.1rem; }
.card li + li { margin-top: .25rem; }

/* --- Bildschirmfotos ----------------------------------------------------- */

.shots {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2.5rem); align-items: start;
  max-width: 900px; margin-inline: auto;
}
.shots figure { margin: 0; }
.shots img { border-radius: 22px; border: 1px solid var(--border); box-shadow: var(--shadow-lift); }
.shots figcaption { margin-top: .85rem; text-align: center; color: var(--text-muted); font-size: .9rem; }
@media (max-width: 640px) {
  .shots {
    grid-template-columns: repeat(3, 72%); overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 1rem;
  }
  .shots figure { scroll-snap-align: center; }
}

/* --- Schritte (Relay-Einrichtung) ---------------------------------------- */

.steps { display: grid; gap: 1.1rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps > li { position: relative; padding-left: 3.1rem; counter-increment: step; }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: -.1rem;
  display: grid; place-items: center; width: 2.2rem; height: 2.2rem;
  border-radius: 8px; background: var(--accent-soft); color: var(--accent);
  font-family: var(--font-mono); font-size: .92rem; font-weight: 600;
}

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.note { margin-top: 1.5rem; color: var(--text-muted); font-size: .93rem; }

/* --- Häufige Fragen ------------------------------------------------------ */

.faq { max-width: 820px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 44px; padding: 1.05rem 0;
  font-weight: 600; font-size: 1.03rem; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 1.8rem; height: 1.8rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 1.25rem; color: var(--text-muted); }

/* --- Kontakt ------------------------------------------------------------- */

.contact-card {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem); padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.contact-item h3 {
  font-size: .785rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: .45rem;
}
.contact-item address { font-style: normal; font-size: 1.02rem; line-height: 1.7; }
.contact-item > a { display: inline-flex; align-items: center; min-height: 44px; font-size: 1.02rem; font-weight: 550; }
.contact-item .muted { display: block; color: var(--text-muted); font-size: .875rem; }
.disclaimer { margin-top: 1.5rem; color: var(--text-muted); font-size: .9rem; }

/* --- Fußzeile ------------------------------------------------------------ */

.site-footer {
  padding-block: 2rem 2.5rem; background: var(--bg-alt);
  border-top: 1px solid var(--border); color: var(--text-muted); font-size: .89rem;
}
.site-footer > .container { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.5rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .3rem 1.25rem; margin-left: auto; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }

/* --- Rechtstexte --------------------------------------------------------- */

.legal { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.legal .container { max-width: 760px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: .3rem; }
.legal .stand { color: var(--text-muted); margin-bottom: 2rem; }
.legal h2 { font-size: 1.12rem; margin-top: 2.4rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
.legal address { font-style: normal; line-height: 1.8; }
.legal ul { padding-left: 1.2rem; }
.legal li + li { margin-top: .55rem; }
.legal li ul { margin-top: .55rem; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media print {
  .site-header, .site-footer, .actions, .skip-link { display: none; }
  body { background: #fff; color: #000; }
  .section--alt { background: none; border: 0; }
  .faq details > div { display: block; }
}
