/* =========================================================
   MPR Renovierungs GmbH – Stylesheet
   Farben & Abstände zentral hier oben anpassen.
   ========================================================= */

@font-face {
  font-family: "Inter";
  src: url("/schriften/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Oswald";
  src: url("/schriften/oswald.woff2") format("woff2");
  font-weight: 200 700;
  font-display: swap;
}

:root {
  --rot: #e30613;
  --rot-dunkel: #b8050f;
  --tinte: #141414;
  --text: #2b2b2b;
  --grau: #6a6a6a;
  --linie: #e3e1dc;
  --hell: #f5f4f0;
  --weiss: #ffffff;

  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-titel: "Oswald", "Arial Narrow", sans-serif;

  --breite: 1240px;
  --rand: clamp(1rem, 4vw, 2.5rem);
  --radius: 4px;
  --abstand: clamp(4rem, 9vw, 7.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font-text);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  color: var(--text);
  background: var(--weiss);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 {
  font-family: var(--font-titel);
  font-weight: 500;
  line-height: 1.08;
  color: var(--tinte);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
  hyphens: auto;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(2.2rem, 1.4rem + 4.2vw, 5rem); }
h2 { font-size: clamp(2rem, 1.5rem + 2.2vw, 3.25rem); }
h3 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.55rem); }

.container { width: 100%; max-width: var(--breite); margin-inline: auto; padding-inline: var(--rand); }
.narrow { max-width: 820px; }
.center { text-align: center; }
.section { padding-block: var(--abstand); }
.section-tight { padding-bottom: var(--abstand); }
.sr-only, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -999px; top: 0; background: var(--tinte); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 2px solid var(--rot); outline-offset: 3px; }

.eyebrow {
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rot); margin-bottom: .9rem;
  display: flex; align-items: center; gap: .7rem;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; background: currentColor; flex: none; }
.center .eyebrow { justify-content: center; }
.lead { font-size: clamp(1.1rem, 1rem + .45vw, 1.35rem); line-height: 1.55; color: var(--grau); max-width: 42em; }
.lead p:last-child { margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .95rem 1.6rem; border: 2px solid transparent; border-radius: var(--radius);
  font: 600 .95rem/1 var(--font-text); letter-spacing: .02em; text-decoration: none;
  cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--rot); color: #fff; }
