/* Handwerker Wisniewski – Stylesheet
   Schrift lokal eingebunden (DSGVO-konform, keine Google-Server). */

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

:root {
  /* Farben – Anthrazit wie RAL 7016 (Fensterprofile), Kalkweiß, Beton, Eiche */
  --anthrazit: #33393e;
  --graphit: #22272b;
  --kalk: #f6f7f6;
  --beton: #d8dbda;
  --stein: #61686e;
  --eiche: #a8794b;
  --weiss: #ffffff;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --max: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-stretch: 100%;
  font-size: 17px;
  line-height: 1.6;
  color: var(--anthrazit);
  background: var(--kalk);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--eiche); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Typografie */
.display {
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.98;
}
h2 {
  font-stretch: 125%;
  font-weight: 750;
  font-size: clamp(1.9rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 18px;
}
.intro { color: var(--stein); max-width: 58ch; margin: 0; font-size: 1.05rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  font-weight: 650; font-size: 1rem; text-decoration: none;
  border-radius: 2px;
  transition: background-color .2s, color .2s;
}
.btn-dark { background: var(--anthrazit); color: var(--weiss); }
.btn-dark:hover { background: var(--graphit); }
.btn-line { border: 1.5px solid var(--anthrazit); color: var(--anthrazit); }
.btn-line:hover { background: var(--anthrazit); color: var(--weiss); }
.btn-light { background: var(--weiss); color: var(--graphit); }
.btn-light:hover { background: var(--beton); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 247, 246, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--beton);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.logo img { height: 44px; width: auto; }
.logo { display: flex; align-items: center; text-decoration: none; font-stretch: 125%; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; white-space: nowrap; }
.logo em { font-style: normal; font-weight: 400; color: var(--stein); }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { text-decoration: none; font-size: 0.95rem; color: var(--stein); }
.nav a:hover { color: var(--anthrazit); }
.nav .nav-phone { color: var(--anthrazit); font-weight: 650; }

/* Hero */
.hero { padding: clamp(72px, 10vw, 140px) 0 clamp(72px, 9vw, 120px); }
.hero-center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 6rem); margin: 0 0 32px; }
.hero h1 span { display: block; }
.hero .lead { font-size: 1.15rem; color: var(--stein); max-width: 46ch; margin: 0 auto 36px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .actions { justify-content: center; }
.hero .measure { width: min(100%, 560px); margin-top: 64px; }

/* Maßlinie – wie in einer technischen Zeichnung */
.measure {
  position: relative;
  margin-top: 22px;
  height: 22px;
  color: var(--eiche);
}
.measure::before {
  content: ""; position: absolute; left: 0; right: 0; top: 10px;
  border-top: 1.5px solid currentColor;
  transform-origin: left center;
  animation: draw 1.2s cubic-bezier(.6,0,.2,1) .3s both;
}
.measure i {
  position: absolute; top: 2px; width: 1.5px; height: 18px; background: currentColor;
}
.measure i:first-child { left: 0; }
.measure i:last-child { right: 0; animation: fadein .3s ease 1.4s both; }
.measure span {
  position: absolute; left: 50%; top: -1px; transform: translateX(-50%);
  background: var(--kalk); padding: 0 12px;
  font-size: 0.9rem; font-weight: 600; white-space: nowrap;
  animation: fadein .4s ease 1.3s both;
}
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* Leistungen */
.leistungen { padding: clamp(72px, 9vw, 128px) 0; background: var(--weiss); }
.leistungen .head { margin-bottom: 48px; }
.service-list { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--anthrazit); }
.service-list > li {
  display: grid;
  grid-template-columns: minmax(200px, 1.1fr) 1.4fr 1fr;
  gap: 32px;
  padding: 34px 0;
  border-bottom: 1px solid var(--beton);
  align-items: baseline;
}
.service-list h3 { margin: 0; font-stretch: 125%; font-weight: 750; font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -0.02em; line-height: 1; }
.service-list p { margin: 0; color: var(--stein); }
.service-list ul { list-style: none; margin: 0; padding: 0; font-size: 0.95rem; }
.service-list ul li { display: block; padding: 0; border: 0; }

