@font-face {
  font-family: "DM Sans";
  src: url("../fonts/DMSans-Variable.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f7f6f2;
  --ink: #131311;
  --muted: #726e64;
  --line: #dedad1;
  --paper: #ffffff;
  --font-display: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(20px, 4vw, 56px);
  mix-blend-mode: difference;
}

.site-header .mark {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
}

.site-header .mark .logo-svg {
  height: 36px;
  width: auto;
  fill: currentColor;
}

.site-header nav {
  display: flex;
  gap: 28px;
}

.site-header nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.site-header nav a:hover { opacity: 0.7; }

/* Subseiten ohne dunkles Hero-Bild dahinter: normaler, heller Header
   statt des Differenz-Blend-Tricks, der ein dunkles Hero voraussetzt. */
.site-header--light {
  position: relative;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  mix-blend-mode: normal;
}

.site-header--light .mark,
.site-header--light nav a {
  color: var(--ink);
}

/* ---------- Hamburger-Menü (nur < 640px sichtbar) ---------- */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 639px) {
  .site-header .mark .logo-svg,
  .footer-mark .logo-svg {
    height: 22px;
  }

  /* Der Differenz-Blend-Trick ist auf schmalen Screens mit viel
     Textinhalt riskant (schlecht lesbar über hellen Bildpartien).
     Stattdessen: fester dunkler Verlauf hinter dem Header, damit
     Logo/Icon immer zuverlässig lesbar bleiben. */
  .site-header:not(.site-header--light) {
    mix-blend-mode: normal;
    background: linear-gradient(180deg, rgba(10,10,9,0.6) 0%, rgba(10,10,9,0) 100%);
  }

  .nav-toggle { display: flex; }

  .site-header nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--ink);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .site-header--light nav {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  .site-header nav.is-open { max-height: 240px; }

  .site-header nav a {
    padding: 16px clamp(20px, 4vw, 56px);
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }

  .site-header--light nav a { border-bottom-color: var(--line); }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: 100svh;
  min-height: 480px;
  overflow: hidden;
  background: var(--ink);
}

.hero-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1.1s ease, transform 1.4s ease;
}

.hero-media.is-loaded {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 639px) {
  /* Auf schmalen Screens schneidet "cover" bei Querformat-Fotos oft zu
     viel vom Motiv weg. Stattdessen: ganzes Foto sichtbar ("contain"),
     mit dezenten Balken in der Hintergrundfarbe statt Beschnitt. Ein
     quadratisches Format hält die Balken klein, egal welches
     Seitenverhältnis das jeweilige Foto hat. */
  .hero {
    height: auto;
    aspect-ratio: 1 / 1;
    min-height: unset;
  }

  .hero-media {
    background-size: contain;
  }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.55) 100%);
}

.hero-text {
  position: absolute;
  left: clamp(20px, 4vw, 56px);
  bottom: clamp(28px, 5vw, 56px);
  right: clamp(20px, 4vw, 56px);
  color: #fff;
  z-index: 2;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 5.5vw, 4rem);
  line-height: 1.02;
  margin: 0 0 10px;
  max-width: 18ch;
}

.hero-text p {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255,255,255,0.82);
}

/* ---------- Gallery ---------- */

.gallery {
  padding: clamp(48px, 8vw, 96px) clamp(20px, 4vw, 56px);
  max-width: 1600px;
  margin: 0 auto;
}

.gallery-grid {
  display: flex;
  align-items: flex-start;
  gap: clamp(14px, 2vw, 24px);
}

.gallery-col {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 24px);
  flex: 1 1 0;
  min-width: 0;
}

.gallery-item {
  cursor: zoom-in;
  background: var(--paper);
  border: 1px solid var(--line);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.35s ease;
}

.gallery-item:hover img { opacity: 0.86; }

.empty-state {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 40px 0;
}

.empty-state code {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1px 6px;
}

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

.contact {
  border-top: 1px solid var(--line);
  padding: clamp(48px, 8vw, 96px) clamp(20px, 4vw, 56px);
}

.contact-inner {
  max-width: 560px;
  margin: 0 auto;
}

.contact h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 12px;
}

.contact-intro {
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 42ch;
}

.form-row {
  margin-bottom: 20px;
}

.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  border-radius: 0;
}

.form-row textarea { resize: vertical; }

.form-row input:focus,
.form-row textarea:focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

/* Honeypot: für Menschen unsichtbar, aber im DOM vorhanden und ausfüllbar
   (kein display:none/visibility:hidden – manche Bots erkennen das). */
.form-row--honeypot {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-submit {
  appearance: none;
  border: none;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 13px 28px;
  cursor: pointer;
}

.form-submit:hover { opacity: 0.85; }

.form-status {
  margin: 16px 0 0;
  font-size: 0.9rem;
}

.form-status.is-success { color: #3f6b4a; }
.form-status.is-error { color: #a33c2e; }

/* ---------- Footer ---------- */

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 32px clamp(20px, 4vw, 56px);
  border-top: 1px solid var(--line);
  max-width: 1600px;
  margin: 0 auto;
}

.footer-mark { display: flex; align-items: center; text-decoration: none; }

.footer-mark .logo-svg {
  height: 32px;
  width: auto;
  fill: var(--ink);
}

.footer-legal {
  text-align: right;
}

.legal-nav {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.legal-nav a {
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--muted);
}

.legal-nav a:hover { color: var(--ink); text-decoration: underline; }

footer a { text-decoration: none; }

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

/* ---------- Rechtstext-Seiten (Impressum / Datenschutz) ---------- */

.legal-page {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) clamp(20px, 4vw, 56px);
}

.legal-page h1 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 8px;
}

.legal-stand {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 40px;
}

.legal-page h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 40px 0 12px;
}

.legal-page p,
.legal-page ul {
  margin: 0 0 16px;
  max-width: 68ch;
}

.legal-page ul { padding-left: 1.2em; }

.legal-page a { text-decoration: underline; }

body.subpage main.legal-page { padding-top: clamp(48px, 8vw, 96px); }

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

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,10,9,0.96);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 32px;
}

.lightbox.is-open { display: flex; }

.lightbox-img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 12px;
  opacity: 0.75;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }

.lightbox-close { top: 18px; right: 18px; }
.lightbox-prev { left: 8px; top: 50%; transform: translateY(-50%); font-size: 2.2rem; }
.lightbox-next { right: 8px; top: 50%; transform: translateY(-50%); font-size: 2.2rem; }

.lightbox-count {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media { transition: none; }
}
