/* ==========================================================================
   Städtlifest Sargans 2027 – gemeinsames Design für alle Seiten
   Seitenspezifisches CSS steht im <style>-Block der jeweiligen Seite.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #C8102E;          /* Festrot aus dem Logo */
  --red-deep: #8E0B20;
  --red-text: #F04A5E;     /* Rot für kleine Schrift auf Schwarz (lesbarer Kontrast) */
  --black: #0d0d0d;
  --dark: #161616;
  --card: #1d1d1d;
  --line: rgba(255,255,255,0.09);
  --line-strong: rgba(255,255,255,0.18);
  --text: #ffffff;
  --muted: rgba(255,255,255,0.64);
  --faint: rgba(255,255,255,0.40);
  --gold: #D9A928;
  --silver: #B3B9C2;
  --ibw: #FFC800;

  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', system-ui, sans-serif;

  --wrap: 1120px;
  --gutter: 40px;
  --header-h: 64px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--black); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
[id] { scroll-margin-top: calc(var(--header-h) + 24px); }

:focus-visible { outline: 2px solid var(--ibw); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--red); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 500; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* ---------- Kopfzeile / Menü (immer sichtbar) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 20px;
  height: var(--header-h); padding: 0 var(--gutter);
  background: rgba(13,13,13,0.94);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand-name { font-family: var(--display); font-size: 20px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.brand-name b { color: var(--red); font-weight: 900; }

.site-nav { display: flex; justify-content: center; gap: 6px; }
.site-nav a {
  position: relative; padding: 8px 12px;
  font-family: var(--display); font-size: 16px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; white-space: nowrap; transition: color .2s;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"]::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 1px; height: 3px;
  background: repeating-linear-gradient(90deg, var(--red) 0 10px, transparent 10px 14px);
}

/* Social Media – bewusst immer sichtbar im Kopf */
.site-social { display: flex; gap: 6px; }
.site-social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: box-shadow .2s, color .2s, background .2s; }
.site-social a:hover { box-shadow: inset 0 0 0 1.5px var(--red); background: rgba(200,16,46,0.15); }

.cta-short { display: none; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red); color: #fff; text-decoration: none;
  font-family: var(--display); font-size: 16px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 9px 18px; border-radius: 100px; white-space: nowrap; transition: background .2s;
}
.nav-cta:hover { background: var(--red-deep); }
.nav-cta[aria-current="page"] { background: transparent; box-shadow: inset 0 0 0 1.5px var(--red); }

/* ---------- Grundbausteine ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 80px 0; }
.section + .section { padding-top: 0; }

.eyebrow { font-family: var(--display); font-size: 14px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--red-text); margin-bottom: 12px; }
.h2 { font-family: var(--display); font-size: clamp(34px, 4.6vw, 48px); font-weight: 800; line-height: 1; letter-spacing: 0.01em; margin-bottom: 18px; }
.lead { font-size: 17px; color: var(--muted); max-width: 620px; line-height: 1.7; }

.track { height: 3px; background: repeating-linear-gradient(90deg, var(--red) 0 30px, transparent 30px 44px); opacity: 0.6; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 14px 28px; border-radius: 100px; text-decoration: none; transition: background .2s, border-color .2s, color .2s;
  background: var(--red); color: #fff; border: 0;
}
.btn:hover { background: var(--red-deep); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 100px; font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.pill-soon { color: var(--red-text); background: rgba(200,16,46,0.12); box-shadow: inset 0 0 0 1px rgba(200,16,46,0.4); }
.pill-soon::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: blink 1.8s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ---------- Grosse Social-Media-Links (Startseite, Programm) ---------- */
.social-big { display: grid; gap: 12px; }
.social-big a { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 14px; background: rgba(255,255,255,0.05); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text); text-decoration: none; transition: box-shadow .2s, background .2s; }
.social-big a:hover { box-shadow: inset 0 0 0 1.5px var(--red); background: rgba(200,16,46,0.14); }
.social-big a::after { content: '↗'; margin-left: auto; font-size: 20px; color: var(--faint); }
.social-big svg { flex: none; }
.social-big b { display: block; font-family: var(--display); font-size: 22px; font-weight: 800; line-height: 1.1; }
.social-big small { display: block; font-size: 14px; color: var(--muted); }

