/* Entwurf adret.de – dunkler Stil, Bilder in ihren echten Formaten */

@font-face { font-family: "Open Sans"; font-weight: 300; src: url(schriften/open-sans-v17-latin-300.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 400; src: url(schriften/open-sans-v17-latin-regular.woff2) format("woff2"); }
@font-face { font-family: "Oswald"; font-weight: 300 400; src: url(schriften/oswald-v31-latin-regular.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 300; font-display: swap; src: url(schriften/manrope-300.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 400; font-display: swap; src: url(schriften/manrope-400.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 500; font-display: swap; src: url(schriften/manrope-500.woff2) format("woff2"); }

:root {
  --hintergrund: #232323;
  --text: #f2f2f2;
  --grau: #8c8c8c;
  --abstand: 6px;          /* Abstand zwischen den Bildern */
  --zeilenhoehe: 300px;    /* ungefähre Höhe einer Bildreihe */
  /* Schrift für Bildunterschriften und Menü */
  --schrift-unterzeile: "Manrope", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--hintergrund);
  color: var(--text);
  font: 300 16px/1.7 "Open Sans", Helvetica, Arial, sans-serif;
}

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

/* ---------- Kopfzeile ---------- */

.kopf {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
  background: rgba(35, 35, 35, 0.95);
}

.kopf img { width: 64px; display: block; }

.kopf nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 32px; }

.kopf nav a {
  font-family: var(--schrift-unterzeile);
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grau);
  padding-bottom: 4px;
  transition: color 0.2s;
}

.kopf nav a:hover,
.kopf nav a[aria-current="page"] { color: var(--text); }

.kopf nav a[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--text); }

@media (max-width: 600px) {
  .kopf { padding: 10px 16px; }
  .kopf img { width: 52px; }
  .kopf nav { gap: 4px 18px; }
  .kopf nav a { font-size: 13px; }
}

/* Schmale Handys: Menü bleibt in einer Zeile */
@media (max-width: 420px) {
  .kopf { gap: 12px; padding: 8px 12px; }
  .kopf nav { flex-wrap: nowrap; gap: 12px; }
  .kopf nav a { font-size: 11px; letter-spacing: 0.06em; white-space: nowrap; }
}

/* ---------- Galerie: Reihen mit unterschiedlichen Bildformaten ---------- */

.galerie {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--abstand);
  padding: var(--abstand);
}

/* verhindert, dass die letzte Reihe auseinandergezogen wird */
.galerie::after { content: ""; flex-grow: 999999; }

.kachel {
  /* --r = Breite geteilt durch Höhe des Bildes */
  flex-grow: calc(var(--r) * 100);
  flex-basis: calc(var(--r) * var(--zeilenhoehe));
  /* ein Bild allein in einer Reihe wird nicht riesig, sondern höchstens 1,6-mal so hoch wie üblich */
  max-width: calc(var(--r) * var(--zeilenhoehe) * var(--wachstum, 1.6));
  margin: 0;
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}

.kachel .rahmen {
  aspect-ratio: var(--r);
  overflow: hidden;
  background: #1a1a1a;
}

.kachel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s, opacity 0.3s;
}

.kachel:hover img { transform: scale(1.03); }

/* Bildunterschrift: dunkle Fläche fährt beim Zeigen auf das Bild von unten herein */
.kachel figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 9px 14px;
  background: rgba(0, 0, 0, 0.8);
  font-family: var(--schrift-unterzeile);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: #e6e6e6;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.kachel:hover figcaption { transform: none; }

/* Handy und Tablet kennen kein „Zeigen“ – dort bleibt die Fläche sichtbar */
@media (hover: none) {
  .kachel figcaption { transform: none; padding: 6px 10px; font-size: 11px; }
}

@media (max-width: 600px) {
  :root { --zeilenhoehe: 160px; --abstand: 4px; --wachstum: 2.4; }
}

/* Platzhalter für KI-Bilder, bis echte Bilder da sind */
.platzhalter .rahmen {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
  font-family: var(--schrift-unterzeile);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #555;
}

.platzhalter { cursor: default; }

/* ---------- Großansicht ---------- */

dialog {
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.95);
}

dialog[open] { display: flex; align-items: center; justify-content: center; }

dialog img { max-width: 94vw; max-height: 92vh; }

/* ---------- Textseiten (About, Contact) ---------- */

.textseite {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 72px;
  text-align: center;
}

.textseite .logo-gross { width: 260px; max-width: 70%; margin: 0 auto 32px; display: block; }

.textseite h1 {
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 30px;
  margin: 0 0 24px;
}

