/* Buob — Layout & Sektionen (aus Design-Single-Source) */
/* ============================================================
   Buob Rohrleitungsbau — Marketing website UI kit styles
   Faithful recreation of the binding "Desktop" frame.
   ============================================================ */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* belt-and-braces against full-bleed/diagonal overflow */
}
a { color: inherit; }

/* Skip link — first focusable element for keyboard users */
.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--petrol-800);
  color: var(--white);
  border-radius: var(--btn-radius);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: 16px; }

.container {
  width: 100%;
  max-width: var(--frame-max);
  margin: 0 auto;
  padding: 0 var(--page-margin);
}

/* The binding 12-column grid. Drop content onto column lines with
   grid-column: <start> / <end>. */
.grid12 {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), 1fr);
  column-gap: var(--grid-gutter);
}

.section { padding: clamp(64px, 9vw, 120px) 0; }

/* ---------------------------------------------------------------- */
/* Header                                                           */
/* ---------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
.site-header.is-stuck,
.site-header--solid {
  background: var(--petrol-800);
  box-shadow: 0 1px 0 rgba(0,0,0,0.18), 0 14px 34px -22px rgba(0,0,0,0.55);
}
/* Pages without a hero (Impressum, Datenschutz): no photo to read the white nav
   against, so the header is solid from the start and the scrim is pointless. */
.site-header--solid::before { opacity: 0; }
.site-header::before {
  /* top legibility scrim so the white nav reads over the hero photo */
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 200px;
  background: linear-gradient(180deg, rgba(8,14,21,0.62) 0%, rgba(8,14,21,0.28) 45%, rgba(8,14,21,0) 100%);
  pointer-events: none;
  opacity: 1;
  transition: opacity var(--dur-med) var(--ease-out);
}
.site-header.is-stuck::before { opacity: 0; }

/* when the mobile menu is open the whole header goes solid petrol */
.site-header.is-open { background: var(--petrol-800); box-shadow: 0 1px 0 rgba(0,0,0,0.18); }
.site-header.is-open::before { opacity: 0; }
/* show the white logo (not the dark-on-paper tab) while the menu is open */
.site-header.is-open .brand { background: transparent; clip-path: none; }
.site-header.is-open .brand__logo { display: none; }
/* white logo matches the dark logo's size so the mark doesn't jump on open */
.site-header.is-open .brand__logo--white { display: block; width: auto; height: 76px; }

.site-header__inner {
  position: relative;
  max-width: var(--frame-max);
  margin: 0 auto;
  height: 96px;
  padding: 0 0 0 0;
  display: flex;
  align-items: center;
}

/* white angled logo tab (top state) */
.brand {
  position: absolute;
  top: 0;
  left: calc(-1 * var(--bleed));
  z-index: 2;
  width: calc(332px + var(--bleed));
  min-height: 132px;
  padding: 30px 0 0 calc(var(--bleed) + var(--page-margin));
  background: var(--paper);
  border-radius: 0;
  clip-path: polygon(0 0, 100% 0, calc(100% - 13.6px) calc(100% - 4.0px), calc(100% - 13.9px) calc(100% - 2.4px), calc(100% - 14.9px) calc(100% - 1.0px), calc(100% - 16.4px) calc(100% - 0.2px), calc(100% - 18px) 100%, 0 100%);
  display: flex;
  align-items: flex-start;
  transition: min-height var(--dur-med) var(--ease-out), background var(--dur-med) var(--ease-out), width var(--dur-med) var(--ease-out), left var(--dur-med) var(--ease-out);
}
.brand__logo { height: 76px; width: auto; display: block; transition: height var(--dur-med) var(--ease-out); }
.brand__logo--white { display: none; }

.is-stuck .brand {
  left: 0;
  width: 220px;
  min-height: 96px;
  padding: 0 0 0 var(--page-margin);
  background: transparent;
  clip-path: none;
  align-items: center;
}
.is-stuck .brand__logo { display: none; height: 38px; }
.is-stuck .brand__logo--white { display: block; height: 38px; width: auto; }

