/* ==========================================================================
   CSS CUSTOM PROPERTIES - Champion's Gold Elite Theme
   ========================================================================== */
:root {
  /* Colors */
  --bg-light: #fff8f2;
  --bg-dark: #111111;
  --text-on-light: #201b12;
  --text-on-dark: #f0ede8;
  --text-secondary: #7e766a;
  
  --gold-primary: #C69302;
  --gold-bronze: #8D7440;
  --gold-light: #ffdfa1;
  
  --surface-1: #ffffff;
  --border-gold: rgba(198, 147, 2, 0.3); /* 30% opacity gold */

  /* Typography */
  --font-display: 'Cormorant', serif;
  --font-body: 'Hanken Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-light);
  color: var(--text-on-light);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  
  /* Subtle grain texture overlay */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.5em;
}

/* ==========================================================================
   LOADER
   ========================================================================== */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: var(--bg-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease;
}

.loader-brand {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--text-on-light);
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
}

#loader-bar-wrap {
  width: 300px;
  height: 2px;
  background-color: var(--surface-1);
  border: 1px solid var(--border-gold);
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
}

#loader-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(45deg, var(--gold-bronze), var(--gold-primary));
  width: 0%;
  transition: width 0.1s ease;
}

#loader-percent {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-secondary);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 3rem;
  z-index: 100;
  pointer-events: none; /* Let clicks pass through except on nav elements */
}

.site-header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: auto;
}

.logo img {
  height: 48px;
  width: auto;
  border-radius: 4px;
}

.nav-links {
  display: flex;
  gap: 1rem;
}

/* ==========================================================================
   BUTTONS (0px corners, sharp)
   ========================================================================== */
.cta-button {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 4px;
}

.cta-button.primary {
  background: linear-gradient(45deg, var(--gold-bronze), var(--gold-primary));
  color: #000;
  border: none;
}

.cta-button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(198, 147, 2, 0.4);
}

.cta-button.secondary {
  background-color: var(--surface-1);
  color: var(--text-on-light);
  border: 2px solid var(--gold-primary);
}

.cta-button.secondary:hover {
  background-color: var(--bg-light);
}

.mt-4 { margin-top: 2rem; }

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-standalone {
  position: relative;
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--bg-light);
  z-index: 10;
}

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold-primary);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.chip-live {
  background-color: var(--gold-primary);
  color: #000;
  padding: 0.25rem 0.5rem;
}

.hero-heading {
  font-size: clamp(6rem, 12vw, 14rem);
  line-height: 0.9;
  color: var(--text-on-light);
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* Gold Stroke Effect for the highlighted word */
.hero-heading span {
  color: transparent;
  -webkit-text-stroke: 2px var(--gold-primary);
  font-style: italic;
}

.hero-tagline {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-top: 2rem;
  max-width: 600px;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
}

.scroll-indicator .arrow {
  margin-top: 0.5rem;
  font-size: 1.5rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* ==========================================================================
   CANVAS & MEDIA
   ========================================================================== */
.canvas-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Below content, above background */
  clip-path: circle(0% at 50% 50%); /* Start hidden for the circle wipe */
}

canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#dark-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-dark);
  opacity: 0; /* Changed dynamically */
  z-index: 2;
  pointer-events: none;
}

/* ==========================================================================
   SCROLL SECTIONS
   ========================================================================== */
#scroll-container {
  position: relative;
  height: 800vh; /* 800vh+ for generous scroll experience */
  width: 100%;
  z-index: 3;
  pointer-events: none; /* Let clicks pass through to canvas if needed, sections re-enable */
}

.scroll-section {
  position: fixed;
  top: 50%;
  width: 100%;
  left: 0;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 10;
}

/* Side alignment */
.align-left {
  padding-left: 10vw;
  padding-right: 50vw;
}

.align-right {
  padding-left: 50vw;
  padding-right: 10vw;
}

.align-center {
  padding-left: 25vw;
  padding-right: 25vw;
  text-align: center;
}