/* Referenzen */
.referenzen { padding: clamp(72px, 9vw, 128px) 0; }
.referenzen .head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 40px; }
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.gallery figure { margin: 0; grid-column: span 4; }
.gallery figure:nth-child(1) { grid-column: span 7; grid-row: span 2; }
.gallery figure:nth-child(2),
.gallery figure:nth-child(3) { grid-column: span 5; }
.gallery figure:nth-child(1) img { aspect-ratio: auto; height: 100%; min-height: 360px; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--beton); }
.gallery figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0 0; font-size: 0.95rem; }
.gallery figcaption strong { font-weight: 650; }
.gallery figcaption span { color: var(--stein); }

/* Ablauf */
.ablauf { padding: clamp(72px, 9vw, 128px) 0; background: var(--weiss); }
.ablauf .head { margin-bottom: 48px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 1.5px solid var(--anthrazit); padding-top: 20px; }
.steps li::before {
  content: counter(step);
  display: block; font-stretch: 125%; font-weight: 800; font-size: 2.4rem; line-height: 1;
  color: var(--eiche); margin-bottom: 18px;
}
.steps h3 { margin: 0 0 8px; font-size: 1.15rem; font-weight: 700; }
.steps p { margin: 0; color: var(--stein); font-size: 0.97rem; }

