/* =========================================
   MAIN.CSS – aufgeräumt, DSGVO-safe, Roboto Light
   ========================================= */

/* === 0) SELF-HOSTED FONTS (legte die Dateien in /fonts/) === */
@font-face{
  font-family:"Roboto";
  src:url("/fonts/roboto-300.woff2") format("woff2");
  font-weight:300; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"Roboto";
  src:url("/fonts/roboto-500.woff2") format("woff2");
  font-weight:500; font-style:normal; font-display:swap;
}
@font-face{
  font-family:"Roboto";
  src:url("/fonts/roboto-700.woff2") format("woff2");
  font-weight:700; font-style:normal; font-display:swap;
}

/* === 1) DESIGN-VARS === */
:root{
  /* Farben (CRUSHED-Style, dunkel) */
  --bg:#000;
  --text:#fff;
  --muted:rgba(255,255,255,.8);
  --line:rgba(255,255,255,.20);

  /* Maße */
  --maxw:1200px;
  --pad:clamp(16px,3vw,28px);
  --gap:clamp(10px,2vw,20px);

  /* Typo */
  --ff:"Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --fs-body: clamp(18px, 1.2vw, 22px);
  --fs-lead: clamp(18px, 1.6vw, 22px);
  --fs-h1: clamp(28px, 4vw, 48px);
  /* H2 +5px gegenüber deiner alten Skala */
  --fs-h2: clamp(27px, 3.4vw, 39px);
  --fs-h3: clamp(18px, 2.2vw, 22px);

  --fw-light:300; --fw-normal:400; --fw-medium:500; --fw-bold:700; --fw-extrabold:800;

  /* Header-Höhe (mobil wird unten per @media erhöht) */
  --nav-h: 72px;

  /* Lightbox-Schatten (nur unten/rechts) */
  --lb-alpha: .20;
  --lb-alpha2: .20;
  --lb-sx: 14px;  --lb-sy: 16px;  --lb-blur: 15px;
  --lb-sx2:36px;  --lb-sy2:44px;  --lb-blur2:70px;
}

/* === 2) RESET/BASIS === */
*,*::before,*::after{ box-sizing:border-box; }
html,body{ height:100%; }
html{ scroll-behavior:smooth; }
@media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto; } }

body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:var(--ff); font-size:var(--fs-body); line-height:1.6;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
img{ max-width:100%; height:auto; display:block; }
.wrap{ max-width:var(--maxw); margin:0 auto; padding:0 var(--pad); }

/* === 3) TYPO === */
h1{ font: var(--fw-light) var(--fs-h1)/1.1 var(--ff); margin:0 0 16px; }
h2{ font: var(--fw-light) var(--fs-h2)/1.15 var(--ff); margin:30px 0 8px; }
h3{ font: var(--fw-medium) var(--fs-h3)/1.2 var(--ff); margin:22px 0 8px; }
.lead{ font-size:var(--fs-lead); color:var(--muted); margin-top:22px; }

/* Trennerlinie */
.rule{ border:0; height:2px; background:var(--line); margin:0; }

/* Anker-Offsets (One-Pager) */
#home,#vita,#werke,#galerie,#kontakt,#datenschutz{ scroll-margin-top: calc(var(--nav-h) + 12px); }

/* === 4) FIXER HEADER === */
.site-header{
  position:fixed; inset:0 0 auto 0; z-index:1000;
  background:#000; border-bottom:1px solid var(--line);
}
.site-header .wrap{
  display:flex; align-items:center; gap:24px; min-height:var(--nav-h);
}

/* Logo links */
.logo{ display:flex; align-items:center; text-decoration:none; margin-right:8px; }
.logo-img{ display:block; height:clamp(22px, 4vw, 50px); width:auto; }

/* Menübutton (nur mobil sichtbar) */
.menu-toggle{
  margin-left:auto; display:none;
  background:transparent; color:#fff; border:1px solid #fff;
  border-radius:6px; padding:6px 10px; font-size:18px; cursor:pointer;
}

