/* ==========================================================================
   Telemarkfest 3 – Theme-Styles
   Kein Framework, keine externen Ressourcen. Farben kommen als CSS-Variablen
   aus der Theme-Konfiguration (siehe partials/base.html.twig).
   Eigene Anpassungen bitte in css/custom.css – wird automatisch geladen.
   ========================================================================== */

/* ---------- Schriften (Inter, SIL Open Font License) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-400.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/inter-400-italic.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-500.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-600.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-700.woff") format("woff"); }
@font-face { font-family: "Inter Display"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/inter-display-800.woff") format("woff"); }
@font-face { font-family: "Inter Display"; font-style: normal; font-weight: 900; font-display: swap; src: url("../fonts/inter-display-900.woff") format("woff"); }

/* ---------- Tokens ---------- */
:root {
  /* Farben (Fallbacks – werden im <head> aus der Konfiguration überschrieben) */
  --c-accent: #E6C55D;
  --c-accent-ink: #1d1704;
  --c-brand: #017EAD;
  --c-ink: #0f1d27;
  --c-paper: #f4f2ed;

  --c-surface: #ffffff;
  --c-text: var(--c-ink);
  --c-muted: color-mix(in srgb, var(--c-ink) 64%, var(--c-paper));
  --c-line: color-mix(in srgb, var(--c-ink) 12%, transparent);
  --c-tint: color-mix(in srgb, var(--c-ink) 4%, var(--c-paper));
  --c-on-dark: #ffffff;
  --c-on-dark-muted: rgba(255, 255, 255, .68);
  --c-link: var(--c-brand);

  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-display: "Inter Display", "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --container: 1200px;
  --measure: 920px;            /* Breite des Inhaltsblocks auf Unterseiten */
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 29, 39, .06), 0 12px 32px -12px rgba(15, 29, 39, .22);
  --shadow-lg: 0 2px 4px rgba(15, 29, 39, .06), 0 24px 60px -20px rgba(15, 29, 39, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --section-y: clamp(56px, 8vw, 112px);
}

