:root {
  --bg: #0c0a08;
  --bg-soft: #161310;
  --cream: #f3eee3;
  --cream-soft: #ddd5c4;
  --accent: #c8412e;
  --accent-soft: #e07c5a;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- TOP NAVIGATION ---------- */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2.5rem;
  mix-blend-mode: difference;
  color: #fff;
  pointer-events: none;
}

.topnav > * {
  pointer-events: auto;
}

.topnav__brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.25em;
}

.topnav__links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 500;
}

.topnav__links a {
  opacity: 0.85;
  transition: opacity 0.2s;
}

.topnav__links a:hover {
  opacity: 1;
}

.topnav__cta {
  border: 1px solid currentColor;
  padding: 0.5rem 1rem;
  border-radius: 999px;
}

/* ---------- HERO SCROLL-SCRUB ---------- */
.hero {
  position: relative;
  height: 350vh; /* scroll distance: 3.5x viewport */
}

.hero__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.8s ease;
  filter: contrast(1.05) saturate(0.92) brightness(0.92);
}

.hero__canvas.is-ready {
  opacity: 1;
}

/* dark vignette to make text readable */
.hero__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.55) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, transparent 30%, transparent 60%, rgba(0,0,0,0.6) 100%);
  z-index: 2;
  pointer-events: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 2rem;
  --t: 0; /* set by JS, overlay transition progress 0->1 */
  transform: translateY(calc(var(--t) * -40px));
  opacity: calc(1 - var(--t) * 0.9);
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--cream-soft);
  margin-bottom: 2rem;
}

.hero__eyebrow-line {
  display: inline-block;
  width: 60px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.hero__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(3rem, 9vw, 8rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  max-width: 14ch;
}

.hero__title-line {
  display: block;
}

.hero__title-line--italic {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-soft);
}

.hero__subtitle {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--cream-soft);
  margin-bottom: 4rem;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--cream-soft);
  opacity: calc(1 - var(--t) * 2); /* fades out faster */
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, currentColor 0%, transparent 100%);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.5); opacity: 0.4; }
}

/* loading bar */
.hero__loading {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 5;
  background: rgba(255,255,255,0.08);
  opacity: 1;
  transition: opacity 0.4s;
}

.hero__loading.is-done {
  opacity: 0;
}

.hero__loading-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.3s ease;
}

/* ---------- CONTENT SECTIONS ---------- */
.section {
  padding: 10rem 2.5rem;
  max-width: 100%;
  position: relative;
  z-index: 4;
  background: var(--bg);
}

.section__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--accent-soft);
  margin-bottom: 2rem;
  font-weight: 500;
}

.section__heading {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 2.5rem;
  max-width: 18ch;
}

.section__lede {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--cream-soft);
  max-width: 55ch;
}

/* Stats */
.section--stats {
  background: linear-gradient(to bottom, var(--bg) 0%, var(--bg-soft) 100%);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-top: 2rem;
}

.stat {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
}

.stat__num {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(3.5rem, 7vw, 6rem);
  line-height: 1;
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.stat__label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--cream-soft);
}

/* Arènes (calendar) */
.section--arenes {
  background: var(--bg-soft);
}

.arenes {
  list-style: none;
  margin-top: 2rem;
}

.arene {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 1.1rem;
  transition: background 0.2s, padding-left 0.2s;
}

.arene:hover {
  background: rgba(200, 65, 46, 0.05);
  padding-left: 1rem;
}

.arene__date {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--accent-soft);
}

.arene__lieu {
  font-weight: 500;
  font-size: 1.25rem;
}

.arene__cat {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--cream-soft);
  opacity: 0.7;
}

/* Footer */
.footer {
  background: #050403;
  padding: 4rem 2.5rem;
  text-align: center;
}

.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer__brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.25em;
  margin-bottom: 1rem;
}

.footer__credit {
  font-size: 0.8rem;
  color: var(--cream-soft);
  opacity: 0.6;
}

.footer__credit a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .topnav {
    padding: 1rem 1.25rem;
  }
  .topnav__links {
    gap: 1rem;
    font-size: 0.7rem;
  }
  .topnav__links li:not(:last-child) {
    display: none;
  }
  .section {
    padding: 6rem 1.5rem;
  }
  .stats {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .arene {
    grid-template-columns: 80px 1fr;
    gap: 1rem;
  }
  .arene__cat {
    grid-column: 2;
    font-size: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero {
    height: 100vh;
  }
  .hero__video {
    /* let it autoplay loop instead of scrub */
  }
  html {
    scroll-behavior: auto;
  }
}
