/* ==========================================================================
   05 – STARTSEITE
   ==========================================================================
   Gehört zu: front-page.php
   Reihenfolge der Abschnitte: Hero → Branchen-Vorschau → Kompetenzen-
   Vorschau → Über-uns-Teaser → CTA-Band → News-Teaser.

   Hero-Diashow-Verhalten:  assets/js/hero-slider.js
   Kennzahlen-Hochzählen:   assets/js/kpi-counter.js

   HINWEIS: Beim Nachbauen wurde geprüft, welche CSS-Klassen der
   Original-Vorschau auf der Startseite tatsächlich zum Einsatz kommen.
   Mehrere Klassen (u. a. ".hero-photo", ".kz"/"Kennzahlen-Leiste",
   ".intro"/"Einleitung", ".bc-pct") waren definiert, wurden aber auf
   KEINER der 25 Seiten tatsächlich verwendet (totes CSS) – sie sind
   hier bewusst nicht übernommen, siehe KORREKTUREN.md.
   ========================================================================== */

/* --------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------- */
.hero { position: relative; min-height: 540px; display: flex; align-items: center; padding: 80px 40px; background: #182030; overflow: hidden; }

.hero-content { position: relative; z-index: 2; max-width: 600px; }
.hero-eyebrow { display: flex; align-items: center; gap: 12px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--blue); margin-bottom: 28px; }
.hero-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: blink 2.4s ease-in-out infinite; }
.hero-line { width: 32px; height: 2px; background: var(--blue); }
.hero h1 { font-size: clamp(2.6rem, 5.5vw, 4.5rem); font-weight: 700; line-height: 1.06; color: var(--white); margin-bottom: 24px; }
.hero h1 span { color: var(--blue); }
.hero-div { width: 0; height: 3px; background: var(--blue); margin: 24px 0; border-radius: 2px; animation: lineGrow .9s .8s ease forwards; }
.hero-sub { font-size: 16px; color: rgba(255,255,255,.68); line-height: 1.78; max-width: 500px; margin-bottom: 36px; }
.hero-btns { display: flex; gap: 12px; }
.hero h1, .hero-sub, .hero-eyebrow { text-shadow: 0 2px 12px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.7); }

/* Bildslider im Hintergrund: mehrere Bilder überblenden sich, das
   aktive Bild bekommt einen langsamen Zoom (Ken-Burns-Effekt). */
.hero-slider { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; overflow: hidden; background: #0a0f1a; }
.hero-slide {
	position: absolute; inset: 0; width: 100%; height: 100%;
	background-size: cover; background-position: center;
	opacity: 0; filter: brightness(0.7) saturate(0.85);
	transition: opacity 2.2s cubic-bezier(.45,0,.2,1), filter 2.2s cubic-bezier(.45,0,.2,1);
	will-change: opacity, transform, filter;
	z-index: 1;
}
.hero-slide.outgoing { z-index: 2; opacity: 0; transition: opacity 2.2s cubic-bezier(.45,0,.2,1); }
.hero-slide.active { opacity: 1; filter: brightness(1) saturate(1); z-index: 3; animation: heroKenBurns 6.5s ease-out forwards; }
@keyframes heroKenBurns { from { transform: scale(1.1); } to { transform: scale(1); } }

/* Dunkler Schleier, der beim Bildwechsel kurz aufblitzt (kaschiert den Schnitt) */
.hero-slider::after { content: ''; position: absolute; inset: 0; background: rgba(5,8,16,0); z-index: 4; pointer-events: none; transition: background 1.1s ease; }
.hero-slider.transitioning::after { background: rgba(5,8,16,.22); }

.hero-video-overlay {
	position: absolute; inset: 0;
	background: linear-gradient(to right, rgba(10,16,28,.92) 0%, rgba(10,16,28,.75) 40%, rgba(10,16,28,.45) 70%, rgba(10,16,28,.25) 100%);
	z-index: 1;
}

.hero-slide-dots { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.hero-slide-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.35); cursor: pointer; transition: background .2s, transform .2s; }
.hero-slide-dot.active { background: rgba(255,255,255,.9); transform: scale(1.2); }