/* ---------- Reset / Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--c-paper);
  color: var(--c-text);
  font: 400 1.0625rem/1.65 var(--f-body);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--c-link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.015em;
  color: var(--c-ink);
  margin: 0 0 .5em;
  text-wrap: balance;
}
p { margin: 0 0 1em; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--c-accent); color: var(--c-accent-ink); padding: .6em 1em; border-radius: var(--radius-sm); font-weight: 600; }
.skip-link:focus { top: 12px; }

/* ---------- Buttons & Links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .85em 1.4em;
  border: 2px solid transparent; border-radius: 999px;
  font: 600 1rem/1.1 var(--f-body);
  text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s, color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn .icon { transition: transform .2s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn--accent { background: var(--c-accent); color: var(--c-accent-ink); box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--c-accent) 80%, black); }
.btn--accent:hover { background: color-mix(in srgb, var(--c-accent) 88%, white); color: var(--c-accent-ink); }
.btn--dark { background: var(--c-ink); color: #fff; }
.btn--dark:hover { background: color-mix(in srgb, var(--c-ink) 85%, white); color: #fff; }
.btn--light { background: transparent; border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn--light:hover { background: #fff; color: var(--c-ink); border-color: #fff; }
.btn--sm { padding: .55em 1.05em; font-size: .9rem; }
.btn--block { width: 100%; }

.link-arrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; color: var(--c-link); text-decoration: none; }
.link-arrow .icon { transition: transform .2s var(--ease); }
a.link-arrow:hover .icon, .card:hover .link-arrow .icon { transform: translateX(4px); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1.5px solid currentColor; background: transparent; color: inherit;
  cursor: pointer; transition: background-color .2s, color .2s, opacity .2s;
}
.icon-btn:hover { background: #fff; color: var(--c-ink); border-color: #fff; }
.icon-btn[disabled] { opacity: .3; pointer-events: none; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  margin: 0 0 .9em;
  font: 700 .78rem/1 var(--f-body);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--c-muted);
}
.eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: var(--c-accent); }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--c-ink); color: #fff;
  transition: box-shadow .25s;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px -12px rgba(0, 0, 0, .55); }
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }

.brand { display: inline-flex; flex-direction: column; justify-content: center; color: #fff; text-decoration: none; line-height: 1; margin-right: auto; }
.brand__name { font: 900 1.45rem/1 var(--f-display); letter-spacing: -.01em; text-transform: uppercase; }
.brand__tag { margin-top: 5px; font: 700 .66rem/1 var(--f-body); letter-spacing: .24em; text-transform: uppercase; color: var(--c-accent); }
.brand__logo { height: 40px; width: auto; }
.brand:hover { text-decoration: none; }

.site-nav__list, .site-nav__sub { list-style: none; margin: 0; padding: 0; }
.site-nav__link {
  display: block; color: #fff; text-decoration: none;
  font-weight: 500; font-size: .98rem; line-height: 1.2;
}
.site-nav__link:hover { text-decoration: none; color: var(--c-accent); }
.site-nav__sub-toggle {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer;
}
.site-nav__sub-toggle .icon { transition: transform .2s var(--ease); }
.site-nav__item.is-open > .site-nav__sub-toggle .icon { transform: rotate(180deg); }

/* Desktop-Navigation */
@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav__list { display: flex; align-items: center; gap: 4px; }
  .site-nav__list > .site-nav__item { position: relative; display: flex; align-items: center; }
  .site-nav__list > .site-nav__item > .site-nav__link { padding: 24px 12px; position: relative; }
  .site-nav__list > .site-nav__item > .site-nav__link::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 16px; height: 3px; border-radius: 2px;
    background: var(--c-accent); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
  }
  .site-nav__list > .site-nav__item > .site-nav__link:hover::after,
  .site-nav__list > .site-nav__item.is-active > .site-nav__link::after { transform: scaleX(1); }
  .site-nav__list > .site-nav__item.is-active > .site-nav__link { color: #fff; }
  .site-nav__list > .has-children > .site-nav__link { padding-right: 0; }
  .site-nav__list > .has-children > .site-nav__link::after { right: 0; }
  .site-nav__list > .has-children > .site-nav__sub-toggle { margin-right: 4px; }

  .site-nav__sub {
    position: absolute; top: calc(100% - 8px); left: 0; min-width: 240px;
    padding: 8px; border-radius: 14px;
    background: var(--c-surface); box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity .18s, transform .18s var(--ease), visibility 0s .18s;
  }
  .site-nav__item.is-open > .site-nav__sub,
  .site-nav__item.has-children:hover > .site-nav__sub,
  .site-nav__item.has-children:focus-within > .site-nav__sub {
    opacity: 1; visibility: visible; transform: none; transition-delay: 0s;
  }
  .site-nav__sub .site-nav__link { color: var(--c-ink); padding: 10px 14px; border-radius: 8px; }
  .site-nav__sub .site-nav__link:hover, .site-nav__sub .is-active > .site-nav__link { background: var(--c-tint); color: var(--c-ink); }
  .site-nav__sub .is-active > .site-nav__link { font-weight: 600; }
  .site-nav__sub .site-nav__sub-toggle { display: none; }
  .site-nav__sub .site-nav__sub { position: static; box-shadow: none; padding: 0 0 0 12px; opacity: 1; visibility: visible; transform: none; }
}

/* Mobile Navigation */
@media (max-width: 959.98px) {
  .nav-toggle {
    display: inline-grid; place-items: center;
    width: 46px; height: 46px; margin-right: -8px;
    border: 0; border-radius: 12px; background: transparent; color: #fff; cursor: pointer;
  }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after, .nav-toggle__bars span {
    display: block; width: 24px; height: 2px; border-radius: 2px; background: currentColor;
    transition: transform .25s var(--ease), opacity .2s;
  }
  .nav-toggle__bars { position: relative; background: none; }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -7px; }
  .nav-toggle__bars::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars span { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
    background: var(--c-ink); overflow-y: auto; overscroll-behavior: contain;
    padding: 8px var(--gutter) 40px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s, transform .25s var(--ease), visibility 0s .25s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .site-nav__item { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .site-nav__link { flex: 1; padding: 16px 0; font: 800 1.5rem/1.15 var(--f-display); }
  .site-nav__item.is-active > .site-nav__link { color: var(--c-accent); }
  .site-nav__sub-toggle { width: 44px; height: 44px; }
  .site-nav__sub { flex-basis: 100%; display: none; padding: 0 0 12px 14px; border-left: 3px solid var(--c-accent); margin-bottom: 16px; }
  .site-nav__item.is-open > .site-nav__sub { display: block; }
  .site-nav__sub .site-nav__item { border: 0; }
  .site-nav__sub .site-nav__link { padding: 10px 0; font: 500 1.05rem/1.3 var(--f-body); color: var(--c-on-dark-muted); }
  .site-nav__sub .is-active > .site-nav__link { color: var(--c-accent); }
  body.nav-open { overflow: hidden; }
}

/* ---------- Startseite: Hero ---------- */
.hero { position: relative; background: var(--c-ink); }
.hero__img {
  width: 100%;
  aspect-ratio: 1920 / 850;
  min-height: clamp(200px, 50vw, 300px);
  max-height: calc(100vh - var(--header-h) - 40px);
  object-fit: cover;
}

/* ---------- Startseite: Titelbereich „Mosaik“ / „Hintergrundbild“ ---------- */
.hero-x {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; place-items: center;
  min-height: min(calc(100svh - var(--header-h)), 820px);
  padding-block: clamp(48px, 7vw, 96px) clamp(130px, 13vw, 180px);
  background: var(--c-ink); color: #fff; text-align: center;
  view-timeline: --hero block;
}
.hero-x::after { /* Abdunklung – Stärke über --overlay (Admin) */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgb(15 29 39 / calc(var(--overlay, .7) * .75)) 0%, rgb(15 29 39 / var(--overlay, .7)) 100%),
    linear-gradient(180deg, rgb(15 29 39 / 0) 60%, rgb(15 29 39 / .65) 100%);
}
.hero-x__bg { position: absolute; inset: 0; z-index: -2; }
.hero-x--image .hero-x__bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }

