*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, figure, blockquote, ul { margin: 0; }
ul { padding: 0; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
a { color: inherit; }

body {
  min-width: 320px;
  background: var(--fl-surface);
  color: var(--fl-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

main { display: block; }

.container {
  width: min(calc(100% - (var(--gutter) * 2)), var(--container));
  margin-inline: auto;
}

.container--narrow {
  width: min(calc(100% - (var(--gutter) * 2)), var(--container-narrow));
  margin-inline: auto;
}

.section { padding-block: var(--section-space); }
.section--cream { background: var(--fl-cream); }
.section--green-soft { background: color-mix(in srgb, var(--fl-green-light) 34%, var(--fl-white)); }
.section--purple { background: var(--fl-purple-dark); color: var(--fl-cream); }

.eyebrow {
  margin-bottom: 14px;
  font-family: var(--font-accent);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fl-purple-dark);
}
.section--purple .eyebrow { color: var(--fl-green-light); }

.display {
  font-family: var(--font-display);
  font-size: clamp(42px, 4.2vw, 68px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  font-weight: 400;
}

.h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.3vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.028em;
  font-weight: 400;
}

.h3 {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.1vw, 30px);
  line-height: 1.08;
  letter-spacing: -0.018em;
  font-weight: 400;
}

.lead {
  max-width: 680px;
  color: var(--fl-ink-soft);
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.65;
}

.section--purple .lead { color: rgba(245, 241, 197, 0.84); }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  transform: translateY(-150%);
  padding: 10px 14px;
  background: var(--fl-purple-dark);
  color: var(--fl-white);
  border-radius: 10px;
}
.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 3px solid var(--fl-purple);
  outline-offset: 4px;
}

@media (max-width: 768px) {
  body { font-size: 16px; }
  .display { font-size: clamp(42px, 12vw, 60px); }
  .h2 { font-size: clamp(34px, 9vw, 48px); }
}

/* F1.4 responsive + accessibility hardening */
html { scroll-padding-top: calc(var(--nav-height) + 18px); }
[id] { scroll-margin-top: calc(var(--nav-height) + 18px); }
.display, .h2, .h3 { text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
p, blockquote { text-wrap: pretty; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
@supports not (color: color-mix(in srgb, white 50%, black)) {
  .section--green-soft { background: #E6EDD9; }
}


/* F1.5 overflow and narrow-device safety */
html, body { max-width: 100%; }
main, section, footer, header { min-width: 0; }
pre, code { overflow-wrap: anywhere; }
@media (max-width: 340px) {
  :root { --gutter: 14px; --section-space: 56px; }
  body { min-width: 0; }
  .display { font-size: clamp(38px, 13vw, 52px); }
  .h2 { font-size: clamp(32px, 10vw, 44px); }
}

/* R8L · route-scoped mobile compound protection. */
@media (max-width: 560px) {
  body.xp-page-termine .termine-page-hero .page-hero__copy .display,
  body.xp-page-event .event-v2-hero__copy .display {
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }
  body.xp-page-termine .termine-page-hero .page-hero__copy .display {
    font-size: clamp(32px, 9.2vw, 46px);
  }
  body.xp-page-event .event-v2-hero__copy .display {
    font-size: clamp(30px, 8.8vw, 44px) !important;
  }
}
