/* ============================================================
   MBL – Müller Bauelemente · Corporate Design Stylesheet
   ------------------------------------------------------------
   Farbwelt   : MBL-Grün #008040 / #00A040 (aus dem Firmenlogo)
                Anthrazit #23282D · Warmweiß #FDFCFA · Sand #F3EFE7
                Holz-Akzent #B98A4F
   Typografie : Systemschriften (DSGVO-freundlich, keine
                externen Font-Server)
   ============================================================ */

:root {
  --green:        #008040;
  --green-dark:   #006634;
  --green-deep:   #004D27;
  --green-tint:   #E5F4EB;
  --anthracite:   #23282D;
  --ink:          #2E343A;
  --ink-soft:     #5A636C;
  --paper:        #FDFCFA;
  --sand:         #F3EFE7;
  --sand-deep:    #E9E3D7;
  --wood:         #B98A4F;
  --white:        #FFFFFF;
  --line:         #E2DED6;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;

  --radius:      16px;
  --radius-sm:   10px;
  --shadow-sm:   0 1px 3px rgba(35, 40, 45, .08);
  --shadow-md:   0 6px 24px rgba(35, 40, 45, .10);
  --shadow-lg:   0 16px 48px rgba(35, 40, 45, .16);

  --header-h:    76px;
  --section-gap: clamp(4rem, 8vw, 6.5rem);
}

/* ---------- Reset & Basis ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.15;
  color: var(--anthracite);
  margin: 0 0 .75em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -.015em; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--green-dark); }

address { font-style: normal; }

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

.container {
  width: min(100% - 2.5rem, 1180px);
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 200;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 252, 250, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
}

.brand-logo {
  height: 46px;
  width: auto;
  max-width: min(62vw, 330px);
  object-fit: contain;
  object-position: left center;
}

/* Footer: logo on a light chip so the green stays readable on anthracite */
.brand-chip {
  display: inline-block;
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
}

.brand-chip .brand-logo { height: 34px; }

/* Navigation */

.site-nav ul {
  display: flex;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: .55rem .85rem;
  border-radius: 999px;
  font-size: .96rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: background .2s, color .2s;
}

.site-nav a:hover { background: var(--green-tint); color: var(--green-dark); }

.site-nav a[aria-current="page"] {
  background: var(--green);
  color: #fff;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: .6rem;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: .55rem 1.1rem;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  color: var(--anthracite);
  cursor: pointer;
}

.nav-toggle-bar {
  position: relative;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .25s, top .25s;
}
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after  { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after  { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(78vh, 720px);
  color: #fff;
  isolation: isolate;
  overflow: hidden;
}

.hero-media,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(200deg, rgba(0, 77, 39, 0) 40%, rgba(0, 77, 39, .55) 100%),
    linear-gradient(90deg, rgba(20, 24, 28, .72) 0%, rgba(20, 24, 28, .35) 55%, rgba(20, 24, 28, .05) 100%);
}

.hero-content {
  padding: clamp(3rem, 8vw, 5.5rem) 0;
  max-width: 640px;
}

.hero .overline { color: #A8D4B6; }

.hero h1 { color: #fff; margin-bottom: .5em; }

.hero-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: rgba(255, 255, 255, .92);
  margin-bottom: 1.8em;
  max-width: 46ch;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }

.hero-badge {
  position: absolute;
  right: clamp(1rem, 4vw, 3.5rem);
  bottom: clamp(1rem, 4vw, 3rem);
  background: rgba(253, 252, 250, .94);
  color: var(--anthracite);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.4rem;
  display: flex;
  align-items: center;
  gap: .9rem;
  max-width: 300px;
}

.hero-badge strong { font-size: 1.5rem; color: var(--green); line-height: 1; }
.hero-badge span  { font-size: .9rem; line-height: 1.35; }

/* ---------- Sektionen ---------- */

.section { padding-block: var(--section-gap); }
.section-alt  { background: var(--sand); }
.section-tight { padding-block: calc(var(--section-gap) * .6); }

.overline {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: .9rem;
}

.section-head { max-width: 720px; margin-bottom: 2.5rem; }
.section-head.centered { margin-inline: auto; text-align: center; }

.lead { font-size: 1.15rem; color: var(--ink-soft); }

/* Zweispaltige Layouts */

.split {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.split-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  object-fit: cover;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}

.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .65);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; border-color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--green-dark);
  border-color: var(--green);
}
.btn-outline:hover { background: var(--green-tint); color: var(--green-deep); }