.hero-x__wall { inset: -6% -10%; display: grid; grid-template-rows: repeat(3, 1fr); gap: 10px; transform: rotate(-6deg); }
.hero-x__row { overflow: visible; min-height: 0; }
.hero-x__strip { display: flex; gap: 10px; width: max-content; height: 100%; }
.hero-x__strip img { height: 100%; width: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; }
.hero-x__row--2 .hero-x__strip { margin-left: -18%; }
.hero-x__row--3 .hero-x__strip { margin-left: -8%; }

.hero-x__inner { position: relative; display: grid; justify-items: center; gap: clamp(14px, 2vw, 22px); }
.hero-x__logo { width: min(64vw, 420px); height: auto; filter: drop-shadow(0 22px 40px rgba(0, 0, 0, .55)); }
.hero-x__title { margin: 0; color: #fff; font: 900 clamp(2.1rem, 1.2rem + 3.4vw, 4rem)/1 var(--f-display); letter-spacing: -.035em; text-shadow: 0 4px 30px rgba(0, 0, 0, .35); }
.hero-x__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 0; font-weight: 600; color: rgba(255, 255, 255, .88); }
.hero-x__meta > span { display: inline-flex; align-items: center; gap: 8px; }
.hero-x__meta .icon { color: var(--c-accent); }
.hero-x .countdown--inline { margin: 0; padding: 0; border: 0; font-size: 1rem; color: inherit; }
.hero-x .countdown--inline strong { font: 900 1.15rem/1 var(--f-display); color: var(--c-accent); margin: 0; vertical-align: baseline; }
.hero-x__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
.hero-x__actions .reg-closed { padding-inline: 1.4em; }
.hero-x__scroll {
  position: absolute; left: 50%; bottom: clamp(60px, 6vw, 84px); translate: -50% 0;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25);
}
.hero-x__scroll:hover { background: rgba(255, 255, 255, .2); }
.announce--below { margin-top: clamp(-48px, -3vw, -20px); }

@media (max-width: 640px) {
  .hero-x { min-height: auto; padding-block: 48px 130px; }
  .hero-x__wall { inset: -10% -40%; }
  .hero-x__logo { width: min(72vw, 300px); }
}

/* Bewegung nur, wenn erlaubt */
@media (prefers-reduced-motion: no-preference) {
  @keyframes hx-drift { to { transform: translateX(-50%); } }
  .hero-x--drift .hero-x__strip { animation: hx-drift 120s linear infinite; }
  .hero-x--drift .hero-x__row--2 .hero-x__strip { animation-direction: reverse; animation-duration: 150s; }
  .hero-x--drift .hero-x__row--3 .hero-x__strip { animation-duration: 135s; }
  .hero-x__scroll { animation: hx-bob 2.4s ease-in-out infinite; }
  @keyframes hx-bob { 50% { translate: -50% 6px; } }
}

