/* A. Fischer Bedachungen – moderne Version
   Layout: schlichte, linksbündige Bänder; ein markantes Element (breite Hero-Überschrift über einem
   giebelförmig zugeschnittenen Dachpanorama), alles andere ruhig. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-variable.woff2") format("woff2-variations"), url("../fonts/archivo-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Farben */
  --slate: #1e2831;        /* Schiefer: Text, dunkle Bänder */
  --slate-soft: #2d3a45;
  --zinc: #eef1f3;         /* Zink: helle Bänder */
  --rule: #cdd5db;         /* Linien */
  --muted: #56636e;        /* Nebentext */
  --red: #d42a30;          /* Logo-Rot: einzige Signalfarbe */
  --red-dark: #b11f25;
  --blue: #0a62a3;         /* Logo-Blau: Links */
  --white: #ffffff;

  /* Schrift */
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(2rem, 3.6vw, 2.75rem);
  --step-hero: clamp(2.6rem, 7.4vw, 6.4rem);

  /* Raster */
  --wrap: 1180px;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --space: clamp(3.5rem, 8vw, 6.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--slate);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.narrow { max-width: calc(760px + 2 * var(--gutter)); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--white); padding: 0.5rem 1rem; }

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; gap: 2rem; min-height: 76px; }
.brand img { width: 190px; height: auto; }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 2rem; }
.main-nav ul { display: flex; gap: 1.6rem; }
.main-nav ul a {
  color: var(--slate);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}
.main-nav ul a:hover { color: var(--slate); border-bottom-color: var(--red); }
.call {
  font-weight: 700;
  font-stretch: 90%;
  color: var(--white);
  background: var(--red);
  text-decoration: none;
  padding: 0.6rem 1rem;
  border-radius: 3px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.call:hover { background: var(--red-dark); color: var(--white); }
.nav-toggle { display: none; }

@media (max-width: 960px) {
  .header-inner { min-height: 64px; }
  .brand img { width: 160px; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 0.6rem; margin-left: auto;
    background: none; border: 1px solid var(--rule); border-radius: 3px;
    padding: 0.5rem 0.8rem; font: inherit; font-weight: 600; color: var(--slate); cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: "";
  }
  .nav-toggle-bars::before { position: absolute; top: -6px; }
  .nav-toggle-bars::after { position: absolute; top: 6px; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 1rem;
    background: var(--white); border-bottom: 1px solid var(--rule);
    padding: 1rem max(20px, env(safe-area-inset-right, 0px)) 1.5rem max(20px, env(safe-area-inset-left, 0px));
  }
  .main-nav.open { display: flex; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav ul a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--zinc); }
  .call { text-align: center; padding: 0.9rem 1rem; }
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(2.5rem, 6vw, 5rem); background: var(--white); }
.hero-company { margin: 0 0 1.2rem; color: var(--muted); font-weight: 500; }
.hero h1 {
  font-size: var(--step-hero);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.02em;
  line-height: 0.98;
}
.hero-lead { font-size: var(--step-1); max-width: 40rem; margin: 1.6rem 0 0; color: var(--slate-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 1rem;
  padding: 0.9rem 1.3rem; border-radius: 3px; border: 2px solid transparent; cursor: pointer; font-family: inherit;
}
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); color: var(--white); }
.btn-line { border-color: var(--slate); color: var(--slate); }
.btn-line:hover { background: var(--slate); color: var(--white); }

/* Das Dachpanorama, oben als flacher Giebel zugeschnitten */
.hero-roof { margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.hero-roof img {
  width: 100%;
  height: clamp(200px, 30vw, 420px);
  object-fit: cover;
  object-position: 50% 60%;
  clip-path: polygon(0 22%, 50% 0, 100% 22%, 100% 100%, 0 100%);
}
.values {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.8rem;
  padding-block: 1.3rem; font-weight: 600; font-stretch: 112%; color: var(--slate);
}
.values li { position: relative; padding-left: 1rem; }
.values li::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px;
  background: var(--red); transform: translateY(-50%) rotate(45deg);
}

/* ---------- Abschnitte ---------- */
.section { padding-block: var(--space); }
.section-tight { padding-block: 3rem; }
.section-zinc { background: var(--zinc); }
.section-slate { background: var(--slate); color: var(--white); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1rem 3rem; align-items: end; margin-bottom: 3rem; }
.section-head h2, .contact h2 { font-size: var(--step-3); font-weight: 800; font-stretch: 118%; letter-spacing: -0.01em; }
.section-head p { margin: 0; color: var(--muted); max-width: 38rem; }
.section-slate .section-head { margin-bottom: 2.5rem; }
@media (max-width: 760px) { .section-head { grid-template-columns: minmax(0, 1fr); margin-bottom: 2rem; } }

