/* ============================================================================
   DIGITALGROWMATIC — Basis + Six-System Hero (Visual Direction 05.10.2026)
   Hell, produktorientiert: Weiß · Graphit · DGM-Orange + kontrollierte Systemfarben.
   Kein Brand Impact, keine Hero-Filme mehr: sechs statische Systembilder, Systemkarten als Tabs.
   Typografie: Archivo (variabel, wdth 100–125, wght 400–800).
   Kapitelfarbe --c kommt aus hero.config.json (Inline-<style>, data-chapter).
   ============================================================================ */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 100% 125%;
  font-display: swap;
}

:root {
  --graphite: #17181a;
  --paper: #ffffff;
  --marble: #eceae6;
  --orange: #ff6414;
  --pad: clamp(20px, 3.2vw, 56px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-text: 180ms;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-stretch: 100%;
  font-weight: 450;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
main:focus { outline: none; }

/* Fokus: gut sichtbar auf hellen UND dunklen Flächen */
:focus-visible {
  outline: 2px solid var(--graphite);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, .85);
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: 12px; top: 12px; z-index: 100;
  padding: 10px 14px; background: var(--graphite); color: #fff;
  font-size: 14px; font-weight: 600; text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   MARKENANKER (ohne JS; mit JS steuert navigation.css den festen Kopf)
   --------------------------------------------------------------------------- */
.site-head {
  position: absolute; z-index: 30;
  top: clamp(18px, 2.6vh, 32px); left: var(--pad);
  display: flex; align-items: center; gap: 20px;
}
.brand { position: relative; display: block; }
.brand__logo { position: relative; width: clamp(170px, 12.5vw, 250px); height: auto; }
/* Weißes Logo nur auf dunklen Sektionen: flacher Schatten als Lesbarkeitssicherung */
.brand__logo:not(.brand__logo--dark) { filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .30)) drop-shadow(0 0 8px rgba(0, 0, 0, .22)); }

/* ---------------------------------------------------------------------------
   HERO — weiße Bühne: Claim + aktives System links, Systembild rechts (läuft weich
   ins Weiß aus), darunter sechs Systemkarten (= Tabs). Kein Film, kein Intro.
   --------------------------------------------------------------------------- */
.hero {
  --head-h: calc(clamp(18px, 2.6vh, 32px) * 2 + clamp(170px, 12.5vw, 250px) / 3.09);
  --stage-h: clamp(420px, calc(100svh - var(--head-h) - 270px), 660px);
  position: relative;
  padding-top: var(--head-h);
  background: #fff;
  color: var(--graphite);
  isolation: isolate;
}
.hero__stage { position: relative; min-height: var(--stage-h); display: flex; align-items: center; }

/* Bildbühne: ein Bild je System, nur das aktive sichtbar (kurze Überblendung, Reduced Motion: sofort) */
.hero__media {
  position: absolute; z-index: 0; top: 0; right: 0; bottom: 0; width: 66%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24%);
          mask-image: linear-gradient(90deg, transparent 0, #000 24%);
}
.hero__img { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 420ms var(--ease), visibility 0s linear 420ms; }
.hero__img.is-active { opacity: 1; visibility: visible; transition: opacity 420ms var(--ease), visibility 0s; }
.hero__pic, .hero__pic img { display: block; width: 100%; height: 100%; }
.hero__pic img { object-fit: cover; object-position: var(--focus, 50% 50%); max-width: none; }

/* Textzone */
.hero__copy {
  position: relative; z-index: 2;
  width: min(50%, 900px);
  padding: clamp(20px, 3.4vh, 40px) 0 clamp(64px, 9vh, 104px) var(--pad);
}
.claim {
  margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 0 .35em;
  font-size: clamp(12px, .9vw, 15px); font-weight: 750; letter-spacing: .26em; text-transform: uppercase;
  color: var(--graphite);
}
.claim__line { display: inline; }
.claim::after {
  content: ""; flex: 0 1 clamp(48px, 9vw, 150px); height: 2px; margin-left: .9em; background: var(--orange);
}
.hero__panels { position: relative; margin-top: clamp(18px, 2.8vh, 32px); }
.hero__chapter[hidden] { display: none; }
.hero__chapter.is-in { animation: dgm-text-in var(--t-text) var(--ease) both; }
@keyframes dgm-text-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.hero__id {
  margin: 0 0 clamp(10px, 1.6vh, 16px);
  font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #5f5e5a;
}
.hero__num { color: var(--graphite); }
.hero__num::before {
  content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px; vertical-align: .02em;
  background: var(--c); border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}
