/* NEW-EE www – nur Startseite: Hero, Leitsatz, Branchen, Rollen, heller
   Abschnitt, Ablauf, Konditionen, Ansprechpartner, Abschluss-CTA, Leiste.
   Der Hero-Wechsel und die Einblendungen laufen über GSAP ScrollTrigger und
   Lenis (astro-preview/src/scripts/home.ts). Ohne JavaScript oder mit
   reduzierter Bewegung steht alles im ruhigen Ausgangszustand: erste Branche,
   alle Inhalte sichtbar. */

/* Header liegt auf der Startseite über dem Bild, bis gescrollt wird. */
.ee-home .ee-header { position: fixed; left: 0; right: 0; }
.ee-home .ee-header:not(.scrolled):not(:has(.ee-mobile-menu.open)) { background: transparent; border-bottom-color: transparent; }
.ee-home .ee-header:not(.scrolled) .ee-nav { padding-top: 28px; padding-bottom: 28px; }

.hm-wrap { max-width: var(--w-max); margin: 0 auto; padding-left: var(--w-gutter); padding-right: var(--w-gutter); }
.hm-h2 { font-size: clamp(34px, 4.4vw, 64px); line-height: 1; letter-spacing: -0.04em; text-wrap: balance; hyphens: auto; overflow-wrap: anywhere; }
.hm-h3 { font-size: 22px; letter-spacing: -0.01em; line-height: 1.2; }
.hm-muted { color: var(--w-muted); }

/* ===== Hero =====
   Genau eine Fensterhöhe. Die Schriftgröße hängt auch an der Höhe, damit die
   Anfrage-Leiste bei flachen Fenstern (z. B. 1440 × 800) im Bild bleibt. */
.hm-film { position: relative; }
.hm-film__pin { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding-top: var(--w-header-h); }
.hm-film__stage { position: absolute; inset: 0; }
.hm-scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.6s var(--w-ease), visibility 0.6s; }
.hm-scene.is-active { opacity: 1; visibility: visible; }
.hm-film.is-scrubbed .hm-scene { transition: none; }
.hm-scene img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* Flache Abdunklung, damit die Schrift auf den Tageslicht-Fotos lesbar bleibt. */
.hm-film__stage::after { content: ''; position: absolute; inset: 0; background: rgba(11, 11, 12, 0.42); }
.hm-scene img { filter: brightness(0.62); }
.hm-film__body { position: relative; padding: 0 var(--w-gutter) clamp(20px, 3.2vh, 36px); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 32px; }
.hm-film__copy { flex: 999 1 560px; min-width: 0; }
.hm-film h1 { font-size: clamp(34px, min(8.2vw, 13.5vh), 124px); line-height: 0.98; letter-spacing: -0.045em; }
.hm-line { display: block; overflow: hidden; }
.hm-line > span { display: block; }
.hm-words { display: block; position: relative; height: 1.08em; overflow: hidden; }
.hm-word { position: absolute; left: 0; top: 0; white-space: nowrap; transform: translateY(130%); }
.hm-word.is-active { transform: none; }
.hm-film.is-rotating .hm-word { transition: transform 0.7s var(--w-ease); }
/* Im Scroll-Modus setzt GSAP die Position; die CSS-Vorgabe darf nicht mitzählen. */
.hm-film.is-scrubbed .hm-word { transform: none; }
.hm-film__lead { margin-top: clamp(14px, 2.4vh, 24px); max-width: 560px; color: var(--w-soft); }
.hm-count { display: none; margin-bottom: 14px; font-size: 13px; letter-spacing: 0.07em; color: var(--w-muted); font-variant-numeric: tabular-nums; }
.hm-pause { margin-left: 16px; padding: 4px 0; background: none; border: 0; border-bottom: 1px solid var(--w-rule); color: var(--w-muted); font-size: 13px; letter-spacing: 0.02em; }
.hm-progress { flex: 1 1 240px; max-width: 300px; list-style: none; margin: 0; padding: 0; }
.hm-progress li { position: relative; display: flex; gap: 14px; align-items: baseline; padding: clamp(8px, 1.4vh, 12px) 0; font-size: 14px; color: var(--w-muted); transition: color 0.3s; }
.hm-progress li.is-active { color: var(--w-fg); }
.hm-progress li::before,
.hm-progress i { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; }
.hm-progress li::before { background: var(--w-rule); }
.hm-progress i { background: var(--w-fg); transform: scaleX(0); transform-origin: left; }
.hm-progress li.is-active i { transform: scaleX(1); }
.hm-progress b { font-weight: 400; color: var(--w-dim); font-variant-numeric: tabular-nums; }
.hm-progress li.is-active b { color: var(--w-red-text); }

