/* asturgy.ch — site styles (replaces Astra + Elementor) */
:root {
  --primary: #043975;
  --primary-deep: #022452;
  --text: #4a5568;
  --heading: #043975;
  --accent: #d19526;
  --btn: #d19526;
  --btn-hover: #e0a93c;
  --tint: #f4f7fb;
  --line: #e3ebf0;
  --white: #fff;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(4,57,117,.08);
  --shadow-lift: 0 10px 32px rgba(4,57,117, .14);
  --wrap: 1200px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 400 16px/1.65 var(--font); color: var(--text); background: var(--white); }
img, svg, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--primary-deep); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); color: var(--heading); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; hyphens: manual; overflow-wrap: break-word; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
h5 { font-size: .95rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 600; }
h6 { font-size: .9rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em 0; }
table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .95rem; }
th, td { padding: .6em .8em; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-weight: 700; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff; padding: .6em 1em; z-index: 1000; }
.skip:focus { left: 1rem; }
.center { text-align: center; }
.right { text-align: right; }

/* ---------- layout primitives ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 860px; }
.sec { padding: clamp(56px, 7vw, 96px) 0; position: relative; }
.sec.tint { background: var(--tint); }
.sec.dark { background: linear-gradient(160deg, var(--primary) 0%, var(--primary-deep) 100%); color: #e6f0f2; }
.sec.dark :is(h1, h2, h3, h4, h6), .card.dark :is(h1, h2, h3, h4, h6) { color: #fff; }
.sec.dark a:not(.btn), .card.dark a:not(.btn) { color: #fff; }
.sec.hero { min-height: 520px; display: flex; align-items: center; color: #fff; background: var(--primary) var(--bg) center / cover no-repeat; isolation: isolate; }
.sec.hero::before { content: ""; position: absolute; inset: 0; background: var(--ov, linear-gradient(180deg, #043975, #022452)); opacity: var(--ovo, .7); z-index: -1; }
.sec.hero > .wrap { width: 100%; }
.sec.hero :is(h1, h2, h3, h4) { color: #fff; }
.sec.hero h1 { max-width: 900px; margin-left: auto; margin-right: auto; text-shadow: 0 2px 18px rgba(0,0,0,.25); }
.sec.hero .rt { max-width: 760px; margin-left: auto; margin-right: auto; font-size: 1.1rem; }
.sec.hero .rt p { color: #fff; }
.sec.hero .btn { background: var(--accent); color: var(--primary-deep); }
.sec.hero .btn:hover { background: var(--btn-hover); color: var(--primary-deep); }
.sec > .wrap > :is(h2, h1).center + .rt.center { max-width: 760px; margin-left: auto; margin-right: auto; }
.sec > .wrap > * + :is(.grid, .row, .faq, figure) { margin-top: 1.6rem; }

.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 1.5rem; }
.grid.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.grid.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
@media (min-width: 900px) {
  .grid.g2 { grid-template-columns: repeat(2, 1fr); }
  .grid.g3 { grid-template-columns: repeat(3, 1fr); }
  .grid.g4 { grid-template-columns: repeat(4, 1fr); }
  .grid.g5 { grid-template-columns: repeat(5, 1fr); }
  .grid.g6 { grid-template-columns: repeat(6, 1fr); }
}
.row { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; margin-bottom: 1.5rem; }
.row > * { flex: 1 1 260px; min-width: 0; }
.row > .btns { flex-basis: 100%; }
.stack > * + * { margin-top: .4rem; }
.col { min-width: 0; }

.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; border: 1px solid var(--line); transition: transform .2s ease, box-shadow .2s ease; min-width: 0; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card.soft { background: var(--tint); box-shadow: none; }
.card.dark { background: linear-gradient(160deg, var(--primary), var(--primary-deep)); color: #e6f0f2; border: 0; }
.card > :last-child, .rt > :last-child, .ibox > :last-child { margin-bottom: 0; }
/* Karten im Raster mit Knopf am Schluss: Knopf sitzt unten, damit alle Knöpfe einer Reihe auf gleicher Höhe stehen */
.grid > .card:has(> p.btns:last-child) { display: flex; flex-direction: column; }
.grid > .card > p.btns:last-child { margin-top: auto; padding-top: 12px; justify-content: center; text-align: center; }
.sec.dark .card:not(.dark) { color: var(--text); }
.sec.dark .card:not(.dark) :is(h2, h3, h4) { color: var(--heading); }
.sec.dark .card:not(.dark) a:not(.btn) { color: var(--primary); }

/* ---------- content widgets ---------- */
.rt { margin-bottom: 1rem; }
.rt ul, .rt ol { padding-left: 1.2em; margin: 0 0 1em; }
.rt li { margin: .2em 0; }
.rt img { border-radius: var(--radius); }
.rt.center > * { margin-left: auto; margin-right: auto; }
.btns { display: flex; flex-wrap: wrap; gap: 14px; margin: 1.2rem 0 1rem; }
.btns.center { justify-content: center; }
.btns.right { justify-content: flex-end; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; background: var(--btn); color: var(--primary-deep); padding: .85em 1.6em; border-radius: 8px; font-weight: 600; text-decoration: none; border: 0; cursor: pointer; font: 600 1rem/1.2 var(--font); transition: background .2s ease, transform .2s ease; }
.btn:hover { background: var(--btn-hover); color: var(--primary-deep); transform: translateY(-1px); }
.sec.dark .btn, .card.dark .btn { background: var(--accent); color: var(--primary-deep); }
.sec.dark .btn:hover, .card.dark .btn:hover { background: #e0a93c; }

figure.img { margin: 0 0 1.5rem; }
figure.img img { width: 100%; border-radius: var(--radius); }
figure.img.center img { margin: 0 auto; width: auto; }
figure.img figcaption { font-size: .8rem; margin-top: .5em; overflow-wrap: anywhere; }
.card figure.img img { border-radius: 8px; }

.ibox { margin-bottom: 1rem; }
.ibox.center .ico { margin-left: auto; margin-right: auto; }
.ibox .ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; margin-bottom: 14px; }
.ibox .ico svg { width: 26px; height: 26px; fill: currentColor; }
.ibox h3 { font-size: 1.15rem; margin-bottom: .4em; }
.ibox h3 a { color: inherit; text-decoration: none; }

.imgbox { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; height: 100%; text-align: center; transition: transform .2s ease, box-shadow .2s ease; }
.imgbox:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.imgbox img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.imgbox h3 { font-size: 1.1rem; margin: 1rem 1rem .4rem; }
.imgbox h3 a { color: var(--heading); text-decoration: none; }
.imgbox p { margin: 0 1rem 1.2rem; font-size: .93rem; }
.card .imgbox { box-shadow: none; }

