/* Base theme for Sachverständigenbüro für Schäden an Gebäuden */
:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --color-bg: #050505;
  --color-surface: #0a0a0a;
  --color-surface-alt: #161616;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.16);
  --color-text: #f6f6f6;
  --color-text-muted: rgba(242, 242, 242, 0.68);
  --color-accent: #ffffff;
  --shadow-soft: 0 24px 48px rgba(0, 0, 0, 0.4);
  --radius-pill: 6px;
  --radius-lg: 8px;
  --radius-md: 6px;
  --radius-sm: 4px;
  --anchor-offset: calc(var(--header-height, 76px) + var(--space-sm));
  --space-2xs: clamp(8px, 1.2vw, 11px);
  --space-xs: clamp(12px, 1.5vw, 16px);
  --space-sm: clamp(16px, 1.9vw, 22px);
  --space-md: clamp(22px, 2.6vw, 30px);
  --space-lg: clamp(28px, 3.4vw, 42px);
  --space-xl: clamp(40px, 4.8vw, 60px);
  --space-2xl: clamp(56px, 6.4vw, 88px);
  --space-3xl: clamp(76px, 8.8vw, 128px);
  --section-entry-space: 124px;
  --section-transition-pad: calc(var(--space-md) - var(--space-3xs, 6px));
  --section-inline-space: 24px;
  --split-content-gap: 24px;
  --split-section-tail-space: 56px;
  --touch-target-size: 44px;
  --transition-base: cubic-bezier(0.22, 0.61, 0.36, 1);
  --layout-max-width: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overscroll-behavior-y: none;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body.is-nav-open {
  overflow: hidden;
}

body.is-modal-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
  object-fit: cover;
  border-radius: var(--radius-md);
  transition: transform 420ms var(--transition-base), filter 320ms ease, box-shadow 320ms ease;
  will-change: transform;
}

img:not(.site-logo) {
  filter: saturate(1.08) contrast(1.06);
  box-shadow: 0 24px 52px rgba(3, 3, 3, 0.36);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
}

img.site-logo {
  filter: none;
  box-shadow: none;
  background: none;
  transition: none;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

a[href^="tel:"],
a[href^="mailto:"] {
  color: inherit;
  text-decoration: none;
  transition: color 200ms ease, text-decoration-color 200ms ease;
  --contact-link-hover-color: #ffffff;
}

a[href^="tel:"]:not(.btn):hover,
a[href^="tel:"]:not(.btn):focus-visible,
a[href^="mailto:"]:not(.btn):hover,
a[href^="mailto:"]:not(.btn):focus-visible {
  color: var(--contact-link-hover-color, #ffffff);
}

a[href^="tel:"]:focus-visible,
a[href^="mailto:"]:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 4px;
}

.contact-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: color 200ms ease, text-decoration-color 200ms ease;
}

.contact-link:hover,
.contact-link:focus-visible {
  color: #ffffff;
  text-decoration-color: #ffffff;
}

.contact-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 4px;
}

main {
  display: block;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

h3 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
}

h4 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
}

p {
  margin: 0;
  color: var(--color-text-muted);
}

strong {
  font-weight: 600;
  color: var(--color-text);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 24px;
  top: 24px;
  width: auto;
  height: auto;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  color: var(--color-text);
  z-index: 700;
}

.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;
}

#kontakt {
  scroll-margin-top: var(--anchor-offset);
}

.container {
  width: min(var(--layout-max-width), 100%);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 60px);
}

.section {
  padding-block-start: var(--section-entry-space);
  padding-block-end: var(--section-entry-space);
  scroll-margin-top: var(--anchor-offset);
}

.hero {
  scroll-margin-top: var(--anchor-offset);
}

.section:last-of-type {
  border-bottom: none;
}

.section--compact {
  padding-block-start: var(--section-entry-space);
  padding-block-end: var(--section-entry-space);
}

.section--compact:last-of-type {
  padding-block-end: 38px;
}

.section--no-divider {
  border-bottom: none;
  padding-block-start: var(--section-inline-space);
  padding-block-end: var(--section-inline-space);
}

/* Keep the start offset identical for sections that begin with an eyebrow heading. */
.section:has(> .container > .section-heading > .eyebrow) {
  padding-block-start: var(--section-entry-space);
}

/*
  If a bordered block ends a section, the next eyebrow-section starts its spacing
  directly from that outer border edge.
*/
.section:has(> .container > .stat-list:last-child) + .section:has(> .container > .section-heading > .eyebrow),
.section:has(> .container > .feature-grid:last-child) + .section:has(> .container > .section-heading > .eyebrow),
.section:has(> .container > .contact-card:last-child) + .section:has(> .container > .section-heading > .eyebrow),
.section:has(> .container > .case-grid:last-child) + .section:has(> .container > .section-heading > .eyebrow),
.section:has(> .container > .gallery-grid:last-child) + .section:has(> .container > .section-heading > .eyebrow) {
  padding-block-start: 0;
}