.ee-hero-form { position: relative; margin: 0 var(--w-gutter) clamp(16px, 3vh, 32px); border: 1px solid var(--w-line-strong); background: rgba(11, 11, 12, 0.78); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
.ee-hero-form label { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 20px; border-right: 1px solid var(--w-line-strong); font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--w-muted); }
.ee-hero-form input { min-width: 0; padding: 0; background: transparent; border: 0; outline: none; color: var(--w-fg); font-size: 17px; letter-spacing: 0; text-transform: none; }
.ee-hero-form input::placeholder { color: var(--w-dim); opacity: 1; }
.ee-hero-form label:focus-within { box-shadow: inset 0 -2px 0 var(--w-fg); }
.ee-hero-form button { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; padding: 0 24px; background: var(--w-red); border: 0; color: #fff; font-size: 13px; letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap; transition: background 0.2s; }
.ee-hero-form button:hover { background: var(--w-red-hover); }

@keyframes hm-up { from { transform: translateY(110%); } to { transform: none; } }
@keyframes hm-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .hm-line > span { animation: hm-up 1s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .hm-film__lead,
  .hm-progress,
  .ee-hero-form { animation: hm-in 1.2s 0.6s both; }
}
@media (prefers-reduced-motion: reduce) {
  .hm-scene,
  .hm-word,
  .hm-progress li { transition: none; }
}

/* ===== Aussage ===== */
.hm-statement { padding-top: clamp(88px, 11vw, 160px); padding-bottom: clamp(88px, 11vw, 160px); }
.hm-statement p { font-weight: 500; font-size: clamp(26px, 3.6vw, 52px); line-height: 1.12; letter-spacing: -0.03em; max-width: 1120px; }

/* ===== Branchen ===== */
.hm-industries { padding-bottom: clamp(88px, 11vw, 160px); }
.hm-industries h2 { margin-bottom: 28px; }
.hm-rows { border-top: 1px solid var(--w-line); list-style: none; margin: 0; padding: 0; }
.hm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 32px 0; border-bottom: 1px solid var(--w-line); }
.hm-row:hover { color: var(--w-fg); }
.hm-row__name { flex: 3 1 420px; font-weight: 500; font-size: clamp(30px, 4.6vw, 68px); line-height: 1; letter-spacing: -0.04em; transition: transform 0.4s var(--w-ease); }
.hm-row:hover .hm-row__name { transform: translateX(16px); }
.hm-row__text { flex: 2 1 280px; color: var(--w-muted); }
.hm-row__photo { flex: 0 0 200px; height: 120px; overflow: hidden; background: var(--w-surface); }
.hm-row__photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--w-ease); }
.hm-row:hover .hm-row__photo img { transform: scale(1.06); }
@media (prefers-reduced-motion: reduce) { .hm-row__photo img { transition: none; } .hm-row:hover .hm-row__photo img { transform: none; } }

