:root {
  --bg: #f7f4ee;
  --bg-2: #ece6db;
  --card: #fffdf9;
  --text: #2b2620;
  --muted: #6d6458;
  --accent: #8a5a24;
  --accent-2: #b5813a;
  --dark: #2b2620;
  --line: rgba(43, 38, 32, .14);
  --wrap: 50rem;
  --font: "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 3.25rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1.0625rem/1.7 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--dark); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 1rem; }
h3 { font-size: 1.3rem; margin: 0 0 .5rem; }
h4 { font-size: 1.15rem; margin: 0 0 .5rem; }
.center { text-align: center; }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; color: #fff; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0) 45%, rgba(20,16,12,.7)); }
.hero-content { position: relative; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1rem 5.5rem; }
.hero h1 { font-size: clamp(2.4rem, 8vw, 4.75rem); margin: 0; letter-spacing: .01em; text-shadow: 0 3px 20px rgba(0,0,0,.5); }
.hero-sub { margin: .4rem 0 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 2.6vw, 1.5rem); text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.hero-down { position: absolute; bottom: 1.75rem; left: 50%; width: 1.6rem; height: 1.6rem; margin-left: -.8rem; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { translate: 0 .4rem; } }

/* Navigation */
.topnav { position: sticky; top: 0; z-index: 5; display: flex; justify-content: center; flex-wrap: wrap; gap: .2rem 1.4rem; padding: .75rem 1rem; background: rgba(247,244,238,.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.topnav a { color: var(--text); text-decoration: none; }
.topnav a:hover { color: var(--accent); }

/* Idee */
.intro { padding: 4.5rem 1rem 4rem; }
.vision { list-style: none; padding: 0; margin: 0 0 3rem; display: grid; gap: 1rem; }
.vision li { font-family: var(--serif); font-size: clamp(1.1rem, 2.4vw, 1.3rem); padding-left: 1.4rem; border-left: 3px solid var(--accent-2); }
.address { font-weight: 700; margin-bottom: .25rem; }

/* Bildbänder als Kapitelanfang */
.part { padding-bottom: 4rem; }
.band { min-height: clamp(16rem, 55vh, 30rem); background: center/cover no-repeat; display: flex; align-items: flex-end; position: relative; margin-bottom: 3rem; }
.band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(20,16,12,0) 35%, rgba(20,16,12,.75)); }
.band h2 { position: relative; z-index: 1; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1rem 1.5rem; color: #fff; display: flex; flex-direction: column; gap: .3rem; }
.band-title { font-size: clamp(2.2rem, 7vw, 3.5rem); text-shadow: 0 3px 16px rgba(0,0,0,.5); }
.band-sub { font-size: clamp(1rem, 2.4vw, 1.25rem); font-style: italic; font-weight: 400; }

/* Zeitleiste */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 4.1rem; top: .6rem; bottom: .6rem; width: 2px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 3.4rem 1fr; gap: 0 1.6rem; padding: .5rem 0; position: relative; }
.timeline li::before { content: ""; position: absolute; left: calc(4.1rem - 4px); top: 1.05rem; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent-2); }
.timeline li.major::before { background: var(--accent-2); }
.tl-year { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--accent); text-align: right; padding-top: .1rem; }
.tl-body p { margin: 0 0 .4rem; }
.tl-body h3 { font-size: 1.2rem; margin: .1rem 0 .3rem; }
.timeline li.major { padding: 1.1rem 0; }
.tl-img { margin: .8rem 0 .4rem; max-width: 26rem; }
.tl-img img { border-radius: 4px; box-shadow: 0 4px 18px rgba(43,38,32,.15); }
.tl-img-small { max-width: 8rem; }
.tl-img-small img { box-shadow: none; }