.site-nav, .header-phone, .header-cta { position: relative; z-index: 2; }

/* reserve room so the nav clears the logo tab (matches the tab's 332px right edge) */
.brand-spacer { width: 404px; flex: 0 1 404px; transition: width var(--dur-med) var(--ease-out); }
.is-stuck .brand-spacer { width: 232px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-right: auto;
  padding-right: 24px;
}
.site-nav__link {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  white-space: nowrap;
  opacity: 0.92;
  transition: color var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.site-nav__link:hover { color: var(--teal-400); opacity: 1; }

/* phone — outlined pill */
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: var(--btn-height);
  padding: 0 var(--btn-padding-x);
  margin-right: 16px;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: var(--btn-radius);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.4px;
  white-space: nowrap;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.header-phone:hover { border-color: var(--teal-400); background: rgba(255,255,255,0.06); }
.header-phone__icon { width: 20px; height: 20px; filter: brightness(0) invert(1); }

/* CTA — solid petrol block, full bar height */
.header-cta {
  display: inline-flex;
  align-items: center;
  height: var(--btn-height);
  padding: 0 var(--btn-padding-x);
  border-radius: var(--btn-radius);
  margin-right: var(--page-margin);
  background: linear-gradient(180deg, #015a7d 0%, var(--petrol-800) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: filter var(--dur-fast) var(--ease-out);
}
.header-cta:hover { filter: brightness(1.08); }

/* hamburger — hidden on desktop, shown when the nav collapses */
.nav-toggle {
  display: none;
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
  margin-right: var(--page-margin);
  padding: 0;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: var(--btn-radius);
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.nav-toggle:hover { border-color: var(--teal-400); }
.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.site-header.is-open .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.is-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
.site-header.is-open .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile dropdown menu panel */
.mobile-menu {
  display: none;
  position: relative;
  z-index: 1;
  background: var(--petrol-800);
  padding: 8px var(--page-margin) 32px;
  box-shadow: 0 18px 34px -22px rgba(0,0,0,0.6);
}
.mobile-menu__nav { display: flex; flex-direction: column; }
.mobile-menu__link {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  transition: color var(--dur-fast) var(--ease-out);
}
.mobile-menu__link:hover { color: var(--teal-400); }
.mobile-menu__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.mobile-menu__phone {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: var(--btn-height);
  padding: 0 var(--btn-padding-x);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: var(--btn-radius);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  white-space: nowrap;
}
.mobile-menu__cta { margin-right: 0; }

/* ---------------------------------------------------------------- */
/* Hero                                                             */
/* ---------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  /* clear the logo tab so the centred title never rides behind it */
  padding: 140px 0 56px;
  overflow: hidden;
  background: var(--ink-900);
}
.hero__photo {
  position: absolute; inset: 0;
  background: url("../images/e66a9f50.jpg") center 22% / cover no-repeat;
}
.hero__scrim {
  position: absolute; top: 96px; left: 0; bottom: 0;
  width: 52%;
  border-radius: 0 var(--btn-radius) 0 0;
  background: linear-gradient(99deg, rgba(8,14,21,0.97) 0%, rgba(8,14,21,0.94) 52%, rgba(8,14,21,0) 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 90px) 100%, 0 100%);
}
.hero__inner {
  position: relative;
  max-width: var(--frame-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--page-margin);
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), 1fr);
  column-gap: var(--grid-gutter);
}
.hero__content { grid-column: 1 / 8; }
.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.014em;
  line-height: 0.95;
  color: var(--white);
  margin: 0;
  max-width: 13ch;
  font-size: clamp(48px, 5.6vw, 84px);
}
.hero__lead {
  margin: var(--space-6) 0 0;
  max-width: 460px;
  font-size: 19px;
  line-height: 1.5;
  color: rgba(255,255,255,0.86);
}
.hero__cta { margin-top: var(--space-7); }

