/*
 * Dunkler Kontext (dev-wp.progiton.com component.scss:
 * .pg-component--dark) -- eigenes generisches Kontext-Token-System
 * (.pg-component/--dark/--light/--accent) existiert in unserem Theme
 * noch nicht, deshalb hier lokal auf .pg-hero gesetzt (Story
 * layout-015 hat dieselbe Vereinfachung für pg-link getroffen).
 */
.pg-hero {
  --component-background: var(--color-dark);
  --component-text: var(--color-text-inverse);
  --component-muted: rgba(255, 255, 255, 0.72);
  --component-accent: var(--color-primary);
  --component-border: rgba(255, 255, 255, 0.14);
  --component-shadow: var(--shadow-lg);
  --hero-glow-position: 78% 36%;

  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: calc(100svh - 3.8125rem + 1px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-block: clamp(2rem, 3vw, 2.125rem);
  color: var(--component-text);
  background:
    radial-gradient(circle at var(--hero-glow-position), var(--color-primary-glow), transparent 28rem),
    var(--component-background);
}

.pg-hero--centered {
  --hero-glow-position: 22% 64%;
}

.pg-hero--photo {
  --hero-glow-position: 50% 12%;
}

.pg-hero::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 4.5rem 4.5rem;
  content: "";
  pointer-events: none;
}

.pg-hero__container {
  position: relative;
  z-index: 1;
  width: min(var(--container-width), calc(100% - 2 * var(--container-padding)));
  margin-inline: auto;
}

