/* Startseite */

/* 1 */

/* Der Kopf steht in der Buehne aus service-detail.css: er bleibt eine Fensterhoehe lang stehen, waehrend der helle Bereich darunter mit gerundeter Oberkante darueber faehrt */
.hm-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 27vw);
  height: 100%;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--night);
  color: #fff;
  overflow: hidden;
}

.hm-head__main {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 0;
  overflow: hidden;
}
.hm-head__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Schleier fuer die Lesbarkeit, darueber der rote Schein, dieselbe Reihenfolge wie in den uebrigen Koepfen: Video 0, Schleier 1, Schein 2, Inhalt 3 */
.hm-head__main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(11,11,13,.88) 0%, rgba(11,11,13,.55) 46%, rgba(11,11,13,.25) 100%),
    linear-gradient(180deg, rgba(11,11,13,.7) 0%, rgba(11,11,13,.15) 38%, rgba(11,11,13,.75) 100%);
  pointer-events: none;
}
.hm-head__main::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(64% 58% at 6% 4%, rgba(227,9,33,.26), transparent 60%);
  pointer-events: none;
}

.hm-head__copy {
  position: relative;
  z-index: 3;
  width: min(100%, 42rem);
  padding: calc(var(--nav-h) + var(--nav-top) + 2rem) clamp(1.5rem, 4vw, 4rem) clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 4rem);
}
.hm-head__kicker {
  margin: 0 0 1.5rem;
  font-size: clamp(.95rem, 1.1vw, 1.05rem);
  color: #cbced3;
}
.hm-head h1 {
  color: #fff;
  font-size: clamp(2.4rem, 4.4vw, 4.2rem);
  line-height: 1.02;
}
.hm-head .lead {
  color: #cbced3;
  margin: 1.5rem 0 0;
  max-width: 46ch;
  font-size: clamp(.98rem, 1.15vw, 1.12rem);
}
.hm-head__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2.4rem; }

/* Ohne Bewegung tritt das Standbild an die Stelle des Videos, wie im Kopf der Leistungsuebersicht */
@media (prefers-reduced-motion: reduce) {
  .hm-head__video { display: none; }
  .hm-head__main {
    background-image: url("../img/hero-poster.webp");
    background-size: cover;
    background-position: center;
  }
}

/* Drei Einstiege in der rechten Spalte */

/* Drei gleich hohe Zeilen */
.hm-head__side {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  min-height: 0;
}
.hm-stack {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 0;
  padding: clamp(1.1rem, 1.8vw, 1.9rem);
  background: var(--night);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hm-stack + .hm-stack { border-top: 1px solid rgba(255,255,255,.14); }
/* Die Navi-Kapsel schwebt ueber der Seite und reicht bis in die rechte Spalte. Die oberste Kachel haelt deshalb ihre Hoehe frei */
.hm-stack:first-child { padding-top: calc(var(--nav-h) + var(--nav-top) + .5rem); }
.hm-stack__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  transition: transform .8s cubic-bezier(.22, 1, .36, 1);
}
.hm-stack:hover .hm-stack__bg { transform: scale(1.05); }
.hm-stack::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(11,11,13,.94) 0%, rgba(11,11,13,.75) 46%, rgba(11,11,13,.15) 100%);
}
.hm-stack__body { display: grid; gap: .85rem; justify-items: start; }
.hm-stack__title {
  font-family: var(--font-display);
  font-size: clamp(.95rem, 1.05vw, 1.12rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.015em;
  max-width: 20ch;
  text-wrap: balance;
}
/* Rote Pille wie im Entwurf */
.hm-stack__btn {
  --fill: var(--ink);
  --fill-ink: #fff;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding-inline: 1.2rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: .85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
}
.hm-stack__btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fill);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .5s cubic-bezier(.65, 0, .35, 1);
}
.hm-stack:hover .hm-stack__btn::before,
.hm-stack:focus-visible .hm-stack__btn::before { transform: scaleY(1); }
.hm-stack:hover .swap__row:first-child,
.hm-stack:focus-visible .swap__row:first-child { transform: translateY(-120%); }
.hm-stack:hover .swap__row + .swap__row,
.hm-stack:focus-visible .swap__row + .swap__row { transform: translateY(0); }

/* 2 */

