/* =====================================================================
   Hanz Hero-Slider (Modul hanz_hero)
   Aufbau: .hh > .hh-stage (alle Folien übereinander im selben Grid-Feld,
   Höhe = höchste Folie → kein Layoutsprung) + .hh-nav (Reiter, Pause).
   ===================================================================== */

.hh {
  --hh-accent: #147EB3;
  --hh-accent-ink: #ffffff;
  --hh-delay: 7000ms;
  --hh-ease: cubic-bezier(.2, .7, .1, 1);
  --hh-ink: #ffffff;
  --hh-ink-muted: rgba(255, 255, 255, .78);
  --hh-line: rgba(255, 255, 255, .16);
  --hh-bg: #0d1215;
  --hh-nav-h: 92px;
  --hh-gutter: clamp(16px, 4vw, 64px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--hh-bg);
  color: var(--hh-ink);
  font-family: var(--dwg-font-body, 'Montserrat', sans-serif);
  transition: background-color .9s var(--hh-ease);
}

.hh[data-theme="light"] {
  --hh-ink: #11181c;
  --hh-ink-muted: #44525a;
  --hh-line: rgba(17, 24, 28, .14);
  --hh-bg: #e9ecee;
}

.hh *,
.hh *::before,
.hh *::after {
  box-sizing: border-box;
}

.hh-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--hh-gutter);
}

/* ---------- Bühne & Folien ---------------------------------------- */

.hh-stage {
  display: grid;
  /* Waagrechtes Wischen bleibt beim Slider, senkrecht scrollt die Seite (sonst pointercancel statt pointerup) */
  touch-action: pan-y;
}

.hh-slide {
  grid-area: 1 / 1;
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(560px, 76vh, 780px);
  padding-bottom: var(--hh-nav-h);
  color: var(--hh-ink-slide, #fff);
  opacity: 0;
  visibility: hidden;
  transition: opacity .9s var(--hh-ease), visibility 0s linear .9s;
}

.hh-slide.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  transition: opacity .9s var(--hh-ease);
}

.hh-slide[data-theme="dark"] {
  --hh-ink-slide: #ffffff;
  --hh-muted-slide: rgba(255, 255, 255, .8);
  background: #0d1215;
}

.hh-slide[data-theme="light"] {
  --hh-ink-slide: #11181c;
  --hh-muted-slide: #44525a;
  background: #e9ecee;
}

.hh-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hh-media picture {
  display: contents;
}

.hh-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* Foto: langsamer Zoom, Verlauf für Lesbarkeit links und zur Navigation hin */
.hh-slide--photo .hh-img {
  transform: scale(1.06);
  transform-origin: 70% 50%;
  transition: transform calc(var(--hh-delay) + 1.4s) linear;
}

.hh-slide--photo.is-active .hh-img {
  transform: scale(1);
}

.hh-slide--photo[data-theme="dark"] .hh-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 13, 15, .9) 0%, rgba(9, 13, 15, .74) 30%, rgba(9, 13, 15, .28) 58%, rgba(9, 13, 15, 0) 78%),
    linear-gradient(0deg, rgba(9, 13, 15, .85) 0%, rgba(9, 13, 15, 0) 32%);
}

.hh-slide--photo[data-theme="light"] .hh-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(233, 236, 238, .94) 0%, rgba(233, 236, 238, .7) 34%, rgba(233, 236, 238, 0) 66%),
    linear-gradient(0deg, rgba(233, 236, 238, .9) 0%, rgba(233, 236, 238, 0) 30%);
}

/* Produkt: Studiofläche mit Lichtkegel, feinem Raster und Bodenschatten.
   mix-blend-mode lässt weiße Freisteller-Hintergründe in der hellen Fläche verschwinden. */
.hh-slide--product[data-theme="light"] {
  background:
    radial-gradient(ellipse 60% 70% at 68% 46%, #ffffff 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #f1f3f4 0%, #e3e7e9 100%);
}

.hh-slide--product[data-theme="dark"] {
  background:
    radial-gradient(ellipse 55% 65% at 68% 46%, #2a343a 0%, rgba(42, 52, 58, 0) 70%),
    linear-gradient(180deg, #11171a 0%, #0a0e10 100%);
}

.hh-slide--product .hh-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hh-grid, rgba(17, 24, 28, .05)) 1px, transparent 1px),
    linear-gradient(90deg, var(--hh-grid, rgba(17, 24, 28, .05)) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 55% 70% at 68% 48%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 55% 70% at 68% 48%, #000 0%, transparent 75%);
}

.hh-slide--product[data-theme="dark"] {
  --hh-grid: rgba(255, 255, 255, .05);
}

.hh-slide--product picture {
  display: block;
  position: absolute;
  top: calc(50% - var(--hh-nav-h) / 2);
  right: max(var(--hh-gutter), calc((100vw - 1440px) / 2 + var(--hh-gutter)));
  width: min(52vw, 760px, 88vh);
  transform: translateY(-50%);
}

.hh-slide--product picture::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -6%;
  height: 9%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(10, 14, 16, .28), rgba(10, 14, 16, 0));
  filter: blur(6px);
  z-index: -1;
}

