/* Gestaltung: Farben, Index, Bildbewegung und Dialogübergänge. */
:root {
  --index-size: clamp(.875rem, 1.22vw, 1.125rem);
  --index-mobile-size: .875rem;
  --index-padding: .44em;
  --index-indent: .85em;
  --index-inactive: #70716d;
  --index-active: #000;
  --header-height: 84px;
  --menu-hover: #e7ece3;
  --header-ink: #000;
  --header-image-ink: #fff;
  --chapter-zoom: .045;
  --stage-width: 54%;
  --index-rule: #8cbea2;
  --index-rule-width: 2px;
  --underline-gap: .22em;
  --nav-transition: 220ms;
  --photo-duration: 550ms;
  --photo-zoom: 1.035;
  --enter-duration: 200ms;
  --exit-duration: 160ms;
  --chapter-rise: 26px;
  --intro-size: clamp(2.25rem, 5vw, 5rem);
}
:root{color-scheme:light;--bg:#f8f8f3;--ink:#252722;--line:#d4d5cc;--mint:#cde4ff;font-family:Arial,Helvetica,sans-serif;color:var(--ink);background:var(--bg)}*{box-sizing:border-box}body{margin:0}button,a{color:inherit;font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:3px solid #7358a0;outline-offset:4px}button{border:0;background:none}a{text-decoration:none}.top,main,footer{width:calc(100% - clamp(40px,8vw,144px));max-width:1680px;margin:auto}.top{position:sticky;top:0;z-index:5;color:var(--header-ink);background:transparent;height:84px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:25px;letter-spacing:-1.5px}.brand svg{width:35px;height:35px}.top nav{display:flex;gap:12px;align-items:center;font-size:14px}.top nav>*{padding:9px 16px;border-radius:0;transition:background-color var(--nav-transition)}.top nav [aria-current]{text-decoration:underline;text-underline-offset:var(--underline-gap)}.top nav>*:hover,.top nav>*:focus-visible{background:var(--menu-hover)}footer{margin-top:65px;border-top:1px solid var(--line);padding:22px 0 35px;display:flex;justify-content:space-between;font-size:13px;color:#64655c}
dialog{padding:0;color:var(--ink);background:var(--bg);border:1px solid var(--line);border-radius:10px;box-shadow:0 20px 70px #13191033}dialog::backdrop{background:#17191266}dialog[open]{animation:appear var(--enter-duration) both}dialog.closing{animation:disappear var(--exit-duration) both}@keyframes appear{from{opacity:0;transform:translateY(12px)}}@keyframes disappear{to{opacity:0;transform:translateY(8px)}}#viewer{border-radius:0;width:96vw;max-width:1700px;height:94dvh;max-height:96dvh;overflow:hidden}.dialoghead,.dialoghead div{display:flex;align-items:center;justify-content:space-between;gap:15px}.dialoghead{height:68px;padding:0 22px;border-bottom:1px solid var(--line)}.dialoghead h2{font-size:21px;letter-spacing:-.04em;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.close{border:1px solid var(--line);border-radius:30px}.close{width:38px;height:38px;font-size:27px}.close:hover{background:var(--mint)}.viewerbody{position:relative;display:flex;height:calc(100% - 68px)}.dots{display:flex;align-items:center;flex-direction:column;overflow:auto;width:45px;flex:none;padding:10px 0}.dots button{flex:none;width:30px;height:26px;display:grid;place-items:center}.dots button:first-child{margin-top:auto}.dots button:last-child{margin-bottom:auto}.dots button:after{content:'';width:8px;height:8px;border:1px solid #85867e;border-radius:100%}.dots [aria-current=true]:after{background:#85867e}#images{flex:1;min-width:0;overflow:auto;overscroll-behavior:contain;padding:18px 20px 18px 0}figure{margin:0 0 24px}figure img{display:block;width:100%;height:calc(94dvh - 160px);object-fit:contain;background:#eeeee7}figcaption{padding-top:9px;font-size:15px}.aboutcopy h3{font-size:26px;letter-spacing:-.04em;margin:0 0 14px}.aboutcopy p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}#about{width:min(490px,92vw)}.aboutcopy{padding:28px}.fallback{display:grid;place-items:center;min-height:130px;color:#606359}body.locked{overflow:hidden}
@media(max-width:620px){.top{height:65px}.top nav{gap:0}.top nav>*{padding:8px 10px}.brand{font-size:21px;gap:5px}.brand svg{width:28px}.dialoghead{padding:0 12px;gap:6px}.dialoghead div{gap:6px}.dialoghead h2{font-size:17px}#viewer{height:98dvh;max-height:98dvh;width:98vw}.dots{width:30px}#images{padding:10px 9px 12px 0}figure img{height:auto;min-height:35vh}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.download{display:inline-block;font-size:15px;text-decoration:underline;text-underline-offset:4px;margin-bottom:4px}

/* Die nativen Scrollgesten bleiben auch bei ausgeblendeter Leiste erhalten. */
html, #images, #about { scrollbar-width: none; }
html::-webkit-scrollbar,
#images::-webkit-scrollbar,
#about::-webkit-scrollbar { display: none; }

/* Die Ausstellung gleitet über den am unteren Fensterrand gehaltenen Kontaktbereich. */
.exhibition {
  position: relative;
  z-index: 1;
  background: var(--bg);
  padding-bottom: clamp(60px, 8vw, 144px);
}
#contactFooter {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  display: block;
  background: var(--mint);
  color: var(--ink);
  border: 0;
}
.contact-inner {
  width: calc(100% - clamp(40px, 8vw, 144px));
  max-width: 1680px;
  margin: auto;
  padding: clamp(40px, 8vh, 90px) 0 24px;
}
#contactTitle {
  margin: 0;
  font-size: clamp(4.5rem, 13vw, 13rem);
  font-weight: 500;
  letter-spacing: -.075em;
  line-height: .95;
}
#contactTitle span { color: #48745d; }
.contact-details, .contact-base {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.contact-details {
  margin: clamp(28px, 6vh, 70px) 0;
  padding-top: 16px;
  border-top: 1px solid #779e86;
  font-size: 1rem;
}
.contact-details address {
  font-style: normal;
  font-size: clamp(1.2rem, 2.8vw, 3rem);
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.contact-details small {
  display: block;
  font: .8125rem/1.8 Arial, sans-serif;
  letter-spacing: normal;
}
.contact-base { font-size: .875rem; }
.contact-base a { text-decoration: underline; text-underline-offset: 4px; }
/* Bei wenig Höhe oder Tastaturfokus bleibt der ganze Footer im Dokumentfluss erreichbar. */
@media (prefers-reduced-motion: no-preference) and (min-height: 500px) {
  #contactFooter:not(:focus-within) { position: sticky; bottom: 0; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
#gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(7px, .9vw, 18px);
  padding-block: clamp(12px, 1.4vw, 26px);
}
.tile, .sequence-art {
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: #e7e8df;
}
.tile {
  height: clamp(150px, calc((100svh - 140px) / 2), 25vw);
}
.tile img, .sequence-art img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  transition: transform var(--photo-duration) cubic-bezier(.2,.65,.3,1);
}
@media (hover: hover) {
  .tile:hover img, .sequence-art:hover img { transform: scale(var(--photo-zoom)); }
}
#projektliste:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--stage-width) minmax(0, 1fr);
  column-gap: clamp(12px, 2vw, 40px);
  margin-top: clamp(48px, 9vw, 150px);
  border-top: 1px solid var(--line);
}
.list-index {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: start;
}
.list-index h2 { margin: 0 0 22px; font-size: 1rem; }
#projectNames {
  max-height: calc(82svh - var(--header-height));
  overflow-y: auto;
  scrollbar-width: none;
  padding: 4px;
}
#projectNames a {
  position: relative;
  display: block;
  padding-block: var(--index-padding);
  color: var(--index-inactive);
  text-decoration: none;
  font-size: var(--index-size);
  line-height: 1.3;
  overflow-wrap: anywhere;
  transition: padding-inline-start var(--nav-transition), color var(--nav-transition);
}
#projectNames a::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--index-rule-width);
  background: var(--index-rule);
  transform-origin: top;
  transform: scaleY(0);
}
#projectNames a.passed, #projectNames a[aria-current] { padding-inline-start: var(--index-indent); }