/* Dekorative Ebenen dürfen keine Klicks abfangen, nur der Textbereich reagiert */
.hero-video-overlay, .hero-slide { pointer-events: none; }
.hero-slide.active { pointer-events: auto; }
.hero-content, .hero-content * { pointer-events: auto; }

/* --------------------------------------------------------------------
   BRANCHEN-VORSCHAU
   -------------------------------------------------------------------- */
.bc-sec { padding: 64px 40px; background: var(--gray-lt); border-bottom: 1px solid var(--line); overflow: visible; }
.bc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; overflow: visible; }
.bc {
	background: var(--white); display: flex; flex-direction: column; padding: 0; cursor: pointer;
	border-radius: 12px; border: 1px solid var(--line);
	transition: transform .25s, box-shadow .25s, border-color .25s;
	position: relative; overflow: hidden; text-decoration: none; color: inherit;
}
.bc:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,.18); border-color: rgba(0,150,255,.25); }
.bc:hover .bc-arrow { transform: translateX(5px); color: var(--blue); }
.bc-icon { width: 64px; height: 64px; object-fit: contain; margin-bottom: 16px; }
.bc-body { flex: 1; display: flex; flex-direction: column; }
.bc-title { font-size: 17px; font-weight: 700; color: var(--black); margin-bottom: 8px; line-height: 1.25; }
.bc-text { font-size: 13.5px; color: var(--gray); line-height: 1.72; margin-bottom: 14px; flex: 1; }
.bc-foot { display: flex; align-items: center; justify-content: space-between; }
.bc-cert { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); background: var(--blue-lt); padding: 4px 10px; border-radius: 4px; }
.bc-arrow { font-size: 18px; color: var(--line); transition: transform .22s, color .22s; }

.bc-inner { position: relative; z-index: 2; display: flex; flex-direction: column; flex: 1; padding: 32px 28px; transition: color .3s; }
.bc-bg { position: absolute; inset: 0; z-index: 1; background-size: cover; background-position: center; opacity: 0; transform: scale(1.06); transition: opacity .5s cubic-bezier(.22,1,.36,1), transform 6s ease-out; pointer-events: none; }
.bc-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,15,26,.55) 0%, rgba(10,15,26,.78) 100%); opacity: 0; transition: opacity .5s ease; }
.bc:hover .bc-bg { opacity: 1; transform: scale(1); }
.bc:hover .bc-bg::after { opacity: 1; }
/* Bei Hover: Text auf Weiß wechseln, da jetzt über dem abgedunkelten Foto */
.bc:hover .bc-inner { color: #fff; }
.bc:hover .bc-title { color: #fff; }
.bc:hover .bc-text { color: rgba(255,255,255,.92); }
.bc:hover .bc-icon { filter: brightness(0) invert(1); }
.bc:hover .bc-cert { background: rgba(255,255,255,.16); color: #fff; }
.bc:hover .bc-arrow { color: #fff; transform: translateX(5px); }

/* --------------------------------------------------------------------
   KOMPETENZEN-VORSCHAU
   -------------------------------------------------------------------- */
.komp-sec { padding: 0; border-bottom: 1px solid var(--line); overflow: hidden; }
.komp-layout { display: grid; grid-template-columns: 1fr 2.2fr; gap: 0; align-items: stretch; }
.komp-left h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700; color: var(--white); line-height: 1.18; margin-bottom: 16px; }
.komp-left p { font-size: 14.5px; color: rgba(255,255,255,.75); line-height: 1.8; margin-bottom: 24px; }
.komp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.k { background: var(--white); padding: 28px 24px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: background .2s, transform .2s, box-shadow .2s, border-color .2s; }
.k:hover { background: var(--blue-lt); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,150,255,.1); border-color: rgba(0,150,255,.2); }
.k-num { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin-bottom: 10px; }
.k-title { font-size: 15px; font-weight: 700; color: var(--black); margin-bottom: 8px; }
.k-text { font-size: 13px; color: var(--gray); line-height: 1.65; }

/* --------------------------------------------------------------------
   ÜBER-UNS-TEASER (mit hochzählenden Kennzahlen)
   -------------------------------------------------------------------- */
.ueber-sec { padding: 64px 40px; background: var(--gray-lt); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.ueber-ghost { font-size: clamp(5rem, 14vw, 11rem); font-weight: 700; color: var(--line); line-height: .85; margin-bottom: -20px; display: block; }
.ueber-h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700; color: var(--black); line-height: 1.18; margin-bottom: 20px; }
.ueber-h2 span { color: var(--blue); }
.ueber-p { font-size: 14.5px; color: var(--gray); line-height: 1.82; margin-bottom: 12px; }
.ueber-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--blue); text-decoration: none; margin-top: 10px; border-bottom: 2px solid transparent; padding-bottom: 2px; transition: gap .2s, border-color .2s; }
.ueber-link:hover { gap: 14px; border-color: var(--blue); }

