/* ══════════════════════════════════════════════
   Galerie Ingha – Ingrid Hamacher
   ══════════════════════════════════════════════ */

/* ───────── Tokens ───────── */
:root {
  color-scheme: light dark;

  /* Palette „Kalk & Terrakotta“ */
  --bg:        light-dark(#f7f4ef, #1c1917);   /* Hintergrund */
  --bg-soft:   light-dark(#ede6dc, #28231f);   /* Fläche */
  --ink:       light-dark(#28231f, #f4ece2);   /* Text */
  --accent:    light-dark(#963f2d, #f0a58d);   /* Akzent */
  /* Abgeleitete Töne */
  --ink-soft:  light-dark(#645b52, #b5ab9f);
  --line:      light-dark(#28231f24, #f4ece226);
  --accent-ink: light-dark(#ffffff, #1c1917);
  --blob-1:    light-dark(#c8694f, #963f2d);
  --blob-2:    light-dark(#d9c3a5, #5a4a3c);
  --blob-3:    light-dark(#e3b08f, #7a5038);
  --blob-alpha: light-dark(.6, .5);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --section: clamp(4rem, 7.5vw, 7.5rem);   /* Abstand über und unter jedem Abschnitt */
  --head-gap: clamp(2rem, 4vw, 3.5rem);    /* Abstand zwischen Abschnittskopf und Inhalt */
  --header-h: 4.5rem;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --radius: 1.25rem;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }

/* ───────── Basis ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 clamp(1rem, .95rem + .25vw, 1.125rem)/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
address { font-style: normal; }
svg { display: block; }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: .75rem; left: .75rem; z-index: 200;
  padding: .75rem 1.25rem; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Scroll-Fortschritt */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 120;
  background: var(--accent); transform-origin: 0 50%; scale: 0 1;
}
@supports (animation-timeline: scroll()) {
  .progress { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { to { scale: 1 1; } }
}

/* ───────── Typografie ───────── */
.eyebrow {
  font: 600 .8125rem/1.2 var(--sans);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow .num { color: var(--accent); margin-right: .6em; font-variant-numeric: tabular-nums; }

.display {
  font: 400 clamp(2.25rem, 1.2rem + 4.6vw, 5.25rem)/1.04 var(--serif);
  letter-spacing: -.02em;
  text-wrap: balance;
}
.display--xl { font-size: clamp(2.75rem, 1.2rem + 6.5vw, 7rem); font-style: italic; }

.lead {
  font: 400 clamp(1.25rem, 1.05rem + .9vw, 1.75rem)/1.4 var(--serif);
  text-wrap: pretty;
}

/* ───────── Header ───────── */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-inline: var(--gutter);
}
/* Blur liegt auf einem Pseudo-Element: backdrop-filter direkt am Header würde
   das fixe Mobilmenü in der Header-Höhe einsperren. */
.header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .4s;
}
.header.is-stuck::before { box-shadow: 0 10px 30px -18px #00000040; }

.logo { display: inline-flex; align-items: baseline; gap: .5rem; position: relative; z-index: 2; }
.logo__mark { font: italic 400 1.75rem/1 var(--serif); letter-spacing: -.02em; }
.logo__sub { font: 600 .6875rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }

.nav__list { display: flex; gap: clamp(1rem, 2.4vw, 2.25rem); }
.nav a {
  position: relative; display: inline-block; padding: .5rem 0;
  font-size: .9375rem; font-weight: 500;
}
.nav a::after {
  content: ""; position: absolute; inset: auto 0 .25rem 0; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform .45s var(--ease);
}
.nav a:hover::after, .nav a[aria-current]::after { transform: scaleX(1); transform-origin: 0 50%; }
.nav a[aria-current] { color: var(--accent); }

.controls { display: flex; align-items: center; gap: .5rem; position: relative; z-index: 2; }
.ctrl {
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  font-size: .8125rem; font-weight: 700; letter-spacing: .06em;
  transition: background-color .3s, color .3s, border-color .3s, transform .3s var(--ease);
}
.ctrl:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ctrl:active { transform: scale(.94); }
.icon { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Sonne = aktuell dunkel (Klick führt zu hell), Mond = aktuell hell */
.icon--sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon--sun { display: block; }
  :root:not([data-theme="light"]) .icon--moon { display: none; }
}
:root[data-theme="dark"] .icon--sun { display: block; }
:root[data-theme="dark"] .icon--moon { display: none; }

.ctrl--menu { display: none; }
.burger { display: grid; gap: 6px; width: 1.125rem; }
.burger i { height: 1.5px; background: currentColor; transition: transform .4s var(--ease); }
[aria-expanded="true"] .burger i:first-child { transform: translateY(3.75px) rotate(45deg); }
[aria-expanded="true"] .burger i:last-child  { transform: translateY(-3.75px) rotate(-45deg); }

@media (max-width: 860px) {
  .ctrl--menu { display: grid; }
  .nav {
    position: fixed; inset: 0; z-index: 1;
    display: grid; align-content: center;
    padding: calc(var(--header-h) + 1rem) var(--gutter) 2rem;
    background: var(--bg);
    visibility: hidden; opacity: 0;
    transition: opacity .35s, visibility 0s .35s;
  }
  .nav.is-open { visibility: visible; opacity: 1; transition: opacity .35s, visibility 0s; }
  .nav__list { flex-direction: column; gap: .25rem; }
  .nav a {
    font: 400 clamp(2.25rem, 11vw, 3.5rem)/1.15 var(--serif);
    padding: .35rem 0;
    translate: 0 1.5rem; opacity: 0;
    transition: translate .6s var(--ease), opacity .6s;
  }
  .nav.is-open a { translate: 0 0; opacity: 1; }
  .nav.is-open li:nth-child(2) a { transition-delay: .05s; }
  .nav.is-open li:nth-child(3) a { transition-delay: .1s; }
  .nav.is-open li:nth-child(4) a { transition-delay: .15s; }
  .nav.is-open li:nth-child(5) a { transition-delay: .2s; }
  .nav.is-open li:nth-child(6) a { transition-delay: .25s; }
  .nav a::after { display: none; }
  body.menu-open { overflow: hidden; }
}

/* ───────── Hero ───────── */
.hero {
  position: relative; isolation: isolate;
  /* beginnt unter der Menüleiste, die klar abgegrenzt bleibt */
  margin-top: var(--header-h);
  min-height: calc(100svh - var(--header-h));
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 2rem var(--gutter) clamp(2rem, 6vh, 4rem);
  overflow: clip;
}

/* Foto der Galerie als vollflächiger Hintergrund */
.hero__photo { position: absolute; inset: 0; z-index: -2; background: var(--bg-soft); }
/* Das Bild ist breiter als der Bereich und links verankert: so rückt der Laden
   nach rechts ins Bild und der Flur am rechten Rand fällt weg. */
.hero__photo { overflow: clip; }
.hero__photo img { display: block; width: 124%; max-width: none; height: 100%; object-fit: cover; object-position: 50% 58%; }
/* Einblenden + langsame, endlose Kamerafahrt (Zoom und leichter Schwenk) */
.js .hero__photo img { animation: photo-in 2s ease-out both; }
@keyframes photo-in { from { opacity: 0; } }
@keyframes kenburns {
  from { scale: 1; translate: 0 0; }
  to   { scale: 1.12; translate: -2.5% -1.5%; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .hero__photo img {
    will-change: transform;
    animation: photo-in 2s ease-out both, kenburns 26s ease-in-out infinite alternate;
  }
}
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .js .hero__photo img {
      animation: photo-in 2s ease-out both, kenburns 26s ease-in-out infinite alternate, hero-drift linear both;
      animation-timeline: auto, auto, scroll(root);
      animation-range: normal, normal, 0 100svh;
    }
    @keyframes hero-drift { to { transform: translateY(14%); } }
  }
}

/* Schleier in der Hintergrundfarbe: oben für die Menüleiste, links/unten für den Text */
.hero__scrim {
  --s: var(--bg);
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, var(--s) 0, color-mix(in srgb, var(--s) 70%, transparent) 22%, transparent 55%),
    linear-gradient(to right,
      color-mix(in srgb, var(--s) 94%, transparent) 0%,
      color-mix(in srgb, var(--s) 86%, transparent) 38%,
      color-mix(in srgb, var(--s) 45%, transparent) 68%,
      color-mix(in srgb, var(--s) 12%, transparent) 100%);
}

/* Weiche Farbflächen als Verläufe statt per Blur-Filter – läuft komplett auf der GPU */
.hero__blobs { position: absolute; inset: 0; z-index: -1; opacity: var(--blob-alpha); overflow: clip; }
.hero__blobs i {
  position: absolute; border-radius: 50%; will-change: transform;
  background: radial-gradient(closest-side, var(--c) 0%, color-mix(in srgb, var(--c) 62%, transparent) 38%, color-mix(in srgb, var(--c) 22%, transparent) 68%, transparent 100%);
  translate: calc(var(--mx, 0) * var(--k, 20px)) calc(var(--my, 0) * var(--k, 20px));
  transition: translate 1.4s var(--ease);
}
.hero__blobs i:nth-child(1) { --c: var(--blob-1); --k: 46px;  width: 74vmax; height: 74vmax; right: -26vmax; top: -30vmax;    animation: drift-a 22s ease-in-out infinite alternate; }
.hero__blobs i:nth-child(2) { --c: var(--blob-2); --k: -34px; width: 62vmax; height: 62vmax; left: -26vmax;  top: 6%;          animation: drift-b 27s ease-in-out infinite alternate; }
.hero__blobs i:nth-child(3) { --c: var(--blob-3); --k: 24px;  width: 48vmax; height: 48vmax; right: 10%;     bottom: -24vmax; animation: drift-c 19s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(-9vmax, 7vmax) scale(1.15); } }
@keyframes drift-b { to { transform: translate(11vmax, -6vmax) scale(.88); } }
@keyframes drift-c { to { transform: translate(-7vmax, -9vmax) scale(1.25); } }

.hero__eyebrow { margin-bottom: clamp(.5rem, 2vw, 1.5rem); }

.hero__title {
  font: italic 400 clamp(6.5rem, min(28vw, 38svh), 30rem)/.85 var(--serif);
  letter-spacing: -.045em;
  margin-left: -.04em;
  /* Die Unterlänge des „g“ ragt aus der engen Zeilenbox – Platz dafür reservieren */
  padding-bottom: .22em;
}
.split { display: inline-flex; align-items: baseline; }
/* Safari schneidet animierte Buchstaben an der Kante ihrer (engen) Box ab.
   Deshalb bekommt jeder Buchstabe eine größere Box, die Unterlänge und
   Kursiv-Überhang einschließt; negative Ränder halten das Layout unverändert. */
.split > span {
  display: inline-block;
  padding: .3em .14em .34em; margin: -.3em -.14em -.34em;
}
.js .split > span { animation: rise 1.25s var(--ease) both; }
.js .split > span:nth-child(2) { animation-delay: .07s; }
.js .split > span:nth-child(3) { animation-delay: .14s; }
.js .split > span:nth-child(4) { animation-delay: .21s; }
.js .split > span:nth-child(5) { animation-delay: .28s; }
@keyframes rise { from { transform: translateY(.38em) rotate(5deg); opacity: 0; } }

.hero__foot {
  display: grid; grid-template-columns: minmax(0, 34rem) auto; justify-content: space-between; align-items: end;
  gap: 1.5rem clamp(2rem, 6vw, 6rem);
  margin-top: clamp(.5rem, 1.5vw, 1.25rem);
}
.hero__lead { font: 400 clamp(1.125rem, 1rem + .6vw, 1.5rem)/1.45 var(--serif); text-wrap: pretty; }

.hero__now {
  display: grid; gap: .3rem; min-width: min(100%, 19rem);
  padding: 1.1rem 1.4rem; border-radius: var(--radius);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: border-color .3s, transform .5s var(--ease), background-color .3s;
}
.hero__now:hover { border-color: var(--ink); transform: translateY(-4px); }
.hero__now-label { display: flex; align-items: center; gap: .55rem; font: 600 .75rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.hero__now-title { font: italic 400 1.6rem/1.15 var(--serif); }
.hero__now-date { font-size: .875rem; color: var(--ink-soft); }
.dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); animation: pulse 2.2s ease-out infinite; }
.hero__now.is-closed .dot { background: var(--ink-soft); animation: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  100% { box-shadow: 0 0 0 .7rem transparent; }
}

.scroll-cue {
  position: absolute; left: 50%; bottom: 1.25rem; translate: -50% 0;
  width: 2.75rem; height: 2.75rem; display: grid; place-items: center;
}
.scroll-cue span { width: 1px; height: 2rem; background: var(--ink); transform-origin: 50% 0; animation: cue 2.4s var(--ease) infinite; }
@keyframes cue {
  0% { transform: scaleY(0); } 45% { transform: scaleY(1); transform-origin: 50% 0; }
  55% { transform: scaleY(1); transform-origin: 50% 100%; } 100% { transform: scaleY(0); transform-origin: 50% 100%; }
}

@media (max-width: 860px) {
  .hero { padding-bottom: 2.5rem; }
  .hero__foot { grid-template-columns: 1fr; }
  .hero__title { font-size: clamp(6.5rem, 31vw, 15rem); }
  /* Hochformat: Bild vergrößern und nach oben rücken, damit oben der Laden statt der Decke zu sehen ist */
  .hero__photo img { position: relative; top: -30%; width: 100%; height: 145%; object-position: 64% 50%; }
  /* Hochformat: Foto oben frei, Schleier wird zum Text hin dichter */
  .hero__scrim {
    background:
      linear-gradient(to bottom, color-mix(in srgb, var(--s) 10%, transparent) 0, color-mix(in srgb, var(--s) 10%, transparent) 20%, color-mix(in srgb, var(--s) 90%, transparent) 40%, var(--s) 100%);
  }
}

/* ───────── Laufband ───────── */
.marquee {
  position: relative; border-block: 1px solid var(--line);
  overflow: clip; padding-block: clamp(1rem, 2.2vw, 1.75rem);
}
.marquee__track { display: flex; width: max-content; will-change: transform; animation: marquee 38s linear infinite; }
.marquee.is-paused .marquee__track { animation-play-state: paused; }
.marquee::after {
  content: ""; position: absolute; inset: 0 0 0 auto; width: clamp(6rem, 14vw, 11rem); pointer-events: none;
  background: linear-gradient(to right, transparent, var(--bg) 62%);
}
.marquee__group { display: flex; flex: none; }
.marquee__group li {
  display: flex; align-items: center; white-space: nowrap;
  font: italic 400 clamp(1.75rem, 1rem + 3.4vw, 4rem)/1 var(--serif);
}
.marquee__group li::after {
  content: ""; width: .28em; height: .28em; margin-inline: .7em; border-radius: 50%; background: var(--accent);
}
@keyframes marquee { to { transform: translateX(-50%); } }

.marquee__pause {
  position: absolute; z-index: 1; right: var(--gutter); top: 50%; translate: 0 -50%;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--line);
}
.marquee__pause svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.marquee__pause .i-play { display: none; fill: currentColor; }
.marquee__pause[aria-pressed="true"] .i-play { display: block; }
.marquee__pause[aria-pressed="true"] .i-pause { display: none; }

/* ───────── Sektionen ───────── */
.section { padding: var(--section) var(--gutter); max-width: 110rem; margin-inline: auto; }
.section__head { display: grid; gap: 1.25rem; max-width: 62rem; margin-bottom: var(--head-gap); }
.section__note { color: var(--ink-soft); font-size: .9375rem; }

/* Reveal */
.js [data-reveal] {
  opacity: 0; translate: 0 2.25rem;
  transition: opacity .9s var(--ease), translate 1.1s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js [data-reveal].is-in { opacity: 1; translate: 0 0; }

/* ───────── Bildflächen ───────── */
.art {
  display: block; position: relative; overflow: clip; width: 100%;
  border-radius: calc(var(--radius) * .6);
  background: var(--bg-soft);
}
.art img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .8s, scale 1.2s var(--ease);
}
.art img.is-ready { opacity: 1; }
.art--tall   { aspect-ratio: 4 / 5; }
.art--real   { aspect-ratio: var(--ar); }   /* echtes Seitenverhältnis des Bildes, als --ar im HTML */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .parallax .art img {
      inset: -9% 0; height: 118%; will-change: transform;
      animation: parallax linear both; animation-timeline: view();
    }
    @keyframes parallax { from { transform: translateY(-7%); } to { transform: translateY(7%); } }
  }
}

/* ───────── Über ───────── */
.about__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.about__figure { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.about__figure .art { max-height: calc(100svh - var(--header-h) - 6rem); }
.about__figure .art img { object-position: 35% 30%; }
.about__figure figcaption { margin-top: .75rem; font-size: .8125rem; color: var(--ink-soft); }
.about__text { display: grid; gap: 1.75rem; }
.about__text > p:not(.lead) { max-width: 38rem; color: var(--ink-soft); }

@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__figure { position: static; max-width: 28rem; }
}

/* ───────── Werdegang (schlank, informativ) ───────── */
.vita { border-block: 1px solid var(--line); max-width: none; }
.vita__head, .vita__cols { max-width: calc(110rem - 2 * var(--gutter)); margin-inline: auto; }
.vita__head { display: grid; gap: .75rem; margin-bottom: var(--head-gap); }
.vita__title { font: 400 clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem)/1.1 var(--serif); letter-spacing: -.01em; }
.vita__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem clamp(2rem, 6vw, 6rem); }
.vita__list { position: relative; margin-top: .9rem; padding-left: 1.5rem; }

/* Zeitstrahl: blasse Linie, darüber eine Akzentlinie, die sich beim Scrollen nach unten zeichnet */
.vita__list::before, .vita__list::after {
  content: ""; position: absolute; left: 3px; top: .5rem; bottom: .5rem; width: 2px; border-radius: 2px;
}
.vita__list::before { background: var(--line); }
.vita__list::after { background: var(--accent); transform-origin: 50% 0; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .vita__list::after { animation: vita-draw linear both; animation-timeline: view(); animation-range: entry 10% cover 55%; }
    @keyframes vita-draw { from { transform: scaleY(0); } }
  }
}

