/*
 * Design „Tisch“: heller Papiergrund, Galerien als lose hingelegte Polaroids.
 * Startbereich wie „Band“. Verspielt sind nur die Abzüge (Neigung, Handschrift, Anheben beim Überfahren).
 * Neigung und Versatz setzt sessio-site.js pro Galerie fest als --tilt, --dx, --dy (aus der Galerie-ID).
 * Handschrift: Caveat (SIL OFL 1.1, LICENSE-font.txt), sonst Systemschriften.
 * Galerie- und Berichtseiten laden vorher sessio-gallery.css; deren Aussehen über die --sg-*-Eigenschaften.
 */

@font-face {
  font-family: "Caveat";
  src: url("caveat-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ece8df;
  --fg: #1d1d1b;
  --muted: #6c675d;
  --line: rgba(29, 29, 27, .18);
  --print: #f4f1ea;
  --shadow: 0 8px 20px rgba(60, 40, 20, .25);
  --gutter: clamp(16px, 4vw, 56px);
  --sans: ui-sans-serif, -apple-system, "Helvetica Neue", system-ui, sans-serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;

  --sg-bg: var(--bg);
  --sg-fg: var(--fg);
  --sg-muted: var(--muted);
  --sg-accent: #8a6a3d;
  --sg-font: var(--sans);
  --sg-gap: 10px;
  --sg-placeholder: #ddd7cb;
  --sg-radius: 0px;
  --sg-lightbox-bg: #ece8df;
  --sg-lightbox-fg: #1d1d1b;
  --sg-lightbox-muted: #6c675d;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--fg); font: 16px/1.6 var(--sans); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -64px; z-index: 20; padding: 8px 12px; background: var(--fg); color: var(--bg); }
.skip:focus { top: 8px; }

/* Kopf: Name links, Menü klein in Kleinbuchstaben */
.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 24px; padding: 18px var(--gutter); }
/* Startseite: Kopf liegt über dem Startbild */
.home .top { position: absolute; inset: 0 0 auto; z-index: 3; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.brand { font-size: 15px; font-weight: 600; letter-spacing: .02em; }
.top { align-items: center; }
.brand { display: inline-flex; align-items: center; }
.brand .logo { display: block; height: var(--logo-h, 44px); width: auto; max-width: 50vw; object-fit: contain; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: 17px; font-weight: 500; letter-spacing: .06em; text-transform: lowercase; }
.top nav a { position: relative; padding: 6px 0; opacity: .85; transition: opacity .2s; }
.top nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.top nav a:hover, .top nav a:focus-visible, .top nav a[aria-current] { opacity: 1; }
.top nav a:hover::after, .top nav a:focus-visible::after, .top nav a[aria-current]::after { transform: scaleX(1); }
@media (max-width: 600px) { .top nav { font-size: 15px; gap: 2px 18px; } .brand .logo { height: calc(var(--logo-h, 44px) * .78); } }

/* Startbild wie „Band“. Vertrag der Laufzeit: Container mit eigener Größe, alle Bilder absolute Ebenen,
   Überblendung nur über opacity; ohne JavaScript bleibt das erste sichtbar. */
.hero { position: relative; background: #121212; color: #fff; }
[data-site-hero] { position: relative; overflow: hidden; height: min(88vh, 56.25vw); }
[data-site-hero] img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.5s ease; }
[data-site-hero]:not(.hero-active) > img:first-child, [data-site-hero] img.hero-current { opacity: 1; }
[data-site-hero] img[hidden] { display: none; }
[data-site-hero] img.kenburns { animation: kenburns 14s ease-in-out both; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.12) translate(-2%, -1%); } }
/* Nur ein leichter Verlauf unten; Lesbarkeit über einen leichten Textschatten */
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(transparent 60%, rgba(0, 0, 0, .22)); }
.hero h1 { position: absolute; inset: auto 0 clamp(48px, 8vh, 84px); z-index: 2; margin: 0; padding-left: .35em; text-align: center;
  font-size: clamp(20px, 3.2vw, 42px); font-weight: 200; letter-spacing: .35em; text-transform: uppercase; text-shadow: 0 1px 10px rgba(0, 0, 0, .3); }
