/* =========================================================
   Steuratech – Startseite
   ========================================================= */

.page-start {
  --panel-pl: max(16px, calc(55 * var(--u)));
  --panel-pr: max(16px, calc(46 * var(--u)));
}

/* ================= FARBVERLAUF-ZONE ================= */
.page-start {
  /* Höhe des großen Headers – der Verlauf reicht bis ganz nach oben hinter den Header,
     damit beim Verkleinern des Headers kein weißer Streifen aufblitzt */
  --zone-pt: var(--header-rest-h, calc(265 * var(--u)));
}
.page-start .header-spacer { display: none; }

.gradient-zone {
  padding-top: var(--zone-pt);
  position: relative;
  isolation: isolate;
  overflow: clip;
  /* Fallback, falls farbverlauf.jpg fehlt */
  background: #e2edda;
}
.gradient-zone__bg {
  position: absolute;
  z-index: -1;
  top: calc(var(--zone-pt) - 33 * var(--u));
  bottom: 0;
  left: -17.85%;
  right: -17.85%;
  overflow: hidden;
  transform: scaleX(-1);
  pointer-events: none;
}
.gradient-zone__bg img {
  position: absolute;
  max-width: none;
  width: 282.93%;
  height: 146.88%;
  left: -20.24%;
  top: -12.61%;
}

/* ================= HERO ================= */
.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding:
    max(32px, calc(71 * var(--u)))
    calc(var(--edge-r) + var(--panel-pr))
    max(16px, calc(16.3 * var(--u)))
    var(--edge-l);
}

.hero__title {
  max-width: 16.2em;
  margin: 0 0 max(24px, calc(69 * var(--u)));
  font-size: var(--fs-40);
  font-weight: 500;
  line-height: 1;
}

.hero__contact {
  margin: 0 0 calc(20.7 * var(--u));
  text-align: right;
  font-size: var(--fs-40);
  line-height: 1;
}
.hero__contact span,
.hero__contact a { display: block; }
.hero__contact a {
  color: var(--green-bright);
  text-decoration: none;
}
.hero__contact a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

.more-link--hero  { color: var(--navy); }
.more-link--panel { color: var(--green-dark); }

/* ================= INHALTS-PANEL ================= */
.panel {
  margin-left: var(--edge-l);
  margin-right: var(--edge-r);
  background: var(--panel);
  padding:
    max(24px, calc(57 * var(--u)))
    var(--panel-pr)
    max(32px, calc(91 * var(--u)))
    var(--panel-pl);
}

.intro {
  display: grid;
  grid-template-columns: 612fr 611fr;
  gap: max(24px, calc(35 * var(--u)));
}

.slider {
  position: relative;
  align-self: start;
}
.slider__frame {
  position: relative;
  aspect-ratio: 612 / 421;
  overflow: hidden;
  background: #d9dadc;
}
/* Slideshow: das neue Bild schiebt sich von rechts herein, das alte fährt nach links hinaus */
.slider__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateX(100%);
  visibility: hidden;
}
.slider__img.is-active { transform: translateX(0); visibility: visible; }
.slider__img.is-moving {
  visibility: visible;
  transition: transform .8s cubic-bezier(.65, 0, .35, 1);
}
.slider__img.no-anim { transition: none; }
.slider__btn {
  position: absolute;
  top: 44.2%;
  width: 37.301px;
  height: 35.262px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease;
}
.slider__btn img {
  width: 25.549px;
  height: 25.78px;
  opacity: .35; /* weiß, stark durchsichtig auf dem Foto */
}
.slider__btn--prev { left: 1.63%; }
.slider__btn--prev img { transform: rotate(136.61deg) skewX(3.22deg) scaleY(-1); }
.slider__btn--next { right: 3.05%; top: 44.7%; }
.slider__btn--next img { transform: rotate(43.39deg) skewX(-3.22deg); }
.slider__btn--prev:hover { transform: translateX(-3px); }
.slider__btn--next:hover { transform: translateX(3px); }

.intro__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: var(--fs-18);
  line-height: 1.21;
}
.intro__text p { margin: 0 0 1.21em; }
.intro__text p:last-of-type { margin-bottom: 16px; }
.intro__text .more-link { margin-top: auto; }