.hero__headline {
  margin: 0;
  font-stretch: 125%; font-weight: 800;
  font-size: clamp(34px, min(3.15vw, 7.4vh), 68px);
  line-height: .95; letter-spacing: -.015em;
  text-transform: uppercase;
  hyphens: none; overflow-wrap: normal;
}
.hero__line { display: block; }
.hero__lede {   /* Kurzbeschreibung steht sichtbar auf der Systemkarte; im Panel nur für Screenreader */
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; margin: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.hero__cta {
  display: inline-flex; align-items: center; gap: .7em;
  margin-top: clamp(22px, 3.6vh, 40px);
  min-height: 54px; padding: 0 28px;
  background: var(--orange); color: var(--graphite);
  font-size: 14px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; border-radius: 3px;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.hero__cta:hover { background: var(--graphite); color: #fff; }

/* ---------------------------------------------------------------------------
   SYSTEMKARTEN (Tabs). Klick/Tastatur wie bisher (APG Tabs), Fortschritt am Kartenfuß.
   --------------------------------------------------------------------------- */
.hero__rail {
  position: relative; z-index: 3;
  margin-top: clamp(-48px, -4vh, -24px);
  padding: 0 var(--pad) clamp(28px, 4vh, 48px);
}
.hero__tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(10px, .9vw, 16px); }
.hero__tab {
  position: relative; min-width: 0;
  display: flex; flex-direction: column; text-align: left;
  background: #fff; color: var(--graphite);
  border-radius: 6px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(23, 24, 26, .07), 0 10px 28px -12px rgba(23, 24, 26, .28);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.hero__tab:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(23, 24, 26, .1), 0 16px 34px -14px rgba(23, 24, 26, .38); }
.hero__tab[aria-selected="true"] { transform: translateY(-6px); box-shadow: 0 0 0 2px var(--c), 0 18px 38px -14px rgba(23, 24, 26, .42); }
.hero__thumb { display: block; aspect-ratio: 16 / 9.6; overflow: hidden; background: #eee; }
.hero__tpic, .hero__tpic img { display: block; width: 100%; height: 100%; }
.hero__tpic img { object-fit: cover; object-position: var(--focus, 50% 50%); transition: transform .5s var(--ease); }
.hero__tab:hover .hero__tpic img { transform: scale(1.03); }
.hero__tabbody {
  position: relative; flex: 1;
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start;
  column-gap: 12px; row-gap: 10px;
  padding: clamp(12px, 1.1vw, 18px) clamp(12px, 1vw, 18px) clamp(16px, 1.4vw, 22px);
}
.hero__tabnum {
  grid-row: 1; grid-column: 1;
  font-stretch: 125%; font-weight: 800; font-size: clamp(26px, 2.3vw, 44px); line-height: .9;
  letter-spacing: -.02em; color: var(--c); font-variant-numeric: tabular-nums;
}
.hero__tabname {
  grid-row: 1; grid-column: 2; align-self: center;
  min-height: calc(3 * 1.08em); display: flex; align-items: center;
  font-stretch: 118%; font-weight: 800; font-size: clamp(12px, .98vw, 17px); line-height: 1.08;
  letter-spacing: .01em; text-transform: uppercase; hyphens: none; overflow-wrap: normal;
}
.hero__tabtext {
  grid-row: 2; grid-column: 1 / -1;
  font-size: clamp(12px, .82vw, 14px); line-height: 1.42; color: #4f4e4a;
  padding-right: 40px;
}
.hero__go {
  position: absolute; right: clamp(12px, 1vw, 18px); bottom: clamp(14px, 1.2vw, 20px);
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 1.6px solid var(--graphite); border-radius: 50%;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.hero__go svg { width: 14px; height: 14px; }
.hero__tab:hover .hero__go, .hero__tab[aria-selected="true"] .hero__go { background: var(--graphite); color: #fff; }
.hero__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.hero__bar i { position: absolute; inset: 0; background: var(--c); transform-origin: 0 50%; transform: scaleX(0); }
.hero__tab[aria-selected="true"] .hero__bar { background: rgba(23, 24, 26, .08); }
.hero__tab[aria-selected="true"] .hero__bar i { transform: scaleX(var(--p, 0)); }
.hero.is-paused .hero__tab[aria-selected="true"] .hero__bar i { transform: scaleX(1); }
.hero :focus-visible { outline-color: var(--graphite); }
.hero__tab:focus-visible { outline-offset: 4px; }

/* Pause/Play: kleiner runder Schalter unten rechts auf der Bildbühne (WCAG 2.2.2) */
.hero__pause {
  position: absolute; z-index: 4; right: calc(var(--pad) + 4px); top: clamp(-112px, -10vh, -84px);
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--graphite);
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, .35);
}
.hero__pause:hover { background: #fff; }
.hero__pause svg { width: 11px; height: 13px; }
.hero__pause .i-play { display: none; }
.hero.is-paused .hero__pause .i-play { display: block; }
.hero.is-paused .hero__pause .i-pause { display: none; }

/* Ohne JS: System 01 statisch, Karten ohne Funktion bleiben als Übersicht sichtbar */
html:not(.js) .hero__pause { display: none; }

/* ---------------------------------------------------------------------------
   ABSTUFUNGEN
   --------------------------------------------------------------------------- */
@media (max-width: 1279px) {
  .hero { --stage-h: clamp(400px, 52vh, 560px); }
  .hero__tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .hero__thumb { aspect-ratio: 16 / 8; }
  .hero__tabtext { font-size: 13px; }
  .hero__tabname { font-size: 15px; }
  .hero__tab[aria-selected="true"] { transform: translateY(-4px); }
  .hero__pause { top: -100px; }
}
@media (max-width: 1023px) {
  .hero__media { width: 70%; }
  .hero__copy { width: 56%; }
  .hero__headline { font-size: clamp(30px, 4.3vw, 46px); }
}

/* MOBIL: Text, darunter das Systembild in voller Breite, darunter die Karten als horizontale Leiste */
@media (max-width: 820px) {
  .hero { --head-h: 72px; }
  .hero__stage { display: flex; flex-direction: column; align-items: stretch; min-height: 0; }
  .hero__copy { order: 1; width: auto; padding: 18px var(--pad) 22px; }
  .hero__media {
    order: 2; position: relative; inset: auto; width: auto; aspect-ratio: 16 / 10.5;
    margin: 0 var(--pad); border-radius: 6px;
    -webkit-mask-image: none; mask-image: none;
  }
  .hero__pic img { object-position: var(--focus-m, 50% 50%); }
  .claim { font-size: 11px; letter-spacing: .22em; }
  .claim::after { flex-basis: 40px; }
}
@media (max-width: 400px) {
  .claim::after { display: none; }
  .claim { letter-spacing: .18em; }
}
@media (max-width: 820px) {
  .hero__panels { margin-top: 16px; }
  .hero__id { font-size: 12px; }
  .hero__headline { font-size: clamp(24px, 7.2vw, 40px); font-stretch: 110%; }
  .hero__cta { min-height: 48px; padding: 0 20px; font-size: 13px; margin-top: 20px; }

  .hero__rail { margin-top: 0; padding: 18px 0 28px; }
  .hero__tabs {
    display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad);
    padding: 8px var(--pad) 14px; scrollbar-width: none;
  }
  .hero__tabs::-webkit-scrollbar { display: none; }
  .hero__tab { flex: 0 0 min(66vw, 300px); scroll-snap-align: start; }
  .hero__tab[aria-selected="true"] { transform: none; }
  .hero__tab:hover { transform: none; }
  .hero__thumb { aspect-ratio: 16 / 9; }
  .hero__tabnum { font-size: 30px; }
  .hero__tabname { font-size: 14px; }
  .hero__pause { position: relative; top: auto; right: auto; margin: 4px var(--pad) 0 auto; display: grid; }
  .hero__rail { display: flex; flex-direction: column; }
  .hero__tabs { order: 1; }
  .hero__pause { order: 2; box-shadow: 0 0 0 1px rgba(23, 24, 26, .14); }

  .brand__logo { width: 150px; }
  .site-head { top: 16px; }
}

/* Reduzierte Bewegung: keine Text-/Bildbewegung, Wechsel sofort */
@media (prefers-reduced-motion: reduce) {
  .hero__chapter.is-in { animation: none; }
  .hero__img, .hero__img.is-active, .hero__tab, .hero__cta, .hero__tpic img, .hero__go { transition: none; }
  .hero__tab:hover .hero__tpic img { transform: none; }
}

/* ---------------------------------------------------------------------------
   Desktop-Einpassung (05.10.): Bühne + Karten proportional verkleinert (--hz), damit die sechs Karten
   vollständig im ersten Viewport stehen. Volle Breite bleibt: linke Kante auf dem Raster von Logo/Navigation
   (Innenabstand = --pad, unskaliert), Bild läuft wie bisher bis zum rechten Rand. Textspalte mitskaliert,
   damit die Headline-Umbrüche gleich bleiben. Kopfzeile/Navigation unverändert. Tablet/Mobil (< 1280 px) unverändert.
   --------------------------------------------------------------------------- */
@media (min-width: 1280px) {
  .hero { --hz: .91; }
  .hero__stage, .hero__rail { zoom: var(--hz); }
  .hero__copy { width: min(calc(50% * var(--hz)), 900px); padding-left: calc(var(--pad) / var(--hz)); }
  .hero__rail { padding-left: calc(var(--pad) / var(--hz)); padding-right: calc(var(--pad) / var(--hz)); }
  .hero__pause { right: calc(var(--pad) / var(--hz) + 4px); }
}
@media (min-width: 1280px) and (max-height: 1000px) { .hero { --hz: .88; } }
@media (min-width: 1280px) and (max-height: 880px)  { .hero { --hz: .86; } }
@media (min-width: 1280px) and (max-height: 780px)  { .hero { --hz: .82; } }

/* ---------------------------------------------------------------------------
   Kartenleiste kleiner (05.10.): jede Karte als Ganzes proportional um --cs verkleinert (Bild, Nummer,
   Name, Text, Pfeil, Abstände, Rahmen identisch). Sechs Karten bleiben in einer Reihe und spannen weiter
   von der Logo-Kante bis zur CTA-Kante (Zwischenräume gleichmäßig verteilt). Der frei werdende Platz geht
   an die Bildbühne. Pause-Schalter unverändert groß. Desktop ab 1280 px; Tablet/Mobil unverändert.
   --------------------------------------------------------------------------- */
@media (min-width: 1280px) {
  .hero { --cs: .82; --cs-gain: calc(22px + 2.1vw);   /* frei werdende Höhe der Kartenleiste → Bildbühne */
           --stage-h: clamp(calc(420px + var(--cs-gain)), calc(100svh - var(--head-h) - 270px + var(--cs-gain)), calc(660px + var(--cs-gain))); }
  .hero__rail { zoom: calc(var(--hz) * var(--cs)); padding-left: calc(var(--pad) / (var(--hz) * var(--cs))); padding-right: calc(var(--pad) / (var(--hz) * var(--cs))); }
  .hero__tabs { grid-template-columns: repeat(6, calc((100% * var(--cs) - 5 * clamp(10px, .9vw, 16px)) / 6)); justify-content: space-between; }
  .hero__pause { zoom: calc(1 / var(--cs)); }
  .hero__copy { padding-bottom: calc(clamp(64px, 9vh, 104px) + var(--cs-gain)); }   /* Text bleibt exakt an seiner Position (Bühne wächst nur nach unten) */
}