/* Sanierung */
.sub { font-size: 1.5rem; margin: 0 0 1.5rem; padding-bottom: .5rem; border-bottom: 2px solid var(--accent-2); display: inline-block; }
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2rem 1.5rem; margin-bottom: 4rem; }
.project-year { margin: 0; font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.pair.single { grid-template-columns: 1fr; }
.pair a { display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 3px; background: var(--bg-2); }
.pair.single a { aspect-ratio: 3 / 2; }
.pair img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.pair a:hover img { transform: scale(1.04); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 1.4rem 1.3rem 1.2rem; display: flex; flex-direction: column; }
.card p { margin: 0 0 .8rem; font-size: .97rem; }
.card ul { margin: 0 0 1rem; padding-left: 1.1rem; font-size: .95rem; color: var(--muted); }
.sum { margin-top: auto !important; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .85rem !important; color: var(--muted); display: flex; flex-direction: column; }
.sum strong { font-family: var(--serif); font-size: 1.5rem; color: var(--accent); }

/* Nutzung */
.use { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; margin-bottom: 2.5rem; }
.use.flip .use-img { order: 2; }
.use-img img { border-radius: 4px; box-shadow: 0 4px 18px rgba(43,38,32,.15); }
.use ul { list-style: none; padding: 0; margin: 0; }
.use li { padding: .25rem 0; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .use { grid-template-columns: 1fr; gap: 1rem; } .use.flip .use-img { order: 0; } }

/* Videos */
.videos { background: var(--dark); color: #e9e3d8; padding: 4rem 0; margin-bottom: 0; }
.videos a { color: #e2b877; }
.video-item { margin: 2.5rem 0 0; }
.video-item figcaption { font-family: var(--serif); font-size: 1.25rem; margin-bottom: .6rem; }
.video-part { font-family: var(--font); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #e2b877; margin-right: .4rem; }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; border-radius: 4px; }
.video > img { width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; width: 100%; background: transparent; border: 0; color: #fff; font: 700 .85rem var(--font); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; text-shadow: 0 2px 8px #000; }
.play-icon { width: 4.25rem; height: 4.25rem; border-radius: 50%; background: var(--accent-2); position: relative; box-shadow: 0 6px 24px rgba(0,0,0,.5); transition: transform .2s; }
.play-icon::after { content: ""; position: absolute; left: 54%; top: 50%; transform: translate(-50%, -50%); border-style: solid; border-width: .75rem 0 .75rem 1.2rem; border-color: transparent transparent transparent #fff; }
.video-play:hover .play-icon { transform: scale(1.08); }
.video-note { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: .5rem .75rem; font-size: .75rem; line-height: 1.4; color: #cfc8bc; background: rgba(0,0,0,.65); }
.video.is-playing .video-note, .video.is-playing .video-play, .video.is-playing > img { display: none; }

/* Kontakt */
#kontakt .band { margin-top: 0; }
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.person { text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 1.5rem 1rem 1rem; }
.person img { width: 8rem; height: auto; margin: 0 auto .75rem; }
.person p { margin: 0; }
.visit { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.visit h3 { font-size: 1.1rem; }
.visit p { margin: 0; color: var(--muted); }

/* Rechtliches */
.legal { background: var(--bg-2); border-top: 1px solid var(--line); padding: 3rem 0 2rem; font-size: .92rem; color: var(--muted); }
.legal details { border-bottom: 1px solid var(--line); }
.legal details:first-child { border-top: 1px solid var(--line); }
.legal summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; }
.legal summary::-webkit-details-marker { display: none; }
.legal summary h2 { margin: 0; font-size: 1.15rem; color: var(--text); }
.legal summary::after { content: ""; width: .6rem; height: .6rem; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .2s; flex: none; margin-right: .3rem; }
.legal details[open] summary::after { transform: rotate(-135deg); }
.legal summary:hover h2 { color: var(--accent); }
.legal details > :last-child { margin-bottom: 1.5rem; }
.legal h3 { font-family: var(--font); font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin: 1.5rem 0 .3rem; color: var(--text); }
.legal p { margin: .3rem 0 .8rem; }
.small { font-size: .8rem; }
.copy { text-align: center; font-size: .78rem; margin: 2.5rem 0 0; padding: 0 1rem; }

/* Lightbox */
[data-lb] { cursor: zoom-in; }
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(0,0,0,.94); color: #fff; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(0,0,0,.94); }
.lightbox img { max-width: 94vw; max-height: 88vh; width: auto; height: auto; }
.lightbox button { position: absolute; background: rgba(0,0,0,.45); border: 0; color: #fff; font-size: 2.4rem; line-height: 1; width: 3.2rem; height: 3.2rem; border-radius: 50%; cursor: pointer; }
.lightbox button:hover { color: var(--accent-2); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; translate: 0 -50%; }
.lb-next { right: 1rem; top: 50%; translate: 0 -50%; }

@media (max-width: 520px) {
  .timeline::before { left: 3.3rem; }
  .timeline li { grid-template-columns: 2.6rem 1fr; gap: 0 1.4rem; }
  .timeline li::before { left: calc(3.3rem - 4px); }
  .tl-year { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-down { animation: none; }
}