/* Scroll-Effekte (CSS scroll-driven animations; ohne Unterstützung bleibt alles statisch) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    @keyframes hx-row-left  { to { translate: -9% 0; } }
    @keyframes hx-row-right { to { translate: 9% 0; } }
    @keyframes hx-bg-parallax { to { transform: translateY(18%) scale(1.14); } }
    @keyframes hx-inner-out { to { opacity: 0; transform: translateY(-48px) scale(.94); } }
    @keyframes hx-darken { to { opacity: 1; } }
    @keyframes reveal-in { from { opacity: 0; transform: translateY(28px); } }

    .fx-scroll .hero-x__row--1, .fx-scroll .hero-x__row--3 { animation: hx-row-left linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
    .fx-scroll .hero-x__row--2 { animation: hx-row-right linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
    .fx-scroll .hero-x--image .hero-x__bg img { animation: hx-bg-parallax linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
    .fx-scroll .hero-x__inner { animation: hx-inner-out linear both; animation-timeline: --hero; animation-range: exit 5% exit 70%; }
    .fx-scroll .hero-x::before {
      content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
      background: var(--c-ink); opacity: 0;
      animation: hx-darken linear both; animation-timeline: --hero; animation-range: exit 10% exit 100%;
    }

    .fx-reveal .reveal { animation: reveal-in ease-out both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  }
}

/* ---------- Startseite: Ankündigung ---------- */
.announce { position: relative; z-index: 2; margin-top: clamp(-56px, -4vw, -24px); }
.announce__grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .announce__grid { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 24px; align-items: stretch; }
  .announce__grid--single { grid-template-columns: minmax(0, 1fr); max-width: 900px; }
}
.announce__card {
  background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: clamp(28px, 4vw, 52px);
}
.announce__card h1, .announce__card h2 { font-size: clamp(1.8rem, 1.1rem + 2.6vw, 3rem); font-weight: 900; letter-spacing: -.025em; }
.announce__card > :last-child { margin-bottom: 0; }

.facts {
  display: flex; flex-direction: column; gap: 20px;
  background: var(--c-ink); color: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: clamp(24px, 3vw, 36px);
}
.facts__list { margin: 0; display: grid; gap: 16px; }
.facts__item { display: grid; grid-template-columns: 22px 1fr; column-gap: 14px; align-items: start; }
.facts__item .icon { grid-row: span 2; width: 22px; height: 22px; color: var(--c-accent); margin-top: 2px; }
.facts__item dt { font: 700 .72rem/1.3 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--c-on-dark-muted); }
.facts__item dd { margin: 2px 0 0; font-weight: 600; font-size: 1.08rem; line-height: 1.35; }
.countdown {
  margin: 0; padding: 16px 0 0; border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: .95rem; color: var(--c-on-dark-muted);
}
.countdown strong { display: inline-block; margin-right: .1em; font: 900 2.6rem/1 var(--f-display); color: var(--c-accent); letter-spacing: -.02em; vertical-align: -.1em; }
.facts .btn, .facts__closed { margin-top: auto; }
.facts__closed {
  display: flex; align-items: center; justify-content: center; gap: .55em;
  margin-bottom: 0; padding: .85em 1.4em; border-radius: 999px;
  border: 2px dashed rgba(255, 255, 255, .28); color: var(--c-on-dark-muted);
  font-weight: 600; text-align: center;
}
.facts__closed .icon { color: var(--c-accent); }