/* Kennzahlen-Zeilen: Zahl, Pfeil-Grafik und Label blenden gestaffelt ein,
   siehe assets/js/kpi-counter.js */
.kpi-compact { display: flex; flex-direction: column; gap: 0; padding-top: 8px; }
.kpi-c-row { display: grid; grid-template-columns: 100px 90px 1fr; align-items: center; padding: 20px 12px; border-bottom: 1px solid var(--line); gap: 0; border-radius: 8px; cursor: default; transition: background .2s, transform .18s; position: relative; }
.kpi-c-row:last-child { border-bottom: none; }
.kpi-c-row:hover { background: var(--blue-lt); transform: translateX(4px); }
.kpi-c-row:hover .kpi-c-num { color: var(--blue); }
.kpi-c-row:hover .kpi-sub-text { opacity: 1; max-height: 40px; margin-top: 4px; }
.kpi-c-num { font-size: 2.2rem; font-weight: 300; color: var(--black); line-height: 1; letter-spacing: -.02em; transition: color .2s; }
.kpi-c-label { font-size: 13px; font-weight: 700; color: var(--black); line-height: 1.35; opacity: 0; transition: opacity 0.4s ease; padding-left: 16px; }
.kpi-c-label.visible { opacity: 1; }
.kpi-c-label-wrap { display: flex; flex-direction: column; }
.kpi-sub-text { font-size: 11.5px; color: var(--gray); line-height: 1.5; opacity: 0; max-height: 0; overflow: hidden; transition: opacity .25s ease, max-height .3s ease; padding-left: 16px; }
.kpi-c-arrow { overflow: hidden; width: 90px; flex-shrink: 0; }
.kpi-arrow-svg { display: block; width: 90px; height: 14px; }
.kpi-arrow-line { stroke-dasharray: 70; stroke-dashoffset: 70; transition: stroke-dashoffset 0.5s cubic-bezier(.22,1,.36,1); }
.kpi-c-arrow.visible .kpi-arrow-line { stroke-dashoffset: 0; }
.kpi-arrow-head { opacity: 0; transition: opacity 0.2s ease 0.45s; }
.kpi-c-arrow.visible .kpi-arrow-head { opacity: 1; }

/* --------------------------------------------------------------------
   CTA-BAND "Jetzt anfragen"
   -------------------------------------------------------------------- */
.cta { background: var(--blue); position: relative; overflow: hidden; }
.cta::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--blue); }
.cta-eyebrow::before { background: rgba(255,255,255,.6) !important; }

/* Bild im CTA-Band: durchgehender, sanfter Ken-Burns-Zoom (nicht nur beim
   Einblenden, sondern dauerhaft in Schleife) */