.align-split {
  padding-left: 10vw;
  padding-right: 10vw;
}

.split-layout {
  display: flex;
  gap: 4rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}

.split-left, .split-right {
  flex: 1;
  pointer-events: auto;
}

.section-inner {
  max-width: 40vw;
  pointer-events: auto;
}

/* Card Surface - Light Glassmorphism */
.card-surface-light {
  background-color: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1), inset 0 0 100px rgba(198, 147, 2, 0.05);
  position: relative;
  border-radius: 12px;
}

.card-surface-light .section-heading,
.card-surface-light .section-body {
  color: var(--text-on-light);
}

/* Card Surface - Dark Glassmorphism */
.card-surface-dark {
  background-color: rgba(17, 17, 17, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 3rem;
  border: 1px solid var(--border-gold);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 80px rgba(198, 147, 2, 0.1);
  position: relative;
  border-radius: 12px;
}

.card-surface-dark .section-heading,
.card-surface-dark .section-body,
.card-surface-dark .section-label {
  color: var(--text-on-dark);
}

.section-heading {
  font-size: clamp(3rem, 5vw, 6rem);
  line-height: 1.1;
  color: var(--text-on-light);
}

.section-body {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Stats */
.section-stats .section-heading,
.section-stats .section-label,
.section-stats .stat-label {
  color: var(--text-on-dark);
}

.section-stats .stat-number {
  color: var(--gold-primary);
}

.prize-display {
  font-size: clamp(5rem, 8vw, 10rem);
  color: var(--gold-primary);
  margin-bottom: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* Inputs */
.input-group {
  display: flex;
}

.input-group input {
  font-family: var(--font-mono);
  padding: 0.75rem 1rem;
  border: none;
  border-bottom: 2px solid var(--gold-primary);
  background-color: transparent;
  color: var(--text-on-light);
  outline: none;
  flex: 1;
  transition: all 0.2s ease;
}

.input-group input:focus {
  border: 1px solid var(--gold-primary);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

/* ==========================================================================
   MARQUEE
   ========================================================================== */
.marquee-wrap {
  position: fixed;
  top: 50%;
  left: 0;
  width: 100vw;
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  mix-blend-mode: overlay; /* Blends with background/dark overlay */
}

.marquee-text {
  font-family: var(--font-display);
  font-size: 15vw;
  color: rgba(255, 255, 255, 0.1);
  display: inline-block;
}

/* ==========================================================================
   STATIC END SECTION
   ========================================================================== */
.static-end-section {
  position: relative;
  z-index: 20;
  background-color: var(--bg-dark);
  color: var(--text-on-dark);
  width: 100%;
}

.sponsors-section {
  padding: 3rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  position: relative;
}

.sponsors-title {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  color: var(--gold-primary);
  margin-bottom: 2rem;
  text-transform: uppercase;
}

.sponsors-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 30s linear infinite;
  align-items: center;
}

.sponsor-group {
  display: flex;
  gap: 3rem;
  align-items: center;
  padding-right: 3rem;
}

.sponsor-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.minimal-footer {
  padding: 3rem 4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-content a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-content a:hover {
  color: var(--gold-primary);
}

.social-icons {
  display: flex;
  gap: 2rem;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  #scroll-container {
    height: 550vh;
  }
  
  .align-left, .align-right, .align-center, .align-split {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  .split-layout {
    flex-direction: column;
    gap: 2rem;
  }
  
  .section-inner {
    max-width: 100%;
    text-align: center;
  }
  
  .site-header {
    padding: 1rem;
  }
  
  .nav-links a.secondary {
    display: none;
  }
  
  .hero-heading {
    font-size: 5rem;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  
  .minimal-footer {
    padding: 3rem 1.5rem;
  }
  
  .sponsor-logo {
    height: 35px;
  }
  
  .sponsor-group {
    gap: 2rem;
    padding-right: 2rem;
  }
}
