/* ===== BASE ===== */
:root {
  --bg: #0A0A0A;
  --bg-2: #111111;
  --bg-3: #1A1A1A;
  --fg: #FFFFFF;
  --fg-muted: #888888;
  --fg-dim: #555555;
  --accent: #B4FF00;
  --accent-dim: rgba(180, 255, 0, 0.15);
  --hyrox: #FF5A1F;
  --powerlifting: #00C2FF;
  --bodybuilding: #FF2D9B;
  --border: rgba(255, 255, 255, 0.08);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
.font-display { font-family: 'Bebas Neue', sans-serif; }

h1, h2, h3 { font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.02em; line-height: 1.1; }

/* ===== NAV ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 0.15em;
  color: var(--accent);
}
.nav-tagline {
  font-size: 13px;
  color: var(--fg-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ===== HERO ===== */
.hero {
  padding: 80px 24px 96px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  /* Layered atmosphere: animated gradient background */
  background: linear-gradient(
    135deg,
    #0A0A0A 0%,
    #0d0b1a 20%,
    #1a0a14 40%,
    #0A0A0A 60%,
    #0a1018 80%,
    #0A0A0A 100%
  );
  background-size: 400% 400%;
  animation: heroGradient 12s ease infinite;
}

/* Dot-grid atmospheric overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* Subtle vignette for depth */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, transparent 40%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
  /* 3D perspective container */
  perspective: 1000px;
}

@keyframes heroGradient {
  0%   { background-position: 0% 50%; }
  25%  { background-position: 100% 25%; }
  50%  { background-position: 100% 50%; }
  75%  { background-position: 0% 75%; }
  100% { background-position: 0% 50%; }
}

/* Hero content — fade-up on load */
.hero-eyebrow {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s ease-out 0.1s forwards;
}
.hero-headline {
  font-size: clamp(56px, 7vw, 96px);
  line-height: 0.95;
  margin-bottom: 28px;
  color: var(--fg);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease-out 0.25s forwards;
}
.hero-accent { color: var(--accent); }
.hero-body {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255,255,255,0.7);
  max-width: 480px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s ease-out 0.45s forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.hero-right {
  opacity: 0;
  transform: translateY(20px) rotateY(-5deg) rotateX(5deg);
  animation: fadeUp 0.7s ease-out 0.55s forwards;
  transform-style: preserve-3d;
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform-style: preserve-3d;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.1s ease-out;
  /* Mouse tilt driven by JS */
}
.stat-card:hover {
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 0 24px rgba(180,255,0,0.08);
}
.stat-number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg-muted);
  font-weight: 600;
}
.stat-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  margin-top: 4px;
}

/* ===== SECTION SHARED ===== */
.section-title {
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.05;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}
/* Underline grows left-to-right on scroll entry */
.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.5s ease-out;
}
.section-title.animate-in::after {
  width: 60px;
}

.section-body {
  font-size: 17px;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  max-width: 560px;
}

/* ===== TRIBES ===== */
.tribes {
  padding: 96px 24px;
  border-bottom: 1px solid var(--border);
  position: relative;
  background: var(--bg);
}
.tribes-inner { max-width: 1200px; margin: 0 auto; }
.tribes-header { margin-bottom: 56px; }
.tribe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.tribe-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 32px;
  transition: border-color 0.25s, box-shadow 0.25s;
  transform-style: preserve-3d;
  cursor: pointer;
  /* Initial state for scroll animation */
  opacity: 0;
  transform: translateY(32px) scale(0.96);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out,
              border-color 0.25s, box-shadow 0.25s;
}
.tribe-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.tribe-card:hover {
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 0 30px rgba(255,255,255,0.04), inset 0 0 20px rgba(255,255,255,0.02);
}
.tribe-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 20px;
}
.tribe-hyrox .tribe-badge { background: rgba(255,90,31,0.15); color: var(--hyrox); }
.tribe-powerlifting .tribe-badge { background: rgba(0,194,255,0.15); color: var(--powerlifting); }
.tribe-bodybuilding .tribe-badge { background: rgba(255,45,155,0.15); color: var(--bodybuilding); }
.tribe-name {
  font-size: 32px;
  margin-bottom: 12px;
  color: var(--fg);
}
.tribe-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  line-height: 1.65;
  margin-bottom: 20px;
}
.tribe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tribe-tags span {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 2px;
  letter-spacing: 0.05em;
}