/* ===== Rollen ===== */
.hm-roles { border-top: 1px solid var(--w-line); }
.hm-roles .hm-wrap,
.hm-terms .hm-wrap,
.hm-team .hm-wrap { display: flex; flex-wrap: wrap; gap: clamp(40px, 5vw, 64px); }
.hm-roles .hm-wrap { padding-top: clamp(88px, 11vw, 160px); padding-bottom: clamp(88px, 11vw, 160px); }
.hm-roles__intro { flex: 1 1 380px; position: sticky; top: 96px; align-self: flex-start; }
.hm-roles__intro p { margin: 24px 0 32px; max-width: 400px; color: var(--w-muted); }
.hm-roles__list { flex: 1.4 1 520px; min-width: 0; }
.hm-roles__list h3 { margin: 56px 0 12px; font-weight: 400; font-size: 15px; color: var(--w-dim); }
.hm-roles__list h3:first-child { margin-top: 0; }
.hm-roles__list ul { list-style: none; margin: 0; padding: 0; font-weight: 500; font-size: clamp(22px, 2.4vw, 34px); letter-spacing: -0.02em; line-height: 1.2; }
.hm-roles__list li { padding: 14px 0; border-top: 1px solid var(--w-line); }
.hm-roles__list ul:last-child li:last-child { border-bottom: 1px solid var(--w-line); }

/* ===== Fakten auf Papier ===== */
.hm-facts .hm-wrap { padding-top: clamp(80px, 10vw, 140px); padding-bottom: clamp(80px, 10vw, 140px); }
.hm-facts__grid,
.hm-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; }
.hm-facts__grid > div { border-top: 1px solid var(--w-fg); padding-top: 18px; }
.hm-facts__grid strong { display: block; font-weight: 500; font-size: clamp(52px, 5.4vw, 72px); line-height: 1; letter-spacing: -0.04em; }
.hm-facts__grid p { margin-top: 14px; color: var(--w-muted); }
.hm-facts__note { margin-top: clamp(72px, 9vw, 140px); display: flex; flex-wrap: wrap; gap: 24px 48px; }
.hm-facts__note > p:first-child { flex: 1 1 200px; color: var(--w-muted); font-size: 15px; }
.hm-facts__note > div { flex: 4 1 560px; }
.hm-facts__note blockquote,
.hm-facts__quote { margin: 0; font-weight: 500; font-size: clamp(26px, 3vw, 42px); line-height: 1.15; letter-spacing: -0.03em; }
.hm-facts__note div p:last-child { margin-top: 28px; color: var(--w-muted); max-width: 640px; }
.hm-logos { list-style: none; margin: clamp(64px, 8vw, 120px) 0 0; padding: 28px 0 0; border-top: 1px solid #c9cac7; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 24px; color: var(--w-muted); font-size: 15px; }

/* ===== Ablauf ===== */
.hm-flow .hm-wrap { padding-top: clamp(88px, 11vw, 160px); padding-bottom: clamp(88px, 11vw, 160px); }
.hm-flow .hm-h2 { margin-bottom: clamp(48px, 6vw, 80px); max-width: 900px; }
.hm-steps { list-style: none; margin: 0; padding: 0; }
.hm-steps li { border-top: 1px solid var(--w-line-strong); padding-top: 18px; }
.hm-steps b { display: block; margin-bottom: 48px; font-weight: 400; font-size: 15px; color: var(--w-dim); }
.hm-steps p { margin-top: 10px; color: var(--w-muted); }
@media (min-width: 900px) { .hm-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 64px; } }