.btn-light { background: #fff; color: var(--green-deep); }
.btn-light:hover { background: var(--green-tint); color: var(--green-deep); }

.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Kategorie-Karten ---------- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
}

.category-card {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  box-shadow: var(--shadow-md);
  isolation: isolate;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform .6s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(20, 24, 28, 0) 35%, rgba(20, 24, 28, .78) 100%);
  transition: background .3s;
}

.category-card:hover img { transform: scale(1.045); }

.category-card-body { padding: 1.75rem; }

.category-card h3 {
  color: #fff;
  font-size: 1.6rem;
  margin-bottom: .3rem;
}

.category-card p { color: rgba(255, 255, 255, .88); margin-bottom: .9rem; }

.category-card .fake-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 700;
  color: #fff;
  border-bottom: 2px solid var(--wood);
  padding-bottom: .15rem;
}

/* ---------- Konfigurator-Band ---------- */

.configurator {
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green-dark) 55%, var(--green) 100%);
  color: #fff;
}

.configurator .overline { color: #A8D4B6; }
.configurator h2 { color: #fff; }
.configurator p { color: rgba(255, 255, 255, .92); }

.configurator .split-media img { box-shadow: var(--shadow-lg); }

.configurator-note {
  font-size: .9rem;
  color: rgba(255, 255, 255, .9);
  margin-top: 1rem;
}

/* ---------- Dokument-Karten (PDF-Kataloge) ---------- */

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}

.doc-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, transform .25s;
}

.doc-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  color: var(--ink);
}

.doc-cover {
  aspect-ratio: 3 / 4;
  max-height: 300px;
  background: var(--sand);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.doc-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

.doc-cover-placeholder {
  display: grid;
  place-items: center;
  gap: .4rem;
  color: var(--ink-soft);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .06em;
}

.doc-cover-placeholder svg { width: 52px; height: 52px; color: var(--green); }

.doc-card-body {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.1rem 1.25rem 1.25rem;
  flex: 1;
}

.doc-card h3 { font-size: 1.05rem; margin: 0; }

.doc-meta { font-size: .85rem; color: var(--ink-soft); margin-top: auto; }

.doc-cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .5rem;
  font-weight: 700;
  font-size: .95rem;
  color: var(--green);
}

/* ---------- Galerie & Lightbox ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(.9rem, 2vw, 1.4rem);
}

.gallery-item {
  border: 0;
  padding: 0;
  background: none;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: var(--shadow-sm);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .5s ease;
}

.gallery-item:hover img { transform: scale(1.05); }

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 1100px);
}

/* Browsers without <dialog> support must not render it as a plain block */
.lightbox:not([open]) { display: none; }

.lightbox::backdrop { background: rgba(20, 24, 28, .88); }