.hm-lede { text-align: center; }
.hm-lede h2 {
  max-width: 24ch;
  margin-inline: auto;
  text-wrap: balance;
}
.hm-lede h2 span { color: var(--accent); }
.hm-lede p {
  max-width: 58ch;
  margin: 1.75rem auto 0;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* 3. Alles aus einer Hand */

.hm-hand__head {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.hm-hand__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.hm-hand__actions .btn--ghost {
  --fill: #fff;
  --fill-ink: var(--ink);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28);
}

.hm-hand__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}
/* Die Karte faerbt sich beim Ueberfahren von unten rot, gleiche Mechanik wie die Leistungskapsel auf der Detailseite, damit die Seite eine Bewegung fuehrt */
.hm-service {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: 1.9rem 1.5rem 1.6rem;
  border-left: var(--hair-dark);
  color: #fff;
  overflow: hidden;
}
.hm-service:first-child { border-left: 0; }
.hm-service::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .5s cubic-bezier(.65, 0, .35, 1);
}
.hm-service:hover::before,
.hm-service:focus-visible::before { transform: scaleY(1); }

.hm-service__icon { display: block; color: var(--accent); transition: color .3s ease; }
.hm-service__icon svg { width: 56px; height: 56px; display: block; }
.hm-service:hover .hm-service__icon { color: #fff; }
.hm-service h3 {
  margin: .4rem 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.hm-service p { margin: 0; font-size: .93rem; line-height: 1.5; color: #b9bcc2; }
.hm-service:hover p { color: rgba(255,255,255,.9); }
.hm-service__more {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-top: auto;
  padding-top: 1.2rem;
  font-size: .88rem;
  font-weight: 500;
}
.hm-service__more .btn__arrow { transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.hm-service:hover .hm-service__more .btn__arrow { transform: translateX(6px); }

/* 4 */

.hm-sv-sec { padding-block: var(--section); }

/* Kartenband: gleich breite Karten nebeneinander, das Wischen macht der Browser ueber overflow-x und Scroll-Snap */
.hm-sv-rail { position: relative; }
.hm-sv-rail__track {
  display: flex;
  gap: clamp(1rem, 2vw, 1.5rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}
.hm-sv-rail__track::-webkit-scrollbar { display: none; }
.hm-sv-rail__track:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.hm-sv-rail .hm-sv { flex: 0 0 100%; scroll-snap-align: start; }

@media (prefers-reduced-motion: reduce) {
  .hm-sv-rail__track { scroll-behavior: auto; }
}

/* Die Karte laeuft breiter als der uebrige Inhalt: sie traegt kein Fliesstext-Mass, sondern ein Motiv, und wirkt in der Wrap-Breite gedrungen */
.hm-sv-sec .wrap { max-width: 1440px; }
.hm-sv {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  min-height: min(62vh, 520px);
  border-radius: 28px;
  overflow: hidden;
}
.hm-sv__media { position: relative; overflow: hidden; }
.hm-sv__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Die Pfeile liegen ueber der linken unteren Ecke des Bandes, ein Stueck von der Rundung weg */
.hm-sv__nav {
  position: absolute;
  left: clamp(1rem, 2vw, 1.5rem);
  bottom: clamp(1rem, 2vw, 1.5rem);
  z-index: 2;
  display: flex;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}
.hm-sv__nav button {
  width: 56px;
  height: 48px;
  border: 0;
  background: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}
.hm-sv__nav button + button { border-left: 1px solid var(--line); }
.hm-sv__nav button:hover { background: var(--accent); color: #fff; }
.hm-sv__nav .btn__arrow { width: 20px; height: 20px; }
.btn__arrow--back { transform: scaleX(-1); }
.hm-sv__panel {
  display: flex;
  align-items: center;
  background: var(--accent);
  color: #fff;
  padding: clamp(2rem, 4vw, 3.5rem);
}
.hm-sv__copy { width: min(100%, 30rem); }
.hm-sv__kicker {
  margin: 0 0 clamp(1.25rem, 3vw, 2.25rem);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
}
.hm-sv h2 { color: #fff; margin-bottom: 1.15rem; }
.hm-sv p:not(.hm-sv__kicker) {
  margin: 0 0 2rem;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255,255,255,.92);
}
/* Der weisse Button fuellt sich dunkel, nicht rot, rot auf rot waere beim Ueberfahren nicht mehr zu sehen */
.hm-sv .btn--light { --fill: var(--ink); --fill-ink: #fff; }

/* 5. Aktuelles */

.hm-news__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.hm-news__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.hm-post { display: flex; flex-direction: column; }
.hm-post__media {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--r-tech);
  margin-bottom: 1.25rem;
}
.hm-post__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.22, 1, .36, 1);
}
.hm-post:hover .hm-post__media img { transform: scale(1.05); }
.hm-post h3 {
  margin: 0 0 .55rem;
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  transition: color .2s ease;
}
.hm-post:hover h3 { color: var(--accent); }
.hm-post p { margin: 0; font-size: .96rem; color: var(--ink-soft); }
.hm-post__more {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-top: 1.1rem;
  font-size: .9rem;
  font-weight: 500;
  color: var(--accent);
}
.hm-post__more .btn__arrow { transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.hm-post:hover .hm-post__more .btn__arrow { transform: translateX(6px); }

/* 6 */

.hm-brand {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(78vh, 640px);
  padding-block: var(--section);
  background: var(--night);
  color: #fff;
  overflow: hidden;
}
.hm-brand__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hm-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(11,11,13,.92) 0%, rgba(11,11,13,.7) 48%, rgba(11,11,13,.25) 100%);
  pointer-events: none;
}
.hm-brand .wrap { position: relative; z-index: 2; width: 100%; }
.hm-brand__inner { max-width: 44rem; }
.hm-brand__logo { width: clamp(180px, 22vw, 280px); height: auto; margin: .5rem 0 1.75rem; }
.hm-brand p { margin: 0 0 2.25rem; color: #cbced3; max-width: 52ch; }

/* 7. Partnersuche */

.hm-map__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.hm-map h2 { max-width: 16ch; margin-bottom: 1.5rem; }
.hm-map__form {
  display: flex;
  gap: .6rem;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 2.25rem;
  padding: .5rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(0,0,0,.1);
}
.hm-map__form input {
  width: 190px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  padding-inline: 1.35rem;
}
.hm-map__form input::placeholder { color: #8b9097; }
.hm-map__form input:focus { outline: none; }
.hm-map__form:focus-within { box-shadow: 0 14px 34px rgba(0,0,0,.1), inset 0 0 0 2px var(--accent); }
.hm-map__media img { width: 100%; height: auto; }

/* Umbrueche Zuerst gehen die fuenf Leistungskarten in zwei Reihen und die Einstiegskacheln auf zwei Spalten, danach steht alles einspaltig */

@media (max-width: 1180px) {
  .hm-hand__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hm-service { border-top: var(--hair-dark); }
  .hm-service:nth-child(3n+1) { border-left: 0; }
}

@media (max-width: 1080px) {
  /* Kopf einspaltig: erst das Video, darunter die drei Einstiege nebeneinander */
  .hm-head { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  /* Die Buehne setzt unter 1080px ihren eigenen unteren Abstand; hier stossen Kacheln und heller Bereich direkt aneinander */
  .sd-top { padding-bottom: 0; }
  .hm-head__main { min-height: min(78vh, 640px); }
  .hm-head__side { grid-template-rows: none; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hm-stack { min-height: 260px; align-items: flex-end; padding: clamp(1.5rem, 2.2vw, 2.25rem); }
  .hm-stack:first-child { padding-top: clamp(1.5rem, 2.2vw, 2.25rem); }
  .hm-stack + .hm-stack { border-top: 0; border-left: 1px solid rgba(255,255,255,.14); }
  .hm-stack__bg { object-position: center; }
  .hm-stack::before { background: linear-gradient(0deg, rgba(11,11,13,.94) 12%, rgba(11,11,13,.45) 60%, rgba(11,11,13,.3) 100%); }
  .hm-hand__head,
  .hm-map__grid { grid-template-columns: minmax(0, 1fr); }
  .hm-sv { grid-template-columns: minmax(0, 1fr); min-height: 0; border-radius: 20px; }
  .hm-sv__media { aspect-ratio: 16 / 10; }
  .hm-news__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-brand { min-height: 0; }
  .hm-brand::after { background: linear-gradient(90deg, rgba(11,11,13,.94) 0%, rgba(11,11,13,.82) 100%); }
}

@media (max-width: 700px) {
  .hm-head__side { grid-template-columns: minmax(0, 1fr); }
  .hm-stack + .hm-stack { border-left: 0; border-top: 1px solid rgba(255,255,255,.14); }
  .hm-stack { min-height: 220px; }
  .hm-news__grid { grid-template-columns: minmax(0, 1fr); }
  .hm-hand__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-service:nth-child(3n+1) { border-left: var(--hair-dark); }
  .hm-service:nth-child(odd) { border-left: 0; }
  .hm-map__form { width: 100%; }
  .hm-map__form input { flex: 1; width: auto; padding-inline: 1rem; }
}

@media (max-width: 480px) {
  .hm-hand__grid { grid-template-columns: minmax(0, 1fr); }
  .hm-service { border-left: 0 !important; }
}
