/* Lippen Mühle – Stylesheet
   Farben: Bruchstein, Schiefer, Altenau-Wasser, Weizen. */

@font-face { font-family: "Poppins"; src: url("../fonts/poppins-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-medium.woff") format("woff"); font-weight: 500 700; font-style: normal; font-display: swap; }

:root {
  --paper: #f4f4f1;
  --stone: #e3dfd6;
  --stone-dark: #c9c2b4;
  --ink: #1d2427;
  --slate: #4b575b;
  --water: #2b5a57;
  --water-dark: #1f4341;
  --wheat: #b98a2c;
  --white: #ffffff;

  --font: "Poppins", "Segoe UI", system-ui, sans-serif;
  --body-size: 1.0625rem;
  --leading: 1.68;
  --head-weight: 500;
  --head-tracking: -0.015em;

  --wrap: 80rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 38rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--body-size);
  line-height: var(--leading);
  font-weight: 400;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--water); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--water-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--wheat); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-weight: var(--head-weight); letter-spacing: var(--head-tracking); line-height: 1.15; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 6.5vw, 3.4rem); overflow-wrap: break-word; hyphens: auto; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1.1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--white); padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kopf ---------- */
.site-head { background: var(--paper); border-bottom: 1px solid var(--stone-dark); position: relative; z-index: 20; }
.site-head .wrap { display: flex; align-items: center; gap: 1.5rem; padding-top: .75rem; }
/* Logo rechts, steht bündig auf der unteren Linie des Kopfbereichs */
.brand { display: block; margin-left: auto; align-self: flex-end; line-height: 0; flex-shrink: 0; }
.brand img { height: 88px; width: auto; }
.nav { margin-left: -.8rem; }
.nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: .5rem .8rem; color: var(--ink); text-decoration: none; border-radius: 3px; font-size: .98rem; }
.nav a:hover { background: var(--stone); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--water); border-radius: 0; }

.menu-toggle { display: none; }

@media (max-width: 54rem) {
  .site-head .wrap { flex-wrap: wrap; gap: 0 .75rem; padding-top: .5rem; }
  .brand img { height: 60px; }
  .nav { margin-left: 0; }
  .menu-toggle {
    display: inline-flex; align-items: center; gap: .5rem; font: inherit; font-size: .95rem;
    background: transparent; border: 1px solid var(--stone-dark); border-radius: 3px; padding: .45rem .75rem; color: var(--ink); cursor: pointer;
  }
  .menu-toggle .bars { width: 1.1rem; height: 2px; background: currentColor; position: relative; }
  .menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; }
  .menu-toggle .bars::before { top: -6px; } .menu-toggle .bars::after { top: 6px; }
  .nav { flex-basis: 100%; display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding-bottom: .5rem; }
  .nav a { padding: .7rem .25rem; border-bottom: 1px solid var(--stone); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--water); padding-left: .75rem; }
  .menu-toggle { order: 1; }
  .brand { order: 2; }
  .nav { order: 3; }
}
@media (max-width: 30rem) {
  .brand img { height: 52px; }
}

/* ---------- Startseite: Hero ---------- */
.hero { background: var(--stone); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding-top: clamp(2rem, 5vw, 4rem); padding-bottom: clamp(2rem, 5vw, 4rem); }
.hero h1 { font-size: clamp(2.8rem, 5.6vw, 4.8rem); line-height: .95; letter-spacing: -.035em; margin-bottom: .35em; }
.hero-media { width: 100%; max-width: 961px; justify-self: end; }
.hero .tagline { font-size: clamp(1.15rem, 2vw, 1.4rem); color: var(--slate); margin-bottom: 1.4rem; }
.hero .intro { max-width: 32rem; }
.slides { position: relative; aspect-ratio: 961 / 434; background: var(--stone-dark); overflow: hidden; }
.slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.slides img.active { opacity: 1; }
.slide-dots { display: flex; gap: .4rem; margin-top: .75rem; }
.slide-dots button { width: 2rem; height: 1.5rem; padding: 0; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; }
.slide-dots button::before { content: ""; display: block; width: 100%; height: 3px; background: var(--stone-dark); }
.slide-dots button[aria-current="true"]::before { background: var(--ink); }
@media (max-width: 54rem) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
}

