/*
Theme Name: spaetling
Theme URI: https://spaetling.de
Author: Markus Spätling
Description: Schlankes Theme fuer spaetling.de — dunkles Foto-Portfolio ohne
 externe Ressourcen, ohne Cookies, ohne Tracking. Foto-Downloads via Plugin
 spaetling-core.
Version: 2.1.0
License: GPLv2 or later
Text Domain: sp
*/

/* spaetling.de — persönliche Website von Markus Spätling.
   Design „Dunkles Foto-Portfolio" (Variante 2, gewählt 2026-08-13):
   dunkler Grund, Fotos als Bühne, Bernstein-Akzent.
   Keine externen Ressourcen, keine Cookies. */

:root {
  --bg: #101418;
  --card: #1a2027;
  --ink: #eef2f5;
  --muted: #9aa7b2;
  --soft: #cfd8df;
  --accent: #e8a04c;
  --accent-ink: #161006;
  --line: #2a333d;
  --focus: #6fb3e0;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.03rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

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

h1, h2, h3 {
  line-height: 1.2;
  hyphens: auto;
  overflow-wrap: break-word;
}

h1 { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 750; margin: 0 0 0.4em; }
h2 { font-size: clamp(1.3rem, 3.5vw, 1.6rem); margin: 2em 0 0.8em; }
h3 { font-size: 1.12rem; margin: 1.4em 0 0.4em; }

p { margin: 0 0 1em; }

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

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

/* Breite und Seitenabstand kommen AUSSCHLIESSLICH aus .wrap.
   Merksatz: in „wrap etwas-in“-Regeln nie padding-Kurzform, nie max-width. */
.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding-inline: 24px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--card);
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 99;
}
.skip:focus { left: 8px; }

/* ---------- Kopf ---------- */

.site-head {
  background: rgba(16, 20, 24, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(6px);
}

.head-in {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-block: 16px;
  flex-wrap: wrap;
}

.brand {
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.08rem;
  margin-right: auto;
  white-space: nowrap;
}

.brand span { color: var(--accent); }

.nav { display: flex; gap: 6px; flex-wrap: wrap; }

.nav a {
  text-decoration: none;
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 0.97rem;
}

.nav a:hover { background: rgba(255, 255, 255, 0.12); }

.nav a[aria-current="page"],
.nav .current_page_item > a {
  background: rgba(255, 255, 255, 0.14);
}

.nav-btn {
  display: none;
  font: inherit;
  color: var(--ink);
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 16px;
  min-height: 44px;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-btn { display: block; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-bottom: 10px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
}

/* ---------- Foto-Hero (Startseite) ---------- */

.hero-foto {
  position: relative;
  min-height: clamp(420px, 60vh, 620px);
  display: flex;
  align-items: flex-end;
}

.hero-foto > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-foto::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(16, 20, 24, 0.45) 0%,
    rgba(16, 20, 24, 0.12) 45%,
    rgba(16, 20, 24, 0.94) 100%);
}

.hero-foto .hero-in { position: relative; z-index: 2; }

/* ---------- Hero (Unterseiten: dunkel, ohne Foto) ---------- */

.hero { border-bottom: 1px solid var(--line); }

.hero-in { padding-block: 56px 44px; }
.hero-in > * { max-width: 56ch; }

.hero-foto .hero-in { padding-block: 70px 52px; }

p.lede { font-size: 1.12rem; color: var(--soft); }

.hero .hero-in h1::before {
  content: "";
  display: block;
  width: 44px;
  border-top: 4px solid var(--accent);
  border-radius: 2px;
  margin-bottom: 20px;
}

/* ---------- Knöpfe ---------- */

.dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 700;
  border-radius: 8px;
  padding: 13px 26px;
  min-height: 24px;
  align-self: start;
}

.dl-btn:hover { filter: brightness(1.08); }

/* ---------- Foto-Leiste ---------- */

.strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  opacity: 0.92;
}

