/* Toni Hübner Dachdecker-Meisterbetrieb – "Dachlinie" (see DESIGN.md) */

/* ---------- fonts (self-hosted, SIL OFL) ---------- */
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Jost"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/jost-latin-400-normal.woff2") format("woff2"); }

/* ---------- tokens ---------- */
:root {
  --ink: #1e2226;
  --ink-2: #2a2f34;
  --slate: #5a636c;
  --mist: #b9c0c7;
  --paper: #f4f2ee;
  --white: #fff;
  --line: #dcd8d1;
  --red: #d81e04;
  --red-ink: #b81a03;
  --red-light: #ff5a3c;
  --teal: #006673;        /* original site colour: information on light */
  --turquoise: #33adba;   /* original site / crane colour: graphics on dark */
  --teal-pale: #c3e7ef;
  --teal-tint: #e6f3f5;

  --font-head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 4px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --wrap: 74rem;
  --header-h: 4.5rem;
  --peak: clamp(1.75rem, 5.5vw, 4.5rem);
  --space: clamp(3.5rem, 8vw, 6.5rem);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--font-body); overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.02; margin: 0 0 .5em; letter-spacing: .005em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h3 { font-size: 1.55rem; font-weight: 600; line-height: 1.1; }
:where(ul, ol)[role="list"] { list-style: none; margin: 0; padding: 0; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius); }
.skip-link:focus { top: 1rem; }
.container { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- small parts: chevrons, kicker, buttons, links ---------- */
.chev { display: inline-block; width: .5em; height: .5em; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); margin-left: .45em; vertical-align: .08em; flex: none; }
.chev--down { transform: rotate(135deg); vertical-align: .22em; margin-left: .5em; }
.chev--left { transform: rotate(-135deg); margin: 0; }

