/* =============================================================
   STARTSEITE — Hero, Leistungen-Teaser, Portfolio-Teaser,
                Kundenlogos Marquee, Footer-CTA
   Seite: / (Startseite)
   Selektoren: #hero, .hero-*, .leistungen-teaser, .lt-card,
               .lt-*, .portfolio-teaser, #kunden, .kunden-*,
               .footer-cta, .footer-cta-*
   ============================================================= */

/* =============================================================
   HERO
   ============================================================= */

#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Explizit: kein Reflow bei svh-Resize */
  overflow: hidden;
  padding: 0; /* Reset: globale section-Regel ueberschreiben */
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--hero-bg-warm-dark) 0%, var(--hero-bg-black-warm) 40%, var(--hero-bg-black-cool) 100%);
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 40%, rgba(184,149,90,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 70%, rgba(30,40,60,0.5) 0%, transparent 70%);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 200px;
  opacity: 0.4;
}

.hero-photo-silhouette {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 55%;
  background: linear-gradient(135deg, var(--hero-photo-dark-1) 0%, var(--hero-photo-mid) 50%, var(--hero-photo-dark-2) 100%);
  clip-path: polygon(8% 0%, 100% 0%, 100% 100%, 0% 100%);
  overflow: hidden;
}

.hero-photo-silhouette::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 60% 30%, rgba(184,149,90,0.06) 0%, transparent 60%),
    linear-gradient(180deg, transparent 50%, rgba(8,8,7,0.6) 100%);
}

.hero-slider-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  transition: opacity 1.4s ease;
  /* will-change entfernt — transition genuegt, spart GPU-Speicher */
}

.hero-slider-img.active {
  opacity: 1;
}

.hero-slider-dots {
  position: absolute;
  bottom: 28px;
  right: 28px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

.hero-slider-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: background 0.4s, transform 0.4s;
  cursor: pointer;
}

.hero-slider-dot.active {
  background: var(--gold);
  transform: scale(1.4);
}

.hero-logo-wrap {
  position: relative;
  z-index: 2;
  flex-shrink: 0; /* verhindert Quetschen beim svh-Resize */
  margin-top: calc(72px + 16px); /* Nav-Hoehe (72px) + fester Abstand (16px) */
  padding: 0 clamp(24px, 6vw, 80px);
  margin-bottom: 28px; /* fester Abstand zum Text */
}

.hero-content {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  padding: clamp(24px, 4vw, 48px) clamp(24px, 6vw, 80px);
  padding-top: 0;
  padding-bottom: clamp(60px, 8vw, 100px);
  max-width: 740px;
}

/* Hero Slide Claim */
.hero-claim-wrap {
  position: absolute;
  bottom: 72px;
  left: 0; right: 0;
  width: 55%;
  margin-left: auto;
  z-index: 4;
  text-align: center;
  pointer-events: none;
  padding: 0 clamp(24px, 5vw, 56px);
}

.hero-claim {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 2.1rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--white);
  text-shadow: 0 1px 16px rgba(0,0,0,0.8), 0 4px 40px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.hero-claim.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Logo im Hero (Hoehe via --hero-logo-h aus SiteSettings) */
.hero-logo {
  display: block;
  height: var(--hero-logo-h, 70px);
  max-height: 500px;
  width: auto;
  max-width: min(90vw, calc(var(--hero-logo-h, 70px) * 10));
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 40px; height: 1px;
  background: var(--gold);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 28px;
  letter-spacing: -0.015em;
  opacity: 0;
  animation: fadeUp 0.9s 0.35s forwards;
}

.hero-title em { font-style: italic; font-weight: 300; color: var(--gold-light); }

.hero-sub {
  font-size: clamp(0.95rem, 1.4vw, 1.08rem);
  font-weight: 400;
  line-height: 1.75;
  color: rgba(255,255,255,0.72);
  max-width: 540px;
  margin-bottom: 44px;
  opacity: 0;
  animation: fadeUp 0.9s 0.5s forwards;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.9s 0.65s forwards;
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  right: clamp(24px, 5vw, 60px);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  opacity: 0;
  animation: fadeIn 1s 1.2s forwards;
}