/* ---------- Abschnitte ---------- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section + .section { padding-top: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; }

.teasers { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 2rem); }
.teaser { text-decoration: none; color: var(--ink); display: block; }
.teaser img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; margin-bottom: .9rem; }
.teaser h3 { margin: 0 0 .25rem; font-size: 1.35rem; }
.teaser p { color: var(--slate); margin: 0; font-size: .97rem; }
.teaser:hover { color: var(--ink); }
.teaser:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; text-decoration-color: var(--water); }
@media (max-width: 46rem) { .teasers { grid-template-columns: 1fr; } }

.links-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; list-style: none; margin: 0; padding: 0; }
.links-row a { display: flex; gap: .9rem; align-items: center; text-decoration: none; color: var(--ink); padding: .6rem; margin: -.6rem; border-radius: 4px; }
.links-row a:hover { background: var(--stone); color: var(--ink); }
.links-row img { width: 4.5rem; height: 4.5rem; object-fit: cover; border-radius: 50%; flex-shrink: 0; }
.links-row strong { display: block; font-weight: 500; }
.links-row span { display: block; color: var(--slate); font-size: .9rem; line-height: 1.4; }
@media (max-width: 60rem) { .links-row { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; } }
@media (max-width: 30rem) { .links-row { grid-template-columns: 1fr; } }

.video-band { background: var(--ink); color: var(--paper); }
.video-band .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: center; padding-top: 0; padding-bottom: 0; }
.video-band img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.video-band .text { padding: 2rem 0; }
.video-band h2 { color: var(--white); }
.video-band p { color: #c9cfd0; }
.button {
  display: inline-block; background: var(--water); color: var(--white); text-decoration: none; padding: .75rem 1.2rem;
  border-radius: 3px; font-weight: 500; line-height: 1.3;
}
.button:hover { background: var(--water-dark); color: var(--white); text-decoration: none; }
.video-band .button { background: var(--paper); color: var(--ink); }
.video-band .button:hover { background: var(--white); color: var(--ink); }
.button small { display: block; font-weight: 400; font-size: .8rem; opacity: .8; }
@media (max-width: 46rem) { .video-band .wrap { grid-template-columns: 1fr; padding: 0; } .video-band .text { padding: 1.5rem var(--gutter) 2rem; } }

/* ---------- Inhaltsseiten ---------- */
.page-head { background: var(--stone); padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1.5rem, 4vw, 2.5rem); }
.page-head h1 { margin: 0; }
.page-head .lead { font-size: 1.15rem; color: var(--slate); max-width: var(--measure); margin: .75rem 0 0; }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.6rem; margin-bottom: .4rem; }
.prose ul { padding-left: 1.2rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: .2em; }
.legal { font-size: .97rem; }
.legal h2 { font-size: 1.35rem; }
.legal h3 { font-size: 1.05rem; }
.legal a { overflow-wrap: anywhere; }