.kicker { display: flex; align-items: center; gap: .6em; margin: 0 0 .9rem; font: 600 .85rem/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
.kicker::before { content: ""; width: .7em; height: .7em; border-top: 3px solid var(--red); border-left: 3px solid var(--red); transform: translateY(.18em) rotate(45deg); flex: none; }
.kicker--light { color: var(--turquoise); }

.lead { font-size: clamp(1.13rem, 1.9vw, 1.3rem); line-height: 1.5; color: var(--ink); max-width: 36em; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 3rem; padding: .7rem 1.35rem; border: 2px solid transparent; border-radius: var(--radius); font: 600 1rem/1.1 var(--font-body); text-decoration: none; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-ink); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-ghost-light { border-color: rgba(255, 255, 255, .7); color: #fff; background: transparent; }
.btn-ghost-light:hover { background: #fff; color: var(--ink); }
.icon { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }

.text-link { display: inline-flex; align-items: center; font-weight: 600; color: var(--teal); text-decoration: none; border-bottom: 2px solid transparent; transition: border-color .2s; }
.text-link:hover { border-bottom-color: currentColor; }
.ext-note { color: var(--slate); font-size: .9rem; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(244, 242, 238, .94); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(8px)) { .site-header { background: rgba(244, 242, 238, .82); backdrop-filter: blur(10px); } }
.header-row { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.logo-svg { height: 2.6rem; width: auto; display: block; }
.brand-sub { font: 600 .72rem/1.15 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--slate); padding-left: .9rem; border-left: 1px solid var(--line); }
.nav-list { display: flex; align-items: center; gap: .25rem; }
.nav-list a, .nav-sub-toggle { display: flex; align-items: center; padding: .55rem .75rem; border: 0; background: none; font: 500 1rem/1.2 var(--font-body); color: var(--ink); text-decoration: none; cursor: pointer; border-radius: var(--radius); }
.nav-list > li > a:hover, .nav-sub-toggle:hover { color: var(--teal); }
.nav-list a[aria-current="page"], .nav-group.is-active > .nav-sub-toggle { color: var(--teal); box-shadow: inset 0 -2px 0 var(--teal); border-radius: 0; }
.nav-group { position: relative; }
.nav-sub { position: absolute; top: calc(100% + .4rem); left: 0; min-width: 17rem; padding: .5rem; background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--teal); box-shadow: 0 16px 40px rgba(30, 34, 38, .14); display: none; }
.nav-sub a { padding: .6rem .75rem; }
.nav-sub a:hover { background: var(--teal-tint); color: var(--teal); }
.nav-group.is-open .nav-sub { display: block; }
@media (hover: hover) and (min-width: 62.01rem) {
  .nav-group:hover .nav-sub, .nav-group:focus-within .nav-sub { display: block; }
  .nav-group::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: .6rem; } /* hover bridge */
}
.btn-call { min-height: 2.75rem; padding: .55rem 1rem; }
.nav-toggle { display: none; width: 2.9rem; height: 2.9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); cursor: pointer; align-items: center; justify-content: center; }
.bars, .bars::before, .bars::after { display: block; width: 1.25rem; height: 2px; background: var(--ink); position: relative; transition: transform .2s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; }
.bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 62rem) {
  .nav-toggle { display: inline-flex; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px rgba(30, 34, 38, .12); display: none; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .site-header.nav-open .nav { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; padding: .5rem var(--gutter) 1rem; gap: 0; }
  .nav-list > li { border-bottom: 1px solid var(--line); }
  .nav-list a, .nav-sub-toggle { width: 100%; padding: .95rem .25rem; font-size: 1.1rem; }
  .nav-sub-toggle { justify-content: space-between; }
  .nav-sub { position: static; display: none; box-shadow: none; border: 0; padding: 0 0 .5rem 1rem; min-width: 0; background: transparent; }
  .nav-sub a { padding: .6rem .25rem; font-size: 1rem; }
  .nav-list a[aria-current="page"], .nav-group.is-active > .nav-sub-toggle { box-shadow: none; }
}
@media (max-width: 40rem) {
  .brand-sub { display: none; }
  .btn-call span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .btn-call { width: 2.9rem; padding: 0; }
  .logo-svg { height: 2.25rem; }
}

/* ---------- sections ---------- */
.section { padding-block: var(--space); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.section--groups { padding-bottom: 0; }
.section--groups + .section--tight .h-small { border-top: 1px solid var(--line); padding-top: clamp(2rem, 4vw, 3rem); }
.section--white { background: var(--white); }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p:last-child { margin-bottom: 0; }
.h-small { font-size: clamp(1.6rem, 3vw, 2rem); }
.split + .h-small { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.fine { font-size: .92rem; color: var(--slate); margin-top: 1.5rem; }

/* dark band with a roof-shaped top edge */
.band { position: relative; background: var(--ink); color: #fff; clip-path: polygon(0 var(--peak), 50% 0, 100% var(--peak), 100% 100%, 0 100%); padding-top: calc(var(--peak) + var(--space)); padding-bottom: var(--space); }
.band-roof { position: absolute; top: 0; left: 0; width: 100%; height: var(--peak); overflow: visible; pointer-events: none; }
.band-roof polyline { fill: none; stroke: var(--red); stroke-width: 8; vector-effect: non-scaling-stroke; stroke-linejoin: miter; }
.band p { color: var(--mist); }
.band h2, .band h3 { color: #fff; }

/* house-shaped photo frame with a roof line above */
.house { position: relative; margin: 0; padding-top: 1.6rem; }
.house-photo { position: relative; aspect-ratio: 4 / 3.4; clip-path: polygon(50% 0, 100% 24%, 100% 100%, 0 100%, 0 24%); background: var(--line); }
.house-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.house-roof { position: absolute; top: 0; left: 0; width: 100%; aspect-ratio: 4 / .816; overflow: visible; }
.house-roof polyline { fill: none; stroke: var(--red); stroke-width: 9; vector-effect: non-scaling-stroke; stroke-linejoin: miter; stroke-miterlimit: 10; }
.house figcaption { margin-top: .75rem; font-size: .92rem; color: var(--slate); }

/* ---------- hero ---------- */
.hero { position: relative; padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(3rem, 6vw, 4.5rem); overflow: hidden; }
.hero-lines { position: absolute; right: -12%; top: 6%; width: min(56rem, 70vw); height: auto; pointer-events: none; }
.hero-lines polyline { fill: none; stroke: #e9e5de; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.hero-grid, .page-head-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { max-width: 11em; }
.house--hero { max-width: 34rem; justify-self: end; width: 100%; }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
.facts li { padding: .2rem 0 .2rem 1rem; border-left: 3px solid var(--teal); }
.facts strong { display: block; font: 700 clamp(1.7rem, 3vw, 2.2rem)/1 var(--font-head); margin-bottom: .3rem; }
.facts span { display: block; font-size: .95rem; line-height: 1.35; color: var(--slate); }

/* ---------- service cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1.25rem; }
.card { position: relative; background: var(--white); border: 1px solid var(--line); }
.card::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 4px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; z-index: 1; }
.card:hover::before, .card:focus-within::before { transform: scaleX(1); }
.card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.card-link:focus-visible { outline-offset: -3px; }
.card-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--line); }
.card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 1.3rem 1.4rem 1.5rem; }
.card-body h3 { margin-bottom: .4rem; }
.card-body p { color: var(--slate); font-size: 1rem; }
.card-body .text-link { margin-top: auto; align-self: flex-start; }

/* ---------- split layouts ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split--top { align-items: start; }

/* rare tiles */
.tile-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.tile-strip li { background: var(--white); border: 1px solid var(--line); aspect-ratio: 3 / 4; display: grid; place-items: center; padding: .9rem; position: relative; }
.tile-strip img { max-height: 100%; width: auto; object-fit: contain; }
.tile-strip span { position: absolute; left: 0; right: 0; bottom: 0; padding: .35rem .5rem; font-size: .8rem; font-weight: 600; background: rgba(255, 255, 255, .92); border-top: 1px solid var(--line); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr)); gap: 1rem; margin-top: 1.5rem; }
.tile { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); }
.tile-img { aspect-ratio: 1 / 1.05; display: grid; place-items: center; padding: 1rem; background: var(--teal-tint); }
.tile-img img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(30, 34, 38, .18)); }
.tile-name { margin: 0; padding: .8rem .9rem .3rem; font-weight: 600; line-height: 1.3; }
.tile-ask { margin: auto .9rem .9rem; align-self: flex-start; font-weight: 600; font-size: .95rem; color: var(--teal); text-decoration: none; display: inline-flex; align-items: center; }
.tile-ask:hover { text-decoration: underline; }
.note { background: var(--teal-tint); border-left: 4px solid var(--teal); padding: 1.4rem 1.5rem; }
.note-title { font: 700 1.35rem/1.1 var(--font-head); margin-bottom: .5rem; }
.note p:last-child { margin-bottom: 0; }

/* crane band: scroll-driven SVG crane (main.js), photos below */
.kran-split { align-items: center; }
.crane-replay { margin-top: .5rem; }
.crane-figure { margin: 0; }
.crane { display: block; width: 100%; height: auto; overflow: visible; }
.crane-ruler line { stroke: #5a636c; stroke-width: 2; }
.crane-ruler text { fill: var(--mist); font: 600 15px var(--font-body); }
.crane-house rect { fill: #262b30; stroke: #474f57; stroke-width: 2; }
.crane-house .win, .crane-house .door { fill: #1b1f22; }
.crane-house-roof { fill: none; stroke: var(--red); stroke-width: 7; stroke-linejoin: miter; }
.crane-ground { stroke: #474f57; stroke-width: 2; }
.crane-level line { stroke: var(--turquoise); stroke-width: 1.5; stroke-dasharray: 4 5; }
.crane-level polygon { fill: var(--turquoise); }
.crane-level text { fill: #fff; font: 700 22px var(--font-head); text-anchor: end; }
@media (max-width: 40rem) { .crane-ruler text { font-size: 19px; } .crane-level text { font-size: 30px; } }
#crane-outriggers rect { fill: #8f989f; }
.crane-chassis { fill: #4a525a; }
.crane-drawbar { stroke: #4a525a; stroke-width: 6; stroke-linecap: round; }
.crane-wheel { fill: #121417; stroke: #4a525a; stroke-width: 4; }
.crane-hub { fill: #8f989f; }
.crane-cylinder { stroke: #c9d0d6; stroke-width: 7; stroke-linecap: round; }
.crane-turret { fill: #1f8a95; }
.seg1 { fill: var(--turquoise); }
.seg2 { fill: #6fc7d0; }
.seg3 { fill: #a9dfe4; }
.seg1-line { stroke: #1f8a95; stroke-width: 2; }
.crane-pivot { fill: var(--ink); }
.crane-helmet { fill: #ffd23f; }
.crane-worker { fill: var(--red-light); }
.crane-rail { fill: rgba(51, 173, 186, .18); stroke: #e8ecef; stroke-width: 2.5; }
.crane-rail-mid { stroke: #e8ecef; stroke-width: 1.5; }
.kran-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); }

/* Dachaufbau 3D (dach3d.js, Steildach page) */
.aufbau-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); grid-template-areas: "head fig" "body fig"; gap: 0 clamp(2rem, 5vw, 4rem); align-items: center; }
.aufbau-head { grid-area: head; align-self: end; }
.aufbau-body { grid-area: body; align-self: start; }
.aufbau-figure { grid-area: fig; }
.aufbau-list { margin-top: .5rem; }
.aufbau-list { display: grid; gap: .25rem; margin: 1.5rem 0 1rem; counter-reset: none; }
.aufbau-item { display: flex; gap: .85rem; align-items: flex-start; width: 100%; padding: .55rem .7rem; border: 0; border-left: 3px solid transparent; background: none; font: inherit; font-size: .98rem; line-height: 1.4; color: var(--ink); text-align: left; cursor: pointer; transition: background-color .2s, border-color .2s; }
.aufbau-item:hover, .aufbau-item.is-on { background: var(--teal-tint); border-left-color: var(--teal); }
.aufbau-item[aria-pressed="true"] { border-left-color: var(--red); }
.aufbau-item strong { font-weight: 600; }
.aufbau-num { flex: none; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--teal); color: #fff; font: 700 .9rem/1 var(--font-head); }
.aufbau-figure { margin: 0; position: relative; }
.dach3d { display: block; width: 100%; height: auto; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.dach3d.is-dragging { cursor: grabbing; }
.dach3d polygon { stroke: rgba(30, 34, 38, .28); stroke-width: .7; stroke-linejoin: round; transition: opacity .25s; }
.dach3d .is-dim { opacity: .14; }
.dach3d-mark { transition: opacity .3s; }
.dach3d-mark circle { fill: var(--teal); stroke: #fff; stroke-width: 2; }
.dach3d-mark.is-on circle { fill: var(--red); }
.dach3d-mark text { fill: #fff; font: 700 13px var(--font-head); text-anchor: middle; }
@media (max-width: 40rem) { .dach3d-mark circle { r: 18px; } .dach3d-mark text { font-size: 21px; transform: translateY(3px); } }
.dach3d:not(.is-exploded) .dach3d-mark { opacity: 0; }
.dach3d:focus-visible { outline-offset: -3px; }
.aufbau-hint { margin-top: .5rem; text-align: center; font-size: .9rem; color: var(--slate); }
html:not(.js) .aufbau-figure { display: none; }

/* solar */
.solar-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.partners { margin-top: 1.5rem; display: grid; gap: .75rem; }
.partners li { padding: 1rem 1.2rem; background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--teal); }
.partners strong { display: block; font-weight: 600; }
.partners span { color: var(--slate); font-size: .95rem; }

/* about + training timeline */
.timeline { margin-top: 2rem; border-left: 2px solid var(--line); padding-left: 1.4rem; display: grid; gap: 1.4rem; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: calc(-1.4rem - 7px); top: .35rem; width: 12px; height: 12px; background: var(--paper); border: 3px solid var(--teal); transform: rotate(45deg); }
.timeline time { display: block; font: 700 1.05rem/1.2 var(--font-head); letter-spacing: .04em; text-transform: uppercase; color: var(--teal); }
.timeline p { margin: .2rem 0 0; }
.timeline strong { font-weight: 600; }

/* contact */
.contact-list { display: grid; gap: 1.1rem; margin-top: 1.75rem; }
.contact-list li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .75rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.contact-list .label { font: 600 .8rem/1.6 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--slate); }
.contact-list a { font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.contact-list a:hover { color: var(--teal); }
.form { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--red); padding: clamp(1.4rem, 3vw, 2.2rem); }
.form h3 { margin-bottom: 1.2rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.1rem; }
.field { display: grid; gap: .35rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .95rem; }
.field .opt { font-weight: 400; color: var(--slate); }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 1px solid #a9a39a; border-radius: var(--radius); padding: .7rem .8rem; min-height: 3rem; }
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(0, 102, 115, .3); outline-offset: 0; border-color: var(--teal); }
.form-note { font-size: .9rem; color: var(--slate); margin: 1.1rem 0 0; }
.form-status { margin: .9rem 0 0; font-weight: 600; }
.form-status:empty { display: none; }
.form .btn { margin-top: 1.25rem; }

/* ---------- service pages ---------- */
.page-head { padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--line); }
.house--head { max-width: 30rem; justify-self: end; width: 100%; }
.crumbs { font-size: .92rem; color: var(--slate); margin-bottom: 1.4rem; }
.crumbs a { color: var(--slate); }
.crumbs a:hover { color: var(--teal); }
.toc { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.toc-label { font: 600 .8rem/1.2 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--slate); margin-bottom: .75rem; }
.toc ul { display: flex; flex-wrap: wrap; gap: .5rem; }
.toc a { display: inline-block; padding: .45rem .8rem; border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); text-decoration: none; font-size: .95rem; font-weight: 500; }
.toc a:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-tint); }
.svc-group { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(1.5rem, 4vw, 3.5rem); padding-block: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--line); }
.svc-group h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.svc-text p { color: var(--ink); }
.svc-num { font: 700 1rem/1 var(--font-head); color: var(--teal); letter-spacing: .1em; margin-bottom: .6rem; }
.svc-group--text .svc-text { grid-column: 1 / -1; max-width: 42rem; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr)); gap: .6rem; align-content: start; }
.gallery-item { display: block; position: relative; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; background: var(--line); cursor: zoom-in; overflow: hidden; }
.gallery-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, opacity .2s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:focus-visible { outline-offset: 2px; }

.cta-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.5rem 3rem; }
.cta-row h2 { margin-bottom: .4rem; }
.cta-row p { margin: 0; }
.cta-row .actions { margin-top: 0; }
.more { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .75rem; }
.more-link { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem; background: var(--white); border: 1px solid var(--line); text-decoration: none; font: 600 1.3rem/1.1 var(--font-head); transition: border-color .2s, color .2s; }
.more-link:hover { border-color: var(--teal); color: var(--teal); }

/* ---------- legal pages ---------- */
.legal { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.legal .container { max-width: 48rem; }
.legal h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); }
.legal h2 { font-size: 1.6rem; margin-top: 2.2rem; }
.legal h3 { font-size: 1.25rem; margin-top: 1.5rem; }
.legal ul { padding-left: 1.2rem; }
.todo { background: #fff3b0; color: #3b3200; padding: 0 .3em; border-radius: 2px; }

/* ---------- footer ---------- */
.site-footer { position: relative; background: var(--ink); color: var(--mist); clip-path: polygon(0 var(--peak), 50% 0, 100% var(--peak), 100% 100%, 0 100%); padding-top: calc(var(--peak) + clamp(2.5rem, 5vw, 4rem)); }
/* footer that continues a dark CTA band: no second roof, just a hairline */
.site-footer--flat { clip-path: none; padding-top: 0; }
.site-footer--flat .footer-grid { border-top: 1px solid rgba(255, 255, 255, .14); padding-top: clamp(2.5rem, 5vw, 3.5rem); }
.band--cta { padding-bottom: clamp(3rem, 6vw, 4.5rem); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem 3rem; padding-bottom: 2.5rem; }
.brand--footer { color: #fff; margin-bottom: 1rem; }
.brand--footer .logo-svg { height: 2.8rem; }
.site-footer .logo-roof, .site-footer .logo-toni { fill: var(--red-light); }
.footer-h { font: 600 .8rem/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; }
.site-footer address, .site-footer p { margin-bottom: .8rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer nav li { margin-bottom: .4rem; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; padding-top: 1.25rem; padding-bottom: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .92rem; }
.footer-bottom p { margin: 0; }
.footer-bottom ul { display: flex; gap: 1.25rem; }
.footer-bottom .made-by { margin-left: auto; }

/* made-by signature (canonical spec, see global lessons) */
.made-by { display: inline-flex; align-items: center; gap: .5rem; color: rgba(255, 255, 255, .5); text-decoration: none; }
.site-footer .made-by { color: rgba(255, 255, 255, .5); }
.site-footer .made-by:hover { text-decoration: none; }
.made-by span:first-child { font: 400 .96rem/1 "Jost", var(--font-body); }
.made-by-pill { display: inline-flex; align-items: center; justify-content: center; width: 33px; height: 24px; overflow: hidden; background: #fff; border-radius: 999px; opacity: .85; }
.made-by-pill img { width: 34px; height: 34px; max-width: none; flex: none; }
.made-by:hover, .made-by:focus-visible, .site-footer .made-by:hover, .site-footer .made-by:focus-visible { color: #fff; }
.made-by:hover .made-by-pill, .made-by:focus-visible .made-by-pill { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .made-by { transition: color .25s; }
  .made-by-pill { transition: opacity .25s; }
  .made-by:hover .made-by-pill, .made-by:focus-visible .made-by-pill { animation: wiggle .7s ease-in-out; }
  @keyframes wiggle { 0% { transform: rotate(0); } 15% { transform: rotate(-20deg); } 30% { transform: rotate(16deg); } 45% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 75% { transform: rotate(-4deg); } 100% { transform: rotate(0); } }
}

/* ---------- lightbox ---------- */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: rgba(14, 16, 18, .94); color: #fff; }
.lightbox::backdrop { background: rgba(14, 16, 18, .94); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox-fig { margin: 0; padding: 4rem 4.5rem; display: grid; justify-items: center; gap: .9rem; max-width: 100%; }
.lightbox-img { width: auto; height: auto; max-height: calc(100dvh - 10rem); object-fit: contain; background: #000; }
.lightbox-cap { font-size: .95rem; color: var(--mist); text-align: center; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 3rem; height: 3rem; border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--radius); background: rgba(30, 34, 38, .7); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.lb-btn:hover { background: var(--red); border-color: var(--red); }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lb-close { right: 1rem; top: 1rem; }
.lb-prev .chev, .lb-next .chev { width: .7rem; height: .7rem; margin: 0; }
.lb-next .chev { margin-left: -.2rem; }
.lb-prev .chev { margin-left: .25rem; }
@media (max-width: 40rem) {
  .lightbox-fig { padding: 4.5rem .5rem 5rem; }
  .lb-prev, .lb-next { top: auto; bottom: 1rem; transform: none; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal-on .reveal:not(.is-in) { opacity: 0; transform: translateY(18px); }
  .reveal-on .reveal { transition: opacity .6s ease, transform .6s ease; }
  .js .house-roof { clip-path: inset(-20% 50% -20% 50%); animation: roof-in .9s .2s cubic-bezier(.6, 0, .2, 1) forwards; }
  @keyframes roof-in { to { clip-path: inset(-20% -10% -20% -10%); } }
}

/* ---------- responsive ---------- */
@media (max-width: 62rem) {
  .hero-grid, .page-head-grid { grid-template-columns: minmax(0, 1fr); }
  .house--hero, .house--head { justify-self: start; max-width: 30rem; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .aufbau-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "fig" "body"; }
  .aufbau-figure { margin-block: .5rem 1.5rem; }
  .svc-group { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 40rem) {
  .facts { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-list li { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom .made-by { margin-left: 0; }
  .tile-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- print ---------- */
@media print {
  .site-header, .nav-toggle, .lightbox, .band-roof, .hero-lines { display: none !important; }
  .band, .site-footer { clip-path: none; background: none; color: #000; padding-top: 1rem; }
  .band p, .band h2 { color: #000; }
}
