/* ============================================================
   Samuel Renner — Photo & Film
   Palette und Schriften stehen komplett hier oben.
   Jede Seite bekommt ihre Farben über data-theme im <body>.
   ============================================================ */

:root {
  /* Palette */
  --bone:   #eae4d3;   /* helles Papier */
  --ink:    #17201a;   /* fast schwarzes Grün */
  --forest: #2f3b2e;   /* Startseite */
  --pine:   #1b2620;   /* Photo */
  --clay:   #b4573a;   /* Film */
  --moss:   #7e8c5c;   /* Archiv */
  --ochre:  #d8a13e;   /* Menü und Akzent */

  /* Rollen — werden pro Seite überschrieben */
  --bg: var(--forest);
  --fg: var(--bone);
  --accent: var(--ochre);
  --line: color-mix(in srgb, var(--fg) 34%, transparent);

  /* Schriften */
  --display: "Archivo Black", "Arial Black", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Courier New", monospace;
  --hand: "Rock Salt", "Bradley Hand", "Segoe Print", cursive;

  --pad: clamp(16px, 4vw, 48px);
}

body[data-theme="photo"]   { --bg: var(--pine);  --fg: var(--bone); --accent: var(--ochre); }
body[data-theme="film"]    { --bg: var(--clay);  --fg: #f4ecdd;     --accent: var(--ink); }
body[data-theme="about"]   { --bg: var(--bone);  --fg: var(--ink);  --accent: var(--clay); }
body[data-theme="archive"] { --bg: var(--moss);  --fg: var(--ink);  --accent: var(--bone); }

* { box-sizing: border-box; }

html { background: var(--forest); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* feines Korn über allem */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 900;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

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

.site-head {
  position: relative;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: var(--pad);
}

.logo {
  grid-column: 2;
  font-family: var(--hand);
  font-size: clamp(13px, 1.7vw, 21px);
  text-transform: uppercase;
  letter-spacing: .02em;
  word-spacing: .18em;
  line-height: 1.25;
  white-space: nowrap;
  padding-top: .12em;
}

.menu-btn {
  grid-column: 3;
  justify-self: end;
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(12px, 1.3vw, 14px);
  letter-spacing: .18em;
  text-transform: uppercase;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg);
  cursor: pointer;
  padding: 8px 16px;
  line-height: 1;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.menu-btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ---------- Menü-Overlay ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--ochre);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  padding: var(--pad);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease;
}

.overlay[data-open="true"] { opacity: 1; visibility: visible; }

.overlay nav {
  margin: auto 0;
  display: flex;
  flex-direction: column;
}

.overlay nav a {
  font-family: var(--display);
  font-size: clamp(44px, 11vw, 92px);
  line-height: .94;
  letter-spacing: -.03em;
  transition: color .2s ease;
}

.overlay nav a:hover {
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
}

.overlay .close {
  align-self: flex-end;
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(12px, 1.3vw, 14px);
  letter-spacing: .18em;
  background: none;
  border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--ink);
  cursor: pointer;
}

.overlay .close:hover { background: var(--ink); color: var(--ochre); }

.overlay .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ---------- Startseite ---------- */

.stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 var(--pad);
  min-height: 0;
}

.collage { position: absolute; inset: 0; pointer-events: none; }

/* Kachel: liegt eine Datei unter --img, wird sie gezeigt,
   sonst greift der Platzhalter-Verlauf --ph darunter. */