.vita__list li {
  position: relative;
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0 1rem;
  padding: .8rem .6rem; margin-inline: -.6rem; border-radius: .5rem;
  font-size: .9375rem; line-height: 1.45;
  transition: background-color .3s, padding-left .45s var(--ease);
}
/* Trennlinie */
.vita__list li::after {
  content: ""; position: absolute; inset: auto .6rem 0 .6rem; height: 1px;
  background: var(--line); transform-origin: 0 50%;
}
/* Punkt auf dem Zeitstrahl */
.vita__list li::before {
  content: ""; position: absolute; left: calc(-1.5rem + .6rem); top: 1.15rem; z-index: 1;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--bg); box-shadow: 0 0 0 2px var(--accent);
  transition: background-color .3s, transform .4s var(--ease);
}

/* Einträge erscheinen nacheinander, sobald die Liste ins Bild kommt */
.vita__list li:nth-child(2) { --i: 1; }
.vita__list li:nth-child(3) { --i: 2; }
.vita__list li:nth-child(4) { --i: 3; }
.vita__list li:nth-child(5) { --i: 4; }
.vita__list li:nth-child(6) { --i: 5; }
.js .vita__list:not(.is-in) li { opacity: 0; }
.js .vita__list.is-in li { animation: vita-in .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
.js .vita__list.is-in li::after { animation: vita-line 1s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 200ms); }
.js .vita__list.is-in li::before { animation: vita-dot .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 100ms); }
@keyframes vita-in { from { opacity: 0; translate: 1.5rem 0; } }
@keyframes vita-line { from { transform: scaleX(0); } }
@keyframes vita-dot { from { scale: 0; } }