.hh-slide--product .hh-img {
  position: relative;
  height: auto;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transform: translate3d(6%, 0, 0) rotate(-3deg);
  transition: opacity 1s var(--hh-ease) .15s, transform 1.4s var(--hh-ease) .15s;
}

.hh-slide--product .hh-img {
  filter: drop-shadow(0 28px 34px rgba(10, 14, 16, .26)) drop-shadow(0 6px 10px rgba(10, 14, 16, .16));
}

/* Text rechts (ab Tablet): Verlauf spiegeln, Produkt nach links */
@media (min-width: 768px) {
  .hh-slide--right .hh-copy {
    margin-left: auto;
  }

  .hh-slide--photo.hh-slide--right[data-theme="dark"] .hh-media::after {
    background:
      linear-gradient(270deg, rgba(9, 13, 15, .96) 0%, rgba(9, 13, 15, .93) 42%, rgba(9, 13, 15, .62) 60%, rgba(9, 13, 15, 0) 84%),
      linear-gradient(0deg, rgba(9, 13, 15, .85) 0%, rgba(9, 13, 15, 0) 32%);
  }

  .hh-slide--product.hh-slide--right picture,
  .hh-slide--product.hh-slide--right .hh-watermark {
    right: auto;
    left: max(var(--hh-gutter), calc((100vw - 1440px) / 2 + var(--hh-gutter)));
  }
}

.hh-slide--product.is-active .hh-img {
  opacity: 1;
  transform: none;
}

.hh-watermark {
  position: absolute;
  top: 50%;
  right: max(var(--hh-gutter), calc((100vw - 1440px) / 2 + var(--hh-gutter)));
  transform: translateY(-58%);
  font-family: var(--dwg-font-heading, sans-serif);
  font-size: clamp(9rem, 24vw, 24rem);
  line-height: 1;
  letter-spacing: -.02em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(17, 24, 28, .09);
  user-select: none;
}

.hh-slide--product[data-theme="dark"] .hh-watermark {
  -webkit-text-stroke-color: rgba(255, 255, 255, .08);
}

/* ---------- Text ------------------------------------------------------- */

.hh-body {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hh-copy {
  max-width: 620px;
}

.hh-copy > * {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity .5s ease, transform .5s ease;
}

.hh-slide.is-active .hh-copy > * {
  opacity: 1;
  transform: none;
  transition: opacity .8s var(--hh-ease), transform 1s var(--hh-ease);
}

.hh-slide.is-active .hh-copy > :nth-child(1) { transition-delay: .25s; }
.hh-slide.is-active .hh-copy > :nth-child(2) { transition-delay: .35s; }
.hh-slide.is-active .hh-copy > :nth-child(3) { transition-delay: .47s; }
.hh-slide.is-active .hh-copy > :nth-child(4) { transition-delay: .57s; }
.hh-slide.is-active .hh-copy > :nth-child(5) { transition-delay: .67s; }

.hh-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 22px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--hh-muted-slide);
}

.hh-eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 36px;
  height: 2px;
  background: var(--hh-accent);
}

.hh .hh-title {
  margin: 0 0 22px;
  font-family: var(--dwg-font-heading, sans-serif);
  font-size: clamp(1.75rem, 3.1vw, 3.15rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: .005em;
  text-transform: uppercase;
  color: var(--hh-ink-slide);
  text-wrap: balance;
}

.hh-title-line {
  display: block;
}

.hh-title-accent {
  margin-top: .12em;
  color: var(--hh-accent-title, var(--hh-accent));
}

/* Akzentfarbe als Schrift auf dunklem/hellem Grund lesbar halten */
.hh-slide[data-theme="dark"] .hh-title-accent {
  color: var(--hh-accent-title, color-mix(in srgb, var(--hh-accent) 72%, #ffffff));
}

.hh-slide[data-theme="light"] .hh-title-accent {
  color: var(--hh-accent-title, color-mix(in srgb, var(--hh-accent) 68%, #000000));
}

.hh-text {
  max-width: 54ch;
  margin: 0 0 24px;
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.65;
  color: var(--hh-muted-slide);
}

.hh-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0 0 34px;
  padding: 0;
  list-style: none;
}

.hh-features li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--hh-ink-slide);
}

.hh-features svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  padding: 3px;
  border-radius: 50%;
  background: var(--hh-accent);
  fill: none;
  stroke: var(--hh-accent-ink);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hh .hh-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .09em;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  overflow: hidden;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.hh .hh-btn--primary {
  background: var(--hh-accent);
  color: var(--hh-accent-ink);
  box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--hh-accent) 80%, transparent);
}

