/* ==========================================================================
   Freizeitraum Cham — Stylesheet
   Einfaches, modernes HTML5/CSS-Setup. Keine Frameworks, keine Build-Tools.
   ========================================================================== */

/* --- 1. Design-Tokens ---------------------------------------------------- */
:root {
  /* Farben */
  --c-ink:        #1d2321;
  --c-ink-soft:   #4a5350;
  --c-ink-mute:   #77807d;
  --c-line:       #e3e6e4;
  --c-bg:         #ffffff;
  --c-bg-soft:    #f6f5f1;
  --c-bg-deep:    #1d2321;
  --c-accent:     #6b8f71;
  --c-accent-dark:#4f6f55;
  --c-accent-soft:#e8efe9;
  --c-warm:       #c9855b;

  /* Typografie */
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Masse */
  --wrap:      1140px;
  --wrap-text: 720px;
  --gap:       clamp(1.5rem, 4vw, 3rem);
  --section-y: clamp(3.5rem, 9vw, 7rem);
  --radius:    14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(29,35,33,.06), 0 4px 12px rgba(29,35,33,.05);
  --shadow-md: 0 4px 10px rgba(29,35,33,.07), 0 18px 40px rgba(29,35,33,.09);
}

/* --- 2. Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  line-height: 1.7;
  color: var(--c-ink-soft);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img, picture, video { max-width: 100%; height: auto; display: block; }
a { color: var(--c-accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--c-ink); }

/* --- 3. Typografie ------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--c-ink);
  line-height: 1.18;
  letter-spacing: -.015em;
  margin: 0 0 .6em;
  font-weight: 650;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.9vw, 2.35rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + .7vw, 1.45rem); }
p, ul, ol { margin: 0 0 1.15em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: .4em; }
strong { color: var(--c-ink); font-weight: 620; }
.lead { font-size: 1.16em; color: var(--c-ink-soft); }
.eyebrow {
  display: inline-block; margin-bottom: 1rem;
  font-size: .78rem; font-weight: 650; letter-spacing: .12em;
  text-transform: uppercase; color: var(--c-accent-dark);
}

/* --- 4. Layout ----------------------------------------------------------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap--text { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
/* Fliesstext auf angenehme Zeilenlänge begrenzen, aber links am Raster ausrichten */
.wrap--text > * { max-width: var(--wrap-text); }
.wrap--text.center > *, .center .wrap--text > *, .cta .wrap--text > * { margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section--soft { background: var(--c-bg-soft); }
.section--tight { padding-block: calc(var(--section-y) * .6); }
.grid { display: grid; gap: var(--gap); }
@media (min-width: 700px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 950px)  { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
.split { display: grid; gap: var(--gap); align-items: center; }
@media (min-width: 850px) { .split { grid-template-columns: 1fr 1fr; } }
.split--top { align-items: start; }

/* --- 5. Header & Navigation ---------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--c-line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 74px;
}
.brand {
  display: inline-flex; align-items: baseline; gap: .5rem;
  font-family: var(--font-head); font-size: 1.22rem; font-weight: 680;
  color: var(--c-ink); text-decoration: none; letter-spacing: -.02em;
}
.brand span { color: var(--c-accent); font-weight: 500; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--c-line); border-radius: 10px;
  padding: .55rem .8rem; font: inherit; font-size: .9rem; color: var(--c-ink);
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--c-accent); }

.nav ul {
  list-style: none; display: flex; flex-wrap: wrap;
  gap: .35rem; margin: 0; padding: 0;
}
.nav a {
  display: block; padding: .5rem .8rem; border-radius: 9px;
  font-size: .95rem; font-weight: 520; color: var(--c-ink-soft);
  text-decoration: none; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--c-bg-soft); color: var(--c-ink); }
.nav a[aria-current="page"] { color: var(--c-ink); background: var(--c-accent-soft); }

@media (max-width: 900px) {
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--c-bg); border-bottom: 1px solid var(--c-line);
    box-shadow: var(--shadow-sm); padding: .75rem 0 1.25rem;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; gap: 0; }
  .nav a { padding: .7rem .9rem; border-bottom: 1px solid var(--c-line); border-radius: 0; }
}
@media (min-width: 901px) { .nav-toggle { display: none; } }

/* --- 6. Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.5rem; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: .98rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s, color .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--c-accent); color: #fff; }
.btn--primary:hover { background: var(--c-accent-dark); color: #fff; }
.btn--ghost { border-color: var(--c-line); color: var(--c-ink); background: #fff; }
.btn--ghost:hover { border-color: var(--c-accent); color: var(--c-ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* --- 7. Hero ------------------------------------------------------------- */
.hero { padding-block: clamp(3rem, 7vw, 5.5rem); background: var(--c-bg-soft); }
.hero__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.hero h1 { margin-bottom: .5em; }

/* --- 8. Karten ----------------------------------------------------------- */
.card {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent; }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card__body { padding: 1.4rem 1.5rem 1.6rem; flex: 1; display: flex; flex-direction: column; }
.card__body h3 { margin-bottom: .4em; }
.card__body p { font-size: .96rem; }
.card__link { margin-top: auto; font-weight: 600; font-size: .95rem; text-decoration: none; }
.card__link::after { content: " →"; }

/* --- 9. Faktenliste / Definitionen --------------------------------------- */
.facts { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .1rem; }
.facts li {
  display: flex; flex-wrap: wrap; gap: .35rem 1rem;
  padding: .75rem 0; border-bottom: 1px solid var(--c-line); margin: 0;
}
.facts strong { flex: 0 0 10rem; }

/* --- 10. Bildergalerie --------------------------------------------------- */
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.gallery img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* --- 11. Call-to-Action -------------------------------------------------- */
.cta { background: var(--c-bg-deep); color: #ccd5d1; text-align: center; }
.cta p, .cta .lead { color: #ccd5d1; }
.cta h2, .cta strong { color: #fff; }
.cta .btn--ghost { background: transparent; border-color: rgba(255,255,255,.3); color: #fff; }
.cta .btn--ghost:hover { border-color: #fff; }
.cta .btn-row { justify-content: center; }

/* --- 12. Footer ---------------------------------------------------------- */
.site-footer {
  background: var(--c-bg-deep); color: #9aa5a0;
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; font-size: .94rem;
}
.site-footer a { color: #d7dcd9; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: .9em; }
.site-footer ul { list-style: none; padding: 0; }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  font-size: .88rem;
}

/* --- 13. Hilfsklassen ---------------------------------------------------- */
.center { text-align: center; }
.center .btn-row, .btn-row.center { justify-content: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute; 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: -9999px; top: 0; z-index: 100;
  background: var(--c-ink); color: #fff; padding: .75rem 1.25rem;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }

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

/* --- 14. Video-Einbettung ------------------------------------------------ */
.video {
  position: relative; aspect-ratio: 16 / 9; margin: 1.5rem 0;
  border-radius: var(--radius); overflow: hidden; background: var(--c-bg-deep);
  box-shadow: var(--shadow-sm);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --- 15. Abstände in Fliesstext-Bereichen -------------------------------- */
.section .wrap > h2:not(:first-child),
.section .wrap > h3:not(:first-child),
.section .wrap > * > h2:not(:first-child),
.section .wrap > * > h3:not(:first-child) { margin-top: 2.2em; }
.section .wrap .eyebrow + h1,
.section .wrap .eyebrow + h2,
.section .wrap .eyebrow + h3,
.eyebrow + h1, .eyebrow + h2, .eyebrow + h3 { margin-top: 0; }
.card__body h3, .grid > div > h3:first-child { margin-top: 0; }

/* --- 16. Formular-Einbettung (Formaloo) ---------------------------------- */
.form-embed {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.form-embed iframe { display: block; width: 100%; height: 780px; border: 0; }
@media (max-width: 700px) { .form-embed iframe { height: 940px; } }
.form-fallback { margin-top: 1rem; font-size: .92rem; color: var(--c-ink-mute); }

/* --- 17. Raumbelegungsplan (.rb-*) -------------------------------------
   Wird vom externen Script shrew.ch/tl/script/js/raumbelegung.js erzeugt.
   Nur die tatsächlich benötigten Regeln, auf das Design dieser Seite
   umgestellt (Schrift, Farben und Radien kommen aus :root oben).
   -------------------------------------------------------------------- */
.belegungsplaene { display: grid; gap: clamp(2rem, 4vw, 3rem); }

.rb-container {
  font-family: var(--font-body);
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.rb-titel {
  font-family: var(--font-head);
  font-size: clamp(1.15rem, 1.05rem + .5vw, 1.35rem);
  font-weight: 650;
  letter-spacing: -.01em;
  color: var(--c-ink);
  margin: 0 0 .9rem;
}

.rb-scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.rb-raster { display: flex; min-width: 860px; }

/* Zeitachse: um die Höhe der Tages-Kopfzeile nach unten versetzt,
   damit die Uhrzeiten exakt auf den Stundenlinien sitzen. */
.rb-zeitachse {
  position: sticky;   /* bleibt beim horizontalen Scrollen stehen */
  left: 0;
  width: 58px;
  flex-shrink: 0;
  margin-top: 40px;   /* Höhe der Tages-Kopfzeile */
  background: #fff;
  border-right: 1px solid var(--c-line);
  z-index: 2;
}
.rb-zeit-label {
  position: absolute; left: 0; right: 8px;
  text-align: right;
  font-size: .68rem;
  font-variant-numeric: tabular-nums;
  color: var(--c-ink-mute);
  transform: translateY(-50%);
}

.rb-tage-wrapper { display: flex; flex: 1; }
.rb-tag-spalte { flex: 1; min-width: 104px; border-right: 1px solid #f0f2f1; }
.rb-tag-spalte:last-child { border-right: none; }

.rb-tag-kopf {
  height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-bg-deep);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 620;
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 0 4px;
}

.rb-tag-koerper { position: relative; }
.rb-stundenlinie { position: absolute; left: 0; right: 0; border-top: 1px solid #f2f4f3; }

.rb-block {
  position: absolute;
  left: 3px; right: 3px;
  background: var(--c-accent);
  color: #fff;
  border-radius: 5px;
  padding: 3px 7px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(29,35,33,.18);
}
.rb-block-name { font-weight: 620; font-size: .7rem; line-height: 1.25; }
.rb-block-zeit { font-size: .65rem; opacity: .88; font-variant-numeric: tabular-nums; }

.rb-leer-hinweis, .rb-lade-hinweis, .rb-fehler {
  font-style: italic; color: var(--c-ink-mute); margin: 0;
}

/* --- 18. Tarife ---------------------------------------------------------- */
.tarif {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 1.75rem 1.6rem 1.8rem;
  display: flex;
  flex-direction: column;
}
.tarif h3 { margin: 0 0 1rem; font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; }
.tarif__preis {
  margin: 0 0 1.25rem;
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem);
  font-weight: 660;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--c-accent-dark);
}
.tarif__preis span {
  display: block;
  margin-top: .45rem;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--c-ink-mute);
}
.tarif__zeiten {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 1rem 0 0;
  border-top: 1px solid var(--c-line);
  font-size: .95rem;
}
.tarif__zeiten li { margin-bottom: .5rem; }
.tarif__zeiten strong { display: block; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-mute); font-weight: 620; }
.tarif__regulaer { margin: 0 0 .8rem; font-size: .92rem; }
.tarif__rabatt {
  margin: auto 0 0;
  padding: .85rem 1rem;
  background: var(--c-accent-soft);
  border-radius: 9px;
  font-size: .88rem;
  color: var(--c-ink-soft);
}
.tarife__fussnote { margin: 2rem 0 0; font-size: .9rem; color: var(--c-ink-mute); text-align: center; }
