@import url('https://fonts.googleapis.com/css2?family=Familjen+Grotesk:ital,wght@0,400;0,500;0,600;1,400&family=Newsreader:ital,opsz,wght@0,6..72,300;0,6..72,400;1,6..72,300&display=swap');

:root {
  --ink: #0d1513;
  --ink-soft: #22302c;
  --snow: #e9ece7;
  --paper: #f3f5f1;
  --stone: #9aa49e;
  --hair: #cdd4ce;
  --fjord: #1c3a34;
  --moss: #4f7d58;
  --safelight: #b2402c;

  --rail-w: 92px;
  --gutter: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Familjen Grotesk', 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
figure { margin: 0; }

:focus-visible { outline: 2px solid var(--moss); outline-offset: 3px; }

/* ================= Breitengrad-Leiste ================= */

.rail {
  position: fixed; top: 0; left: 0;
  width: var(--rail-w); height: 100vh;
  z-index: 20; pointer-events: none;
  mix-blend-mode: multiply;
}
.rail__line { position: absolute; left: 46px; top: 14vh; bottom: 14vh; width: 1px; background: var(--hair); }
.rail__tick { position: absolute; left: 40px; width: 13px; height: 1px; background: var(--hair); }
.rail__tick span {
  position: absolute; left: -34px; top: -.72em;
  font-size: 10px; letter-spacing: .09em; color: var(--stone);
  font-variant-numeric: tabular-nums;
}
.rail__marker {
  position: absolute; left: 34px; top: 60%;
  width: 25px; height: 25px; margin-top: -12.5px;
  border: 1px solid var(--fjord); border-radius: 50%; background: var(--paper);
  transition: top 620ms cubic-bezier(.22,1,.36,1);
}
.rail__marker::after { content: ""; position: absolute; inset: 9px; background: var(--fjord); border-radius: 50%; }
.rail__readout {
  position: absolute; left: 68px; top: 60%; width: 120px; margin-top: -.62em;
  font-size: 12px; letter-spacing: .06em; color: var(--fjord);
  font-variant-numeric: tabular-nums;
  transition: top 620ms cubic-bezier(.22,1,.36,1);
}
.rail__cap {
  position: absolute; left: 46px; bottom: 4vh;
  transform: rotate(90deg); transform-origin: 0 0;
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--stone); white-space: nowrap;
}

/* ================= Kopf ================= */

.hero {
  position: relative;
  height: 92vh;
  height: 92svh;
  min-height: 460px;
  max-height: 1100px;
  overflow: hidden;
  background: var(--ink);
}

.hero__img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06);
  animation: settle 2.2s cubic-bezier(.16,1,.3,1) forwards;
}
@keyframes settle { to { opacity: 1; transform: scale(1); } }

.hero__shade {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(9,18,16,.5) 0%, rgba(9,18,16,.05) 42%, rgba(9,18,16,.72) 100%);
}
.hero__body {
  position: absolute; left: calc(var(--rail-w) + var(--gutter)); right: var(--gutter);
  bottom: clamp(32px, 6vh, 72px); color: var(--snow);
}
.hero__name {
  margin: 0; font-weight: 500;
  font-size: clamp(30px, 6.4vw, 82px); line-height: .98;
  letter-spacing: -.025em; text-wrap: balance;
}
.hero__name em {
  display: block; font-family: 'Newsreader', Georgia, serif;
  font-style: italic; font-weight: 300; font-size: .44em;
  letter-spacing: 0; color: #cdd8cf; margin-top: .42em;
}
.hero__meta {
  margin-top: clamp(18px, 3vh, 34px);
  display: flex; flex-wrap: wrap; gap: 10px 26px;
  font-size: 12px; letter-spacing: .15em; text-transform: uppercase; color: #b6c2b8;
}
.hero__scroll {
  position: absolute; right: var(--gutter); bottom: clamp(32px, 6vh, 72px);
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #b6c2b8;
  writing-mode: vertical-rl; animation: drift 2.6s ease-in-out infinite;
}
@keyframes drift {
  0%, 100% { transform: translateY(0); opacity: .85; }
  50% { transform: translateY(9px); opacity: 1; }
}

/* ================= Tafeln ================= */

.plates { padding: clamp(64px, 12vh, 150px) var(--gutter) 0 calc(var(--rail-w) + var(--gutter)); }
.plate { max-width: 1180px; margin: 0 auto clamp(80px, 15vh, 190px); }

.plate__frame { position: relative; overflow: hidden; background: var(--hair); cursor: zoom-in; }
.plate__frame img { width: 100%; transition: transform 900ms cubic-bezier(.16,1,.3,1); }
.plate__frame:hover img { transform: scale(1.022); }