@media (hover: hover) {
  .vita__list li:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); padding-left: 1.1rem; }
  .vita__list li:hover::before { background: var(--accent); transform: scale(1.4); }
}
.vita__year { color: var(--accent); font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.vita__where { display: block; color: var(--ink-soft); font-size: .875rem; }

@media (max-width: 860px) {
  .vita__cols { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .vita__list li { grid-template-columns: 1fr; }
}

/* ───────── Werke ───────── */
/* Raster statt CSS-Spalten: Spalten + 3D-Transforms führen zu Flackern und abgeschnittenen Schatten */
.works__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end;
  gap: clamp(2.5rem, 5vw, 5rem) clamp(1.25rem, 3vw, 3rem);
}
.work { perspective: 900px; position: relative; transition: z-index 0s .55s; }
/* Vorschau: Beim Überfahren oder Tastaturfokus fliegt das Bild groß in die Bildschirmmitte (Werte setzt das Skript),
   ein Schleier lässt den Rest der Seite zurücktreten. Das Bild fängt dabei keine Mausereignisse ab,
   damit die Karte darunter weiter als „überfahren“ gilt und die Nachbarn erreichbar bleiben. */
.works__scrim {
  position: fixed; inset: 0; z-index: 5; pointer-events: none; opacity: 0;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(8px) saturate(.7); backdrop-filter: blur(8px) saturate(.7);
  transition: opacity .5s var(--ease);
}
.works.has-zoom .works__scrim { opacity: 1; }
.work.is-zoomed { z-index: 6; transition: none; }
.work.is-zoomed .art {
  transform: translate(var(--tx, 0px), var(--ty, 0px)) scale(var(--zs, 1));
  pointer-events: none;
  box-shadow: 0 12px 40px -12px #00000099;
  transition: transform .75s var(--ease), box-shadow .75s var(--ease);
}
@media (prefers-reduced-motion: reduce) { .work .art, .work.is-zoomed .art { transition: none; } }
.work__btn { display: grid; gap: .2rem; width: 100%; text-align: left; border-radius: calc(var(--radius) * .6); }
.work .art {
  margin-bottom: .9rem;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--s, 1));
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
  box-shadow: 0 1px 2px #0000001a;
}
.work__title { font: italic 400 1.4rem/1.2 var(--serif); }
.work__meta { font-size: .875rem; color: var(--ink-soft); }

