/* Werner Lang Fotografie – Stylesheet */
:root {
  --bg: #ffffff;
  --text: #2b2b2b;
  --muted: #6b6b6b;
  --line: #e4e4e4;
  --accent: #af111d;
  --accent-text: #af111d;
  --overlay: #0c0c0c;
  --max: 1180px;
  --gutter: clamp(16px, 4vw, 48px);
  --font: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #e8e8e8;
    --muted: #a0a0a0;
    --line: #2c2c2c;
    --accent-text: #f0606a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--font);
  letter-spacing: 0.01em;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--bg); padding: 8px 12px; z-index: 10; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kopf ---------- */
.site-header {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 40px) var(--gutter) 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-direction: row-reverse;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.logo img { width: clamp(76px, 12vw, 120px); height: auto; border-radius: 50%; }
@media (prefers-color-scheme: dark) {
  .logo img { box-shadow: 0 0 0 1px #4a4a4a; }
}
.main-nav ul, .sub-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.main-nav ul { gap: 4px clamp(16px, 3vw, 36px); }
.main-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a[aria-current="page"] { color: var(--accent-text); border-color: var(--accent); }

.sub-nav { width: 100%; max-width: var(--max); margin: 0 auto; padding: 14px var(--gutter) 0; }
.sub-nav ul { gap: 6px 8px; }
.sub-nav a {
  display: inline-block;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}
.sub-nav a:hover { color: var(--text); border-color: var(--muted); }
.sub-nav a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Inhalt ---------- */
.content {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) var(--gutter) 64px;
}
.content > p, .content > h2, .content > h3, .content > .list, .content > address { max-width: 62ch; }
h1, h2, h3 { font-weight: 400; line-height: 1.25; letter-spacing: 0.04em; }
h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 1.2em; }
h2 { color: var(--accent-text); font-size: 1.15rem; margin: 2.2em 0 0.3em; }
h2:first-child, .visually-hidden + h2 { margin-top: 0; }
h3 { font-weight: 700; font-size: 1rem; margin: 0.4em 0 0.6em; }
p { margin: 0 0 1em; }
.list { list-style: none; padding: 0; margin: 0 0 1.2em; }
.list li::before { content: "° "; color: var(--accent-text); }
address { font-style: normal; line-height: 1.8; }

/* Bildraster (Masonry über CSS-Spalten, Bilder unbeschnitten) */
.grid {
  list-style: none;
  padding: 0;
  margin: 1.5em 0 2em;
  columns: 3 260px;
  column-gap: clamp(10px, 1.6vw, 20px);
}
.grid li { break-inside: avoid; margin-bottom: clamp(10px, 1.6vw, 20px); }
.grid a { display: block; overflow: hidden; background: var(--line); cursor: zoom-in; }
.grid img { width: 100%; transition: transform 0.5s ease, opacity 0.3s; }
.grid a:hover img { transform: scale(1.03); }

/* jobs-Übersicht */
.tiles {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(12px, 2vw, 24px);
}
.tiles a { display: block; text-decoration: none; }
.tiles img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--line); transition: opacity 0.3s; }
.tiles a:hover img { opacity: 0.85; }
.tiles span { display: block; padding-top: 8px; letter-spacing: 0.08em; }
.tiles a:hover span { color: var(--accent-text); }

/* ---------- Fuß ---------- */
.site-footer {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--gutter) 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer p { margin: 0; }
.site-footer a { text-decoration: none; }

/* ---------- Lightbox ---------- */
.lightbox {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  background: var(--overlay);
  color: #fff;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: #0c0c0c; }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 10px; }
.lightbox img { max-width: min(92vw, 1200px); max-height: 84vh; width: auto; height: auto; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
.lightbox figcaption { font-size: 0.8rem; letter-spacing: 0.1em; color: #bbb; }
.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  font: 300 2.6rem/1 var(--font);
  width: 56px;
  height: 56px;
  cursor: pointer;
  opacity: 0.75;
}
.lightbox button:hover { opacity: 1; }
.lb-close { top: 8px; right: 8px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }

@media (max-width: 560px) {
  .site-header { align-items: center; }
  .grid { columns: 2 140px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