/* Positionspunkte (füllt sessio-site.js ab zwei Startbildern) */
.dots { position: absolute; inset: auto 0 10px; z-index: 2; display: flex; justify-content: center; gap: 2px; }
.dots button { width: 24px; height: 24px; padding: 0; border: 0; background: none; color: #fff; opacity: .8; cursor: pointer; }
.dots button::before { content: ""; display: block; width: 7px; height: 7px; margin: auto; border: 1px solid currentColor; border-radius: 50%; }
.dots button[aria-current]::before { background: currentColor; }
.dots button:hover, .dots button[aria-current] { opacity: 1; }
.dots button:focus-visible { outline: 2px solid #fff; outline-offset: -3px; border-radius: 50%; }
.hero-empty [data-site-hero] { height: 52vh; }

/* Abschnitte der Startseite */
.sec { padding-top: clamp(28px, 5vw, 56px); }
.label { margin: 0 var(--gutter) 14px; font-size: 11px; font-weight: 400; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
.label a:hover { color: var(--fg); }

/* Text unter dem Startbild (Startseitentext): lesbare Breite, bündig mit den Abschnittstiteln */
.intro-text { max-width: calc(680px + 2 * var(--gutter)); padding: clamp(28px, 5vw, 56px) var(--gutter) 0; font-size: 17px; line-height: 1.7; }
.intro-text > :first-child { margin-top: 0; }
.intro-text > :last-child { margin-bottom: 0; }
.intro-text h2, .intro-text h3, .intro-text h4 { margin: 1.6em 0 .4em; font-weight: 500; line-height: 1.3; }
.intro-text a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.intro-text blockquote { margin: 1.2em 0; padding-left: 1em; border-left: 1px solid var(--line); color: var(--muted); }

/* Galerien als Polaroids, lose und leicht überlappend auf dem Tisch */
.table { display: flex; flex-wrap: wrap; justify-content: center; max-width: 1400px; margin: 0 auto; padding: 16px var(--gutter) 40px; }
.pol { position: relative; width: clamp(170px, 17vw, 230px); margin: 14px -8px; padding: 8px 8px 30px; background: var(--print);
  box-shadow: var(--shadow); transform: translate(var(--dx, 0), var(--dy, 0)) rotate(var(--tilt, 0deg));
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s; }
.pol:hover, .pol:focus-within { z-index: 5; transform: rotate(0) translateY(-8px) scale(1.06); box-shadow: 0 16px 34px rgba(60, 40, 20, .32); }
.pol a:focus-visible { outline-offset: 10px; }
.pol img, .pol .ph { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #ddd7cb; }
.pol .name { position: absolute; left: 6px; right: 6px; bottom: 0; margin: 0; overflow: hidden; text-align: center; white-space: nowrap;
  text-overflow: ellipsis; font: 400 21px/30px var(--hand); color: #2a2a2a; }

/* Berichte: Datum, Titel, Anreißer, Titelbild */
.essays { display: grid; gap: clamp(36px, 5vw, 72px); max-width: 1240px; padding: 0 var(--gutter); }
.essay a { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: clamp(16px, 3vw, 44px); align-items: center; }
.essay.noimg a { grid-template-columns: minmax(0, 1fr); max-width: 68ch; }
.essay img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; box-shadow: var(--shadow); }
.essay time, .intro time { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.essay h2, .essay h3 { margin: 6px 0 10px; font-size: clamp(22px, 2.4vw, 32px); font-weight: 400; line-height: 1.2; }
.essay p { margin: 0 0 12px; color: var(--muted); }
.essay .sub { color: var(--fg); }
.more { font-size: 13px; letter-spacing: .04em; box-shadow: inset 0 -1px var(--line); }
.essay a:hover .more, a.more:hover { box-shadow: inset 0 -1px currentColor; }

/* Inhaltsseiten: Text über der Galerie */
.intro { max-width: 980px; padding: clamp(24px, 5vw, 64px) var(--gutter) 0; }
.intro h1 { margin: 0; font-size: clamp(26px, 3.6vw, 44px); font-weight: 400; line-height: 1.15; }
.intro .sub { margin: 6px 0 4px; color: var(--muted); }
.text { max-width: calc(68ch + 2 * var(--gutter)); margin: 0; padding: 22px var(--gutter) 0; font-size: 17px; line-height: 1.7; }
.text h2, .text h3 { margin: 1.6em 0 .4em; font-weight: 500; line-height: 1.3; }
.text a, a.mail { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.text blockquote { margin: 1.2em 0; padding-left: 1em; border-left: 1px solid var(--line); color: var(--muted); }
.gallery { padding: clamp(24px, 4vw, 48px) var(--gutter) 0; }
.fallback { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.fallback img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.pager { display: flex; justify-content: space-between; gap: 24px; padding: 48px var(--gutter) 0; }
.pager a span { display: block; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.pager a[rel="next"] { margin-left: auto; text-align: right; }
[data-empty] { margin: 0 var(--gutter); color: var(--muted); }

/* Fuß */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 64px var(--gutter) 28px; font-size: 12px; color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a:hover, .foot a:focus-visible { color: var(--fg); }
.foot p { margin: 0; }

/* Telefon: Startbild füllt den Bildschirm, Polaroids in zwei versetzten Spalten, Kippen kleiner */
@media (max-width: 700px) {
  [data-site-hero] { height: 100vh; height: 100svh; }
  .table { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; padding: 12px 16px 32px; }
  .pol { width: auto; margin: 0; transform: rotate(calc(var(--tilt, 0deg) * .4)); }
  .pol:nth-child(even) { margin-top: 36px; }
  .essay a { grid-template-columns: minmax(0, 1fr); }
}

/* Bewegung reduzieren: kein Zoomen, kein Kippen; Startbilder wechseln weiter per Überblendung */
@media (prefers-reduced-motion: reduce) {
  [data-site-hero] img.kenburns { animation: none; }
  .pol, .pol:hover, .pol:focus-within { transform: none; transition: none; }
  .top nav a, .top nav a::after { transition: none; }
}

/* Download-Schutz: Bilder nicht markieren, ziehen oder per langem Drücken sichern (Webgalerien-Entwurf §9). */
img { -webkit-user-select: none; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