.plate__index {
  position: absolute; top: 0; left: 0; padding: 12px 16px;
  font-size: 11px; letter-spacing: .18em; color: var(--snow);
  text-shadow: 0 1px 8px rgba(0,0,0,.6); font-variant-numeric: tabular-nums;
}
.plate__fresh {
  position: absolute; top: 12px; right: 14px;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--snow); background: rgba(79,125,88,.85); padding: 5px 10px;
}
.plate__note {
  display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 0 40px;
  padding-top: 22px; border-top: 1px solid var(--hair); margin-top: 22px;
}
.plate__facts {
  font-size: 12px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--stone); line-height: 2.05;
}
.plate__facts b { display: block; font-weight: 500; color: var(--fjord); letter-spacing: .11em; }
.plate__facts .coord { font-variant-numeric: tabular-nums; }
.plate__title {
  margin: -6px 0 10px; font-size: clamp(24px, 3.1vw, 38px);
  font-weight: 500; letter-spacing: -.018em; line-height: 1.08;
}
.plate__text {
  margin: 0; max-width: 62ch;
  font-family: 'Newsreader', Georgia, serif;
  font-size: clamp(18px, 1.55vw, 21px); font-weight: 300; line-height: 1.62;
  color: var(--ink-soft);
}

/* Entwicklungseffekt für frisch eingetroffene Bilder */
.developing img { animation: develop 3.4s cubic-bezier(.3,.8,.4,1) forwards; }
@keyframes develop {
  0%   { opacity: 0;   filter: blur(30px) contrast(.12) brightness(2) saturate(0); }
  18%  { opacity: .45; filter: blur(22px) contrast(.22) brightness(1.7) saturate(.05); }
  45%  { opacity: .82; filter: blur(11px) contrast(.48) brightness(1.35) saturate(.35); }
  72%  { opacity: .95; filter: blur(3px)  contrast(.8)  brightness(1.1) saturate(.75); }
  100% { opacity: 1;   filter: none; }
}

/* ================= Fuß ================= */

.foot {
  border-top: 1px solid var(--hair);
  margin: 0 var(--gutter) 0 calc(var(--rail-w) + var(--gutter));
  padding: clamp(40px, 8vh, 90px) 0 clamp(50px, 9vh, 110px);
  display: flex; flex-wrap: wrap; gap: 28px 60px;
  justify-content: space-between; align-items: flex-end;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--stone);
}
.foot__moss { color: var(--moss); }

/* ================= Lightbox ================= */

.lb {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(9,16,14,.96); display: none; place-items: center;
  padding: clamp(16px, 4vw, 56px); cursor: zoom-out;
}
.lb.is-open { display: grid; }
.lb img { max-width: 100%; max-height: 82vh; object-fit: contain; margin: 0 auto; }
.lb__cap {
  margin-top: 18px; text-align: center; color: var(--stone);
  font-size: 12px; letter-spacing: .15em; text-transform: uppercase;
}
.lb__close {
  position: absolute; top: 18px; right: 22px;
  background: none; border: 0; color: var(--snow);
  font-size: 26px; cursor: pointer; line-height: 1; padding: 8px;
}

/* ================= Dunkelkammer ================= */

.dk {
  position: fixed; right: 22px; bottom: 22px; z-index: 50;
  width: 296px; padding: 15px 17px 13px;
  background: #14100f; color: #e7d3ce;
  border: 1px solid #3a201b;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(14px);
  pointer-events: none;
  transition: opacity 500ms ease, transform 500ms cubic-bezier(.16,1,.3,1);
  overflow: hidden;
}
.dk.is-on { opacity: 1; transform: none; }
.dk.is-stuck { pointer-events: auto; width: 340px; }

.dk__safelight {
  position: absolute; top: -70px; left: 50%; width: 240px; height: 160px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(178,64,44,.55), rgba(178,64,44,0) 70%);
  animation: safepulse 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes safepulse {
  0%, 100% { opacity: .55; }
  50% { opacity: .95; }
}