.hero-scroll::after {
  content: '';
  display: block;
  width: 1px; height: 50px;
  background: linear-gradient(to bottom, rgba(184,149,90,0.6), transparent);
  animation: scrollLine 2s 1.5s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(1); transform-origin: top; }
  50% { transform: scaleY(0.4); transform-origin: top; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Metadata Ribbon */
.hero-ribbon {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0;
  height: 44px;
  background: rgba(8,8,7,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 0 clamp(24px, 6vw, 80px);
  opacity: 0;
  animation: fadeIn 0.8s 1.4s forwards;
}

.ribbon-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 clamp(16px, 2.5vw, 36px);
  border-right: 1px solid rgba(255,255,255,0.08);
}

.ribbon-item:first-child { padding-left: 0; }
.ribbon-item:last-child { border-right: none; }

.ribbon-key {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.ribbon-val {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.45);
}

@media (max-width: 768px) { .hero-ribbon { display: none; } }

/* Bilder in Hero-Silhouette */
.hero-photo-silhouette img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.45);
}

/* Hero Mobile Override (max-width: 768px)
   Strategie: Hero-Foto deckt die gesamte Sektion ab.
   .hero-photo-silhouette wird von rechter Haelfte auf inset:0
   gestreckt, clip-path entfernt. Ein ::after-Overlay (Gradient)
   sichert Lesbarkeit des Textes. */
@media (max-width: 768px) {
  /* Vollbild-Foto als Hintergrund der gesamten Hero-Sektion */
  .hero-photo-silhouette {
    position: absolute;
    inset: 0;
    width: 100%;
    clip-path: none;
    background: var(--hero-bg-black-warm);
    z-index: 0;
  }

  /* Overlay: dunkler Gradient von unten + leichter Schleier oben */
  .hero-photo-silhouette::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
      linear-gradient(
        to bottom,
        rgba(8,8,7,0.55) 0%,
        rgba(8,8,7,0.30) 35%,
        rgba(8,8,7,0.70) 70%,
        rgba(8,8,7,0.88) 100%
      );
    z-index: 1;
    pointer-events: none;
  }

  /* Bilder etwas heller — der Gradient uebernimmt Abdueckung */
  .hero-photo-silhouette img {
    filter: brightness(0.65);
  }

  /* Claim-Wrap auf Mobile ausblenden */
  .hero-claim-wrap {
    display: none;
  }

  /* Content-Bereich: zentriert, vollen Platz nutzen */
  .hero-content {
    position: relative;
    z-index: 3;
    max-width: 100%;
    padding-left: clamp(20px, 6vw, 32px);
    padding-right: clamp(20px, 6vw, 32px);
    padding-bottom: clamp(48px, 8vw, 72px);
    text-align: center;
  }

  /* Eyebrow: zentriert + gut lesbar */
  .hero-eyebrow {
    color: var(--gold-light);
    justify-content: center;
  }

  /* Titel: kompakter + zentriert */
  .hero-title {
    font-size: clamp(2.2rem, 8vw, 3.2rem);
  }

  /* Fliesstext: zentriert, erhoehte Opazitaet */
  .hero-sub {
    color: rgba(255,255,255,0.80);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  /* Buttons: zentriert, vertikal stacken */
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  /* Logo-Wrap: etwas weniger Abstand oben */
  .hero-logo-wrap {
    margin-top: calc(64px + 12px);
    padding: 0 clamp(20px, 6vw, 32px);
    margin-bottom: 20px;
  }

  /* Scroll-Indikator auf Mobile ausblenden */
  .hero-scroll {
    display: none;
  }

  /* Slider-Dots auf Mobile ausblenden */
  .hero-slider-dots {
    display: none;
  }
}