#projectNames a.passed::before { transform: none; }
#projectNames a[aria-current]::before { transform: scaleY(var(--row-progress, 0)); }
#projectNames a[aria-current] { color: var(--index-active); }
/* Der Track gibt die Scrollstrecke vor, die Bildfläche bleibt dabei in der Mitte. */
#projectSequence { position: relative; min-width: 0; }
:root { scroll-padding-top: var(--header-height); }
.sequence-stage {
  --stage-height: calc(100svh - var(--header-height));
  position: sticky;
  top: var(--header-height);
  height: var(--stage-height);
  display: grid;
  align-items: safe center;
  z-index: 1;
  pointer-events: none;
}
.sequence-track { margin-top: calc(var(--header-height) - 100svh); pointer-events: none; }
.sequence-item { height: 100svh; }
.sequence-composition { min-width: 0; }
.sequence-media {
  position: relative;
  display: grid;
  overflow: hidden;
}
.sequence-captions { display: grid; }
.sequence-caption { grid-area: 1 / 1; visibility: hidden; }
.sequence-caption.current { visibility: visible; }
.sequence-art {
  grid-area: 1 / 1;
  height: clamp(110px, calc(48svh - 24px), 580px);
  opacity: var(--layer-opacity, 1);
  justify-self: center; max-width: 100%;
}
.sequence-art[hidden] { display: none; }
.sequence-art:not([inert]), .open-project { pointer-events: auto; }
.sequence-art img { object-fit: contain; object-position: center; scale: calc(1 + var(--zoom-progress, 0) * var(--chapter-zoom)); }
.sequence-art { background: var(--bg); }
.sequence-caption h3 {
  margin: 20px 0 8px;
  font-size: clamp(2.4rem, 5vw, 5.5rem);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -.065em;
  overflow-wrap: anywhere;
}
.sequence-caption p { margin: 0 0 18px; max-width: 54ch; line-height: 1.5; }
.open-project {
  padding: 8px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
@media (max-width: 700px) {
  #gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { height: auto; aspect-ratio: 1 / 1.09; }
  #projektliste:not([hidden]) { grid-template-columns: minmax(0, 31fr) minmax(0, 69fr); gap: 12px; }
  .sequence-item { height: 100svh; }
  .sequence-art { height: min(44svh, 58vw); }
  .sequence-caption h3 { font-size: clamp(1.75rem, 6vw, 2.75rem); }
  #projectNames a { font-size: var(--index-mobile-size); }
}

@media(max-width:420px){.top{height:auto;min-height:65px;flex-wrap:wrap;gap:4px;padding-block:8px}.top nav>*{padding:7px}.top nav{flex-wrap:wrap}}

@media(max-height:520px){.sequence-art{height:27svh}.sequence-caption h3{font-size:1.6rem;margin:6px 0}.sequence-caption p{margin-bottom:4px}}


/* Das zweite Schriftbild ist ausschließlich innerhalb der sichtbaren Bildflächen weiß. */
.header-row { display: flex; width: 100%; align-items: center; justify-content: space-between; }
.header-image-ink {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: var(--header-image-ink);
  clip-path: url(#header-image-mask);
}
.header-mask-defs { position: absolute; width: 0; height: 0; }
.top .header-row:first-child:has(nav > :nth-child(1):hover) ~ .header-image-ink nav > :nth-child(1),
.top .header-row:first-child:has(nav > :nth-child(2):hover) ~ .header-image-ink nav > :nth-child(2),
.top .header-row:first-child:has(nav > :nth-child(3):hover) ~ .header-image-ink nav > :nth-child(3) {
  background: var(--menu-hover); color: var(--header-ink);
}
@media(max-width:420px){.header-row{flex-wrap:wrap;gap:4px}.header-image-ink{padding-block:8px}}

/* Projektansicht: zweispaltiger Auftakt, anschließend einzelne Bildtafeln. */
:root {
  --viewer-in: 300ms;
  --viewer-out: 180ms;
  --viewer-settle: cubic-bezier(.18,.72,.22,1);
  --viewer-release: cubic-bezier(.4,0,.8,.4);
  --exhibit-paper: #f7f7f1;
  --exhibit-rule: #c9cbc0;
  --exhibit-title: clamp(2.75rem, 4.9vw, 6rem);
  --reading-width: 62ch;
  --exhibit-gutter: clamp(18px, 3vw, 54px);
}
#viewer { background: var(--exhibit-paper); border-color: var(--exhibit-rule); }
#viewer::backdrop { background: rgb(25 29 25 / 51%); backdrop-filter: blur(3px); }
#viewer .dialoghead { padding-inline: var(--exhibit-gutter); }
#viewer .viewer-identity { justify-content: flex-start; min-width: 0; gap: 12px; }
.viewer-identity strong { font-size: 19px; letter-spacing: -.06em; }
.viewer-identity > span { color: #8c9184; }
#viewer .dialoghead h2 { font-size: 14px; font-weight: 400; letter-spacing: 0; }
#closeView {
  display: inline-flex; align-items: center; gap: 14px; flex: none;
  width: auto; height: 34px; padding: 0 12px; border-radius: 0; font-size: 14px;
}
#closeView span { font-size: 22px; line-height: 1; }
#viewer .dots { width: clamp(30px, 4vw, 66px); border-right: 1px solid var(--exhibit-rule); }
#viewer #images { padding: 0 var(--exhibit-gutter); }
.project-intro {
  display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: var(--exhibit-gutter); align-items: start;
  min-height: 100%; padding-block: var(--exhibit-gutter);
}
.intro-copy { min-width: 0; align-self: center; }
.intro-copy:only-child { grid-column: 1 / -1; max-width: 72ch; }
.exhibit-meta { font: .8125rem/1.5 monospace; letter-spacing: .07em; color: #606558; }
.intro-copy h3 {
  font-size: var(--exhibit-title); font-weight: 500; line-height: .98;
  letter-spacing: -.07em; margin: .3em 0 .45em; overflow-wrap: anywhere;
}
.intro-copy p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.68; margin: 0; max-width: var(--reading-width); tab-size: 4; }
/* Das Motiv bleibt neben dem Text stehen und löst sich am Ende der Einleitung. */
.intro-cover {
  position: sticky; top: var(--exhibit-gutter); width: 100%;
  aspect-ratio: 4 / 5; max-height: calc(94dvh - 68px - 2 * var(--exhibit-gutter));
  overflow: hidden; background: #e4e7dd;
}
.intro-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#viewer figure { padding: var(--exhibit-gutter) 0; border-top: 1px solid var(--exhibit-rule); margin: 0; }
#viewer figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-top: 12px; font-size: clamp(1.05rem, 1.7vw, 1.8rem); letter-spacing: -.035em; }
#viewer figcaption .exhibit-meta { flex: none; }
#viewer figure img { height: clamp(220px, 68dvh, 900px); object-fit: contain; }
/* Gemeinsame Bewegung für Text und Motiv; ein früher Klick kehrt den Verlauf um. */
#viewer[open] { animation: none; opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  #viewer[open] {
    transition: opacity var(--viewer-in) var(--viewer-settle),
                transform var(--viewer-in) var(--viewer-settle);
  }
  #viewer[open]::backdrop {
    transition: background-color var(--viewer-in) var(--viewer-settle), backdrop-filter var(--viewer-in) var(--viewer-settle);
  }
  @starting-style {
    #viewer[open] { opacity: 0; transform: translateY(6px); }
    #viewer[open]::backdrop { background-color: transparent; backdrop-filter: blur(0); }
  }
  #viewer[open].closing {
    opacity: 0; transform: translateY(3px);
    transition-duration: var(--viewer-out);
    transition-timing-function: var(--viewer-release);
  }
  #viewer[open].closing::backdrop {
    background-color: transparent; backdrop-filter: blur(0);
    transition-duration: var(--viewer-out);
  }
}
@media(max-width:760px) {
  .project-intro { grid-template-columns: 1fr; align-content: start; min-height: auto; }
  .project-intro { row-gap: 0; }
  .intro-copy { display: contents; }
  .intro-copy h3 { grid-row: 2; }
  .intro-copy p { grid-row: 4; }
  .intro-cover { position: relative; top: auto; grid-row: 3; max-height: 32dvh; aspect-ratio: 16 / 9; margin-bottom: 1.25rem; }
  #viewer figure img { height: auto; min-height: 0; }
  #viewer .viewer-identity { gap: 7px; }
  #closeView { padding-inline: 8px; gap: 6px; }
}

