/* ============================================================================
   MCLeut · Base Styles  (base.css)
   ----------------------------------------------------------------------------
   Baut ausschließlich auf tokens.css auf. Build-frei, additiv.
   Gedacht NUR für künftige Greenfield-Seiten (/ki, /holding, /empfehlung/*,
   später /rechner). Bestehende Seiten (index, /pkv, /immo, /tools, /avlytics,
   /tree) werden hier NICHT eingebunden und NICHT verändert.

   Einbindereihenfolge auf neuen Seiten:
     <link rel="stylesheet" href="/assets/css/tokens.css" />
     <link rel="stylesheet" href="/assets/css/base.css" />

   Klassenübersicht:
     Layout    .container .section .section--tight .section--dark .eyebrow
     Aktionen  .btn .btn--primary .btn--secondary .btn--ghost .btn--lg
     Inhalt    .card .badge .cta
     Chrome    .site-header .site-nav .nav-toggle .nav-menu .site-footer

   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. Leichtes Reset
   ---------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, picture, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 var(--space-4); }

a { color: var(--link); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--link-hover); }

ul, ol { margin: 0 0 var(--space-4); padding-left: var(--space-5); }

button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}

.lead       { font-size: var(--fs-lead); color: var(--text-muted); }
.text-muted { color: var(--text-muted); }

/* ----------------------------------------------------------------------------
   2. Layout: Container & Sections
   ---------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }
.container--wide   { max-width: var(--container-wide); }

/* Kompakte Sektionen – bewusst KEIN min-height:100vh / kein Fullscreen */
.section        { padding-block: var(--section-y); }
.section--tight { padding-block: var(--section-y-sm); }
.section--lg    { padding-block: var(--section-y-lg); }

.section--dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}
.section--dark h1,
.section--dark h2,
.section--dark h3 { color: #fff; }
.section--dark .text-muted { color: rgba(231, 236, 244, 0.72); }

.section--subtle { background: var(--bg-subtle); }

.eyebrow {
  display: inline-block;
  margin-bottom: var(--space-3);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--accent-strong);
}

/* ----------------------------------------------------------------------------
   3. Buttons  (Orange sparsam, kein Glow)
   ---------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: var(--btn-min-h);
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border: 1px solid transparent;
  border-radius: var(--btn-radius);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  line-height: 1;
  text-align: center;
  transition: background var(--transition-fast),
              border-color var(--transition-fast),
              color var(--transition-fast),
              transform var(--transition-fast);
}
.btn:active { transform: translateY(1px); }

/* Primär = ruhiges, flächiges Markenblau; Hover kehrt auf Orange (Christopher 07/2026) */
.btn--primary {
  background: var(--primary);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-strong); color: var(--text-on-accent); }

/* Sekundär = Primärblau */
.btn--secondary {
  background: var(--primary);
  color: var(--text-on-primary);
}
.btn--secondary:hover { background: var(--primary-700); color: #fff; }

/* Ghost = dezent, randbetont */
.btn--ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn--lg { min-height: 54px; padding: 1rem 2rem; font-size: 1rem; }

/* ----------------------------------------------------------------------------
   4. Card
   ---------------------------------------------------------------------------- */
.card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: var(--card-pad);
  box-shadow: var(--card-shadow);
}
.card--quiet  { box-shadow: none; }
.card--accent { border-top: 3px solid var(--accent-strong); }
.card h3 { margin-bottom: var(--space-2); }
.card p:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------------------------
   5. Badge
   ---------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  background: var(--primary-50);
  color: var(--primary-700);
}
.badge--accent { background: var(--accent-soft); color: var(--accent-700); }
.badge--muted  { background: var(--gray-100);   color: var(--text-muted); }

/* ----------------------------------------------------------------------------
   6. CTA (kompaktes Band – keine erschlagende Vollfläche)
   ---------------------------------------------------------------------------- */
.cta {
  background: var(--primary);
  color: var(--text-on-primary);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}
.cta h2 { color: #fff; }
.cta p  { color: rgba(255, 255, 255, 0.82); max-width: 52ch; margin-inline: auto; }
.cta .btn--primary { margin-top: var(--space-5); }

/* ----------------------------------------------------------------------------
   7. Site Header + einfache Mobile-Navigation
   ---------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}
.site-header__brand {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 1.15rem;
  letter-spacing: var(--tracking-tight);
  color: var(--text);
}
.site-header__brand:hover { color: var(--text); }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.site-nav a {
  color: var(--text-muted);
  font-weight: var(--fw-medium);
  font-size: 0.95rem;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); }
/* Header-CTA: .site-nav a wuerde die Schrift sonst muted faerben (Spezifitaet)
   -> Button-Text im Nav immer weiss halten (Muster wie ki.css .btn--cta). */
.site-nav a.btn--primary,
.site-nav a.btn--primary:hover { color: #fff; }

/* Hamburger – nur mobil sichtbar */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-4) var(--gutter) var(--space-6);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
  }
  .site-nav a {
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border);
  }
  /* Aktiv-Zustand wird per winzigem Inline-JS gesetzt (siehe Skelett unten) */
  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