.textseite p { margin: 0 0 1.2em; color: #cfcfcf; }

.textseite .trenner { width: 90px; height: 1px; background: #444; margin: 40px auto; border: 0; }

.textseite em { color: var(--text); }

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

.fuss {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 12px 24px;
  background: #000;
  color: var(--grau);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.fuss nav { display: flex; gap: 20px; }

.fuss a:hover { color: var(--text); }

/* Fußzeile bleibt auch bei kurzen Seiten unten */
main { flex: 1; }

/* ---------- Intro: Logo-Animation beim ersten Aufruf ---------- */

.intro-laeuft body { overflow: hidden; }

.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hintergrund);
  cursor: pointer;
  transition: opacity 0.4s ease;
}

.intro.weg { opacity: 0; pointer-events: none; }

.intro-logo { width: min(340px, 70vw); height: auto; overflow: visible; }

/* ---------- Logo-Animation (Intro und Kopfzeile, siehe logo.js) ----------
   Die Animation läuft nur, solange das Logo die Klasse "spielt" hat. */

/* 1. Die Dreiecke fahren langsam aus verschiedenen Richtungen zusammen */
.logo-anim .teil,
.logo-anim .schriftzug {
  transform-box: fill-box;
  transform-origin: center;
}

.logo-anim.spielt .teil {
  opacity: 0;
  animation: zusammenfahren 2.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes zusammenfahren {
  0%   { opacity: 0; transform: translate(var(--von)) rotate(var(--dreh)) scale(0.6); }
  30%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}

/* 2. Der Schriftzug kommt von hinten nach vorne: von klein zu normal */
.logo-anim.spielt .schriftzug {
  opacity: 0;
  animation: nach-vorne 2s cubic-bezier(0.2, 0.75, 0.25, 1) 2.2s forwards;
}

@keyframes nach-vorne {
  0%   { opacity: 0; transform: scale(0.15); }
  35%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}

/* 3. Breiter Glanz zieht langsam von oben links nach unten rechts – nur innerhalb des Logos */
.logo-anim .glanz { transform: translate(-300px, -300px); }

.logo-anim.spielt .glanz {
  animation: glanz-lauf 2.2s cubic-bezier(0.45, 0, 0.35, 1) 3.2s forwards;
}

@keyframes glanz-lauf {
  from { transform: translate(-300px, -300px); }
  to   { transform: translate(300px, 300px); }
}

/* Kleines Logo in der Kopfzeile */
.kopf-logo { display: block; }
.kopf-logo svg { display: block; width: 64px; height: auto; overflow: visible; }

@media (max-width: 600px) {
  .kopf-logo svg { width: 52px; }
}

/* ---------- Großansicht: Knöpfe zum Zurückkehren ---------- */

.grossansicht .gross-x,
.grossansicht .gross-back {
  position: absolute;
  top: 16px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.55);
  color: var(--text);
  font-family: var(--schrift-unterzeile);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.grossansicht .gross-x:hover,
.grossansicht .gross-back:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--text);
}

.grossansicht .gross-x {
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
}

.grossansicht .gross-back {
  left: 16px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* Bild etwas kleiner, damit die Knöpfe nicht darüber liegen */
.grossansicht img { max-height: calc(100vh - 140px); }

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

.rechtstext { text-align: left; max-width: 760px; }
.rechtstext h1 { text-align: center; margin-bottom: 40px; }
.rechtstext h2 {
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 19px;
  margin: 40px 0 12px;
}
.rechtstext h3 { font-family: var(--schrift-unterzeile); font-weight: 500; font-size: 15px; margin: 24px 0 8px; color: var(--text); }
.rechtstext p, .rechtstext li { font-size: 15px; color: #cfcfcf; }
.rechtstext ul { padding-left: 20px; margin: 0 0 1.2em; }
.rechtstext a { text-decoration: underline; text-underline-offset: 3px; }

/* noch zu prüfende Angaben gut sichtbar markieren */
.pruefen { background: #5a4a00; color: #ffe08a; padding: 0 4px; }

/* ---------- KI Creation: Videos im Kästchen, Serien-Zeichen ---------- */

.kachel video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #1a1a1a;
}

.kachel .rahmen { position: relative; }

/* kleines Zeichen oben rechts: hinter diesem Bild steckt eine Serie */
.serie-zeichen {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--text);
  font-family: var(--schrift-unterzeile);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  pointer-events: none;
}

.grossansicht [hidden] { display: none; }

.grossansicht video {
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 140px);
  background: #000;
}

/* ---------- Serien-Collage ---------- */

.serie-ansicht {
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0 16px;
  border: 0;
  background: var(--hintergrund);
  overflow-y: auto;
}

.serie-ansicht .gross-x,
.serie-ansicht .gross-back {
  position: fixed;
  top: 16px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.55);
  color: var(--text);
  font-family: var(--schrift-unterzeile);
  cursor: pointer;
  height: 44px;
}

.serie-ansicht .gross-x { right: 16px; width: 44px; border-radius: 50%; font-size: 26px; font-weight: 300; line-height: 1; }
.serie-ansicht .gross-back { left: 16px; padding: 0 20px; border-radius: 999px; font-size: 14px; }

.collage {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  max-width: 1400px;
  margin: 76px auto 40px;
}

.collage-haupt { flex: 0 0 40%; }

.collage-rest {
  flex: 1;
  columns: 3;
  column-gap: 6px;
}

.collage .kachel {
  max-width: none;
  break-inside: avoid;
  margin: 0 0 6px;
  cursor: zoom-in;
}

.collage .kachel .rahmen { aspect-ratio: auto; }
.collage .kachel img { height: auto; }

@media (max-width: 760px) {
  .collage { flex-direction: column; }
  .collage-haupt { flex-basis: auto; width: 100%; }
  .collage-rest { columns: 2; width: 100%; }
}

/* Serie scrollt von oben – nicht senkrecht zentrieren wie die Großansicht */
.serie-ansicht[open] { display: block; }

/* ---------- About: Abschnitte mit Überschrift ---------- */

.about h2 {
  font-family: "Oswald", Helvetica, Arial, sans-serif;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 20px;
  margin: 0 0 16px;
  color: var(--text);
}

.about .lead { font-size: 18px; color: var(--text); }

.about .aufzaehlung {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2em;
}

.about .aufzaehlung li {
  padding: 8px 0;
  color: #cfcfcf;
  border-top: 1px solid #333;
}

.about .aufzaehlung li:last-child { border-bottom: 1px solid #333; }

.about .bereiche {
  font-family: var(--schrift-unterzeile);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grau);
  margin-top: 24px;
}