/* Über uns + Einsatzgebiet */
.team { padding: clamp(72px, 9vw, 128px) 0; }
.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); }
.team p { max-width: 56ch; }
.team .big { font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.4; color: var(--anthrazit); font-weight: 450; margin-top: 0; }
.team .sub { color: var(--stein); }
.region h3 { margin: 0 0 6px; font-size: 1rem; font-weight: 650; }
.region > p { color: var(--stein); margin: 0 0 20px; }
.towns { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.towns li { padding: 11px 0; border-bottom: 1px solid var(--beton); break-inside: avoid; }
.towns li:first-child { font-weight: 700; }

/* Kontakt */
.kontakt { background: var(--anthrazit); color: var(--weiss); padding: clamp(80px, 10vw, 128px) 0; }
.kontakt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 112px); align-items: start; }
.kontakt h2 { color: var(--weiss); }
.kontakt .intro { color: #b8bfc4; }
.person { display: flex; flex-direction: column; margin: 36px 0 32px; padding-left: 18px; border-left: 2px solid var(--eiche); }
.person-label { color: #9aa1a7; font-size: 0.9rem; }
.person strong { font-size: 1.25rem; font-weight: 650; margin: 2px 0; }
.person span:last-child { color: #b8bfc4; font-size: 0.95rem; }
.btn-outline-light { border: 1.5px solid rgba(255,255,255,0.55); color: var(--weiss); }
.btn-outline-light:hover { background: rgba(255,255,255,0.08); border-color: var(--weiss); }
.kontakt-list { margin: 0; border-top: 1px solid #4a5157; }
.kontakt-list > div { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid #4a5157; }
.kontakt-list dt { color: #9aa1a7; font-size: 0.95rem; }
.kontakt-list dd { margin: 0; font-size: 1.05rem; line-height: 1.55; overflow-wrap: anywhere; }
.kontakt-list a { color: var(--weiss); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s; }
.kontakt-list .who { color: #9aa1a7; font-size: 0.95rem; margin-left: 10px; }
.kontakt-intro .actions { margin-top: 32px; }
.kontakt-list a:hover { border-bottom-color: var(--eiche); }

/* Unterseite Referenzen */
.nav a[aria-current="page"] { color: var(--anthrazit); font-weight: 650; }
.ref-intro { padding: clamp(56px, 8vw, 104px) 0 clamp(40px, 5vw, 64px); }
.back { display: inline-block; color: var(--stein); text-decoration: none; font-size: 0.95rem; margin-bottom: 28px; }
.back::before { content: "‹"; margin-right: 8px; }
.back:hover { color: var(--anthrazit); }
.ref-intro h1 { font-stretch: 125%; font-weight: 800; font-size: clamp(2.6rem, 7vw, 5.4rem); letter-spacing: -0.02em; line-height: 1; margin: 0 0 24px; }
.ref-projects { padding: 0 0 clamp(72px, 9vw, 120px); }
.project-list { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--anthrazit); }
.project-list > li {
  display: grid; grid-template-columns: 140px 1fr minmax(160px, 260px);
  gap: 32px; align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--beton);
}
.project-list .year { color: var(--eiche); font-weight: 700; font-variant-numeric: tabular-nums; }
.project-list h2 { font-size: clamp(1.2rem, 2.2vw, 1.6rem); font-stretch: 112%; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; margin: 0; }
.project-list p { margin: 4px 0 0; color: var(--stein); font-size: 0.95rem; }
.project-list .work { color: var(--anthrazit); }
.ref-gallery { padding: clamp(72px, 9vw, 120px) 0; background: var(--weiss); }
.sub-h { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 32px; }
.ref-gallery .gallery figure, .ref-gallery .gallery figure:nth-child(n) { grid-column: span 4; grid-row: auto; }
.ref-gallery .gallery figure:nth-child(1) img { height: auto; min-height: 0; aspect-ratio: 3 / 2; }
.ref-cta { background: var(--anthrazit); color: var(--weiss); padding: clamp(72px, 9vw, 112px) 0; }
.ref-cta h2 { color: var(--weiss); }
.ref-cta .intro { color: #b8bfc4; margin-bottom: 32px; }
.referenzen .head .actions { flex-shrink: 0; }

/* Footer */
.site-footer { background: var(--graphit); color: #9aa1a7; font-size: 0.9rem; padding: 28px 0; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.site-footer nav { display: flex; gap: 24px; }
.site-footer a { text-decoration: none; color: #c6cbcf; }
.site-footer a:hover { color: var(--weiss); }

/* Rechtstexte */
.legal { padding: 72px 0 104px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-stretch: 125%; font-weight: 800; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; line-height: 1.05; margin: 0 0 32px; }
.legal h2 { font-size: 1.15rem; font-stretch: 100%; letter-spacing: 0; margin: 36px 0 8px; }
.legal p { max-width: 70ch; }
.legal a { color: var(--anthrazit); text-decoration-color: var(--eiche); text-underline-offset: 4px; }

/* Mobile Anrufleiste */
.call-bar { display: none; }

@media (max-width: 960px) {
  .team-grid, .kontakt-grid { grid-template-columns: 1fr; }
  .service-list > li { grid-template-columns: 1fr 1.4fr; }
  .service-list > li > ul { grid-column: 2; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .nav a:not(:last-child) { display: none; }
  .nav a:last-child { color: var(--anthrazit); font-weight: 650; }
  .gallery figure, .gallery figure:nth-child(n) { grid-column: span 6; grid-row: auto; }
  .gallery figure:nth-child(1) { grid-column: span 12; }
  .gallery figure:nth-child(1) img { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
  .project-list > li { grid-template-columns: 110px 1fr; }
  .project-list .work { grid-column: 2; }
  .ref-gallery .gallery figure:nth-child(n) { grid-column: span 6; }
}
@media (max-width: 600px) {
  body { font-size: 16px; padding-bottom: 60px; }
  .site-header .wrap { height: 64px; }
  .logo img { height: 38px; }
  .hero h1 { font-size: clamp(2.2rem, 10.5vw, 3.2rem); }
  .service-list > li { grid-template-columns: 1fr; gap: 12px; padding: 28px 0; }
  .service-list > li > ul { grid-column: 1; color: var(--stein); }
  .steps { grid-template-columns: 1fr; }
  .gallery figure, .gallery figure:nth-child(n) { grid-column: span 12; }
  .referenzen .head { display: block; }
  .towns { columns: 1; }
  .project-list > li { grid-template-columns: 1fr; gap: 4px; padding: 22px 0; }
  .project-list .work { grid-column: auto; color: var(--stein); }
  .ref-gallery .gallery figure:nth-child(n) { grid-column: span 12; }
  .referenzen .head .actions { margin-top: 20px; }
  .kontakt-list > div { grid-template-columns: 1fr; gap: 4px; }
  .kontakt .actions .btn { flex: 1 1 100%; }
  .call-bar {
    display: grid; grid-template-columns: 1fr 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  }
  .call-bar a { text-align: center; padding: 18px 8px; font-weight: 700; text-decoration: none; color: var(--weiss); background: var(--anthrazit); }
  .call-bar a + a { background: var(--graphit); border-left: 1px solid #3f464c; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ================= Animationen ================= */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .28s ease both; }
::view-transition-new(root) { animation: vt-in .38s ease both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* Hero: Wörter erscheinen nacheinander */
.hero-title span { animation: word-in .9s cubic-bezier(.2,.7,.1,1) both; }
.hero-title span:nth-child(1) { animation-delay: .05s; }
.hero-title span:nth-child(2) { animation-delay: .17s; }
.hero-title span:nth-child(3) { animation-delay: .29s; }
.hero-title span:nth-child(4) { animation-delay: .41s; }
@keyframes word-in {
  from { opacity: 0; transform: translateY(0.45em); clip-path: inset(0 0 100% 0); }
  to   { opacity: 1; transform: none; clip-path: inset(0 0 -10% 0); }
}
.hero-fade { animation: fade-up .8s ease .65s both; }
.hero .actions.hero-fade { animation-delay: .8s; }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Scroll-Reveal (nur mit JavaScript aktiv) */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .9s cubic-bezier(.2,.7,.1,1); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal-group] > * { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .8s cubic-bezier(.2,.7,.1,1); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal-group].is-in > * { opacity: 1; transform: none; }
.js .gallery figure[data-reveal] { transform: translateY(24px) scale(.985); transition-delay: calc(var(--i, 0) * 80ms); }
.js .gallery figure[data-reveal].is-in { transform: none; }

/* Galerie: sanfter Zoom */
.gallery figure { overflow: hidden; }
.gallery img { transition: transform .9s cubic-bezier(.2,.7,.1,1), filter .6s ease; }
.gallery figure:hover img { transform: scale(1.045); }

/* Header beim Scrollen */
.site-header { transition: box-shadow .3s ease, background-color .3s ease; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(34, 39, 43, 0.08); }
.nav a { transition: color .2s ease; }
.btn { transition: background-color .2s, color .2s, transform .2s ease, border-color .2s; }
.btn:hover { transform: translateY(-2px); }

/* FAQ */
.faq { padding: clamp(72px, 9vw, 128px) 0; background: var(--weiss); }
.faq-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-list { border-top: 1.5px solid var(--anthrazit); }
.faq-list details { border-bottom: 1px solid var(--beton); }
.faq-list summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative;
  font-weight: 650; font-size: 1.08rem; line-height: 1.35;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background:
    linear-gradient(var(--eiche), var(--eiche)) center / 14px 2px no-repeat,
    linear-gradient(var(--eiche), var(--eiche)) center / 2px 14px no-repeat;
  transition: transform .35s ease;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:hover { color: var(--graphit); }
.faq-list .answer p { margin: 0 0 22px; color: var(--stein); max-width: 62ch; }
.faq-list details[open] .answer { animation: fade-up .45s ease both; }
@media (max-width: 960px) { .faq-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js [data-reveal-group] > * { opacity: 1 !important; transform: none !important; }
  .gallery figure:hover img, .btn:hover { transform: none; }
}

/* Galerie: großes erstes Bild füllt seine Zelle (ohne Verzerrung) */
.gallery figure:nth-child(1) { position: relative; min-height: 360px; }
.gallery figure:nth-child(1) img { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; object-fit: cover; }
@media (max-width: 960px) {
  .gallery figure:nth-child(1) { min-height: 0; }
  .gallery figure:nth-child(1) img { position: static; height: auto; aspect-ratio: 16 / 9; }
}
.ref-gallery .gallery figure:nth-child(1) { min-height: 0; }
.ref-gallery .gallery figure:nth-child(1) img { position: static; height: auto; aspect-ratio: 3 / 2; }

/* Galerie im Originalformat – keine Beschnitte, Reihen mit gleicher Höhe */
.pgallery { display: flex; flex-direction: column; gap: 16px; }
.prow { display: flex; gap: 16px; align-items: flex-start; }
.prow figure { flex: var(--ar) 1 0; min-width: 0; margin: 0; overflow: hidden; background: var(--beton); }
.prow img { display: block; width: 100%; height: auto; transition: transform .9s cubic-bezier(.2,.7,.1,1); }
.prow figure:hover img { transform: scale(1.045); }
.js .pgallery figure[data-reveal] { transform: translateY(24px) scale(.985); transition-delay: calc(var(--i, 0) * 80ms); }
.js .pgallery figure[data-reveal].is-in { transform: none; }
@media (max-width: 600px) {
  .pgallery, .prow { gap: 12px; }
  .prow { flex-direction: column; }
  .prow figure { flex: none; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .prow figure:hover img { transform: none; } }
