/* ---------------------------------------
   S. N. Facility – Base Styles
   assets/css/style.css
---------------------------------------- */

/* Webfont */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");

/* Farbvariablen */
:root{
  --olive-bg:#EEF3E6;
  --olive:#556B2F;
  --red:#B22222;
  --yellow:#FFCC00;
  --gold:#DAA520;
  --ink:#1f2937;
  --muted:#6b7280;
  --radius:18px;
}

/* RESET */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font:16px/1.6 "Poppins",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--ink);
  background:var(--olive-bg);
}

a{color:var(--olive);text-decoration:underline}
a.btn{text-decoration:none}
h1,h2,h3{line-height:1.25;margin:0 0 .3em}
h1{font-size:clamp(28px,4.5vw,44px)}
h2{font-size:clamp(22px,3.2vw,32px)}
h3{font-size:clamp(18px,2.5vw,22px)}
p{margin:.4em 0 1em}

/* ---------------------------------------
   Header / Navigation
---------------------------------------- */
.site-header{
  position:sticky;top:0;z-index:50;
  display:flex;align-items:center;justify-content:space-between;
  padding:10px 18px;
  background:rgba(255,255,255,.85);
  backdrop-filter:saturate(180%) blur(8px);
  border-bottom:1px solid #e5e7eb;
}

.logo{
  display:flex;align-items:center;gap:10px;
  text-decoration:none;color:var(--ink);
}

/* LOGO: max. 60px Höhe – professionelles Frontend */
.logo img{
  max-height:60px;
  height:auto;
  width:auto;
  object-fit:contain;
  display:block;
}

.logo .brand{font-weight:700;letter-spacing:.3px}

.nav-toggle{
  display:none;background:none;border:1px solid #ddd;
  padding:.45rem .6rem;border-radius:10px;cursor:pointer;
}

.site-nav{display:flex;gap:16px}
.site-nav a{
  color:var(--ink);text-decoration:none;
  padding:8px 10px;border-radius:10px;
}
.site-nav a:hover{background:#f3f4f6}

/* ---------------------------------------
   HERO VIDEO
---------------------------------------- */
.hero-video{
  position:relative;
  height:clamp(420px,68vh,820px);
  overflow:hidden;
  background:#000;
  isolation:isolate;
  max-width:1100px;
  margin:clamp(16px,2vw,28px) auto 0;
}
.hero-video-el{
  position:absolute;inset:0;
  width:100%;height:100%;
  object-fit:cover;
  display:block;
}

/* Abdunkelung für Lesbarkeit */
.hero-video .scrim{
  position:absolute;inset:0;
  background:linear-gradient(0deg,rgba(0,0,0,.32),rgba(0,0,0,.32));
  z-index:1;pointer-events:none;
}

/* Text im Hero */
.hero-video .hero-content{
  position:absolute;inset:0;
  display:grid;place-items:center;
  z-index:2;color:#fff;text-align:center;
  padding:24px;
}
.hero-video .hero-content .accent{color:var(--yellow)}

/* ---------------------------------------
   Sections & Layout
---------------------------------------- */
.section{padding:64px 18px 88px}
.section + .section{margin-top:32px}
.section-olive{
  background:#f7f9f3;
  border-block:1px solid #e5e7eb;
}
.section-head{
  max-width:900px;margin:0 auto 28px;text-align:center;
}
.section-head .lede{
  color:var(--muted);margin-top:6px;
}

/* Grid / Cards */
.grid{display:grid;gap:18px}
.cards{
  grid-template-columns:repeat(4,1fr);
  max-width:1100px;margin:0 auto;
}
.card{
  background:#fff;padding:20px;border-radius:var(--radius);
  border:1px solid #e5e7eb;
  box-shadow:0 2px 8px rgba(0,0,0,.04);
}
.card h3{margin-top:0}
.check{padding-left:1.2em}
.check li{margin:.25em 0;list-style:"✔  "}
.small{font-size:.92rem}
.muted{color:var(--muted)}

/* ---------------------------------------
   Offer / Kontakt / Newsletter – Formulare
---------------------------------------- */
.offer{max-width:1000px;margin:0 auto}
.form-grid{grid-template-columns:repeat(3,1fr)}

label{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-weight:500;
}

input,select,textarea{
  font:inherit;
  padding:.65rem .7rem;
  border:1px solid #d1d5db;
  border-radius:12px;
  background:#fff;
}
input:focus,select:focus,textarea:focus{
  outline:2px solid var(--olive);
  border-color:var(--olive);
}

/* Ergebnisbox Schnellangebot */
.offer-result{
  display:block;
  margin:12px auto 0;
  background:#fff;
  border:1px dashed var(--olive);
  padding:12px;
  border-radius:12px;
  min-height:62px;
  color:var(--muted);
}

/* DSGVO-Consent – einzeilig, zentriert */
label.consent{
  display:flex!important;
  flex-direction:row!important;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin:14px auto 12px;
  width:100%;
  text-align:center;
}
label.consent a{margin:0 4px}
@media(min-width:640px){
  label.consent{white-space:nowrap}
}

/* CTA-Buttons – einheitlich groß/rot */
.offer-actions,
#contactForm .form-actions{
  display:flex;
  justify-content:center;
}