@media (max-width: 1000px) {
  .works__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .works__grid { grid-template-columns: 1fr; }
}

/* ───────── Restaurierung ───────── */
.restore { background: var(--bg-soft); max-width: none; }
.restore > * { max-width: calc(110rem - 2 * var(--gutter)); margin-inline: auto; }
.restore__title { max-width: 62rem; }

/* Breit: links das Beispiel über die ganze Höhe, rechts Text, Ablauf und Anfrage untereinander */
.restore__layout {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  grid-template-rows: auto auto 1fr; gap: clamp(2rem, 3.5vw, 3rem) clamp(2.5rem, 7vw, 7rem);
}
.restore__layout > * { grid-column: 2; }
.restore__example { grid-column: 1; grid-row: 1 / span 3; align-self: start; max-width: 30rem; }
.restore__text { display: grid; gap: 1.25rem; }
.restore__text > p:not(.lead) { color: var(--ink-soft); }
.restore__sub { margin-bottom: 1.25rem; }
.restore__example figcaption { font-size: .875rem; color: var(--ink-soft); }
.compare figcaption { margin-top: .75rem; }

/* Gerahmtes Ergebnis als kleine Zugabe unter dem Vergleich */
.restore__framed {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1.25rem; align-items: center;
  margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
}
.restore__framed img { display: block; width: 100%; height: auto; border-radius: .5rem; }

