/* ==========================================================================
   André Oberg Haustechnik – Stylesheet (handgeschrieben, kein Framework)
   1 Schriften & Tokens · 2 Basis · 3 Layout · 4 Kopf & Navigation
   5 Bausteine · 6 Seiten · 7 Fuß · 8 Dunkel-Modus · 9 Bewegung & Druck
   ========================================================================== */

/* ---------- 1 Schriften & Tokens --------------------------------------- */
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../fonts/ibm-plex-sans.woff2) format("woff2");
}
@font-face {
  font-family: "Source Serif 4"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../fonts/source-serif-4.woff2) format("woff2");
}

:root {
  /* Farbe – abgeleitet aus dem Logo-Blau #183D92 */
  --paper: #F4F6FA;  --paper-2: #E6EBF4;  --tint: #DCE6F8;
  --brand: #183D92;  --head: #0E2150;     --footer: #081534;
  --ink: #0E1A33;    --muted: #3F4A60;    --rule: #C9D2E3;
  --blue: #183D92;   --blue-deep: #0F2A66; --accent: #2A55C0;
  --on-deep: #F4F1EA; --on-deep-2: #B9C4E0; --focus: #183D92;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Größen (fluid, 360 → 1440 px) */
  --s--1: 0.8125rem;
  --s-0:  1.0625rem;
  --s-1:  clamp(1.1875rem, 1.12rem + 0.3vw, 1.375rem);
  --s-2:  clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  --s-3:  clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  --s-4:  clamp(2.25rem, 1.6rem + 2.8vw, 4rem);
  --s-5:  clamp(2.75rem, 1.5rem + 5.4vw, 6.25rem);

  /* Abstände */
  --gutter: clamp(1rem, 0.4rem + 2.6vw, 2.5rem);
  --sp-1: 0.5rem; --sp-2: 1rem; --sp-3: 1.5rem; --sp-4: 2.5rem;
  --sp-5: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
  --measure: 66ch;
  --wrap: 1240px;
  --head-h: 4.25rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 60em) { :root { --head-h: 5.5rem; } }
:root { interpolate-size: allow-keywords; }   /* erlaubt weiches Aufklappen (Fragen) */
@view-transition { navigation: auto; }        /* weiches Überblenden beim Seitenwechsel */
.site-head { view-transition-name: site-head; }   /* Kopfzeile bleibt dabei stehen */
::selection { background: var(--tint); color: var(--ink); }

/* ---------- 2 Basis ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 1rem); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font: var(--s-0)/1.62 var(--sans);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
img, iframe { display: block; max-width: 100%; }
h1, h2, h3, h4 {
  font-family: var(--serif); font-weight: 600; line-height: 1.1;
  letter-spacing: -0.012em; margin: 0; text-wrap: balance;
}
p { margin: 0 0 1.1em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; cursor: pointer; }
strong { font-weight: 600; }
figure { margin: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 1px; }
h1[tabindex="-1"]:focus { outline: none; }

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 200;
  background: var(--blue); color: #fff; padding: 0.75rem 1rem; text-decoration: none;
}
.skip:focus { top: 0.5rem; }

/* ---------- 3 Layout ---------------------------------------------------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.page { padding-block: var(--sp-4) var(--sp-5); animation: page-in 0.4s var(--ease); }
.page--flush { padding-block: 0; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.eyebrow {
  font-size: var(--s--1); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 var(--sp-2);
}
.crumb {
  display: inline-flex; gap: 0.5em; align-items: baseline;
  font-size: var(--s--1); font-weight: 500; letter-spacing: 0.06em;
  color: var(--muted); text-decoration: none; margin-bottom: var(--sp-4); padding-block: 0.4rem;
}
.crumb::before { content: "←"; transition: transform 0.2s var(--ease); }
.crumb:hover { color: var(--blue); text-decoration: underline; }
.crumb:hover::before { transform: translateX(-3px); }

.lead { font-size: var(--s-1); line-height: 1.5; }
.prose { max-width: var(--measure); }
.prose p { margin-bottom: 1.15em; }
.section-title { font-size: var(--s-3); margin-bottom: var(--sp-4); }

/* Buttons & Textlinks */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.95rem 1.5rem; border: 2px solid var(--blue); border-radius: 2px;
  background: var(--blue); color: #fff;
  font-weight: 500; text-decoration: none; letter-spacing: 0.01em;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(14, 26, 51, 0.18); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn--line { background: transparent; color: var(--blue); }