/*
  For split sequences using the compact no-divider rhythm, keep the next
  eyebrow-section start visually consistent.
*/
.section.section--no-divider:has(.split > .figure-inline-gallery) + .section:has(> .container > .section-heading > .eyebrow) {
  padding-block-start: calc(var(--section-entry-space) - var(--section-inline-space));
}

@media (min-width: 721px) {
  .section.section--no-divider:has(.split > .figure-inline-gallery) + .section:has(> .container > .section-heading > .eyebrow) {
    padding-block-start: calc(var(--section-entry-space) - (var(--section-inline-space) / 2));
  }
}

.section.section--no-divider:not(:has(.split > .figure-inline-gallery)) + .section:has(> .container > .section-heading > .eyebrow) {
  padding-block-start: calc(var(--section-entry-space) - var(--section-inline-space));
}

/* Group-intro headings start from the predecessor section spacing only. */
.section + .section.section--group-intro:has(> .container > .section-heading > .eyebrow) {
  padding-block-start: 0;
}

/* Ensure spacing before the next section starts after image blocks and inline controls. */
.section:has(.split > :is(.figure-inline-gallery, .roof-photo-grid))::after {
  content: '';
  display: block;
  height: var(--split-section-tail-space);
}

.section--group-intro {
  padding-block-end: 40px;
}

.section--group-follow {
  padding-block-start: 0;
}

/*
  On the Gutachten page, align the last image-to-footer divider gap
  with the Sanierung contact-card-to-footer divider rhythm.
*/
#kostenermittlung.section--no-divider {
  padding-block-end: 38px;
}

#kostenermittlung.section--no-divider::after {
  height: 0;
}

.section > :where(.container) {
  display: grid;
  gap: 40px;
}

.section-heading {
  display: grid;
  gap: 24px;
  width: 100%;
  max-width: var(--layout-max-width);
  min-width: 0;
}

.section-heading .eyebrow {
  justify-self: flex-start;
}

.eyebrow {
  display: inline-grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  column-gap: 12px;
  row-gap: var(--space-3xs, 6px);
  padding-inline: 2px;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
  white-space: normal;
  max-width: 100%;
}

.eyebrow::before {
  content: '';
  width: 40px;
  height: 1px;
  background: rgba(255, 255, 255, 0.28);
  align-self: start;
  margin-top: 0.58em;
}

.lead {
  font-size: clamp(1.02rem, 2.1vw, 1.32rem);
  color: var(--color-text-muted);
  line-height: 1.7;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--touch-target-size);
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform 260ms var(--transition-base), background 260ms ease, color 260ms ease, border-color 260ms ease;
}

.btn--solid {
  background: var(--color-accent);
  color: #050505;
  border-color: var(--color-accent);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--color-text);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 4px;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: calc(var(--space-xl) + var(--space-sm));
}

.hero--home {
  padding-block-end: 0;
}

/*
  Align first-page H1 entry on subpages with the homepage title inset.
*/
main > .section[data-parallax]:first-of-type:has(> .container > .section-heading > h1):not(:has(> .container > .section-heading > .eyebrow)) {
  padding-block-start: calc(var(--space-xl) + var(--space-sm));
}

/*
  Keep the first content transition on subpages at the same 124px rhythm
  when a no-divider split section follows directly after the opening heading section.
*/
main > .section[data-parallax]:first-of-type + .section.section--no-divider {
  padding-block-start: 0;
}

.hero__inner {
  display: grid;
  gap: calc(var(--space-md) + var(--space-sm));
  min-width: 0;
}

.hero__label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  flex-wrap: wrap;
  row-gap: var(--space-3xs, 6px);
  white-space: normal;
}

.hero__label::before {
  content: '';
  width: 54px;
  height: 1px;
  background: rgba(255, 255, 255, 0.28);
}

.hero__content {
  display: grid;
  gap: var(--space-md);
  width: 100%;
  max-width: var(--layout-max-width);
  min-width: 0;
}

.hero__content > h1 {
  overflow-wrap: anywhere;
  hyphens: auto;
  text-wrap: balance;
}

.hero__subtitle {
  display: inline-flex;
  flex-direction: column;
  gap: var(--space-4xs, 4px);
  font-size: clamp(1.3rem, 2.6vw, 2.2rem);
  letter-spacing: 0.08em;
  color: var(--color-text);
}

.hero__subtitle-line {
  display: block;
  line-height: 1.25;
}

.section-heading > h1,
.section-heading > h2 {
  overflow-wrap: anywhere;
  hyphens: auto;
  text-wrap: balance;
}

.hero__meta {
  display: grid;
  gap: calc(var(--space-sm) + var(--space-2xs));
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  align-items: center;
}

.stat-list.hero__credentials {
  grid-template-columns: repeat(auto-fit, minmax(clamp(260px, 45vw, 420px), 1fr));
  align-items: stretch;
}

.hero__credentials .stat {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  height: 100%;
  gap: var(--space-3xs, 6px);
}