.compare__frame {
  --pos: 50%;
  position: relative; overflow: hidden; border-radius: calc(var(--radius) / 2);
  aspect-ratio: 1164 / 1504; background: var(--line);
}
.compare__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.compare__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare__tag {
  position: absolute; top: .75rem; padding: .3rem .7rem; border-radius: 999px;
  background: #1c1917cc; color: #f7f4ef; font: 600 .75rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  pointer-events: none;
}
.compare__tag--before { left: .75rem; }
.compare__tag--after { right: .75rem; }
.compare__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; translate: -50% 0;
  background: #f7f4ef; box-shadow: 0 0 0 1px #1c191740; pointer-events: none;
}
.compare__handle svg {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%;
  width: 2.75rem; height: 2.75rem; padding: .7rem; border-radius: 50%;
  background: #f7f4ef; color: #28231f; box-shadow: 0 4px 16px -4px #00000080;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: scale .3s var(--ease);
}
.compare__frame:hover .compare__handle svg { scale: 1.08; }
/* Der eigentliche Regler liegt unsichtbar über dem ganzen Bild: Maus, Finger und Pfeiltasten funktionieren */
.compare__range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0;
  cursor: ew-resize; touch-action: pan-y; -webkit-appearance: none; appearance: none;
}
.compare__frame:has(.compare__range:focus-visible) { outline: 3px solid var(--accent); outline-offset: 4px; }