/* ---------- Sponsoren-Logo (weisse Tafel, Logos brauchen hellen Grund) ----------
   Logo-Datei fehlt → site.js setzt .no-logo und der Firmenname erscheint als Schriftzug. */
.logo-slot { display: flex; align-items: center; justify-content: center; background: #fff; color: #111; border-radius: 12px; text-decoration: none; overflow: hidden; }
.logo-slot img { max-width: 78%; max-height: 64%; width: auto; height: auto; object-fit: contain; }
.logo-slot .wordmark { display: none; font-family: var(--display); font-weight: 800; letter-spacing: 0.02em; line-height: 1.05; text-align: center; padding: 0 12px; }
.logo-slot.no-logo img { display: none; }
.logo-slot.no-logo .wordmark { display: block; }
/* Für weisse Logos (z. B. SMG): dunkle Tafel */
.logo-slot.is-dark { background: #0b0b0b; color: #fff; }

/* ---------- Fusszeile ---------- */
.site-footer { background: var(--dark); border-top: 1px solid var(--line); margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-top: 48px; padding-bottom: 40px; }
.footer-social a { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.footer-social svg { flex: none; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand img { width: 30px; height: 30px; border-radius: 7px; }
.footer-text { font-size: 14px; color: var(--muted); line-height: 1.7; }
.footer-head { font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.footer-list { list-style: none; display: grid; gap: 6px; }
.footer-list a { font-size: 15px; color: var(--muted); text-decoration: none; }
.footer-list a:hover { color: var(--text); }
.footer-base { border-top: 1px solid var(--line); padding-top: 18px; padding-bottom: 22px; font-size: 13px; color: var(--faint); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Smartphone ---------- */
/* Kopfzeile zweizeilig, sobald Menü + Social + Button nicht mehr in eine Zeile passen */
@media (max-width: 1040px) {
  :root { --header-h: 104px; }
  .site-header {
    grid-template-columns: 1fr auto auto; grid-template-rows: 58px 46px; gap: 0 10px;
    height: auto;
  }
  .brand { grid-row: 1; grid-column: 1; min-width: 0; }
  .site-social { grid-row: 1; grid-column: 2; gap: 4px; }
  .site-social a { width: 34px; height: 34px; }
  .site-social svg { width: 18px; height: 18px; }
  .nav-cta { grid-row: 1; grid-column: 3; }
  .brand img { width: 30px; height: 30px; }
  .brand-name { font-size: 18px; }
  .nav-cta { font-size: 14px; padding: 8px 14px; }
  .site-nav {
    grid-column: 1 / -1; grid-row: 2;
    justify-content: space-between; gap: 0;
    margin: 0 calc(var(--gutter) * -1); padding: 0 calc(var(--gutter) - 10px);
    border-top: 1px solid var(--line);
  }
  .site-nav .nav-start { display: none; }   /* auf dem Handy führt das Logo zur Startseite */
  .site-nav a { font-size: 15px; padding: 11px 10px; letter-spacing: 0.04em; }
  .site-nav a[aria-current="page"]::after { left: 10px; right: 10px; bottom: 4px; }
}
@media (max-width: 860px) {
  :root { --gutter: 20px; }
  .section { padding: 56px 0; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .brand-name .brand-town { display: none; }
  .brand-name { font-size: 17px; }
  .cta-full { display: none; }
  .cta-short { display: inline; }
}
@media (max-width: 400px) {
  .site-header { gap: 0 8px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 16px; letter-spacing: 0.04em; }
}
@media (max-width: 370px) {
  .site-header .brand-name { display: none; }
}

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