/* Desktop-Navigation */
.site-nav{
  margin-left:auto; display:flex; gap:20px; flex-wrap:nowrap;
  text-transform:uppercase; letter-spacing:.06em;
}
.site-nav .nav-link{
  color:#fff; text-decoration:none; opacity:.9; font-weight:var(--fw-medium);
  padding:6px 0; border-bottom:2px solid transparent;
}
.site-nav .nav-link:hover{ font-weight:var(--fw-bold); opacity:1; }
.site-nav .nav-link.is-active{ border-bottom-color:#fff; }

/* === 5) MOBILE HEADER/NAV + größeres LOGO === */
@media (max-width:900px){
  :root{ --nav-h: 84px; }                 /* mehr Platz im Header */
  .menu-toggle{ display:inline-block; }
  .logo-img{ height: clamp(40px, 12vw, 72px); }  /* LOGO deutlich größer mobil */

  .site-nav{
    position:fixed; left:0; right:0; top:var(--nav-h);
    background:#000; border-bottom:1px solid var(--line);
    display:none; flex-direction:column; gap:0; padding:6px 0;
  }
  .site-nav.open{ display:flex; }
  .site-nav .nav-link{ padding:14px var(--pad); border-top:1px solid var(--line); }
}

/* === 6) SECTIONS === */
.section{ padding: calc(var(--nav-h) + 28px) 0 64px; }
/* der Hero hat mehr Luft nach oben für das große Logo */
.section--hero{ padding-top: calc(var(--nav-h) + 306px); }

/* === 7) LAYOUT-GRIDS === */
.grid{ display:grid; gap:var(--gap); }

/* Standard-Split – wird für VITA/WERKE unten gezielt überschrieben */
.grid--split{ grid-template-columns:1.1fr .9fr; align-items:start; }
@media (max-width:960px){ .grid--split{ grid-template-columns:1fr; } }

.grid--details{ grid-template-columns:repeat(3,1fr); }
@media (max-width:1024px){ .grid--details{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:640px){  .grid--details{ grid-template-columns:1fr; } }

/* Galerie-Grid */
.grid--gallery{ grid-template-columns:repeat(3,1fr); }
@media (max-width:1024px){ .grid--gallery{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:640px){  .grid--gallery{ grid-template-columns:1fr; } }

.tile{
  display:block; position:relative; overflow:hidden;
  border:1px solid var(--line); background:#0a0a0a;
}
.tile img{
  width:100%; height:100%; object-fit:cover;
  transform:scale(1.001); transition:transform .25s ease;
}
.tile:hover img{ transform:scale(1.03); }

/* === 8) LIGHTBOX (weiß, Schatten nur unten/rechts) === */
.lightbox{
  position:fixed; inset:0; background:#fff;
  display:none; align-items:center; justify-content:center;
  padding:24px; z-index:2000;
}
.lightbox.show{ display:flex; }
.lb-image{
  display:block; background:transparent; padding:0; border:0; outline:0; border-radius:0;
  /* modern: weicher Richtungsschatten */
  filter:
    drop-shadow(var(--lb-sx)  var(--lb-sy)  var(--lb-blur)  rgba(0,0,0,var(--lb-alpha)))
    drop-shadow(var(--lb-sx2) var(--lb-sy2) var(--lb-blur2) rgba(0,0,0,var(--lb-alpha2)));
  /* Fallback */
  box-shadow: var(--lb-sx) var(--lb-sy) var(--lb-blur) rgba(0,0,0,var(--lb-alpha));
  max-width:min(1200px,96%); max-height:88vh; width:auto; height:auto;
}
.lb-close,.lb-prev,.lb-next{
  position:absolute; background:rgba(0,0,0,.06); color:#000;
  border:1px solid rgba(0,0,0,.35); width:42px; height:42px;
  font-size:26px; line-height:36px; text-align:center; border-radius:50%;
  cursor:pointer; user-select:none;
}
.lb-close{ top:18px; right:18px; }
.lb-prev{ left:18px; top:50%; transform:translateY(-50%); }
.lb-next{ right:18px; top:50%; transform:translateY(-50%); }
.lb-close:hover,.lb-prev:hover,.lb-next:hover{ background:#fff; }

/* === 9) VITA & WERKE: Oberkante bündig + kleiner Abstand === */
#vita .grid--split,
#werke .grid--split{
  grid-template-columns: max-content 1fr;          /* Bildbreite + Text */
  column-gap: clamp(12px, 1.6vw, 24px);            /* kleiner Abstand */
  align-items:start; justify-items:start;
}
#vita .grid--split > figure,
#werke .grid--split > figure,
#vita .grid--split > div,
#werke .grid--split > div{ align-self:start; }

#vita figure, #werke figure{ margin:0; }
#vita figure img, #werke figure img{ display:block; margin:0; }

/* Headline direkt oben (kein extra Top-Margin) */
#vita .grid--split h2:first-child,
#werke .grid--split h2:first-child{ margin:0 0 8px; line-height:1.1; }

/* Bildbreite limitieren (sanft responsiv) */
#vita figure img, #werke figure img{
  width:auto; max-width: clamp(260px, 30vw, 520px); height:auto;
}

/* Stack auf schmalen Screens */
@media (max-width:960px){
  #vita .grid--split, #werke .grid--split{
    grid-template-columns:1fr; column-gap:0; row-gap:24px;
  }
}

/* === 10) KONTAKT/FOOTER === */
.kontakt a{ color:#fff; text-decoration:underline; text-underline-offset:3px; }

.site-footer{
  border-top:1px solid var(--line); padding:22px 0;
}
.site-footer .wrap{
  display:flex; gap:16px; align-items:center; justify-content:space-between; flex-wrap:wrap;
}
.to-top{ color:#fff; text-decoration:none; opacity:.8; }
.to-top:hover{ opacity:1; text-decoration:underline; text-underline-offset:3px; }

/* ================================
   VITA & WERKE: Breite wie Galerie
   ================================ */

/* Desktop: optionaler Clamp nur hier */
@media (min-width: 961px){
  #vita figure img,
  #werke figure img{
    width: auto;
    max-width: clamp(260px, 30vw, 520px);
    height: auto;
  }
}

/* Mobil/Tablet: exakt Containerbreite (wie Galerie bei 1 Spalte) */
@media (max-width: 960px){
  /* eine Spalte untereinander */
  #vita .grid--split,
  #werke .grid--split{
    grid-template-columns: 1fr;
  }

  /* Figure füllt die Spalte */
  #vita .grid--split > figure,
  #werke .grid--split > figure{
    width: 100%;
    margin: 0;              /* keine negativen oder zusätzlichen Margins */
  }

  /* Bild füllt den Container */
  #vita .grid--split > figure img,
  #werke .grid--split > figure img{
    display: block;
    width: 100%;
    max-width: 100%;        /* überschreibt den Desktop-Clamp */
    height: auto;
  }
}