@media (max-width: 720px) {
  .strip { grid-template-columns: repeat(3, 1fr); }
  .strip img:nth-child(n+4) { display: none; }
}

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

.karten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 18px;
  margin: 1.4em 0;
  padding: 0;
  list-style: none;
}

.karte {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.karte h2, .karte h3 { margin: 0; font-size: 1.1rem; }

.karte h2::before, .karte h3::before {
  content: "";
  display: block;
  width: 30px;
  border-top: 3px solid var(--accent);
  border-radius: 2px;
  margin-bottom: 14px;
}

.karte p { margin: 0; color: var(--muted); font-size: 0.96rem; }

.karte .mehr { margin-top: auto; padding-top: 12px; font-weight: 600; font-size: 0.95rem; }

.karte .mehr a { text-decoration: none; }

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

.abschnitt { padding-block: 40px 24px; }

.abschnitt > h2:first-child,
.zweispalt h2:first-child { margin-top: 0.4em; }

.zweispalt {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 26px;
  align-items: start;
}

.zweispalt p { color: var(--soft); }

.hinweis {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 14px 18px;
}

/* ---------- Foto-Download-Bereich ---------- */

.alben {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 20px;
  margin: 1.4em 0;
  padding: 0;
  list-style: none;
}

.album {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.album-bild { aspect-ratio: 3 / 2; overflow: hidden; background: #232b34; }

.album-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }

.album-bild .platzhalter-bild {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.album-in {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.album-in h3 { margin: 0; }

.album-in h3::before {
  content: "";
  display: block;
  width: 30px;
  border-top: 3px solid var(--accent);
  border-radius: 2px;
  margin-bottom: 12px;
}

.album-in .album-text { color: var(--muted); margin: 0; flex: 1; font-size: 0.96rem; }

.album-meta { color: var(--muted); font-size: 0.85rem; margin: 0; }

/* ---------- Reise-Alben ---------- */

.reise-album { padding-block: 26px 8px; }

.reise-album > h2 { margin-top: 0.6em; }

.reise-album > h2::before {
  content: "";
  display: block;
  width: 38px;
  border-top: 4px solid var(--accent);
  border-radius: 2px;
  margin-bottom: 16px;
}

.reise-album .intro { color: var(--soft); max-width: 75ch; }

.galerie {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 14px;
  margin: 1.2em 0 0.6em;
}

.galerie figure {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.galerie img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}

.galerie figcaption {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Lightbox ---------- */

.lb {
  position: fixed;
  inset: 0;
  background: rgba(10, 13, 16, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.lb.open { display: flex; }

.lb img {
  max-width: min(92vw, 1500px);
  max-height: 84vh;
  object-fit: contain;
}

.lb button {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  cursor: pointer;
}

.lb button:hover { background: rgba(255, 255, 255, 0.18); }

.lb .lb-x { top: 18px; right: 18px; }
.lb .lb-p { left: 14px; top: 50%; transform: translateY(-50%); }
.lb .lb-n { right: 14px; top: 50%; transform: translateY(-50%); }

.lb .lb-cap {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--soft);
  font-size: 0.92rem;
  margin: 0;
  max-width: 90vw;
  text-align: center;
}

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

.kontakt-karte {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px;
  max-width: 520px;
}

.kontakt-karte p { margin: 0 0 0.6em; }

/* ---------- Textseiten (Recht) ---------- */

.legal > * { max-width: 70ch; }
.legal { padding-block: 34px; }
.legal p, .legal li { color: var(--soft); }

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

.site-foot {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.foot-in {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  align-items: center;
  justify-content: space-between;
  padding-block: 22px;
  font-size: 0.9rem;
}

.foot-in p { margin: 0; }

.site-foot nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }

.site-foot a { color: var(--muted); padding: 8px 0; }

/* ---------- WordPress-Inhalt ---------- */

main { display: block; }

main > .wp-block-shortcode { margin: 0; }
