/* ============================================================
   profi-dachsanierung.ch — Design-System "Anthrazit & Kupfer"
   ============================================================ */

:root {
  --ink: #16181c;
  --anthrazit: #23262b;
  --anthrazit-2: #2d3138;
  --paper: #faf9f7;
  --white: #ffffff;
  --copper: #b06a35;
  --copper-dark: #96562a;
  --copper-tint: #f6ede3;
  --line: #e6e2db;
  --muted: #5c6167;
  --muted-light: #9aa0a8;
  --success: #2e7d4f;
  --warn: #b3452f;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 3px rgba(22, 24, 28, .07), 0 4px 14px rgba(22, 24, 28, .05);
  --shadow-md: 0 2px 6px rgba(22, 24, 28, .08), 0 12px 32px rgba(22, 24, 28, .10);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--copper-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--copper); }
ul, ol { padding-left: 1.3em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }
.wrap-narrow { max-width: 860px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.015em; font-weight: 750; }
h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.15rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--copper-dark); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--copper); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 46em; }
.section { padding: clamp(3.4rem, 8vw, 6.2rem) 0; }
.section-dark { background: var(--anthrazit); color: #e8e6e2; }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .lead { color: #b7bcc3; }
.section-tint { background: var(--copper-tint); }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font); font-size: 1.02rem; font-weight: 650;
  padding: .85em 1.7em; border-radius: 999px; border: 0; cursor: pointer;
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--copper); color: #fff; box-shadow: 0 6px 18px rgba(176, 106, 53, .35); }
.btn-primary:hover { background: var(--copper-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--copper); color: var(--copper-dark); }
.section-dark .btn-ghost { color: #e8e6e2; box-shadow: inset 0 0 0 1.5px #4a4f57; }
.section-dark .btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--copper); color: #f0c9a8; }
.btn-lg { font-size: 1.1rem; padding: 1em 2.1em; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 247, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; gap: 1.5rem; height: 72px; }
.logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.08rem; letter-spacing: -.01em; }
.logo svg { flex: 0 0 auto; }
.logo span em { font-style: normal; color: var(--copper-dark); }
.nav { display: flex; gap: 1.6rem; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 550; }
.nav a:hover { color: var(--copper-dark); }
.header-cta { margin-left: .5rem; font-size: .92rem; padding: .65em 1.3em; }
.header-phone { display: none; color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; }
@media (min-width: 1080px) { .header-phone { display: inline-flex; align-items: center; gap: .4em; margin-left: auto; } .nav { margin-left: auto; } .header-phone + .nav { margin-left: 0; } }
.burger { display: none; margin-left: auto; background: none; border: 0; cursor: pointer; padding: .5rem; }
.burger span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }
@media (max-width: 900px) {
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; gap: 0; padding: .5rem 0 1rem; }
  .nav.open { display: flex; }
  .nav a { padding: .8rem clamp(18px, 4vw, 40px); }
  .burger { display: block; }
  .header-cta { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--anthrazit); color: #edece9; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(900px 420px at 85% 10%, rgba(176, 106, 53, .16), transparent 65%);
  pointer-events: none;
}
.hero-in { position: relative; z-index: 1; display: grid; gap: clamp(2rem, 5vw, 4rem); padding: clamp(3.2rem, 7vw, 5.6rem) 0 clamp(3rem, 6vw, 5rem); align-items: center; }
@media (min-width: 920px) { .hero-in { grid-template-columns: 1.05fr .95fr; } }
.hero h1 { color: var(--white); margin: .4rem 0 1.1rem; }
.hero h1 em { font-style: normal; color: #e9a56b; }
.hero p.lead { color: #c3c7cd; margin-bottom: 1.8rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-bottom: 1.6rem; }
.hero-note { font-size: .9rem; color: #9aa0a8; }
.hero-media { position: relative; }
.hero-media img { border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.hero-badge {
  position: absolute; left: -14px; bottom: 22px; background: var(--white); color: var(--ink);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md); padding: .8rem 1.1rem;
  font-size: .88rem; line-height: 1.35; max-width: 250px;
}
.hero-badge strong { color: var(--copper-dark); }
@media (max-width: 919px) { .hero-badge { left: 10px; } }
.trustbar { position: relative; z-index: 1; border-top: 1px solid rgba(255, 255, 255, .08); }
.trustbar-in { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(255,255,255,.08); }
@media (min-width: 760px) { .trustbar-in { grid-template-columns: repeat(4, 1fr); } }
.trust-item { background: var(--anthrazit); padding: 1.1rem 1rem; text-align: center; }
.trust-item b { display: block; color: var(--white); font-size: 1.15rem; letter-spacing: -.01em; }
.trust-item span { font-size: .82rem; color: #9aa0a8; }

/* ---------- Karten & Grids ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.5rem; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .97rem; }
.card .ico {
  width: 46px; height: 46px; border-radius: 12px; background: var(--copper-tint);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; color: var(--copper-dark);
}
.card-link { display: inline-block; margin-top: .8rem; font-weight: 650; font-size: .93rem; }

/* ---------- Checkliste (Selbstcheck) ---------- */
.checkgrid { display: grid; gap: 1rem; }
@media (min-width: 720px) { .checkgrid { grid-template-columns: 1fr 1fr; } }
.checkitem { display: flex; gap: .9rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.1rem 1.2rem; align-items: flex-start; }
.checkitem .num { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--anthrazit); color: #fff; font-size: .85rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: .1rem; }
.checkitem p { font-size: .95rem; color: var(--muted); }
.checkitem b { color: var(--ink); }

/* ---------- Vorher / Nachher ---------- */
.ba { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 16/10; user-select: none; touch-action: none; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba .ba-after { clip-path: inset(0 0 0 50%); }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; background: #fff;
  box-shadow: 0 0 12px rgba(0,0,0,.5); cursor: ew-resize;
}
.ba-handle::after {
  content: "⟷"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%; background: var(--white); color: var(--ink);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; box-shadow: var(--shadow-md);
}
.ba-label { position: absolute; top: 14px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: rgba(22,24,28,.72); color: #fff; padding: .35em .8em; border-radius: 999px; }
.ba-label.before { left: 14px; }
.ba-label.after { right: 14px; }

/* ---------- Prozess ---------- */
.steps { counter-reset: step; display: grid; gap: 1.2rem; }
@media (min-width: 920px) { .steps { grid-template-columns: repeat(5, 1fr); } }
.step { position: relative; background: var(--anthrazit-2); border: 1px solid #3a3f47; border-radius: var(--radius); padding: 1.4rem 1.2rem 1.3rem; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; font-size: .85rem; font-weight: 800; letter-spacing: .1em; color: #e9a56b; margin-bottom: .7rem;
}
.step h3 { font-size: 1.05rem; color: var(--white); margin-bottom: .4rem; }
.step p { font-size: .88rem; color: #a7adb5; }

/* ---------- Fördergelder ---------- */
.money { display: grid; gap: 1.4rem; }
@media (min-width: 860px) { .money { grid-template-columns: 1.1fr .9fr; align-items: center; } }
.money-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm); }
.money-box ul { list-style: none; padding: 0; display: grid; gap: .9rem; }
.money-box li { display: flex; gap: .8rem; align-items: flex-start; font-size: .98rem; }
.money-box li svg { flex: 0 0 auto; margin-top: .2rem; color: var(--success); }
.money-box li b { display: block; }
.money-box li span { color: var(--muted); font-size: .93rem; }

/* ---------- Projekte ---------- */
.projects { display: grid; gap: 1.2rem; }
@media (min-width: 720px) { .projects { grid-template-columns: repeat(3, 1fr); } }
.project { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.project img { aspect-ratio: 4/3; object-fit: cover; width: 100%; transition: transform .4s ease; }
.project:hover img { transform: scale(1.04); }
.project figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2.2rem 1.1rem .9rem;
  background: linear-gradient(transparent, rgba(22, 24, 28, .85)); color: #fff; font-size: .9rem; font-weight: 600;
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .8rem; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0; overflow: hidden; }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.05rem 1.3rem; font-weight: 650; font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--copper-dark); transition: transform .2s; flex: 0 0 auto; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { padding: 0 1.3rem 1.2rem; color: var(--muted); font-size: .97rem; }
.faq .faq-body p + p { margin-top: .6em; }

/* ---------- Leadformular ---------- */
.leadform-wrap { max-width: 720px; margin: 0 auto; }
.leadform {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: clamp(1.4rem, 4vw, 2.4rem); position: relative;
}
.lf-progress { height: 5px; background: var(--line); border-radius: 99px; margin-bottom: 1.6rem; overflow: hidden; }
.lf-progress i { display: block; height: 100%; width: 25%; background: var(--copper); border-radius: 99px; transition: width .3s ease; }
.lf-step { display: none; }
.lf-step.active { display: block; animation: lfIn .25s ease; }
@keyframes lfIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.lf-step h3 { margin-bottom: .3rem; }
.lf-step .lf-sub { color: var(--muted); font-size: .95rem; margin-bottom: 1.2rem; }
.lf-options { display: grid; gap: .8rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .lf-options { grid-template-columns: 1fr; } }
.lf-opt { position: relative; }
.lf-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.lf-opt label {
  display: flex; flex-direction: column; gap: .2rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 1rem 1.1rem; cursor: pointer; transition: border-color .15s, background .15s; height: 100%;
}
.lf-opt label b { font-size: .99rem; }
.lf-opt label span { font-size: .85rem; color: var(--muted); }
.lf-opt input:checked + label { border-color: var(--copper); background: var(--copper-tint); }
.lf-opt input:focus-visible + label { outline: 2px solid var(--copper); outline-offset: 2px; }
.lf-fields { display: grid; gap: 1rem; }
@media (min-width: 560px) { .lf-fields.cols { grid-template-columns: 1fr 1fr; } }
.lf-field label { display: block; font-size: .88rem; font-weight: 650; margin-bottom: .35rem; }
.lf-field input, .lf-field select, .lf-field textarea {
  width: 100%; font: inherit; padding: .75em 1em; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink);
}
.lf-field input:focus, .lf-field select:focus, .lf-field textarea:focus { outline: none; border-color: var(--copper); background: #fff; }
.lf-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 1.6rem; gap: 1rem; }
.lf-back { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; padding: .5em .2em; }
.lf-back:hover { color: var(--ink); }
.lf-error { color: var(--warn); font-size: .9rem; margin-top: .8rem; display: none; }
.lf-privacy { font-size: .8rem; color: var(--muted-light); margin-top: 1.1rem; text-align: center; }
.lf-success { text-align: center; padding: 2rem 0; }
.lf-success svg { color: var(--success); margin: 0 auto 1rem; }

/* ---------- Content-Seiten (Ratgeber) ---------- */
.article { padding: clamp(2.6rem, 6vw, 4.5rem) 0; }
.article h1 { margin-bottom: 1rem; }
.article h2 { margin: 2.4rem 0 .8rem; }
.article h3 { margin: 1.8rem 0 .6rem; }
.article p { margin-bottom: 1rem; max-width: 70ch; }
.article ul, .article ol { margin: 0 0 1.2rem; max-width: 65ch; }
.article li { margin-bottom: .45rem; }
.article .lead { margin-bottom: 1.6rem; }
.article img { border-radius: var(--radius); margin: 1.6rem 0; }
.infobox {
  border-left: 4px solid var(--copper); background: var(--copper-tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 1.1rem 1.3rem; margin: 1.6rem 0; max-width: 70ch;
}
.infobox.warnbox { border-left-color: var(--warn); background: #faeae5; }
.infobox b { display: block; margin-bottom: .2rem; }
.infobox p { margin: 0; font-size: .96rem; }
table.datatable { border-collapse: collapse; width: 100%; max-width: 70ch; margin: 1.2rem 0 1.6rem; font-size: .95rem; }
.datatable th, .datatable td { text-align: left; padding: .65em .9em; border-bottom: 1px solid var(--line); vertical-align: top; }
.datatable th { background: var(--anthrazit); color: #fff; font-weight: 650; }
.datatable tr:nth-child(even) td { background: #f3f1ed; }

/* ---------- CTA-Banner ---------- */
.ctabanner { background: var(--anthrazit); color: #e8e6e2; border-radius: var(--radius); padding: clamp(1.8rem, 5vw, 3rem); display: grid; gap: 1.4rem; }
@media (min-width: 860px) { .ctabanner { grid-template-columns: 1.4fr auto; align-items: center; } }
.ctabanner h2 { color: #fff; margin-bottom: .4rem; }
.ctabanner p { color: #b7bcc3; font-size: .98rem; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #9aa0a8; padding: 3.4rem 0 2rem; font-size: .93rem; }
.footer a { color: #c9cdd3; text-decoration: none; }
.footer a:hover { color: #e9a56b; }
.footer-grid { display: grid; gap: 2rem; margin-bottom: 2.5rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: .8rem; }
.footer ul { list-style: none; padding: 0; }
.footer li { margin-bottom: .45rem; }
.footer-bottom { border-top: 1px solid #2b2f35; padding-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .85rem; }

/* ---------- Utility & Animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .lf-step.active { animation: none; }
}
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-2 { margin-bottom: 2rem; }

/* Sticky Mobile-CTA */
.mobile-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; display: flex; gap: 1px;
  background: var(--line); border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform .3s ease;
}
.mobile-cta.show { transform: none; }
.mobile-cta a { flex: 1; display: flex; align-items: center; justify-content: center; gap: .5em; padding: .95em; font-weight: 700; font-size: .95rem; text-decoration: none; }
.mobile-cta .m-call { background: var(--white); color: var(--ink); }
.mobile-cta .m-check { background: var(--copper); color: #fff; }
@media (min-width: 900px) { .mobile-cta { display: none; } }
