/* ═══════════════════════════════════════════════════════════════════════════
   AR Bedachung GmbH — arbedachung.ch (M00267)
   Markenfarben aus dem Kundenlogo: Indigo #393185 + Grau #898989.
   Ein Stylesheet für alle Seiten; kein Framework, keine externen Quellen
   (CSP-freundlich, schnell). Mobile-first.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --ink: #1c2030;            /* Text auf hell */
  --ink-soft: #4a5064;
  --muted: #7a8095;
  --brand: #393185;          /* Logo-Indigo */
  --brand-dark: #2a2465;
  --brand-soft: #ecebf6;
  --accent: #e8a33d;         /* warmes Dach-Kupfer für Akzente/CTA-Kontrast */
  --bg: #f6f7fa;
  --surface: #ffffff;
  --line: #e3e5ee;
  --dark: #14172a;           /* dunkle Bänder (Hero/Footer) */
  --dark-soft: #1e2240;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(20, 23, 42, 0.10);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.65; font-size: 16.5px; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ─────────── Header ─────────── */
.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(--line);
}
/* Kopf in drei Zonen: Logo links, Navigation mittig-rechts, Offert-Knopf GANZ rechts.
   Vorher lag der Knopf als letztes Element IM <nav>; sobald die acht Links breiter
   wurden als der Platz, brach `flex-wrap: wrap` ihn auf eine zweite Zeile um — der
   Kopf wuchs auf 87 px und der wichtigste Knopf stand mitten im Nichts. Jetzt ist er
   ein eigenes Element mit `margin-left: auto`, die Navigation bricht nie mehr um
   (`nowrap`), und darunter greift früher das Burger-Menü. */
.site-header .wrap { display: flex; align-items: center; gap: 14px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; order: 1; }
.brand img { height: 44px; width: auto; }
.nav { display: flex; gap: 2px; align-items: center; flex-wrap: nowrap; order: 2; }
.nav a {
  color: var(--ink-soft); font-weight: 600; font-size: 0.92rem;
  padding: 8px 10px; border-radius: 8px; white-space: nowrap;
}
.nav a:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.nav a.active { color: var(--brand); background: var(--brand-soft); }

.header-cta {
  order: 3; flex: none; white-space: nowrap;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 0.92rem;
  padding: 10px 18px; border-radius: 9px;
  box-shadow: 0 4px 14px rgba(57, 49, 133, 0.28);
  transition: background 0.2s ease, transform 0.2s ease;
}
.header-cta:hover { background: var(--brand-dark); color: #fff; text-decoration: none; transform: translateY(-1px); }
.header-cta.active { background: var(--brand-dark); }
.nav-toggle {
  display: none; order: 4; background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; font-size: 1.2rem; color: var(--ink); cursor: pointer;
}
/* Umschaltpunkt bei 1100 px: darunter passen acht Links + Knopf nicht mehr in eine
   Zeile (gemessen: Navigation 874 px + Knopf bei 1160 px Innenbreite). */
@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 10px 16px 16px;
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
}
@media (max-width: 460px) {
  /* Ganz schmal: Knopf kürzen statt umbrechen lassen. */
  .header-cta { padding: 9px 13px; font-size: 0.85rem; }
  .header-cta .lang { display: none; }
}

/* ─────────── Hero (Startseite) ─────────── */
.hero {
  position: relative; color: #fff; overflow: hidden; background: var(--dark);
  min-height: 78vh; display: flex; align-items: center;
}
/* Zweispaltiger Hero: Text links, Schnell-Anfrage rechts. Das Offertformular
   steht damit ÜBER der Falz — bisher lag die einzige Eingabemöglichkeit auf einer
   Unterseite, drei Klicks entfernt. */
.hero-split { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
@media (max-width: 980px) { .hero-split { grid-template-columns: 1fr; gap: 34px; } }
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.4s ease;
}
.hero-slide.on { opacity: 1; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(15, 17, 34, 0.88) 15%, rgba(20, 23, 42, 0.55) 55%, rgba(20, 23, 42, 0.25));
}
.hero .wrap { position: relative; z-index: 2; padding-top: 72px; padding-bottom: 88px; }
.hero .kicker { color: var(--accent); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.85rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.12; margin: 14px 0 18px; max-width: 640px; }
.hero p.lead { font-size: 1.15rem; color: rgba(255, 255, 255, 0.88); max-width: 560px; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-usps { display: flex; gap: 26px; margin-top: 44px; flex-wrap: wrap; }
.hero-usps span { display: flex; align-items: center; gap: 9px; font-weight: 600; color: rgba(255, 255, 255, 0.92); }
.hero-usps svg { flex: none; }

/* ─────────── Unterseiten-Kopf ─────────── */
.page-head {
  position: relative; color: #fff; background: var(--dark);
  background-size: cover; background-position: center;
}
.page-head::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(15, 17, 34, 0.90) 20%, rgba(20, 23, 42, 0.55));
}
.page-head .wrap { position: relative; z-index: 2; padding: 84px 20px 64px; }
.page-head .kicker { color: var(--accent); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.8rem; }
.page-head h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin-top: 10px; max-width: 720px; }
.page-head p { margin-top: 12px; max-width: 640px; color: rgba(255, 255, 255, 0.85); }

