/* ===== THEME TOKENS ===== */
:root {
  --bg: #f4f6f8;
  --panel: #fff;
  --primary: #0b6bff;
  --primary-600: #0958d1;
  --primary-50: #e9f0ff;
  --accent: #0160ff;
  --accent-2: #6ec3ff;
  --muted: #5b6b82;
  --text: #0b1220;
  --heading: #0b2247;
  --link: #0160ff;

  --radius: 16px;
  --shadow: 0 10px 24px rgba(13, 46, 86, 0.08);

  --border: 1px solid rgba(9, 32, 77, 0.1);
  --border-strong: 1px solid rgba(9, 32, 77, 0.18);

  --nav-bg: rgba(255, 255, 255, 0.9);
  --hero-grad: linear-gradient(180deg, #fff, #f7faff 60%, #f0f6ff);
  --footer-bg: #fff;

  --chip-bg: #fff;
  --chip-title: #09204d;
  --watermark-stroke: #0b6bff;
  --btn-primary-text: #fff;
}

html[data-theme="dark"] {
  --bg: #0b1220;
  --panel: #121a2c;
  --primary: #ffc94d;
  --primary-600: #eab43a;
  --primary-50: rgba(255, 201, 77, 0.12);
  --accent: #32c7ff;
  --accent-2: #ff7a59;
  --muted: #a9b8d6;
  --text: #eef4ff;
  --heading: #eef4ff;
  --link: #32c7ff;

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);

  --border: 1px solid rgba(255, 255, 255, 0.12);
  --border-strong: 1px solid rgba(255, 255, 255, 0.18);

  --nav-bg: rgba(16, 33, 63, 0.96);
  --hero-grad: linear-gradient(180deg, rgba(11, 18, 32, 0.9), rgba(11, 18, 32, 0.95));
  --footer-bg: transparent;

  --chip-bg: rgba(255, 255, 255, 0.06);
  --chip-title: #e7f8ff;
  --watermark-stroke: #fff;
  --btn-primary-text: #231500;
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --bg: #0b1220;
    --panel: #121a2c;
    --primary: #ffc94d;
    --primary-600: #eab43a;
    --primary-50: rgba(255, 201, 77, 0.12);
    --accent: #32c7ff;
    --accent-2: #ff7a59;
    --muted: #a9b8d6;
    --text: #eef4ff;
    --heading: #eef4ff;
    --link: #32c7ff;

    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);

    --border: 1px solid rgba(255, 255, 255, 0.12);
    --border-strong: 1px solid rgba(255, 255, 255, 0.18);

    --nav-bg: rgba(16, 33, 63, 0.96);
    --hero-grad: linear-gradient(180deg, rgba(11, 18, 32, 0.9), rgba(11, 18, 32, 0.95));
    --footer-bg: transparent;

    --chip-bg: rgba(255, 255, 255, 0.06);
    --chip-title: #e7f8ff;
    --watermark-stroke: #fff;
    --btn-primary-text: #231500;
  }
}

/* ===== BASE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  overflow-x: hidden;
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:target {
  scroll-margin-top: 72px;
}

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
  padding-inline: clamp(10px, 2.5vw, 18px);
}

/* ===== NAV ===== */
header.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: var(--border);
}

.top-stripe {
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent-2));
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
}

.brand {
  margin-right: auto;
}

.brand h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--heading);
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 12px;
}

nav a:hover {
  background: var(--primary-50);
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-toggle,
.theme-toggle {
  border: var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
}

.menu-toggle {
  display: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 700;
}

.theme-toggle:hover {
  background: var(--primary-50);
}

.theme-label {
  font-size: 12px;
  opacity: 0.8;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-grad);
  border-bottom: var(--border);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  filter: blur(8px);
  background:
    radial-gradient(780px 460px at 12% 18%, rgba(11, 107, 255, 0.12), transparent 60%),
    radial-gradient(980px 600px at 90% 12%, rgba(110, 195, 255, 0.2), transparent 65%),
    radial-gradient(640px 420px at 72% 88%, rgba(11, 107, 255, 0.08), transparent 70%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.12;
  background-repeat: no-repeat;
  background-position: 85% 50%;
  background-size: clamp(320px, 45vw, 720px);
}

.hero-wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding: 88px 0 40px;
}