/* ---------------------------------------------------------------- */
/* Leistungen                                                       */
/* ---------------------------------------------------------------- */
.services { background: var(--surface); }
.services__list {
  margin: var(--space-7) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-200);
}
.service-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), 1fr);
  align-items: start;
  column-gap: var(--grid-gutter);
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--line-200);
}
.service-row__num {
  grid-column: 1 / 2;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--teal-500);
  font-variant-numeric: tabular-nums;
}
.service-row__title {
  grid-column: 2 / 6;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--petrol-800);
  margin: 0;
  text-wrap: balance;
}
.service-row__body {
  grid-column: 6 / 13;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
  text-wrap: pretty;
}

/* ---------------------------------------------------------------- */
/* Über mich                                                        */
/* ---------------------------------------------------------------- */
.about {
  position: relative;
  background: var(--ink-900);
  overflow: hidden;
}
.about__photo {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 54%;
  background: url("../images/e7945570.jpg") center top / cover no-repeat;
  /* right edge cut at the logo angle (--logo-angle 6°: 760px × tan6° ≈ 80px) */
  clip-path: polygon(0 0, 100% 0, calc(100% - 80px) 100%, 0 100%);
}
.about__panel {
  position: relative;          /* in-flow now → its inner content sets the section height */
  background: var(--ink-900);
  /* right block, left edge shares the photo's diagonal seam — no overlay */
  clip-path: polygon(54% 0, 100% 0, 100% 100%, calc(54% - 80px) 100%);
}
.about__panel-inner {
  position: relative;
  min-height: 760px;           /* floor; grows when the text is taller (no more clipping) */
  max-width: var(--frame-max);
  margin: 0 auto;
  padding: var(--space-9) var(--page-margin);
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), 1fr);
  column-gap: var(--grid-gutter);
  align-items: center;
}
.about__text {
  grid-column: 8 / 13;
  padding: 0;
}
.about__title {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(34px, 3.4vw, 52px);
  line-height: 1.0;
  letter-spacing: -0.014em;
  color: var(--white);
  margin: var(--space-4) 0 var(--space-6);
  text-wrap: balance;
}
.about__body {
  font-size: 18px;
  line-height: 1.55;
  color: rgba(255,255,255,0.82);
  margin: 0 0 var(--space-7);
  max-width: 520px;
}

/* about stat block — 2×2 with crossing teal rules */
.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 560px;
}
.about__stat { padding: var(--space-6) var(--space-5) var(--space-6) 0; }
.about__stat--c2 { padding-left: var(--space-7); border-left: 1px solid rgba(29,163,163,0.55); }
.about__stat--r2 { border-top: 1px solid rgba(29,163,163,0.55); }
.about__stat-val {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 46px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--teal-400);
}
.about__stat-cap {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.82);
  margin-top: var(--space-4);
  line-height: 1.4;
}

/* ---------------------------------------------------------------- */
/* Statement band                                                   */
/* ---------------------------------------------------------------- */
.statement {
  background: var(--surface);
  padding: var(--space-8) 0;
  overflow: hidden;
}
/* Marquee: the statement scrolls horizontally and loops seamlessly, so the
   full sentence is always readable as it passes — at every screen width.
   Two identical groups translate by -100% of their own width; because the
   content is tiled and identical, the loop has no visible seam. */
.statement__marquee {
  display: flex;
  width: max-content;
}
.statement__group {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  animation: statement-scroll 36s linear infinite;
  will-change: transform;
}
.statement__word,
.statement__sep {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.014em;
  white-space: nowrap;
  line-height: 1;
  font-size: clamp(40px, 7vw, 96px);   /* big like the reference, but readable */
}
.statement__word { color: var(--petrol-800); }
.statement__sep  { color: var(--teal-500); margin: 0 0.4em; }

@keyframes statement-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}
/* Pause the scroll on hover / focus so it can be read at a standstill too. */
.statement:hover .statement__group,
.statement:focus-within .statement__group { animation-play-state: paused; }

/* Static, fully-wrapped fallback — shown only when motion is reduced. */
.statement__static {
  display: none;
  text-align: center;
  margin: 0 auto;
  max-width: 26ch;
  padding: 0 var(--page-margin);
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.014em;
  line-height: 1.08;
  color: var(--petrol-800);
  font-size: clamp(30px, 5vw, 64px);
  text-wrap: balance;
}