.stat-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: calc(var(--space-sm) + var(--space-2xs));
}

@media (min-width: 960px) {
  .stat-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.stat {
  display: grid;
  gap: var(--space-2xs);
  padding: calc(var(--space-md) - var(--space-2xs));
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  text-align: left;
  min-width: 0;
}

.stat dt {
  font-size: clamp(1.28rem, 1.9vw, 1.48rem);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

.stat-title--compact,
.stat-title--wrap {
  font-size: clamp(1.12rem, 1.65vw, 1.32rem);
  letter-spacing: -0.01em;
}

.stat-title--wrap {
  white-space: normal;
  display: inline-block;
  line-height: 1.15;
}

.stat dd {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.stat__timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--color-text);
  font-size: 0.95rem;
}

.stat__timeline li {
  line-height: 1.55;
  letter-spacing: 0.01em;
}

.stat__intro {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  line-height: 1.55;
  color: var(--color-text);
  margin: 0 0 var(--space-3xs, 6px);
}

.stat__list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
  color: var(--color-text);
  font-size: 0.95rem;
}

.stat__list li {
  letter-spacing: 0.01em;
  line-height: 1.55;
}

/* Align card and case headlines with stat headline sizing */
.feature-card > h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
}

.feature-card > h3,
.step > h3,
.case-card > h2 {
  font-size: clamp(1.28rem, 1.9vw, 1.48rem);
}

/* Feature grid */
.feature-grid {
  display: grid;
  gap: calc(var(--space-sm) + var(--space-2xs));
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.feature-group {
  display: grid;
  gap: calc(var(--space-md) + var(--space-xs));
}

.feature-card {
  display: grid;
  gap: calc(var(--space-sm) - var(--space-2xs) / 2);
  align-content: start;
  height: 100%;
  padding: calc(var(--space-md) - var(--space-2xs));
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.split .feature-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.feature-summary {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  display: grid;
  gap: var(--space-2xs);
}

.feature-summary__lists {
  display: grid;
  gap: calc(var(--space-sm) - var(--space-3xs));
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-summary > p {
  color: var(--color-text);
  font-size: clamp(1.05rem, 1.4vw, 1.18rem);
  letter-spacing: 0.01em;
}

.feature-summary ul {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 8px;
  color: var(--color-text-muted);
}

.feature-summary li {
  line-height: 1.55;
  letter-spacing: 0.01em;
}

.feature-card hr {
  width: 100%;
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-sm) 0;
}

.feature-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--color-text-muted);
}

.feature-card li::marker {
  color: rgba(255, 255, 255, 0.4);
}

/* Split layout */
.split {
  display: grid;
  gap: var(--split-content-gap);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
}

.split > .feature-card {
  align-self: center;
}

.split--eyebrow-start {
  align-items: center;
}

.split--eyebrow-start > .feature-card {
  align-self: center;
}

.split--transition-anchor > .feature-card {
  padding-bottom: 0;
}

.section--portrait-sequence + .section--portrait-sequence {
  padding-block-start: calc(var(--section-entry-space) - var(--section-inline-space));
}

.section--portrait-sequence + .section--portrait-sequence + .section--portrait-sequence {
  padding-block-start: calc(var(--section-entry-space) - var(--section-inline-space));
}

.split figure {
  margin: 0;
}

.about-hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(280px, 34vw, 460px);
  gap: calc(var(--space-sm) + var(--space-2xs));
  align-items: center;
}

.about-hero-content .lead {
  margin: 0;
}

.about-hero-figure {
  margin: 0;
  width: 100%;
  justify-self: end;
  aspect-ratio: 16 / 10;
  max-height: clamp(220px, 34vh, 360px);
  overflow: hidden;
}

.about-hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section.about-hero-section:has(> .container > .section-heading > .eyebrow) {
  padding-block-start: calc(var(--space-xl) + var(--space-sm) - 44px);
  padding-block-end: var(--section-entry-space);
}

@media (max-width: 900px) {
  .about-hero-content {
    grid-template-columns: 1fr;
  }

  .about-hero-figure {
    order: 1;
    justify-self: stretch;
  }
}

.quote-block {
  font-size: clamp(1.2rem, 2.6vw, 1.8rem);
  line-height: 1.6;
  color: var(--color-text);
}

.feature-card .quote-block {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.55;
}

.review-rating {
  display: inline-flex;
  align-items: center;
  font-size: clamp(1rem, 2vw, 1.4rem);
  color: #f5c96b;
  margin-bottom: calc(var(--space-xs) - var(--space-2xs) / 2);
}

.review-rating span {
  letter-spacing: 4px;
}

.signature {
  display: grid;
  gap: var(--space-xs);
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.7);
}

.signature a {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  display: inline-block;
  transition: transform 260ms var(--transition-base);
}

.signature a:hover,
.signature a:focus-visible {
  transform: translateY(-2px);
}

.signature a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 4px;
}

