/* Reset and theme */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Brand palette */
  --brand: #b8034b;        /* wine red */
  --brand-bright: #eb0b19; /* bright accent */
  --brand-dark: #500c24;   /* deep maroon */

  /* Surfaces + text */
  --dark: #0a0a0a;         /* page bg */
  --panel: #1a1a1a;        /* card bg */
  --white: #ffffff;
  --highlight: #e8e8e8;

  /* Back-compat */
  --purple: var(--brand);
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--dark);
  color: var(--white);
  line-height: 1.6;
}

/* Header / Nav */
header {
  background-color: var(--brand);
  padding: 1rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* logos + title row */
header .brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-bottom: .5rem;
}
header .brand-row .logo img {
  width: 56px; height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.25));
}
header h1 {
  font-size: 2rem;
  color: var(--white);
  margin: 0;
}

nav { display: flex; flex-wrap: wrap; gap: 1rem; }
nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: bold;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: background 0.2s, color 0.2s;
}
nav a:hover { background-color: var(--highlight); color: var(--dark); }

@media (max-width: 560px) {
  header .brand-row .logo:last-of-type { display: none; }
  header h1 { font-size: 1.6rem; }
}

/* Main wrapper */
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}
/* Single-card pages */
.content-grid.single { display: block; }
.content-grid.single .card { width: 100%; max-width: 1400px; margin: 0 auto; }

/* Card */
.card {
  background-color: var(--panel);
  border: 1px solid var(--brand);
  border-radius: 10px;
  padding: 1.5rem;
  flex: 1 1 300px;
  max-width: 100%;
  color: var(--white);
}
.card h2 { margin-bottom: 1rem; color: var(--brand); text-align: center; }

/* Footer */
footer {
  text-align: center;
  padding: 1rem;
  background-color: #111;
  color: var(--highlight);
  margin-top: 2rem;
}
footer a { color: var(--brand); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ========== Teams Page Grid ========== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  justify-items: center;
  margin-top: 1rem;
}
.team-link {
  display: block;
  padding: 1rem;
  background-color: var(--panel);
  border: 2px solid var(--brand);
  border-radius: 10px;
  text-align: center;
  font-weight: bold;
  text-decoration: none;
  color: var(--highlight);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.team-link:hover { background-color: var(--highlight); color: var(--dark); transform: translateY(-3px); }

.team-card { perspective: 1000px; width: 100%; max-width: 250px; height: 300px; }
.team-card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.6s; transform-style: preserve-3d; }
.team-card:hover .team-card-inner { transform: rotateY(180deg); }