/* ----------------------------------------------------------------------------
   8. Site Footer
   ---------------------------------------------------------------------------- */
.site-footer {
  background: var(--primary-900);
  color: var(--text-on-dark);
  padding-block: var(--section-y-sm);
  font-size: var(--fs-small);
}
.site-footer a { color: rgba(231, 236, 244, 0.78); }
.site-footer a:hover { color: #fff; }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  justify-content: space-between;
  align-items: center;
}
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
}
.site-footer__copy { color: rgba(231, 236, 244, 0.55); }

/* ============================================================================
   9. GREENFIELD-SEITEN-SKELETT  (Copy-Paste – kein Build, kein Include)
   ----------------------------------------------------------------------------
   Vorlage für künftige Seiten wie /ki/index.html, /holding/index.html,
   /empfehlung/<x>/index.html. Blöcke 1:1 kopieren und Inhalte ersetzen.
   Klare Marker (BEGIN/END) erleichtern späteres Wiederfinden/Aktualisieren.

   <!DOCTYPE html>
   <html lang="de">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
     <meta name="theme-color" content="#123F7A" />
     <meta name="description" content="<SEITENBESCHREIBUNG>" />
     <title><TITEL> · MCLeut</title>
     <link rel="icon" href="/assets/img/icon/favicon.ico" />
     <link rel="preconnect" href="https://fonts.googleapis.com" />
     <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
     <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap" rel="stylesheet" />
     <link rel="stylesheet" href="/assets/css/tokens.css" />
     <link rel="stylesheet" href="/assets/css/base.css" />
   </head>
   <body>

     <!-- BEGIN site-header v1 -->
     <header class="site-header">
       <div class="container site-header__inner">
         <a class="site-header__brand" href="/">MCLeut</a>
         <button class="nav-toggle" type="button" aria-expanded="false"
                 aria-controls="siteNav" aria-label="Menü öffnen">☰</button>
         <nav class="site-nav" id="siteNav" aria-label="Hauptnavigation">
           <a href="/ki/">KI</a>
           <a href="/immo/">Immobilien</a>
           <a href="/pkv/">Krankenversicherung</a>
           <a href="/" class="btn btn--primary">Kontakt</a>
         </nav>
       </div>
     </header>
     <!-- END site-header v1 -->

     <main>
       <!-- BEGIN page content -->
       <section class="section">
         <div class="container">
           <span class="eyebrow">Bereich</span>
           <h1>Seitentitel</h1>
           <p class="lead">Kurzer, sachlicher Einleitungssatz.</p>
           <a href="#" class="btn btn--primary">Primäre Aktion</a>
         </div>
       </section>
       <!-- END page content -->
     </main>

     <!-- BEGIN site-footer v1 -->
     <footer class="site-footer">
       <div class="container site-footer__inner">
         <span class="site-footer__copy">© Christopher Leuthardt · MCLeut</span>
         <div class="site-footer__legal">
           <a href="/impressum.html">Impressum</a>
           <a href="/datenschutz.html">Datenschutz</a>
           <a href="mailto:business@christopher-leuthardt.de">Kontakt</a>
         </div>
       </div>
     </footer>
     <!-- END site-footer v1 -->

     <!-- BEGIN mobile-nav toggle (winziges Inline-JS, kein Include/Build) -->
     <script>
       (function () {
         var t = document.querySelector('.nav-toggle');
         var n = document.getElementById('siteNav');
         if (!t || !n) return;
         t.addEventListener('click', function () {
           var open = n.classList.toggle('is-open');
           t.setAttribute('aria-expanded', open ? 'true' : 'false');
           t.setAttribute('aria-label', open ? 'Menü schließen' : 'Menü öffnen');
         });
       })();
     </script>
     <!-- END mobile-nav toggle -->

   </body>
   </html>
   ============================================================================ */

/* ============================================================================
   10. Premium-Kit  (additiv, nur Tokens) - geteilte Komponenten der
       Token-Seiten (/, /ki, /holding). Seriös, ruhig, kein Glow.
   ============================================================================ */

/* Ambient-Hero: sehr dezente Farbflaechen im Hintergrund */
.hero-ambient { position: relative; overflow: hidden; }
.hero-ambient::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 480px at 88% -8%, rgba(234, 122, 37, 0.06), transparent 60%),
    radial-gradient(820px 460px at -6% 6%, rgba(18, 63, 122, 0.07), transparent 60%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg-subtle) 100%);
}
.hero-ambient > .container { position: relative; z-index: 1; }

/* Zweispaltiger Hero: Text + Visual */
.hero-split { display: grid; gap: var(--space-10); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 880px) {
  .hero-split { grid-template-columns: 1.05fr 0.95fr; gap: var(--space-16); }
}
.hero-copy { max-width: 60ch; }

/* Gerahmtes Hero-Visual */
.hero-figure {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-card); border: 1px solid var(--border);
  aspect-ratio: 4 / 5; background: var(--bg-subtle);
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-card); border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--primary-700) 0%, var(--primary-900) 100%);
  aspect-ratio: 4 / 3; display: grid; place-items: center; padding: var(--space-8);
}