/* ---------- Karten ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: max(24px, calc(35 * var(--u)));
  margin-top: max(32px, calc(66 * var(--u)));
}

.card {
  position: relative;
  display: block;
  min-height: calc(312 * var(--u));
  padding:
    max(24px, calc(38.6 * var(--u)))
    max(20px, calc(44 * var(--u)))
    max(56px, calc(56 * var(--u)))
    max(20px, calc(44 * var(--u)));
  border-radius: 10px;
  background: var(--card);
  color: var(--light);
  text-decoration: none;
  transition: background-color .2s ease;
}
.card:hover { background: #777882; }

.card__title {
  margin: 0 0 calc(6.4 * var(--u));
  font-size: var(--fs-32);
  font-weight: 500;
  line-height: 0.9375; /* 30px bei 32px */
}

.card__lead,
.card__list {
  font-size: var(--fs-18);
  line-height: 1.21;
}
.card__lead { margin: 0 0 1.21em; }
.card__list {
  margin: 0;
  padding-left: 27px;
  list-style: disc;
}

.card__arrow {
  position: absolute;
  right: max(12px, calc(14.7 * var(--u)));
  bottom: max(14px, calc(20.7 * var(--u)));
  width: 37.301px;
  height: 35.262px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease;
}
.card__arrow img {
  width: 25.549px;
  height: 25.78px;
  transform: rotate(43.39deg) skewX(-3.22deg);
}
.card:hover .card__arrow { transform: translateX(4px); }

/* ================= VOLLBILD ================= */
.fullbleed {
  position: relative;
  margin: 0;
  aspect-ratio: 1445 / 480;
  overflow: hidden;
  background: #cfd1d3;
}
.fullbleed img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;          /* jedes Foto füllt den Rahmen automatisch */
  object-position: 50% 50%;
}

/* ================= PROZESS ================= */
.process {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding:
    max(48px, calc(105.7 * var(--u)))
    max(var(--gr), calc(88 * var(--u)), calc((100% - 1440px) / 2 + 88 * var(--u)))
    max(48px, calc(118.4 * var(--u)))
    max(var(--gl), calc(89 * var(--u)), calc((100% - 1440px) / 2 + 89 * var(--u)));
}
.process__label {
  margin: 0;
  color: var(--green-dark);
  font-size: var(--fs-40);
  font-weight: 800;
  line-height: 0.75; /* 30px bei 40px */
  text-transform: uppercase;
  white-space: nowrap;
}

/* ================= BRANCHEN ================= */
.branches {
  position: relative;
  min-height: calc(563 * var(--u));
  background: var(--panel);
  overflow: hidden;
}
.branches__text {
  position: relative;
  z-index: 1;
  padding:
    max(32px, calc(52 * var(--u)))
    var(--edge-r)
    max(32px, calc(52 * var(--u)))
    max(var(--gl), calc(89 * var(--u)), calc((100% - 1440px) / 2 + 89 * var(--u)));
}
.branches__title {
  margin: 0 0 calc(32 * var(--u));
  font-size: var(--fs-40);
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
}
.branches__list {
  margin: 0;
  padding: 0;                 /* Text bündig mit „Unsere Branchen“ */
  font-size: var(--fs-40);
  line-height: 1;
  list-style: none;
}
/* Pfeil-Element (weiß, klein) als Aufzählungszeichen, links vor der Textkante */
.branches__list li { position: relative; }
.branches__list li::before {
  content: "";
  position: absolute;
  top: .56em;
  left: -.6em;
  width: .36em;
  height: .36em;
  background: url("../assets/pfeil-galerie.svg") center / contain no-repeat;
  transform: translate(-50%, -50%) rotate(43.39deg) skewX(-3.22deg);
}