/* ===== Konditionen ===== */
.hm-terms .hm-wrap,
.hm-team .hm-wrap { padding-bottom: clamp(88px, 11vw, 160px); }
.hm-terms__intro { flex: 1 1 380px; }
.hm-terms__intro p,
.hm-team__intro p { margin-top: 24px; max-width: 420px; color: var(--w-muted); }
.hm-terms__table { flex: 1.4 1 520px; min-width: 0; }
.hm-terms dl { margin: 0; }
.hm-terms dl > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; padding: 22px 0; border-top: 1px solid var(--w-line); }
.hm-terms dt { color: var(--w-muted); }
.hm-terms dd { margin: 0; font-weight: 500; font-size: clamp(26px, 3vw, 40px); letter-spacing: -0.03em; line-height: 1.1; }
.hm-terms dl > div:last-child { border-top-color: var(--w-fg); border-bottom: 1px solid var(--w-line); }
.hm-terms dl > div:last-child dt { color: var(--w-fg); }
.hm-cards { margin-top: 56px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.hm-cards > div { background: var(--w-surface); padding: 28px; }
.hm-cards p { margin-top: 10px; color: var(--w-muted); }

/* ===== Ansprechpartner ===== */
.hm-team__intro { flex: 1 1 340px; }
.hm-people { flex: 2 1 560px; min-width: 0; }
.hm-person { max-width: 380px; }
.hm-person .hm-people__mail { display: table; }
.hm-portrait { display: block; aspect-ratio: 4 / 5; background: var(--w-surface); overflow: hidden; }
.hm-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hm-person h3 { margin-top: 18px; }
.hm-people__role { margin-top: 2px; color: var(--w-dim); font-size: 15px; }
.hm-people__mail { display: inline-block; margin-top: 10px; font-size: 15px; border-bottom: 1px solid var(--w-line-strong); overflow-wrap: anywhere; }

/* ===== Schluss-CTA ===== */
.hm-cta { border-top: 1px solid var(--w-line); }
.hm-cta .hm-wrap { padding-top: clamp(80px, 10vw, 140px); padding-bottom: clamp(72px, 9vw, 120px); }
.hm-cta .ee-label { margin-bottom: 24px; }
.hm-cta__meta { margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; color: var(--w-muted); }

/* ===== Leiste am unteren Rand =====
   Sichtbar, sobald der Hero aus dem Bild ist (Klasse setzt home.ts). */
.hm-bar { position: sticky; bottom: 0; z-index: 15; padding: 14px var(--w-gutter); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; opacity: 0; visibility: hidden; transform: translateY(100%); transition: opacity 0.3s, transform 0.3s var(--w-ease), visibility 0.3s; }
.hm-bar.is-visible { opacity: 1; visibility: visible; transform: none; }
.hm-bar > span:last-child { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
.hm-bar a:hover { color: var(--w-red-text); }
.hm-bar .ee-label { color: var(--w-fg); font-weight: 500; }
html.ee-has-banner .hm-bar { visibility: hidden !important; }
@media (prefers-reduced-motion: reduce) { .hm-bar { transition: none; } }

/* Unter 900 px: kein Feststehen, Index als Zähler, Anfrage-Leiste gestapelt. */
@media (max-width: 899.98px) {
  .hm-roles__intro { position: static; }
  .hm-progress { display: none; }
  .hm-count { display: block; }
  .hm-film__pin { min-height: 0; }
  .hm-film h1 { font-size: clamp(30px, min(9.4vw, 7vh), 72px); }
  .hm-word { white-space: normal; opacity: 0; }
  .hm-word.is-active { opacity: 1; }
  .hm-film.is-rotating .hm-word { transition: transform 0.7s var(--w-ease), opacity 0.5s; }
  .hm-words { height: 2.16em; }
  .ee-hero-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ee-hero-form label { padding: 10px 14px; border-bottom: 1px solid var(--w-line-strong); }
  .ee-hero-form label:nth-of-type(2) { border-right: 0; }
  .ee-hero-form label:nth-of-type(3) { grid-column: 1 / -1; border-right: 0; }
  .ee-hero-form input { font-size: 16px; }
  .ee-hero-form button { grid-column: 1 / -1; min-height: 52px; }
  .hm-bar > span:first-child { display: none; }
  .hm-bar > span:last-child { width: 100%; justify-content: space-between; }
  .hm-row__photo { flex: 0 0 120px; height: 72px; }
}

/* Trennung nur an der vorgesehenen Stelle („Geschäfts-führung“). */
.hm-team .hm-h2 { hyphens: manual; }

/* Cookie-Leiste beim ersten Besuch: Die Anfrage-Leiste rückt darüber, damit
   sie ohne Scrollen sichtbar und bedienbar bleibt. */
html.ee-has-banner .hm-film__pin { padding-bottom: var(--ee-banner-height, 0px); }

/* Branchenleiste auf schmalen Bildschirmen: zwei saubere Spalten statt Flattersatz. */
@media (max-width: 599.98px) { .hm-logos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: start; gap: 12px 20px; } }