/* Glas-Badge, dezent ueber Visual */
.glass-badge {
  display: inline-flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-soft);
  font-size: var(--fs-small); color: var(--text); font-weight: var(--fw-medium);
}
.glass-badge--float { position: absolute; left: var(--space-5); bottom: var(--space-5); right: var(--space-5); }
.glass-badge svg { width: 20px; height: 20px; color: var(--primary); flex: none; }

/* Aktionen + Chips */
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.chip {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-4); border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill); font-size: var(--fs-small);
  color: var(--text-muted); background: var(--surface);
}
.chip svg { width: 16px; height: 16px; color: var(--primary); flex: none; }

/* Icon-Badge (kreisförmig) */
.icon-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin-bottom: var(--space-4);
  border-radius: var(--radius-md); background: var(--primary-50); color: var(--primary);
}
.icon-badge svg { width: 24px; height: 24px; }
.section--dark .icon-badge { background: rgba(255, 255, 255, 0.10); color: #fff; }

/* Auto-fit Grid */
.grid-auto { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* Hover-Lift */
.lift { transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: var(--primary-200); }

/* Feature-Karte: Icon + Titel + Text (+ optionaler Link-Pfeil) */
.feature-card { display: flex; flex-direction: column; height: 100%; }
.feature-card h3 { margin-bottom: var(--space-2); }
.feature-card p { color: var(--text-muted); }
.feature-card__more { margin-top: auto; padding-top: var(--space-4); color: var(--primary); font-weight: var(--fw-semibold); font-size: var(--fs-small); }
a.feature-card { text-decoration: none; color: inherit; }
a.feature-card:focus-visible { box-shadow: var(--shadow-focus); }

/* Portrait-Block (Ansprechpartner) */
.figure-portrait {
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-card); aspect-ratio: 4 / 5; background: var(--primary-800);
}
.figure-portrait img { width: 100%; height: 100%; object-fit: cover; }

/* Stat-/Werte-Reihe */
.stat-grid { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat__num { font-size: var(--fs-h2); font-weight: var(--fw-bold); color: var(--primary); line-height: 1.1; }
.stat__label { color: var(--text-muted); font-size: var(--fs-small); }

/* Sektionskopf */
.section-head { max-width: 64ch; margin-bottom: var(--space-10); }

/* Scroll-Reveal: nur aktiv, wenn JS vorhanden ist (html.js). Ohne JS bleibt
   der Inhalt vollständig sichtbar. Ein Sicherheitsnetz im ui.js zeigt zudem
   nach kurzer Zeit alles, falls der Observer nicht ausloest. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--transition), transform 0.6s var(--transition); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .lift, .lift:hover { transition: none; }
}

/* ============================================================================
   Swipe-in-Unterstreichung (.u-swipe) — opt-in, seitenuebergreifend.
   Inline-SVG-Linie unter einem Wort/einer Phrase; zeichnet sich beim
   Sichtbarwerden (ui.js initSwipeUnderlines setzt `.is-drawn`). Ohne JS oder bei
   reduced-motion sofort vollstaendig gezeichnet (Inhalt bleibt nie verborgen).
   Der Pfad MUSS pathLength="1" tragen, damit die Dash-Mechanik laengenunabhaengig ist.
   ============================================================================ */
.u-swipe { position: relative; white-space: nowrap; }
.u-swipe__line { position: absolute; left: -2%; right: 0; bottom: -0.30em; width: 104%; height: 0.40em;
  color: var(--accent); overflow: visible; pointer-events: none; }
.u-swipe__line path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
/* Verborgen, solange JS vorhanden ist; `.is-drawn` loest die Zeichen-KEYFRAME aus.
   Keyframe statt Transition, damit die Linie beim Laden ZUVERLAESSIG reingezogen wird
   (eine Transition zieht nicht, wenn `.is-drawn` vor dem ersten Paint gesetzt wird).
   opacity:0 im Hidden-Zustand UND in den ersten Animations-Prozent: bei
   dashoffset==dasharray (1px) ragt die runde Linecap-Kappe ueber das Pfadende
   hinaus und war sonst als stehender Punkt sichtbar, va. waehrend laengerer
   --u-swipe-delay-Werte (animation-fill-mode:both haelt den 0%-Zustand). */
.js .u-swipe__line path { stroke-dasharray: 1px; stroke-dashoffset: 1px; opacity: 0; }
.js .u-swipe.is-drawn .u-swipe__line path { stroke-dashoffset: 0; opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .js .u-swipe.is-drawn .u-swipe__line path { animation: uSwipeDraw 0.9s cubic-bezier(.16, 1, .3, 1) var(--u-swipe-delay, 0.15s) both; }
}
@media (prefers-reduced-motion: reduce) {
  .js .u-swipe__line path { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes uSwipeDraw {
  0%   { stroke-dashoffset: 1px; opacity: 0; }
  8%   { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}