.btn--line:hover { background: var(--blue); color: #fff; }
.arrow-link {
  display: inline-flex; gap: 0.5em; align-items: baseline;
  font-weight: 500; text-decoration: none; color: var(--blue);
  border-bottom: 1px solid currentColor; padding: 0.45rem 0 0.3rem;
}
.arrow-link::after { content: "→"; transition: transform 0.2s var(--ease); }
.arrow-link:hover::after { transform: translateX(4px); }
.arrow-link--ext::after { content: "↗"; }
.wa-link {
  display: inline-flex; gap: 0.45em; align-items: center;
  font-weight: 500; text-decoration: none; color: var(--blue);
  border-bottom: 1px solid currentColor; padding: 0.45rem 0 0.3rem;
}
.wa-link svg { color: #25A244; flex: none; transition: transform 0.2s var(--ease); }
.wa-link:hover svg { transform: scale(1.12) rotate(-6deg); }
.band .wa-link { color: #fff; }
.band__actions { display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; align-items: center; margin: 0; }

/* ---------- 4 Kopf & Navigation ----------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 100;
  background: var(--head); color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  transition: box-shadow 0.3s;
}
.site-head.is-scrolled { box-shadow: 0 6px 24px rgba(8, 21, 52, 0.25); }
.site-head :focus-visible { outline-color: #fff; }
.site-head__bar {
  height: var(--head-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  transition: height 0.3s var(--ease);
}
.brand { display: flex; align-items: center; gap: 0.85rem; text-decoration: none; color: #fff; min-width: 0; }
.brand img { height: 2.4rem; width: auto; flex: none; transition: height 0.3s var(--ease); }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; white-space: nowrap; }
.brand__name { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; }
.brand__sub { font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: #C9D6F5; margin-top: 0.25rem; }
@media (max-width: 30em) { .brand__text { display: none; } }   /* schmale Handys: Logo reicht, Platz für Anruf-Knopf */

.nav { display: none; align-items: stretch; height: 100%; gap: 0.25rem; margin-left: auto; }
.nav__link {
  position: relative; display: inline-flex; align-items: center; padding: 0 1rem;
  background: none; border: 0; color: #fff; text-decoration: none; font-weight: 500; font-size: 0.975rem;
}
.nav__link::after {
  content: ""; position: absolute; left: 1rem; right: 1rem; bottom: 0; height: 3px;
  background: #fff; transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease);
}
.nav__link:hover::after, .nav__link[aria-current="page"]::after, .nav__link[aria-expanded="true"]::after { transform: scaleX(1); }
.nav__link--caret::before {
  content: ""; order: 2; margin-left: 0.5em; width: 0.4em; height: 0.4em;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.12em) rotate(45deg); transition: transform 0.2s;
}
.nav__link--caret[aria-expanded="true"]::before { transform: translateY(0.1em) rotate(225deg); }
.nav__phone {
  align-self: center; margin-left: 1rem; padding-left: 1.25rem; border-left: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.975rem; font-weight: 500; color: #fff; text-decoration: none; white-space: nowrap;
}
.nav__phone:hover { text-decoration: underline; }

/* Anruf-Knopf (nur Handy/Tablet) */
.head-call {
  display: inline-flex; align-items: center; gap: 0.45rem; margin-left: auto; padding: 0.55rem 0.8rem;
  background: rgba(255, 255, 255, 0.12); color: #fff; border-radius: 2px;
  font-weight: 500; font-size: 0.9375rem; text-decoration: none; transition: background 0.2s;
}
.head-call:hover { background: rgba(255, 255, 255, 0.22); }
@media (max-width: 340px) { .head-call span { display: none; } }

.menu-toggle {
  display: inline-flex; align-items: center; gap: 0.6rem; flex: none;
  background: none; border: 1px solid #fff; color: #fff; padding: 0.55rem 0.9rem;
  font-weight: 500; font-size: 0.9375rem; border-radius: 2px;
}
.menu-toggle__bars { width: 1.1rem; height: 0.7rem; position: relative; }
.menu-toggle__bars::before, .menu-toggle__bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; transition: transform 0.2s, top 0.2s;
}
.menu-toggle__bars::before { top: 0; }
.menu-toggle__bars::after { top: calc(100% - 2px); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { top: calc(50% - 1px); transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { top: calc(50% - 1px); transform: rotate(-45deg); }

/* Mega-Menü (Desktop) */
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--paper); color: var(--ink); border-bottom: 4px solid var(--brand); padding-block: var(--sp-4);
  visibility: hidden; opacity: 0; transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s, visibility 0s 0.2s;
}
.mega.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.mega.is-open .mega__col { animation: rise 0.35s var(--ease) both; }
.mega.is-open .mega__col:nth-child(2) { animation-delay: 0.04s; }
.mega.is-open .mega__col:nth-child(3) { animation-delay: 0.08s; }
.mega.is-open .mega__col:nth-child(4) { animation-delay: 0.12s; }
.mega.is-open .mega__col:nth-child(5) { animation-delay: 0.16s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.mega__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-3); }
.mega__col { border-top: 1px solid var(--rule); padding-top: 0.9rem; }
.mega__head { font-size: 1.3rem; line-height: 1.15; margin-bottom: 0.9rem; }
.mega__head a { color: var(--ink); text-decoration: none; }
.mega__list li + li { margin-top: 0.2rem; }
.mega__list a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.mega__head a:hover, .mega__list a:hover { color: var(--blue); text-decoration: underline; }
.mega__all { margin-top: var(--sp-3); }

/* Mobiles Menü */
.mobile-menu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--paper); border-bottom: 1px solid var(--rule);
  max-height: calc(100dvh - var(--head-h)); overflow-y: auto; padding-block: 0.5rem var(--sp-3);
  animation: rise 0.25s var(--ease);
}
.mobile-menu a {
  display: block; padding: 0.85rem 0; color: var(--ink); text-decoration: none;
  font-family: var(--serif); font-weight: 600; font-size: 1.35rem; border-bottom: 1px solid var(--rule);
}
.mobile-menu a[aria-current="page"] { color: var(--blue); }
.mobile-menu .sub { padding: 0.5rem 0 0.75rem 1rem; border-bottom: 1px solid var(--rule); columns: 2; column-gap: 1rem; }
.mobile-menu .sub a { font-family: var(--sans); font-weight: 400; font-size: 1rem; border: 0; padding: 0.4rem 0; break-inside: avoid; }

@media (min-width: 60em) {
  .nav { display: flex; }
  .menu-toggle, .mobile-menu, .head-call { display: none !important; }
  .brand { gap: 1.1rem; }
  .brand img { height: 3.6rem; }
  .brand__name { font-size: 1.3rem; }
  .site-head.is-scrolled .site-head__bar { height: 4.5rem; }
  .site-head.is-scrolled .brand img { height: 2.9rem; }
}
@media (max-width: 59.99em) { .mega { display: none; } }

/* ---------- 5 Bausteine ------------------------------------------------- */

/* Fotos: einheitlich leicht entsättigt mit Blau-Tönung */
.photo { position: relative; background: var(--paper-2); overflow: hidden; }
.photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.82) contrast(1.03); transition: transform 0.8s var(--ease);
}
.photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--blue); mix-blend-mode: soft-light; opacity: 0.22;
  box-shadow: inset 0 0 0 1px rgba(14, 26, 51, 0.25);
}
.photo--tall { aspect-ratio: 4 / 5; }

/* Platzhalter (Blog ohne Bild) */
.placeholder {
  display: flex; align-items: flex-end; padding: 1rem;
  background: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(14, 26, 51, 0.07) 14px 15px), var(--paper-2);
  border: 1.5px dashed var(--muted); color: var(--muted); font-size: var(--s--1);
}