.hero-wrap > * {
  min-width: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eaf3ff;
  color: #08326b;
  border: 1px solid rgba(11, 107, 255, 0.3);
  font-weight: 700;
  font-size: 13px;
}

html[data-theme="dark"] .badge,
html[data-theme="auto"].force-dark .badge {
  background: rgba(50, 199, 255, 0.18);
  color: #e7f8ff;
  border-color: rgba(50, 199, 255, 0.45);
}

.title {
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.05;
  margin: 14px 0 10px;
  color: var(--heading);
  opacity: 0;
  animation: fadeUp 0.8s ease-out 0.1s forwards;
}

.subtitle {
  max-width: 560px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: clamp(16px, 2.4vw, 20px);
  opacity: 0;
  animation: fadeUp 0.9s ease-out 0.3s forwards;
}

.cta {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

/* ===== BUTTONS ===== */
.btn {
  appearance: none;
  display: inline-block;
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: var(--shadow);
  opacity: 0;
  animation: fadeUp 0.8s ease-out forwards;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent-2));
  color: var(--btn-primary-text);
  animation-delay: 0.45s;
}

.btn-primary:hover {
  filter: brightness(0.96);
}

.btn-outline {
  background: var(--panel);
  color: var(--primary);
  border: var(--border-strong);
  transition: all 0.2s ease;
  animation-delay: 0.55s;
}

.btn-outline:hover {
  background: var(--primary-50);
}

.ribbon-img {
  display: inline-block;
  width: clamp(70px, 9vw, 110px);
  height: auto;
  margin-top: 10px;
  opacity: 0;
  user-select: none;
  pointer-events: none;
  transform-origin: center;
  filter: drop-shadow(0 4px 8px rgba(9, 32, 77, 0.15)) drop-shadow(0 0 4px rgba(11, 107, 255, 0.1));
  animation: ribbonTiltUp 0.9s ease-out 0.7s forwards;
}

/* ===== LAYOUT / SECTIONS ===== */
section {
  padding: 40px 0;
}

.card {
  padding: 18px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-grid,
.two-col,
.sponsor-grid,
.donor-grid {
  display: grid;
}

.hero-grid {
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.two-col {
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.sponsor-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.donor-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.section-title {
  margin: 0 0 14px;
  font-size: 24px;
  color: var(--heading);
}

.muted {
  color: var(--muted);
}

.tint {
  background: linear-gradient(180deg, #f8fbff, #f4f9ff);
}

html[data-theme="dark"] .tint {
  background: linear-gradient(180deg, rgba(50, 199, 255, 0.1), rgba(255, 201, 77, 0.1));
}

.tint-safe {
  background: var(--panel);
}

/* ===== QUICK FACT CHIPS ===== */
.chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px;
  border: var(--border);
  border-radius: 12px;
  background: var(--chip-bg);
}

.chip-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--chip-title);
}

.chip-value {
  color: var(--text);
  line-height: 1.35;
  font-weight: 600;
  opacity: 0.98;
}

/* ===== SPONSORS ===== */
.featured-sponsors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin-bottom: 16px;
}

.sponsor-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 26px;
  border: var(--border-strong);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sponsor-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.sponsor-tile img,
.featured-sponsors img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