/* ===== FEATURES ===== */
.features {
  padding: 96px 24px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.features-inner { max-width: 1200px; margin: 0 auto; }
.features-header { margin-bottom: 56px; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.feature-item {
  padding: 40px 32px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-2);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out,
              background 0.2s, box-shadow 0.2s;
}
.feature-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.feature-item:hover {
  background: var(--bg-3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}
.feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: 4px;
  color: var(--accent);
  margin-bottom: 20px;
}
.feature-title {
  font-size: 22px;
  margin-bottom: 10px;
  color: var(--fg);
}
.feature-body {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
}

/* ===== GAUNTLET ===== */
.gauntlet {
  padding: 96px 24px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
/* Pulsing red glow border — achieved with animated pseudo element */
.gauntlet::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--hyrox);
  border-radius: 0;
  opacity: 0;
  animation: gauntletPulse 2.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes gauntletPulse {
  0%, 100% { opacity: 0.15; box-shadow: inset 0 0 20px rgba(255,90,31,0.1); }
  50%       { opacity: 0.55; box-shadow: inset 0 0 40px rgba(255,90,31,0.25); }
}

.gauntlet-inner { max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.gauntlet-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: 16px;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.gauntlet-label.is-visible { opacity: 1; transform: translateX(0); }

.gauntlet-title {
  font-size: clamp(56px, 7vw, 96px);
  color: var(--accent);
  margin-bottom: 20px;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.gauntlet-title.is-visible { opacity: 1; transform: scale(1); }

.gauntlet-tagline {
  font-size: 20px;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  max-width: 600px;
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease-out 0.15s, transform 0.5s ease-out 0.15s;
}
.gauntlet-tagline.is-visible { opacity: 1; transform: translateY(0); }

.gauntlet-details {
  display: flex;
  gap: 48px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease-out 0.3s, transform 0.5s ease-out 0.3s;
}
.gauntlet-details.is-visible { opacity: 1; transform: translateY(0); }
.gauntlet-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gd-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg-muted);
}
.gd-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
}
.gauntlet-note {
  font-size: 15px;
  color: rgba(255,255,255,0.5);
  font-style: italic;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease-out 0.45s, transform 0.5s ease-out 0.45s;
}
.gauntlet-note.is-visible { opacity: 1; transform: translateY(0); }

/* ===== CLOSING ===== */
.closing {
  padding: 120px 24px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.closing.is-visible { opacity: 1; transform: translateY(0); }
.closing-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.closing-title {
  font-size: clamp(48px, 6vw, 88px);
  line-height: 1;
  margin-bottom: 28px;
}
.closing-body {
  font-size: 18px;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 40px;
}
.closing-cta-text {
  font-size: 14px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.05em;
}

/* ===== CTA BUTTON ===== */
.btn-primary {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
  padding: 14px 32px;
  background: var(--accent);
  color: #0A0A0A;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow 0.25s ease, transform 0.15s ease;
}
.btn-primary:hover {
  box-shadow: 0 0 30px rgba(180, 255, 0, 0.5), 0 0 60px rgba(180, 255, 0, 0.2);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 0 16px rgba(180, 255, 0, 0.35);
}

/* Hero CTA wrapper — fade-up animation on load */
.hero-cta {
  margin-top: 36px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s ease-out 0.65s forwards;
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 8px;
}
.footer-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}
.footer-city {
  font-size: 12px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.1em;
}

/* ===== PARALLAX LAYERS ===== */
/* Hero background scrolls at 0.5x speed — implemented via JS transform */
.hero-bg-layer {
  position: absolute;
  inset: -10%;
  background: radial-gradient(ellipse 60% 40% at 70% 50%, rgba(180,255,0,0.04) 0%, transparent 60%),
              radial-gradient(ellipse 40% 30% at 20% 70%, rgba(255,90,31,0.04) 0%, transparent 60%);
  z-index: 0;
  will-change: transform;
  pointer-events: none;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .hero-headline, .hero-eyebrow, .hero-body, .hero-right { opacity: 1; transform: none; }
  .tribe-card, .feature-item, .gauntlet-label, .gauntlet-title,
  .gauntlet-tagline, .gauntlet-details, .gauntlet-note, .closing { opacity: 1; transform: none; }
  .section-title::after { width: 60px; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-right { order: -1; }
  .hero-stats { flex-direction: row; overflow-x: auto; }
  .stat-card { min-width: 180px; }
  .tribe-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .gauntlet-details { flex-direction: column; gap: 24px; }
  .closing-title { font-size: 48px; }
  .hero { padding: 56px 24px 72px; }
  .tribes, .features { padding: 64px 24px; }
  .gauntlet { padding: 64px 24px; }
  .closing { padding: 80px 24px; }
}

@media (max-width: 480px) {
  .hero-headline { font-size: 52px; }
  .nav-logo { font-size: 18px; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }