/* ==========================================================================
   Bernhard Ludewig – Fotografie-Portfolio
   Grundgerüst: Reset, Typografie, Layout, Header/Menü, Sektionen
   ========================================================================== */

/* --- Fonts -------------------------------------------------------------- */

@font-face {
  font-family: "Istok Web";
  src: url("../fonts/IstokWeb-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Istok Web";
  src: url("../fonts/IstokWeb-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Istok Web";
  src: url("../fonts/IstokWeb-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Istok Web";
  src: url("../fonts/IstokWeb-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* --- Variablen ------------------------------------------------------------ */

:root {
  --color-bg-light: #ffffff;
  --color-text-light: #111111;
  --color-bg-dark: #000000;
  --color-text-dark: #f2f2f2;
  --color-accent: #c81e1e;
  --color-muted: #8a8a8a;

  /* Gesamte Seite auf 80% skaliert, damit auch Notebook-Bildschirme (~1280-1440px)
     bereits die eingerahmte Darstellung bekommen statt der randlosen Mobil-Variante. */
  --content-max: 1120px;
  --bleed: 36.8px;
  --font-base: "Istok Web", Arial, Helvetica, sans-serif;

  /* Titelgröße ("Bernhard Ludewig" / "Dokumentation") - auch für Rubriktitel
     (Kultur, Konferenzen, ...) und Teaser-Bildunterschriften (Portraits, ...) genutzt */
  --title-size: clamp(1.2rem, 4vw, 2.64rem);
  /* Fließtext-Größe unter dem Titel - auch für Rubrik-Einleitungstexte genutzt */
  --body-lead-size: clamp(0.68rem, 1.76vw, 1.26rem);
  /* Schriftgröße im aufklappbaren Menü */
  --caption-size: clamp(1.2rem, calc(0.8vw + 14.4px), 1.6rem);
}

/* --- Reset ----------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: var(--font-base);
  background: var(--color-bg-dark);
  color: var(--color-text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0 0 0.75em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 400;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* --- Sprachumschaltung: beide Sprachen liegen im DOM, Anzeige rein per CSS -- */

html[lang="de"] [data-lang="en"],
html[lang="en"] [data-lang="de"] {
  display: none !important;
}

/* --- Kopfzeile: Hamburger-Menü + Sprachwahl, auf jeder Seite fix oben rechts */

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  padding: 1rem;
}

.menu-toggle {
  width: 27.2px;
  height: 20.8px;
  background: transparent;
  border: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-toggle span {
  display: block;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
}

.lang-switch {
  display: flex;
  gap: 0.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.lang-switch button {
  background: transparent;
  border: 0;
  color: #fff;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
  opacity: 0.6;
  padding: 0;
}

.lang-switch button[aria-pressed="true"] {
  opacity: 1;
}

/* --- Ausklappbares Menü ---------------------------------------------------- */

.site-menu {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(90vw, 512px);
  max-height: calc(100vh + 200px);
  background: var(--color-bg-dark);
  color: var(--color-text-dark);
  text-align: center;
  z-index: 99;
  padding: calc(2.4rem + 80px) 1.6rem;
  overflow-y: auto;
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.site-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.site-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.site-menu-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.site-menu-logo {
  display: block;
  margin: 0 auto calc(1.2rem + 19.2px);
  max-width: 102.4px;
}

.site-menu-logo img {
  width: 100%;
}

.menu-group-label {
  font-size: calc(var(--caption-size) * 0.7143);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 1.5rem;
}

.menu-group-label:first-of-type {
  margin-top: 0;
}

.site-menu ul li {
  margin: 0.5rem 0;
}

.site-menu ul li a {
  font-size: var(--caption-size);
}

.site-menu ul + ul {
  margin-top: 2em;
}

.site-menu-footer {
  margin-top: 2em;
  display: block;
  font-size: 0.88rem;
  color: var(--color-muted);
}

.site-menu-footer a {
  display: block;
  margin: 0.3em 0;
}

/* --- Sektionen allgemein ---------------------------------------------------- */

.section-light {
  background: var(--color-bg-dark);
  color: var(--color-text-dark);
}

.section-dark {
  background: var(--color-bg-dark);
  color: var(--color-text-dark);
}

.section-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 0 2.5rem;
}

/* --- Hero (Startbild) -------------------------------------------------------- */

.hero {
  background: var(--color-bg-dark);
  text-align: center;
}

.hero-media {
  max-width: var(--content-max);
  margin: 0 auto;
}

.hero-frame {
  display: block;
  box-shadow: var(--bleed) 0 0 #fff, calc(var(--bleed) * -1) 0 0 #fff;
}

.hero-frame img {
  width: 100%;
}

.hero-text {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2.5rem 0;
}

.hero-text h1 {
  font-size: var(--title-size);
  margin: 0 0 0.6em;
}

.hero-text p {
  font-size: var(--body-lead-size);
  color: #fff;
}

/* --- Teaser-Kacheln (Startseiten-Verweise auf die Unterseiten) -------------- */

.teaser {
  display: block;
  margin: 0 auto 2rem;
  max-width: var(--content-max);
  text-align: center;
}

.teaser-frame {
  display: block;
  box-shadow: var(--bleed) 0 0 #fff, calc(var(--bleed) * -1) 0 0 #fff;
}

.teaser-caption {
  display: block;
  margin-top: 19.2px;
  font-size: var(--title-size);
  letter-spacing: 0.03em;
}

.section-heading {
  text-align: center;
  font-size: clamp(1.02rem, calc(0.68vw + 12.24px), 1.36rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 2rem 1.2rem 0.4rem;
}

/* --- Über mich / Kontakt ------------------------------------------------------ */

.info-block {
  text-align: center;
  padding-bottom: 2.5rem;
}

.info-block .info-media {
  max-width: var(--content-max);
  margin: 0 auto;
}

.info-block img {
  width: 100%;
}

.info-block h2 {
  padding: 1.2rem 1.2rem 0.4rem;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

/* "Über mich" und "Kontakt" gleich groß, eigens vergrößert gegenüber der Basisgröße */
#ueber-mich h2,
#kontakt h2 {
  font-size: clamp(1.02rem, calc(0.68vw + 12.24px), 1.36rem);
}

.info-block address {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--color-muted);
}

.info-block address a {
  display: block;
}

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

.site-footer {
  background: var(--color-bg-dark);
  color: var(--color-muted);
  text-align: center;
  font-size: clamp(0.9rem, calc(0.6vw + 10.8px), 1.2rem);
  padding: 1.2rem;
}

.site-footer a {
  margin: 0 0.5rem;
}

/* --- Rechtstexte (Impressum, Datenschutz) --------------------------------------- */

.legal {
  max-width: 640px;
  margin: 0 auto;
  padding: 5.6rem 48px 3.2rem;
}

.legal h1 {
  font-size: clamp(1.44rem, 3.2vw, 2.08rem);
  text-align: center;
  margin-bottom: 1.6rem;
}

.legal h2 {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 1.6rem 0 0.4rem;
}

.legal p {
  margin: 0 0 1em;
}

/* --- Rubrik-Seiten (Dokumentation, Kommunikation, ...) -------------------------- */

/* Bilder füllen den Bereich der weißen Streifen mit aus (2x --bleed breiter als
   die --content-max-Spalte) und verlieren beim Zusammenschieben erst diesen
   Rand, bevor sie selbst kleiner werden - gleiches Prinzip wie der Rahmen auf
   der Startseite. */
.bleed {
  display: block;
  width: calc(100% + var(--bleed) * 2);
  margin: 0 calc(var(--bleed) * -1) 1.6rem;
}

.bleed img {
  width: 100%;
  display: block;
}

.bleed-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6.4px;
}

.bleed-pair img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

button.bleed,
.bleed-pair button {
  display: block;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.rubric {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2.4rem 0 0;
}

.hero-media .bleed {
  margin-bottom: 0;
}

.rubric-heading {
  text-align: center;
  font-size: var(--title-size);
  margin-bottom: 1em;
}

.rubric-intro {
  max-width: var(--content-max);
  margin: 0 auto 2rem;
  padding: 0 1.2rem;
  text-align: center;
  font-size: var(--body-lead-size);
  color: #fff;
}

/* --- Lightbox (Bildserien) ------------------------------------------------------ */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.lightbox-stage img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  opacity: 0.8;
  z-index: 2;
}

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

.lightbox-close {
  top: 0.5rem;
  right: 0.5rem;
  font-size: 2rem;
  line-height: 1;
  padding: 0.75rem;
  z-index: 3;
}

.lightbox-prev,
.lightbox-next {
  top: 0;
  bottom: 0;
  width: 40%;
  display: flex;
  align-items: center;
  font-size: 4rem;
  line-height: 1;
}

.lightbox-prev {
  left: 0;
  justify-content: flex-start;
  padding-left: 0.5rem;
}

.lightbox-next {
  right: 0;
  justify-content: flex-end;
  padding-right: 0.5rem;
}

.lightbox-counter {
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.legal address {
  font-style: normal;
}

.legal ul {
  list-style: disc;
  padding-left: 1.5em;
  margin: 0 0 1em;
}

.legal li {
  margin: 0.25em 0;
}

.legal .lead {
  color: var(--color-muted);
  margin-bottom: 2rem;
}

