/* ==========================================================================
   Sections · page-level compositions (mobile first)
   ========================================================================== */

/* — Home hero (design 5b: Bild-Hero, Helmine unten links, Lavendel-Oval) —
   Mobile: copy first, then Helmine standing on the bottom edge, the seal top right.
   Desktop: Helmine left, copy column right with the seal above the headline. */
.hero {
  --stage-w: 100vw;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: var(--header-h);
  background: var(--c-black);
}

.hero__stage {
  display: grid;
  grid-template-areas:
    "art"
    "content";
}

.hero__copy {
  display: contents;
}

.hero__content {
  grid-area: content;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: var(--sp-7) var(--gutter) var(--sp-6);
}

.hero__title {
  font-size: var(--fs-hero);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: var(--fw-medium);
}

.hero__lead {
  max-width: 44ch;
  font-size: var(--fs-lead);
  color: var(--c-ink-on-dark-soft);
}

.hero__art {
  grid-area: art;
  position: relative;
  z-index: 1;
  /* Leave room for the headline and CTA on short phones. */
  height: clamp(18rem, min(100vw, 46svh), 36rem);
  /* The cropped figure stands on this line instead of ending in mid-air. */
  border-bottom: var(--hairline);
  pointer-events: none;
}

/* The seal shares the art cell on small screens: a long oval that starts
   behind Helmine's head and runs to the right gutter, text centred on it.
   No z-index here, so the oval (0) sits behind Helmine (1) and the text (2)
   in front of her. */
.hero__seal {
  grid-area: art;
  align-self: start;
  justify-self: stretch;
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 2vw, 1.75rem) clamp(2rem, 4vw, 3.5rem);
  margin: clamp(1.25rem, 5vw, 3rem) var(--gutter) 0 12vw;
  color: var(--c-black);
  line-height: 1.1;
  text-align: center;
}

.hero__seal-text {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__seal strong {
  font-size: clamp(1.125rem, 0.8rem + 1.6vw, 2rem);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.02em;
}

.hero__seal-text > span {
  font-size: clamp(1rem, 0.75rem + 1.3vw, 1.75rem);
}

.hero__band {
  position: absolute;
  z-index: 0;
  inset: 0;
  transform: rotate(-4deg);
}

/* Mouse parallax (js/motion.js sets --px / --py on the hero, -1 to 1).
   The oval is the far layer and moves against the pointer; the text rides on
   it with a little lift; Helmine is near and follows the pointer, sideways
   only so she never leaves the bottom edge she stands on. */
.hero__band {
  translate: calc(var(--px, 0) * -1.25rem) calc(var(--py, 0) * -0.75rem);
}

.hero__seal-text {
  translate: calc(var(--px, 0) * -0.75rem) calc(var(--py, 0) * -0.5rem);
}

.hero__helmine {
  translate: calc(var(--px, 0) * 1rem) 0;
}

.hero__band > span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--c-lavender);
}

.hero__helmine {
  position: absolute;
  left: -11%;
  bottom: 0;
  height: 92%;
  aspect-ratio: 2592 / 2952;
}

.hero__helmine img {
  width: 100%;
  height: 100%;
}

@media (min-width: 30em) {
  .hero__helmine {
    left: -4%;
  }
}

@media (min-width: 48em) {
  .hero__content {
    max-width: 44rem;
    padding-top: var(--sp-8);
  }

  .hero__art {
    height: clamp(30rem, 72vw, 40rem);
  }

  .hero__helmine {
    left: 2%;
  }
}

@media (min-width: 64em) {
  .hero {
    --stage-w: min(100vw, calc(var(--container) + 2 * var(--gutter)));
    --hero-h: clamp(44rem, 100svh, 60rem);
    --helmine-w: calc(min(var(--hero-h) * 0.82, 52vw) * 2592 / 2952);
    height: var(--hero-h);
    padding-top: 0;
  }

  .hero__stage {
    position: absolute;
    inset: 0;
    display: block;
    width: var(--stage-w);
    margin-inline: auto;
  }

  .hero__art {
    position: absolute;
    inset: 0;
    height: auto;
    border-bottom: 0;
  }

  .hero__helmine {
    left: var(--gutter);
    height: min(calc(var(--hero-h) * 0.82), 52vw);
  }

  .hero__copy {
    position: absolute;
    left: 51.5%;
    right: var(--gutter);
    bottom: clamp(3.5rem, 8vh, 5.5rem);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-6);
  }

  /* Reaches left out of the copy column so the oval starts behind Helmine's
     head (30 % of the figure's width), measured from the column at 51.5 %
     of the stage; it ends at the right gutter. */
  .hero__seal {
    align-self: stretch;
    margin: 0 0 0 calc(var(--gutter) + var(--helmine-w) * 0.3 - var(--stage-w) * 0.515);
  }

  .hero__content {
    max-width: 42rem;
    padding: 0;
    gap: var(--sp-6);
  }
}