.ilist { list-style: none; padding: 0; margin: 0 0 1rem; }
.ilist li { padding: .3em 0; }
.ilist.inline { display: flex; flex-wrap: wrap; gap: .5em 1.6em; }
.ilist.center { justify-content: center; text-align: center; }

.stat { text-align: center; padding: .6rem; }
.stat strong { display: block; font: 700 clamp(2rem, 4vw, 2.8rem)/1.1 var(--font-head); color: var(--heading); }
.sec.dark .stat strong, .card.dark .stat strong { color: var(--accent); }
.stat .lbl { display: block; margin-top: .3em; font-size: .95rem; }

.faq { display: grid; gap: 12px; margin-bottom: 1.5rem; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; padding: 1.05em 3em 1.05em 1.3em; font-weight: 600; color: var(--heading); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.2em; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details .rt { padding: 0 1.3em 1.1em; margin: 0; color: var(--text); }

.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.map iframe { display: block; width: 100%; height: 380px; border: 0; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: 0 1px 0 var(--line); }
.topbar { background: #fff; font-size: .95rem; }
.topbar-in { display: flex; justify-content: flex-end; align-items: center; gap: 1rem; min-height: 46px; }
.nav-top { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.8rem; }
.nav-top a { color: var(--primary); text-decoration: none; }
.nav-top a:hover, .nav-top a[aria-current] { color: var(--primary-deep); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.nav-top a[aria-current] { font-weight: 700; }
.search-btn { background: none; border: 0; cursor: pointer; color: var(--primary); padding: 6px; display: grid; }
.search-btn svg { width: 22px; height: 22px; }
.mainbar { background: #f4f7fb; }
.mainbar-in { display: flex; align-items: center; gap: 1.5rem; min-height: 84px; }
.logo img { width: 112px; height: auto; }
.nav { display: flex; align-items: center; gap: 1.5rem; margin-left: auto; }
.nav-main { list-style: none; margin: 0; padding: 0; display: flex; gap: .6rem; }
.nav-main > li { position: relative; display: flex; align-items: center; }
.nav-main > li > a { color: #333; text-decoration: none; padding: .9em .2em .9em .5em; font-size: .97rem; white-space: nowrap; }
@media (min-width: 1101px) and (max-width: 1320px) { .nav-main { gap: .2rem; } .nav-main > li > a { font-size: .9rem; padding-left: .3em; } }
.nav-main > li.active > a, .nav-main > li > a:hover { color: var(--primary); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.sub-toggle { background: none; border: 0; padding: 4px; cursor: pointer; color: #555; display: grid; }
.chev { width: 16px; height: 16px; transition: transform .2s; }
.sub { list-style: none; margin: 0; padding: .5rem 0; position: absolute; top: 100%; left: 0; min-width: 280px; background: #fff; border-radius: 10px; box-shadow: var(--shadow-lift); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s ease; }
.sub a { display: block; padding: .55em 1.2em; color: var(--text); text-decoration: none; font-size: .95rem; }
.sub a:hover, .sub a[aria-current] { background: var(--tint); color: var(--primary); }
.has-sub:hover > .sub, .has-sub:focus-within > .sub, .has-sub.open > .sub { opacity: 1; visibility: visible; transform: none; }
.has-sub.open .chev { transform: rotate(180deg); }
.btn-cta { border-radius: 999px; padding: .8em 1.8em; }
.nav-top-mobile { display: none; }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.menu-btn span { display: block; height: 2px; background: var(--primary); margin: 5px 0; transition: .2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1100px) {
  .topbar .nav-top { display: none; }
  .topbar-in { min-height: 0; position: absolute; right: 70px; top: 26px; }
  .mainbar { background: #fff; }
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 24px 1.5rem; box-shadow: 0 12px 24px rgba(0,0,0,.08); max-height: calc(100vh - 90px); overflow-y: auto; }
  .nav.open { display: flex; }
  .nav-main { flex-direction: column; gap: 0; }
  .nav-main > li { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .nav-main > li > a { flex: 1; padding: .9em 0; }
  .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; display: none; flex-basis: 100%; padding: 0 0 .6rem .8rem; }
  .has-sub:hover > .sub, .has-sub:focus-within > .sub { display: none; }
  .has-sub.open > .sub { display: block; }
  .nav-top-mobile { display: flex; flex-direction: column; gap: 0; margin: .8rem 0; }
  .nav-top-mobile a { display: block; padding: .5em 0; }
  .btn-cta { align-self: flex-start; }
}

/* ---------- search ---------- */
.search { position: fixed; inset: 0; background: rgba(2, 30, 36, .6); z-index: 200; display: grid; place-items: start center; padding: 10vh 16px 16px; }
.search[hidden] { display: none; }
.search-box { position: relative; width: min(680px, 100%); background: #fff; border-radius: 14px; padding: 18px; box-shadow: var(--shadow-lift); }
.search-box input { width: 100%; font: inherit; font-size: 1.15rem; padding: .7em 2.6em .7em .9em; border: 1px solid var(--line); border-radius: 10px; }
.search-close { position: absolute; right: 26px; top: 24px; border: 0; background: none; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--text); }
.search-results { list-style: none; margin: .8rem 0 0; padding: 0; max-height: 60vh; overflow: auto; }
.search-results a { display: block; padding: .7em .8em; border-radius: 8px; text-decoration: none; color: var(--heading); font-weight: 600; }
.search-results a span { display: block; font-weight: 400; color: var(--text); font-size: .9rem; }
.search-results a:hover, .search-results a:focus { background: var(--tint); }

/* ---------- form ---------- */
.lead-form { display: grid; gap: 1.1rem; background: #fff; color: var(--text); padding: clamp(20px, 3vw, 32px); border-radius: var(--radius); box-shadow: var(--shadow); text-align: left; }
.lead-form fieldset { border: 0; margin: 0; padding: 0; }
.lead-form legend, .lead-form .field > label { display: block; font-weight: 600; color: var(--heading); margin-bottom: .45em; }
.lead-form input[type=text], .lead-form input[type=email], .lead-form input[type=tel], .lead-form textarea { width: 100%; font: inherit; padding: .75em .9em; border: 1px solid #cfdbe2; border-radius: 8px; background: #fbfdfe; }
.lead-form input:focus, .lead-form textarea:focus { border-color: var(--primary); outline: 2px solid rgba(4,57,117,.18); }
.lead-form .opt { display: flex; gap: .6em; align-items: flex-start; padding: .25em 0; cursor: pointer; }
.lead-form .opt input { margin-top: .35em; accent-color: var(--primary); }
.lead-form .field-row { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.lead-form .req { color: #c0392b; }
.lead-form .hp { position: absolute; left: -9999px; }
.lead-form .btn { justify-self: start; }
.lead-form .invalid { border-color: #c0392b !important; }
.lead-form fieldset.invalid legend { color: #c0392b; }
.form-msg { margin: 0; font-weight: 600; }
.form-msg.ok { color: #1e7e34; }
.form-msg.err { color: #c0392b; }
.form-done { background: #fff; color: var(--text); padding: clamp(20px, 3vw, 32px); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 4px solid var(--accent); text-align: left; }
.form-done:focus { outline: none; }
.form-done h3 { margin-top: 0; }
.form-done p:last-child { margin-bottom: 0; }
.form-done a[href^="tel:"], .form-msg a[href^="tel:"] { white-space: nowrap; }

/* ---------- footer ---------- */
.site-footer { background: #f4f7fb; border-top: 1px solid var(--line); font-size: .95rem; }
.foot-grid { display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr 1fr; padding-top: 56px; padding-bottom: 40px; }
.site-footer h2 { font-size: 1.05rem; margin-bottom: .8em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .35em 0; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--primary); text-decoration: underline; }
.site-footer address { font-style: normal; margin-bottom: .8em; }
.foot-logo img { width: 140px; margin-bottom: .8rem; }
.social { display: flex; gap: .6rem; margin-top: 1rem; }
.social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff; }
.social a:hover { background: var(--accent); color: var(--primary-deep); }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.foot-bottom { border-top: 1px solid var(--line); }
.foot-bottom-in { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding-top: 18px; padding-bottom: 18px; }
.foot-bottom p { margin: 0; }
.foot-bottom ul { display: flex; gap: 1.4rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } .sec.hero { min-height: 420px; } .card { padding: 22px; } }

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

/* ---------- responsive fixes for authored inline layouts ---------- */
.rt, .rt * { min-width: 0; }
:is(.card, .contact-form-wrapper, .contact-info) > .lead-form { padding: 0; box-shadow: none; }
.search-box input::-webkit-search-cancel-button { display: none; }
@media (max-width: 700px) {
  .rt table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .rt [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .rt [style*="display: flex"], .rt [style*="display:flex"] { flex-wrap: wrap !important; }
  .rt [style*="padding: 30px"], .rt [style*="padding:30px"] { padding: 20px !important; }
}

/* ---------- accent (orange) blocks & contrast ---------- */
.sec.hero :is(h5, h6) { color: var(--accent); }
.sec.accent, .card.accent { background: var(--accent); color: var(--primary-deep); }
.card.accent { border: 0; }
.sec.accent :is(h1, h2, h3, h4, h5, h6), .card.accent :is(h1, h2, h3, h4, h5, h6) { color: var(--primary-deep); }
.sec.accent .rt *, .card.accent .rt * { color: var(--primary-deep) !important; }
.sec.accent .btn, .card.accent .btn { background: var(--primary); color: #fff; }
.sec.accent .btn:hover, .card.accent .btn:hover { background: var(--primary-deep); color: #fff; }
/* brand orange as text on light backgrounds is too faint: use a darker amber */
.sec:not(.dark):not(.hero):not(.accent) .card:not(.dark) [style*="color: #d19526" i],
.sec:not(.dark):not(.hero):not(.accent) > .wrap > .rt [style*="color: #d19526" i],
.sec:not(.dark):not(.hero):not(.accent) .rt [style*="background: #fff"] [style*="color: #d19526" i],
.sec:not(.dark):not(.hero):not(.accent) .rt [style*="background:#fff"] [style*="color:#d19526" i] { color: #8a5c0c !important; }
.sec:not(.dark):not(.hero):not(.accent) .rt [style*="color: #d19526" i]:not([style*="background"]),
.sec:not(.dark):not(.hero):not(.accent) .rt [style*="color:#d19526" i]:not([style*="background"]) { color: #8a5c0c !important; }
.rt [style*="background: #d19526" i][style*="color: #fff" i],
.rt [style*="background:#d19526" i][style*="color:#fff" i] { color: var(--primary-deep) !important; }
.sec:not(.dark):not(.hero) .rt :is([style*="color: #047857" i], [style*="color: #1e7e45" i], [style*="color:#047857" i], [style*="color:#1e7e45" i]) { color: #0b7a55 !important; }
.split { display: grid; gap: 32px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 2fr 3fr; } }
.stack > .card + .card { margin-top: 16px; }
.map-consent { min-height: 300px; display: grid; place-content: center; justify-items: center; gap: .3rem; text-align: center; padding: 24px; background: var(--tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 20h40M20 0v40' stroke='%23d6e4ea' stroke-width='1'/%3E%3C/svg%3E"); }
.map-consent p { margin: 0 0 .4rem; max-width: 420px; }
.map-consent .btn { margin-top: .4rem; }
.sec.hero .btns { justify-content: center; }
.num { font: 700 2.4rem/1 var(--font-head); color: var(--primary); margin: 0 0 .5rem; }

/* check-mark bullets (copy no longer types ✓ by hand) */
.ilist > li, .rt ul[style*="list-style: none"] > li, .rt ul[style*="list-style:none"] > li { position: relative; padding-left: 1.7em !important; }
.ilist > li::before, .rt ul[style*="list-style: none"] > li::before, .rt ul[style*="list-style:none"] > li::before { content: ""; position: absolute; left: .1em; top: .62em; width: .9em; height: .5em; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }
.ilist.inline > li { padding-left: 1.5em !important; }

/* reference projects */
.ref { border-top: 4px solid var(--accent); }
.ref .ref-kwp { font: 700 1.9rem/1.1 var(--font-head); color: var(--primary); margin: 0 0 .5rem; }
.ref h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.ref p:last-child { font-size: .95rem; margin: 0; }

/* streamline: buttons follow their centred heading; calmer spacing */
.sec:has(> .wrap > :is(h1, h2).center) > .wrap > .btns,
.sec:has(> .wrap > :is(h1, h2).center) > .wrap > .row > .btns { justify-content: center; }
.sec.dark .btns, .sec.accent > .wrap > .btns { justify-content: center; }
.sec { padding: clamp(48px, 6vw, 80px) 0; }
.sec.hero { min-height: 460px; }
.sec > .wrap > :last-child, .sec > .wrap > .row:last-child, .sec > .wrap > .grid:last-child { margin-bottom: 0; }
.rt [style*="margin-bottom: 40px"], .rt [style*="margin-bottom:40px"] { margin-bottom: 24px !important; }
.rt [style*="padding: 60px 0"] { padding: 32px 0 !important; }
@media (max-width: 520px) { .btns .btn { flex: 1 1 100%; } }
.map-consent { min-height: 220px; }

/* components that replace WordPress inline styling */
.ilist { list-style: none; padding: 0; }
.badge { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: var(--primary); color: #fff; font: 700 1.3rem/1 var(--font-head); }
.logos { display: flex; flex-wrap: wrap; gap: 20px 32px; justify-content: center; align-items: center; }
.logos img, img.logo { height: 36px; width: auto; }
.intro { padding: 8px 0 24px; }
.intro img { margin: 20px auto; border-radius: var(--radius); }
.tablewrap { overflow-x: auto; max-width: 820px; margin: 0 auto 1.5rem; }
.rt table { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(4,57,117,.08); font-size: .95rem; }
.rt table tr.th, .rt table thead tr { background: var(--primary); color: #fff; }
.rt table tr.th :is(th, td), .rt table thead th { color: #fff; border-bottom: 0; }
.rt table tr.hl { background: var(--tint); }
.rt table tr.tot { font-weight: 700; color: var(--primary); }
.rt table .r { text-align: right; white-space: nowrap; }
/* long amounts ("CHF 4'500 + 100 pro kW") may wrap on phones so the label column keeps its width */
@media (max-width: 600px) { .rt table td.r { white-space: normal; min-width: 7.5em; } }
.card.soft { background: var(--tint); border-color: transparent; box-shadow: none; }
.card .rt h3, .card .rt h4 { margin-top: 0; }
.aud-card { text-decoration: none; color: var(--text); border-top: 4px solid var(--accent); }
.aud-card h3 { font-size: 1.05rem; color: var(--primary); margin-bottom: .3rem; }
.aud-card p { margin: 0; font-size: .95rem; }
.aud-card:hover { color: var(--text); }
/* step cards: number + duration on one line */
.card > .row:has(> .num) { flex-wrap: nowrap; align-items: center; gap: 14px; margin-bottom: .6rem; }
.card > .row:has(> .num) > * { flex: 0 0 auto; margin: 0; }
.card > .row:has(> .num) .rt { background: var(--tint); color: var(--primary); border-radius: 999px; padding: .2em .8em; font-size: .85rem; }
.card > .row:has(> .num) .num { margin: 0; }
/* phone number in CTA bands */
.sec.dark .rt a[href^="tel:"] { display: inline-block; font: 700 clamp(1.6rem, 3vw, 2.2rem)/1.2 var(--font-head); color: var(--accent); text-decoration: none; margin-bottom: .4rem; }
.sec.dark .rt a[href^="tel:"]:hover { color: var(--btn-hover); }

/* narrow phones */
.foot-bottom ul { flex-wrap: wrap; gap: .4rem 1.2rem; }
.site-footer a, .site-footer address { overflow-wrap: anywhere; }
.rt, .card p, .card li, .ilist li { hyphens: auto; overflow-wrap: break-word; }
@media (max-width: 520px) { .card .card, .grid.card > .card { padding: 16px; } .grid.card { padding: 16px; } }

/* Solarrechner */
.calc { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .calc { grid-template-columns: 1.1fr 1fr; } .calc-out { position: sticky; top: 150px; } }
.calc h2 { font-size: 1.4rem; }
.calc .field { margin-bottom: 1.2rem; border: 0; padding: 0; }
.calc label, .calc legend { display: block; font-weight: 600; color: var(--heading); margin-bottom: .4rem; }
.calc output { color: var(--primary); font-weight: 700; }
.calc input[type=range] { width: 100%; accent-color: var(--primary); height: 28px; }
.calc input[type=number] { width: 100%; font: inherit; padding: .55em .7em; border: 1px solid #cfdbe2; border-radius: 8px; }
.calc .hint { font-size: .88rem; margin: .3rem 0 0; }
.calc .seg { display: flex; flex-wrap: wrap; gap: 8px; }
.calc .seg label { margin: 0; font-weight: 500; border: 1px solid #cfdbe2; border-radius: 999px; padding: .45em 1em; cursor: pointer; color: var(--text); }
.calc .seg input { accent-color: var(--primary); margin-right: .35em; }
.calc .seg label:has(input:checked) { border-color: var(--primary); background: var(--tint); color: var(--primary); }
.calc .opt { display: flex; gap: .6em; align-items: center; font-weight: 600; color: var(--heading); margin: .2rem 0 1rem; }
.calc .assume summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.calc .assume[open] summary { margin-bottom: .8rem; }
.calc .field-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin: 0 0 1rem; }
.kpis div { border-bottom: 1px solid rgba(255,255,255,.15); padding-bottom: .5rem; }
.kpis dt { font-size: .85rem; color: #cfdcef; }
.kpis dd { margin: .1rem 0 0; font: 700 1.35rem/1.2 var(--font-head); color: #fff; }
.kpis .big { grid-column: 1 / -1; }
.kpis .big dd { font-size: 2.2rem; color: var(--accent); }
.calc-out .note { font-size: .88rem; color: #cfdcef; }
.calc-mail { margin-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.15); padding-top: 1rem; }
.calc-mail summary { cursor: pointer; font-weight: 600; color: #fff; }
.calc-mail[open] summary { margin-bottom: .8rem; }
.calc-mail form > p:first-child { font-size: .95rem; color: #cfdcef; }
.calc-mail label { color: #fff; }
.calc-mail .opt { color: #fff; align-items: flex-start; font-weight: 500; font-size: .92rem; margin: 0 0 .7rem; }
.calc-mail .opt input { margin-top: .3em; accent-color: var(--accent); }
.calc-mail input[type=email] { width: 100%; font: inherit; padding: .7em .85em; border: 1px solid rgba(255,255,255,.4); border-radius: 8px; background: #fff; color: var(--text); }
.calc-mail .hp { position: absolute; left: -9999px; }
.calc-mail .invalid { border-color: #ff8a80 !important; }
.calc-mail .opt.invalid span { color: #ffb3ab; }
.calc-out .calc-mail .btn { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.75); margin: .2rem 0 .6rem; }
.calc-out .calc-mail .btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.calc-mail .form-msg.ok { color: #9be7a8; }
.calc-mail .form-msg.err { color: #ffb3ab; }
.calc-mail .form-done { margin-top: .4rem; }

/* lead form: choice tiles and chips */
.lead-form legend .hint, .lead-form label .hint { font-weight: 400; font-size: .85rem; color: var(--text); margin-left: .4em; }
.lead-form input::placeholder { color: #7a8596; }
.tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tile, .chip { position: relative; cursor: pointer; margin: 0 !important; }
.tile input, .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tile > span { display: block; height: 100%; padding: 12px 14px 12px 40px; border: 1.5px solid #cfdbe2; border-radius: 10px; background: #fff; transition: border-color .15s, background .15s; }
.tile > span::before { content: ""; position: absolute; left: 14px; top: 15px; width: 16px; height: 16px; border: 1.5px solid #9aa9b8; border-radius: 4px; background: #fff; }
.tile strong { display: block; color: var(--heading); font-weight: 700; line-height: 1.3; }
.tile small { display: block; font-size: .85rem; color: var(--text); line-height: 1.35; margin-top: 2px; }
.chip > span { display: inline-block; padding: .5em 1em; border: 1.5px solid #cfdbe2; border-radius: 999px; background: #fff; color: var(--heading); font-weight: 600; font-size: .95rem; transition: border-color .15s, background .15s; }
.tile:hover > span, .chip:hover > span { border-color: var(--primary); }
.tile input:checked + span, .chip input:checked + span { border-color: var(--primary); background: var(--tint); box-shadow: inset 0 0 0 1px var(--primary); }
.tile input:checked + span::before { background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; border-color: var(--primary); }
.chip input:checked + span::before { content: "✓ "; }
.tile input:focus-visible + span, .chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.lead-form fieldset.invalid .tile > span, .lead-form fieldset.invalid .chip > span { border-color: #c0392b; }
.lead-form .field-row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }

/* ==========================================================================
   Modern layer + scroll motion (motion.js). Hidden states live under html.motion.
   ========================================================================== */
h1, h2 { font-weight: 800; letter-spacing: -.025em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.8rem); line-height: 1.08; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.7rem); line-height: 1.12; }
h3 { letter-spacing: -.01em; }
.btn { border-radius: 999px; }
.imgbox img { transition: transform .6s var(--ease); }
.imgbox:hover img { transform: scale(1.04); }
.imgbox > a { display: block; overflow: hidden; }

/* kicker line above a heading */
.kicker { display: flex; align-items: center; gap: .7em; margin: 0 0 .8rem; font: 700 .8rem/1.2 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--primary); }
.kicker::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: var(--accent); flex: none; }
.kicker.center { justify-content: center; }
.sec.dark .kicker, .ptile .kicker { color: #fff; }

/* frosted sticky header */
.site-header { background: rgba(255,255,255,.86); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); transition: box-shadow .3s ease; }
.topbar, .mainbar { background: transparent; }
.scrolled .site-header { box-shadow: 0 8px 30px rgba(4,57,117,.10); }
@media (max-width: 1100px) { .mainbar { background: transparent; } .nav { background: #fff; } }

/* dark sections: soft gold and navy light instead of a flat gradient */
.sec.dark { overflow: clip; }
.sec.dark::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(50% 60% at 88% 0%, rgba(209,149,38,.20), transparent 70%),
              radial-gradient(45% 55% at 0% 100%, rgba(80,140,220,.18), transparent 70%); }
.sec.dark > .wrap { position: relative; }

/* hero: content rises in on load, stats strip */
.sec.hero { min-height: min(86vh, 760px); }
.sec.hero > .wrap > * { animation: rise .9s var(--ease) both; }
.sec.hero > .wrap > :nth-child(2) { animation-delay: .12s; }
.sec.hero > .wrap > :nth-child(3) { animation-delay: .24s; }
.sec.hero > .wrap > :nth-child(4) { animation-delay: .4s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.hero-stats { list-style: none; margin: 2.4rem auto 0; padding: 0; max-width: 900px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-radius: 18px; overflow: hidden;
  background: rgba(2,36,82,.45); border: 1px solid rgba(255,255,255,.18); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hero-stats li { padding: 1rem 1.2rem; text-align: center; }
.hero-stats li + li { border-left: 1px solid rgba(255,255,255,.14); }
.hero-stats strong { display: block; font: 800 1.35rem/1.2 var(--font-head); color: #fff; }
.hero-stats span.lbl { display: block; font-size: .9rem; color: #e1e9f4; }
@media (max-width: 640px) { .hero-stats li + li { border-left: 0; border-top: 1px solid rgba(255,255,255,.14); } }

/* reveals */
.motion .rv { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.motion .rv.in { opacity: 1; transform: none; }

/* bento of problem tiles (image card with text over a navy fade) */
.bento { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) {
  .bento { grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(250px, auto); }
  .bento > .wide { grid-column: span 2; }
  .bento > .big { grid-column: span 2; grid-row: span 2; }
}
.ptile { position: relative; isolation: isolate; overflow: hidden; border-radius: 20px; min-height: 250px; display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; color: #e8eef7; background: var(--primary-deep); box-shadow: var(--shadow); }
.ptile > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s var(--ease); }
.ptile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(2,36,82,.95) 0%, rgba(2,36,82,.72) 45%, rgba(2,36,82,.15) 100%); }
.ptile:hover > img { transform: scale(1.05); }
.ptile h3 { color: #fff; font-size: 1.35rem; margin: 0 0 .35rem; }
.ptile.big h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.ptile h3 a { color: inherit; text-decoration: none; }
.ptile h3 a::after { content: ""; position: absolute; inset: 0; }
.ptile p { margin: 0; max-width: 46ch; }
.ptile .kicker { margin-bottom: .5rem; font-size: .72rem; }
.ptile .go { margin-top: .9rem; font-weight: 700; color: #fff; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.ptile:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.ptile.cta { background: linear-gradient(150deg, var(--primary), var(--primary-deep)); justify-content: center; }
.ptile.cta::before { background: radial-gradient(70% 80% at 100% 0%, rgba(209,149,38,.28), transparent 70%); }
.ptile.cta .btns { margin-bottom: 0; }
.ptile.cta .btn { position: relative; z-index: 1; }

/* story: a pinned scene that builds up while the steps scroll past */
.story { display: grid; gap: 28px; margin-top: 2rem; }
.story-stage svg { width: 100%; height: auto; display: block; }
.story-steps { list-style: none; margin: 0; padding: 0; counter-reset: st; }
.story-steps li { padding: 22px 24px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); margin-bottom: 14px; transition: opacity .5s ease, background .5s ease, border-color .5s ease; }
.story-steps li.on { background: rgba(255,255,255,.11); border-color: rgba(209,149,38,.7); }
.story-steps h3 { margin: 0 0 .35rem; }
.story-steps p { margin: 0; }
.story-steps .kicker { margin-bottom: .5rem; }
.motion .story-steps li { opacity: .38; }
.motion .story-steps li.on { opacity: 1; }
@media (min-width: 900px) {
  .story { grid-template-columns: 1.15fr 1fr; align-items: start; gap: 56px; }
  .story-stage { position: sticky; top: calc(50vh - 190px); }
  .motion .story-steps li { margin: 0 0 32vh; }
  .motion .story-steps li:first-child { margin-top: 18vh; }
  .motion .story-steps li:last-child { margin-bottom: 18vh; }
}
@media (max-width: 899px) {
  .motion .story-stage { position: sticky; top: 84px; z-index: 2; padding: 8px 0; background: linear-gradient(180deg, #032c5f 85%, rgba(3,44,95,0)); }
  .motion .story-stage svg { max-height: 36vh; margin: 0 auto; }
  .motion .story-steps li { margin-bottom: 30vh; }
  .motion .story-steps li:last-child { margin-bottom: 4vh; }
}
/* scene parts */
.scene .ln { fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.scene .soft { stroke: rgba(255,255,255,.35); }
.scene .fill { fill: #0b4a92; }
.scene .fill2 { fill: #063267; }
.scene .gold { fill: var(--accent); }
.scene .panel { fill: #0d2b55; stroke: var(--accent); stroke-width: 1.5; }
.scene .flow { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 10; }
.scene .lbl { fill: #dbe5f2; font: 600 15px/1 var(--font); }
.scene .win { fill: #0b2346; transition: fill .8s ease; }
.scene .spin { transform-box: fill-box; transform-origin: center; animation: spin 14s linear infinite; }
.scene .fan { transform-box: fill-box; transform-origin: center; animation: spin 1.6s linear infinite; }
.scene .flow { animation: flow 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flow { to { stroke-dashoffset: -24; } }
.motion .scene [data-step] { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.motion .scene [data-step].on { opacity: 1; transform: none; }

/* numbered steps with a line that fills on scroll */
.steps { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 28px; position: relative; --p: 1; }
.motion .steps { --p: 0; }
.steps > li { position: relative; padding-left: 76px; }
.steps .num { position: absolute; left: 0; top: 0; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line); font-size: 1.1rem; margin: 0; z-index: 1; transition: background .4s ease, border-color .4s ease; }
.steps h3 { margin: .7rem 0 .35rem; }
.steps p { margin: 0; }
.steps::before, .steps::after { content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 3px; border-radius: 2px; background: var(--line); }
.steps::after { background: var(--accent); transform-origin: top; transform: scaleY(var(--p)); }
html:not(.motion) .steps .num, .steps > li.in .num { border-color: var(--accent); }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(var(--n, 3), 1fr); gap: 32px; }
  .steps > li { padding: 76px 0 0; text-align: left; }
  .steps::before, .steps::after { left: 28px; right: 28px; top: 27px; bottom: auto; width: auto; height: 3px; }
  .steps::after { transform-origin: left; transform: scaleX(var(--p)); }
}

/* partner marquee */
.marquee { display: flex; overflow: hidden; gap: 0; margin-top: 1.6rem; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee > ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 3.5rem; flex: none; }
.marquee.run > ul { flex-wrap: nowrap; padding-right: 3.5rem; animation: marquee 28s linear infinite; }
.marquee.run:hover > ul { animation-play-state: paused; }
.marquee li { font: 800 clamp(1.4rem, 2.6vw, 2rem)/1.4 var(--font-head); color: var(--primary); opacity: .55; letter-spacing: -.02em; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* mobile action bar */
.actionbar { display: none; }
@media (max-width: 899px) {
  .actionbar { display: flex; gap: 10px; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90; padding: 8px; border-radius: 999px; background: rgba(2,36,82,.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgba(2,36,82,.35); transform: translateY(140%); transition: transform .45s var(--ease); }
  .actionbar.show { transform: none; }
  .actionbar > * { flex: 1; text-align: center; padding: .8em 1em; }
  .actionbar .ab-call { color: #fff; font-weight: 700; text-decoration: none; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); }
  .site-footer { padding-bottom: 80px; }
}
.scene .ray { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.scene .lbl.sm { font-size: 12px; }
.scene .warm { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.scene .moon { fill: #dbe5f2; }
/* data-until parts belong to an earlier step; without motion the scene shows its final state */
html:not(.motion) .scene [data-until] { display: none; }

/* ---------- scroll experience, site-wide ---------- */
/* reading progress */
.readbar { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 120; background: var(--accent); transform-origin: left; transform: scaleX(0); pointer-events: none; }
/* hero: background drifts slower than the page (desktop, set by motion.js) */
.sec.hero { background-image: none; overflow: clip; }
.sec.hero::after { content: ""; position: absolute; inset: -14% 0; z-index: -2; background: var(--bg) center / cover no-repeat; transform: translate3d(0, var(--hy, 0px), 0); }
.sec.hero > .wrap { will-change: transform, opacity; }
/* images settle into place when their block is revealed */
.motion .rv figure.img img, .motion figure.img.rv img { transform: scale(1.06); transition: transform 1.4s var(--ease); }
/* keep the zoomed image inside its frame, otherwise it widens the page before it is revealed */
.motion figure.img { overflow: hidden; border-radius: var(--radius); }
.motion .card figure.img { border-radius: 8px; }
.motion .rv.in figure.img img, .motion figure.img.rv.in img { transform: none; }
/* table rows build up one after another */
.motion .rv tr { opacity: 0; transform: translateX(-14px); transition: opacity .5s ease, transform .5s var(--ease); transition-delay: calc(250ms + var(--r, 0) * 70ms); }
.motion .rv.in tr { opacity: 1; transform: none; }
/* FAQ answers open smoothly where the browser supports it */
:root { interpolate-size: allow-keywords; }
.faq details::details-content { block-size: 0; overflow: hidden; transition: block-size .4s var(--ease), content-visibility .4s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
.faq summary::after { transition: transform .3s var(--ease); }

/* step timeline: duration pill and 4/5 column variants */
.steps.n4 { --n: 4; }
.steps.n5 { --n: 5; }
.steps .dur { display: inline-block; margin: .7rem 0 0; background: var(--tint); color: var(--primary); border-radius: 999px; padding: .15em .8em; font-size: .85rem; font-weight: 600; }
.sec.tint .steps .dur { background: #fff; }
.steps .dur + h3 { margin-top: .5rem; }
.steps .rt { margin: 0; }

/* section navigation on long pages */
.secnav { position: sticky; top: 130px; z-index: 80; background: rgba(255,255,255,.9); -webkit-backdrop-filter: saturate(1.6) blur(12px); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--line); }
.secnav .wrap { display: flex; align-items: center; gap: 16px; min-height: 54px; }
.secnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.secnav ul::-webkit-scrollbar { display: none; }
.secnav a { display: block; white-space: nowrap; padding: .45em .95em; border-radius: 999px; color: var(--primary); text-decoration: none; font-weight: 600; font-size: .92rem; transition: background .25s ease, color .25s ease; }
.secnav a:hover { background: var(--tint); color: var(--primary); }
.secnav a[aria-current] { background: var(--primary); color: #fff; }
.secnav .btn { padding: .55em 1.2em; font-size: .92rem; flex: none; }
.has-secnav main h2[id] { scroll-margin-top: 210px; }
@media (max-width: 1100px) { .secnav { top: 84px; } .has-secnav main h2[id] { scroll-margin-top: 160px; } }
@media (max-width: 899px) {
  .secnav .btn { display: none; }
  .secnav .wrap { padding: 0 12px; min-height: 48px; }
  .motion .has-secnav .story-stage { top: 132px; }
}
/* Solarrechner live drawing */
.calc-vis { width: 100%; height: auto; margin: 0 0 1.2rem; }
.calc-vis .slot { fill: none; stroke: rgba(255,255,255,.22); stroke-width: 1; transition: fill .4s ease, stroke .4s ease; }
.calc-vis .slot.on { fill: #0d2b55; stroke: var(--accent); stroke-width: 1.4; }
.calc-vis .calc-sun { transition: transform .7s var(--ease); }
.calc-vis .calc-bat { opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s var(--ease); }
.calc-vis .calc-bat.on { opacity: 1; transform: none; }
.calc-vis .track { fill: rgba(255,255,255,.08); }
.calc-vis .bar { transform-box: fill-box; transform-origin: left; transition: transform .6s var(--ease); }
.calc-vis .bar.out { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.calc-vis .bar.use { fill: rgba(255,255,255,.25); }
.calc-vis .bar.self { fill: var(--accent); }

/* ---------- touch targets & contrast (WCAG 2.5.8, 1.4.3) ---------- */
.nav-top a, .site-footer li a, .foot-bottom a, .site-footer p a { display: inline-block; padding: .2em 0; }
.site-footer address a { display: inline-block; padding: .1em 0; }
.rt li > a:only-child { display: inline-block; padding: .15em 0; }
.secnav .btn, .secnav .btn:hover { color: var(--primary-deep); }
/* split.text: text column first and wider, aside on the right */
@media (min-width: 900px) { .split.text { grid-template-columns: 3fr 2fr; gap: 56px; align-items: center; } }
.split .col > h2 { margin-top: 0; }
/* paths: "where do you stand?" rows that link a situation to a service */
.paths { list-style: none; margin: 2rem 0 1.4rem; padding: 0; display: grid; gap: 0 40px; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .paths { grid-template-columns: 1fr 1fr; } }
.paths li { border-bottom: 1px solid var(--line); }
.paths a { display: grid; gap: .25rem; padding: 1.1rem 2.4rem 1.1rem 0; position: relative; text-decoration: none; color: var(--text); }
.paths strong { color: var(--heading); font-size: 1.12rem; line-height: 1.3; }
.paths span { font-size: .95rem; }
.paths a::after { content: ""; position: absolute; right: .5rem; top: 50%; width: 10px; height: 10px; border-top: 2.5px solid var(--accent); border-right: 2.5px solid var(--accent); transform: translateY(-50%) rotate(45deg); transition: right .25s var(--ease); }
.paths a:hover strong { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.paths a:hover::after { right: .2rem; }
.sec.hero .btns .btn[href^="tel:"] { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.75); }
.sec.hero .btns .btn[href^="tel:"]:hover { background: rgba(255,255,255,.12); color: #fff; }
.sec.hero .kicker { color: #fff; }
/* figure.chart: small explanatory line/area chart (inline SVG partial) */
.chart { margin: 0; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .ax { stroke: #9aa9b8; stroke-width: 1.5; }
.chart .gl { stroke: var(--line); stroke-width: 1; }
.chart .tk { fill: var(--text); font: 600 12px/1 var(--font); }
.chart .a-pv { fill: rgba(209,149,38,.16); }
.chart .a-self { fill: rgba(209,149,38,.55); }
.chart .l-pv { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.chart .l-load { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linejoin: round; }
.chart figcaption { font-size: .88rem; margin-top: .6rem; line-height: 1.7; }
.chart .key { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin: 0 .35em 0 .8em; vertical-align: baseline; }
.chart .key:first-child { margin-left: 0; }
.chart .k-load { background: var(--primary); height: 3px; vertical-align: middle; }
.chart .k-pv { background: rgba(209,149,38,.3); box-shadow: inset 0 0 0 1.5px var(--accent); }
.chart .k-self { background: rgba(209,149,38,.6); }
.motion .chart[data-draw] .l-load, .motion .chart[data-draw] .l-pv { stroke-dasharray: 1400; stroke-dashoffset: 1400; transition: stroke-dashoffset 1.8s var(--ease); }
.motion .chart[data-draw] :is(.a-pv, .a-self) { opacity: 0; transition: opacity 1s ease .9s; }
.motion .rv.in .chart[data-draw] .l-load, .motion .rv.in .chart[data-draw] .l-pv, .motion .chart[data-draw].rv.in .l-load, .motion .chart[data-draw].rv.in .l-pv { stroke-dashoffset: 0; }
.motion .rv.in .chart[data-draw] :is(.a-pv, .a-self), .motion .chart[data-draw].rv.in :is(.a-pv, .a-self) { opacity: 1; }
/* table.cmp: comparison table; rows become labelled blocks on phones (td needs data-label) */
.rt table.cmp tbody th { color: var(--heading); white-space: nowrap; }
@media (max-width: 700px) {
  .rt table.cmp { display: block; overflow: visible; background: none; box-shadow: none; }
  .rt table.cmp thead { display: none; }
  .rt table.cmp tbody, .rt table.cmp tr { display: block; }
  .rt table.cmp tr { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(4,57,117,.08); margin-bottom: 12px; padding: .4rem 0; }
  .rt table.cmp :is(th, td) { display: block; border: 0; padding: .3rem 1rem; }
  .rt table.cmp tbody th { font-size: 1.1rem; padding-top: .6rem; white-space: normal; }
  .rt table.cmp td::before { content: attr(data-label); display: block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
}
.rt table :is(th, td) > a:only-child { display: inline-block; padding: .2em 0; }
.chart .a-peak { fill: rgba(209,149,38,.6); }
.chart .l-cap { stroke: var(--primary-deep); stroke-width: 1.5; stroke-dasharray: 6 5; }
.chart .cap-lbl { fill: var(--primary-deep); }
.chart .k-peak { background: rgba(209,149,38,.6); }
.motion .chart[data-draw] .a-peak { opacity: 0; transition: opacity 1s ease .9s; }
.motion .rv.in .chart[data-draw] .a-peak, .motion .chart[data-draw].rv.in .a-peak { opacity: 1; }
.ilist li > a:only-child { display: inline-block; padding: .2em 0; }
/* split next to a form: aside starts at the top and stays in view on desktop */
.split:has(.lead-form) { align-items: start; }
@media (min-width: 900px) { .split:has(.lead-form) > .col > .card.soft { position: sticky; top: 150px; } }
/* photo credit inside a hero (CC / public-domain images) */
.sec.hero .credit { margin: 1rem 0 0; text-align: right; font-size: .75rem; color: rgba(255,255,255,.9); text-shadow: 0 1px 4px rgba(0,0,0,.5); }
@media (max-width: 640px) { .sec.hero .credit { text-align: center; } }
/* focus ring: gold is only ~2.6:1 on white, so light areas get navy, dark areas keep gold */
:focus-visible { outline-color: var(--primary-deep); }
.sec.dark :focus-visible, .sec.hero :focus-visible, .card.dark :focus-visible, .actionbar :focus-visible, .skip:focus-visible { outline-color: var(--accent); }
.tile input:focus-visible + span, .chip input:focus-visible + span, .ptile:focus-within { outline-color: var(--primary-deep); }
.sec.dark .tile input:focus-visible + span, .sec.dark .chip input:focus-visible + span, .sec.dark .ptile:focus-within { outline-color: var(--accent); }
/* steps: keep the line under the circles while a step is still animating
   (opacity/transform make the li its own stacking context, so .num's z-index alone is not enough) */
.steps::before, .steps::after { z-index: 0; }
.steps > li { z-index: 1; }

/* ===== Service detail pages (body.page-detail, set by build.py detail_page) ===== */
/* hero: left aligned, breadcrumb, shorter */
.sec.hero.detail { min-height: 460px; text-align: left; }
.sec.hero.detail::before { background: linear-gradient(90deg, rgba(2,36,82,.94) 0%, rgba(4,57,117,.82) 48%, rgba(4,57,117,.35) 100%); opacity: 1; }
.sec.hero.detail h1 { margin-left: 0; max-width: 17ch; font-size: clamp(2rem, 4.2vw, 3.2rem); }
.sec.hero.detail .rt { margin-left: 0; max-width: 58ch; }
.sec.hero.detail .btns { justify-content: flex-start; }
.sec.hero.detail .hero-stats { margin-left: 0; max-width: 780px; }
.sec.hero.detail .hero-stats li { text-align: left; }
.crumbs { display: flex; flex-wrap: wrap; gap: .2em .6em; margin: 0 0 1.1rem; font-size: .9rem; font-weight: 600; }
.crumbs a { color: #e1e9f4; text-decoration: none; padding: .2em 0; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs a + a::before { content: "/"; margin-right: .6em; color: var(--accent); }

/* headings and text: left aligned, readable line length */
.page-detail .sec:not(.hero):not(.dark) > .wrap > h2.center,
.page-detail .sec:not(.hero):not(.dark) > .wrap > .rt.center,
.page-detail .sec:not(.hero):not(.dark) > .wrap > .rt.center p { text-align: left; }
.page-detail .sec:not(.hero):not(.dark) > .wrap > h2 { max-width: 24ch; }
.page-detail .sec:not(.hero):not(.dark) > .wrap > .rt > :is(p, ul, ol, h3, h4) { max-width: 68ch; }
.page-detail .sec:not(.hero):not(.dark) > .wrap > h3.center { text-align: left; }
.page-detail .sec:not(.hero):not(.dark) > .wrap > :is(h2, h1).center + .rt.center { margin-left: 0; }

/* intro: text left, photo right */
@media (min-width: 900px) {
  .page-detail .sec.lead-split > .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 56px; align-items: start; }
  .page-detail .sec.lead-split > .wrap > * { grid-column: 1 / -1; }
  .page-detail .sec.lead-split > .wrap > :is(.kicker, h2, h2 + .rt) { grid-column: 1; }
  .page-detail .sec.lead-split > .wrap > figure.img { grid-column: 2; grid-row: 1 / span 2; margin: 0; align-self: center; }
  .page-detail .sec.lead-split > .wrap > figure.img img { aspect-ratio: 4 / 3; object-fit: cover; }
}
.page-detail .sec.lead-split > .wrap > figure.img img { aspect-ratio: 16 / 10; object-fit: cover; }

/* variant columns: open columns with a gold rule instead of boxes in a box */
.page-detail .grid.card { background: none; border: 0; box-shadow: none; padding: 0; margin-top: 2.6rem; gap: 32px 40px; }
.page-detail .grid.card:hover { transform: none; box-shadow: none; }
.page-detail .grid.g3.card > .card { background: none; border: 0; border-top: 3px solid var(--accent); border-radius: 0; box-shadow: none; padding: 1.1rem 0 0; }
.page-detail .grid.g3.card > .card:hover { transform: none; }
.page-detail .grid.card :is(h3, h4).center { text-align: left; }
.page-detail .grid.g3.card h4 { font: 600 .95rem/1.4 var(--font); color: var(--text); margin: -.2rem 0 .8rem; }

/* FAQ: heading on the left, questions on the right */
.faq-head p { margin: .2rem 0 0; }
@media (min-width: 900px) {
  .page-detail .sec.faqside > .wrap { max-width: var(--wrap); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 56px; align-items: start; }
  .page-detail .sec.faqside .faq-head { position: sticky; top: 140px; }
  .page-detail .sec.faqside .faq-head h2 { text-align: left; font-size: clamp(1.6rem, 2.4vw, 2rem); hyphens: auto; }
  .page-detail .sec.faqside > .wrap > .faq { margin-top: 0; }
}

/* sibling topics */
.page-detail .sec.more h2 { margin-bottom: 0; }
.page-detail .faq-head h2 { text-align: left; }
.faq-head a { white-space: nowrap; }
.page-detail .sec:not(.hero):not(.dark) > .wrap > .rt > :is(p, ul, ol, h3, h4) { margin-left: 0; margin-right: 0; }
@media (max-width: 520px) { .sec.hero.detail h1 { font-size: 1.8rem; hyphens: auto; -webkit-hyphens: auto; } }

/* ----- detail pages, lean pass ----- */
/* hero: one gold button, the second one outlined; figures as a plain strip */
.sec.hero.detail .btns .btn + .btn, .page-detail .sec.dark .btns .btn + .btn { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.75); }
.sec.hero.detail .btns .btn + .btn:hover, .page-detail .sec.dark .btns .btn + .btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.sec.hero.detail .hero-stats { background: none; border: 0; border-top: 1px solid rgba(255,255,255,.28); border-radius: 0; -webkit-backdrop-filter: none; backdrop-filter: none; margin-top: 2.2rem; }
.sec.hero.detail .hero-stats li { padding: 1rem 1.6rem 0 0; }
.sec.hero.detail .hero-stats li + li { border-left: 0; }

/* technique: three plain columns, no images */
.specs { margin-top: 2.2rem; gap: 32px 48px; }
.specs > div { border-top: 1px solid var(--line); padding-top: 1.2rem; min-width: 0; }
.specs h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.specs .rt { font-size: .97rem; }
.specs .rt ul { padding-left: 1.1em; }
.specs .rt li + li { margin-top: .25rem; }

/* FAQ and tables: lines instead of shadows */
.page-detail .faq { gap: 0; border-top: 1px solid var(--line); }
.page-detail .faq details { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; }
.page-detail .faq summary { padding-left: 0; }
.page-detail .faq details .rt { padding-left: 0; }
.page-detail .rt table { box-shadow: none; border: 1px solid var(--line); }
.page-detail .card.soft { border: 0; }
.page-detail .sec.tint .card.soft { background: var(--white); }