/* Vier Schritte untereinander; die Akzentlinie oben zeichnet sich beim Scrollen von links nach rechts */
.steps { position: relative; counter-reset: step; display: grid; }
.steps::before, .steps::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; border-radius: 2px; }
.steps::before { background: var(--line); }
.steps::after { background: var(--accent); transform-origin: 0 50%; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .steps::after { animation: steps-draw linear both; animation-timeline: view(); animation-range: entry 20% cover 40%; }
    @keyframes steps-draw { from { transform: scaleX(0); } }
  }
}
.steps li {
  display: grid; grid-template-columns: 3.75rem minmax(0, 1fr); column-gap: 1.25rem; row-gap: .3rem;
  padding-block: 1.35rem; counter-increment: step;
}
.steps li + li { border-top: 1px solid var(--line); }
.steps li::before {
  content: counter(step, decimal-leading-zero); grid-row: 1 / span 2;
  font: italic 400 2.5rem/1 var(--serif); color: var(--accent);
  font-variant-numeric: lining-nums; transition: translate .5s var(--ease);
}
.steps li:hover::before { translate: .3rem 0; }
.steps h4 { margin: 0; grid-column: 2; font: 400 1.4rem/1.2 var(--serif); }
.steps p { grid-column: 2; color: var(--ink-soft); font-size: .9375rem; }

.restore__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; align-self: start; }
.restore__tel { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; white-space: nowrap; }
.restore__tel:hover { color: var(--accent); }

@media (max-width: 860px) {
  .restore__layout { grid-template-columns: 1fr; grid-template-rows: none; }
  .restore__layout > *, .restore__example { grid-column: 1; grid-row: auto; }
}
@media (max-width: 420px) {
  .steps li { grid-template-columns: 2.75rem minmax(0, 1fr); column-gap: 1rem; }
  .steps li::before { font-size: 2rem; }
}

/* ───────── Besuch ───────── */
/* Slider */
.slider { margin-bottom: var(--head-gap); }
.slider__track {
  display: flex; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  aspect-ratio: 16 / 9; max-height: 74svh; width: 100%;
  border-radius: var(--radius); background: var(--bg-soft);
}
.slider__track::-webkit-scrollbar { display: none; }
.slider__slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: clip; }
.slider__slide img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale 7s ease-out; }
.slider__slide.is-active img { scale: 1.06; }
.slider__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; margin-top: .9rem; }
.slider__caption { font: italic 400 clamp(1.15rem, 1rem + .6vw, 1.5rem)/1.3 var(--serif); }
.slider__controls { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.slider__count { margin-right: .5rem; font-size: .875rem; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
#sliderPause .i-play { display: none; fill: currentColor; }
#sliderPause[aria-pressed="true"] .i-play { display: block; }
#sliderPause[aria-pressed="true"] .i-pause { display: none; }
@media (max-width: 700px) { .slider__track { aspect-ratio: 4 / 3; } }

/* Zwei gleich hohe Spalten: links alle Infos, rechts Karte + Route */
.visit__layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1rem, 2vw, 1.75rem); align-items: stretch; }
.visit__info { gap: 0; align-content: space-between; }
.visit__block { display: grid; gap: 1rem; padding-block: clamp(1.25rem, 2.5vw, 2rem); border-bottom: 1px solid var(--line); }
.visit__block:first-child { padding-top: 0; }
.visit__block:last-child { padding-bottom: 0; border-bottom: 0; }
.visit__way { grid-template-rows: minmax(20rem, 1fr) auto; gap: clamp(1.25rem, 2.5vw, 2rem); }
/* Startpunkt, Verkehrsmittel und Knopf in einer Zeile; bei wenig Platz brechen sie sauber um */
.route__row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; }
.route__row .field { flex: 0 1 9.5rem; }
.route__row .field--grow { flex: 1 1 13rem; }
@media (max-width: 760px) {
  .visit__layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .route__row .field, .route__row .btn { flex: 1 1 100%; }
}
.card {
  display: grid; gap: 1.25rem; align-content: start;
  padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: var(--radius);
  background: var(--bg-soft); border: 1px solid var(--line);
}
.card h3 { font: italic 400 1.9rem/1.1 var(--serif); }

