/*
 * Bretter-Knaller – projektspezifische Ergänzungen zu CygnusX.
 *
 * Farben, Schriften, Größen, Radien und Abstände kommen aus den Parametern des
 * Template-Stils (CSS-Variablen aus Assets.php). Hier steht nur, was sich dort
 * nicht einstellen lässt: Versalien-Headlines, dunkle Sektionen, Hero-Typografie
 * und die Komponenten des Onepagers (Präfix .bk-).
 */

:root {
  --bk-ink: var(--body-color, #141414);
  --bk-dark-bg: var(--footerbg, #141414);
  --bk-dark-surface: #202020;
  --bk-dark-line: #555551;
  --bk-dark-text: #c9c9c4;
  --bk-gutter: clamp(1.25rem, 4vw, 4rem);
  --bk-display-size: clamp(4.25rem, 8.2vw, 7rem);
  --bk-header-offset: 6rem;
}

html {
  scroll-padding-top: var(--bk-header-offset);
}

body.site {
  /* Full-bleed-Builder-Blöcke nutzen 100vw; die Scrollbar-Breite darf nicht seitlich scrollen. */
  overflow-x: clip;
}

h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
  text-transform: uppercase;
  text-wrap: balance;
}

::selection {
  background: var(--color-primary);
  color: #0a0a0a;
}

/* ---------- Header (mod_fixed_header) ---------- */

.mod-fixed-header__brand-image {
  max-height: 3.25rem;
}

/* Wortmarke neben dem Logo (mod_fixed_header „Seitentitel neben dem Logo anzeigen“), wie im Bestellformular-Entwurf. */
.mod-fixed-header__brand--wordmark {
  gap: 0.875rem;
}

.mod-fixed-header__brand--wordmark .mod-fixed-header__brand-image {
  width: auto;
  height: var(--logo-width-mobile, 2.875rem);
  max-height: none;
}

.mod-fixed-header__brand-wordmark {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: #fff;
  text-align: left;
}

.mod-fixed-header__brand-name {
  font-family: var(--font-family-headings, sans-serif);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.mod-fixed-header__brand-accent {
  color: var(--color-primary, #d84d2b);
}

.mod-fixed-header__brand-claim {
  color: #b5b5b5;
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (min-width: 992px) {
  .mod-fixed-header__brand--wordmark .mod-fixed-header__brand-image {
    height: var(--logo-width, 3.25rem);
  }
}

/*
 * Unter 992px steht der Header über (nicht auf) dem Hero. Transparent läge er auf dem hellen
 * Seitengrund und die weiße Wortmarke wäre unlesbar, daher dort immer die dunkle Header-Fläche.
 */
@media (max-width: 991.98px) {
  .site.has-home-hero .header.fixed.mod-fixed-header:not(.is-scrolled, .is-mobile-open, .is-mega-open) {
    --fixed-header-bg: var(--hero-header-scrolled-bg, var(--headerbg, #141414));
    --fixed-header-border: transparent;
  }
}

/* Handys: Logo, CTA und Menüknopf brauchen die Breite. Die Wortmarke bleibt als Linkname für Screenreader. */
@media (max-width: 639.98px) {
  .mod-fixed-header__brand-wordmark {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

.site .header.container-header .mod-fixed-header__cta {
  gap: 1.5rem;
  border-radius: var(--button-radius, 0);
  color: var(--btncolor, #0a0a0a);
  font-weight: 600;
}

.site .header.container-header .mod-fixed-header__cta:is(:hover, :focus) {
  color: var(--btncolorh, #0a0a0a);
}

/* Kein Glow beim Hover/aktiven Menüpunkt (Leuchtfläche + Text-Schatten aus layout.css); nur der Farbwechsel bleibt. */
.site .header .mod-fixed-header__nav :is(.mod-fixed-header__link, .mod-fixed-header__trigger)::before {
  display: none;
}

.site .header .mod-fixed-header__nav :is(.mod-fixed-header__link, .mod-fixed-header__trigger) {
  text-shadow: none;
}

.mod-fixed-header__cta::after {
  content: "↗";
  font: 1.25rem/1 Arial, sans-serif;
}

/* ---------- Inhaltsbreite für Beiträge (Komponente ist im Template vollbreit) ---------- */

.com-content-article__body > :not(.builder-full-bleed),
.bk-legal .com-content-article {
  width: min(100% - 2 * var(--bk-gutter), var(--content-max-width, 80rem));
  margin-inline: auto;
}

.bk-section {
  padding-block: var(--builder-section-spacing, clamp(4.75rem, 9vw, 6.5rem));
}

/* ---------- Typo-Bausteine ---------- */

.bk-display {
  font-size: var(--bk-display-size);
  line-height: 0.98;
}

.bk-eyebrow {
  margin-bottom: 1.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.17em;
  line-height: 1.6;
}

.com-content-article__body p {
  max-width: 65ch;
}

.com-content-article__body .lead {
  font-size: clamp(1.15rem, 2.1vw, 1.5rem);
  line-height: 1.65;
}

.bk-text-link {
  display: inline-flex;
  align-items: center;
  gap: 1.75rem;
  min-height: 2.75rem;
  margin-top: 0.75rem;
  padding-block: 0.875rem 0.5rem;
  border-bottom: 1px solid currentColor;
  color: var(--bk-ink);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}

.bk-text-link:hover,
.bk-text-link:focus-visible {
  color: var(--linkcolor, #a43216);
}

.bk-text-link span,
.bk-btn-arrow span,
.bk-feature__icon,
.bk-ticket__icon {
  font-family: Arial, sans-serif;
  font-weight: 400;
  line-height: 1;
}

.btn.bk-btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.25rem;
  min-height: 3.375rem;
  font-size: 0.83rem;
}

.bk-btn-arrow span {
  font-size: 1.55rem;
}

.btn-primary {
  transition: background-color 0.2s, transform 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

/* ---------- Dunkle Sektionen (Full-Bleed-Band des Builders) ---------- */

.bk-dark {
  background: var(--bk-dark-bg);
  color: #fff;
}

.bk-dark > .container-xl {
  width: min(100% - 2 * var(--bk-gutter), var(--content-max-width, 80rem));
  max-width: none;
  padding-inline: 0;
}

.bk-dark h2,
.bk-dark h3 {
  color: #fff;
}

.bk-dark .bk-eyebrow {
  color: #ccc;
}

.bk-text-light {
  color: var(--bk-dark-text);
  text-wrap: pretty;
}

/* ---------- Hero (Builder: Hero mit Hintergrundbild) ---------- */

/*
 * Der Hero füllt immer genau die sichtbare Fensterhöhe (svh, ohne Browserleisten).
 * Ab 992px liegt der fixe Header über dem Hero, darunter steht er im Fluss und wird
 * abgezogen (Header-Höhen aus den Template-Parametern). Schrift und Abstände skalieren
 * zusätzlich mit der Höhe, damit der Inhalt auch in niedrigen Fenstern passt. Reicht
 * der Platz trotzdem nicht (z. B. Smartphone quer), wächst der Hero mit.
 */
.bk-hero.builder-hero-overlay {
  --bk-hero-height: 100vh;
  --bk-hero-height: 100svh;
  --bk-hero-pad-top: calc(var(--header-height, 5rem) + clamp(1rem, 4svh, 2.5rem));
  min-height: var(--bk-hero-height);
  border-radius: 0;
  background: var(--bk-dark-bg);
  color: #fff;
}

.bk-hero .builder-hero-overlay__image {
  object-position: center 56%;
}

.bk-hero .builder-hero-overlay__shade {
  background:
    linear-gradient(90deg, rgb(10 10 10 / 0.95), rgb(10 10 10 / 0.72) 28%, rgb(10 10 10 / 0.25) 59%, rgb(10 10 10 / 0.08)),
    linear-gradient(0deg, rgb(10 10 10 / 0.38), transparent 50%);
  opacity: 1;
}

/* Der Builder vererbt min-height per "inherit" und legt eigenes Padding darum – beides hier neutralisieren. */
.bk-hero .builder-hero-overlay__content {
  padding: 0;
}

.bk-hero .builder-hero-overlay__container {
  width: min(100% - 2 * var(--bk-gutter), var(--content-max-width, 80rem));
  max-width: none;
  min-height: var(--bk-hero-height);
  margin-inline: auto;
  padding-block: var(--bk-hero-pad-top) clamp(1.5rem, 6svh, 4rem);
  padding-inline: 0;
}

.bk-hero .builder-hero-overlay__box {
  max-width: none;
  padding: 0;
  background: none;
}

.bk-hero .bk-eyebrow {
  margin-bottom: clamp(0.75rem, 2.5svh, 1.5rem);
  color: #ededeb;
}

.bk-hero__title {
  margin-bottom: clamp(1rem, 3svh, 1.75rem);
  color: #fff;
  font-size: clamp(3.5rem, min(13.7vw, 21svh), 12.5rem);
  line-height: 0.8;
  letter-spacing: -0.025em;
}

.bk-hero__claim {
  margin-bottom: clamp(0.75rem, 3svh, 1.875rem);
  font-size: clamp(0.95rem, 1.35vw, 1.15rem);
  line-height: 1.6;
}

/*
 * Bestellseite: mod_bretterknaller (Modul 122) steht in der Position hero-home. Sein Titelbereich
 * .bk-titel ist der Hero, vollbreit und bis oben. Ab 992px liegt der Header darüber, daher Platz oben.
 */
.container-hero-home .mod-bretterknaller .bk-titel {
  padding-top: calc(var(--header-height, 5rem) + 3.5rem);
}

@media (max-width: 991.98px) {
  .container-hero-home .mod-bretterknaller .bk-titel {
    padding-top: 44px;
    /* Der Header-Platzhalter (Template-Parameter) ist bis zu 3px höher als der fixe Header: Lücke dunkel füllen. */
    box-shadow: 0 -0.5rem 0 var(--bk-schwarz);
  }
}

@media (max-width: 991.98px) {
  .bk-hero.builder-hero-overlay {
    --bk-hero-height: calc(100vh - var(--header-height, 5rem));
    --bk-hero-height: calc(100svh - var(--header-height, 5rem));
    --bk-hero-pad-top: clamp(1.5rem, 5svh, 3rem);
  }
}

@media (max-width: 767.98px) {
  .bk-hero.builder-hero-overlay {
    --bk-hero-height: calc(100vh - var(--header-height-mobile, 4.5rem));
    --bk-hero-height: calc(100svh - var(--header-height-mobile, 4.5rem));
  }
}

@media (max-width: 639.98px) {
  .bk-hero__title {
    font-size: clamp(3.5rem, min(22vw, 13svh), 9.4rem);
  }

  .bk-hero .builder-hero-overlay__image {
    object-position: 58% center;
  }

  .bk-hero .builder-hero-overlay__shade {
    background:
      linear-gradient(90deg, rgb(10 10 10 / 0.86), rgb(10 10 10 / 0.5)),
      linear-gradient(0deg, rgb(10 10 10 / 0.45), transparent);
  }
}

/* ---------- Legenden ---------- */

.bk-legends-image {
  width: 100%;
  height: clamp(25rem, 40vw, 36.25rem);
  object-fit: cover;
  object-position: 42% center;
}

.bk-legend-names {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.5rem;
  margin-block: 1.5rem;
}

.bk-legend-names li {
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--color-border, #d9d9d4);
  font-family: var(--font-family-headings);
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  font-weight: 600;
  line-height: 1.2;
}

/* ---------- Sitzplatzkarten (Startseite, Link auf die Bestellseite) ---------- */

.bk-seats__facts {
  margin-block: 0 2rem;
  border-top: 1px solid var(--color-border, #d9d9d4);
}

.bk-seats__facts li {
  padding-block: 1rem;
  border-bottom: 1px solid var(--color-border, #d9d9d4);
  color: var(--color-text-muted, #5c5c58);
  text-wrap: pretty;
}

.bk-seats__facts strong {
  color: var(--bk-ink);
}

/* ---------- Erlebnis (Feature-Grid) ---------- */

.bk-features__title {
  max-width: 50rem;
}

.bk-feature {
  position: relative;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bk-dark-line);
}

.bk-feature__icon {
  position: absolute;
  top: 1.25rem;
  right: 0;
  color: var(--color-primary);
  font-size: 2rem;
}

.bk-feature p {
  max-width: 34ch;
  color: var(--bk-dark-text);
  font-size: 0.9rem;
}

/* ---------- Impressionen (Builder-Galerie mit Lightbox) ---------- */

.bk-gallery {
  display: grid;
  gap: 0.75rem;
}

.bk-gallery__item {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #ddd;
}

.bk-gallery__item::after {
  content: "↗";
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--body-bg, #f6f6f3);
  color: var(--bk-ink);
  font: 1.5rem/1 Arial, sans-serif;
}

.builder-gallery-grid.bk-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

@media (min-width: 640px) {
  .bk-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 768px) {
  .bk-gallery {
    grid-template-columns: 1.25fr 1fr;
    grid-template-rows: 22.5rem 19.375rem 21.25rem;
  }

  .bk-gallery__item {
    aspect-ratio: auto;
  }
}

/* ---------- Termin (Ticket-Card) ---------- */

.bk-ticket.card {
  border: 1px solid #62625e;
  border-radius: 0;
  background: var(--bk-dark-surface);
  color: #fff;
}

.bk-ticket .card-header,
.bk-ticket .card-footer {
  padding: 1.5rem clamp(1.5rem, 3vw, 2.25rem);
  border-color: #63635f;
  border-style: dashed;
  background: none;
  font-size: 0.71rem;
  font-weight: 600;
}

.bk-ticket .card-header {
  border-width: 0 0 1px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.bk-ticket .card-footer {
  border-width: 1px 0 0;
  color: #eee;
}

.bk-ticket .card-body {
  padding: 1.75rem clamp(1.5rem, 3vw, 2.25rem);
  color: var(--bk-dark-text);
  font-size: 0.9rem;
}

.bk-ticket .card-body p {
  margin-bottom: 0.25rem;
}

.bk-ticket__icon {
  color: var(--color-primary);
  font-size: 1.5rem;
}

.bk-ticket .bk-ticket__date {
  margin-bottom: 1.25rem;
  color: #fff;
  font-family: var(--font-family-headings);
  font-size: clamp(2.5rem, 3.5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.05;
}

/* ---------- Verein ---------- */

.bk-about {
  max-width: 66rem;
}

.bk-about__logo {
  width: clamp(10.5rem, 22vw, 16.25rem);
  aspect-ratio: 1;
  object-fit: contain;
}

/* ---------- Kontakt ---------- */

.bk-section.bk-contact {
  padding-top: clamp(4rem, 7vw, 5rem);
  border-top: 1px solid var(--color-border, #d9d9d4);
}

.bk-contact h2 {
  font-size: clamp(3.4rem, 5.4vw, 4.6rem);
}

.bk-contact__email {
  display: inline-block;
  padding-block: 0.625rem;
  border-bottom: 1px solid currentColor;
  color: var(--bk-ink);
  font-size: clamp(0.95rem, 1.65vw, 1.25rem);
  font-weight: 600;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.bk-contact address {
  font-style: normal;
}

/* ---------- Footer (mod_dynamic_footer) ---------- */

.bk-footer .container {
  width: min(100% - 2 * var(--bk-gutter), var(--content-max-width, 80rem));
  max-width: none;
  padding-inline: 0;
}

.bk-footer p {
  margin: 0;
}

.bk-footer a {
  text-decoration: none;
}

.bk-footer__wordmark {
  font-family: var(--font-family-headings);
  font-size: clamp(2.7rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.bk-footer__claim {
  color: #bdbdb7;
  font-size: 0.8rem;
}

.bk-footer__copy {
  color: #aaa;
  font-size: 0.7rem;
}

.bk-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.bk-footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: 0.75rem;
}

.bk-footer__nav a:hover,
.bk-footer__nav a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.bk-footer .mod-dynamic-footer__row {
  align-items: center;
}

.bk-footer .mod-dynamic-footer__row + .mod-dynamic-footer__row {
  margin-top: 2.25rem;
  padding-top: 1.375rem;
  border-top: 1px solid #414141;
}

.bk-footer .mod-dynamic-footer__column--align-end .bk-footer__nav {
  justify-content: flex-end;
}

@media (max-width: 767.98px) {
  .bk-footer .mod-dynamic-footer__column--align-end {
    text-align: start;
  }

  .bk-footer .mod-dynamic-footer__column--align-end .bk-footer__nav {
    justify-content: flex-start;
  }
}

/* ---------- Rechtliche Seiten ---------- */

.bk-legal .com-content-article {
  max-width: 52.5rem;
  padding-block: calc(var(--bk-header-offset) + 2rem) 6.25rem;
  overflow-wrap: anywhere;
}

.bk-legal .page-header h1,
.bk-legal .com-content-article h1 {
  margin-block: 1.75rem 2.25rem;
  font-size: var(--h1size);
  overflow-wrap: normal;
  hyphens: auto;
}

.bk-legal .com-content-article__body h2 {
  margin: 2.5rem 0 1.125rem;
  font-size: 2.1rem;
  line-height: 1.15;
}

.bk-legal .com-content-article__body h3 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.65rem;
}

.bk-legal .com-content-article__body :is(p, li) {
  font-size: 0.9rem;
}

.bk-legal .com-content-article__body > * {
  width: auto;
  margin-inline: 0;
}

.bk-legal-note {
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--color-primary);
  background: var(--color-muted-bg, #eaeae5);
}

.bk-legal-note p:last-child {
  margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn-primary:hover {
    transform: none;
  }
}
