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

/* ========== Base / Reset ========== */
* { box-sizing: border-box; }
html, body { margin:0; padding:0; overflow-x: hidden; }  /* verhindert horizontales Aufblitzen */


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

:root{
  --container: 1000px;
  --header-h: 64px;
  --panel-w: 340px;         /* Breite des weißen Menüs am Desktop */
  --panel-w-mobile: 86vw;   /* Breite auf Phones */
  --shadow: 0 20px 60px rgba(2,6,23,.18), 0 8px 28px rgba(2,6,23,.10);
  --border: 1px solid #e5e7eb;
  --text: #0f172a;
  --muted: #475569;
  --link: #0ea5e9;
  --bg: #ffffff;            /* Standard: weiße Inhaltsseiten */
}

/* Grundschrift */
body{
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
               Inter, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}


/* ========== Header / Topbar ========== */
.site-header{
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  /* iPhone-Notch + allgemein sichere Abstände */
  padding: max(10px, env(safe-area-inset-top))
           max(16px, env(safe-area-inset-right))
           10px
           max(16px, env(safe-area-inset-left));
  z-index: 1000;
  background: transparent;  /* Home: transparent über Bild */
}

/* Logo links */
.brand{ display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit; }

/* Standard (alle Unterseiten): größer & schwarz (Originalfarben bleiben) */
.brand img.logo{
  height: 64px;   /* vorher 42px */
  width: auto;
}

/* Home: noch größer + in weiß umfärben */
body.home .brand img.logo{
  height: 84px;   /* ~doppelt so groß wie vorher */
  filter: brightness(0) invert(1) drop-shadow(0 2px 6px rgba(0,0,0,.35));
  /* brightness(0) macht schwarz, invert(1) -> weiß; drop-shadow für Kontrast auf hellem Hintergrund */
}

/* Menü-Button rechts (kleine 3 Punkte) */
/* Menü-Button: nur drei vertikale Punkte, kein Kreis */
.menu-button{
  appearance: none;
  background: transparent;
  border: 0;
  padding: 8px 10px;         /* größerer Klickbereich */
  line-height: 1;
  font-size: 38px;           /* Punktgröße */
  color: var(--text);        /* Standard: schwarz (Unterseiten) */
  cursor: pointer;
  min-width: 44px;           /* Accessibility Hit-Target */
  min-height: 44px;
  box-shadow: none;          /* Kreis-/Schatten entfernen */
  border-radius: 0;
}
.menu-button:hover{ filter: none; background: transparent; }
.menu-button:focus-visible{
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 8px;        /* nur für schönen Fokusrahmen */
}

/* Home: weiße Punkte auf Bild */
body.home .menu-button{
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,.35); /* Kontrast auf hellem/uneinheitlichem BG */
}

/* Mobile feinjustieren */
@media (max-width: 600px){
  .menu-button{ font-size: 24px; padding: 8px; }
}

/* Auf Unterseiten: Header weiß ohne Linie */
body:not(.home) .site-header{
  background: #fff;
  border-bottom: none;   /* Linie weg */
}


/* Platz für fixed Header schaffen (nur Unterseiten) */
body:not(.home) main{ padding-top: calc(var(--header-h) + 18px); }