/* Step timeline */
.step-list {
  display: grid;
  gap: calc(var(--space-sm) + var(--space-2xs));
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  padding-left: calc(var(--space-md) + var(--space-2xs));
}

.step {
  position: relative;
  display: grid;
  gap: var(--space-xs);
}

.step::before {
  content: '';
  position: absolute;
  left: calc(-1 * (var(--space-md) + var(--space-2xs)));
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08);
  transform: translateX(-50%);
}

/* Contact panel */
.contact-card {
  display: grid;
  width: 100%;
  gap: var(--space-md);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding-block: min(1cm, 24px);
  padding-inline: var(--space-lg);
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  align-items: center;
  --contact-link-hover-color: rgba(255, 255, 255, 0.78);
}

.contact-stack--tight {
  gap: 24px;
}

.contact-stack--tight .contact-card {
  padding-block: min(1cm, 24px);
}

.contact-card__intro {
  display: grid;
  gap: calc(var(--space-sm) - var(--space-2xs) / 2);
  color: var(--color-text-muted);
}

.contact-card .btn--solid {
  color: #000000;
}

.contact-card .btn--ghost {
  color: #ffffff;
}

.contact-card address {
  font-style: normal;
  display: grid;
  gap: calc(var(--space-sm) - var(--space-2xs) / 2);
  color: var(--color-text-muted);
  justify-self: end;
}

.contact-card a:not(.btn) {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.contact-card a:not(.btn):hover,
.contact-card a:not(.btn):focus-visible {
  color: var(--contact-link-hover-color, rgba(255, 255, 255, 0.78));
}

.contact-card a.contact-card__email {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: color 200ms ease;
}

.contact-card a.contact-card__email:hover,
.contact-card a.contact-card__email:focus-visible {
  color: #ffffff;
}

.contact-card a.contact-card__email:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 4px;
}

/* Gallery */
.gallery-grid {
  position: relative;
  display: grid;
  gap: clamp(var(--space-lg), 4vw, calc(var(--space-xl) + var(--space-2xs)));
}

.insight-gallery {
  --insight-card-min-width: clamp(280px, 48vw, 420px);
  --insight-card-max-width: min(520px, 82vw);
  --insight-card-height: clamp(340px, 58vw, 520px);
}

.insight-gallery__track {
  display: flex;
  gap: clamp(var(--space-md), 3vw, var(--space-xl));
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: clamp(var(--space-xs), 3vw, var(--space-md));
  padding-block: var(--space-xs);
  padding-inline: 0;
  scrollbar-width: none;
}

.insight-gallery__track::-webkit-scrollbar {
  display: none;
}

.insight-card {
  position: relative;
  display: block;
  margin: 0;
  min-width: var(--insight-card-min-width);
  max-width: var(--insight-card-max-width);
  height: var(--insight-card-height);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(12, 12, 12, 0.85), rgba(18, 18, 18, 0.72));
  box-shadow: 0 48px 118px rgba(0, 0, 0, 0.6);
  scroll-snap-align: center;
  backdrop-filter: blur(14px);
  isolation: isolate;
}

.insight-card .gallery-trigger {
  height: 100%;
}

.insight-card__media {
  position: absolute;
  inset: 0;
}

.insight-card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.05) 0%, rgba(5, 5, 5, 0.88) 100%);
  opacity: 0;
  transition: opacity 320ms var(--transition-base);
  pointer-events: none;
}

.insight-card:focus-within .insight-card__media::after {
  opacity: 0;
}

.insight-card .gallery-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.insight-card--roof-check .gallery-trigger img {
  object-position: right center;
}

.insight-card__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: clamp(18px, 3vw, 28px);
  display: grid;
  gap: var(--space-xs);
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.02) 0%, rgba(5, 5, 5, 0.88) 64%, rgba(5, 5, 5, 0.95) 100%);
  color: #ffffff;
  transform: translateY(52%);
  opacity: 0;
  transition: transform 360ms var(--transition-base), opacity 320ms ease;
  pointer-events: none;
}

.insight-card:hover .insight-card__caption,
.insight-card:focus-within .insight-card__caption {
  transform: translateY(0);
  opacity: 1;
}

@supports selector(:has(.gallery-trigger:focus-visible)) {
  .insight-card:focus-within:not(:hover) .insight-card__media::after {
    opacity: 0;
  }

  .insight-card:has(.gallery-trigger:focus-visible) .insight-card__media::after {
    opacity: 0;
  }

  .insight-card:focus-within:not(:hover) .insight-card__caption {
    transform: translateY(52%);
    opacity: 0;
  }

  .insight-card:has(.gallery-trigger:focus-visible) .insight-card__caption {
    transform: translateY(0);
    opacity: 1;
  }
}

.insight-card__label {
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.76);
}

.insight-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  line-height: 1.1;
  color: #ffffff;
}

.insight-card__description {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
}

.insight-card__credit {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.56);
}

.insight-gallery__nav {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
}