.tile {
  position: absolute;
  background-image: var(--img, none), var(--ph, linear-gradient(140deg,#8a9a6b,#4a5a3c));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform .5s cubic-bezier(.2,.7,.3,1), opacity .35s ease;
  will-change: transform;
}

.t1 { top: -6%;  left: -3%;  width: min(26vw, 250px); aspect-ratio: 4/3;  --ph: linear-gradient(140deg,#c98c5e,#7d4a30); }
.t2 { top: -2%;  right: -2%; width: min(17vw, 170px); aspect-ratio: 3/4;  --ph: linear-gradient(140deg,#d8c9a8,#9aa383); }
.t3 { top: 12%;  left: 26%;  width: min(46vw, 560px); aspect-ratio: 16/9; --ph: linear-gradient(140deg,#7f8d76,#3b473c); }
.t4 { top: 46%;  left: -1%;  width: min(30vw, 330px); aspect-ratio: 16/10;--ph: linear-gradient(140deg,#9aa383,#5c6b45); }
.t5 { bottom: 2%; right: 3%; width: min(22vw, 240px); aspect-ratio: 1/1;  --ph: linear-gradient(140deg,#b4573a,#5e2f22); }
.t6 { bottom: 6%; left: 34%; width: min(15vw, 150px); aspect-ratio: 3/4;  --ph: linear-gradient(140deg,#d8a13e,#7a5a22); }

/* Kachel mit laufendem Video */
.tile-video { overflow: hidden; background: #26302a; }
.tile-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bignav { position: relative; z-index: 30; display: flex; flex-direction: column; }

.bignav a {
  font-family: var(--display);
  font-size: clamp(56px, 14vw, 176px);
  line-height: .86;
  letter-spacing: -.035em;
  transition: color .25s ease;
}

.bignav a:hover { color: transparent; -webkit-text-stroke: 2px var(--fg); }

.stage[data-hover="true"] .tile { opacity: .55; }

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

.site-foot {
  position: relative;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: var(--pad);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.site-foot a { border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.site-foot a:hover { border-color: var(--fg); }

/* ---------- Projektlisten (Photo / Film) ---------- */

.page {
  position: relative;
  z-index: 10;
  flex: 1;
  padding: 0 var(--pad) 60px;
}

.project-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: clamp(8px, 4vh, 40px);
}

.project-list a {
  font-family: var(--display);
  font-size: clamp(26px, 5.2vw, 62px);
  line-height: 1.08;
  letter-spacing: -.025em;
  text-transform: uppercase;
  transition: color .18s ease;
}

.project-list a:hover,
.project-list a:focus-visible {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--fg);
}

.project-list .meta {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .72;
  margin-top: 2px;
  margin-bottom: 18px;
}

/* Bild, das beim Hovern der Maus folgt */
.hover-img {
  position: fixed;
  top: 0;
  left: 0;
  width: min(20vw, 240px);
  aspect-ratio: 4/5;
  background-size: cover;
  background-position: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.96);
  transition: opacity .18s ease, transform .18s ease;
  z-index: 500;
}

.hover-img[data-on="true"] { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Film-Vorschau über die volle Fläche */
.bg-video {
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease;
}

.bg-video[data-on="true"] { opacity: 1; }

.bg-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bg-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--ink) 52%, transparent);
}

/* Titel treten zurück, sobald ein Film läuft — der gehoverte bleibt hell */
body[data-bg="true"] .project-list a:not(:hover) { color: color-mix(in srgb, var(--fg) 52%, transparent); }
body[data-bg="true"] .project-list .meta { opacity: .35; }

/* ---------- About ---------- */

.page-title {
  font-family: var(--display);
  font-size: clamp(44px, 10vw, 140px);
  line-height: .88;
  letter-spacing: -.035em;
  margin: 0 0 .32em;
  text-wrap: balance;
}

.page-title em {
  font-family: var(--hand);
  font-style: normal;
  font-size: .46em;
  letter-spacing: 0;
  line-height: 1.4;
  display: inline-block;
  padding-top: .25em;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.about p { max-width: 58ch; font-size: clamp(15px, 1.5vw, 17px); }

.about h2 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: .65;
  margin: 34px 0 6px;
}

.portrait {
  aspect-ratio: 3/4;
  width: 100%;
  max-width: 400px;
  justify-self: end;
  background-image: var(--img, none), var(--ph, linear-gradient(140deg,#9aa383,#3c4a34));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.contact {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  font-size: clamp(15px, 1.7vw, 19px);
}

.contact li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.contact a { border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.contact a:hover { border-color: var(--accent); color: var(--accent); }

.fineprint { font-size: 12px; opacity: .7; max-width: 58ch; }

/* ---------- Archiv ---------- */

.archive-list { border-top: 1px solid var(--line); max-width: 1100px; }

.archive-list .row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition: padding-left .25s ease, color .2s ease;
}

.archive-list .row:hover { padding-left: 12px; color: var(--accent); }
.archive-list .year { font-size: 12px; letter-spacing: .14em; }

.archive-list .name {
  font-family: var(--display);
  font-size: clamp(20px, 3.2vw, 38px);
  line-height: 1;
  letter-spacing: -.025em;
  text-transform: uppercase;
}

.archive-list .kind { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; opacity: .7; }

/* ---------- Projektseite ---------- */

.project { max-width: 1200px; }

.eyebrow {
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  opacity: .7;
  margin: 0 0 10px;
}

.project .page-title { font-size: clamp(34px, 7vw, 96px); margin-bottom: .4em; }

.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background-image: var(--img, none), linear-gradient(140deg,#3c4a34,#1b2620);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.player::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.28);
  transition: background .25s ease;
}

.player:hover::after { background: rgba(0,0,0,.12); }
.player[data-playing="true"] { cursor: default; }
.player[data-playing="true"]::after { display: none; }

.player iframe { width: 100%; height: 100%; border: 0; position: absolute; inset: 0; }

.play {
  position: relative;
  z-index: 2;
  font-family: var(--display);
  font-size: clamp(20px, 3vw, 34px);
  letter-spacing: .04em;
  color: var(--bone);
  background: none;
  border: 0;
  cursor: pointer;
  transition: transform .25s ease;
}

.player:hover .play { transform: scale(1.06); }
.player[data-playing="true"] .play { display: none; }

.player[data-todo="true"] .play::after {
  content: " — Bunny-ID fehlt in assets/app.js";
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  display: block;
  margin-top: 10px;
  opacity: .85;
}

.credits { margin: clamp(32px, 6vh, 64px) 0 0; max-width: 720px; }

.credits h2 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  opacity: .65;
  margin: 0 0 12px;
}

.credit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.credit .role { text-transform: uppercase; letter-spacing: .1em; font-size: 11px; opacity: .7; padding-top: 2px; }
.credit .who { font-family: var(--display); font-size: clamp(14px, 1.6vw, 17px); letter-spacing: -.01em; }

.next {
  display: block;
  margin-top: clamp(40px, 8vh, 88px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.next .label { display: block; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; opacity: .7; margin-bottom: 6px; }

.next .name {
  font-family: var(--display);
  font-size: clamp(28px, 5.5vw, 68px);
  line-height: 1;
  letter-spacing: -.03em;
  transition: color .2s ease;
}

.next:hover .name { color: transparent; -webkit-text-stroke: 1.5px var(--fg); }

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: color-mix(in srgb, var(--ink) 97%, transparent);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(48px, 7vh, 80px) clamp(16px, 6vw, 96px);
}

.lightbox[data-open="true"] { display: flex; }

.lb-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: none;
}

.lightbox[data-mode="photo"] .lb-img { display: block; }

.lb-frame { display: none; width: min(100%, 1280px); aspect-ratio: 16/9; }
.lightbox[data-mode="video"] .lb-frame { display: block; }
.lb-frame iframe { width: 100%; height: 100%; border: 0; }

.lb-todo {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  position: relative;
  background: #0f150f;
}
.lb-todo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.lb-todo p {
  position: relative;
  margin: 0;
  padding: 14px 20px;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--bone);
  border: 1px solid rgba(234,228,211,.4);
}
.lb-todo code { text-transform: none; letter-spacing: 0; }

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: none;
  border: 0;
  color: var(--bone);
  cursor: pointer;
  font-family: var(--mono);
  font-weight: 500;
  z-index: 2;
}

.lb-close { top: clamp(14px, 3vh, 28px); right: clamp(16px, 4vw, 40px); font-size: 12px; letter-spacing: .18em; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 26px; padding: 12px; }
.lb-prev { left: clamp(4px, 2vw, 28px); }
.lb-next { right: clamp(4px, 2vw, 28px); }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: var(--ochre); }

.lightbox[data-mode="video"] .lb-prev,
.lightbox[data-mode="video"] .lb-next { display: none; }

.lb-bar {
  position: absolute;
  left: clamp(16px, 4vw, 40px);
  right: clamp(16px, 4vw, 40px);
  bottom: clamp(14px, 3vh, 28px);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--bone);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* ---------- Mobil ---------- */

@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; }
  .portrait { justify-self: start; max-width: 320px; }
  .stage { padding-top: 12px; padding-bottom: 32px; }
  .t1 { top: 4%; width: 40vw; }
  .t2 { top: 14%; width: 26vw; }
  .t3 { top: 22%; left: 16%; width: 74vw; }
  .t4 { top: 58%; width: 44vw; }
  .t5 { bottom: 6%; width: 34vw; }
  .t6 { display: none; }
  .archive-list .row { grid-template-columns: 60px 1fr; }
  .archive-list .kind { grid-column: 2; }
  .site-head { grid-template-columns: 1fr auto; }
  .logo { grid-column: 1; justify-self: start; }
  .menu-btn { grid-column: 2; }
  .hover-img { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