/* ---------- Abschnitte ---------- */
.section { padding-block: var(--section-y); }
.section--tint { background: var(--c-surface); }
.section--dark { background: var(--c-ink); color: var(--c-on-dark-muted); }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark .eyebrow { color: var(--c-on-dark-muted); }
.section--dark a { color: #fff; }

.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); font-weight: 900; letter-spacing: -.03em; margin-bottom: .3em; }
.section-head .lead { margin: 0; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head--split { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.lead { font-size: clamp(1.08rem, 1rem + .4vw, 1.25rem); line-height: 1.55; color: var(--c-muted); }
.section--dark .lead { color: var(--c-on-dark-muted); }

/* ---------- Kacheln ---------- */
.cards { display: grid; gap: clamp(16px, 2vw, 28px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--c-surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-tint); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { display: flex; flex-direction: column; flex: 1; padding: clamp(20px, 2.4vw, 28px); }
.card__title { font-size: 1.6rem; font-weight: 900; letter-spacing: -.02em; margin-bottom: .4em; }
.card__link { color: inherit; text-decoration: none; }
.card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card__link:hover { text-decoration: none; }
.card__body p { color: var(--c-muted); }
.card__body .link-arrow { margin-top: auto; }

/* ---------- Veranstalter / Auszeichnungen ---------- */
.about { display: grid; gap: clamp(32px, 5vw, 64px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.about__item { display: grid; gap: 24px; align-content: start; }
.about__logo {
  display: grid; place-items: center; aspect-ratio: 16 / 7;
  padding: clamp(20px, 4vw, 44px);
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
}
.about__logo img { max-height: 130px; width: auto; max-width: 100%; object-fit: contain; }
.about__title { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); }
.about__text p { color: var(--c-muted); }

/* ---------- Sponsoren ---------- */
.sponsors { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); max-width: var(--container); margin-inline: auto; }
.sponsors__item a, .sponsors__item > img { display: grid; place-items: center; height: 100%; }
.sponsors__item {
  display: grid; place-items: center; min-height: 200px; padding: 28px 36px;
  background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.sponsors__item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.sponsors__item img { height: 130px; max-width: 100%; width: auto; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter .3s, opacity .3s; }
.sponsors__item:hover img { filter: none; opacity: 1; }

/* ---------- Fotogalerien ---------- */
.scroller-controls { display: flex; gap: 10px; color: #fff; flex: none; }
.gallery-track {
  --edge: max(var(--gutter), calc((100vw - var(--container)) / 2));
  list-style: none; margin: 0; padding: 4px var(--edge) 12px;
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(250px, 30vw, 380px); gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge);
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent;
}
.gallery-item { scroll-snap-align: start; }
.gallery-item a { position: relative; display: block; aspect-ratio: 3 / 2; border-radius: 14px; overflow: hidden; background: #000; color: #fff; text-decoration: none; }
.gallery-item__img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .3s; }
.gallery-item a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0) 55%); pointer-events: none; }
.gallery-item__year { position: absolute; left: 18px; bottom: 12px; z-index: 2; font: 900 2.2rem/1 var(--f-display); letter-spacing: -.02em; text-shadow: 0 2px 12px rgba(0, 0, 0, .4); }
.gallery-item__overlay {
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; padding: 18%;
  background: rgba(15, 29, 39, .55); opacity: 0; transition: opacity .3s;
}
.gallery-item__logo { max-height: 100%; max-width: 100%; width: auto; filter: drop-shadow(0 4px 16px rgba(0, 0, 0, .35)); transform: scale(.92); transition: transform .4s var(--ease); }
.gallery-item a:hover .gallery-item__img, .gallery-item a:focus-visible .gallery-item__img { transform: scale(1.06); }
.gallery-item a:hover .gallery-item__overlay, .gallery-item a:focus-visible .gallery-item__overlay { opacity: 1; }
.gallery-item a:hover .gallery-item__logo { transform: none; }

/* ---------- Unterseiten ---------- */
.page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: flex-end;
  min-height: clamp(180px, 22vw, 260px);
  padding-block: clamp(40px, 6vw, 72px) clamp(28px, 4vw, 48px);
  background: var(--c-ink); color: #fff;
}
.page-hero::before { /* dezente Pistenlinien */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .07;
  background: repeating-linear-gradient(-28deg, #fff 0 1px, transparent 1px 22px);
}
.page-hero--image { min-height: clamp(280px, 40vw, 500px); }
.page-hero--image::before { opacity: 1; background: linear-gradient(to top, rgba(10, 20, 28, .88) 0%, rgba(10, 20, 28, .35) 45%, rgba(10, 20, 28, .1) 100%); z-index: -1; }
.page-hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.page-hero__inner { position: relative; max-width: calc(var(--measure) + 2 * var(--gutter)); }
.page-hero--wide .page-hero__inner { max-width: calc(var(--container) + 2 * var(--gutter)); }
.page-hero__title { color: #fff; margin: 0; font-size: clamp(2.2rem, 1.2rem + 4vw, 4.25rem); font-weight: 900; letter-spacing: -.03em; max-width: 18ch; }
.page-hero__lead { margin: .8em 0 0; max-width: 60ch; font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); color: var(--c-on-dark-muted); }
.page-hero .eyebrow { color: var(--c-on-dark-muted); }
.page-hero--error .page-hero__title { max-width: 22ch; }

.page-body { padding-block: clamp(40px, 6vw, 80px) var(--section-y); }

/* ---------- Fließtext ---------- */
.prose { max-width: var(--measure); }
.page-body > .prose { margin-inline: auto; }
.prose--wide { max-width: none; }
.prose > :first-child { margin-top: 0; }
.prose h1 { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.6rem); font-weight: 900; margin-top: 1.2em; }
.prose h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin-top: 1.6em; }
.prose h3 { font-size: 1.35rem; margin-top: 1.5em; }
.prose h4 { font-size: 1.1rem; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--c-brand); }
.prose ul li::marker { content: "▸  "; font-size: .85em; }
.prose img { height: auto; border-radius: var(--radius-sm); margin-block: 1.2em; }
.prose blockquote { margin: 1.5em 0; padding: .4em 0 .4em 1.2em; border-left: 4px solid var(--c-accent); font-size: 1.15rem; color: var(--c-muted); }
.prose hr { border: 0; height: 1px; background: var(--c-line); margin: 2.5em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .97rem; background: var(--c-surface); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
.prose th, .prose td { text-align: left; padding: .8em 1em; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.prose th { background: var(--c-ink); color: #fff; font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }
.prose code { font-size: .9em; background: var(--c-tint); padding: .1em .35em; border-radius: 5px; }
.prose a[href^="http"]:not([href*="telemarkfest.de"]):not(:has(img))::after { content: " ↗"; font-size: .85em; }
.prose .btn::after, .prose .tmf-text-cta::after { content: none !important; }

/* Aufklappbare Abschnitte (<details>) – im Inhalt für Tage, Pakete, Workshops genutzt */
.prose details {
  margin: 0 0 14px !important;
  background: var(--c-surface); border-radius: 14px; box-shadow: var(--shadow);
  overflow: hidden;
}
.prose summary {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 22px !important; cursor: pointer; list-style: none;
}
.prose summary::-webkit-details-marker { display: none; }
.prose summary::after {
  content: ""; flex: none; margin-left: auto; width: 30px; height: 30px; border-radius: 50%;
  background: var(--c-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%230f1d27' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
  transition: transform .25s var(--ease), background-color .2s;
}
.prose details[open] > summary::after { transform: rotate(180deg); background-color: var(--c-accent); }
.prose summary:hover::after { background-color: color-mix(in srgb, var(--c-accent) 60%, white); }
.prose summary > h1, .prose summary > h2, .prose summary > h3, .prose summary > h4 { margin: 0; font-size: 1.25rem; }
.prose details > div:not(.alert) { padding: 0 22px 6px !important; }
.prose details > .alert { margin: 0 22px 18px; }
.prose details[open] > summary { border-bottom: 1px solid var(--c-line); margin-bottom: 18px; }

/* ---------- Pakete (Template „pakete“) ---------- */
.packages { margin: 2.2em 0; }
.packages__title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin: 0 0 .8em; }
.packages__grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.pkg {
  position: relative; display: flex; flex-direction: column;
  padding: 30px 26px 26px; background: var(--c-surface);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.pkg::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--c-accent); }
.pkg--plain::before { background: var(--c-line); }
.pkg__badge {
  position: absolute; top: 20px; right: 20px;
  padding: .4em .8em; border-radius: 999px; background: var(--c-ink); color: #fff;
  font: 700 .7rem/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase;
}
.prose .pkg__days { margin: 0 0 10px; font: 700 .72rem/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--c-muted); }
.prose .pkg__name { margin: 0; font-size: 1.55rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.1; }
.prose .pkg__dates { margin: 6px 0 0; font-size: .93rem; color: var(--c-muted); }
.prose .pkg__price { margin: 16px 0 0; font: 900 2.5rem/1 var(--f-display); letter-spacing: -.03em; color: var(--c-ink); }
.pkg__text { margin-top: 16px; }
.pkg__text > :last-child { margin-bottom: 0; }
.prose .pkg__features { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 9px; font-size: .97rem; line-height: 1.45; }
.prose .pkg__features li { position: relative; margin: 0; padding-left: 28px; }
.prose .pkg__features li::marker { content: none; }
.prose .pkg__features li::before {
  content: ""; position: absolute; left: 0; top: .12em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--c-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12l4 4 8-8' fill='none' stroke='%231d1704' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.pkg__pricelist { margin: 20px 0 0; display: grid; gap: 0; }
.pkg__pricelist > div { display: flex; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--c-line); }
.pkg__pricelist > div:last-child { border-bottom: 0; }
.pkg__pricelist dt { flex: 1; font-size: .97rem; line-height: 1.4; }
.pkg__pricelist dd { margin: 0; font: 800 1.15rem/1 var(--f-display); white-space: nowrap; }
.prose .pkg__note {
  display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; padding: 12px 14px;
  border-radius: 12px; background: color-mix(in srgb, var(--c-brand) 8%, white); font-size: .92rem; line-height: 1.45;
}
.pkg__note .icon { color: var(--c-brand); margin-top: .1em; }
.pkg__action { margin-top: auto; padding-top: 24px; }
.pkg__action .reg-closed { margin: 0; }

/* Anmelde-Hinweis, wenn die Anmeldung geschlossen ist */
.reg-closed {
  display: flex; align-items: center; justify-content: center; gap: .55em;
  margin: 0; padding: .8em 1.3em; border-radius: 999px;
  border: 2px dashed var(--c-line); color: var(--c-muted);
  font-weight: 600; font-size: .95rem; text-align: center;
}
.reg-closed .icon { color: color-mix(in srgb, var(--c-accent) 70%, black); }

/* Anmeldebox unter den Paketen */
.reg-box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px;
  margin-top: 24px; padding: clamp(22px, 3vw, 32px);
  border-radius: var(--radius); background: var(--c-ink); color: var(--c-on-dark-muted);
}
.reg-box__text { flex: 1 1 320px; }
.prose .reg-box h3 { margin: 0 0 .3em; color: #fff; font-size: 1.35rem; }
.reg-box p { margin: 0 0 .6em; } .reg-box p:last-child { margin: 0; }
.prose .reg-box a:not(.btn) { color: #fff; }
.reg-box__action { flex: none; }
.reg-box .reg-closed, .reg-closed.reg--on-dark { border-color: rgba(255, 255, 255, .28); color: var(--c-on-dark-muted); }
.reg-box .reg-closed .icon, .reg-closed.reg--on-dark .icon { color: var(--c-accent); }

/* ---------- Programm (Template „programm“) ---------- */
.timeline-wrap { margin: 2.2em 0; }
.prose .timeline { list-style: none; margin: 0; padding: 0; }
.prose .timeline > li::marker { content: none; }
.day { position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 22px; margin: 0 !important; padding-bottom: 22px; }
.day::before { content: ""; position: absolute; left: 41px; top: 84px; bottom: 0; width: 2px; background: var(--c-line); }
.day:last-child { padding-bottom: 0; }
.day:last-child::before { display: none; }
.day__date {
  position: sticky; top: calc(var(--header-h) + 16px);
  width: 84px; height: 84px; border-radius: 18px;
  display: grid; place-content: center; text-align: center; line-height: 1;
  background: var(--c-ink); color: #fff;
}
.day__date small { margin-bottom: 4px; font: 700 .68rem/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--c-accent); }
.day__date b { font: 900 1.95rem/1 var(--f-display); letter-spacing: -.02em; }
.day__date span:not(.sr-only) { margin-top: 3px; font-size: .75rem; color: rgba(255, 255, 255, .7); }
.day__date--empty { color: var(--c-accent); }
.day--highlight .day__date { background: var(--c-accent); color: var(--c-accent-ink); }
.day--highlight .day__date small, .day--highlight .day__date span:not(.sr-only) { color: var(--c-accent-ink); }
.day__card { padding: 22px 26px; background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.prose .day__title { margin: 0 0 4px; font-size: 1.35rem; }
.prose .day__hours { display: flex; gap: 7px; align-items: flex-start; margin: 0 0 14px; font-size: .93rem; color: var(--c-muted); line-height: 1.4; }
.day__hours .icon { width: 16px; height: 16px; margin-top: .1em; }
.day__text > :last-child { margin-bottom: 0; }
.day__card .alert { margin: 16px 0 0; }

@media (max-width: 640px) {
  .pkg { padding: 26px 20px 20px; }
  .day { grid-template-columns: minmax(0, 1fr); gap: 0; padding-bottom: 18px; }
  .day::before { display: none; }
  .day__date {
    position: relative; top: auto; z-index: 1; justify-self: start;
    width: auto; height: auto; margin: 0 0 -14px 14px;
    display: inline-flex; align-items: baseline; gap: 6px;
    padding: 8px 14px; border-radius: 999px;
  }
  .day__date small { margin: 0; }
  .day__date b { font-size: 1.15rem; }
  .day__date span:not(.sr-only) { margin: 0; font-size: .85rem; }
  .day__card { padding: 26px 18px 18px; }
  .alert { padding: 14px 16px 14px 46px; }
  .alert::before { left: 14px; top: 16px; width: 22px; height: 22px; }
  .reg-box__action, .reg-box__action .btn, .reg-box__action .reg-closed { width: 100%; }
}
@media print {
  .day__date { position: static; }
  .pkg, .day__card { box-shadow: none; border: 1px solid #ccc; }
}

/* ---------- Formulare (Grav Form-Plugin) ---------- */
.form-card, form.tmf-form { margin: 1.5em 0; padding: clamp(20px, 3vw, 40px); background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.prose > form, .prose > .form-wrapper > form { margin: 1.5em 0; padding: clamp(20px, 3vw, 40px); background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-card form { margin: 0; padding: 0; background: none; box-shadow: none; }
.form-card > :last-child, .form-card form > :last-child { margin-bottom: 0; }
.form-field .form-input-wrapper, .form-field .form-textarea-wrapper, .form-field .form-select-wrapper { width: 100%; }
.form-field { margin-bottom: 20px; }
.form-label label, .form-field > label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .95rem; }
.form-label .required, .form-field .required { color: #b3261e; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"], input[type="url"], input[type="password"], select, textarea {
  width: 100%; padding: .8em 1em;
  font: inherit; color: var(--c-ink);
  background: var(--c-paper); border: 1.5px solid var(--c-line); border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
input:focus, select:focus, textarea:focus { outline: none; background: #fff; border-color: var(--c-brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-brand) 18%, transparent); }
textarea { min-height: 140px; resize: vertical; }
.form-description { display: block; margin-top: 6px; font-size: .9rem; color: var(--c-muted); }
.form-message, .form-errors { color: #b3261e; font-size: .92rem; margin: 6px 0 0; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.button, button.button {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .85em 1.5em; border: 2px solid var(--c-ink); border-radius: 999px;
  background: var(--c-ink); color: #fff; font: 600 1rem/1.1 var(--f-body); cursor: pointer;
  transition: background-color .2s, color .2s;
}
.button:hover { background: transparent; color: var(--c-ink); }
.buttons .button[type="reset"] { background: transparent; color: var(--c-ink); }
.buttons .button[type="reset"]:hover { background: var(--c-tint); }
.notices { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 1em; background: var(--c-tint); border-left: 4px solid var(--c-brand); }
.notices.green, .notices.success { border-color: #2e7d32; background: #edf7ee; }
.notices.red, .notices.error { border-color: #b3261e; background: #fbeeed; }

/* ---------- Fußzeile ---------- */
.site-footer { background: var(--c-ink); color: var(--c-on-dark-muted); padding-top: clamp(48px, 6vw, 80px); font-size: .97rem; }
.section--dark + .site-footer { border-top: 1px solid rgba(255, 255, 255, .1); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--c-accent); }
.site-footer__grid { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .site-footer__grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, .8fr); } }
.site-footer__logo { display: inline-block; margin-bottom: 18px; }
.site-footer__logo img { width: 220px; }
.site-footer__org p { max-width: 38ch; }
.site-footer__title { font: 700 .75rem/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--c-accent); margin-bottom: 18px; }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer__links a { color: var(--c-on-dark-muted); }
.site-footer__links a:hover { color: #fff; }
.site-footer .btn--light { color: #fff; }
.site-footer .btn--light:hover { color: var(--c-ink); }
.social { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.social a { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .08); transition: background-color .2s, color .2s; }
.social a:hover { background: var(--c-accent); color: var(--c-accent-ink); }
.social .icon { width: 20px; height: 20px; }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: clamp(40px, 5vw, 64px); padding-block: 22px;
  border-top: 1px solid rgba(255, 255, 255, .1); font-size: .88rem;
}
.site-footer__bottom p { margin: 0; }
.to-top { display: inline-flex; align-items: center; gap: .4em; }

/* ---------- Kleinere Bildschirme ---------- */
@media (max-width: 640px) {
  .section-head--split { flex-direction: column; align-items: flex-start; }
  .scroller-controls { display: none; }
  .gallery-track { grid-auto-columns: 78vw; }
  .gallery-item__overlay { display: none; }
}

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Druck ---------- */
@media print {
  .site-header, .site-footer, .hero, .scroller-controls, .nav-toggle { display: none !important; }
  .page-hero { background: none; color: #000; min-height: 0; padding: 0 0 1em; }
  .page-hero__img, .page-hero::before { display: none; }
  .page-hero__title { color: #000; }
  .prose details { box-shadow: none; border: 1px solid #ccc; }
}