.split { display: grid; grid-template-columns: minmax(0, var(--measure)) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.split figure { margin: 0; }
.split figcaption { font-size: .85rem; color: var(--slate); margin-top: .5rem; }
.split .stack { display: grid; gap: 1rem; }
@media (max-width: 54rem) { .split { grid-template-columns: 1fr; } }

.facts { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.25rem; margin: 1.5rem 0 2rem; padding: 1.1rem 0; border-top: 1px solid var(--stone-dark); border-bottom: 1px solid var(--stone-dark); }
.facts dt { color: var(--slate); }
.facts dd { margin: 0; }

/* Zeitleiste (Historie) */
.timeline { list-style: none; margin: 2rem 0 0; padding: 0; position: relative; max-width: 46rem; }
.timeline::before { content: ""; position: absolute; left: 7.5rem; top: .5rem; bottom: .5rem; width: 3px; background: var(--water); opacity: .35; }
.timeline li { display: grid; grid-template-columns: 6rem 1fr; gap: 3rem; position: relative; padding-bottom: 2rem; }
.timeline li::before { content: ""; position: absolute; left: calc(7.5rem - 5px); top: .55rem; width: 13px; height: 13px; border-radius: 50%; background: var(--paper); border: 3px solid var(--water); }
.timeline .year { font-weight: 500; font-size: 1.25rem; line-height: 1.3; text-align: right; color: var(--water-dark); font-variant-numeric: lining-nums tabular-nums; }
.timeline p { margin: 0; }
@media (max-width: 34rem) {
  .timeline::before { left: 5px; }
  .timeline li { grid-template-columns: 1fr; gap: .2rem; padding-left: 2rem; }
  .timeline li::before { left: 0; }
  .timeline .year { text-align: left; }
}

.hist-layout { display: grid; grid-template-columns: minmax(0, 46rem) minmax(0, 15rem); gap: clamp(2rem, 5vw, 4rem); justify-content: space-between; }
.hist-layout .timeline { margin-top: 0; }
.hist-layout aside { position: sticky; top: 1.5rem; align-self: start; }
.hist-layout aside figcaption { font-size: .85rem; color: var(--slate); margin-top: .5rem; }
@media (max-width: 54rem) { .hist-layout { grid-template-columns: 1fr; } .hist-layout aside { display: none; } }
main:has(> .video-band:last-child) + .site-foot { margin-top: 0; }

/* Firmen */
.firmen { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0 2.5rem; margin-top: 1rem; }
.firma { padding: 1.25rem 0; border-top: 1px solid var(--stone-dark); }
.firma h2 { font-size: 1.2rem; margin-bottom: .5rem; }
.firma dl { display: grid; grid-template-columns: 4.5rem 1fr; gap: .15rem .5rem; margin: 0; font-size: .97rem; }
.firma dt { color: var(--slate); }
.firma dd { margin: 0; overflow-wrap: anywhere; }

/* Galerie */
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 2rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.albums a { text-decoration: none; color: var(--ink); display: block; }
.albums img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; margin-bottom: .6rem; background: var(--stone); }
.albums strong { font-weight: 500; font-size: 1.1rem; display: block; }
.albums span { color: var(--slate); font-size: .9rem; }
.albums a:hover strong { text-decoration: underline; text-decoration-color: var(--water); text-decoration-thickness: 2px; text-underline-offset: .2em; }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .5rem; list-style: none; margin: 0; padding: 0; }
.thumbs a { display: block; background: var(--stone); }
.thumbs img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: opacity .2s; }
.thumbs a:hover img { opacity: .85; }
@media (max-width: 30rem) { .thumbs { grid-template-columns: repeat(2, 1fr); gap: .35rem; } }
.album-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--stone-dark); font-size: .95rem; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: #121718; z-index: 100; display: none; color: var(--paper); }
.lightbox.open { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox .lb-top { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; font-size: .95rem; }
.lightbox .lb-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 3.5rem; touch-action: pan-y; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; width: auto; height: auto; }
.lightbox button { font: inherit; color: var(--paper); background: rgba(255, 255, 255, .08); border: 0; border-radius: 3px; cursor: pointer; padding: .55rem .85rem; }
.lightbox button:hover { background: rgba(255, 255, 255, .18); }
.lightbox .lb-prev, .lightbox .lb-next { position: absolute; top: 50%; transform: translateY(-50%); font-size: 1.6rem; line-height: 1; padding: .9rem .7rem; }
.lightbox .lb-prev { left: .5rem; } .lightbox .lb-next { right: .5rem; }
.lightbox .lb-bottom { height: 1rem; }
@media (max-width: 40rem) { .lightbox .lb-stage { padding: 0; } .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: -3.25rem; transform: none; } .lightbox .lb-bottom { height: 4rem; } }

/* Fehlerseite (404) */
.oops { background: var(--ink); color: var(--paper); }
.oops .wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.oops h1 { color: var(--white); font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1; margin-bottom: .3em; }
.oops .sub { font-size: clamp(1.2rem, 2.2vw, 1.5rem); color: #e7d3a6; font-style: italic; margin-bottom: 1.4rem; }
.oops p { color: #c9cfd0; max-width: 34rem; }
.oops .code { display: inline-block; font-size: .85rem; color: #9aa4a6; border: 1px solid #3a4447; border-radius: 999px; padding: .15rem .7rem; margin-bottom: 1.25rem; }
.oops img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.oops .button { background: var(--paper); color: var(--ink); margin-top: .5rem; }
.oops .button:hover { background: var(--white); color: var(--ink); }
@media (max-width: 54rem) { .oops .wrap { grid-template-columns: 1fr; } .oops figure { order: -1; } }
.oops figure { margin: 0; }

/* Fuß */
.site-foot { background: var(--ink); color: #c9cfd0; margin-top: clamp(3rem, 7vw, 5rem); font-size: .95rem; }
.site-foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.site-foot a { color: var(--paper); }
.site-foot strong { color: var(--white); font-weight: 500; display: block; margin-bottom: .4rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: .3rem; }
.site-foot p { margin: 0 0 .5rem; }
.site-foot .copy { grid-column: 1 / -1; border-top: 1px solid #3a4447; padding-top: 1.25rem; font-size: .85rem; color: #9aa4a6; }
@media (max-width: 46rem) { .site-foot .wrap { grid-template-columns: 1fr; gap: 1.5rem; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slides img { transition: none; }
}
@media print {
  .site-head nav, .menu-toggle, .video-band, .site-foot { display: none; }
}
.teasers.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 60rem) { .teasers.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 30rem) { .teasers.four { gap: 1.25rem .75rem; } .teasers.four h3 { font-size: 1.1rem; } .teasers.four p { font-size: .85rem; } }