/* — Sub-page hero — */
.page-hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--header-h) + var(--sp-8));
  padding-bottom: var(--section-y);
}

.page-hero__grid {
  display: grid;
  gap: var(--sp-7) var(--col-gap);
  align-items: end;
}

.page-hero__text {
  display: grid;
  gap: var(--sp-5);
}

.page-hero__title {
  font-size: clamp(2.75rem, 1rem + 6.4vw, 7.5rem);
  line-height: 0.98;
  letter-spacing: var(--tracking-display);
  font-weight: var(--fw-medium);
}

/* Phones: "Ein Meisterbetrieb." and the like stay on one line. */
@media (max-width: 30em) {
  .page-hero__title {
    font-size: 9.2vw;
  }
}

.page-hero__figure {
  width: min(100%, 26rem);
  aspect-ratio: 9 / 8;
}

.page-hero__figure--tall {
  aspect-ratio: 29 / 31;
}

@media (min-width: 64em) {
  .page-hero {
    padding-top: calc(var(--header-h) + var(--sp-9));
  }

  .page-hero__grid--figure {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 26rem);
  }

  .page-hero__figure {
    justify-self: end;
  }
}

/* — Statement / Meisterbrief chapter — */
.statement__text .t-muted {
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  .statement__text {
    color: #fff;
  }

  .statement__text span {
    color: #fff !important;
  }
}

.principles {
  display: grid;
  gap: var(--sp-6) var(--col-gap);
}

.principle {
  display: grid;
  align-content: start;
  gap: var(--sp-2);
}

.principle h3 {
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
  line-height: 1.25;
}

.principle p {
  font-size: var(--fs-small);
  color: var(--c-ink-on-dark-soft);
}

.on-light .principle p {
  color: var(--c-ink-on-light-soft);
}

@media (min-width: 48em) {
  .principles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .principles--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.certs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-5) var(--sp-7);
  padding-top: var(--sp-5);
  border-top: var(--hairline);
}

.certs__label {
  width: 100%;
  font-size: var(--fs-label);
  color: var(--c-ink-on-dark-muted);
}

.certs img {
  width: auto;
  height: 2.5rem;
  filter: brightness(0) invert(1);
  opacity: 0.8;
  transition: opacity var(--dur-base);
}

@media (hover: hover) {
  .certs img:hover {
    opacity: 1;
  }
}

.certs img.certs__wide {
  height: 2.25rem;
}

/* Square emblem: a little taller so it reads at the same weight as the wordmarks. */
.certs img.certs__badge {
  height: 3.5rem;
}

/* — Facts row — */
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-6) var(--col-gap);
}

.fact {
  display: grid;
  gap: var(--sp-2);
  padding-top: var(--sp-4);
  border-top: var(--hairline-strong);
}

.fact__value {
  font-size: clamp(2.75rem, 1.6rem + 4.4vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: var(--fw-medium);
  font-variant-numeric: tabular-nums;
}

.fact__label {
  font-size: var(--fs-small);
  color: var(--c-ink-on-dark-soft);
}

@media (min-width: 64em) {
  .facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* — Section heading row (label · title) — */
.heading-row {
  display: grid;
  gap: var(--sp-4) var(--col-gap);
  align-items: first baseline;
}

@media (min-width: 64em) {
  .heading-row {
    grid-template-columns: var(--label-col) minmax(0, 1fr);
  }
}

/* — Services: stacked sticky cards — */
.stack-list {
  display: grid;
  gap: clamp(1rem, 0.6rem + 1.4vw, 1.75rem);
}

.stack-card {
  --i: 0;
  position: sticky;
  top: calc(var(--sp-4) + var(--i) * 0.625rem);
  display: grid;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--card-bg, var(--c-chalk));
  color: var(--c-black);
  box-shadow: var(--shadow-stack);
  transform-origin: 50% 0;
  transform: scale(calc(1 - var(--p, 0) * 0.05));
  will-change: transform;
}

.stack-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c-black);
  opacity: calc(var(--p, 0) * 0.4);
  pointer-events: none;
}