/* Buttons ab 400px wieder nebeneinander */
@media (min-width: 400px) and (max-width: 768px) {
  .hero-buttons {
    flex-direction: row;
  }
}

/* =============================================================
   Hero-Claim: Text-Wechsel-Animation
   goTo() in script.js steuert die Klassen:
     - .hero-claim          : Grundzustand (opacity 0, transformY 0)
     - .hero-claim.visible  : Eingeblendet (300ms-->600ms Sequenz)
     - .hero-claim.is-leaving: Ausblendesequenz (300ms)
   ============================================================= */

/* Ausblend-Phase: 300ms, --ease-smooth */
.hero-claim.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity var(--duration-base, 300ms) var(--ease-smooth, cubic-bezier(0.4, 0, 0.2, 1)),
    transform var(--duration-base, 300ms) var(--ease-smooth, cubic-bezier(0.4, 0, 0.2, 1));
}

/* Einblendbasis: Startpunkt fuer Einblend-Transition */
.hero-claim.is-entering {
  opacity: 0;
  transform: translateY(10px);
  /* Kein transition hier — transition wird .visible gesetzt */
}

/* Einblend-Phase: 600ms, --ease-out */
.hero-claim.visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity var(--duration-slow, 600ms) var(--ease-out, cubic-bezier(0, 0, 0.2, 1)),
    transform var(--duration-slow, 600ms) var(--ease-out, cubic-bezier(0, 0, 0.2, 1));
}

/* CLS-Schutz: feste Min-Hoehe fuer Text-Container (2 Zeilen a 1.35 lh) */
.hero-claim-wrap {
  /* min-height in em: 2 Zeilen * font-size * line-height + Sicherheitspuffer */
  /* font-size ist clamp(1.35rem, 2.6vw, 2.1rem) — wir nehmen 2.1rem als Basis */
  min-height: calc(2 * 2.1rem * 1.35 + 0.5rem);
}