@keyframes ctaKenBurns { 0% { transform: scale(1); } 50% { transform: scale(1.12); } 100% { transform: scale(1); } }
.cta-kenburns { animation: ctaKenBurns 18s ease-in-out infinite; transform-origin: center center; will-change: transform; }
@media (prefers-reduced-motion: reduce) { .cta-kenburns { animation: none; } }

/* Gestaffeltes Einblenden beim Scrollen ins Blickfeld (die einzelnen
   Bausteine des CTA-Bands blenden nacheinander ein, nicht gleichzeitig) */
.cta.fade-in-section { opacity: 1; transform: none; }
.cta-reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1); }
.cta.visible .cta-reveal { opacity: 1; transform: translateY(0); }
.cta.visible .cta-reveal.d1 { transition-delay: .05s; }
.cta.visible .cta-reveal.d2 { transition-delay: .20s; }
.cta.visible .cta-reveal.d3 { transition-delay: .35s; }
.cta-img-reveal img:not(.cta-kenburns) { transform: scale(1.08); transition: transform 1.2s cubic-bezier(.22,1,.36,1); }
.cta.visible .cta-img-reveal img { transform: scale(1); }
.cta-divider-reveal { transform: scaleY(0); transform-origin: center; transition: transform .8s cubic-bezier(.22,1,.36,1) .30s; }
.cta.visible .cta-divider-reveal { transform: scaleY(1); }
.cta-btns-reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease .60s, transform .6s cubic-bezier(.34,1.56,.64,1) .60s; }
.cta.visible .cta-btns-reveal { opacity: 1; transform: translateY(0); }

/* --------------------------------------------------------------------
   NEWS-TEASER
   -------------------------------------------------------------------- */
.news-sec { padding: 64px 40px; background: var(--gray-lt); border-bottom: 1px solid var(--line); }
.news-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.news-card { display: flex; flex-direction: column; border-radius: 12px; border: 1px solid var(--line); background: var(--white); overflow: hidden; transition: transform .2s, box-shadow .2s; cursor: pointer; text-decoration: none; color: inherit; }
.news-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,.1); }
.news-card-img { position: relative; overflow: hidden; background: var(--gray-lt); height: 220px; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.news-card-body { padding: 32px; }
.news-card-date { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gray); margin-bottom: 12px; display: block; }
.news-card-title { font-size: 18px; font-weight: 700; color: var(--black); line-height: 1.3; margin-bottom: 12px; }
.news-card-text { font-size: 13.5px; color: var(--gray); line-height: 1.75; margin-bottom: 20px; }
.news-card-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--blue); text-decoration: none; border-bottom: 1.5px solid transparent; padding-bottom: 2px; transition: border-color .2s, gap .2s; }
.news-card-link:hover { border-color: var(--blue); gap: 12px; }

/* ==========================================================================
   MOBIL (ab 820px abwärts, weitere Verschärfung ab 600px)
   ========================================================================== */
