/* =========================================================
   TSG SALACH - STARTSEITE 1.0.0
   „Entdecke die TSG“ und „Aktuelles & Termine“ unter dem Hero.
   Wird nur auf der Startseite geladen (index.php), gilt fuer beide Hero-Varianten.
   Alle Regeln haengen an .hl-landing, Unterseiten sind nicht betroffen.
   Farben aus dem Design System (tokens.json, hell), Schriften Clash Display und Switzer.
   ========================================================= */

@font-face { font-family: "Clash Display"; src: url("fonts/ClashDisplay-Semibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("fonts/Switzer-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("fonts/Switzer-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

.hl-landing {
  --hl-ink: #0b1d2b;
  --hl-muted: #4a5b6b;
  --hl-brand: #0f6bb4;
  --hl-brand-deep: #0a4a7f;
  --hl-border: #d3dee8;
  --hl-tint: #e3effa;
  --hl-sunken: #e9f0f6;
  --hl-display: "Clash Display", "Archivo", "Segoe UI", sans-serif;
  --hl-sans: "Switzer", "Work Sans", "Segoe UI", sans-serif;
  --hl-ease: cubic-bezier(.16, 0, .13, 1);
  color: var(--hl-ink);
  font-family: var(--hl-sans);
  /* page-shell hat 55px Abstand oben; der erste Bereich beginnt direkt darunter */
  margin-top: -15px;
}
.hl-landing h2, .hl-landing h3, .hl-landing p { margin: 0; }
.hl-landing a { color: inherit; text-decoration: none; }
.hl-landing a:focus-visible { outline: 2px solid var(--hl-brand-deep); outline-offset: 4px; border-radius: 4px; }

.hl-section {
  padding-block: clamp(40px, 6vw, 72px);
  border-bottom: 1px solid var(--hl-border);
}
.hl-section:first-child { padding-top: 0; }
.hl-title {
  margin-bottom: clamp(24px, 3vw, 40px) !important;
  font-family: var(--hl-display);
  font-weight: 600;
  font-size: clamp(2rem, 1.3rem + 2.4vw, 3rem);
  line-height: 1.04;
  letter-spacing: -.01em;
  color: var(--hl-ink);
}
.hl-title span { color: var(--hl-brand); }

/* ---------- Entdecke die TSG: drei gleichwertige Einstiege ---------- */
.hl-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hl-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 8px clamp(20px, 2.6vw, 36px) 12px;
  border-radius: 6px;
  transition: color .3s var(--hl-ease), transform .3s var(--hl-ease);
}
.hl-tile:first-child { padding-left: 0; }
.hl-tile:last-child { padding-right: 0; }
.hl-tile + .hl-tile { border-left: 1px solid var(--hl-border); }
.hl-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  fill: none;
  stroke: var(--hl-brand);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hl-tile h3 {
  margin-bottom: 10px;
  font-family: var(--hl-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 1.1rem + .6vw, 1.55rem);
  line-height: 1.15;
  color: inherit;
  transition: color .3s var(--hl-ease);
}
.hl-tile p { max-width: 22rem; font-size: 1rem; line-height: 1.6; color: var(--hl-muted); }
.hl-arrow {
  margin-top: auto;
  padding-top: 14px;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--hl-brand);
  transition: transform .3s var(--hl-ease);
}
.hl-tile:hover { transform: translateY(-3px); }
.hl-tile:hover h3 { color: var(--hl-brand); }
.hl-tile:hover .hl-arrow { transform: translateX(6px); }

/* ---------- Aktuelles & Termine: ca. 75 % News, 25 % Termine ---------- */
.hl-updates { border-bottom: 0; }
.hl-updates-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr);
  gap: clamp(24px, 3vw, 40px);
}
.hl-news-col { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.hl-news-list {
  align-self: stretch;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 24px);
}
.hl-news { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hl-news-media {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 6px;
  background: var(--hl-sunken);
}
.hl-news-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s var(--hl-ease);
}
.hl-news-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  font-family: var(--hl-display);
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--hl-brand);
  background: var(--hl-tint);
}
.hl-news-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .8125rem; line-height: 1.4; color: var(--hl-muted); }
.hl-news-meta > span { font-weight: 500; color: var(--hl-brand); }
.hl-news h3 {
  font-family: var(--hl-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 1.05rem + .35vw, 1.35rem);
  line-height: 1.2;
  color: var(--hl-ink);
  overflow-wrap: break-word;
  hyphens: auto;
  transition: color .3s var(--hl-ease);
}
.hl-news p { font-size: .9375rem; line-height: 1.55; color: var(--hl-muted); }
.hl-news-more { margin-top: auto; padding-top: 4px; font-weight: 500; font-size: .9375rem; color: var(--hl-brand); }
.hl-news-more span { display: inline-block; transition: transform .3s var(--hl-ease); }
.hl-news:hover .hl-news-media img { transform: scale(1.05); }
.hl-news:hover h3 { color: var(--hl-brand); }
.hl-news:hover .hl-news-more span { transform: translateX(4px); }