.dk__head { position: relative; display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.dk__lamp {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--safelight); box-shadow: 0 0 10px var(--safelight);
  animation: safepulse 1.6s ease-in-out infinite;
}
.dk__title {
  font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: #d19a8c;
}
.dk__close {
  display: none; margin-left: auto; background: none; border: 0;
  color: #c99a90; font-size: 21px; line-height: 1; padding: 0 2px 3px;
  cursor: pointer;
}
.dk__close:hover { color: #f4e2dd; }
.dk.is-stuck .dk__close { display: block; }

/* Entwicklerschale */
.dk__tray {
  position: relative; height: 0; overflow: hidden;
  background: #0a0908; border: 1px solid #2c1a16;
  transition: height 700ms cubic-bezier(.16,1,.3,1), margin 700ms ease;
  margin: 0;
}
.dk.is-developing .dk__tray { height: 168px; margin: 0 0 12px; }

.dk__bath {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 25% 40%, rgba(178,64,44,.20), transparent 55%),
    radial-gradient(circle at 75% 65%, rgba(120,80,60,.18), transparent 55%);
  animation: slosh 5s ease-in-out infinite;
}
@keyframes slosh {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(-7px,4px,0) scale(1.07); }
}

.dk__paper {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
}
.dk.is-developing .dk__paper { animation: develop 3.4s cubic-bezier(.3,.8,.4,1) forwards; }

.dk__grain {
  position: absolute; inset: -20%;
  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='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  mix-blend-mode: screen; opacity: 0; pointer-events: none;
}
.dk.is-developing .dk__grain { animation: grainfade 3.4s ease-out forwards, jitter .28s steps(2) infinite; }
@keyframes grainfade { 0% { opacity: .5; } 70% { opacity: .14; } 100% { opacity: 0; } }
@keyframes jitter {
  0% { transform: translate(0,0); }
  50% { transform: translate(-9px, 6px); }
  100% { transform: translate(5px,-4px); }
}

.dk__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 9px 11px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: #f0ddd8; background: linear-gradient(to top, rgba(10,9,8,.9), transparent);
}

.dk__log { position: relative; list-style: none; margin: 0; padding: 0; }
.dk__log li {
  font-size: 12.5px; line-height: 1.5; color: #b89189;
  padding: 2.5px 0 2.5px 15px; position: relative;
  opacity: 0; animation: logIn 420ms ease forwards;
}
.dk__log li::before {
  content: ""; position: absolute; left: 0; top: .68em;
  width: 5px; height: 1px; background: #6d403a;
}
.dk__log li.now { color: #f4e2dd; }
.dk__log li.now::before { background: var(--safelight); box-shadow: 0 0 6px var(--safelight); }
.dk__log li.bad { color: #f0a08c; }
.dk__log li.wrap { white-space: normal; word-break: break-word; }
.dk__hint { margin-top: 10px; font-size: 11.5px; line-height: 1.5; color: #97706a; }
.dk__hint code { color: #d7b0a6; }
@keyframes logIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

/* ================= Erscheinen ================= */

.reveal { opacity: 0; transform: translateY(26px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 950ms ease, transform 950ms cubic-bezier(.16,1,.3,1);
}

/* ================= Schmal ================= */

/* Tablet quer und kleine Laptops: Leiste schmaler */
@media (max-width: 1150px) {
  :root { --rail-w: 68px; }
  .rail__line { left: 34px; }
  .rail__tick { left: 28px; }
  .rail__marker { left: 22px; }
  .rail__readout { left: 56px; font-size: 11px; }
  .rail__cap { left: 34px; }
  .plate__note { grid-template-columns: 160px minmax(0, 1fr); gap: 0 28px; }
}

/* Tablet hoch */
@media (max-width: 900px) {
  .rail { display: none; }
  .hero { height: 78svh; }
  .hero__body { left: var(--gutter); }
  .plates { padding-left: var(--gutter); }
  .foot { margin-left: var(--gutter); }
  .plate__note { grid-template-columns: 1fr; gap: 16px; }
  .hero__scroll { display: none; }
  .dk, .dk.is-stuck { right: 14px; left: auto; bottom: 14px; width: 300px; }
}

/* Handy */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { height: 72svh; min-height: 400px; }
  .plates { padding-top: clamp(48px, 8vh, 80px); }
  .plate { margin-bottom: clamp(56px, 10vh, 90px); }
  .plate__facts { line-height: 1.85; }
  .foot { gap: 14px; flex-direction: column; align-items: flex-start; }
  .lb__close { top: 8px; right: 10px; }
  .dk, .dk.is-stuck { right: 10px; left: 10px; bottom: 10px; width: auto; }
  .dk.is-developing .dk__tray { height: 132px; }
}

/* Geraete ohne echten Mauszeiger: kein Hover-Zoom */
@media (hover: none) {
  .plate__frame:hover img { transform: none; }
  .plate__frame { cursor: pointer; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal, .hero__img { opacity: 1; transform: none; }
  .developing img, .dk__paper { opacity: 1; filter: none; }
}