.route__form { display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field label { font: 600 .75rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 2.9rem; padding: .6rem .9rem;
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid color-mix(in srgb, var(--ink) 45%, transparent); border-radius: .6rem;
  transition: border-color .3s, box-shadow .3s;
}
.field textarea { min-height: 9rem; resize: vertical; line-height: 1.5; }
.field input::placeholder { color: var(--ink-soft); opacity: 1; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .75rem; justify-self: start;
  min-height: 2.9rem; padding: .8rem 1.5rem; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 600;
  position: relative; overflow: clip; isolation: isolate; transition: color .3s;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--accent); translate: 0 101%; transition: translate .5s var(--ease);
}
.btn:hover { color: var(--accent-ink); }
.btn:hover::before { translate: 0 0; }
.btn svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: translate .4s var(--ease); }
.btn:hover svg { translate: .3rem 0; }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }

.map {
  position: relative; min-height: 20rem; overflow: clip;
  border-radius: calc(var(--radius) * .7); border: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 3rem 3rem,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 3rem 3rem,
    var(--bg);
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; animation: fade .8s; }
:root[data-theme="dark"] .map iframe { filter: invert(.92) hue-rotate(180deg) saturate(.7) brightness(.95); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .map iframe { filter: invert(.92) hue-rotate(180deg) saturate(.7) brightness(.95); }
}
.map__consent {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 1rem;
  padding: 1.5rem 1.5rem 3rem; text-align: center;
  background: radial-gradient(closest-side, var(--bg) 55%, transparent);
}
.map__consent svg { width: 2.5rem; height: 2.5rem; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; animation: pin 2.4s var(--ease) infinite; }
@keyframes pin { 50% { translate: 0 -.4rem; } }
.map__consent p { max-width: 24rem; font-size: .875rem; color: var(--ink-soft); }
.map__link {
  position: absolute; left: .6rem; top: .6rem; z-index: 1;
  padding: .45rem .85rem; border-radius: 999px; font-size: .8125rem; font-weight: 600;
  background: var(--bg); border: 1px solid var(--line);
}
.map__link:hover { border-color: var(--ink); }

.card__note { font-size: .875rem; color: var(--ink-soft); }
.card address { font-size: 1.0625rem; line-height: 1.6; }
.hours > div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .7rem; border-bottom: 1px solid var(--line); }
.hours > div:last-child { border-bottom: 0; }
.hours dd { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; white-space: nowrap; }

/* ───────── Kontakt ───────── */
.contact { border-top: 1px solid var(--line); }
.contact__layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.contact__intro { display: grid; gap: 1.25rem; align-content: start; position: sticky; top: calc(var(--header-h) + 2rem); }
.contact__title { font-style: italic; }
.contact__list { display: grid; gap: 0; margin-top: .5rem; border-top: 1px solid var(--line); }
.contact__list li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: .25rem 1rem; align-items: baseline; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.contact__list span { font: 600 .75rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.contact__list address { font-size: 1.0625rem; line-height: 1.5; }
.contact__list a { font-size: 1.0625rem; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; overflow-wrap: anywhere; }
.contact__list a:hover { color: var(--accent); }
.card__link { font: 400 1.6rem/1.2 var(--serif); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }
.card__link:hover { color: var(--accent); }

.contact__form { gap: 1.1rem; }
.contact__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: .25rem; }
.btn[disabled] { opacity: .55; cursor: progress; }
.form-status { flex: 1 1 14rem; font-size: .9375rem; font-weight: 600; }
.form-status:empty { display: none; }
.form-status[data-type="ok"] { color: light-dark(#2f6b3a, #9fd3a6); }
.form-status[data-type="error"] { color: var(--accent); }
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 860px) {
  .contact__layout { grid-template-columns: 1fr; }
  .contact__intro { position: static; }
}
@media (max-width: 420px) {
  .contact__list li { grid-template-columns: 1fr; }
}

/* ───────── Footer ───────── */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem;
  padding: 2rem var(--gutter); border-top: 1px solid var(--line);
  font-size: .875rem; color: var(--ink-soft);
}
.footer ul { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; }
.footer a { display: inline-block; padding-block: .5rem; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .25em; transition: color .3s, text-decoration-color .3s; }
.footer a:hover { color: var(--ink); text-decoration-color: currentColor; }