.hh .hh-btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .7s var(--hh-ease);
}

.hh .hh-btn--primary:hover::before,
.hh .hh-btn--primary:focus-visible::before {
  transform: translateX(100%);
}

.hh .hh-btn--primary:hover,
.hh .hh-btn--primary:focus-visible {
  color: var(--hh-accent-ink);
  box-shadow: 0 14px 36px -12px color-mix(in srgb, var(--hh-accent) 95%, transparent);
}

.hh-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .35s var(--hh-ease);
}

.hh-btn:hover svg,
.hh-btn:focus-visible svg {
  transform: translateX(4px);
}

.hh .hh-btn--ghost {
  border-color: color-mix(in srgb, var(--hh-ink-slide) 38%, transparent);
  color: var(--hh-ink-slide);
  background: transparent;
}

.hh .hh-btn--ghost:hover,
.hh .hh-btn--ghost:focus-visible {
  border-color: var(--hh-ink-slide);
  background: var(--hh-ink-slide);
  color: var(--hh-bg-slide, #0d1215);
}

.hh-slide[data-theme="light"] .hh-btn--ghost:hover,
.hh-slide[data-theme="light"] .hh-btn--ghost:focus-visible {
  color: #ffffff;
}

.hh .hh-btn:focus-visible,
.hh-tab:focus-visible,
.hh-toggle:focus-visible {
  outline: 2px solid var(--hh-accent);
  outline-offset: 3px;
}

/* ---------- Navigation -------------------------------------------- */

.hh-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  color: var(--hh-ink);
  transition: color .6s ease;
}

.hh-nav-inner {
  display: flex;
  align-items: stretch;
  gap: 24px;
  height: var(--hh-nav-h);
}

.hh-tabs {
  flex: 1 1 auto;
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 24px;
}

.hh .hh-tab {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 3px;
  align-content: start;
  padding: 22px 0 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  opacity: .58;
  transition: opacity .3s ease;
}

.hh .hh-tab:hover,
.hh .hh-tab.is-active {
  opacity: 1;
}

.hh-tab-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--hh-line);
  overflow: hidden;
}

.hh-tab-progress {
  display: block;
  height: 100%;
  background: var(--hh-accent);
  transform: scaleX(0);
  transform-origin: left center;
}

.hh-tab.is-active .hh-tab-progress {
  animation: hh-progress var(--hh-delay) linear forwards;
}

.hh.is-paused .hh-tab.is-active .hh-tab-progress {
  animation-play-state: paused;
}

.hh.is-static .hh-tab.is-active .hh-tab-progress,
.hh[data-autoplay="0"] .hh-tab.is-active .hh-tab-progress {
  animation: none;
  transform: scaleX(1);
}

@keyframes hh-progress {
  to { transform: scaleX(1); }
}

.hh-tab-num {
  grid-row: 1 / span 2;
  padding-top: 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  opacity: .7;
}

