@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/inter-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Fraunces; font-style: italic; font-weight: 400; font-display: swap;
  src: url(fonts/fraunces-latin-400-italic.woff2) format("woff2"); }

:root {
  --paper: #efe7d6;
  --paper-2: #e6dcc7;
  --ink: #2d3a26;      /* Tannengrün */
  --ink-soft: #5b6650;
  --rust: #a4532c;     /* Hirschrot */
  --hill-1: #c9bfa4;
  --hill-2: #8f9677;
  --hill-3: #56624a;
  --hill-4: #2d3a26;
  --gutter: clamp(16px, 4vw, 48px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--paper); }
body {
  min-height: 100svh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; }

/* Papierkorn – liegt hinter allem, damit die Fotos unverfälscht bleiben */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .25 0 0 0 .35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.eyebrow {
  font-family: Fraunces, Georgia, serif; font-style: italic; font-weight: 400;
  color: var(--rust); font-size: clamp(20px, 2.4vw, 26px);
}
.caps { font-size: 12px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; }

/* Button im Stil der Sülter-Hof-Seite */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 29px; border-radius: 999px;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  font: 600 12px/1 Inter, system-ui, sans-serif; letter-spacing: .24em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.btn:hover { color: var(--rust); border-color: var(--rust); }
.btn:focus-visible, .field:focus-visible { outline: 2px solid var(--rust); outline-offset: 4px; }
.btn.pulse { animation: nudge 3.5s 2s ease-out infinite; }
.btn.pulse:hover { animation-play-state: paused; }
@keyframes nudge {
  0%   { box-shadow: 0 0 0 0 rgba(45, 58, 38, .35); }
  40%  { box-shadow: 0 0 0 12px rgba(45, 58, 38, 0); }
  100% { box-shadow: 0 0 0 12px rgba(45, 58, 38, 0); }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { opacity: 0; animation: rise .9s ease-out forwards; }
.rise.d1 { animation-delay: .15s; } .rise.d2 { animation-delay: .35s; } .rise.d3 { animation-delay: .55s; }

/* ---------- Bühne: Login & Übersicht ---------- */
.scene { display: flex; flex-direction: column; overflow-x: hidden; }
.scene main {
  position: relative; z-index: 3; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: clamp(18px, 3vh, 30px);
  padding: clamp(28px, 6vh, 64px) 16px clamp(12px, 3vh, 32px);
}
.scene .logo { width: min(380px, 64vw, 38vh * 1.54); }
.scene .logo img { width: 100%; height: auto; }

.login { display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(340px, 100%); }
.field {
  width: 100%; padding: 14px 22px; border-radius: 999px;
  border: 1.5px solid var(--ink); background: rgba(255, 255, 255, .35); color: var(--ink);
  font: 500 16px Inter, system-ui, sans-serif; text-align: center; letter-spacing: .06em;
}
.field::placeholder { color: var(--ink-soft); opacity: .8; letter-spacing: .12em; }
.error { color: var(--rust); font-size: 14px; }

.albums {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 380px));
  justify-content: center; gap: clamp(16px, 3vw, 32px); width: 100%; max-width: 900px;
}
.album-card {
  position: relative; display: block; text-decoration: none;
  border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3;
  background: var(--paper-2);
  box-shadow: 0 1px 2px rgba(45, 58, 38, .12), 0 14px 34px -14px rgba(45, 58, 38, .45);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s;
}
.album-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.album-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(29, 36, 26, .78), rgba(29, 36, 26, 0) 55%);
}
.album-card .meta {
  position: absolute; z-index: 1; left: 22px; right: 22px; bottom: 18px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--paper);
}
.album-card .meta strong { font-family: Fraunces, Georgia, serif; font-style: italic; font-weight: 400; font-size: 28px; }
.album-card .meta span { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; opacity: .85; }
.album-card:hover { transform: translateY(-4px); box-shadow: 0 1px 2px rgba(45, 58, 38, .12), 0 22px 40px -14px rgba(45, 58, 38, .55); }
.album-card:hover img { transform: scale(1.04); }
.album-card:focus-visible { outline: 2px solid var(--rust); outline-offset: 4px; }
.logout { font-size: 12px; color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid rgba(91, 102, 80, .4); }
.logout:hover { color: var(--rust); border-color: var(--rust); }