/* Register-Liste (Leistungen) */
.index { border-top: 1px solid var(--rule); }
.index__item { border-bottom: 1px solid var(--rule); }
.index__item:last-child { border-bottom-color: var(--rule); }
.row { display: grid; gap: var(--sp-2) var(--sp-3); padding-block: var(--sp-3); color: inherit; text-decoration: none; }
.row__title { font-size: var(--s-3); }
.row__title span {
  background: linear-gradient(currentColor, currentColor) left 100% / 0 2px no-repeat;
  transition: background-size 0.3s var(--ease); padding-bottom: 0.05em;
}
.row__text { color: var(--muted); max-width: 52ch; margin: 0.7rem 0 0; }
.row__more { display: inline-block; margin-top: 0.9rem; font-weight: 500; color: var(--blue); }
.row__more::after { content: "→"; display: inline-block; margin-left: 0.5em; transition: transform 0.2s var(--ease); }
.row:hover .row__title span, .row:focus-visible .row__title span, .post:hover .row__title span { background-size: 100% 2px; }
.row:hover .row__more::after { transform: translateX(4px); }
.row:hover .photo img { transform: scale(1.04); }
.row__media { aspect-ratio: 16 / 9; }
@media (min-width: 48em) {
  .row--media { grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); align-items: center; }
  .row--media .row__media { grid-column: 2; grid-row: 1; aspect-ratio: 4 / 3; }
  .row--plain { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: start; }
  .row--plain .row__text { margin-top: 0.35rem; max-width: 60ch; }
  .row--plain .row__more { grid-column: 2; margin-top: 0; }
}

/* Marken-Liste */
.brands {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 0 var(--sp-3);
  border-top: 1px solid var(--rule); margin-top: var(--sp-4);
}
.brands a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 1.05rem 0; border-bottom: 1px solid var(--rule);
  font-family: var(--serif); font-size: var(--s-2); font-weight: 600; line-height: 1.15; color: var(--ink); text-decoration: none;
}
.brands a::after { content: "↗"; font: 400 1rem var(--sans); color: var(--muted); transition: transform 0.2s var(--ease), color 0.2s; }
.brands a:hover, .brands a:hover::after { color: var(--blue); }
.brands a:hover::after { transform: translate(2px, -2px); }

/* Merkmale: Spalten mit Kopflinie */
.facts { display: grid; gap: var(--sp-4) var(--sp-3); margin-top: var(--sp-4); }
.fact { border-top: 2px solid var(--accent); padding-top: 1rem; }
.fact h3, .fact h4 { font-size: var(--s-2); margin-bottom: 0.5rem; }
.fact p { color: var(--muted); margin: 0; }
@media (min-width: 48em) { .facts--3 { grid-template-columns: repeat(3, 1fr); } }

/* Artikelseite */
.article { display: grid; gap: var(--sp-3) var(--sp-4); }
.article__head h1 { font-size: var(--s-4); margin-top: 0.25rem; }
.article .article__media { width: 100%; aspect-ratio: 3 / 2; }
.article__body { max-width: var(--measure); }
.article__body > p:first-child { font-size: var(--s-1); line-height: 1.5; }
.prose-h { font-size: var(--s-3); margin: var(--sp-4) 0 var(--sp-2); padding-top: var(--sp-3); border-top: 1px solid var(--rule); }
.prose-h--first { margin-top: 0; padding-top: 0; border-top: 0; }
.steps { counter-reset: st; margin-block: var(--sp-3); border-top: 1px solid var(--rule); }
.steps li { counter-increment: st; display: grid; grid-template-columns: 2.75rem 1fr; gap: 0 1rem; padding-block: 1rem; border-bottom: 1px solid var(--rule); }
.steps li::before { content: counter(st, decimal-leading-zero); font: var(--s-2)/1.15 var(--serif); color: var(--accent); }
.steps strong { display: block; font-family: var(--serif); font-size: var(--s-1); margin-bottom: 0.2rem; }
@media (min-width: 56em) {
  .article { grid-template-columns: repeat(12, 1fr); gap: var(--sp-4) var(--sp-3); align-items: start; }
  .article__head, .article__body, .article__aside, .article > .cta { grid-column: 1 / span 7; }
  .article__head { grid-row: 1; align-self: end; }
  .article__body { grid-row: 2; }
  .article .article__media { grid-column: 9 / span 4; grid-row: 1 / span 3; aspect-ratio: 4 / 5; position: sticky; top: calc(var(--head-h) + 1.5rem); }
  .article--wide .article__media { grid-column: 8 / span 5; }
}

/* Abschluss-Box jeder Leistungsseite */
.cta {
  display: grid; gap: var(--sp-3); margin-top: var(--sp-4);
  padding: clamp(1.25rem, 0.5rem + 3vw, 2.25rem); background: var(--tint); border-left: 4px solid var(--brand);
}
.cta h2 { font-size: var(--s-3); margin-bottom: 0.6rem; }
.cta p { margin: 0; color: var(--muted); max-width: 52ch; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; align-items: center; }

/* Hinweis- und Adresskästen */
.label-box { border: 1px solid var(--rule); padding: 1.25rem 1.5rem; margin: var(--sp-3) 0; max-width: 26rem; }
.label-box p { margin: 0; }
.label-box strong { font-family: var(--serif); font-size: var(--s-1); display: block; margin-bottom: 0.25rem; }
.notice { margin: var(--sp-3) 0 0; padding: 1rem 1.25rem; background: var(--tint); border-left: 4px solid var(--brand); }

