/**
 * FC Horgen WM-Tippspiel 2026 — Sponsor Landing
 * Design: Modern Football Energy / Community Sports Prestige
 */

:root {
  --pitch: #1F7A4C;
  --stadium: #0F1720;
  --grass: #2ECC71;
  --verein: #213478;
  --gold: #F5C542;
  --white: #FFFFFF;
  --soft-grey: #A1A1AA;
}

/* Base — kein horizontales Scrollen (Mobile / Safari) */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--stadium);
  color: var(--white);
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

.font-headline { font-family: 'Bebas Neue', 'Oswald', sans-serif; }
.font-oswald { font-family: 'Oswald', sans-serif; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

/* Stadium noise overlay — film grain for broadcast feel */
.noise::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
}

/* Global grass texture — subtle pitch energy across the page */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 40h80M40 0v80' stroke='%232ECC71' stroke-width='0.08' opacity='0.04' fill='none'/%3E%3Cpath d='M0 0l80 80M80 0L0 80' stroke='%231F7A4C' stroke-width='0.06' opacity='0.03' fill='none'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* Grass texture overlay (hero + key sections) — stronger pitch lines */
.grass-texture::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0v60M0 30h60' stroke='%232ECC71' stroke-width='0.2' opacity='0.07' fill='none'/%3E%3Cpath d='M0 0l60 60M60 0L0 60' stroke='%231F7A4C' stroke-width='0.12' opacity='0.05' fill='none'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* Verein texture overlay (für CTA / untere Bereiche) */
.verein-texture::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0v60M0 30h60' stroke='%23213478' stroke-width='0.12' opacity='0.06' fill='none'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* Section divider — broadcast-style accent line */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--verein), rgba(53, 72, 160, 0.8), var(--verein), transparent);
  opacity: 0.4;
  margin: 0 auto;
  max-width: 12rem;
}

/* Floating Navbar — Pill (erscheint beim Hochscrollen) */
#navbar-inner {
  transform: translateY(-120%);
  opacity: 0;
}

#navbar-inner.nav-visible {
  transform: translateY(0);
  opacity: 1;
}

/* Legacy: falls JS nicht lädt, Navbar sichtbar lassen */
.no-js #navbar-inner {
  transform: translateY(0);
  opacity: 1;
}

/* Nav-Links: gleichmässig verteilt, touch-freundlich (min. 44px) */
#navbar-inner nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Hero — Stadium-Hintergrund (images/stadium.jpg) + Gradient-Overlay */
.hero-bg {
  position: relative;
  overflow-x: hidden;
  overflow-y: visible;
  min-height: 100vh;
  background-color: #0a0f14;
  background-image: linear-gradient(180deg, rgba(15, 23, 32, 0.78) 0%, rgba(15, 23, 32, 0.62) 40%, rgba(15, 23, 32, 0.88) 100%),
                    radial-gradient(ellipse 80% 50% at 50% 20%, rgba(33, 52, 120, 0.15) 0%, transparent 50%),
                    radial-gradient(ellipse 100% 80% at 50% 80%, rgba(33, 52, 120, 0.08) 0%, transparent 50%),
                    url('../images/stadium.jpg');
  background-size: auto, auto, auto, cover;
  background-position: 0 0, 0 0, 0 0, center;
  background-repeat: repeat, repeat, repeat, no-repeat;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 32, 0.4) 70%, rgba(15, 23, 32, 0.6) 100%);
  pointer-events: none;
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(0deg, rgba(31, 122, 76, 0.2) 0%, rgba(46, 204, 113, 0.06) 40%, transparent 100%);
  pointer-events: none;
}

/* Stadium lighting glow — soft floodlight from above (hero) */
.hero-bg .stadium-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(255, 255, 255, 0.06) 0%, rgba(46, 204, 113, 0.04) 25%, transparent 50%),
              radial-gradient(ellipse 80% 40% at 70% 30%, rgba(255, 255, 255, 0.03) 0%, transparent 40%),
              radial-gradient(ellipse 80% 40% at 30% 40%, rgba(255, 255, 255, 0.03) 0%, transparent 40%);
  pointer-events: none;
}

/* Stadium light sweep (Animation bleibt im Hero — kein Layout-Overflow) */
.grass-sweep {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(46, 204, 113, 0.06), rgba(245, 197, 66, 0.04), rgba(46, 204, 113, 0.06), transparent);
  transform: translateX(-100%);
  animation: grassSweep 10s ease-in-out infinite;
  pointer-events: none;
}

@keyframes grassSweep {
  0%, 100% { transform: translateX(-100%); opacity: 0; }
  50% { transform: translateX(100%); opacity: 1; }
}

/* Glow effects */
.glow-pitch {
  box-shadow: 0 0 60px rgba(31, 122, 76, 0.28), 0 4px 24px rgba(0, 0, 0, 0.2);
}

.glow-verein {
  box-shadow: 0 0 60px rgba(33, 52, 120, 0.28), 0 4px 24px rgba(0, 0, 0, 0.2);
}