/* ─────────── Buttons ─────────── */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 10px; font-weight: 700;
  font-size: 1rem; border: 2px solid transparent; cursor: pointer; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn.primary { background: var(--accent); color: #241a04; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.brand { background: var(--brand); color: #fff; }
.btn.brand:hover { background: var(--brand-dark); }
.btn.ghost { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn.ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

/* ─────────── Sektionen ─────────── */
.section { padding: 78px 0; }
.section.alt { background: var(--surface); }
.sec-head { max-width: 680px; margin-bottom: 42px; }
.sec-head .kicker { color: var(--brand); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.8rem; }
.sec-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin-top: 8px; }
.sec-head p { margin-top: 10px; color: var(--ink-soft); }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* Leistungs-Karten */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(20, 23, 42, 0.16); }
.card img { height: 185px; object-fit: cover; width: 100%; }
.card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font-size: 1.15rem; }
.card p { color: var(--ink-soft); font-size: 0.95rem; flex: 1; }
.card .more { font-weight: 700; font-size: 0.95rem; }

/* Leistungslisten */
.check-list { list-style: none; display: grid; gap: 11px; margin-top: 18px; }
.check-list li { display: flex; gap: 11px; align-items: flex-start; color: var(--ink-soft); }
.check-list li::before {
  content: "✓"; flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 46px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* Zahlen/Fakten */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; }
.fact {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 20px; text-align: center;
}
.fact strong { display: block; font-size: 1.9rem; color: var(--brand); }
.fact span { color: var(--muted); font-size: 0.92rem; }

/* Zitat-Kacheln (Unternehmen) */
.quote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.quote {
  background: var(--surface); border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 24px 26px; box-shadow: var(--shadow);
}
.quote h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--brand-dark); }
.quote p { color: var(--ink-soft); font-size: 0.97rem; }