/* Leistungen */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem 2.5rem; }
.service { border-top: 2px solid var(--slate); padding-top: 1.4rem; min-width: 0; }
.pict { width: 44px; height: 44px; fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.service h3 { font-size: var(--step-1); font-weight: 700; font-stretch: 108%; margin: 1rem 0 0.7rem; }
.service li { padding: 0.32rem 0; border-bottom: 1px solid var(--zinc); color: var(--slate-soft); }
@media (max-width: 960px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .services { grid-template-columns: minmax(0, 1fr); } }

/* Referenzen */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.chip {
  font: inherit; font-weight: 600; font-size: 0.95rem; cursor: pointer;
  padding: 0.5rem 1rem; border-radius: 999px; border: 1px solid var(--rule);
  background: var(--white); color: var(--slate);
}
.chip[aria-pressed="true"] { background: var(--slate); border-color: var(--slate); color: var(--white); }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tile { display: block; position: relative; overflow: hidden; background: var(--rule); aspect-ratio: 4 / 3; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.tile:hover img { transform: scale(1.04); }
.tile[hidden] { display: none; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; } }

.sub-head { font-size: var(--step-2); font-weight: 700; font-stretch: 112%; margin: 4rem 0 1.5rem; }
.projects { display: grid; gap: 3rem; }
.project-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; }
.project-head h3 { font-size: var(--step-1); font-weight: 700; }
.project-head p { margin: 0.2rem 0 0; color: var(--muted); }
.switch { display: inline-flex; border: 1px solid var(--slate); border-radius: 3px; overflow: hidden; }
.switch button { font: inherit; font-weight: 600; padding: 0.5rem 1.1rem; border: 0; background: var(--white); color: var(--slate); cursor: pointer; }
.switch button[aria-pressed="true"] { background: var(--slate); color: var(--white); }
.project-set { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .project-set { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Zertifikate: hochkant wie Urkunden */
.certs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; }
.tile.cert { aspect-ratio: 1 / 1.414; background: var(--white); border: 1px solid var(--rule); }
.tile.cert img { object-fit: contain; }
@media (max-width: 1000px) { .certs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .certs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Kundenstimmen */
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem; }
.quote { margin: 0; min-width: 0; }
.quote blockquote { margin: 0; font-size: var(--step-1); line-height: 1.55; }
.quote blockquote p { margin: 0; }
.quote blockquote p::before { content: "„"; }
.quote blockquote p::after { content: "“"; }
.quote figcaption { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--slate-soft); color: #c3ccd3; }
.quote figcaption strong { display: block; color: var(--white); }
.quote-logo { border-radius: 50%; background: var(--white); }
@media (max-width: 860px) { .quotes { grid-template-columns: minmax(0, 1fr); } }

/* Kontakt */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 3rem; align-items: start; }
.contact-lead { color: var(--muted); margin: 0.8rem 0 1.5rem; }
.contact-phone {
  display: inline-block; font-size: clamp(1.9rem, 4.5vw, 2.8rem); font-weight: 800; font-stretch: 112%;
  color: var(--slate); text-decoration: none; font-variant-numeric: tabular-nums; border-bottom: 3px solid var(--red);
}
.contact dl { margin: 2rem 0 0; display: grid; gap: 0; }
.contact dl div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; padding: 0.8rem 0; border-top: 1px solid var(--rule); }
.contact dt { font-weight: 700; }
.contact dd { margin: 0; color: var(--slate-soft); }
.map { position: relative; min-height: 420px; background: var(--zinc); border: 1px solid var(--rule); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-consent { padding: 2.5rem; max-width: 30rem; }
.map-consent p { margin: 0 0 1rem; color: var(--slate-soft); }
.map-consent .btn { margin: 0.5rem 0 1.2rem; }
@media (max-width: 860px) { .contact { grid-template-columns: minmax(0, 1fr); } .map { min-height: 340px; } }

/* Partner */
.partners { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.partners h2 { font-size: var(--step-1); font-weight: 700; font-stretch: 112%; }
.partners ul { display: flex; flex-wrap: wrap; align-items: center; gap: 2rem 3.5rem; }
.partners img { max-height: 54px; width: auto; }

/* Rechtstexte */
.legal h1 { font-size: var(--step-3); font-weight: 800; font-stretch: 118%; margin-bottom: 2rem; }
.legal h2 { font-size: var(--step-1); font-weight: 700; margin: 2.2rem 0 0.6rem; }
.legal h3 { font-size: 1.05rem; font-weight: 700; margin: 1.6rem 0 0.4rem; }
.legal p, .legal li { color: var(--slate-soft); }
.legal p { margin: 0 0 1rem; }
.legal ul { list-style: disc; padding-left: 1.3rem; margin-bottom: 1rem; }

/* ---------- Fußzeile ---------- */
.site-footer { background: var(--slate); color: #c3ccd3; padding-top: 3.5rem; font-size: 0.97rem; }
.site-footer a { color: var(--white); }
.site-footer h2 { color: var(--white); font-size: 1rem; font-weight: 700; margin-bottom: 0.7rem; }
.site-footer p { margin: 0 0 0.8rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.5rem; }
.footer-logo { background: var(--white); padding: 10px 12px; border-radius: 3px; margin-bottom: 1rem; width: 200px; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.3rem; border-top: 1px solid var(--slate-soft); }
.footer-legal p { margin: 0; }
.footer-legal ul { display: flex; gap: 1.5rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Bildansicht ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(18, 24, 30, 0.94);
  display: flex; align-items: center; justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(64px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(64px, env(safe-area-inset-left, 0px));
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; background: var(--white); }
.lightbox figcaption { color: var(--white); margin-top: 0.8rem; text-align: center; max-width: 60ch; }
.lightbox button {
  position: absolute; background: none; border: 0; color: var(--white); cursor: pointer;
  font-size: 2.6rem; line-height: 1; padding: 0.6rem 0.9rem;
}
.lb-close { top: max(8px, env(safe-area-inset-top, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); }
.lb-prev { left: max(4px, env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%); }
.lb-next { right: max(4px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: max(8px, env(safe-area-inset-bottom, 0px)); left: 0; right: 0; text-align: center; color: #c3ccd3; margin: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .lightbox { padding-left: 8px; padding-right: 8px; }
  .lb-prev, .lb-next { top: auto; bottom: 0; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile img { transition: none; }
}
