/* EB-Bau GmbH – Startseite, mobile-first */

:root {
  --red: #B5292B;
  --red-dark: #8f2022;
  --red-on-dark: #E2484A;
  --dark: #12181D;
  --dark-soft: #1c252c;
  --ink: #1b1f23;
  --muted: #5a6269;
  --line: #e4e2df;
  --bg-alt: #f6f5f3;
  --white: #ffffff;
  --radius: 10px;
  --radius-sm: 6px;
  --container: 1240px;
  --gap: clamp(1rem, 2vw, 2rem);
  --ff-head: "Barlow", "Arial Narrow", sans-serif;
  --ff-body: "Open Sans", system-ui, sans-serif;
  --shadow: 0 10px 30px -14px rgb(0 0 0 / 0.25);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.15s ease; }
ul { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }

h1, h2, h3 {
  font-family: var(--ff-head);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.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;
  top: -40px;
  left: 1rem;
  background: var(--red);
  color: var(--white);
  padding: 0.6em 1em;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

/* ===== Micromovement: scroll reveal ===== */
/* Visible by default so content never stays hidden without JS. Only once
   script.js has run (html.js-ready) do .reveal elements wait for the
   IntersectionObserver to add .is-visible. */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
html:not(.js-ready) .reveal { opacity: 1; transform: none; }
.reveal.is-visible { opacity: 1; transform: none; }

/* Reveal variants: a touch of variety instead of one flat fade+rise.
   Order matters here — these override .reveal's base transform while
   not yet visible; .reveal.is-visible (higher specificity) always wins
   once revealed, so every variant still settles to the same resting state. */
.reveal--left { transform: translateX(-28px); }
.reveal--right { transform: translateX(28px); }
.reveal--scale { transform: scale(0.96); }

/* Stagger children of a .stagger group as they reveal */
.stagger > *:nth-child(1) { transition-delay: 0ms; }
.stagger > *:nth-child(2) { transition-delay: 60ms; }
.stagger > *:nth-child(3) { transition-delay: 120ms; }
.stagger > *:nth-child(4) { transition-delay: 180ms; }
.stagger > *:nth-child(5) { transition-delay: 240ms; }
.stagger > *:nth-child(6) { transition-delay: 300ms; }
.stagger > *:nth-child(7) { transition-delay: 360ms; }
.stagger > *:nth-child(8) { transition-delay: 420ms; }
.stagger > *:nth-child(9) { transition-delay: 480ms; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85em 1.4em;
  font-family: var(--ff-head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -10px rgb(0 0 0 / 0.35); }
.btn:active { transform: translateY(0) scale(0.96); box-shadow: none; }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--white); }
.hero .btn-secondary { color: var(--white); border-color: var(--white); }
.hero .btn-secondary:hover { background: var(--white); color: var(--ink); }
.btn-light { background: transparent; color: var(--red); border-color: var(--red); flex-shrink: 0; }
.btn-light:hover { background: var(--red); color: var(--white); }

.link-accent {
  display: inline-block;
  margin-top: 0.5em;
  color: var(--red);
  font-family: var(--ff-head);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.link-accent:hover { color: var(--red-dark); }

.eyebrow {
  font-family: var(--ff-head);
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  margin-bottom: 0.5em;
}
.eyebrow--light { color: #e8898a; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s ease;
}
/* Micromovement: header compacts slightly once the page is scrolled,
   toggled by script.js past a small threshold. Purely a CSS transition,
   so prefers-reduced-motion neutralizes it like everything else. */
.site-header.is-scrolled { box-shadow: 0 4px 18px -10px rgb(0 0 0 / 0.25); }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.6rem;
  transition: padding-block 0.3s ease;
}
.site-header.is-scrolled .site-header__inner { padding-block: 0.3rem; }
.logo__img { height: 72px; width: auto; transition: height 0.3s ease; }
.site-header.is-scrolled .logo__img { height: 52px; }