.insight-gallery__button,
.figure-inline-nav__button {
  --slider-arrow-size: clamp(44px, 3.8vw, 50px);
  --slider-chevron-size: clamp(10px, 1.15vw, 13px);
  --slider-chevron-thickness: 2.4px;
  width: var(--slider-arrow-size);
  height: var(--slider-arrow-size);
  min-width: var(--touch-target-size);
  min-height: var(--touch-target-size);
  border-radius: 0;
  border: none;
  background: transparent;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 180ms ease, color 200ms ease, opacity 200ms ease;
  cursor: pointer;
  position: relative;
  box-shadow: none;
  opacity: 0.78;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.insight-gallery__button::before,
.figure-inline-nav__button::before {
  content: '';
  display: block;
  width: var(--slider-chevron-size);
  height: var(--slider-chevron-size);
  border-right: var(--slider-chevron-thickness) solid currentColor;
  border-bottom: var(--slider-chevron-thickness) solid currentColor;
  transform: rotate(-45deg);
  transition: transform 200ms ease;
}

.insight-gallery__button[data-insight-prev]::before,
.figure-inline-nav__button--prev::before {
  transform: rotate(135deg);
}

.insight-gallery__button[data-insight-next]::before,
.figure-inline-nav__button--next::before {
  transform: rotate(-45deg);
}

.insight-gallery__button svg,
.figure-inline-nav__button svg {
  display: none;
}

.insight-gallery__button:hover,
.insight-gallery__button:focus-visible,
.figure-inline-nav__button:hover,
.figure-inline-nav__button:focus-visible {
  transform: none;
  background: transparent;
  border: none;
  color: #ffffff;
  box-shadow: none;
  opacity: 1;
}

.insight-gallery__button:active,
.figure-inline-nav__button:active {
  transform: none;
  background: transparent;
  opacity: 0.82;
}

.insight-gallery__button:focus-visible,
.figure-inline-nav__button:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.45);
  outline-offset: 4px;
}

.insight-gallery__button[disabled],
.insight-gallery__button[aria-disabled="true"],
.figure-inline-nav__button[disabled],
.figure-inline-nav__button[aria-disabled="true"] {
  opacity: 0.28;
  color: rgba(255, 255, 255, 0.35);
  cursor: not-allowed;
  transform: none;
  border: none;
  background: transparent;
  box-shadow: none;
}

.insight-gallery__button {
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.insight-gallery__button:hover,
.insight-gallery__button:focus-visible,
.insight-gallery__button:active {
  transform: none;
  background: transparent;
  border: none;
  box-shadow: none;
}

.insight-gallery__button:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.24);
  outline-offset: 2px;
}

.insight-gallery__button[disabled],
.insight-gallery__button[aria-disabled="true"] {
  opacity: 0.28;
  color: rgba(255, 255, 255, 0.35);
  border: none;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 1024px) {
  .insight-gallery__button,
  .figure-inline-nav__button {
    --slider-arrow-size: 50px;
    --slider-chevron-size: 11px;
  }
}

@media (max-width: 768px) {
  .insight-gallery__track {
    padding-inline: clamp(var(--space-xs), 6vw, var(--space-sm));
  }
}

@media (prefers-reduced-motion: reduce) {
  .insight-card,
  .insight-card__caption,
  .insight-card__media::after,
  .insight-gallery__button {
    transition: none;
  }
}

.gallery-trigger {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: default;
  color: inherit;
  text-align: inherit;
  border-radius: inherit;
}

.gallery-trigger:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.68);
  outline-offset: 0;
}

.gallery-trigger img {
  border-radius: inherit;
}

.figure-gallery__hidden {
  display: none;
}

/* Gallery lightbox */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 6vw, 80px);
  background: rgba(5, 5, 5, 0.94);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  overflow-y: auto;
  min-height: 100vh;
  width: 100%;
}

.gallery-modal.is-active {
  opacity: 1;
  pointer-events: auto;
}

.gallery-modal__dialog {
  position: relative;
  max-width: min(1080px, 92vw);
  width: min(1080px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  transform: translate3d(0, 26px, 0) scale(0.95);
  opacity: 0;
  transition: transform 260ms var(--transition-base), opacity 220ms ease;
  overflow: hidden;
}

.gallery-modal.is-active .gallery-modal__dialog {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
}

.gallery-modal__figure {
  width: 100%;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gallery-modal__image {
  width: 100%;
  max-height: min(80vh, 860px);
  object-fit: contain;
  border-radius: 0;
  background: none;
  border: none;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.62);
  filter: none;
  transition: none;
}

.gallery-modal__image:focus-visible {
  transform: none !important;
  filter: none !important;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.62);
}

.gallery-modal__caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gallery-modal__meta {
  margin: clamp(16px, 3vw, 24px) 0 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.88);
  color: #f6f6f6;
  text-align: center;
  font-size: clamp(0.94rem, 0.86rem + 0.35vw, 1.08rem);
  letter-spacing: 0.16em;
  font-weight: 600;
  text-transform: none;
  font-variant-numeric: tabular-nums;
  padding: clamp(16px, 3vw, 24px) clamp(32px, 6vw, 48px);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.54);
}