.btn-wide{
  width:clamp(220px,40vw,320px);
}

.offer-actions .btn,
#contactForm .btn,
#newsletterForm .btn{
  padding:.95rem 1.5rem !important;
  font-size:1.06rem !important;
  border-radius:var(--radius) !important;
  background:var(--red) !important;
  border:2px solid var(--red) !important;
  color:#fff !important;
  transition:.2s ease;
}

.offer-actions .btn:hover,
#contactForm .btn:hover,
#newsletterForm .btn:hover{
  filter:brightness(1.05);
  transform:translateY(-1px);
  box-shadow:0 8px 20px rgba(178,34,34,.25);
}

/* Angebot – Abstände und Reihenfolge */
#angebot .offer-actions-top{margin:12px 0}
#angebot #offerResult{margin:12px auto 0}
#angebot #offerContactRow{margin-top:18px}

/* Kontakt-Grid: Textarea über volle Breite */
#contactForm .form-grid{
  grid-template-columns:repeat(3,1fr);
  gap:18px;
}
#contactForm .form-grid .span-all{
  grid-column:1 / -1;
}
#contactForm .form-actions{margin-top:12px}

/* ---------------------------------------
   Gallery
---------------------------------------- */
.gallery{
  max-width:1100px;margin:0 auto;
  display:grid;gap:12px;
  grid-template-columns:repeat(4,1fr);
}
.gallery figure{
  margin:0;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  overflow:hidden;
}
.gallery img{
  width:100%;
  height:180px;
  object-fit:cover;
  display:block;
}
.gallery figcaption{
  padding:8px 10px;
  font-size:.9rem;
  color:var(--muted);
}

/* ---------------------------------------
   Testimonials
---------------------------------------- */
.testimonials{
  max-width:900px;margin:0 auto;
  display:grid;gap:16px;
  grid-template-columns:repeat(3,1fr);
}
blockquote{
  background:#fff;
  padding:16px;
  border-left:4px solid var(--gold);
  border-radius:12px;
  margin:0;
}
cite{
  display:block;
  color:var(--muted);
  margin-top:8px;
}

/* ---------------------------------------
   Kontakt / Karte
---------------------------------------- */
.contact{max-width:900px;margin:0 auto}
.map-wrap{
  max-width:900px;
  width:100%;
  margin:22px auto 0;
  border-radius:16px;
  overflow:hidden;
  border:1px solid #e5e7eb;
}
.map-wrap iframe{
  width:100%;
  height:420px;
  border:0;
}

/* ---------------------------------------
   Newsletter
---------------------------------------- */
.newsletter{
  max-width:700px;
  margin:0 auto;
  display:flex;
  gap:10px;
  align-items:center;
}
.newsletter input{flex:1}