.logo { display: inline-flex; transition: opacity 0.2s ease, transform 0.2s ease; }
.logo:hover, .logo:focus-visible { opacity: 0.82; transform: scale(1.04); }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.nav-toggle:hover { border-color: var(--red); }
.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

.nav {
  position: fixed;
  inset: 0 0 0 30%;
  background: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  box-shadow: var(--shadow);
}
.nav.is-open { transform: translateX(0); }
.nav__list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: var(--ff-head);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.1rem;
}
.nav__list a { display: block; padding-block: 0.75rem; position: relative; }
.nav__list a:hover { color: var(--red); }
.nav__list a.is-active { color: var(--red); }
.nav__list > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.5rem;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width 0.25s ease;
}
.nav__list > li > a:hover::after,
.nav__list > li > a.is-active::after { width: 100%; }
.nav__cta { align-self: flex-start; }

.nav-drop { position: relative; }
.nav-drop > summary {
  display: flex;
  align-items: center;
  gap: 0.4em;
  padding-block: 0.75rem;
  cursor: pointer;
  list-style: none;
}
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop > summary::after { content: "⌄"; color: var(--red); }
.nav-drop[open] > summary::after { content: "⌃"; }
.nav-submenu {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.75rem 0 0 0.25rem;
  font-size: 0.95rem;
  text-transform: none;
  font-weight: 600;
}
.nav-submenu a:hover { color: var(--red); }

/* Hero */
.hero { color: var(--white); }
.hero__main {
  position: relative;
  min-height: 420px;
  height: 68vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; background: var(--dark); }
.hero__media video { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10,13,16,0.82) 0%, rgba(10,13,16,0.55) 45%, rgba(10,13,16,0.25) 100%);
  z-index: 1;
}
.hero__content { position: relative; z-index: 2; max-width: 640px; }
.hero h1 {
  font-size: clamp(2.3rem, 7vw, 4rem);
  margin-bottom: 0.3em;
}
.hero h1 .accent { color: var(--red-on-dark); }
.hero__lead {
  color: #e7e7e7;
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 34ch;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

/* Hero sidebar credentials */
.hero__side {
  background: linear-gradient(140deg, var(--dark-soft), var(--dark));
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.75rem 1.25rem;
}
.credential { display: flex; gap: 1rem; align-items: flex-start; }
.credential__icon { width: 28px; height: 28px; flex-shrink: 0; color: var(--red); margin-top: 2px; transition: transform 0.3s ease; }
.credential h3 { font-size: 0.95rem; margin-bottom: 0.2em; text-transform: uppercase; }
.credential p { color: #b9bfc4; margin: 0; font-size: 0.85rem; }
/* Decorative-only cards (not links): a very subtle icon tilt on hover,
   just enough for visual interest without implying clickability. */
.credential:hover .credential__icon { transform: scale(1.1) rotate(-5deg); }
.credential:hover .seal { transform: scale(1.06); }

.seal {
  width: 52px; height: 52px;
  flex-shrink: 0;
  border: 2px solid var(--red);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  font-family: var(--ff-head);
  color: var(--white);
  transition: transform 0.3s ease;
}
.seal span { font-size: 0.95rem; font-weight: 800; }
.seal small { font-size: 0.42rem; text-transform: uppercase; letter-spacing: 0.03em; color: #b9bfc4; }

/* Stats */
.stats { padding-block: 2.5rem; border-bottom: 1px solid var(--line); }
.stats__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem 1.5rem; }
.stat { display: flex; align-items: flex-start; gap: 0.75rem; text-align: left; }
.stat__icon { width: 28px; height: 28px; color: var(--red); flex-shrink: 0; margin-top: 0.1rem; transition: transform 0.3s ease; }
.stat:hover .stat__icon { transform: scale(1.12) rotate(4deg); }
.stat__num { font-family: var(--ff-head); font-weight: 800; font-size: 1.15rem; text-transform: uppercase; margin: 0 0 0.2em; color: var(--ink); }
.stat__num-value { font-variant-numeric: tabular-nums; }
.stat__label { font-size: 0.85rem; margin: 0; }

/* Sections */
.section { padding-block: clamp(3rem, 6vw, 5.5rem); }
.section--compact { padding-block: clamp(2.25rem, 4.5vw, 3.75rem); }
.section--dark { background: var(--dark); color: var(--white); }
.section--dark p { color: #c4cad0; }
.section h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); max-width: 18ch; }
.section__lead { max-width: 60ch; font-size: 1.05rem; }

.section__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.25rem;
}