/* Landschaft (von der Sülter-Hof-Seite) – hier im Fluss statt fixiert */
.land { position: relative; flex: none; height: 30vh; min-height: 170px; z-index: 1; pointer-events: none; overflow: hidden; }
.land svg { position: absolute; bottom: 0; width: 100%; height: 100%; }
.sun {
  position: fixed; z-index: -1; left: 50%; bottom: 12vh; width: min(40vh, 70vw); aspect-ratio: 1;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle, #e7c79a 0%, #e9d6b3 55%, rgba(239,231,214,0) 72%);
  opacity: .75; pointer-events: none;
}
.land { --land-h: max(30vh, 170px); --s: max(calc(100vw / 1440), calc(var(--land-h) / 400)); }
.land > svg.runner {
  width: calc(var(--s) * 108 * .85); height: auto;
  left: 0; bottom: calc(var(--s) * 69.5);
  transform: translateX(-200%); will-change: transform;
}
.smoke circle { opacity: 0; animation: smoke 8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.smoke circle:nth-child(2) { animation-delay: 2s; }
.smoke circle:nth-child(3) { animation-delay: 4s; }
.smoke circle:nth-child(4) { animation-delay: 6s; }
@keyframes smoke {
  0% { opacity: 0; transform: translate(0, 0) scale(.7); }
  12% { opacity: .95; }
  100% { opacity: 0; transform: translate(26px, -46px) scale(3); }
}

/* ---------- Albumseite ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 12px var(--gutter);
  background: rgba(239, 231, 214, .86);
  -webkit-backdrop-filter: saturate(1.2) blur(14px); backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid rgba(45, 58, 38, .1);
}
.bar .home { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; justify-self: start; }
.bar .home img { height: 34px; width: auto; }
.bar .back { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.bar .home:hover .back { color: var(--rust); }
.bar .title { text-align: center; line-height: 1.15; }
.bar .title strong { display: block; font-family: Fraunces, Georgia, serif; font-style: italic; font-weight: 400; font-size: 24px; }
.bar .title span { font-size: 10px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); }
.bar .actions { justify-self: end; position: relative; }
.bar .btn { padding: 11px 20px; font-size: 11px; letter-spacing: .18em; }

.dl-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(340px, calc(100vw - 32px));
  background: var(--paper); border: 1px solid rgba(45, 58, 38, .15); border-radius: 18px;
  box-shadow: 0 18px 40px -12px rgba(45, 58, 38, .35); padding: 16px; display: none;
}
.dl-panel.open { display: block; }
.dl-panel p { font-size: 13px; line-height: 1.5; color: var(--ink-soft); margin-bottom: 10px; }
.dl-panel a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px; text-decoration: none; font-size: 14px; font-weight: 500;
}
.dl-panel a:hover { background: var(--paper-2); color: var(--rust); }
.dl-panel a small { color: var(--ink-soft); font-size: 12px; white-space: nowrap; }

.grid { display: flex; flex-wrap: wrap; gap: var(--gap, 8px); padding: var(--gap, 8px) var(--gutter) 40px; }
.tile {
  position: relative; display: block; overflow: hidden; border-radius: 6px; flex: none;
  cursor: zoom-in;
}
.tile img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s, transform .6s cubic-bezier(.2, .7, .2, 1); }
.tile img.loaded { opacity: 1; }
.tile:hover img { transform: scale(1.03); }
.tile:focus-visible { outline: 2px solid var(--rust); outline-offset: 2px; }

body:not(.scene) .sun { display: none; }
.album-end { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 30px 16px 0; text-align: center; }

/* PhotoSwipe im Sülter-Hof-Ton */
.pswp { --pswp-bg: #141a12; --pswp-placeholder-bg: #2d3a26; --pswp-icon-color: #efe7d6; --pswp-icon-color-secondary: #141a12; }
.pswp__button--download, .pswp__button--play { display: flex; align-items: center; justify-content: center; }
.pswp__button--play .i-pause { display: none; }
.pswp__button--play.playing .i-pause { display: block; }
.pswp__button--play.playing .i-play { display: none; }
.pswp__progress { position: absolute; left: 0; top: 0; height: 2px; width: 0; background: var(--rust); z-index: 20; }
.pswp__progress.run { width: 100%; transition: width linear; }

@media (max-width: 640px) {
  .bar { grid-template-columns: auto 1fr auto; padding: 10px 12px; }
  .bar .back { display: none; }
  .bar .home img { height: 28px; }
  .bar .title strong { font-size: 20px; }
  .bar .btn { padding: 10px 14px; }
  .bar .btn .long { display: none; }
  .album-card .meta strong { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise { opacity: 1; }
}