/* ───────── Rechtsseiten (Impressum) ───────── */
/* Beide Sprachfassungen stehen im HTML; sichtbar ist die zu <html lang> passende */
html:not([lang="en"]) [data-lang="en"], html[lang="en"] [data-lang="de"] { display: none; }
.legal {
  max-width: calc(46rem + 2 * var(--gutter)); margin-inline: auto;
  padding: calc(var(--header-h) + var(--section) * .6) var(--gutter) var(--section);
}
.legal:focus { outline: none; }
.legal__back {
  display: inline-block; margin-bottom: var(--head-gap); padding-block: .5rem;
  font-size: .9375rem; font-weight: 500; color: var(--ink-soft); transition: color .3s;
}
.legal__back:hover { color: var(--accent); }
.legal .eyebrow { margin-bottom: 1.25rem; }
.legal__note { margin-top: 1.5rem; color: var(--ink-soft); font-size: .9375rem; }
.legal h2 { margin: 2.75rem 0 .75rem; font: 400 clamp(1.4rem, 1.2rem + .8vw, 1.75rem)/1.2 var(--serif); text-wrap: balance; }
.legal p + p, .legal ul + p, .legal p + ul, .legal p + address { margin-top: .85rem; }
.legal ul { list-style: disc; padding-left: 1.25rem; max-width: 40rem; }
.legal li + li { margin-top: .25rem; }
.legal li::marker { color: var(--accent); }
.faq h2 { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--accent); }
.faq h3 { margin: 1.75rem 0 .4rem; font: 600 1.0625rem/1.4 var(--sans); max-width: 40rem; text-wrap: balance; }
.legal__action { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.legal__action [role="status"] { color: var(--ink-soft); font-size: .9375rem; }
.map__consent p a, .card__note a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; white-space: nowrap; }
.map__consent p a:hover, .card__note a:hover { color: var(--accent); }
.legal p, .legal address { max-width: 40rem; text-wrap: pretty; }
.legal :is(p, address) a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; transition: color .3s; }
.legal :is(p, address) a:hover { color: var(--accent); }

/* ───────── Lightbox ───────── */
.lightbox {
  width: min(92vw, 64rem); max-height: 92svh; padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); color: var(--ink);
  overflow: auto;
}
.lightbox[open] { display: grid; gap: 1.25rem; animation: lb-in .5s var(--ease); }
.lightbox::backdrop { background: #1c1917d9; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fade .4s; }
@keyframes lb-in { from { opacity: 0; transform: translateY(1.5rem) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
.lightbox__art .art { width: min(100%, calc(70svh * var(--ar, .8))); margin-inline: auto; }
.lightbox__caption h2 { font: italic 400 clamp(1.5rem, 1rem + 2vw, 2.5rem)/1.15 var(--serif); }
.lightbox__caption p { color: var(--ink-soft); margin-top: .35rem; }
.lightbox__close {
  position: sticky; top: 0; justify-self: end; z-index: 2;
  width: 2.75rem; height: 2.75rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--bg);
  margin-bottom: -3.5rem;
}
.lightbox__close svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ───────── Theme-Wechsel (View Transition) ───────── */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 0; }
::view-transition-new(root) { z-index: 1; animation: vt-reveal .7s var(--ease); }
@keyframes vt-reveal {
  from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0)); }
  to   { clip-path: circle(150vmax at var(--vt-x, 50%) var(--vt-y, 0)); }
}

/* ───────── Reduzierte Bewegung ───────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; translate: none; }
  .marquee__track { animation: none; }
  .marquee__pause, #sliderPause { display: none; }
  .slider__slide.is-active img { scale: none; }
  .progress { display: none; }
  .scroll-cue span { transform: none; }
  ::view-transition-new(root) { animation: none; }
}

/* ───────── Erhöhter Kontrast / Forced Colors ───────── */
@media (prefers-contrast: more) {
  :root { --ink-soft: var(--ink); --line: var(--ink); }
}
@media (forced-colors: active) {
  .hero__blobs { display: none; }
  .ctrl, .card, .hero__now { border: 1px solid CanvasText; }
}

/* ───────── Druck ───────── */
@media print {
  .header, .progress, .marquee, .scroll-cue, .hero__blobs { display: none; }
  .js [data-reveal] { opacity: 1; translate: none; }
  .js .vita__list li { opacity: 1 !important; }
  .hero { min-height: auto; }
}