.btn-light--dark { color: var(--white); border-color: var(--white); }
.btn-light--dark:hover { background: var(--white); color: var(--ink); }

.service-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem 1rem;
  margin-top: 2rem;
  text-align: center;
}
.service-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem 0;
  border-left: 1px solid var(--line);
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  transition: color 0.15s ease, transform 0.2s ease;
}
.service-link:hover { color: var(--red); transform: translateY(-3px); }
.service-link:nth-child(2n+1) { border-left: 0; }
.service-link__icon { width: 30px; height: 30px; color: var(--red); transition: transform 0.2s ease; }
.service-link:hover .service-link__icon { transform: scale(1.12); }
.service-cta { text-align: center; margin-top: 2.5rem; }

.ref-marquee {
  margin-top: 1.75rem;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
}
.ref-marquee__track {
  display: flex;
  width: max-content;
  gap: 1rem;
  animation: ref-marquee-scroll 34s linear infinite;
}
.ref-marquee:hover .ref-marquee__track,
.ref-marquee:focus-within .ref-marquee__track {
  animation-play-state: paused;
}
@keyframes ref-marquee-scroll {
  to { transform: translateX(-50%); }
}
.ref-item {
  flex: 0 0 auto;
  width: clamp(210px, 28vw, 300px);
  margin: 0;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--dark-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* The whole track pauses on hover, but the specific photo under the
   cursor still lifts/brightens so hovering feels responsive. */
.ref-item:hover, .ref-item:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -14px rgb(0 0 0 / 0.5);
}
.ref-item picture { display: block; aspect-ratio: 3 / 2; }
.ref-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease, filter 0.5s ease; }
.ref-item:hover img, .ref-item:focus-within img { transform: scale(1.04); filter: brightness(1.06); }
.ref-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2rem 0.9rem 0.8rem;
  background: linear-gradient(to top, rgb(0 0 0 / 0.78), rgb(0 0 0 / 0));
  font-family: var(--ff-head);
}
.ref-item figcaption strong {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--white);
}
.ref-item figcaption span {
  display: block;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: none;
  color: #d8dadc;
  margin-top: 0.2em;
}

.ref-list--dark { border-top-color: rgba(255, 255, 255, 0.15); }
.ref-list--dark h3 { color: var(--white); }
.ref-list--dark .ref-list__cols { color: #c7cdd2; }

.ref-list { margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 2rem; }
.ref-list h3 { font-size: 1.1rem; }
.ref-list__cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 2rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.ref-list__cols li { padding-left: 1.1em; position: relative; }
.ref-list__cols li::before {
  content: "";
  position: absolute; left: 0; top: 0.6em;
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
}

/* About / dark section */
.about { background: var(--dark); color: var(--white); padding-block: clamp(3rem, 6vw, 5.5rem); overflow: hidden; }
.about__grid { display: grid; gap: 2.5rem; }
.about h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); text-transform: uppercase; }
.about__content p { color: #c4cad0; }
/* Mobile/tablet (<1024px): boxed card, same treatment as before. At >=1024px
   this is overridden below to a wide, dominant middle column (not boxed, no
   border-radius, edges fade into the dark background) sitting side by side
   with the text and checklist columns (see the 1024px breakpoint), matching
   the reference layout. */
.about__media picture { display: block; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; }
.about__media img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 0.5s ease; }
.about__media:hover img, .about__media:focus-within img { transform: scale(1.04); }