.pg-hero__layout {
  display: grid;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

.pg-hero__content,
.pg-hero__visual {
  min-width: 0;
}

.pg-hero__slide[hidden] {
  display: none;
}

.pg-hero__slide.is-active .pg-hero__layout {
  animation: pg-hero-slide-in var(--duration-slow) var(--ease-standard) both;
}

.pg-hero__eyebrow {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
  margin: 0 0 var(--space-sm);
  color: var(--component-accent);
  font-size: 0.8125rem;
  font-weight: var(--font-weight-black);
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.pg-hero__eyebrow::before {
  width: 2.5rem;
  height: 0.1875rem;
  border-radius: var(--radius-pill);
  background: var(--component-accent);
  content: "";
}

.pg-hero__heading {
  max-width: 11ch;
  margin: 0;
  color: var(--component-text);
  font-family: var(--font-family-heading);
  font-size: clamp(2.75rem, 4.5vw, 3.25rem);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.pg-hero__description {
  max-width: 34rem;
  /*
   * Exakt gegen dev-wp.progiton.com/content/ (.pg-hero__heading /
   * .pg-hero__description) nachgemessen: Referenz-Abstand ist genau
   * 16px = --space-sm, kein zusätzliches padding-bottom auf der
   * Überschrift. Frühere Erhöhung (auf Nutzer-Wunsch, ohne
   * Referenz-Abgleich) wieder zurückgesetzt -- der reale
   * Zusatzabstand kommt jetzt ausschließlich vom notwendigen
   * padding-bottom auf .pg-hero__heading (Verlaufstext-Fix), nicht
   * mehr zusätzlich von hier.
   */
  margin-top: var(--space-sm);
  color: var(--component-muted);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.55;
}

.pg-hero__description > * {
  margin: 0 0 var(--space-sm);
}

.pg-hero__description > :last-child {
  margin-bottom: 0;
}

/*
 * "centered" (buehne ohne Hintergrundfoto) und "photo" (buehne mit
 * Hintergrundfoto) -- eine Spalte, zentrierter Text, Verlaufstext-
 * Akzent auf der Headline. Referenz: dev-wp.progiton.com hero.scss
 * (Szene2/Szene3).
 */
.pg-hero--centered .pg-hero__content,
.pg-hero--photo .pg-hero__content {
  max-width: 46rem;
  margin-inline: auto;
  text-align: center;
}

.pg-hero--centered .pg-hero__eyebrow,
.pg-hero--photo .pg-hero__eyebrow {
  justify-content: center;
}

.pg-hero--centered .pg-hero__heading,
.pg-hero--photo .pg-hero__heading {
  max-width: none;
  margin-inline: auto;
  /*
   * Eigentliche Ursache (per Range.getBoundingClientRect()-A/B-Test
   * verifiziert, nicht nur vermutet): `background-clip: text` malt den
   * Verlauf nur innerhalb der Padding-Box; normale (nicht-transparente)
   * Textfarbe rendert Glyphen dagegen unabhängig von der Box-Höhe --
   * deshalb reicht die geerbte line-height: 1.02 für sichtbaren Text
   * völlig aus, schneidet aber bei diesem Verlaufstext-Effekt die
   * Unterlänge des „g" ab, weil die Padding-Box dort endet, bevor die
   * Glyphen-Tinte fertig ist. Behoben mit `padding-bottom` (malt den
   * Verlauf zusätzlich nach unten weiter) statt mit `line-height`
   * (hätte den ganzen Zeilenblock samt Abstand oben aufgebläht --
   * erster Versuch, per Nutzer-Feedback als sichtbar zu groß verworfen).
   */
  padding-bottom: 0.25em;
  background: var(--gradient-accent-text);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.pg-hero--centered .pg-hero__description,
.pg-hero--photo .pg-hero__description {
  max-width: 38rem;
  margin-inline: auto;
}

.pg-hero--centered .pg-hero__actions,
.pg-hero--photo .pg-hero__actions {
  justify-content: center;
}

.pg-hero--centered .pg-footer-list,
.pg-hero--photo .pg-footer-list {
  justify-content: center;
}

.pg-hero--centered .pg-fakten,
.pg-hero--photo .pg-fakten {
  justify-content: center;
}

.pg-hero__bg-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/*
 * Legt die Abdunklungs-Scrim über dasselbe Punktraster-Pseudoelement
 * (statt eines zweiten Elements) -- der zusammengesetzte Selektor
 * gewinnt unabhängig von der Deklarationsreihenfolge gegen
 * .pg-hero::before allein.
 */
.pg-hero.pg-hero--photo::before {
  z-index: 1;
  background-image:
    linear-gradient(180deg, rgba(8, 10, 8, 0.4), rgba(8, 10, 8, 0.82)),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size:
    cover,
    4.5rem 4.5rem,
    4.5rem 4.5rem;
}

.pg-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 1.25rem;
}

.pg-hero__actions .pg-link--outline {
  border-color: var(--component-border);
  color: var(--component-text);
}

.pg-hero__actions .pg-link--outline:hover,
.pg-hero__actions .pg-link--outline:focus-visible {
  border-color: var(--component-accent);
  color: var(--component-accent);
}

.pg-hero .pg-footer-list {
  margin-top: 1.25rem;
  color: var(--component-muted);
}

.pg-hero .pg-footer-list__item strong,
.pg-hero .pg-footer-list__item::before {
  color: var(--component-accent);
}

.pg-hero .pg-fakten {
  margin-top: 1.75rem;
}

.pg-hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pg-hero__visual img,
.pg-hero__visual video {
  width: 100%;
  max-height: 32rem;
  object-fit: contain;
  filter: drop-shadow(var(--component-shadow));
}

.pg-hero__visual-svg {
  display: flex;
  width: 100%;
}

.pg-hero__visual-svg svg {
  width: 100%;
  max-height: 32rem;
  filter: drop-shadow(var(--component-shadow));
}

.pg-hero[data-hero-carousel] {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(0.75rem, 2vh, 1.25rem);
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.pg-hero__carousel-controls {
  position: relative;
  z-index: 2;
  display: flex;
  max-width: calc(100% - 2rem);
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 0.25rem;
  border: 1px solid var(--component-border);
  border-radius: var(--radius-pill);
  margin: 0;
  padding: 0.375rem 0.5rem;
  background: rgba(11, 16, 12, 0.82);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(0.75rem);
}

.pg-hero__carousel-button,
.pg-hero__carousel-indicator {
  flex: 0 0 auto;
  cursor: pointer;
  transition:
    background-color var(--duration-fast) ease,
    border-color var(--duration-fast) ease,
    color var(--duration-fast) ease,
    transform var(--duration-fast) ease;
}

.pg-hero__carousel-button {
  display: inline-flex;
  width: clamp(2.125rem, 5vw, 2.375rem);
  height: clamp(2.125rem, 5vw, 2.375rem);
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  line-height: 1;
}

.pg-hero__carousel-button--toggle {
  margin-left: 0.125rem;
  color: var(--component-accent);
  font-size: 0.75rem;
}

.pg-hero__carousel-button[hidden] {
  display: none;
}

.pg-hero__carousel-indicators {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
}

.pg-hero__carousel-indicator {
  display: inline-flex;
  width: 1.5rem;
  height: 1.5rem;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  padding: 0;
}

.pg-hero__carousel-indicator::before {
  width: 0.5rem;
  height: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: transparent;
  content: "";
  transition:
    background-color var(--duration-fast) ease,
    border-color var(--duration-fast) ease,
    transform var(--duration-fast) ease;
}

.pg-hero__carousel-button:hover,
.pg-hero__carousel-button:focus-visible {
  background: var(--color-primary-glow);
  color: var(--component-accent);
}

.pg-hero__carousel-indicator:hover::before,
.pg-hero__carousel-indicator:focus-visible::before,
.pg-hero__carousel-indicator.is-active::before {
  border-color: var(--component-accent);
  background: var(--component-accent);
  transform: scale(1.2);
}

.pg-hero__carousel-button:focus-visible,
.pg-hero__carousel-indicator:focus-visible {
  outline: 0.125rem solid var(--component-accent);
  outline-offset: 0.125rem;
}

.pg-hero__carousel-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@keyframes pg-hero-slide-in {
  from {
    opacity: 0;
    transform: translateX(1.5rem);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (min-width: 62rem) {
  .pg-hero[data-hero-carousel] {
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    padding-bottom: clamp(2rem, 3vw, 2.125rem);
  }

  .pg-hero[data-hero-carousel] > .pg-hero__container,
  .pg-hero[data-hero-carousel] > .pg-hero__carousel-controls {
    grid-area: 1 / 1;
  }

  .pg-hero__layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  .pg-hero--vertical .pg-hero__layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .pg-hero--centered .pg-hero__layout,
  .pg-hero--photo .pg-hero__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .pg-hero__carousel-controls {
    align-self: end;
    margin-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .pg-hero__carousel-button,
  .pg-hero__carousel-indicator,
  .pg-hero__carousel-indicator::before {
    transition: none;
  }

  .pg-hero__slide.is-active .pg-hero__layout {
    animation: none;
  }
}