/* Galerie */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.gallery a { display: block; border-radius: 10px; overflow: hidden; position: relative; }
.gallery img { height: 190px; width: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery a:hover img { transform: scale(1.05); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(10, 12, 24, 0.92); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 88vh; max-width: 92vw; border-radius: 8px; }
.lightbox button {
  position: absolute; top: 18px; right: 22px; background: none; border: none;
  color: #fff; font-size: 2.2rem; cursor: pointer; line-height: 1;
}

/* CTA-Band */
.cta-band { background: linear-gradient(115deg, var(--brand-dark), var(--brand)); color: #fff; }
.cta-band .wrap { padding: 58px 20px; display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(1.4rem, 3vw, 2rem); max-width: 560px; }
.cta-band p { color: rgba(255, 255, 255, 0.85); margin-top: 6px; }

/* ─────────── Kontakt / Formular ─────────── */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 42px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info { display: grid; gap: 16px; }
.contact-info .row { display: flex; gap: 14px; align-items: flex-start; }
.contact-info .ico {
  flex: none; width: 42px; height: 42px; border-radius: 10px; background: var(--brand-soft);
  color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.contact-info strong { display: block; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.contact-info a { font-weight: 600; }

.form-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px;
}
.form-card h3 { margin-bottom: 6px; }
.form-card .hint { color: var(--muted); font-size: 0.92rem; margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
label { font-weight: 600; font-size: 0.9rem; display: block; margin-bottom: 5px; }
input, select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px;
  font: inherit; color: var(--ink); background: #fbfbfd;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #c62838; }
.field-error { display: none; color: #c62838; font-size: 0.85rem; margin-top: 4px; }
.field-error.show { display: block; }
.form-status { display: none; margin-top: 16px; padding: 13px 16px; border-radius: 9px; font-weight: 600; }
.form-status.show { display: block; }
.form-status.ok { background: #e7f6ec; color: #176a37; }
.form-status.err { background: #fdebee; color: #a31627; }
/* Honeypot: für Menschen unsichtbar, für Bots ein normales Feld */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.map-frame { border: 0; width: 100%; height: 330px; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ─────────── Footer ─────────── */
.site-footer { background: var(--dark); color: rgba(255, 255, 255, 0.82); margin-top: 0; }
.site-footer .cols {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 34px; padding: 56px 0 40px;
}
@media (max-width: 780px) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; margin-bottom: 14px; font-size: 1rem; }
.site-footer a { color: rgba(255, 255, 255, 0.82); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer .claim { color: var(--accent); font-weight: 600; margin-top: 12px; max-width: 320px; }
.site-footer .base {
  border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 18px 0;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
}
.footer-logo { background: #fff; border-radius: 8px; padding: 6px 10px; display: inline-block; }
.footer-logo img { height: 36px; }

/* ═══════════════════════════════════════════════════════════════════════════
   Aufwertung 2026-08-05 (Owner: «zu langweilig, Lead-Generierung integrieren»)
   Alles ohne externe Quellen — Icons sind Inline-SVG, Animationen sind CSS.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Schnell-Anfrage im Hero ────────────────────────────────────────────── */
.lead-card {
  background: rgba(255, 255, 255, 0.97); color: var(--ink);
  border-radius: 18px; padding: 26px 26px 24px;
  box-shadow: 0 24px 60px rgba(8, 10, 24, 0.45);
  border-top: 5px solid var(--accent);
}
.lead-card h2 { font-size: 1.28rem; line-height: 1.25; }
.lead-card .sub { color: var(--ink-soft); font-size: 0.92rem; margin: 6px 0 18px; }
.lead-card .form-grid { gap: 11px; }
.lead-card input, .lead-card select, .lead-card textarea { padding: 10px 12px; font-size: 0.95rem; }
.lead-card label { font-size: 0.84rem; }
.lead-card .btn { width: 100%; margin-top: 14px; }
.lead-card .assurance {
  display: flex; align-items: center; gap: 7px; justify-content: center;
  color: var(--muted); font-size: 0.82rem; margin-top: 11px;
}
.lead-card .assurance svg { flex: none; color: var(--brand); }

/* ── Vertrauensleiste unter dem Hero ────────────────────────────────────── */
.trust-bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.trust-bar .wrap {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px; padding: 18px 20px;
}
.trust-item { display: flex; align-items: center; gap: 12px; padding: 6px 4px; }
.trust-item .ico {
  flex: none; width: 40px; height: 40px; border-radius: 11px;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
}
.trust-item strong { display: block; font-size: 0.97rem; line-height: 1.3; }
.trust-item span { color: var(--muted); font-size: 0.85rem; }
.trust-item a { color: inherit; }
.trust-item a:hover { color: var(--brand); }

/* ── Ablauf in vier Schritten ───────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 20px; counter-reset: schritt; }
.step {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 22px 24px;
}
.step::before {
  counter-increment: schritt; content: counter(schritt);
  position: absolute; top: -18px; left: 22px;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(57, 49, 133, 0.35);
}
.step h3 { font-size: 1.05rem; margin-bottom: 7px; }
.step p { color: var(--ink-soft); font-size: 0.94rem; }

/* ── Karten: Akzentkante + Bildzoom beim Überfahren ─────────────────────── */
.card { position: relative; }
.card::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease;
}
.card:hover::after { transform: scaleX(1); }
.card .img-hold { overflow: hidden; }
.card .img-hold img { transition: transform 0.45s ease; }
.card:hover .img-hold img { transform: scale(1.06); }

/* ── Zahlen: Akzentlinie, Zählanimation setzt site.js ───────────────────── */
.fact { position: relative; overflow: hidden; }
.fact::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

/* ── Feste Aktionsleiste auf dem Handy ──────────────────────────────────── */
.action-bar { display: none; }
@media (max-width: 720px) {
  .action-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--line);
    backdrop-filter: blur(8px);
  }
  .action-bar a {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 10px; border-radius: 10px; font-weight: 700; font-size: 0.95rem;
  }
  .action-bar a:hover { text-decoration: none; }
  .action-bar .call { background: var(--brand-soft); color: var(--brand); }
  .action-bar .quote { background: var(--brand); color: #fff; }
  /* Platz, damit die Leiste den Footer nicht überdeckt */
  body { padding-bottom: 76px; }
}

/* ── Abschnitts-Übergang Hero → Inhalt ──────────────────────────────────── */
.section.tilt-top { position: relative; }
.section.tilt-top::before {
  content: ""; position: absolute; top: -34px; left: 0; right: 0; height: 34px;
  background: inherit; clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

/* Scroll-Reveal (site.js setzt .in) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