/* Mobil bleibt die Navigation auch bei ein- und ausfahrender Browserleiste am Viewport. */
@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  .top { position: fixed; inset: 0 0 auto; margin-inline: auto; }
  body { padding-top: var(--header-height); }
}

/* Die Tagzeilen bestimmen die Mindesthöhe. Auch lange Wörter dürfen umbrechen. */
:root { --tag-size: clamp(.8125rem, .76rem + .24vw, 1rem); }
.tile {
  position: relative;
  height: auto;
  min-height: clamp(150px, calc((100vh - 140px) / 2), 25vw);
  min-height: clamp(150px, calc((100svh - 140px) / 2), 25vw);
  min-width: 0;
}
.tile > img { position: absolute; inset: 0; }
.tile-title {
  position: absolute; inset: auto 0 0;
  padding: .65em 1em; text-align: start; color: rgb(228 228 225 / 90%);
  font-size: clamp(1rem, 1.3vw, 1.25rem); font-weight: 600; overflow-wrap: anywhere;
  opacity: 0;
  transition: opacity var(--nav-transition); pointer-events: none;
}
.tile:focus-visible .tile-title { opacity: 1; }
@media (hover: hover) { .tile:hover .tile-title { opacity: 1; } }
.sequence-caption { min-width: 0; }
.tag-window {
  display: block; overflow: hidden; width: 100%; max-width: 100%;
  margin: clamp(10px, 1.4vh, 18px) auto 0; color: #54574f;
  font-size: var(--tag-size); line-height: 1.5;
}
.tag-window + h3 { margin-top: clamp(14px, 2vh, 26px); }
.tag-belt, .tag-group { display: flex; width: max-content; }
.tag-group { gap: 1em; }
.project-tag { white-space: nowrap; }
.project-tag::before { content: '•'; margin-right: .4em; }
.tag-belt.rotating .tag-group { margin-inline-end: 1em; }
.tag-belt.rotating { animation: tag-scroll var(--tag-duration) linear infinite; animation-play-state: paused; }
.sequence-caption.current .tag-belt.rotating { animation-play-state: running; }
@keyframes tag-scroll { from {transform: translateX(-50%)} to {transform: translateX(0)} }
@media (prefers-reduced-motion: reduce) {
  .tag-belt, .tag-group { width: 100%; }
  .tag-group { flex-wrap: wrap; gap: .2em .8em; }
  .project-tag { white-space: normal; overflow-wrap: anywhere; }
}
.intro-copy, .sequence-caption, #viewer figcaption > span:first-child { min-width: 0; overflow-wrap: anywhere; }
#viewer figcaption { flex-wrap: wrap; }
@media (max-width: 700px) { .tile { min-height: auto; } }
@media (max-width: 390px) { #gallery { grid-template-columns: minmax(0, 1fr); } .tile { aspect-ratio: 4 / 3; } }

.folder-settings { border-top: 1px solid var(--line); margin-block: 24px; padding-top: 20px; }
.folder-settings h3 { font-size: 20px; }
.folder-settings button { padding: 10px 14px; background: var(--mint); }



:root {
  color-scheme: light;

  --bg: #FFFFFF;
  --ink: #000000;
  --line: #DDD5C7;
  --mint: #F0DCB9;             /* Sandgelber Kontaktbereich */

  --header-ink: #000000;
  --header-image-ink: #FFFFFF; /* Helle Schrift über Galeriebildern */
  --menu-hover: #F0DCB9;

  --index-inactive: #625C53;
  --index-active: #000000;
  --index-rule: #AD482B;       /* Rostoranger Projektstrich */

  --exhibit-paper: #FFFFFF;
  --exhibit-rule: #DDD5C7;
}

#contactFooter {
  color: var(--ink);
}

#contactTitle span {
  color: var(--index-rule);
}


#contactFooter {
  background: var(--mint); /* Sandgelb aus deiner Dünenwind-Palette */
  color: var(--ink);
  border-top: 0;
}

#contactFooter::before {
  content: "";
  display: block;
  width: 100%;
  height: clamp(48px, 7vw, 110px);
  background: var(--bg);

  --duenenkante: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath fill='black' d='M0 0H1000V58C870 78 760 98 620 80C465 60 378 12 260 15C150 18 80 55 0 68Z'/%3E%3C/svg%3E");
  -webkit-mask: var(--duenenkante) center / 100% 100% no-repeat;
  mask: var(--duenenkante) center / 100% 100% no-repeat;
}