/* ---------------------------------------
   Footer
---------------------------------------- */
.site-footer{
  padding:28px 18px;
  background:#fff;
  border-top:1px solid #e5e7eb;
}
.footer-grid{
  max-width:1100px;
  margin:0 auto;
  display:grid;
  gap:12px;
  grid-template-columns:2fr 1fr 1fr;
}
.footer-nav,.social{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.footer-nav a,.social a{
  color:var(--ink);
  text-decoration:none;
}
.footer-nav a:hover,.social a:hover{
  text-decoration:underline;
}

/* A11y helper */
.sr-only{
  position:absolute!important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* ---------------------------------------
   Responsive
---------------------------------------- */
@media (max-width:1100px){
  .cards{grid-template-columns:repeat(2,1fr)}
  .gallery{grid-template-columns:repeat(3,1fr)}
  .testimonials{grid-template-columns:1fr 1fr 1fr}
  .form-grid{grid-template-columns:1fr 1fr 1fr}
}

@media (max-width:800px){
  .nav-toggle{display:inline-block}
  .site-nav{
    position:absolute;
    right:18px;top:58px;
    background:#fff;
    padding:10px;
    border:1px solid #e5e7eb;
    border-radius:12px;
    display:none;
    flex-direction:column;
  }
  .site-nav.open{display:flex}
  .cards{grid-template-columns:1fr}
  .gallery{grid-template-columns:repeat(2,1fr)}
  .testimonials{grid-template-columns:1fr}
  .form-grid{grid-template-columns:1fr 1fr}
}

@media (max-width:520px){
  .gallery{grid-template-columns:1fr}
  .form-grid{grid-template-columns:1fr}
}

/* ---------------------------------------
   HERO-ANIMATION (Wisch-Effekt)
---------------------------------------- */
.hero-anim{
  position:relative;
  height:clamp(420px,68vh,820px);
  overflow:hidden;
  isolation:isolate;
}

/* Gelbe Matrix – Grid-Fläche */
.matrix{
  position:absolute;
  inset:-40% -40%;
  background:
    repeating-linear-gradient(0deg,rgba(255,204,0,0) 0 28px,#FFCC00 28px 30px),
    repeating-linear-gradient(90deg,rgba(255,204,0,0) 0 28px,#FFCC00 28px 30px);
  transform-origin:50% 80%;
  transform:perspective(900px) rotateX(62deg) scale(1);
  opacity:.9;
  animation:matrixZoom 5.2s ease-in-out forwards;
  filter:drop-shadow(0 0 8px rgba(0,0,0,.08));
}

/* Haus & Copy */
.house-svg{
  position:absolute;inset:0;
  width:min(84vw,1000px);
  height:auto;
  margin:auto;
  transform:translateY(10%) scale(1);
  z-index:2;
  animation:houseZoom 5.2s ease-in-out forwards;
}
.house-lines{stroke:#B22222}
.house-windows{fill:#cfefff;stroke:#fff}

.hero-copy{
  position:absolute;inset:0;
  display:grid;place-items:center;
  text-align:center;
  z-index:3;
  color:#fff;
  padding:24px;
}
.hero-copy h1{color:#fff;text-shadow:0 2px 16px rgba(0,0,0,.35)}
.hero-copy h1 span{color:var(--yellow)}

/* Wisch-Ebene */
.wipe{
  position:absolute;inset:0;
  z-index:4;
  background:var(--olive-bg);
  clip-path:polygon(100% 100%,100% 100%,100% 100%,100% 100%);
  pointer-events:none;
}
.hero-anim.wipe-start .wipe{
  animation:wipeDiag 1.8s ease-in forwards .2s;
}

/* Fensterwischer */
.squeegee{
  position:absolute;
  width:220px;height:80px;
  bottom:-100px;right:-260px;
  transform:rotate(-35deg);
  animation:squeegeeMove 1.8s ease-in forwards .2s;
}
.squeegee .handle{
  width:22px;height:120px;
  background:#333;border-radius:12px;
  position:absolute;left:96px;bottom:40px;
  box-shadow:inset 0 -6px 0 rgba(255,255,255,.2);
}
.squeegee .blade{
  width:220px;height:22px;
  background:#111;border-radius:6px;
  position:absolute;left:0;bottom:20px;
  box-shadow:0 2px 0 rgba(255,255,255,.35) inset;
}

/* Keyframes */
@keyframes matrixZoom{
  0%{transform:perspective(900px) rotateX(62deg) scale(1);opacity:.9}
  100%{transform:perspective(900px) rotateX(62deg) scale(2.2) translateY(12%);opacity:1}
}
@keyframes houseZoom{
  0%{transform:translateY(10%) scale(1)}
  100%{transform:translateY(6%) scale(2.1)}
}
@keyframes wipeDiag{
  0%{
    clip-path:polygon(100% 100%,100% 100%,100% 100%,100% 100%);
  }
  100%{
    clip-path:polygon(0% 0%,100% 0%,100% 100%,0% 100%);
  }
}
@keyframes squeegeeMove{
  0%{transform:translate(0,0) rotate(-35deg)}
  100%{transform:translate(-95vw,-60vh) rotate(-35deg)}
}

/* Nach dem Wischen Hero einklappen (optional) */
.hero-anim.done{
  height:0;
  padding:0;
  border:none;
}