.hh-tab-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hh-tab-caption {
  grid-column: 2;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--hh-ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hh .hh-toggle {
  flex: 0 0 auto;
  align-self: center;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-top: -2px;
  padding: 0;
  border: 1px solid var(--hh-line);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: border-color .3s ease, background-color .3s ease;
}

.hh .hh-toggle:hover {
  border-color: currentColor;
}

.hh-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hh-icon-play {
  display: none;
  fill: currentColor !important;
  stroke-width: 1.5 !important;
}

.hh.is-user-paused .hh-icon-pause {
  display: none;
}

.hh.is-user-paused .hh-icon-play {
  display: block;
}

/* ---------- Tablet ------------------------------------------------------- */

@media (max-width: 1199.98px) {
  .hh-copy {
    max-width: 520px;
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .hh-slide--product picture {
    width: 42vw;
  }

  .hh-slide--product .hh-copy {
    max-width: min(520px, 46vw);
  }
}

/* ---------- Handy: Bild oben, Text darunter ---------------------------- */

@media (max-width: 767.98px) {
  .hh {
    --hh-nav-h: 64px;
  }

  .hh-slide {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 0;
  }

  .hh-media {
    position: relative;
    inset: auto;
    flex: 0 0 auto;
    aspect-ratio: 4 / 3;
    overflow: hidden;
  }

  .hh-slide--photo .hh-media {
    aspect-ratio: 16 / 11;
  }

  .hh-slide--photo[data-theme="dark"] .hh-media::after {
    background: linear-gradient(0deg, #0d1215 0%, rgba(13, 18, 21, 0) 45%);
  }

  .hh-slide--photo[data-theme="light"] .hh-media::after {
    background: linear-gradient(0deg, #e9ecee 0%, rgba(233, 236, 238, 0) 45%);
  }

  .hh-slide--product picture {
    top: 50%;
    right: 8%;
    left: 8%;
    width: auto;
  }

  .hh-watermark {
    right: 50%;
    transform: translate(50%, -55%);
    font-size: 46vw;
  }

  .hh-body {
    flex: 1 0 auto;
    padding: 8px 0 28px;
  }

  .hh-slide--product .hh-body {
    padding-top: 4px;
  }

  .hh-eyebrow {
    gap: 10px;
    margin-bottom: 14px;
    font-size: 11px;
    letter-spacing: .12em;
  }

  .hh-eyebrow::before {
    width: 24px;
  }

  .hh .hh-title {
    margin-bottom: 14px;
    font-size: clamp(1.35rem, 6.4vw, 1.75rem);
    hyphens: auto;
    overflow-wrap: anywhere;
  }

  .hh-text {
    display: -webkit-box;
    margin-bottom: 20px;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.6;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
  }

  /* Handy: Bühne höchstens etwa bildschirmhoch – Merkmale und Zweit-Button entfallen */
  .hh-features,
  .hh .hh-btn--ghost {
    display: none;
  }

  .hh-actions {
    flex-direction: column;
  }

  .hh .hh-btn {
    width: 100%;
    min-height: 50px;
  }

  .hh-nav-inner {
    gap: 12px;
  }

  .hh-tabs {
    gap: 10px;
  }

  .hh .hh-tab {
    display: block;
    padding-top: 16px;
  }

  .hh-tab-num,
  .hh-tab-caption {
    display: none;
  }

  .hh-tab-label {
    display: block;
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
  }

  .hh .hh-toggle {
    width: 44px;
    height: 44px;
  }

  /* Breite nach Namenslänge statt gleich breit – „Schmeisser“ passt so ungekürzt */
  .hh-tabs {
    display: flex;
    gap: 8px;
  }

  .hh .hh-tab {
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* ---------- Band unter dem Slider (z. B. Sonderbestellung) --------------
   Eigenes Element nach .hh, fest angedockt; das ganze Band ist ein Link. */

.hh-band {
  --hh-gutter: clamp(16px, 4vw, 64px);
  display: block;
  background: var(--dwg-accent, #147EB3);
  color: #ffffff;
  font-family: var(--dwg-font-body, 'Montserrat', sans-serif);
  text-decoration: none;
  transition: background-color .25s ease;
}

.hh-band *,
.hh-band *::before,
.hh-band *::after {
  box-sizing: border-box;
}

.hh-band:hover,
.hh-band:focus-visible {
  background: #106a97;
  color: #ffffff;
  text-decoration: none;
}

.hh-band:focus-visible {
  outline: 3px solid #0d1215;
  outline-offset: -3px;
}

.hh-band-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 76px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.hh-band svg {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hh-band-icon {
  width: 32px;
  height: 32px;
  stroke-width: 1.5;
}

.hh-band-copy {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  line-height: 1.5;
}

.hh-band-title {
  font-family: var(--dwg-font-heading, sans-serif);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: .02em;
}

.hh-band-text {
  color: rgba(255, 255, 255, .88);
}

.hh-band-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, .85);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color .25s ease, color .25s ease;
}

.hh-band-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
  transition: transform .35s var(--hh-ease, ease);
}

.hh-band:hover .hh-band-btn {
  background: #ffffff;
  color: var(--dwg-accent, #147EB3);
}

.hh-band:hover .hh-band-btn svg {
  transform: translateX(3px);
}

@media (max-width: 767.98px) {
  .hh-band-inner {
    flex-wrap: wrap;
    gap: 6px 12px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .hh-band-icon {
    width: 26px;
    height: 26px;
  }

  .hh-band-copy {
    flex-basis: calc(100% - 38px);
    font-size: 14px;
  }

  .hh-band-title {
    display: block;
    font-size: 15px;
  }

  .hh-band-btn {
    flex: 1 1 100%;
    justify-content: center;
    margin-top: 8px;
  }
}

/* ---------- Bewegung reduzieren ------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  .hh-slide,
  .hh-slide.is-active,
  .hh-copy > *,
  .hh-slide.is-active .hh-copy > *,
  .hh-slide--photo .hh-img,
  .hh-slide--product .hh-img {
    transition: opacity .2s linear !important;
    transition-delay: 0s !important;
    transform: none !important;
  }

  .hh .hh-btn--primary::before {
    display: none;
  }
}