.btn-primary:hover { background: var(--rot-dunkel); }
.btn-light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.6); backdrop-filter: blur(6px); }
.btn-light:hover { background: #fff; color: var(--tinte); }
.btn-ghost { border-color: currentColor; color: var(--tinte); }
.btn-ghost:hover { background: var(--tinte); color: #fff; border-color: var(--tinte); }
.btn-sm { padding: .65rem 1rem; font-size: .88rem; }

.arrow { display: inline-block; transition: transform .25s; }
a:hover .arrow { transform: translateX(4px); }
.link-arrow { font-weight: 600; text-decoration: none; color: var(--tinte); border-bottom: 2px solid var(--rot); padding-bottom: 2px; }

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--linie);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 76px; }
.logo img { height: 42px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 2rem; }
.main-nav ul { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.main-nav ul a {
  font-weight: 500; font-size: .95rem; text-decoration: none; color: var(--tinte);
  padding-block: .4rem; background: linear-gradient(var(--rot), var(--rot)) left bottom / 0 2px no-repeat;
  transition: background-size .25s;
}
.main-nav ul a:hover, .main-nav ul a[aria-current="page"] { background-size: 100% 2px; }
.menu-toggle { display: none; }

@media (max-width: 860px) {
  .header-inner { height: 64px; }
  .logo img { height: 34px; }
  .menu-toggle {
    display: grid; place-items: center; width: 44px; height: 44px; margin-right: -8px;
    background: none; border: 0; cursor: pointer; color: var(--tinte);
  }
  .bars, .bars::before, .bars::after {
    display: block; width: 24px; height: 2px; background: currentColor; transition: transform .25s, opacity .25s;
  }
  .bars { position: relative; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -7px; } .bars::after { top: 7px; }
  .menu-toggle[aria-expanded="true"] .bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }

  .main-nav {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch; gap: 1.5rem;
    background: #fff; padding: 1.5rem var(--rand) 2rem; border-bottom: 1px solid var(--linie);
    box-shadow: 0 20px 40px rgba(0,0,0,.08);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .25s;
  }
  .main-nav.open { transform: none; opacity: 1; visibility: visible; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav ul a { display: block; font-family: var(--font-titel); text-transform: uppercase; font-size: 1.6rem; padding: .55rem 0; background: none; border-bottom: 1px solid var(--linie); }
  .main-nav ul a[aria-current="page"] { color: var(--rot); }
  .nav-call { padding: 1rem; font-size: 1rem; }
}

/* ---------- Startseite: Hero ---------- */
.hero { position: relative; min-height: min(88vh, 860px); display: grid; align-items: end; color: #fff; overflow: hidden; background: var(--tinte); }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,.1) 20%, rgba(10,10,10,.72) 100%),
              linear-gradient(90deg, rgba(10,10,10,.45), transparent 70%);
}
.hero-text { position: relative; z-index: 1; padding-block: clamp(3rem, 10vw, 7rem); }
.hero h1 { color: #fff; max-width: 13ch; }
.hero .lead { color: rgba(255,255,255,.88); max-width: 34em; }
.hero .eyebrow { color: #fff; }
.hero .eyebrow::before { background: var(--rot); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

/* ---------- Über uns ---------- */
.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.about-img { margin: 0; position: relative; }
.about-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.about-img::before {
  content: ""; position: absolute; inset: auto auto -18px -18px; width: 45%; height: 45%;
  border-left: 6px solid var(--rot); border-bottom: 6px solid var(--rot); z-index: -1;
}
.usp { list-style: none; padding: 0; margin: 2.2rem 0 0; display: grid; gap: 0; border-top: 1px solid var(--linie); }
.usp li { padding: 1rem 0; border-bottom: 1px solid var(--linie); color: var(--grau); font-size: .95rem; }
.usp strong { display: block; color: var(--tinte); font-size: 1rem; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } .about-img { order: -1; } .about-img img { aspect-ratio: 4 / 3; } }

/* ---------- Leistungen ---------- */
.services { background: var(--hell); }
.section-head { margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-head.split { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.service-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 1px; background: var(--linie); border: 1px solid var(--linie);
}
.service-grid li { background: var(--hell); transition: background .25s; }
.service-grid li > a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.service-grid li > a, .service-grid li:not(:has(a)) { padding: clamp(1.6rem, 3vw, 2.4rem); }
.service-grid li:has(a):hover { background: #fff; }
.service-grid li:has(a):hover h3 { color: var(--rot); }
.service-grid h3 { transition: color .2s; }
.service-grid .more { margin-top: 1.4rem; }
.service-grid .num { font-family: var(--font-titel); color: var(--rot); font-size: 1rem; letter-spacing: .1em; display: block; margin-bottom: 1.4rem; }
.service-grid p { color: var(--grau); margin: 0; font-size: .96rem; }

/* ---------- Projektkacheln ---------- */
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.card-img { overflow: hidden; border-radius: var(--radius); background: var(--hell); }
.card-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card a:hover .card-img img { transform: scale(1.05); }
.card-body { padding-top: 1.2rem; display: flex; flex-direction: column; flex: 1; }
.card .eyebrow { font-size: .72rem; margin-bottom: .6rem; }
.card h3 { margin-bottom: .4rem; transition: color .2s; }
.card a:hover h3 { color: var(--rot); }
.card-body p:not(.eyebrow) { color: var(--grau); font-size: .95rem; margin-bottom: 1rem; }
.more { margin-top: auto; font-weight: 600; font-size: .9rem; color: var(--tinte); }
.card[hidden] { display: none; }

/* ---------- Filter ---------- */
.filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.filter button {
  font: 500 .88rem/1 var(--font-text); padding: .65rem 1rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--linie); background: #fff; color: var(--tinte); transition: all .2s;
}
.filter button:hover { border-color: var(--tinte); }
.filter button[aria-pressed="true"] { background: var(--tinte); border-color: var(--tinte); color: #fff; }

/* ---------- Unterseiten-Kopf ---------- */
.page-head { padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 3.5rem); }
.page-head h1 { margin-bottom: .35em; }
.center .lead { margin-inline: auto; }

/* ---------- Projektseite ---------- */
.project-hero { position: relative; min-height: min(78vh, 760px); display: grid; align-items: end; color: #fff; background: var(--tinte); overflow: hidden; }
.project-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.75)); }
.project-hero-text { position: relative; z-index: 1; padding-block: clamp(2.5rem, 7vw, 5rem); }
.project-hero h1 { color: #fff; max-width: 18ch; }
.project-hero p { font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); max-width: 38em; color: rgba(255,255,255,.88); margin: 0; }
.back { display: inline-block; margin-bottom: 1.2rem; color: #fff; text-decoration: none; font-weight: 500; font-size: .92rem; opacity: .85; }
.back:hover { opacity: 1; }

.project-intro { display: grid; grid-template-columns: 260px 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.facts { margin: 0; display: grid; gap: 0; border-top: 3px solid var(--rot); position: sticky; top: 110px; }
.facts div { padding: 1rem 0; border-bottom: 1px solid var(--linie); }
.facts dt { font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--grau); }
.facts dd { margin: .2rem 0 0; font-weight: 500; color: var(--tinte); }
@media (max-width: 860px) {
  .project-intro { grid-template-columns: 1fr; }
  .facts { position: static; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
}

.prose { max-width: 44em; }
.prose h2 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.3rem); margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose p, .prose li { font-size: 1.08em; }
.prose ul { padding-left: 1.2em; }
.prose a { color: var(--rot); }
.legal h2 { font-size: 1.5rem; }
.legal p, .legal li { font-size: 1em; }

.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(.6rem, 1.2vw, 1rem);
}
.gallery a { display: block; overflow: hidden; border-radius: var(--radius); cursor: zoom-in; background: var(--hell); }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .5s, opacity .3s; }
.gallery a:hover img { transform: scale(1.04); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; border-top: 1px solid var(--linie); padding-block: 2rem var(--abstand); }
.pager a { text-decoration: none; font-family: var(--font-titel); text-transform: uppercase; font-size: clamp(1.1rem, 1rem + .6vw, 1.5rem); color: var(--tinte); line-height: 1.2; }
.pager a:hover { color: var(--rot); }
.pager small { display: block; font-family: var(--font-text); text-transform: none; font-size: .85rem; color: var(--grau); margin-bottom: .4rem; }
.pager .next { text-align: right; }

/* ---------- Call to Action ---------- */
.cta { background: var(--tinte); color: #fff; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 6px; background: var(--rot); }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; padding-block: clamp(3rem, 7vw, 5rem); }
.cta h2 { color: #fff; margin-bottom: .25em; }
.cta p { color: rgba(255,255,255,.72); margin: 0; }
.cta-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.cta .btn-ghost { color: #fff; }
.cta .btn-ghost:hover { background: #fff; color: var(--tinte); border-color: #fff; }

/* ---------- Kontakt ---------- */
.contact { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contact-info { display: grid; gap: 0; border-top: 3px solid var(--rot); }
.contact-item { display: block; padding: 1.1rem 0; border-bottom: 1px solid var(--linie); text-decoration: none; color: var(--tinte); font-weight: 500; font-size: 1.08rem; margin: 0; transition: color .2s; }
a.contact-item:hover { color: var(--rot); }
.contact-item small { display: block; font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--grau); margin-bottom: .2rem; }
.contact-form { background: var(--hell); padding: clamp(1.5rem, 4vw, 2.75rem); border-radius: var(--radius); display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field label { font-size: .88rem; font-weight: 600; color: var(--tinte); }
.field input, .field textarea {
  font: inherit; width: 100%; padding: .85rem 1rem; border: 1px solid #cfccc5; border-radius: var(--radius);
  background: #fff; color: var(--tinte); transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--tinte); box-shadow: 0 0 0 3px rgba(227,6,19,.15); }
.field textarea { resize: vertical; min-height: 9rem; }
.check { display: flex; gap: .7rem; align-items: start; font-size: .88rem; color: var(--grau); }
.check input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; accent-color: var(--rot); flex: none; }
.check a { color: var(--tinte); }
.contact-form .btn { justify-self: start; }
.form-error { display: none; padding: 1rem 1.2rem; background: #fff; border-left: 4px solid var(--rot); font-size: .95rem; }
.form-error:target { display: block; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

/* ---------- Fußzeile ---------- */
.site-footer { background: #0c0c0c; color: rgba(255,255,255,.7); font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr .8fr; gap: 2rem; padding-block: 4rem 3rem; }
.footer-logo { height: 38px; width: auto; filter: invert(1) hue-rotate(180deg) brightness(1.2); }
.site-footer address { font-style: normal; }
.site-footer strong { color: #fff; font-weight: 600; }
.site-footer a { text-decoration: none; color: rgba(255,255,255,.7); line-height: 2; }
.site-footer a:hover { color: #fff; }
.site-footer p { margin: 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-block: 1.4rem; color: rgba(255,255,255,.45); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #0a0a0a; color: #fff; overflow: hidden;
}
.lightbox::backdrop { background: rgba(0,0,0,.6); }
.lightbox[open] { display: grid; place-items: center; animation: fade .25s; }
.lightbox figure { margin: 0; width: 100%; height: 100%; display: grid; place-items: center; padding: clamp(3.5rem, 6vw, 5rem) clamp(0rem, 6vw, 6rem); }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,.08); color: #fff; border: 0; cursor: pointer;
  width: 52px; height: 52px; border-radius: 50%; font-size: 2rem; line-height: 1; display: grid; place-items: center; transition: background .2s;
}
.lightbox button:hover { background: var(--rot); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; translate: 0 -50%; }
.lb-next { right: 1rem; top: 50%; translate: 0 -50%; }
.lb-count { position: absolute; top: 1.5rem; left: 1.5rem; margin: 0; font-size: .9rem; color: rgba(255,255,255,.7); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .lb-prev, .lb-next { top: auto; bottom: 1rem; translate: none; } }
@keyframes fade { from { opacity: 0; } }

/* ---------- dezente Einblend-Animation beim Scrollen ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .card, .service-grid li, .gallery li, .about-img, .usp li {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
  }
}
@keyframes reveal { from { opacity: 0; transform: translateY(24px); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

@media print {
  .site-header, .cta, .lightbox, .site-footer nav { display: none; }
  .hero, .project-hero { min-height: 0; color: var(--tinte); }
}