.stack-card--chalk { --card-bg: var(--c-chalk); }
.stack-card--lavender { --card-bg: var(--c-lavender); }
.stack-card--mint { --card-bg: var(--c-mint); }

.stack-card__media {
  aspect-ratio: 16 / 10;
  margin: var(--sp-2) var(--sp-2) 0;
  background: var(--c-black-raised);
}

.stack-card__body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--sp-5);
  padding: var(--sp-5) var(--sp-5) var(--sp-6);
}

.stack-card__index {
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
}

.stack-card__title {
  font-size: var(--fs-card);
  line-height: 1;
  letter-spacing: var(--tracking-heading);
  font-weight: var(--fw-medium);
  hyphens: manual;
}

.stack-card__text {
  max-width: 34ch;
  font-size: var(--fs-lead);
  line-height: 1.5;
}

.stack-card__body .stack {
  --stack-gap: var(--sp-4);
}

.stack-card .link-arrow {
  align-self: flex-start;
  margin-top: var(--sp-2);
}

@media (min-width: 48em) {
  .stack-card {
    top: calc(var(--sp-6) + var(--i) * 1.125rem);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    height: clamp(26rem, 60vh, 31.25rem);
  }

  .stack-card__media {
    order: 2;
    aspect-ratio: auto;
    margin: var(--sp-3);
  }

  .stack-card__body {
    padding: clamp(1.75rem, 1rem + 1.6vw, 2.5rem) clamp(1.75rem, 1rem + 1.8vw, 2.5rem);
  }
}

/* — Team: portrait cards —
   Phones swipe through a snapping track; from 48em the cards form a compact
   grid whose even (or middle) columns sit lower, like a staggered contact sheet. */
.team-cards {
  --stagger: 0rem;
  display: grid;
  gap: var(--sp-6) var(--sp-5);
}

.team-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-width: 0;
}

.team-card__photo {
  aspect-ratio: 4 / 5;
}

.team-card__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: var(--sp-1) var(--sp-3);
}

.team-card__name {
  font-size: var(--fs-h4);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: var(--fw-medium);
}

.team-card__role {
  grid-column: 1 / -1;
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--c-ink-on-dark-soft);
}

.on-light .team-card__role {
  color: var(--c-ink-on-light-soft);
}

/* Reveal: the photo uncovers upwards while the picture settles from a slight zoom. */
.fx .team-card[data-reveal] .team-card__photo {
  clip-path: inset(0 0 0 0);
  transition: clip-path var(--dur-mask) var(--ease-out) var(--d, 0ms);
}

.fx .team-card[data-reveal]:not(.is-in) .team-card__photo {
  clip-path: inset(100% 0 0 0);
}

.fx .team-card[data-reveal] picture {
  transition: transform 1600ms var(--ease-out) var(--d, 0ms);
}

.fx .team-card[data-reveal]:not(.is-in) picture {
  transform: scale(1.15);
}

.fx .team-card[data-reveal] .team-card__body {
  transition:
    opacity var(--dur-slow) var(--ease-out) calc(var(--d, 0ms) + 250ms),
    transform var(--dur-slow) var(--ease-out) calc(var(--d, 0ms) + 250ms);
}

.fx .team-card[data-reveal]:not(.is-in) .team-card__body {
  opacity: 0;
  transform: translateY(1rem);
}

.team-progress {
  position: relative;
  height: 2px;
  margin-top: var(--sp-5);
  background: var(--c-black-line);
}

.on-light .team-progress {
  background: var(--c-chalk-line);
}

.team-progress > span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--p, 0) * (100% - var(--w, 30%)));
  width: var(--w, 30%);
  background: currentColor;
}

.team-progress[hidden] {
  display: none;
}

.team__note,
.team__notes {
  margin-top: var(--sp-7);
}

.team__note {
  max-width: 52ch;
  font-size: var(--fs-small);
  color: var(--c-ink-on-dark-soft);
}

