/* =========================================================
   [NAME] Fotografie – Stylesheet
   ========================================================= */

:root {
  --ink: #111111;
  --muted: #6B6B6B;
  --line: #E5E5E5;
  --bg: #FFFFFF;
  --dark: #1C1B18;
  --pad: clamp(20px, 3vw, 40px);
  --sans: "Archivo", system-ui, sans-serif;
  --serif: "EB Garamond", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: none; transition: color .2s; }
a:hover { color: var(--muted); }
figure { margin: 0; }

.wrap { padding: 0 var(--pad); }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.label { font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- Hero ---------- */
.hero {
  position: relative; height: 100vh; min-height: 640px; max-height: 1000px;
  color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  padding: 22vh clamp(20px, 6vw, 120px) 40px; overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; background: #B9A7A2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero > *:not(.hero__bg) { position: relative; z-index: 1; }
.hero a { color: #fff; }
.hero a:hover { opacity: .7; color: #fff; }
.hero__row {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
  font-size: 10px; font-weight: 500; letter-spacing: .2em;
  text-transform: uppercase; text-align: center; line-height: 1.6;
}
.hero__logo { text-align: center; font-size: clamp(40px, 4vw, 56px); letter-spacing: .04em; }

/* ---------- Header ---------- */
.header {
  display: flex; flex-wrap: wrap; gap: 24px;
  align-items: center; justify-content: space-between; padding: 28px 0;
}
.logo { font-weight: 800; font-size: 40px; letter-spacing: -.03em; line-height: 1; }
.nav { display: flex; flex-wrap: wrap; gap: clamp(24px, 6vw, 96px); }
.nav a { display: flex; align-items: center; gap: 8px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); display: inline-block; }
.dots { display: flex; gap: 6px; }
.dots span { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--ink); }
.dots span:last-child { background: var(--ink); }

/* ---------- Kapitel (Galerie, Anlässe, Tiere) ---------- */
.section { padding: 140px 0 160px; scroll-margin-top: 20px; }
.section + .section { border-top: 1px solid var(--line); }
.section__head { max-width: 620px; margin: 0 auto 88px; text-align: center; }
.section__title {
  font-family: var(--sans); font-weight: 800;
  font-size: clamp(48px, 6vw, 88px); line-height: 1; letter-spacing: -.03em;
  margin: 16px 0 20px;
}
.section__lead { font-size: 16px; line-height: 1.6; color: var(--muted); margin: 0; }

.section--dark { background: var(--dark); color: #F2EEE8; }
.section--dark .section__lead,
.section--dark .caption__text { color: #A9A49B; }
.section--dark .caption__nr { color: #7F7A71; }

/* ---------- Bilder: frei verteilt wie eine Ausstellungswand ----------
   Position & Grösse jedes Bildes kommen aus js/main.js (LAYOUT). */
.collage {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2.5vw, 40px);
  row-gap: 56px;
  align-items: start;
  max-width: 1400px; margin: 0 auto;
}
.shot { position: relative; }

/* Bild wird nie zugeschnitten – die Box passt sich an */
.frame { position: relative; }
.frame img { display: block; width: 100%; height: auto; }

/* 2 Bilder in einer Reihe: gleiche Höhe, damit sie gleich gross wirken */
.shot.pair .frame img { width: auto; height: auto; max-width: 100%; max-height: clamp(420px, 50vw, 780px); margin: 0 auto; }
.shot.pair .caption { justify-content: center; }
/* Bild fehlt noch → Platzhalter */
.frame.is-empty { aspect-ratio: 4 / 5; background: #D9D6D0; }
.frame.is-empty::after {
  content: attr(data-label); position: absolute; left: 12px; bottom: 12px; right: 12px;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.section--dark .frame.is-empty { background: #34322D; }
.section--dark .frame.is-empty::after { color: #8C877E; }

.caption { display: flex; gap: 12px; padding-top: 14px; font-size: 13px; line-height: 1.5; }
.caption__nr { font-size: 10px; letter-spacing: .12em; color: var(--muted); padding-top: 2px; }
.caption__text { color: var(--ink); }
.caption em { font-style: normal; color: var(--muted); }

/* sanftes Einblenden beim Scrollen */
.shot { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.shot.is-visible { opacity: 1; transform: none; }

/* ---------- Info ---------- */
.info {
  border-top: 1px solid var(--line); padding: 28px 0 80px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px;
}
.info__text { font-size: 22px; line-height: 1.4; margin: 0; }
.info__col { display: flex; flex-direction: column; gap: 8px; font-family: var(--serif); font-size: 18px; }
.info__col .label { font-family: var(--sans); margin-bottom: 8px; }

/* ---------- Footer ---------- */
.footer { padding: 40px 0 28px; }
.footer__logo { font-weight: 800; font-size: clamp(80px, 17vw, 260px); letter-spacing: -.05em; line-height: .85; }
.footer__meta { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; margin-top: 28px; }
.footer__meta a { color: var(--muted); }

/* ---------- Tablet & Handy ---------- */
@media (max-width: 1000px) {
  .shot.pair .frame img { height: auto; width: 100%; }
  .collage { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .shot { grid-column: auto !important; margin: 0 !important; }
  .shot:nth-child(4n+2) { margin-top: 80px !important; }
  .shot:nth-child(4n+3) { padding: 0 12%; }
}
@media (max-width: 600px) {
  .hero__row { grid-template-columns: 1fr; gap: 12px; }
  .section { padding: 80px 0 100px; }
  .section__head { margin-bottom: 56px; }
  .collage { grid-template-columns: 1fr; }
  .shot:nth-child(n) { margin-top: 0 !important; padding: 0; }
  .shot:nth-child(3n+1) { padding-right: 18%; }
  .shot:nth-child(3n+2) { padding-left: 25%; }
  .shot:nth-child(3n)   { padding: 0 8%; }
}
@media (prefers-reduced-motion: reduce) {
  .shot { opacity: 1; transform: none; transition: none; }
}

/* ---------- Grossansicht (Lightbox) ---------- */
.frame img { cursor: zoom-in; transition: opacity .3s; }
.frame img:hover { opacity: .88; }
.shot:focus { outline: none; }
.shot:focus-visible { outline: 1px solid currentColor; outline-offset: 6px; }

.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(14, 13, 11, .96); color: #F2EEE8;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 72px 96px 40px;
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox__img {
  max-width: 100%; max-height: calc(100vh - 180px);
  width: auto; height: auto; display: block; object-fit: contain;
  transform: scale(.98); transition: transform .35s ease;
}
.lightbox.is-open .lightbox__img { transform: none; }
.lightbox__caption {
  display: flex; gap: 16px; align-items: baseline; margin-top: 20px;
  font-size: 13px; color: #A9A49B; text-align: center;
}
.lightbox__caption em { font-style: normal; color: #7F7A71; }
.lightbox__count { font-size: 10px; letter-spacing: .14em; color: #7F7A71; }
.lightbox button {
  position: absolute; background: none; border: 0; color: #F2EEE8; cursor: pointer;
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  opacity: .7; transition: opacity .2s;
}
.lightbox button:hover { opacity: 1; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
body.no-scroll { overflow: hidden; }

@media (max-width: 600px) {
  .lightbox { padding: 64px 12px 32px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 12px; transform: none; }
}

/* ---------- Logo als Bild ---------- */
.logo img         { height: 40px; width: auto; display: block; }
.hero__logo img   { height: clamp(48px, 6vw, 88px); width: auto; display: inline-block; filter: invert(1); }
.footer__logo img { width: min(100%, 1100px); height: auto; display: block; }