.gallery-modal__meta-counter {
  color: inherit;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.gallery-modal__controls {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 5vw, 32px);
  background: rgba(0, 0, 0, 0.88);
  padding: clamp(18px, 4vw, 26px) clamp(24px, 6vw, 48px) clamp(28px, 6vw, 36px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-modal__control {
  display: grid;
  place-items: center;
  width: clamp(44px, 8vw, 58px);
  height: clamp(44px, 8vw, 58px);
  border-radius: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  box-shadow: none;
  cursor: pointer;
  transition: transform 140ms ease, color 200ms ease, opacity 200ms ease;
  position: relative;
  opacity: 0.82;
}

.gallery-modal__control svg {
  display: none;
}

.gallery-modal__control::before {
  content: '';
  display: block;
  width: clamp(12px, 2.1vw, 15px);
  height: clamp(12px, 2.1vw, 15px);
  border-right: 2.6px solid currentColor;
  border-bottom: 2.6px solid currentColor;
  transform: rotate(-45deg);
}

.gallery-modal__control--prev::before {
  transform: rotate(135deg);
}

.gallery-modal__control:hover,
.gallery-modal__control:focus-visible {
  background: transparent;
  border: none;
  transform: none;
  box-shadow: none;
  color: #ffffff;
  opacity: 1;
}

.gallery-modal__control[disabled],
.gallery-modal__control[aria-disabled="true"] {
  opacity: 0.3;
  color: rgba(255, 255, 255, 0.35);
  cursor: default;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.gallery-modal__control:active {
  transform: none;
  background: transparent;
  opacity: 0.82;
}

.gallery-modal__control:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.45);
  outline-offset: 4px;
}

.gallery-modal__close {
  position: absolute;
  top: clamp(12px, 4vw, 28px);
  right: clamp(12px, 4vw, 28px);
  width: clamp(46px, 10vw, 58px);
  height: clamp(46px, 10vw, 58px);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  color: #f5c84c;
  cursor: pointer;
  transition: transform 160ms ease, color 160ms ease;
}

.gallery-modal__close svg {
  width: clamp(20px, 3vw, 28px);
  height: clamp(20px, 3vw, 28px);
  fill: currentColor;
}

.gallery-modal__close:hover,
.gallery-modal__close:focus-visible {
  color: #fbe28a;
  transform: translateY(-2px);
}

.gallery-modal__close:active {
  transform: translateY(0);
  color: #f0b800;
}

.gallery-modal__close:focus-visible {
  outline: 2px solid rgba(245, 200, 76, 0.8);
  outline-offset: 6px;
}

@media (max-width: 640px) {
  .gallery-modal {
    padding: clamp(12px, 5vw, 28px);
  }

  .gallery-modal__dialog {
    max-width: 100%;
  }

  .gallery-modal__image {
    max-height: 65vh;
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.58);
  }

  .gallery-modal__controls {
    padding: clamp(16px, 6vw, 22px) clamp(18px, 6vw, 28px) clamp(22px, 7vw, 32px);
    gap: clamp(18px, 6vw, 26px);
  }

  .gallery-modal__meta {
    margin-top: clamp(12px, 5vw, 20px);
    padding: clamp(14px, 4vw, 22px) clamp(20px, 6vw, 32px);
  }

  .gallery-modal__close {
    top: clamp(10px, 5vw, 24px);
    right: clamp(10px, 5vw, 24px);
  }
}

.figure-overlay {
  position: relative;
  display: block;
  color: var(--color-text);
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
  background: rgba(15, 15, 15, 0.68);
  box-shadow: 0 28px 64px rgba(5, 5, 5, 0.55);
  transition: transform 360ms var(--transition-base), box-shadow 360ms ease;
}

.figure-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.06) 0%, transparent 55%);
  opacity: 0.35;
  transition: opacity 360ms ease;
  pointer-events: none;
  z-index: 1;
}

.figure-overlay::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 68%;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0) 0%, rgba(5, 5, 5, 0.76) 60%, rgba(5, 5, 5, 0.94) 100%);
  transform: translateY(100%);
  transition: transform 420ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 2;
}

.figure-overlay img {
  border-radius: inherit;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 0;
  box-shadow: none;
  transform-origin: center;
  transition: transform 620ms cubic-bezier(0.34, 1, 0.36, 1), filter 420ms ease;
}

.figure-overlay--landscape {
  aspect-ratio: 4 / 3;
}

.figure-overlay--landscape img {
  height: 100%;
  object-fit: cover;
}

.figure-overlay--portrait {
  aspect-ratio: 3 / 4;
  max-width: clamp(260px, 38vw, 480px);
  width: 100%;
  justify-self: center;
  align-self: center;
}

.figure-overlay--portrait img {
  height: 100%;
  object-fit: cover;
}