@media (max-width: 820px) {
	.komp-layout { grid-template-columns: 1fr; }
	.ueber-sec { grid-template-columns: 1fr; gap: 36px; padding: 56px 24px; }
	.bc-grid { grid-template-columns: 1fr; }
	.news-grid { grid-template-columns: 1fr; }
	.hero { padding: 72px 24px; }
	.bc-sec { padding: 56px 24px; }
	.news-sec { padding: 56px 24px; }

	/* CTA-Band: 4-Spalten-Grid -> gestapelt, Trennlinie ausblenden */
	.cta-grid { grid-template-columns: 1fr !important; min-height: auto !important; gap: 8px; }
	.cta-divider-reveal { display: none !important; }
	.cta-reveal.d1 { padding: 28px 0 8px !important; }
	.cta-reveal.d2 { padding: 8px 20px !important; }
	.cta-reveal.d3 { padding: 8px 20px 32px !important; }
	.cta-grid > .cta-reveal.d1 > div { height: 160px !important; }
}
@media (max-width: 600px) {
	.bc-sec { padding: 36px 20px; }
	.news-sec { padding: 36px 20px; }
	.ueber-sec { padding: 36px 20px; gap: 24px; }
	.hero { padding: 52px 20px; min-height: auto; }
	.news-grid { gap: 14px; }

	/* Branchen-Vorschau: immer alle 4 Karten, kompaktes 2×2-Raster
	   (bewusst KEIN Einklappen wie z. B. auf den Kompetenzen-Seiten) */
	#bc-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
	#bc-grid .bc-inner { padding: 14px 12px; }
	#bc-grid .bc-icon { width: 36px; height: 36px; margin-bottom: 8px; }
	#bc-grid .bc-title { font-size: 13.5px; margin-bottom: 5px; line-height: 1.2; }
	#bc-grid .bc-text { font-size: 11.5px; line-height: 1.45; margin-bottom: 8px; }
	#bc-grid .bc-cert { font-size: 8.5px; padding: 3px 7px; }

	/* Kompetenzen-Vorschau: immer alle 6 Kacheln, kompaktes 2×3-Raster */
	#komp-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; padding: 10px; background: transparent; margin: 0; }
	#komp-grid .k { padding: 16px 14px; }
	#komp-grid .k-num { font-size: 10px; margin-bottom: 6px; letter-spacing: .04em; }
	#komp-grid .k-title { font-size: 14px; margin-bottom: 6px; line-height: 1.2; overflow-wrap: break-word; }
	#komp-grid .k-text { font-size: 11.5px; line-height: 1.5; }
	.komp-left { padding: 32px 20px; }

	/* News: kompaktere Karten, nur die erste auf Mobil (siehe .mobile-collapse--eins) */
	.news-card-img { height: 150px; }
	.news-card-body { padding: 16px; }
	.news-card-title { font-size: 15px; line-height: 1.3; }
	.news-card-text { font-size: 13px; line-height: 1.5; }

	/* Branchen-/Kompetenz-Karten blenden nacheinander ein (leichter Zeitversatz) */
	#bc-grid .bc, #komp-grid .k {
		opacity: 0; transform: translateY(16px);
		transition: opacity .45s cubic-bezier(.22,1,.36,1), transform .45s cubic-bezier(.22,1,.36,1);
	}
	.bc-sec.visible #bc-grid .bc, .komp-sec.visible #komp-grid .k { opacity: 1; transform: translateY(0); }
	.bc-sec.visible #bc-grid .bc:nth-child(1) { transition-delay: .05s; }
	.bc-sec.visible #bc-grid .bc:nth-child(2) { transition-delay: .13s; }
	.bc-sec.visible #bc-grid .bc:nth-child(3) { transition-delay: .21s; }
	.bc-sec.visible #bc-grid .bc:nth-child(4) { transition-delay: .29s; }
	.komp-sec.visible #komp-grid .k:nth-child(1) { transition-delay: .05s; }
	.komp-sec.visible #komp-grid .k:nth-child(2) { transition-delay: .12s; }
	.komp-sec.visible #komp-grid .k:nth-child(3) { transition-delay: .19s; }
	.komp-sec.visible #komp-grid .k:nth-child(4) { transition-delay: .26s; }
	.komp-sec.visible #komp-grid .k:nth-child(5) { transition-delay: .33s; }
	.komp-sec.visible #komp-grid .k:nth-child(6) { transition-delay: .40s; }
	@media (prefers-reduced-motion: reduce) {
		#bc-grid .bc, #komp-grid .k { opacity: 1; transform: none; transition: none; }
	}
}
@media (max-width: 480px) {
	.hero { padding: 60px 20px; }
	.ueber-sec, .bc-sec, .news-sec { padding-left: 20px; padding-right: 20px; }
}