.glow-gold {
  box-shadow: 0 0 40px rgba(245, 197, 66, 0.22);
}

.text-glow {
  text-shadow: 0 0 48px rgba(46, 204, 113, 0.35), 0 0 24px rgba(31, 122, 76, 0.2), 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Stadium lighting glow — subtle on cards and key blocks */
.stadium-glow-soft {
  box-shadow: 0 0 40px rgba(46, 204, 113, 0.06), 0 0 80px rgba(31, 122, 76, 0.04);
}

/* Trophy card — animated sparkle */
.card-trophy {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-trophy::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.06) 45%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.06) 55%,
    transparent 60%
  );
  transform: translateX(-100%) rotate(25deg);
  animation: sparkle 6s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { transform: translateX(-100%) rotate(25deg); opacity: 0; }
  50% { transform: translateX(100%) rotate(25deg); opacity: 1; }
}

.card-trophy:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35), 0 0 48px rgba(245, 197, 66, 0.18);
}

/* Unsere Partner — Hintergrund greenfield.jpg */
.section-partners {
  background-color: #0F1720;
  background-image: url('../images/greenfield.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.section-partners::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 32, 0.85) 0%, rgba(15, 23, 32, 0.78) 50%, rgba(15, 23, 32, 0.9) 100%);
  pointer-events: none;
}

/* Community (2. Sektion) — Hintergrund lights.jpg */
.section-community {
  background-color: #0F1720;
  background-image: url('../images/lights.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.section-community::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 32, 0.82) 0%, rgba(15, 23, 32, 0.75) 50%, rgba(15, 23, 32, 0.88) 100%);
  pointer-events: none;
}

/* Sponsor Benefits — Hintergrund football_pitch.jpg */
.section-sponsor-benefits {
  background-color: #0F1720;
  background-image: url('../images/football_pitch.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.section-sponsor-benefits::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 32, 0.85) 0%, rgba(15, 23, 32, 0.78) 50%, rgba(15, 23, 32, 0.9) 100%);
  pointer-events: none;
}

/* Cards — lift on hover */
.card-lift {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3), 0 0 36px rgba(31, 122, 76, 0.1), 0 0 60px rgba(46, 204, 113, 0.06);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #213478, #3548a0);
  color: white;
  font-weight: 600;
  padding: 0.875rem 1.75rem;
  border-radius: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: scale(1.04);
  box-shadow: 0 0 36px rgba(33, 52, 120, 0.5);
}

.btn-gold {
  background: linear-gradient(135deg, #d4a82a, #F5C542);
  color: #0F1720;
  font-weight: 700;
}

.btn-gold:hover {
  box-shadow: 0 0 40px rgba(245, 197, 66, 0.5);
}

/* Sponsor logo hover */
.sponsor-logo {
  width: 100%;
  max-width: 20rem; /* max. 4 Partner pro Zeile — mehr Fläche pro Logo */
  transition: transform 0.28s ease, filter 0.28s ease, box-shadow 0.28s ease;
}

.sponsor-logo:hover {
  transform: scale(1.08);
  filter: brightness(1.2);
  box-shadow: 0 8px 24px rgba(33, 52, 120, 0.25);
}

/* Konkrete Preis-Sponsor:innen — Logo + Kurztext + Link (Abschnitt „Tolle Preise“) */
.prize-partner-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  padding: 1.25rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(245, 197, 66, 0.35);
  background: linear-gradient(180deg, rgba(245, 197, 66, 0.12) 0%, rgba(245, 197, 66, 0.04) 100%);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  min-height: 100%;
}

.prize-partner-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 197, 66, 0.55);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25), 0 0 32px rgba(245, 197, 66, 0.12);
}

.prize-partner-logo {
  width: 100%;
  max-width: 13rem;
  height: 5.5rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prize-partner-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Produktfotos als Preisbild (etwas höher als reines Logo) */
.prize-partner-logo--product {
  height: 7.5rem;
  max-width: 15rem;
}

@media (min-width: 640px) {
  .prize-partner-logo--product {
    height: 9rem;
    max-width: 16rem;
  }
}

/* WM 2026 badge */
.badge-wm {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(33, 52, 120, 0.4);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
}

/* Countdown — WM 2026 Start 11. Juni */
.countdown {
  position: relative;
  z-index: 10;
}

.countdown-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
}

.countdown-unit {
  text-align: center;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: 0 0 24px rgba(46, 204, 113, 0.05);
}

.countdown-unit:hover {
  border-color: rgba(46, 204, 113, 0.35);
  box-shadow: 0 0 28px rgba(31, 122, 76, 0.12), 0 0 48px rgba(46, 204, 113, 0.08);
}

.countdown-value {
  letter-spacing: 0.02em;
}

.countdown-label {
  display: block;
  margin-top: 0.15rem;
}

/* Reveal: content visible by default; GSAP animates from hidden */