/* ---------------------------------------------------------------- */
/* Qualität & Arbeitsweise                                          */
/* ---------------------------------------------------------------- */
.quality {
  position: relative;
  background: #04323f;
  padding: var(--space-10) 0;
  overflow: hidden;
}
.quality__photo {
  position: absolute; inset: 0;
  background: url("../images/60b6103d.png") center 38% / cover no-repeat;
  opacity: 1;
}
.quality__overlay {
  position: absolute; inset: 0;
  /* durchgehend dunkel, in der Mitte leicht aufgehellt, damit das Foto
     durchscheint und Titel sowie Pillars genug Kontrast behalten. */
  background: linear-gradient(100deg, rgba(3,40,52,0.92) 0%, rgba(4,50,63,0.84) 42%, rgba(4,50,63,0.95) 100%);
}
.quality__inner { position: relative; }
.quality__lead {
  margin: var(--space-6) 0 0;
  max-width: 560px;
  font-size: 19px;
  line-height: 1.5;
  color: rgba(255,255,255,0.86);
}
.quality__grid {
  margin-top: var(--space-9);
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), 1fr);
  column-gap: var(--grid-gutter);
}
.pillar {
  grid-column: span 3;
  padding: 0 var(--space-5);
  border-left: 1px solid rgba(29,163,163,0.6);
}
.pillar__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--teal-400);
  margin: 0 0 var(--space-7);
}
.pillar__body {
  font-size: 18px;
  line-height: 1.55;
  color: rgba(255,255,255,0.82);
  margin: 0;
}

/* ---------------------------------------------------------------- */
/* Kontakt                                                          */
/* ---------------------------------------------------------------- */
.contact { background: var(--surface); }
.contact__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 56px;
}
.contact__form-col { flex: 1 1 540px; min-width: 0; max-width: 620px; }
.contact__title {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.014em;
  color: var(--petrol-800);
  margin: var(--space-5) 0 var(--space-7);
  max-width: 17ch;
  text-wrap: balance;
}
.contact__form { display: grid; gap: var(--space-6); max-width: 660px; }
.contact__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.contact__form button { justify-self: start; margin-top: var(--space-2); }
.contact__sent {
  border-radius: var(--radius);
  background: var(--white);
  padding: 36px;
  box-shadow: var(--shadow-card);
  max-width: 660px;
}
.contact__sent-h { font-weight: 700; font-size: 24px; color: var(--petrol-800); margin: 0 0 10px; }
.contact__sent-b { font-size: 16px; line-height: 1.6; color: var(--ink-55); margin: 0; }

/* contact card — compact, ~ the form's height (without the submit button) */
.contact__card {
  flex: 0 0 360px;
  max-width: 360px;
  align-self: center;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-raised);
  background: var(--white);
}
.contact__card-top { padding: 24px 28px 26px; background: var(--white); }
.contact__card-photo {
  height: 170px;
  background: url("../images/e7945570.jpg") center 16% / 150% no-repeat;
  margin-bottom: var(--space-5);
  /* both vertical sides slanted at the logo angle (--logo-angle 6°: 170px × tan6° ≈ 18px) */
  clip-path: polygon(18px 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
}
.contact__name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: var(--petrol-800);
  margin: 0 0 6px;
}
.contact__role { font-size: 17px; color: var(--ink-900); margin: 0 0 14px; }
.contact__signature { display: block; height: 44px; width: auto; color: var(--ink-900); }

.contact__card-panel { background: var(--petrol-800); padding: 10px 28px 12px; }
.contact__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  text-decoration: none;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.contact__item:last-child { border-bottom: 0; }
.contact__item:hover { opacity: 0.82; }
.contact__item-icon { width: 22px; height: 22px; flex: none; color: var(--teal-400); margin-top: 2px; }
.contact__item-value { font-size: 18px; line-height: 1.45; color: var(--white); }