.featured-sponsors img {
  opacity: 0.95;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.featured-sponsors img:hover {
  transform: scale(1.06);
  opacity: 1;
}

.sponsor-ticker {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
  margin-top: 16px;
  overflow: hidden;
}

.ticker {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 10px 0;
}

.ticker::before,
.ticker::after {
  content: "";
  position: absolute;
  top: 0;
  z-index: 2;
  width: 60px;
  height: 100%;
  pointer-events: none;
}

.ticker::before {
  left: 0;
  background: linear-gradient(to right, var(--panel), transparent);
}

.ticker::after {
  right: 0;
  background: linear-gradient(to left, var(--panel), transparent);
}

.ticker-track {
  display: flex;
  gap: clamp(20px, 4vw, 50px);
  white-space: nowrap;
  will-change: transform;
}

.ticker-item {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ticker-item img {
  height: var(--logo-height, 50px);
  width: auto;
  opacity: 0.85;
  transition: all 0.3s ease;
}

.ticker-item img:hover {
  opacity: 1;
  transform: scale(1.05);
}

.ticker-track {
  display: flex;
  gap: clamp(20px, 4vw, 50px);
  white-space: nowrap;
  width: max-content; /* fixes cutoff */
  will-change: transform;
}

#sponsors .sponsor-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

#sponsors .sponsor {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 12px 16px;
  border: var(--border);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: center;
  font-weight: 700;
}

.sponsor-tier h4 {
  margin-bottom: 6px;
}

.sponsor-tier .price {
  margin-bottom: 10px;
  font-weight: 800;
}

.sponsor-tier ul {
  padding-left: 18px;
}

.sponsor-tier li {
  margin-bottom: 6px;
}

.sponsor-tier.highlight {
  border: 2px solid var(--primary);
  transform: scale(1.03);
}

.sold-out {
  color: #ff4d4f;
  font-weight: 700;
}

/* ===== DONORS ===== */
.donor {
  padding: 16px;
  border: var(--border);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.donor:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

/* ===== FAQ ===== */
#faq dl {
  margin: 0;
}

#faq dt {
  margin-top: 16px;
  font-weight: 800;
  color: var(--heading);
}

#faq dd {
  max-width: 90%;
  margin-left: 0;
  margin-bottom: 18px;
  color: var(--muted);
  line-height: 1.55;
}

#faq .card {
  align-self: start;
  padding: 20px;
  margin-top: 8px;
}

#faq .card h4 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--heading);
}

#faq .card ul {
  margin: 0;
  padding-left: 18px;
}

#faq .card li {
  margin-bottom: 6px;
}

/* ===== FOOTER ===== */
footer {
  padding: 36px 0 60px;
  border-top: var(--border);
  background: var(--footer-bg);
  color: var(--muted);
}

/* ===== PLACEHOLDER LOGOS ===== */
.logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  height: clamp(32px, 6vw, 50px);
  padding: 0 22px;
  border: 2px dashed var(--primary);
  border-radius: 10px;
  background: var(--primary-50);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
}

.logo-placeholder:hover {
  background: var(--primary);
  color: var(--btn-primary-text);
  transform: translateY(-2px);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ribbonTiltUp {
  from {
    opacity: 0;
    transform: rotate(-12deg) translateY(12px);
  }
  to {
    opacity: 0.95;
    transform: rotate(-12deg) translateY(0);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 920px) {
  .hero-wrap {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 56px 0 24px;
  }

  .two-col,
  .hero-grid,
  .sponsor-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-grid {
    gap: 10px;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(1100px, 98vw);
    padding-inline: 4px;
  }

  nav ul {
    position: absolute;
    top: 56px;
    right: 0;
    display: none;
    flex-direction: column;
    width: min(85vw, 340px);
    padding: 8px;
    border: var(--border);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: var(--shadow);
  }

  nav#primary-nav.open ul {
    display: flex;
  }

  nav a {
    padding: 12px;
  }

  .menu-toggle {
    display: inline-block;
  }

  .card {
    padding: 12px;
    border-radius: 12px;
  }

  .chip {
    padding: 10px;
    gap: 6px;
  }

  .section-title {
    font-size: 22px;
  }

  iframe {
    border-radius: 12px;
  }
}

@media (max-width: 520px) {
  .hero-grid,
  .sponsor-grid,
  .two-col {
    grid-template-columns: 1fr;
  }
}