.hl-more {
  display: inline-flex;
  gap: 8px;
  margin-top: 28px;
  padding-bottom: 2px;
  font-weight: 500;
  color: var(--hl-ink) !important;
  border-bottom: 1px solid var(--hl-brand);
  transition: color .3s var(--hl-ease), border-color .3s var(--hl-ease);
}
.hl-more span { color: var(--hl-brand); transition: transform .3s var(--hl-ease); }
.hl-more:hover { color: var(--hl-brand) !important; }
.hl-more:hover span { transform: translateX(4px); }

.hl-events { min-width: 0; padding-left: clamp(20px, 2.4vw, 32px); border-left: 1px solid var(--hl-border); }
.hl-events h3 {
  margin-bottom: 8px;
  font-family: var(--hl-display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.15;
  color: var(--hl-ink);
}
.hl-event-list { list-style: none; margin: 0; padding: 0; }
.hl-event {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--hl-border);
  transition: color .3s var(--hl-ease);
}
.hl-event-date {
  flex: 0 0 64px;
  font-family: var(--hl-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--hl-brand);
}
.hl-event-date span { display: block; font-size: 1.35rem; }
.hl-event-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.hl-event-body strong { font-weight: 500; line-height: 1.35; transition: color .3s var(--hl-ease); }
.hl-event-body span { font-size: .875rem; line-height: 1.4; color: var(--hl-muted); }
.hl-event:hover strong { color: var(--hl-brand); }

.hl-empty { max-width: 40rem; padding: 18px 20px; border-radius: 6px; font-size: .9375rem; color: var(--hl-muted); background: var(--hl-sunken); }
.hl-events .hl-empty { margin-top: 12px; }

/* ---------- Einblenden beim Scrollen (wie Baukasten motion.js: 500 ms, 70 ms Versatz) ----------
   home-landing.js setzt .hl-reveal.is-pre nur auf Elemente unterhalb des Bildschirms.
   Ohne Skript und bei „Bewegung reduzieren“ ist alles sofort sichtbar. */
@media (prefers-reduced-motion: no-preference) {
  .hl-landing .hl-reveal:not(.is-pre) {
    transition: opacity .5s var(--hl-ease), transform .5s var(--hl-ease);
    transition-delay: calc(var(--hl-i, 0) * 70ms);
  }
  .hl-landing .hl-reveal.is-pre { opacity: 0; transform: translateY(16px); }
}
@media (prefers-reduced-motion: reduce) {
  .hl-landing *, .hl-landing *::before, .hl-landing *::after { transition: none !important; }
  .hl-tile:hover, .hl-tile:hover .hl-arrow, .hl-news:hover .hl-news-media img, .hl-news:hover .hl-news-more span, .hl-more:hover span { transform: none; }
}
@media print { .hl-landing .hl-reveal.is-pre { opacity: 1; transform: none; } }

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  .hl-updates-grid { grid-template-columns: minmax(0, 1fr); }
  .hl-events { padding: 28px 0 0; border-left: 0; border-top: 1px solid var(--hl-border); }
}

/* ---------- Smartphone ---------- */
@media (max-width: 760px) {
  .hl-landing { margin-top: -6px; }
  .hl-tiles { grid-template-columns: minmax(0, 1fr); }
  .hl-tile, .hl-tile:first-child, .hl-tile:last-child { padding: 22px 0; }
  .hl-tile:first-child { padding-top: 0; }
  .hl-tile + .hl-tile { border-left: 0; border-top: 1px solid var(--hl-border); }
  .hl-news-list { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