.branches__image {
  position: absolute;
  top: 0;
  right: max(calc(6 * var(--u)), calc((100% - 1440px) / 2 + 6px));
  width: calc(881 * var(--u));
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}
/* zeichnung.png ist bereits auf 881:563 zugeschnitten und freigestellt */
.branches__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* =========================================================
   Tablet / Mobil
   ========================================================= */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
    padding-right: var(--gr);
    padding-bottom: 32px;
  }
  .hero__title { margin-bottom: 20px; }
  .hero__contact {
    text-align: left;
    margin: 0;
    font-size: clamp(22px, 5.5vw, 32px);
  }

  .intro,
  .cards { grid-template-columns: 1fr; }
  .intro__text p:last-of-type { margin-bottom: 12px; }
  .card { min-height: 0; }

  .fullbleed { aspect-ratio: 2 / 1; }
  .fullbleed img { object-position: 50% 50%; }

  .process {
    flex-direction: column;
    gap: 20px;
    padding-left: var(--gl);
    padding-right: var(--gr);
  }
  .process .three-arrows { transform: rotate(90deg); }
  .process .three-arrows--reverse { transform: rotate(90deg) scaleX(-1); }
  .process__label { font-size: clamp(24px, 7vw, 34px); }

  .branches { min-height: 0; }
  .branches__title { margin-bottom: 20px; }
  .branches__list { padding-left: 0; }
  .branches__text { padding-left: max(24px, var(--gl)); }   /* Platz für die Pfeile vor der Liste */
  .branches__image {
    position: relative;
    right: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 881 / 563;
  }
}

/* =========================================================
   Phone (bis 600px) – nach Figma „Phone_Start“ (393px breit)
   ========================================================= */
@media (max-width: 600px) {
  .page-start {
    --ph: 10px;                                   /* Seitenrand */
    --img-h: calc((100vw - 2 * var(--ph)) * 242 / 373);
  }

  /* Hero: nur die Headline */
  .hero {
    padding: 16px var(--ph) 21px;
    gap: 0;
  }
  .hero__title {
    margin: 0;
    font-size: 28px;
    line-height: 1;
  }
  .more-link--hero,
  .hero__contact { display: none; }

  /* Panel: Bild ragt oben aus der grauen Fläche heraus */
  .panel {
    margin: 0 var(--ph);
    padding: 0 0 17px;
    background: linear-gradient(to bottom,
      transparent calc(var(--img-h) - 61px),
      var(--panel) calc(var(--img-h) - 61px));
  }
  .intro { gap: 16px; }
  .slider__frame { aspect-ratio: 373 / 242; background: transparent; }
  /* Bildausschnitt wie auf dem Desktop (object-fit: cover) */
  /* Pfeile auch auf dem Handy, etwas kleiner */
  .slider__btn { top: 50%; transform: translateY(-50%); width: 32px; height: 32px; }
  .slider__btn img { width: 20px; height: 20px; }
  .slider__btn--prev { left: 6px; }
  .slider__btn--next { right: 6px; top: 50%; }
  .slider__btn--prev:hover,
  .slider__btn--next:hover { transform: translateY(-50%); }

  .intro__text {
    padding: 0 10px;
    font-size: 16px;
  }
  .intro__text p:last-of-type { margin-bottom: 0; }
  .more-link--panel { display: none; }

  /* Karten */
  .cards {
    gap: 15px;
    margin-top: 24px;
    padding: 0 10px;
  }
  .card {
    padding: 15px 22px 46px 26px;
  }
  .card__title {
    margin: 0 0 3px;
    font-size: 24px;
    line-height: 30px;
  }
  .card__lead,
  .card__list { font-size: 16px; }
  .card__list { padding-left: 24px; }
  .card__arrow { right: 12px; bottom: 12px; }

  /* Vollbild direkt unter den Karten, mit Rand */
  .fullbleed {
    margin: 0 var(--ph);
    aspect-ratio: 373 / 124;
  }
  .fullbleed img { object-position: 50% 50%; }

  /* Prozess: untereinander, Pfeile zwischen den Begriffen (↓ und ↑) */
  .process {
    gap: 16px;
    padding: 28px var(--ph) 30px;
  }
  .process__label {
    font-size: 28px;
    line-height: 30px;
  }
  .process .three-arrows { width: 50px; }

  /* Branchen: Liste, darunter die Zeichnung (überlagert keinen Text) */
  .branches { min-height: 0; }
  .branches__text {
    padding: 18px var(--ph) 8px 24px;
  }
  .branches__title {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.21;
  }
  .branches__list {
    padding-left: 0;
    font-size: 24px;
    line-height: 1.21;
  }
  .branches__image {
    position: relative;
    right: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 881 / 563;
  }
  .branches__image img {
    object-fit: contain;
  }
}