/* ---------------------------------------------------------------- */
/* Prose pages (Impressum / Datenschutz)                            */
/* ---------------------------------------------------------------- */
/* These pages have no hero, so the fixed header would sit on top of the
   headline: the header bar is 96px and the angled logo tab hangs to 132px.
   Clear it, then add the normal section rhythm. */
.page-prose {
  background: var(--paper);
  padding-top: clamp(160px, 15vw, 190px);
  padding-bottom: clamp(64px, 9vw, 120px);
}
/* .container caps the width at --frame-max; legal copy needs a readable measure.
   Same specificity as .container, but this file's later rules win. */
.page-prose .page-prose__inner { max-width: 820px; }
.page-prose__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.06;
  letter-spacing: var(--h2-tracking);
  color: var(--petrol-800);
  margin: 0 0 var(--space-7);
}

/* ---------------------------------------------------------------- */
/* Footer                                                           */
/* ---------------------------------------------------------------- */
.site-footer { background: var(--ink-900); padding: 40px 0; }
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-footer__name { font-size: 15px; font-weight: 700; color: var(--white); letter-spacing: 0.02em; }
.site-footer__nav { display: flex; gap: 36px; }
.site-footer__nav a {
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.66);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.site-footer__nav a:hover { color: var(--teal-400); }

/* ---------------------------------------------------------------- */
/* Responsive                                                       */
/* ---------------------------------------------------------------- */