/* Band (Stellenangebot) */
.band { background: #2F62CF; color: #fff; padding-block: var(--sp-5); }
.band h2 { font-size: var(--s-4); max-width: 18ch; }
.band p { color: #E6EEFF; max-width: 54ch; }
.band__grid { display: grid; gap: var(--sp-3) var(--sp-4); }
@media (min-width: 56em) { .band__grid { grid-template-columns: 7fr 5fr; align-items: end; } }

/* Blaue Flächen: weiße Buttons und Links */
.hero-band, .call, .band { --focus: #fff; }
:is(.hero-band, .call, .band) .btn { background: #fff; border-color: #fff; color: var(--brand); }
:is(.hero-band, .call, .band) .btn:hover { background: transparent; color: #fff; }

/* ---------- 6 Seiten ---------------------------------------------------- */

/* Startseite */
.hero-band { background: var(--brand); color: #fff; }
.hero-band .arrow-link { color: #fff; }
.hero { padding-block: var(--sp-4) var(--sp-5); }
.hero__logo { width: min(100%, 20rem); height: auto; margin: 0 0 var(--sp-4) -0.4rem; }
.hero__grid { display: grid; gap: var(--sp-4); }
.hero__since {
  display: flex; align-items: center; gap: 0.9rem; margin: 0 0 var(--sp-3);
  font-size: var(--s--1); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: #C9D6F5;
}
.hero__since::before { content: ""; width: 2.5rem; height: 3px; background: #8FB0FF; }
.hero h1 { font-size: var(--s-5); line-height: 0.98; letter-spacing: -0.025em; margin-bottom: var(--sp-3); }
.hero h1 em { font-style: normal; color: #A9C2FF; }
.hero__lead { font-size: var(--s-1); line-height: 1.5; max-width: 34ch; margin-bottom: var(--sp-4); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; align-items: center; }
.hero__photo { aspect-ratio: 4 / 3; }
.hero__photo img { object-position: 30% 50%; }
@media (min-width: 56em) {
  .hero { padding-top: var(--sp-5); }
  .hero__logo { width: 24rem; }
  .hero__grid { grid-template-columns: repeat(12, 1fr); gap: var(--sp-3); align-items: center; }
  .hero__text { grid-column: 1 / span 7; }
  .hero__photo { grid-column: 8 / span 5; aspect-ratio: 4 / 5; }
}
/* Hero: Text und Bild kommen beim ersten Laden nacheinander */
.hero__text > * { animation: rise 0.6s var(--ease) both; }
.hero__text > :nth-child(2) { animation-delay: 0.06s; }
.hero__text > :nth-child(3) { animation-delay: 0.12s; }
.hero__text > :nth-child(4) { animation-delay: 0.18s; }
.hero__text > :nth-child(5) { animation-delay: 0.24s; }
.hero__photo { animation: rise 0.8s 0.15s var(--ease) both; }
.hero__photo img { animation: settle 2s var(--ease) both; }        /* Foto zoomt beim Laden langsam auf */
@keyframes settle { from { transform: scale(1.08); } }

/* Bauplan-Raster im blauen Startbereich, nach rechts ausblendend */
.hero-band { position: relative; isolation: isolate; }
.hero-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 48px 48px;
  -webkit-mask-image: linear-gradient(100deg, #000 10%, transparent 65%);
  mask-image: linear-gradient(100deg, #000 10%, transparent 65%);
}

/* Stempel „Meisterbetrieb seit 1903“ über dem Hero-Foto */
.seal {
  grid-row: 2; grid-column: 1; justify-self: end; align-self: start; z-index: 1;
  width: 6.5rem; margin: -2rem 0.75rem 0 0;
  filter: drop-shadow(0 6px 14px rgba(8, 21, 52, 0.35));
  animation: stamp 0.9s 0.6s var(--ease) both;
}
.hero__photo { grid-row: 2; grid-column: 1; }
.seal circle { fill: var(--paper); }
.seal .seal__line { fill: none; stroke: var(--brand); stroke-width: 0.8; }
.seal__ring { font: 600 9.5px var(--sans); fill: var(--brand); letter-spacing: 0.08em; }
.seal__year { font: 600 21px var(--serif); fill: var(--brand); }
@keyframes stamp { from { opacity: 0; transform: rotate(-60deg) scale(1.3); } to { opacity: 1; transform: rotate(-10deg); } }
@media (min-width: 56em) {
  .hero__photo, .seal { grid-row: 1; grid-column: 8 / span 5; }
  .seal { justify-self: start; align-self: end; width: 8rem; margin: 0 0 2.5rem -3.5rem; }
}

.since { display: grid; gap: var(--sp-3) var(--sp-5); padding-block: var(--sp-5) var(--sp-4); align-items: center; }
.since__num {
  margin: 0; display: flex; align-items: baseline; gap: 0.75rem;
  font: 600 clamp(5rem, 3rem + 10vw, 11rem)/0.85 var(--serif); letter-spacing: -0.04em; color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.since__unit { font: 500 var(--s-1) var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.since__text h2 { font-size: var(--s-3); margin-bottom: var(--sp-2); }
.since__text p { color: var(--muted); max-width: 54ch; }
@media (min-width: 56em) { .since { grid-template-columns: 5fr 7fr; } }

.why { padding-top: var(--sp-4); border-top: 1px solid var(--rule); }
.why__grid { display: grid; gap: var(--sp-3) var(--sp-4); }
.why__title { font-size: var(--s-3); }
.why__item { padding-block: var(--sp-3); border-top: 1px solid var(--rule); }
.why__item:first-child { border-top: 0; padding-top: 0; }
.why__item h3 { font-size: var(--s-2); margin-bottom: 0.5rem; }
.why__item p { margin: 0; color: var(--muted); max-width: 56ch; }
@media (min-width: 56em) {
  .why__grid { grid-template-columns: repeat(12, 1fr); gap: var(--sp-3); }
  .why__title { grid-column: 1 / span 4; }
  .why__list { grid-column: 6 / span 7; }
}

.home-block { padding-top: var(--sp-5); }
.home-head { display: grid; gap: 0.75rem; margin-bottom: var(--sp-3); }
.home-head .section-title { margin: 0; }
.home-head p { margin: 0; color: var(--muted); font-size: var(--s-1); line-height: 1.5; max-width: 52ch; }
.home-more { margin: var(--sp-3) 0 0; }

.svc { display: grid; gap: 0 var(--sp-4); border-top: 1px solid var(--rule); }
@media (min-width: 48em) { .svc { grid-template-columns: 1fr 1fr; } }
.svc a { display: block; height: 100%; padding: 1.25rem 0; border-bottom: 1px solid var(--rule); color: inherit; text-decoration: none; }
.svc__t { display: block; font: 600 var(--s-2)/1.2 var(--serif); margin-bottom: 0.25rem; transition: color 0.2s; }
.svc__t::after { content: " →"; font: 0.8em var(--sans); color: var(--blue); display: inline-block; opacity: 0; transform: translateX(-4px); transition: opacity 0.2s, transform 0.2s var(--ease); }
.svc a:hover .svc__t { color: var(--blue); }
.svc a:hover .svc__t::after { opacity: 1; transform: none; }
.svc__d { display: block; color: var(--muted); }

.feature { background: var(--tint); margin-top: var(--sp-5); padding-block: var(--sp-5); }
.feature__grid { display: grid; gap: var(--sp-4); align-items: center; }
.feature__photo { aspect-ratio: 4 / 3; }
.feature__text h2 { font-size: var(--s-4); margin-bottom: var(--sp-3); max-width: 16ch; }
.feature__text p { max-width: 54ch; }
@media (min-width: 56em) { .feature__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-5); } }

.call { background: var(--brand); color: #fff; padding-block: var(--sp-5); }
.call__grid { display: grid; gap: var(--sp-4); }
.call h2 { font-size: var(--s-4); margin-bottom: var(--sp-2); }
.call p { color: #DCE4F7; max-width: 44ch; }
.call__list { margin: 0; border-top: 1px solid rgba(255, 255, 255, 0.35); }
.call__list > div { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.2); align-items: baseline; }
.call__list dt { font-size: var(--s--1); letter-spacing: 0.12em; text-transform: uppercase; color: #C9D6F5; }
.call__list dd { margin: 0; font-size: var(--s-1); overflow-wrap: anywhere; }
.call__list a { color: #fff; }
.call__cta { margin: 0; }
@media (min-width: 56em) { .call__grid { grid-template-columns: 5fr 7fr; align-items: start; } .call__cta { grid-column: 2; } }

/* Häufige Fragen */
.faq { padding-block: var(--sp-5); display: grid; gap: var(--sp-3) var(--sp-4); }
.faq__head p { color: var(--muted); max-width: 36ch; }
.faq__list { border-top: 1px solid var(--rule); }
.faq__item { border-bottom: 1px solid var(--rule); }
.faq__item summary {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem;
  padding: 1.15rem 0; cursor: pointer; list-style: none;
  font: 600 var(--s-1)/1.3 var(--serif); transition: color 0.2s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; font: 400 1.6rem/1 var(--sans); color: var(--blue); transition: transform 0.3s var(--ease); }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item summary:hover { color: var(--blue); }
.faq__item p { margin: 0 0 1.25rem; color: var(--muted); max-width: 62ch; }
.faq__item::details-content { block-size: 0; overflow: hidden; transition: block-size 0.35s var(--ease), content-visibility 0.35s allow-discrete; }
.faq__item[open]::details-content { block-size: auto; }
@media (min-width: 56em) {
  .faq { grid-template-columns: repeat(12, 1fr); gap: var(--sp-3); }
  .faq__head { grid-column: 1 / span 4; }
  .faq__list { grid-column: 6 / span 7; }
}

/* Erklär-Grafik Wärmepumpe: Kältemittel fließt, die vier Schritte leuchten nacheinander auf */
.hp {
  --hp-cold: #3F7FE6; --hp-hot: #E07A22;
  margin: var(--sp-3) 0 var(--sp-2); padding: clamp(1rem, 0.5rem + 2vw, 1.75rem);
  border: 1px solid var(--rule); background-color: var(--paper);
  background-image: linear-gradient(rgba(24, 61, 146, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(24, 61, 146, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}
.hp__svg { display: block; width: 100%; height: auto; overflow: visible; }
.hp text { font: 500 14px var(--sans); fill: var(--ink); }
.hp .hp-strong { font-weight: 600; }
.hp .hp-muted { fill: var(--muted); font-size: 13px; }
.hp-line, .hp-air, .hp-fin, .hp-sym, .hp-bolt, .hp-house { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hp-line { stroke-width: 5; }
.hp-base { opacity: 0.22; }
.hp-air { stroke-width: 2.5; }
.hp-fin { stroke-width: 2; }
.hp-cold { stroke: var(--hp-cold); }
.hp-hot { stroke: var(--hp-hot); }
.hp-cold-fill { fill: var(--hp-cold); }
.hp-hot-fill { fill: var(--hp-hot); }
.hp-part { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.hp-sym, .hp-house { stroke: var(--ink); stroke-width: 1.5; }
.hp-bolt { stroke: var(--hp-hot); stroke-width: 2.5; }
.hp-num { fill: var(--brand); }
.hp .hp-num-t { font: 600 12px var(--sans); fill: #fff; text-anchor: middle; }
.hp-flow { stroke-dasharray: 8 10; animation: hp-flow 1.1s linear infinite; }
/* Solarthermie: Sonne und Speicher (oben warm, unten kühl) */
.st-sun { fill: var(--hp-hot); opacity: 0.85; }
.st-tank { fill: url(#st-tank); stroke: var(--ink); stroke-width: 1.5; }
.st-stop-hot { stop-color: var(--hp-hot); stop-opacity: 0.35; }
.st-stop-cold { stop-color: var(--hp-cold); stop-opacity: 0.2; }
/* Lüftung: Außenwand (schraffiert) und Platten im Wärmetauscher */
.lu-wall { fill: var(--paper-2); stroke: var(--ink); stroke-width: 1.5; }
.lu-plate { fill: none; stroke: var(--rule); stroke-width: 1.5; }
/* Photovoltaik: Verteilerpunkt und Ladeanzeige des Speichers (füllt sich langsam) */
.pv-node { fill: var(--ink); }
.pv-charge { fill: var(--hp-cold); opacity: 0.45; transform-box: fill-box; transform-origin: bottom; animation: pv-charge 5s ease-in-out infinite alternate; }
@keyframes pv-charge { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }
@keyframes hp-flow { to { stroke-dashoffset: -18; } }

.hp__steps { display: grid; gap: 0.75rem var(--sp-3); margin: var(--sp-3) 0 0; counter-reset: hp; }
@media (min-width: 40em) { .hp__steps { grid-template-columns: 1fr 1fr; } }
.hp__steps li { counter-increment: hp; position: relative; padding-left: 2.1rem; font-size: 0.95rem; line-height: 1.5; color: var(--muted); }
.hp__steps li::before {
  content: counter(hp); position: absolute; left: 0; top: 0.1em; width: 1.45rem; height: 1.45rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 0.75rem; font-weight: 600;
}
.hp__steps strong { color: var(--ink); }
.hp figcaption { margin-top: var(--sp-2); padding-top: var(--sp-2); border-top: 1px solid var(--rule); font-weight: 500; }

/* Schritt für Schritt: main.js markiert den aktiven Schritt in Grafik und Liste gleichzeitig */
.hp-step { transition: opacity 0.6s var(--ease); cursor: pointer; pointer-events: bounding-box; }   /* ganze Fläche des Bauteils reagiert */
.hp.is-running .hp-step:not(.is-active) { opacity: 0.5; }
/* Liste bleibt immer lesbar – der aktive Schritt wird schwarz, seine Nummer kräftig blau */
.hp__steps li { cursor: pointer; transition: color 0.4s; }
.hp__steps li::before { transition: background 0.4s, color 0.4s; }
.hp.is-running .hp__steps li:not(.is-active)::before { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--rule); }
.hp__steps li.is-active { color: var(--ink); }
.hp:not(.is-in) * { animation-play-state: paused; }     /* Fließen läuft erst, wenn die Grafik im Bild ist */
.hp { container-type: inline-size; }
@container (max-width: 34rem) { .hp-lbl { display: none; } }  /* schmale Grafik: nur Nummern, die Liste erklärt */
:root[data-theme="dark"] .hp { --hp-cold: #8FB4FF; --hp-hot: #F2A15A; background-image: linear-gradient(rgba(143, 169, 242, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(143, 169, 242, 0.06) 1px, transparent 1px); }
:root[data-theme="dark"] .hp-num { fill: #3D5BB0; }
:root[data-theme="dark"] .hp__steps li::before { background: #3D5BB0; }

/* Einladung zur Google-Bewertung */
.rating { margin: var(--sp-3) 0 0; font-size: 0.95rem; color: var(--muted); }
.rating a { font-weight: 500; }
.foot-hours { color: var(--on-deep-2); font-size: 0.95rem; }
.dl .opt { color: var(--muted); font-size: 0.9em; }

/* Einfache Seitenköpfe */
.page-head { display: grid; gap: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4); }
.page-head h1 { font-size: var(--s-5); line-height: 1; letter-spacing: -0.025em; }
.page-head p { margin: 0; font-size: var(--s-1); line-height: 1.5; color: var(--muted); max-width: 40ch; }
@media (min-width: 56em) { .page-head { grid-template-columns: 7fr 5fr; align-items: end; } }
.intro { max-width: 58ch; font-size: var(--s-1); line-height: 1.5; margin: 0 0 var(--sp-4); }

/* Über uns */
.about-head h1 { font-size: var(--s-4); max-width: 20ch; }
.about-head h2 { font-size: var(--s-2); font-weight: 400; font-style: italic; color: var(--muted); margin-top: var(--sp-2); max-width: 36ch; }
.about-grid { display: grid; gap: var(--sp-4); margin-top: var(--sp-4); }
.about-grid > * { min-width: 0; }
.about-grid h3 { font-size: var(--s-2); margin: 0 0 var(--sp-2); }
.about-photo img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border: 1px solid var(--rule); box-shadow: 0 12px 32px rgba(14, 26, 51, 0.12); }
.about-photo figcaption { margin-top: 0.75rem; font-size: var(--s--1); color: var(--muted); }
@media (min-width: 56em) {
  .about-head { display: grid; grid-template-columns: 8fr 4fr; gap: var(--sp-4); align-items: end; }
  .about-head h2 { margin-top: 0; }
  .about-grid { grid-template-columns: 7fr 5fr; gap: var(--sp-5) var(--sp-4); }
  .about-photo { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--head-h) + 1.5rem); }
  .about-values { grid-column: 1 / -1; }
}
.reasons { margin: var(--sp-3) 0 var(--sp-4); border-top: 1px solid var(--rule); }
.reasons li { display: grid; grid-template-columns: 1.25rem 1fr; gap: 0 0.75rem; padding-block: 1.1rem; border-bottom: 1px solid var(--rule); }
.reasons li::before { content: ""; width: 0.55rem; height: 0.55rem; margin-top: 0.55em; background: var(--accent); }

.teaser { display: grid; gap: 0.5rem 2rem; padding: var(--sp-3) 0; border-block: 1px solid var(--rule); text-decoration: none; color: var(--ink); margin-top: var(--sp-5); }
.teaser h2 { font-size: var(--s-3); }
.teaser p { margin: 0; color: var(--muted); max-width: 52ch; }
.teaser:hover .arrow-link::after { transform: translateX(4px); }
@media (min-width: 48em) { .teaser { grid-template-columns: 1fr auto; align-items: end; } .teaser__cta { grid-column: 2; grid-row: 1 / span 2; } }

.partners { margin-top: var(--sp-5); }
.partners__list { display: grid; gap: 0 var(--sp-4); border-top: 1px solid var(--rule); }
@media (min-width: 48em) { .partners__list { grid-template-columns: 1fr 1fr; } }
.partner { display: block; padding: var(--sp-3) 0; border-bottom: 1px solid var(--rule); color: inherit; text-decoration: none; }
.partner h3 { font-size: var(--s-2); margin-bottom: 0.4rem; }
.partner h3::after { content: " ↗"; font: 400 0.8em var(--sans); color: var(--muted); }
.partner p { margin: 0; color: var(--muted); }
.partner:hover h3 { color: var(--blue); text-decoration: underline; text-underline-offset: 0.2em; }

/* Kontakt */
.contact-grid { display: grid; gap: var(--sp-4); }
@media (min-width: 60em) { .contact-grid { grid-template-columns: 5fr 7fr; gap: var(--sp-5); align-items: start; } }
.contact h1 { font-size: var(--s-4); margin-bottom: var(--sp-4); }
.contact__firm { font: 600 var(--s-2) var(--serif); margin: 0 0 var(--sp-3); }
.dl { margin: 0; border-top: 1px solid var(--rule); }
.dl > div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.dl dt { font-size: var(--s--1); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.dl a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.dl a:hover { color: var(--blue); }
@media (min-width: 40em) { .dl > div { grid-template-columns: 7rem 1fr; } .dl dd { font-size: var(--s-1); } }

.map { position: relative; margin-top: var(--sp-4); aspect-ratio: 4 / 3; border: 1px solid var(--rule); background: var(--paper-2); }
.map iframe { width: 100%; height: 100%; border: 0; }
.map__activate {
  position: absolute; inset: 0; width: 100%; border: 0; padding: 1.5rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; text-align: center;
  background: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(14, 26, 51, 0.05) 14px 15px), var(--paper-2);
}
.map__activate span { padding: 0.7rem 1.2rem; background: var(--blue); color: #fff; font-weight: 500; transition: background 0.2s; }
.map__activate:hover span { background: var(--blue-deep); }
.map__activate small { font-size: var(--s--1); color: var(--muted); }

.form-panel { border: 1px solid var(--rule); padding: clamp(1.25rem, 0.5rem + 3vw, 2.75rem); background: var(--paper); }
.form-panel h2 { font-size: var(--s-3); margin-bottom: 0.5rem; }
.form-panel > p { color: var(--muted); margin-bottom: var(--sp-3); }
.field { margin-bottom: 1.5rem; }
.field label { display: block; font-size: var(--s--1); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.2rem; }
.field .opt { text-transform: none; letter-spacing: 0; font-weight: 400; }
.field input, .field textarea {
  width: 100%; min-height: 3rem; padding: 0.6rem 0;
  font: inherit; font-size: var(--s-1); color: var(--ink);
  background: transparent; border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 8rem; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus { outline: 0; border-bottom-color: var(--blue); box-shadow: 0 2px 0 0 var(--blue); }
.field ::placeholder { color: var(--muted); opacity: 0.8; }
.form-note { font-size: var(--s--1); color: var(--muted); }

/* Anliegen als Auswahl-Knöpfe */
.topics { border: 0; padding: 0; margin: 0 0 1.75rem; min-width: 0; }
.topics legend { padding: 0; margin-bottom: 0.7rem; font-size: var(--s--1); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-block; padding: 0.5rem 0.95rem; border: 1px solid var(--rule); border-radius: 999px;
  font-size: 0.95rem; cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.chips label:hover span { border-color: var(--blue); }
.chips label:active span { transform: scale(0.96); }
.chips input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.chips input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.next-steps { margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--rule); }
.next-steps h3 { font-size: var(--s-2); }
.next-steps .steps { margin-bottom: 0; }
.form-status { margin: var(--sp-2) 0 0; padding: 0.9rem 1.1rem; border-left: 4px solid var(--blue); background: var(--tint); animation: rise 0.35s var(--ease); }
.form-status.is-error { border-color: #B3261E; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Blog */
.post-list { border-top: 1px solid var(--rule); }
.post { display: grid; gap: 1rem 2rem; padding-block: var(--sp-3); border-bottom: 1px solid var(--rule); color: inherit; text-decoration: none; }
.post:hover .photo img { transform: scale(1.04); }
.post__thumb { aspect-ratio: 16 / 9; }
.post h2 { font-size: var(--s-3); margin-bottom: 0.6rem; }
.post p { color: var(--muted); margin: 0 0 0.6rem; max-width: 56ch; }
.post__meta { font-size: var(--s--1); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
@media (min-width: 48em) { .post { grid-template-columns: 18rem 1fr; } }
.empty-note { padding: var(--sp-4) 0; font-size: var(--s-1); color: var(--muted); border-bottom: 1px solid var(--rule); max-width: 50ch; }

.gallery { display: grid; gap: 0.75rem; margin-bottom: var(--sp-4); }
.gallery__stage { position: relative; background: #000; aspect-ratio: 16 / 10; touch-action: pan-y; }
.gallery__stage img, .gallery__stage video { width: 100%; height: 100%; object-fit: contain; }
.gallery__stage img { animation: fade 0.3s; }
@keyframes fade { from { opacity: 0; } }
.gallery__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; background: var(--paper); border: 1px solid var(--rule); font-size: 1.25rem; display: grid; place-items: center; }
.gallery__nav--prev { left: 0.75rem; }
.gallery__nav--next { right: 0.75rem; }
.gallery__count { position: absolute; right: 0.75rem; bottom: 0.75rem; background: var(--paper); border: 1px solid var(--rule); padding: 0.15rem 0.6rem; font-size: var(--s--1); }
.gallery__thumbs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.gallery__thumbs button { width: 5rem; height: 4rem; padding: 0; border: 2px solid transparent; background: var(--paper-2); opacity: 0.65; overflow: hidden; display: grid; place-items: center; transition: opacity 0.2s; }
.gallery__thumbs button:hover, .gallery__thumbs button[aria-current="true"] { opacity: 1; }
.gallery__thumbs button[aria-current="true"] { border-color: var(--blue); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 0 1.5rem; border-top: 1px solid var(--rule); margin-bottom: var(--sp-4); }
.spec div { padding: 0.9rem 0; border-bottom: 1px solid var(--rule); }
.spec dt { font-size: var(--s--1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.spec dd { margin: 0.15rem 0 0; font: 600 var(--s-1) var(--serif); }
.post-detail h1 { font-size: var(--s-4); margin-bottom: var(--sp-3); }

/* Rechtstexte */
.legal h1 { font-size: var(--s-4); margin-bottom: var(--sp-4); }
.legal .prose { max-width: 72ch; font-size: 1rem; }
.legal .prose p { padding-top: 1.1rem; border-top: 1px solid var(--rule); }
.legal .prose strong { font-family: var(--serif); font-size: 1.125rem; }

/* ---------- 7 Fuß ------------------------------------------------------- */
.site-foot { background: var(--footer); color: var(--on-deep); padding-block: var(--sp-5) var(--sp-3); --focus: var(--paper); position: relative; overflow: hidden; }
.site-foot::before {                                   /* großes, kaum sichtbares Gründungsjahr */
  content: "1903"; position: absolute; right: -0.04em; bottom: -0.12em; pointer-events: none;
  font: 600 clamp(8rem, 4rem + 18vw, 20rem)/1 var(--serif); letter-spacing: -0.04em; color: rgba(255, 255, 255, 0.035);
}
.site-foot > .wrap { position: relative; }
.site-foot a { color: var(--on-deep); }
.foot-grid { display: grid; gap: var(--sp-4) var(--sp-3); }
@media (min-width: 40em) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 64em) { .foot-grid { grid-template-columns: 5fr 3fr 2fr 2fr; } }
.foot-grid h2 { font: 500 var(--s--1) var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-deep-2); margin-bottom: 1rem; }
.foot-logo { width: 11rem; height: auto; margin-bottom: var(--sp-3); }
.foot-firm { font: 600 var(--s-2) var(--serif); margin: 0 0 0.75rem; }
.foot-about { color: var(--on-deep-2); max-width: 46ch; margin: 0; font-size: 0.975rem; }
.foot-list li + li { margin-top: 0.45rem; }
.foot-list a { text-decoration: none; }
.foot-list a:hover { text-decoration: underline; }
.foot-bottom {
  margin-top: var(--sp-5); padding-top: var(--sp-2); border-top: 1px solid rgba(244, 241, 234, 0.25);
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; align-items: center;
  font-size: 0.875rem; color: var(--on-deep-2);
  padding-right: 4rem;                       /* Platz für den Nach-oben-Knopf */
}
.foot-bottom p { margin: 0; }

.theme-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem;
  background: none; color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 2px;
  font-size: 0.875rem; font-weight: 500;
}
.theme-toggle:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }
.theme-toggle__dot { width: 0.9rem; height: 0.9rem; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); transition: transform 0.4s var(--ease); }
:root[data-theme="dark"] .theme-toggle__dot { transform: rotate(180deg); }

.to-top {
  position: fixed; right: var(--gutter); bottom: var(--gutter); z-index: 90;
  width: 3rem; height: 3rem; display: grid; place-items: center;
  background: var(--paper); color: var(--ink); border: 1px solid var(--rule); font-size: 1.2rem; border-radius: 2px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0s 0.25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top:hover { background: var(--ink); color: var(--paper); }

/* ---------- 8 Dunkel-Modus (Umschalter im Fuß) --------------------------- */
:root[data-theme="dark"] {
  --paper: #0D1526; --paper-2: #16203A; --tint: #16233F; --ink: #ECE8DE; --muted: #A9B3C6;
  --rule: #2C3856; --blue: #8FA9F2; --blue-deep: #C4D2FA; --accent: #8FA9F2; --focus: #8FA9F2;
  --brand: #122049; --head: #0A1430; --footer: #060B16;
  --on-deep: #ECE8DE; --on-deep-2: #A9B3C6;
}
:root[data-theme="dark"] .btn, :root[data-theme="dark"] .skip { color: #0D1526; }
:root[data-theme="dark"] .btn--line { color: var(--blue); }
:root[data-theme="dark"] .btn--line:hover { color: #0D1526; }
:root[data-theme="dark"] :is(.hero-band, .call, .band) .btn { background: #ECE8DE; border-color: #ECE8DE; color: #0D1526; }
:root[data-theme="dark"] :is(.hero-band, .call, .band) .btn:hover { background: transparent; color: #ECE8DE; }
:root[data-theme="dark"] .photo img { filter: saturate(0.78) contrast(1.02) brightness(0.9); }
:root[data-theme="dark"] .band { background: #15254F; border-block: 1px solid #2C3E70; }
:root[data-theme="dark"] .band p { color: #C3CEE8; }
:root[data-theme="dark"] .hero h1 em { color: #9DB6F5; }
:root[data-theme="dark"] .mega { border-bottom-color: #2C3E70; }
:root[data-theme="dark"] .site-foot { border-top: 1px solid var(--rule); }
:root[data-theme="dark"] :is(.form-panel, .label-box) { background: var(--paper-2); }
:root[data-theme="dark"] :is(.map__activate span, .chips input:checked + span) { color: #0D1526; }

/* ---------- 9 Bewegung & Druck ------------------------------------------ */
/* Einblenden beim Scrollen – die Klasse .reveal setzt main.js, ohne JS bleibt alles sichtbar */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }
/* Fotos klappen von unten auf, das Bild setzt sich dabei leicht */
.photo.reveal { opacity: 1; transform: none; clip-path: inset(100% 0 0 0); transition: clip-path 0.9s var(--ease); transition-delay: var(--d, 0s); }
.photo.reveal.is-in { clip-path: inset(0); }
.photo.reveal:not(.is-in) img { transform: scale(1.12); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-head, .site-foot, .to-top, .crumb, .cta, .map { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ===== Ruhiger Stil (angelehnt an Apple) ===================================
   Kacheln, runde Ecken, dezente Linien, mehr Luft, Bilder wachsen beim Scrollen.
   Backups: _Sicherung-2026-11-04-vor-Apple-Test / -vor-Angleichung */

:root { --radius: 1.25rem; --radius-s: 0.75rem; }

/* Runde Ecken für Fotos, Grafiken und Kästen */
.photo, .hp, .cta, .form-panel, .map, .gallery__stage { border-radius: var(--radius); }
.photo::after { border-radius: inherit; box-shadow: none; }
.map, .gallery__stage { overflow: hidden; }
.about-photo img { border-radius: var(--radius); }
.notice, .label-box, .form-status, .placeholder, .gallery__thumbs button { border-radius: var(--radius-s); }
.cta, .notice, .form-status { border-left: 0; }

/* Knöpfe als Pillen */
.btn { border-radius: 999px; padding-inline: 1.6rem; }
.menu-toggle, .theme-toggle, .head-call, .gallery__count { border-radius: 999px; }
.to-top, .gallery__nav { border-radius: 50%; }

/* Etwas mehr Luft zwischen Abschnitten im Text */
.prose-h { margin-top: calc(var(--sp-4) * 1.25); }

/* Kachel-Raster für die Leistungen */
.bento { display: grid; gap: 1rem; }
@media (min-width: 40em) { .bento { grid-template-columns: 1fr 1fr; } }
@media (min-width: 56em) {
  .bento { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 15rem; }
  .tile--big { grid-column: span 2; grid-row: span 2; }
  .tile--wide { grid-column: span 2; }
}
.tile {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: flex-end; min-height: 15rem;
  border-radius: var(--radius); background: var(--brand); color: #fff; text-decoration: none;
}
.tile img {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.85); transition: scale 0.8s var(--ease);
}
.tile::before {                                     /* dunkler Verlauf unten, damit die Schrift lesbar bleibt */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(8, 21, 52, 0) 35%, rgba(8, 21, 52, 0.8) 100%);
}
.tile__text { padding: 1.35rem 1.5rem; }
.tile__t { display: block; font: 600 var(--s-3)/1.1 var(--serif); }
.tile--big .tile__t { font-size: var(--s-4); }
.tile__t::after { content: " →"; display: inline-block; font: 400 0.6em var(--sans); transition: transform 0.25s var(--ease); }
.tile__d { display: block; margin-top: 0.35rem; max-width: 36ch; font-size: 0.95rem; color: rgba(255, 255, 255, 0.86); }
.tile:hover img { scale: 1.05; }
.tile:hover .tile__t::after { transform: translateX(5px); }

/* Mehr Luft, größere und ruhigere Überschriften – nur Startseite */
#home .home-block { margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--rule); }   /* dezente Trennlinie */
#home .home-head { justify-items: center; text-align: center; margin-bottom: var(--sp-4); }
#home .home-head .section-title, #home .why__title, #home .faq__head .section-title { font-size: var(--s-4); letter-spacing: -0.02em; }
#home .home-more { text-align: center; }
#home .why { border-top: 1px solid var(--rule); padding-top: var(--sp-5); }
#home .why__item { border-top: 1px solid var(--rule); padding-block: var(--sp-3); }
#home .why__item:first-child { border-top: 0; padding-top: 0; }
#home .feature { margin-top: calc(var(--sp-5) * 1.4); }

/* Bilder wachsen beim Scrollen sanft auf ihre Größe (moderne Browser, sonst einfach statisch) */
@supports (animation-timeline: view()) {
  .tile img, .feature__photo img, .about-photo img {
    animation: grow-in linear both; animation-timeline: view(); animation-range: entry 0% cover 45%;
  }
  @keyframes grow-in { from { transform: scale(1.18); } to { transform: scale(1); } }
}