.on-light .team__note {
  color: var(--c-ink-on-light-soft);
}

/* `ol.team-cards` outranks the list reset (ol[role="list"] { padding: 0 }) in base.css. */
@media (max-width: 47.99em) {
  ol.team-cards {
    grid-auto-flow: column;
    grid-auto-columns: min(64vw, 17rem);
    gap: var(--sp-3);
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .team-cards::-webkit-scrollbar {
    display: none;
  }

  .team-card {
    scroll-snap-align: start;
  }
}

/* Three columns: the middle one sits lower. */
@media (min-width: 48em) {
  ol.team-cards {
    --stagger: clamp(2rem, 4vw, 3.5rem);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: var(--sp-7);
    padding-bottom: var(--stagger);
  }

  .team-card:nth-child(3n + 2) {
    translate: 0 var(--stagger);
  }
}

/* Four columns: the even ones sit lower and, with motion allowed, drift
   against the odd ones while the grid passes (--drift from js/motion.js). */
@media (min-width: 64em) {
  ol.team-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-bottom: calc(var(--stagger) + 2rem);
  }

  .team-card,
  .team-card:nth-child(3n + 2) {
    translate: 0 calc(var(--drift, 0) * -1rem);
  }

  .team-card:nth-child(even) {
    translate: 0 calc(var(--stagger) + var(--drift, 0) * 2rem);
  }
}

.career-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5) var(--sp-7);
  padding: clamp(1.5rem, 1rem + 1.5vw, 2rem) clamp(1.5rem, 1rem + 1.6vw, 2.25rem);
  border-radius: var(--r-xs);
  background: var(--c-black-raised);
  color: var(--c-chalk);
}

.on-light .career-banner {
  background: var(--c-black);
}

.career-banner p {
  max-width: 36ch;
  font-size: var(--fs-h4);
  font-weight: var(--fw-medium);
  line-height: 1.3;
}

/* — Ablauf, Bewerbung: a plain sequence on hairlines, no cards — */
.process {
  display: grid;
  gap: var(--sp-5) var(--col-gap);
  list-style: none;
  padding: 0;
}

.process__step {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: var(--sp-2) 0;
  padding-top: var(--sp-4);
  border-top: var(--hairline-strong);
}

.process__num {
  grid-row: span 2;
  font-size: var(--fs-h4);
  line-height: 1.2;
  font-weight: var(--fw-medium);
  font-variant-numeric: tabular-nums;
  color: var(--c-mint);
}

.process__step h3 {
  font-size: var(--fs-h4);
  line-height: 1.2;
  font-weight: var(--fw-semibold);
}

.process__step p {
  font-size: var(--fs-small);
  color: var(--c-ink-on-dark-soft);
}

@media (min-width: 64em) {
  .process {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .process--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .process__step {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
  }

  .process__num {
    grid-row: auto;
    margin-bottom: var(--sp-5);
  }
}

/* — References — */
.refs {
  display: grid;
  gap: var(--sp-6) var(--col-gap);
}

.audiences {
  border-top: var(--hairline-strong);
  font-size: var(--fs-lead);
  font-weight: var(--fw-medium);
}

.audiences li {
  padding-block: var(--sp-3);
  border-bottom: var(--hairline-strong);
}

.logo-wall {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--grid-gap);
}

.logo-tile {
  height: clamp(6.5rem, 4.6rem + 5.4vw, 9.375rem);
  border-radius: var(--r-xs);
  background: var(--c-black-raised);
}

.logo-tile__mark {
  width: 100%;
  height: 100%;
  background-color: var(--c-ink-on-dark-faint);
  -webkit-mask: var(--logo) center / contain no-repeat content-box;
  mask: var(--logo) center / contain no-repeat content-box;
  padding: var(--pad, 2rem 2.25rem);
  transition: background-color var(--dur-base);
}

@media (hover: hover) {
  .logo-tile:hover .logo-tile__mark {
    background-color: var(--c-mint);
  }
}

.logo-tile__crest {
  width: 100%;
  height: 100%;
  padding: var(--pad, 1.75rem);
  object-fit: contain;
  filter: grayscale(1) brightness(0.85) contrast(1.1);
  opacity: 0.62;
  transition: filter var(--dur-base), opacity var(--dur-base);
}