/* === Header / nav collapse — before the full nav stops fitting === */
@media (max-width: 1340px) {
  .site-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  /* the hamburger replaces the standalone phone pill + CTA in the bar */
  .header-phone, .header-cta { display: none; }
  /* Present but collapsed; opening animates height + fade + a small slide. */
  .mobile-menu {
    display: block;
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    overflow: hidden;
    pointer-events: none;
    transition: max-height var(--dur-med) var(--ease-out),
                opacity var(--dur-med) var(--ease-out),
                transform var(--dur-med) var(--ease-out);
  }
  .site-header.is-open .mobile-menu {
    max-height: 90vh;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .brand-spacer { margin-right: auto; }
}

/* === Hero — stack photo on top, text below (tablet + mobile) ===
   Height no longer matches the viewport here; the photo is cropped to keep
   the worker's face in frame, clear of the fixed header. */
@media (max-width: 1340px) {
  .hero {
    display: block;
    min-height: 0;
    height: auto;
    padding: 0 0 72px;
    background: var(--ink-900);
  }
  .hero__photo {
    position: relative;
    inset: auto;
    width: 100%;
    height: 420px;
    /* face sits below the header band and stays visible at every width */
    background-position: 70% 34%;
  }
  .hero__scrim { display: none; }
  .hero__inner {
    padding-top: 56px;
    padding-bottom: 0;
  }
  .hero__content { grid-column: 1 / -1; }
  .hero__title { max-width: 18ch; }
  .hero__lead { max-width: 60ch; }
  /* the global rule above hides .header-cta in the bar — keep the hero CTA */
  .hero__cta .header-cta { display: inline-flex; }
}
@media (max-width: 1180px) {
  :root { --page-margin: 40px; }
}

/* === Tablet === */
@media (max-width: 1340px) and (min-width: 761px) {
  .quality__grid .pillar { grid-column: span 6; }
  .quality__grid { row-gap: var(--space-7); }
  .hero__content { grid-column: 1 / 10; }
  .hero__scrim { width: 64%; }
}

/* === Mobile === */
@media (max-width: 760px) {
  :root { --page-margin: 24px; --grid-gutter: 20px; }

  .site-header__inner { height: 76px; }
  .brand { min-height: 96px; width: calc(220px + var(--bleed)); padding-top: 22px; clip-path: polygon(0 0, 100% 0, calc(100% - 9.6px) calc(100% - 4.0px), calc(100% - 10.0px) calc(100% - 2.4px), calc(100% - 10.9px) calc(100% - 1.0px), calc(100% - 12.4px) calc(100% - 0.2px), calc(100% - 14px) 100%, 0 100%); }
  .brand__logo { height: 52px; }
  .site-header.is-open .brand__logo--white { height: 52px; }
  .is-stuck .brand { width: 168px; }
  .nav-toggle { width: 44px; height: 44px; }

  .hero { min-height: 0; }
  .hero__photo { height: 300px; background-position: 72% 32%; }
  .hero__content { grid-column: 1 / -1; }
  .hero__lead { font-size: 17px; }

  .services__list { margin-top: 36px; }
  .service-row {
    grid-template-columns: 40px 1fr;
    column-gap: 14px;
    row-gap: 6px;
    align-items: start;
    padding: 24px 0;
  }
  .service-row__num { grid-column: 1 / 2; font-size: 18px; }
  .service-row__title { grid-column: 2 / 3; font-size: 19px; }
  .service-row__body { grid-column: 2 / 3; }

  /* About — stack photo above the (now un-angled) text panel */
  .about { min-height: 0; }
  .about__photo {
    position: relative;
    width: 100%;
    height: 300px;
    inset: auto;
    background-position: center 28%;
    background-size: cover;
  }
  .about__panel { position: relative; width: 100%; clip-path: none; background: var(--ink-900); }
  .about__panel-inner { display: block; height: auto; min-height: 0; padding: 48px var(--page-margin); }
  .about__text { grid-column: 1 / -1; padding: 0; }
  .about__body { font-size: 16px; margin-bottom: var(--space-7); }
  .about__stats { max-width: none; }
  .about__stat-val { font-size: 38px; }

  .statement { padding: var(--space-7) 0; }

  .quality { padding: var(--space-8) 0; }
  .quality__grid { margin-top: var(--space-7); row-gap: var(--space-7); }
  .quality__grid .pillar { grid-column: 1 / -1; padding-left: 22px; }
  .pillar__title { margin-bottom: 16px; }
  .quality__lead { font-size: 17px; }

  .contact__grid { display: block; }
  .contact__form-col, .contact__card { display: block; max-width: 100%; }
  .contact__card { margin: var(--space-7) auto 0; max-width: 420px; }
  .contact__row { grid-template-columns: 1fr; gap: var(--space-6); }
  .contact__form { gap: var(--space-6); }

  .site-footer__inner { flex-direction: column; align-items: flex-start; gap: 22px; }
  .site-footer__nav { flex-wrap: wrap; gap: 18px 28px; }
}

/* === Small phones === */
@media (max-width: 420px) {
  .brand { width: calc(184px + var(--bleed)); }
  .brand__logo { height: 46px; }
  .site-header.is-open .brand__logo--white { height: 46px; }
  .hero__title { font-size: clamp(38px, 11vw, 52px); }
  .mobile-menu__actions { flex-direction: column; align-items: stretch; }
  .mobile-menu__phone, .mobile-menu__cta { justify-content: center; }
}

/* ---------------------------------------------------------------- */
/* Interaction states & accessibility                               */
/* ---------------------------------------------------------------- */

/* Uniform, visible focus ring for every interactive element (WCAG 2.2 AA).
   Mouse clicks stay clean via :focus-visible. */
.skip-link:focus-visible,
.site-nav__link:focus-visible,
.header-phone:focus-visible,
.header-cta:focus-visible,
.nav-toggle:focus-visible,
.mobile-menu__link:focus-visible,
.mobile-menu__phone:focus-visible,
.site-footer__nav a:focus-visible,
.contact__item:focus-visible,
.buob-btn:focus-visible,
.buob-field input:focus-visible,
.buob-field textarea:focus-visible {
  outline: 3px solid var(--teal-400);
  outline-offset: 2px;
  border-radius: var(--btn-radius);
}

/* Button hover / active / disabled (component is inline-styled, so states live here) */
.buob-btn { transition: filter var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out); }
.buob-btn--primary:hover { filter: brightness(1.08); }
.buob-btn--ghost:hover { background: rgba(255,255,255,0.08); }
.buob-btn--phone:hover { filter: brightness(0.97); }
.buob-btn:active { transform: translateY(1px); }
.buob-btn:disabled,
.buob-btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; filter: none; transform: none; }
.buob-btn:disabled:hover { filter: none; background: var(--petrol-800); }