.checklist { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
.checklist li { display: flex; gap: 0.8rem; align-items: flex-start; }
.checklist svg { width: 22px; height: 22px; color: var(--red); flex-shrink: 0; margin-top: 2px; }
.checklist strong { display: block; font-family: var(--ff-head); text-transform: uppercase; font-size: 0.95rem; letter-spacing: 0.02em; }
.checklist span { display: block; color: #aeb5bb; font-size: 0.88rem; margin-top: 0.15em; }

/* Checkmarks draw themselves in once their list item enters view */
.checklist svg path {
  stroke-dasharray: 26;
  stroke-dashoffset: 26;
  transition: stroke-dashoffset 0.6s ease 0.15s;
}
.checklist li.is-visible svg path { stroke-dashoffset: 0; }

/* Subpages (Über uns / Impressum) */
.page-eyebrow { margin-top: 1.5rem; }
.page-title {
  font-family: var(--ff-head);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  max-width: 20ch;
  margin: 0 0 1.5rem;
}

.about-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
  align-items: start;
}
.about-detail__text p { font-size: 1.02rem; }
.about-detail__media { margin: 0; max-width: 320px; border-radius: var(--radius); overflow: hidden; }
.about-detail__media img { border-radius: var(--radius); width: 100%; height: auto; transition: transform 0.5s ease; }
.about-detail__media:hover img, .about-detail__media:focus-within img { transform: scale(1.04); }
.about-detail__media figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.6rem; }
.about-detail__media-wide { margin-top: 2.5rem; }
.about-detail__media-wide picture { display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; }
.about-detail__media-wide img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.about-detail__media-wide:hover img, .about-detail__media-wide:focus-within img { transform: scale(1.04); }

.legal-text { max-width: 70ch; margin-top: 2rem; }
.legal-text p { font-size: 0.98rem; line-height: 1.7; }
.legal-text strong { color: var(--ink); }

/* Contact */
.contact__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.75rem;
}
.contact__inner > div { max-width: 46ch; }
.contact__links { font-weight: 700; font-size: 1.05rem; margin: 0; }
.contact__links a:hover { color: var(--red); }
.contact .btn { flex-shrink: 0; }