@media (hover: hover) {
  .logo-tile:hover .logo-tile__crest {
    filter: none;
    opacity: 1;
  }
}

@media (min-width: 48em) {
  .logo-wall {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 64em) {
  .refs {
    grid-template-columns: var(--label-col) minmax(0, 1fr);
  }
}

/* — Contact panel (mint) — */
.contact-panel {
  display: grid;
  gap: clamp(2rem, 1.2rem + 3vw, 3.5rem);
  padding: clamp(1.75rem, 1rem + 3vw, 3.5rem) clamp(1.25rem, 0.6rem + 3vw, 3rem) clamp(1.75rem, 1rem + 2.6vw, 3rem);
  border-radius: var(--r-xs);
}

.contact-panel__phone {
  display: block;
  width: fit-content;
  font-size: var(--fs-hero);
  line-height: 1;
  letter-spacing: var(--tracking-display);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}

/* Grow the tap area of the number into the gap above. */
@media (pointer: coarse) {
  .contact-panel__phone {
    padding-top: 0.75rem;
    margin-top: -0.75rem;
  }
}

.contact-panel__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4) var(--sp-6);
}

@media (min-width: 64em) {
  .contact-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .contact-panel > h2 {
    grid-column: 1 / -1;
  }
}

.contact-panel__mail {
  font-size: var(--fs-body);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

@media (hover: hover) {
  .contact-panel__mail:hover {
    text-decoration-thickness: 2px;
  }
}

@media (pointer: coarse) {
  .contact-panel__mail {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
  }
}

/* — Leistungen: jump index —
   Small screens: a swipeable row that runs off the screen edge, so the next
   chip reads as "more this way" rather than as clipped. */
.jump {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  margin-inline: calc(-1 * var(--gutter));
  padding: 0 var(--gutter) var(--sp-2);
  scroll-padding-inline: var(--gutter);
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.jump a {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  border: var(--hairline-strong);
  border-radius: var(--r-sm);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  scroll-snap-align: start;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}

@media (hover: hover) {
  .jump a:hover {
    border-color: var(--c-mint);
    color: var(--c-mint);
  }
}

.jump .t-index {
  color: var(--c-ink-on-dark-muted);
}

@media (min-width: 64em) {
  .jump {
    flex-wrap: wrap;
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }
}

/* — Leistungen: service detail — */
.service {
  display: grid;
  gap: var(--sp-6) var(--col-gap);
  padding-block: var(--section-y) 0;
  scroll-margin-top: var(--sp-6);
}

.service + .service {
  margin-top: 0;
}

.service__media {
  aspect-ratio: 5 / 4;
}

.service__body {
  display: grid;
  align-content: start;
  gap: var(--sp-5);
}

.service__head {
  font-variant-numeric: tabular-nums;
  padding-top: var(--sp-4);
  border-top: var(--hairline-strong);
  font-size: var(--fs-small);
  color: var(--c-ink-on-dark-muted);
}

.service__title {
  font-size: var(--fs-h2);
  line-height: 1;
  letter-spacing: var(--tracking-heading);
  font-weight: var(--fw-medium);
  hyphens: manual;
}

.service__lists {
  display: grid;
  gap: var(--sp-6) var(--col-gap);
  margin-top: var(--sp-3);
}

.service__lists h3 {
  margin-bottom: var(--sp-3);
  font-size: var(--fs-label);
  font-weight: var(--fw-regular);
  color: var(--c-ink-on-dark-muted);
}

.ticks {
  display: grid;
  gap: var(--sp-2);
  list-style: none;
  padding: 0;
  font-size: var(--fs-small);
  line-height: 1.45;
}

.ticks li {
  position: relative;
  padding-left: 1.4em;
  color: var(--c-ink-on-dark-soft);
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.7em;
  height: 1.5px;
  background: var(--c-mint);
}

.on-light .ticks li {
  color: var(--c-ink-on-light-soft);
}

.on-light .ticks li::before {
  background: var(--c-black);
}

@media (min-width: 40em) {
  .service__lists {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64em) {
  .service {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .service:nth-of-type(even) .service__media {
    order: 2;
  }

  .service__media {
    position: sticky;
    top: calc(var(--header-h) + var(--sp-5));
  }
}

/* — Einsatzfelder explorer — */
.explorer {
  display: grid;
  gap: var(--sp-6) var(--col-gap);
}

/* Touch has no hover preview, so on small screens the picture stays pinned while
   the list scrolls under it: a tap on item 13 changes a picture you can see. */
.explorer__frame {
  position: sticky;
  top: 0;
  z-index: 1;
  width: 100%;
  max-height: 40svh;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  border-radius: var(--r-xs);
  background: var(--c-black-raised);
}

.explorer__frame picture {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 600ms var(--ease-standard), transform 1200ms var(--ease-out);
}

.explorer__frame picture.is-active {
  opacity: 1;
  transform: none;
}

.explorer__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.explorer__caption {
  position: absolute;
  left: var(--sp-4);
  bottom: var(--sp-4);
  z-index: 1;
}

.explorer__list {
  border-top: var(--hairline-strong);
  counter-reset: field;
}

.explorer__item {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: var(--sp-3);
  width: 100%;
  padding-block: 0.7rem;
  border-bottom: var(--hairline-strong);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.875rem);
  font-weight: var(--fw-medium);
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: left;
  transition: color var(--dur-fast);
}

.explorer__item .t-index {
  font-size: var(--fs-label);
  letter-spacing: 0;
  color: var(--c-ink-on-dark-muted);
}

.explorer__item::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--c-mint);
  transform: scale(0);
  transition: transform var(--dur-base) var(--ease-out);
}

.explorer__item[aria-pressed="true"] {
  color: var(--c-mint);
}

@media (hover: hover) {
  .explorer__item:hover {
    color: var(--c-mint);
  }
}

.explorer__item[aria-pressed="true"]::after {
  transform: scale(1);
}

html:not(.js) .explorer__item {
  cursor: default;
}

@media (min-width: 64em) {
  .explorer {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .explorer__frame {
    top: calc(var(--header-h) + var(--sp-5));
    order: 2;
    aspect-ratio: 5 / 4;
    max-height: calc(100svh - var(--header-h) - 3rem);
  }
}

/* — Note blocks (weitere Leistungen, Engagement) — */
.notes {
  display: grid;
  gap: var(--sp-6) var(--col-gap);
}

.note {
  display: grid;
  align-content: start;
  gap: var(--sp-3);
  padding-top: var(--sp-4);
  border-top: var(--hairline-strong);
}

.on-light .note {
  border-top-color: var(--c-chalk-line);
}

.note h3 {
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
}

.note p {
  font-size: var(--fs-small);
  color: var(--c-ink-on-dark-soft);
}

.on-light .note p {
  color: var(--c-ink-on-light-soft);
}

@media (min-width: 48em) {
  .notes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .notes--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* — Numbered promise list — */
.promise {
  display: grid;
  border-top: var(--hairline-light);
  counter-reset: promise;
  list-style: none;
  padding: 0;
}

.promise li {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: var(--sp-4);
  padding-block: var(--sp-4);
  border-bottom: var(--hairline-light);
  font-size: var(--fs-lead);
  line-height: 1.45;
  counter-increment: promise;
}

.promise li::before {
  content: counter(promise);
  font-variant-numeric: tabular-nums;
  padding-top: 0.25em;
  font-size: var(--fs-label);
  color: var(--c-ink-on-light-muted);
}

@media (min-width: 64em) {
  .promise {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--col-gap);
  }
}

/* — Certificate cards — */
.cert-cards {
  display: grid;
  gap: var(--grid-gap);
}

.cert-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: var(--sp-5);
  padding: clamp(1.25rem, 0.8rem + 1vw, 2rem);
  border-radius: var(--r-xs);
  background: #fff;
}

.cert-card__logo {
  display: flex;
  align-items: center;
  height: 4.5rem;
}

.cert-card__logo img {
  width: auto;
  max-width: 100%;
  max-height: 100%;
}

.cert-card h3 {
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
}

.cert-card p {
  font-size: var(--fs-small);
  color: var(--c-ink-on-light-soft);
}

@media (min-width: 48em) {
  .cert-cards--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64em) {
  .cert-cards:not(.cert-cards--2) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* — Region list — */
.regions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  list-style: none;
  padding: 0;
}

.regions li {
  padding: 0.55rem 1rem;
  border: var(--hairline-strong);
  border-radius: var(--r-sm);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  transition: border-color var(--dur-base), color var(--dur-base);
}

.regions li.is-active {
  border-color: var(--c-mint);
  color: var(--c-mint);
}

/* — Einsatzgebiet map: Rhine, two Einsatzzentralen, routes to the cities — */
.gebiet {
  display: grid;
  gap: var(--sp-8) var(--col-gap);
  align-items: center;
}

.gmap {
  width: min(100%, 36rem);
  margin: 0 auto;
}

.gmap__svg {
  display: block;
  width: 100%;
  height: auto;
  font-family: inherit;
}

.gmap__river {
  fill: none;
  stroke: rgb(255 255 255 / 0.2);
  stroke-width: 5;
  stroke-linecap: round;
}

.gmap__note {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  fill: var(--c-ink-on-dark-faint);
}

.gmap__link {
  stroke: var(--c-chalk);
  stroke-opacity: 0.35;
  stroke-width: 1.5;
  stroke-dasharray: 3 7;
  stroke-linecap: round;
}

.gmap__city,
.gmap__hub {
  transition: opacity var(--dur-base) var(--ease-standard);
}

.gmap__route {
  stroke: var(--c-mint);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.gmap__dot {
  fill: var(--c-mint);
}

.gmap__label,
.gmap__sub {
  paint-order: stroke;
  stroke: var(--c-black);
  stroke-width: 6px;
  stroke-linejoin: round;
}

.gmap__label {
  font-size: 18px;
  font-weight: var(--fw-medium);
  fill: var(--c-ink-on-dark-soft);
}

.gmap__label--hub {
  font-size: 21px;
  font-weight: var(--fw-semibold);
  fill: var(--c-chalk);
}

.gmap__sub {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  fill: var(--c-ink-on-dark-faint);
}

.gmap__hub-dot {
  fill: var(--c-chalk);
  stroke: var(--c-black);
  stroke-width: 3;
}

.gmap__pulse {
  fill: none;
  stroke: var(--c-mint);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: gmap-pulse 2.8s var(--ease-out) infinite;
}

.gmap__hub[data-city="kehl"] .gmap__pulse {
  animation-delay: 1.4s;
}

@keyframes gmap-pulse {
  from { transform: scale(1); opacity: 0.9; }
  to { transform: scale(3.2); opacity: 0; }
}

/* Highlight: a city chip or a place on the map is hovered (or tapped). */
.gmap.has-active .gmap__city:not(.is-active),
.gmap.has-active .gmap__hub:not(.is-active) {
  opacity: 0.25;
}

.gmap__city.is-active .gmap__route {
  stroke-width: 3;
}

.gmap__city.is-active .gmap__label {
  fill: var(--c-mint);
}

/* Draw-in when the map scrolls into view (motion allowed only). */
.fx .gmap[data-reveal] .gmap__river {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1600ms var(--ease-in-out);
}

.fx .gmap[data-reveal] .gmap__route {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition:
    stroke-dashoffset 1000ms var(--ease-out) calc(700ms + var(--i) * 150ms),
    stroke-width var(--dur-base);
}

.fx .gmap[data-reveal] .gmap__dot,
.fx .gmap[data-reveal] .gmap__hub-dot {
  transform: scale(0);
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 600ms var(--ease-out) calc(1400ms + var(--i, -3) * 150ms);
}

.fx .gmap[data-reveal] .gmap__label,
.fx .gmap[data-reveal] .gmap__sub,
.fx .gmap[data-reveal] .gmap__note,
.fx .gmap[data-reveal] .gmap__link {
  opacity: 0;
  transition: opacity 600ms var(--ease-standard) calc(1500ms + var(--i, -3) * 150ms), fill var(--dur-base);
}

.fx .gmap.is-in .gmap__river,
.fx .gmap.is-in .gmap__route {
  stroke-dashoffset: 0;
}

.fx .gmap.is-in .gmap__dot,
.fx .gmap.is-in .gmap__hub-dot {
  transform: scale(1);
}

.fx .gmap.is-in .gmap__label,
.fx .gmap.is-in .gmap__sub,
.fx .gmap.is-in .gmap__note,
.fx .gmap.is-in .gmap__link {
  opacity: 1;
}

@media (min-width: 64em) {
  .gebiet {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* — CTA band — */
.cta-band {
  display: grid;
  gap: var(--sp-6);
  padding: clamp(1.75rem, 1rem + 3vw, 3.5rem) clamp(1.25rem, 0.6rem + 3vw, 3rem);
  border-radius: var(--r-xs);
}

.cta-band__title {
  font-size: var(--fs-h2);
  line-height: 1;
  letter-spacing: var(--tracking-heading);
  font-weight: var(--fw-medium);
}

@media (min-width: 64em) {
  .cta-band {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
}

/* — Kontakt page — */
.contact-layout {
  display: grid;
  gap: var(--sp-8) var(--col-gap);
  align-items: start;
}

.contact-aside {
  display: grid;
  gap: var(--sp-6);
}

.contact-card {
  display: grid;
  gap: var(--sp-3);
  padding-top: var(--sp-4);
  border-top: var(--hairline-light);
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--c-ink-on-light-soft);
}

.contact-card h2,
.contact-card h3 {
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
  color: var(--c-black);
}

.contact-card a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  color: var(--c-black);
}

@media (hover: hover) {
  .contact-card a:hover {
    text-decoration-thickness: 2px;
  }
}

/* 44px tap area inside the 12px gaps, without changing the card. */
@media (pointer: coarse) {
  .contact-card a {
    padding-block: 0.6875rem;
    margin-block: -0.6875rem;
  }
}

.contact-card__big {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-decoration: none !important;
}

@media (min-width: 64em) {
  .contact-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  }

  .contact-aside {
    position: sticky;
    top: calc(var(--header-h) + var(--sp-5));
  }
}

/* — Legal pages — */
.legal {
  padding-block: var(--section-y);
}

.legal .prose {
  max-width: 48rem;
}

.legal .prose h2:first-child {
  margin-top: 0;
}

.legal dl {
  display: grid;
  gap: var(--sp-1) var(--sp-5);
}

.legal dt {
  font-weight: var(--fw-semibold);
}

@media (pointer: coarse) {
  .legal dd > a {
    display: inline-block;
    padding-block: 0.75rem;
    margin-block: -0.75rem;
  }
}

@media (min-width: 40em) {
  .legal dl {
    grid-template-columns: 12rem minmax(0, 1fr);
  }
}

/* — 404 — */
.not-found {
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding-block: calc(var(--header-h) + var(--sp-7)) var(--sp-8);
}

/* Value above its label, while the DOM keeps the dt/dd order. */
.fact__value {
  order: -1;
}

/* — Helmine panel (lavender, Helmine standing on the bottom edge) — */
.helmine-panel {
  position: relative;
  display: grid;
  overflow: hidden;
  border-radius: var(--r-xs);
}

.helmine-panel__text {
  position: relative;
  z-index: 1;
  padding: clamp(1.75rem, 1rem + 3vw, 3.5rem) clamp(1.25rem, 0.6rem + 3vw, 3rem) var(--sp-5);
}

.helmine-panel__figure {
  position: relative;
  height: clamp(22rem, 92vw, 34rem);
}

/* Punktraster: runs out towards one side, never behind text. */
.helmine-panel__figure::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--c-black) 0 1.6px, transparent 2px);
  background-size: 16px 16px;
  opacity: 0.14;
  -webkit-mask-image: linear-gradient(to left, #000 10%, transparent 85%);
  mask-image: linear-gradient(to left, #000 10%, transparent 85%);
}

.helmine-panel__figure picture {
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 100%;
  aspect-ratio: 2592 / 2952;
  transform: translateX(-50%);
}

.helmine-panel__figure img {
  width: 100%;
  height: 100%;
}

@media (min-width: 64em) {
  .helmine-panel {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    min-height: clamp(34rem, 44vw, 42rem);
  }

  .helmine-panel__text {
    align-self: center;
    padding-bottom: clamp(1.75rem, 1rem + 3vw, 3.5rem);
  }

  .helmine-panel__figure {
    height: auto;
    min-height: 100%;
  }

  .helmine-panel__figure picture {
    height: 94%;
  }
}

/* — Photo pair (Karriere) — */
.photo-pair {
  display: grid;
  gap: var(--grid-gap);
}

.photo-pair .media {
  aspect-ratio: 4 / 5;
}

@media (min-width: 48em) {
  .photo-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-pair .media:last-child {
    margin-top: clamp(3rem, 8vw, 8rem);
  }
}

@media (min-width: 64em) {
  .steps--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