/* Form field focus emphasis (beyond the ring) */
.buob-field input:focus-visible,
.buob-field textarea:focus-visible { box-shadow: inset 0 0 0 2px var(--petrol-800) !important; }

/* Touch targets ≥ 44px */
.site-footer__nav a { display: inline-flex; align-items: center; min-height: 44px; }
.site-nav__link { padding: 6px 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* No scrolling for reduced-motion users — show the full statement, wrapped
     and centered, so it's still completely readable. */
  .statement__marquee { display: none !important; }
  .statement__static { display: block !important; }
}

/* ============================================================
   Responsive corrections — audit pass
   These target issues that lived in inline / JS-set styles and so
   weren't reachable from the earlier CSS-only passes.
   ============================================================ */

/* 1 — SectionIntro headings carried a fixed 64px inline size (var(--h1))
   that never scaled, so "Leistungen" and "Qualität" titles overflowed on
   small screens. Restore a fluid ramp. */
@media (max-width: 1340px) {
  .buob-section-intro h2 { font-size: clamp(32px, 4.8vw, 52px) !important; line-height: 1.04 !important; }
}
@media (max-width: 760px) {
  .buob-section-intro h2 { font-size: clamp(26px, 7.2vw, 34px) !important; }
}

/* 2 — The SectionIntro heading|lead grid stayed two-up on phones (inline
   grid-template). Stack it. */
@media (max-width: 760px) {
  .buob-section-intro > div { grid-template-columns: 1fr !important; row-gap: 16px !important; }
  .buob-section-intro > div > h2,
  .buob-section-intro > div > p { grid-column: 1 / -1 !important; max-width: none !important; }
}

/* 3 — Statement band: now a seamless horizontal marquee (see .statement__*
   rules above), so the full sentence stays readable as it scrolls at every
   width. No per-breakpoint override needed; the font uses clamp(). */

/* 4 — About: the diagonal split squeezed the text column through the whole
   tablet range (only stacking ≤760), risking overflow of the fixed-height
   band. Stack it from tablet down. */
@media (max-width: 1024px) and (min-width: 761px) {
  .about { min-height: 0; }
  .about__photo {
    position: relative;
    inset: auto;
    width: 100%;
    height: 380px;
    clip-path: none;
    background-position: center 30%;
    background-size: cover;
  }
  .about__panel { position: relative; width: 100%; clip-path: none; background: var(--ink-900); }
  .about__panel-inner { display: block; height: auto; min-height: 0; padding: 56px var(--page-margin); }
  .about__text { grid-column: 1 / -1; padding: 0; }
}

/* 5 — On phones the stacked About photo kept its diagonal clip-path, showing
   only ~half the image as an angled slab. Square it off. */
@media (max-width: 760px) {
  .about__photo { clip-path: none; }
}

/* 6 — Long unbroken strings could push past the contact card on the narrowest
   phones. The e-mail is exempt: it gets its own single-line treatment below. */
.contact__item-value:not(.contact__item-value--mail) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 7 — The e-mail address must stay on one line (client request).
   At 18px it needs ~223px; on a stacked card the row only offers
   (viewport − 48 page margins − 56 panel padding − 38 icon+gap), so it wrapped
   after "…rohrleitungsbau." on every phone ≤ 360px. Two moves buy the room:
   a) tighten the panel padding and the icon gap while the card is full-width,
   b) below 360px, scale the address down just enough to still fit.
   No `white-space: nowrap` on purpose — if the address is ever replaced by a
   longer one in the options, it should wrap again rather than get clipped. */
@media (max-width: 760px) {
  .contact__card-panel { padding-left: 20px; padding-right: 20px; }
  .contact__item { gap: 14px; }
}
@media (max-width: 360px) {
  .contact__item-value--mail { font-size: min(18px, 4.8vw); }
}