/* prefers-reduced-motion: Slider-Uebergang deaktivieren */
@media (prefers-reduced-motion: reduce) {
  .hero-slider-img {
    transition: none;
  }
  .hero-claim {
    transition: none;
  }

  /* fadeUp-Animationen deaktivieren (hero-eyebrow, hero-title, hero-sub, hero-buttons) */
  .hero-eyebrow,
  .hero-title,
  .hero-sub,
  .hero-buttons {
    animation: none;
    opacity: 1;
    transform: none;
  }

  /* hero-scroll fadeIn deaktivieren */
  .hero-scroll {
    animation: none;
    opacity: 0.3; /* dezent sichtbar statt versteckt */
  }

  /* scrollLine (Linie im hero-scroll::after) deaktivieren */
  .hero-scroll::after {
    animation: none;
  }

  /* ribbon fadeIn deaktivieren */
  .hero-ribbon {
    animation: none;
    opacity: 1;
  }

  /* hero-claim: Kein Aus-/Einblend-Effekt — direkt setzen */
  .hero-claim.is-leaving,
  .hero-claim.is-entering {
    transition: none;
    opacity: 0;
    transform: none;
  }

  .hero-claim.visible {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* =============================================================
   LEISTUNGEN TEASER
   ============================================================= */

.leistungen-teaser {
  position: relative;
  z-index: 10;
  background: var(--warm-white);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}

.leistungen-teaser .section-title { color: var(--black); }

.teaser-header {
  position: sticky;
  top: 100px;
  min-width: 0;
}

.teaser-header .section-label { color: var(--gold); }
.teaser-header .section-title { color: var(--black); margin-bottom: 16px; }

.teaser-header-intro {
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.75;
  color: rgba(30,25,20,0.6);
  margin-bottom: 28px;
}

.teaser-more-link {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}

.teaser-more-link:hover { color: var(--gold-light); }

.teaser-header-img {
  display: block;
  width: 960px; /* Editorial overflow: bewusst breiter als die 1fr-Spalte */
  height: 600px;
  margin: 24px 0;
  border-radius: 4px;
  object-fit: cover;
}

.leistungen-teaser-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.lt-card {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 36px 40px;
  transition: background 0.3s;
}

.lt-card:last-child { border-bottom: 1px solid rgba(255,255,255,0.07); }
.lt-card:hover { background: rgba(20,17,14,0.92); }

.lt-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.lt-num {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 300;
  color: rgba(255,255,255,0.06);
  line-height: 1;
}

.lt-card-top svg {
  width: 28px; height: 28px;
  color: var(--gold);
  opacity: 0.7;
}

.lt-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 10px;
}

.lt-text {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.7;
  color: rgba(255,255,255,0.45);
  margin-bottom: 16px;
}

.lt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.lt-tags span {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 4px 10px;
}

.lt-link {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s, letter-spacing 0.2s;
}

.lt-link:hover { color: var(--gold-light); letter-spacing: 0.15em; }

@media (max-width: 900px) {
  .leistungen-teaser { grid-template-columns: 1fr; }
  .teaser-header { position: static; }
  .teaser-header-img { width: 100%; height: auto; aspect-ratio: 16/9; }
}

/* =============================================================
   PORTFOLIO TEASER (nur Wrapper + CTA — Grid bleibt in core)
   ============================================================= */

.portfolio-teaser {
  background: var(--cool-gray);
  overflow: hidden;
}

.portfolio-teaser-cta {
  padding: clamp(24px, 4vw, 40px) clamp(16px, 4vw, 32px);
  text-align: center;
}

@media (max-width: 768px) {
  /* Button auf volle Breite, Letter-Spacing reduzieren */
  .portfolio-teaser-cta .btn-primary {
    display: block;
    width: 100%;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    padding: 14px 16px;
    text-align: center;
  }
}

/* =============================================================
   KUNDENLOGOS — Marquee
   ============================================================= */

#kunden {
  background: var(--black);
  padding: 64px 0;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.kunden-label {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 48px;
}

.kunden-marquee-wrap {
  position: relative;
  overflow: hidden;
}

.kunden-marquee-wrap::before,
.kunden-marquee-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}

.kunden-marquee-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--black), transparent);
}

.kunden-marquee-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--black), transparent);
}

.kunden-marquee {
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.kunden-marquee:hover { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .kunden-marquee { animation: none; }
}

.kunden-marquee-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 48px;
  border-right: 1px solid rgba(255,255,255,0.08);
  height: 56px;
}

.kunden-marquee-item img {
  height: 36px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  mix-blend-mode: screen;
  opacity: 0.5;
  transition: opacity 0.4s ease, filter 0.4s ease;
}

.kunden-marquee:hover .kunden-marquee-item img { opacity: 0.2; }

.kunden-marquee:hover .kunden-marquee-item:hover img {
  opacity: 1;
  filter: none;
  mix-blend-mode: normal;
}

/* =============================================================
   FOOTER-CTA
   ============================================================= */

.footer-cta {
  padding: clamp(64px, 9vw, 110px) clamp(24px, 6vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-wrap: wrap;
}

.footer-cta--with-image {
  padding: 0;
  gap: 0;
  flex-wrap: nowrap;
}

.footer-cta-body {
  padding: clamp(48px, 7vw, 100px) clamp(24px, 6vw, 80px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
  min-width: 280px;
}

.footer-cta-text {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--white);
  max-width: 640px;
}

.footer-cta-text em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold-light);
}

.footer-cta-sub {
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.75;
  color: rgba(255,255,255,0.4);
  max-width: 440px;
}

.footer-cta-image {
  width: clamp(280px, 40%, 560px);
  flex-shrink: 0;
  overflow: hidden;
}

.footer-cta-image img {
  display: block;
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 768px) {
  .footer-cta--with-image { flex-direction: column; }
  .footer-cta-image { width: 100%; min-height: 260px; }
  .footer-cta { flex-direction: column; align-items: flex-start; }
}