.team-card-front, .team-card-back {
  position: absolute; width: 100%; height: 100%;
  border: 2px solid var(--brand);
  border-radius: 10px;
  background-color: var(--panel);
  backface-visibility: hidden;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 1rem; text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.team-card-front { z-index: 2; }
.team-card-back  { transform: rotateY(180deg); }

.team-card h3 { margin-top: 1rem; color: var(--highlight); }
.team-logo { width: 80px; height: 80px; object-fit: contain; }

.team-card-back a {
  color: var(--white);
  background-color: var(--brand);
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: background-color 0.2s, filter 0.2s;
}
.team-card-back a:hover { filter: brightness(1.1); }

.center-logo { display: block; margin: 0 auto; width: 120px; height: auto; }

/* ===== Groups / Bracket ===== */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 1.25rem;
}
.group-card {
  border: 2px solid var(--accent, var(--brand));
  border-radius: 10px;
  background-color: var(--panel);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.group-title {
  background: var(--accent, var(--brand));
  color: #fff;
  font-weight: 700;
  padding: 0.6rem 0.9rem;
  text-align: center;
}
.group-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.group-table th, .group-table td { padding: 0.5rem 0.6rem; border-bottom: 1px solid #2d2d2d; text-align: center; }
.group-table th:nth-child(3), .group-table td:nth-child(3) { text-align: left; }
.group-table tbody tr:hover { background: #242424; }
.group-table img { display: block; margin: 0 auto; image-rendering: -webkit-optimize-contrast; }

/* ---------- Sponsors page enhancements ---------- */
.sponsor-hero {
  text-align: center;
  background:
    radial-gradient(1200px 300px at 50% -20%, rgba(184,3,75,0.5), transparent),
    linear-gradient(180deg, rgba(184,3,75,0.25), rgba(184,3,75,0.05));
  border-color: rgba(184,3,75,0.6);
}
.sponsor-hero h1 { font-size: 2rem; margin-bottom: .25rem; }
.sponsor-hero p { color: var(--highlight); }

/* Logo reel */
.logo-reel {
  overflow: hidden;
  position: relative;
  padding: .5rem 0;
  mask-image: linear-gradient(to right, transparent 0, black 8%, black 92%, transparent 100%);
}
.logo-track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  width: max-content;               /* allow natural width for smooth loop */
  will-change: transform;
  animation: reel-scroll 28s linear infinite;
}
.logo-track img {
  height: 48px;
  object-fit: contain;
  filter: grayscale(1) opacity(.85);
  transition: filter .2s, transform .2s;
}
.logo-track img:hover { filter: none; transform: translateY(-2px); }
@keyframes reel-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .logo-track { animation: none; } }

.logo-reel-note { margin-top: .5rem; color: var(--highlight); text-align: center; font-size: .95rem; }

/* Tiers */
.tiers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.tier {
  background: #151515;
  border: 1px solid rgba(184,3,75,0.35);
  border-radius: 12px; padding: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.tier-badge { display: inline-block; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; margin-bottom: .5rem; background: #444; }
.tier-badge.bronze { background: linear-gradient(90deg, #6d4c41, #8d6e63); }
.tier-badge.silver { background: linear-gradient(90deg, #9e9e9e, #cfcfcf); color: #111; }
.tier-badge.gold   { background: linear-gradient(90deg, #f7b733, #fce38a); color: #111; }

.tier-list { list-style: none; padding-left: 0; }
.tier-list li { position: relative; padding-left: 1.1rem; margin: .35rem 0; }
.tier-list li::before { content: "✓"; position: absolute; left: 0; color: var(--brand-bright); }

/* Spotlight */
.spotlight {
  border: 1px solid rgba(184,3,75,0.6);
  background: linear-gradient(180deg, rgba(184,3,75,0.12), rgba(184,3,75,0.03));
}

/* CTA banner */
.sponsor-cta {
  text-align: center;
  background:
    radial-gradient(800px 200px at 50% -10%, rgba(184,3,75,0.45), transparent),
    #1a1a1a;
  border-color: rgba(184,3,75,0.6);
}
.cta-actions { margin-top: .75rem; display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: .6rem 1rem; border-radius: 10px;
  background: var(--brand); color: #fff; text-decoration: none; font-weight: 700;
  border: 1px solid rgba(255,255,255,0.12);
  transition: transform .15s ease, filter .15s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.07); }
.btn:active { transform: translateY(-1px); }
.btn-secondary { background: #2a2a2a; color: #fff; border-color: rgba(255,255,255,0.08); }
.btn-secondary:hover { filter: brightness(1.15); }
/* Make links inside page content white */
.content-grid a,
.content-grid a:visited {
  color: #fff; /* or var(--white) */
}
.content-grid a:hover,
.content-grid a:focus {
  color: #fff;
  text-decoration: underline;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.video-item { display: flex; flex-direction: column; gap: .5rem; }

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;    /* modern browsers */
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--brand);
}
.video-frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

.video-meta { color: var(--highlight); }
.video-meta strong { color: var(--white); }


/* Layout & spacing */
.page { max-width: 1100px; margin: 0 auto; padding: 2rem 1rem; }
.section { padding: 2rem 0; background: transparent; border: 0; }
.hero h1 { font-size: clamp(28px, 4vw, 48px); margin: .25rem 0 .75rem; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .9rem; opacity: .85; }
.list-tight li { margin: .25rem 0; }

/* Simple responsive two-column blocks (no “boxes”) */
.split { display: grid; gap: 1.25rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }

/* Quick links / CTAs */
.quick-links { display:flex; flex-wrap:wrap; gap:.6rem; margin-top:1rem; }
.btn, .btn-secondary {
  display:inline-block; padding:.6rem 1rem; border-radius:.75rem; text-decoration:none; font-weight:600;
}
.btn { background: var(--accent, #d81b60); color:#fff; }
.btn:hover { filter: brightness(1.05); }
.btn-secondary { background: transparent; border: 1px solid currentColor; }
.cta-actions { display:flex; flex-wrap:wrap; gap:.6rem; margin-top:.75rem; }