.lightbox img {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-close {
  position: absolute;
  top: .6rem;
  right: .6rem;
  border: 0;
  border-radius: 999px;
  width: 42px;
  height: 42px;
  font-size: 1.3rem;
  line-height: 1;
  background: rgba(253, 252, 250, .92);
  color: var(--anthracite);
  cursor: pointer;
}

.lightbox-caption {
  color: #fff;
  text-align: center;
  padding: .6rem 0 0;
  font-size: .95rem;
}

/* ---------- Dunkles Teaser-Band (Ausstellung) ---------- */

.teaser-dark {
  background: var(--anthracite);
  color: #fff;
}

.teaser-dark .overline { color: var(--wood); }
.teaser-dark h2 { color: #fff; }
.teaser-dark p { color: rgba(255, 255, 255, .85); }

/* ---------- Info-Karten / Kontakt ---------- */

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.info-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.info-card h3,
.info-card .card-heading {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.1rem;
  margin-bottom: .75rem;
}

.info-card h3 svg,
.info-card .card-heading svg { width: 22px; height: 22px; color: var(--green); flex: none; }

.info-card p, .info-card address, .info-card ul { color: var(--ink-soft); }

.info-card ul { margin: 0; padding: 0; list-style: none; }
.info-card li { margin-bottom: .5rem; }

.hours-table { width: 100%; border-collapse: collapse; }
.hours-table th, .hours-table td {
  text-align: left;
  padding: .5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .97rem;
  vertical-align: top;
}
.hours-table tr:last-child th, .hours-table tr:last-child td { border-bottom: 0; }
.hours-table th { font-weight: 700; color: var(--anthracite); padding-right: 1rem; white-space: nowrap; }

/* ---------- Kundenstimmen ---------- */

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.review-card {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.review-stars {
  color: var(--wood);
  font-size: 1.15rem;
  letter-spacing: .12em;
  margin: 0;
}

.review-card blockquote {
  margin: 0;
  font-size: 1.02rem;
  color: var(--ink);
}

.review-card figcaption {
  margin-top: auto;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.review-invite { text-align: center; margin-top: 2rem; }

.review-empty {
  max-width: 620px;
  margin-inline: auto;
  text-align: center;
}

/* ---------- Marken-Leiste ---------- */

.brand-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 2.5rem;
  align-items: center;
  justify-content: center;
}

.brand-strip span {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--anthracite);
  color: rgba(255, 255, 255, .82);
  margin-top: var(--section-gap);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr .8fr;
  gap: 2.5rem;
  padding-block: 3.5rem 2.5rem;
}

.footer-brand p { margin-top: 1.1rem; font-size: .97rem; }

.footer-heading {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--wood);
  margin-bottom: 1rem;
}

.site-footer a { color: #fff; }
.site-footer a:hover { color: #A8D4B6; }

.footer-hours, .footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-hours li { margin-bottom: .8rem; font-size: .97rem; }
.footer-nav li { margin-bottom: .2rem; }
.footer-nav a {
  display: inline-block;
  padding-block: .3rem;
  text-decoration: none;
  font-weight: 600;
  font-size: .97rem;
}
.footer-contact a { text-decoration: none; display: inline-block; padding-block: .15rem; }
.footer-legal a { display: inline-block; padding-block: .3rem; }

.footer-legal { border-top: 1px solid rgba(255, 255, 255, .14); }

.footer-legal-inner {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.1rem;
  font-size: .9rem;
}

.footer-legal p { margin: 0; }

.footer-legal ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-legal a { text-decoration: none; font-weight: 600; }

/* ---------- Einblend-Animationen ----------
   Gated on the .js class (set inline in <head>) so content is never
   invisible when JavaScript is unavailable. */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}

.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .category-card img, .gallery-item img, .btn .arrow,
  .doc-card, .btn { transition: none; }
  .doc-card:hover { transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Burger navigation: the six pills need ~1010px next to the brand,
   so the menu collapses well before they would wrap. */
@media (max-width: 1020px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

  .site-nav.is-open { display: block; }

  .site-nav ul {
    flex-direction: column;
    gap: .25rem;
    padding: 1rem 1.25rem 1.4rem;
  }

  .site-nav a { border-radius: var(--radius-sm); padding: .8rem 1rem; }
}

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split-media { order: -1; }

  .category-grid { grid-template-columns: 1fr; }
  .category-card { min-height: 320px; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  .hero-badge {
    position: static;
    margin: 0 1.25rem 2rem;
    justify-self: start;
  }
  .hero { align-items: end; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .gallery-grid { grid-template-columns: 1fr; }
  .hero { min-height: 88vh; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .brand-logo { height: 38px; }
}