.figure-overlay figcaption {
  position: absolute;
  left: clamp(18px, 3vw, 32px);
  right: clamp(18px, 3vw, 32px);
  bottom: clamp(18px, 3vw, 32px);
  margin: 0;
  color: #f6f6f6;
  font-size: clamp(0.68rem, 0.6rem + 0.28vw, 0.84rem);
  letter-spacing: 0.08em;
  text-transform: none;
  line-height: 1.6;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.84);
  z-index: 3;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1), opacity 360ms ease;
  pointer-events: none;
}

.figure-inline-gallery {
  position: relative;
  display: grid;
  gap: clamp(12px, 2.2vw, 20px);
}

.roof-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(6px, 1vw, 10px);
  align-self: center;
}

#dachsanierung .split {
  align-items: center;
}

#dachsanierung .feature-card {
  align-self: center;
  margin-block: auto;
}

.roof-photo-grid__item {
  margin: 0;
}

.roof-photo-grid__item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.figure-inline-gallery > figure {
  margin: 0;
  width: 100%;
  align-self: center;
}

.figure-inline-nav {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 20px);
  padding: 0;
  pointer-events: auto;
  z-index: 3;
  opacity: 1;
}

@media (min-width: 721px) {
  .figure-inline-gallery {
    overflow: visible;
  }

  .figure-inline-nav {
    position: absolute;
    left: 50%;
    top: calc(100% + clamp(14px, 2vw, 22px));
    transform: translateX(-50%);
    width: max-content;
    z-index: 3;
  }
}

.figure-inline-nav[hidden],
.figure-inline-dots[hidden] {
  display: none !important;
}

.figure-inline-nav__button {
  --slider-arrow-size: clamp(42px, 4vw, 46px);
  --slider-chevron-size: clamp(9px, 0.9vw, 11px);
  --slider-chevron-thickness: 2px;
  width: var(--slider-arrow-size);
  height: var(--slider-arrow-size);
  pointer-events: auto;
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.figure-inline-nav__button:hover,
.figure-inline-nav__button:focus-visible {
  transform: none;
  background: transparent;
  border: none;
  box-shadow: none;
}

.figure-inline-nav__button:active {
  transform: none;
  background: transparent;
}

.figure-inline-nav__button:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.24);
  outline-offset: 2px;
}

.figure-inline-nav__button[disabled],
.figure-inline-nav__button[aria-disabled="true"] {
  opacity: 0.28;
  color: rgba(255, 255, 255, 0.35);
  border: none;
  background: transparent;
  box-shadow: none;
}

.figure-inline-nav__counter {
  display: inline-block;
  margin-top: clamp(4px, 1vw, 10px);
}

.figure-inline-dots {
  display: none !important;
}

.figure-overlay figcaption strong {
  font-weight: 600;
}

.figure-overlay:focus-within::before {
  opacity: 0.6;
}

.figure-overlay:focus-within::after {
  transform: translateY(100%);
}

.figure-overlay:hover figcaption,
.figure-overlay:focus-within figcaption {
  transform: translateY(0);
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .figure-overlay:focus-within {
    transform: translateY(-6px);
    box-shadow: 0 28px 64px rgba(5, 5, 5, 0.55);
  }

  .figure-overlay:focus-within img {
    transform: scale(1.08);
    filter: saturate(1.12) contrast(1.08);
  }
}