/* Footer */
.site-footer { background: var(--bg-alt); color: var(--muted); padding-block: 3rem 1.5rem; border-top: 1px solid var(--line); }
.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}
.footer__brand { display: flex; flex-direction: column; gap: 1.25rem; }
.footer__logo { height: 50px; width: auto; align-self: flex-start; }
.badges { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.badge {
  width: 60px; height: 60px;
  border: 2px solid var(--red);
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 0.62rem;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--ink);
}
.badge small { font-size: 0.42rem; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.footer__col h3 {
  color: var(--ink);
  font-size: 0.95rem;
  margin-bottom: 1em;
  text-transform: uppercase;
}
.footer__col ul { display: grid; gap: 0.6rem; font-size: 0.9rem; }
.footer__col a:hover { color: var(--red); }
.footer__note { font-size: 0.85rem; line-height: 1.6; margin: 0; }
.footer__contact address { font-size: 0.9rem; line-height: 1.8; }
.footer__hours { font-size: 0.85rem; margin-top: 0.8rem; }

.footer__bottom {
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
}
.footer__bottom p { margin: 0; color: var(--muted); }
.footer__bottom a:hover { color: var(--red); }

/* ===== Breakpoints ===== */
@media (min-width: 640px) {
  .stats__grid { grid-template-columns: repeat(3, 1fr); }
  .ref-list__cols { grid-template-columns: repeat(2, 1fr); }
  .service-links { grid-template-columns: repeat(3, 1fr); }
  .service-link:nth-child(2n+1) { border-left: 1px solid var(--line); }
  .service-link:nth-child(3n+1) { border-left: 0; }
  .hero__side { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .about-detail { grid-template-columns: 1fr 320px; }
  .nav { inset: 0 0 0 55%; }
  .about__grid { grid-template-columns: 1.1fr 0.9fr; }
  .about__media { grid-column: 1; grid-row: 2; }
  .checklist { grid-column: 2; grid-row: 1 / span 2; grid-template-columns: 1fr; align-content: start; }
  .checklist { display: grid; }
  .footer__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .stats__grid { grid-template-columns: repeat(6, 1fr); gap: 1.5rem 1rem; }
  .stat__num { font-size: 0.95rem; }
  .stat__label { font-size: 0.8rem; }
  .nav-toggle { display: none; }
  .nav {
    position: static;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    transform: none;
    box-shadow: none;
    padding: 0;
    gap: 2rem;
    flex: 1;
  }
  .nav__list { flex-direction: row; gap: 1.8rem; font-size: 0.92rem; }
  .nav-submenu {
    position: absolute;
    top: 100%;
    left: -1rem;
    margin: 0;
    min-width: 230px;
    background: var(--white);
    border-top: 3px solid var(--red);
    box-shadow: var(--shadow);
    padding: 0.6rem 0;
    z-index: 50;
  }
  .nav-submenu a { display: block; padding: 0.55rem 1.25rem; font-size: 0.85rem; }
  .nav-submenu a:hover { background: var(--bg-alt); }

  .hero { display: grid; grid-template-columns: 1fr 320px; }
  .hero__main { height: auto; min-height: 560px; }
  .hero__side { grid-template-columns: 1fr; align-content: center; }

  .service-links { grid-template-columns: repeat(9, 1fr); gap: 1rem 0.75rem; }
  .service-link { font-size: 0.72rem; }
  .service-link:nth-child(3n+1) { border-left: 1px solid var(--line); }
  .service-link:nth-child(1) { border-left: 0; }
  /* Dominant middle photo column, side by side with text/checklist (not
     underneath them): text ~29%, photo ~58%, checklist ~13% of the row,
     matching the reference layout's proportions. .about__media stays a
     normal grid item in its own column track (grid-column: 2, matching its
     source-order position in the HTML) — it is never absolutely positioned
     out of flow, so it cannot geometrically extend under .about__content's
     or .checklist's columns. The "full-bleed-ish" look instead comes purely
     from the column being much wider than a boxed thumbnail plus the
     mask-image fade on the img's own (now narrower) edges below. */
  .about__grid { grid-template-columns: 0.85fr 2fr 0.6fr; align-items: center; position: relative; }
  .about__content { grid-column: 1; grid-row: auto; }
  .about__media { grid-column: 2; grid-row: auto; }
  /* .about__media has no explicit height here (.about__grid uses
     align-items: center, not stretch, so each grid item's row box is sized
     by its own content). A height: 100% on picture therefore had no
     definite containing-block height to resolve against, computed to auto,
     and (with aspect-ratio: auto) fell back to the <img>'s native 1600x980
     ratio applied to the full ~58%-wide column — producing a box far taller
     than .about__content/.checklist's text-driven height, with overflow:
     visible letting it spill past that box. Setting an explicit
     aspect-ratio matching the actual image file (see img/team.jpg's
     width/height attributes) gives the box a reliable, definite height
     derived purely from the column's width, and max-height keeps it from
     growing tall enough to dominate the row on very wide screens. */
  .about__media picture {
    display: block;
    width: 100%;
    aspect-ratio: 1600 / 980;
    max-height: clamp(280px, 30vw, 460px);
    border-radius: 0;
    overflow: hidden;
  }
  /* Fade the photo's own left/right edges to transparent (revealing the
     --dark section background behind) instead of a hard rectangular edge.
     Narrower stops than the old full-viewport version since the column
     itself is now much narrower. */
  .about__media img {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
  }
  .checklist { grid-column: 3; grid-row: auto; }
  .footer__grid { grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr 1.2fr; }
}

@media (min-width: 1280px) {
  .hero__content { max-width: 680px; }
}