/* ========== Offcanvas (weißes Panel von rechts) ========== */
.drawer{
  position: fixed;
  top:0; right:0; bottom:0;
  width: min(var(--panel-w), 100vw);
  max-width: var(--panel-w-mobile);
  background:#ffffff; border-left: none;     /* keine helle Kante am Panelrand */
  transform: translate3d(100%,0,0);       /* Subpixel-Rundungsfehler vermeiden */
  transition: transform 300ms ease;
  box-shadow: var(--shadow);
  z-index: 1200;
  display:flex; flex-direction:column;
}
.drawer-header{ padding: 16px 18px; border-bottom: var(--border); font-weight:600; }
.drawer-nav{ padding: 6px 6px 18px; }
.drawer-nav a{
  display:block; padding: 12px 14px; border-radius: 10px;
  text-decoration:none; color:var(--text);
}
.drawer-nav a:hover{ background:#f8fafc; }
.drawer small{ color: var(--muted); padding: 0 14px; }
body.menu-open .drawer{ transform: translate3d(0,0,0); }


/* Vollflächen-Scrim: nie Fokus-/Aktiv-Rahmen, keine Border */
.scrim{
  position: fixed;
  inset: 0;
  background: transparent;      /* wenn du abdunkeln willst: rgba(0,0,0,.25) */
  border: 0;
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  pointer-events: none;         /* standard: inaktiv */
}

body.menu-open .scrim{
  pointer-events: auto;         /* nur aktiv, wenn Menü offen */
}

/* Falls der Browser doch einen Focus zeichnet – sicherheitshalber neutralisieren */
.scrim:focus,
.scrim:focus-visible,
.scrim:active{
  outline: none !important;
  box-shadow: none !important;
}

/* ========== Layout Container ========== */
/* Sticky Footer auf allen Unterseiten (Home hat eigenes, fixes Footer-Label) */
body:not(.home){
  min-height: 100svh;        /* sichere Viewport-Höhe, inkl. Mobile-UI */
  display: flex;
  flex-direction: column;
}

main.page{
  flex: 1 0 auto;            /* nimmt den restlichen Platz ein */
}

.site-footer{
  margin-top: auto;          /* schiebt Footer an den unteren Rand */
  border-top: none;          /* (du wolltest die Linie weg haben) */
}

.container{ width: min(100%, var(--container)); margin: 0 auto; padding: 0 16px; }
main.page{ margin: 0 auto 64px; }
main.page > *:last-child { margin-bottom: 0; }

/* ========== Home (Vollbild-Hintergrund) ========== */
body.home{
  color:#0b1220;
  background:#000; /* falls 1px Spalt entsteht, sieht man schwarz statt weiß */
}
body.home .hero{
  position: fixed;
  inset: -2px;                 /* 2px Überstand maskiert Subpixel-Nähte */
  background-image: var(--home-bg);
  background-size: cover;
  background-position: center;
  will-change: transform;      /* eigenes Compositing-Layer */
  transform: translateZ(0);    /* WebKit-GPU Kick */
  backface-visibility: hidden; /* weitere Safari-Hairline-Absicherung */
}


/* Kleines Footer-Branding unten links (optional) */
.home-footer{
  position: fixed; left: 12px; bottom: 10px; z-index: 900;
  color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.home-footer a{ color:#fff; }

/* ========== Typo / Links ========== */
h1{ font-size: clamp(24px, 3vw, 36px); margin: 0 0 12px; }
p{ margin: 0 0 14px; }
a{ color: var(--link); }
a:hover{ text-decoration: underline; }
/* Untertitel/Lead-Zeile unter H1 */
.lede{
  color: var(--muted);
  font-size: clamp(14px, 1.6vw, 18px);
  line-height: 1.5;
  margin: 0 0 16px;
}


/* ========== Galerie (Slideshow) – übernimmt deinen bisherigen Stil ========== */
.carousel{ position: relative; margin: 6px 0 24px; user-select:none; }
.carousel-viewport{
  width:100%; aspect-ratio:16/9; overflow:hidden; border-radius:10px;
  background:#f1f5f9; box-shadow: var(--shadow);
}
/* Ergänzung: Viewport relativ für die Zonen positionieren */
.carousel-viewport{
  position: relative; /* NEU */
  touch-action: pan-y; /* Erlaubt vertikales Scrollen, reserviert horizontal fürs Swipe */
}

/* Unsichtbare, halbseitige Klickflächen */
.tapzone{
  position: absolute;
  top: 0; bottom: 0;
  width: 50%;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.tapzone.left  { left: 0; }
.tapzone.right { right: 0; }

/* Tastaturfokus sichtbar aber dezent */
.tapzone:focus-visible{
  outline: 2px solid rgba(255,255,255,.8);
  outline-offset: -4px;
}

.carousel-track{
  display:flex; height:100%; gap:0; transform: translate3d(0,0,0);
  transition: transform 500ms ease; margin:0; padding:0; list-style:none;
}
.slide{ flex:0 0 100%; height:100%; }
.slide img{ width:100%; height:100%; object-fit:cover; }

/* Pfeile (chevrons) */
.control{
  position:absolute; top:50%; transform:translateY(-50%);
  border:0; background: none; font-size: 44px; line-height:1; color:#fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.35); cursor:pointer; padding: 0 8px;
}
.control:hover{ transform: translateY(-50%) scale(1.06); }
.prev{ left:10px; } .next{ right:10px; }

/* Dots */
.dots{
  position:absolute; bottom:10px; left:0; width:100%;
  display:flex; gap:8px; justify-content:center;
}
.dots button{
  width:9px; height:9px; border-radius:999px; border:0;
  background: rgba(15,23,42,.35); cursor:pointer;
}
.dots button[aria-current="true"]{ background: rgba(15,23,42,.95); transform: scale(1.1); }

/* ========== Formulare (Kontakt) ========== */
form label{ display:block; font-weight:600; margin: 12px 0 6px; }
input[type="text"], input[type="email"], textarea{
  width:100%; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 10px;
  font: inherit;
}
textarea{ min-height: 140px; resize: vertical; }
button[type="submit"]{
  margin-top: 14px; padding: 10px 14px; border-radius: 10px; border: 1px solid #0ea5e9;
  background:#0ea5e9; color:#fff; cursor:pointer;
}
button[type="submit"]:hover{ filter: brightness(1.05); }

/* ========== Footer ========== */
.site-footer{ border-top: none; padding: 20px 0; color:#64748b; }
.site-footer small a{ color: var(--link); text-decoration:none; }
.site-footer small a:hover{ text-decoration:underline; }

/* Responsiv */
@media (min-width: 900px){
  .drawer{ width: var(--panel-w); max-width: var(--panel-w); }
}

/* ================= Mobile (bis 600px) ================= */
@media (max-width: 600px){

  /* Header etwas kompakter */
  :root{ --header-h: 56px; }

  /* Logo-Größen: Unterseiten (schwarz) etwas kleiner */
  .brand img.logo{
    height: 44px;
  }

  /* Home: weißes Logo, aber nicht zu groß */
  .home .brand img.logo{
    height: 48px;  /* vorher 84px -> wirkt sonst mittig/übergroß */
  }

  /* Menü-Button minimal kompakter, damit die Proportionen stimmen */
  .menu-button{
    width: 32px; height: 32px; font-size: 16px;
  }
}
/* ================= Mobile-Fixes: Home-Logo oben links kleiner ================= */
@media (max-width: 600px){

  /* kompaktere Header-Höhe auf Phones */
  :root{ --header-h: 56px; }

  /* Unterseiten-Logo etwas kleiner */
  .brand img.logo{
    height: 44px;
  }

  /* Home-Logo (weiß) kleiner, bleibt links oben */
  body.home .brand img.logo{
    height: 48px;          /* ggf. 46/50 testen nach Geschmack */
    margin: 0;             /* Sicherheits-Reset gegen zentrierende Margins */
  }

  /* Menü-Button proportional kleiner */
  .menu-button{
    width: 42px; height: 42px; font-size: 26px;
  }
}
/* ========== Rechtstexte / Legal ========== */
.legal h1{ font-size: clamp(24px, 3vw, 34px); margin: 0 0 10px; }
.legal h2{
  color: var(--text);            /* sicher nicht blau */
  font-size: clamp(18px, 2.2vw, 22px);
  margin: 22px 0 8px;
}
.legal p{ margin: 0 0 12px; }
.site-footer .current{
  color: var(--muted);
  text-decoration: none;
  pointer-events: none;          /* nicht klickbar */
}

/* Kontakt: Status unter dem Button */
.form-status{
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.4;
}
.form-status.ok{ color: #16a34a; }   /* grün */
.form-status.err{ color: #b91c1c; }   /* rot */