@media (max-width: 640px) {
  .insight-gallery__button,
  .figure-inline-nav__button {
    --slider-arrow-size: 48px;
    --slider-chevron-size: 10px;
  }

  .figure-inline-nav__button {
    --slider-arrow-size: 44px;
    --slider-chevron-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  img,
  .figure-overlay,
  .figure-overlay img,
  .figure-overlay::before,
  .figure-overlay::after {
    transition: none !important;
  }

  img:not(.site-logo),
  .figure-overlay,
  .figure-overlay img {
    transform: none !important;
  }
}

/* Reference cards */
.case-grid {
  display: grid;
  gap: calc(var(--space-sm) + var(--space-2xs));
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.case-card {
  display: grid;
  gap: calc(var(--space-sm) - var(--space-2xs) / 2);
  padding: calc(var(--space-md) - var(--space-2xs));
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.case-gallery {
  margin-top: clamp(24px, 4vw, 48px);
}

.case-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.case-card li::marker {
  color: rgba(255, 255, 255, 0.4);
}

@media (min-width: 721px) and (max-width: 1024px) {
  .feature-grid,
  .stat-list,
  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid > :last-child:nth-child(odd),
  .stat-list > :last-child:nth-child(odd),
  .case-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* Legal content */
.legal-content {
  display: grid;
  gap: var(--space-md);
  width: 100%;
  min-width: 0;
  max-width: var(--layout-max-width);
  font-size: 0.98rem;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

.legal-content--framed {
  background: rgba(10, 10, 10, 0.72);
  padding: clamp(24px, 5vw, 48px);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.legal-content h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.2;
  text-wrap: balance;
}

.legal-content h3 {
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  line-height: 1.25;
  text-wrap: balance;
}

.legal-content ul,
.legal-content ol {
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.legal-content a:not(.contact-link) {
  color: var(--color-text-muted);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.legal-content a:not(.contact-link):hover,
.legal-content a:not(.contact-link):focus-visible {
  color: #ffffff;
}

.legal-content p,
.legal-content li,
.legal-content th,
.legal-content td,
.legal-content dd {
  color: inherit;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.legal-content li::marker {
  color: inherit;
}

@media (max-width: 720px) {
  .legal-content {
    gap: calc(var(--space-sm) + var(--space-2xs));
    font-size: 0.95rem;
  }

  .legal-content h2 {
    font-size: clamp(1.34rem, 5.8vw, 1.7rem);
  }

  .legal-content h3 {
    font-size: clamp(1.12rem, 4.8vw, 1.34rem);
  }

  .legal-content ul,
  .legal-content ol {
    padding-left: 18px;
  }
}

/* Floating action button for mobile */
.floating-cta {
  display: none;
  position: fixed;
  right: clamp(14px, 4vw, 28px);
  bottom: clamp(18px, 5vw, 32px);
  width: 60px;
  height: 60px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-soft);
  z-index: 640;
  transition: transform 240ms var(--transition-base), opacity 220ms ease, box-shadow 220ms ease;
  align-items: center;
  justify-content: center;
}

.floating-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.floating-cta:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 6px;
}

.floating-cta.is-hidden {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.floating-cta__icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  color: inherit;
}

.floating-cta__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 960px) {
  .floating-cta {
    display: inline-flex;
  }
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(120%);
  width: min(560px, calc(100% - 32px));
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: rgba(10, 10, 10, 0.96);
  border: 1px solid var(--color-border-strong);
  color: var(--color-text);
  display: grid;
  gap: var(--space-sm);
  box-shadow: var(--shadow-soft);
  z-index: 650;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 320ms var(--transition-base),
    opacity 220ms ease,
    visibility 0s linear 320ms;
}

.cookie-banner.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    transform 320ms var(--transition-base),
    opacity 220ms ease,
    visibility 0s linear 0s;
}

.cookie-banner__headline {
  margin: 0;
  font-size: 1.2rem;
}

.cookie-banner__text {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

.cookie-banner__meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.88rem;
  line-height: 1.55;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.cookie-btn {
  flex: 1 1 auto;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--color-surface-alt);
  color: var(--color-text);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 200ms var(--transition-base), background 200ms ease, color 200ms ease;
}

.cookie-btn.primary {
  background: #ffffff;
  color: #050505;
}

.cookie-btn.secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.cookie-btn.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.cookie-btn:hover {
  transform: translateY(-2px);
}

.cookie-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 4px;
}

.cookie-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  font-size: 0.85rem;
}

.cookie-links a,
.cookie-links button {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.cookie-links button:focus-visible,
.cookie-links a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 4px;
}

@media (max-width: 720px) {
  .hero {
    overflow: visible;
  }

  .split {
    grid-template-columns: 1fr;
    gap: var(--split-content-gap);
  }

  .split > .feature-card {
    order: 1;
  }

  .split > :is(.figure-inline-gallery, .roof-photo-grid, figure) {
    order: 2;
  }

  /*
    On mobile, visible slider arrows are part of the normal flow.
    Remove extra tail-reserve there to avoid oversized gaps.
    Keep the reserve when arrows are hidden so spacing remains visually consistent.
  */
  .section:has(.split > .figure-inline-gallery > .figure-inline-nav:not([hidden]))::after {
    height: 0;
  }

  .contact-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .contact-stack--tight .contact-card {
    border: none;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }

  .contact-card address {
    justify-self: start;
  }

  .hero__inner {
    gap: calc(var(--space-md) + var(--space-xs));
  }

  .stat-list {
    grid-template-columns: 1fr;
  }

  .stat dt {
    white-space: normal;
  }

  .step-list {
    border-left: none;
    padding-left: 0;
  }

  .step::before {
    left: 0;
    top: -18px;
    transform: none;
  }

  .step {
    padding-top: var(--space-sm);
  }

  .cookie-banner {
    left: 16px;
    right: 16px;
    transform: translateY(120%);
  }

  .cookie-banner.is-visible {
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .roof-photo-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 721px) {
  .split--transition-anchor {
    align-items: center;
  }

  .split--transition-anchor > .feature-card {
    align-self: center;
  }
}

/* Animation helper */
.fade-up {
  opacity: 0;
  transform: none;
  transition: opacity 600ms var(--transition-base);
}

.fade-up.is-visible {
  opacity: 1;
  transform: none;
}

[data-parallax] {
  --parallax-offset: 0px;
  transform: none;
  transition: none;
}

@media (max-width: 1024px) {
  .fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .fade-up.is-visible {
    transform: none;
  }

  [data-parallax] {
    transform: none !important;
    transition: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .fade-up.is-visible {
    transform: none;
  }

  [data-parallax] {
    transform: none !important;
    transition: none !important;
  }
}
