/* ============================================================
   ASTRAVALE — Astrophotography Workshop
   Premium Cosmic Design System
   ============================================================ */

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

:root {
  /* Backgrounds */
  --bg-deep: #030712;
  --bg-section: #060b16;
  --bg-card: #0a1020;
  --bg-elevated: #0f1729;
  
  /* Accent Colors */
  --accent-blue: #3b82f6;
  --accent-blue-light: #60a5fa;
  --accent-cyan: #06b6d4;
  --accent-cyan-light: #22d3ee;
  --accent-purple: #8b5cf6;
  --accent-purple-light: #a78bfa;
  --accent-rose: #e11d48;
  --accent-rose-light: #fb7185;
  --accent-gold: #f59e0b;
  
  /* Text */
  --text-primary: #f0f4ff;
  --text-secondary: #8b9cc0;
  --text-muted: #4a5578;
  
  /* Glass */
  --glass-bg: rgba(255,255,255,0.03);
  --glass-bg-hover: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.07);
  --glass-border-hover: rgba(255,255,255,0.14);
  
  /* Fonts */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Transitions */
  --ease-smooth: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.6;
}

::selection { background: rgba(59,130,246,0.4); color: #fff; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: rgba(59,130,246,0.35); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(59,130,246,0.55); }

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* === NOISE OVERLAY === */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loading-screen.hide {
  opacity: 0;
  visibility: hidden;
}

.loading-logo {
  width: 100px;
  height: 100px;
  animation: loadingPulse 1.6s ease-in-out infinite;
}

.loading-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(59,130,246,0.4));
}

.loading-bar-track {
  width: 200px;
  height: 2px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  margin-top: 2rem;
  overflow: hidden;
}

.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple), var(--accent-cyan));
  border-radius: 2px;
  transition: width 0.3s ease;
}

.loading-text {
  margin-top: 1rem;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ============================================================
   THREE.JS CANVAS
   ============================================================ */
#starfield-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  transition: all 0.5s var(--ease-smooth);
}

#navbar.scrolled {
  padding: 0.6rem 2rem;
  background: rgba(3,7,18,0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(59,130,246,0.3));
  transition: filter 0.3s ease;
}

.nav-brand:hover img {
  filter: drop-shadow(0 0 20px rgba(59,130,246,0.5));
}

.nav-brand-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  background: linear-gradient(135deg, #f0f4ff, #8b9cc0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent-blue);
  border-radius: 1px;
  transition: width 0.3s var(--ease-smooth);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 20px;
}

.nav-cta {
  padding: 0.55rem 1.4rem !important;
  font-weight: 600 !important;
  color: #fff !important;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple)) !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 16px rgba(59,130,246,0.25);
  transition: all 0.4s var(--ease-smooth) !important;
}

.nav-cta::after { display: none !important; }

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(59,130,246,0.4) !important;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 1001;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.2rem;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-blue-light);
  background: rgba(59,130,246,0.07);
  border: 1px solid rgba(59,130,246,0.15);
  border-radius: 100px;
  margin-bottom: 1.25rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 50%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

.text-gradient-warm {
  background: linear-gradient(135deg, var(--accent-rose) 0%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-cosmic {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2.25rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border: none;
  border-radius: 14px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s var(--ease-smooth);
  box-shadow: 0 4px 24px rgba(59,130,246,0.3), 0 1px 3px rgba(0,0,0,0.2);
  text-decoration: none;
}

.btn-cosmic::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.btn-cosmic:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 40px rgba(59,130,246,0.45), 0 2px 6px rgba(0,0,0,0.3);
}

.btn-cosmic:hover::before { opacity: 1; }
.btn-cosmic span { position: relative; z-index: 1; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2.25rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.4s var(--ease-smooth);
  text-decoration: none;
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.25);
  color: #fff;
  transform: translateY(-3px);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  z-index: 1;
  overflow: hidden;
}

.hero-cosmic-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.12;
}

.hero-cosmic-orb.orb-1 {
  width: 600px; height: 600px;
  background: var(--accent-blue);
  top: -200px; right: -200px;
}

.hero-cosmic-orb.orb-2 {
  width: 500px; height: 500px;
  background: var(--accent-purple);
  bottom: -200px; left: -200px;
}

.hero-cosmic-orb.orb-3 {
  width: 300px; height: 300px;
  background: var(--accent-cyan);
  top: 40%; left: 60%;
  opacity: 0.06;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.25rem;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-cyan-light);
  background: rgba(6,182,212,0.06);
  border: 1px solid rgba(6,182,212,0.15);
  border-radius: 100px;
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
}

.hero-badge .badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  animation: badgePulse 2s ease-in-out infinite;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .line-inner {
  display: block;
  transform: translateY(110%);
  animation: revealLine 1s var(--ease-smooth) forwards;
}

.hero-title .line:nth-child(2) .line-inner { animation-delay: 0.15s; }
.hero-title .line:nth-child(3) .line-inner { animation-delay: 0.3s; }

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-smooth) 0.5s forwards;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-smooth) 0.7s forwards;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-smooth) 0.9s forwards;
}

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hero-stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.08);
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-family: var(--font-heading);
  opacity: 0;
  animation: fadeIn 1s ease 1.2s forwards;
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--accent-blue), transparent);
  animation: scrollBounce 2s ease-in-out infinite;
}

/* ============================================================
   CURRICULUM / TIMELINE
   ============================================================ */
#curriculum {
  position: relative;
  z-index: 1;
  padding: 8rem 0;
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-section) 50%, var(--bg-deep) 100%);
}

.timeline-wrapper {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255,255,255,0.04);
  transform: translateX(-50%);
}

.timeline-progress {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 0%;
  background: linear-gradient(180deg, var(--accent-blue), var(--accent-purple), var(--accent-cyan));
  transform: translateX(-50%);
  box-shadow: 0 0 16px rgba(59,130,246,0.35);
  transition: height 0.05s linear;
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-bottom: 5rem;
  opacity: 0;
  transform: translateY(40px);
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-item:nth-child(odd) { flex-direction: row; }
.timeline-item:nth-child(even) { flex-direction: row-reverse; }

.timeline-item:nth-child(odd) .timeline-card { margin-right: calc(50% + 40px); text-align: right; }
.timeline-item:nth-child(even) .timeline-card { margin-left: calc(50% + 40px); text-align: left; }

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 20px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 2px solid rgba(255,255,255,0.12);
  transform: translateX(-50%);
  z-index: 3;
  transition: all 0.5s var(--ease-smooth);
}

.timeline-dot.active {
  border-color: var(--accent-blue);
  background: var(--accent-blue);
  box-shadow: 0 0 20px rgba(59,130,246,0.5);
}

.timeline-dot .dot-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(59,130,246,0);
  transition: all 0.5s ease;
}

.timeline-dot.active .dot-ring {
  border-color: rgba(59,130,246,0.3);
}

.timeline-card {
  flex: 1;
  max-width: calc(50% - 40px);
}

.timeline-num {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-blue);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.timeline-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: inline-block;
}

.timeline-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.timeline-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ============================================================
   FEATURES — Glassmorphism Cards
   ============================================================ */
#features {
  position: relative;
  z-index: 1;
  padding: 8rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.feature-card {
  position: relative;
  padding: 2.25rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  transition: all 0.5s var(--ease-smooth);
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(59,130,246,0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.feature-card:hover::after { opacity: 1; }

.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--glass-border-hover);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35), 0 0 40px rgba(59,130,246,0.06);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  position: relative;
  transition: transform 0.4s var(--ease-bounce);
}

.feature-card:hover .feature-icon { transform: scale(1.1) rotate(-3deg); }

@keyframes floatIcon {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0px); }
}

.feature-icon svg {
  animation: floatIcon 3s ease-in-out infinite;
}

.feature-icon.blue { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.15); }
.feature-icon.purple { background: rgba(139,92,246,0.1); border: 1px solid rgba(139,92,246,0.15); }
.feature-icon.cyan { background: rgba(6,182,212,0.1); border: 1px solid rgba(6,182,212,0.15); }
.feature-icon.rose { background: rgba(225,29,72,0.1); border: 1px solid rgba(225,29,72,0.15); }
.feature-icon.gold { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.15); }

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.feature-tag {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 6px;
  font-family: var(--font-heading);
}

.feature-tag.essential { background: rgba(59,130,246,0.1); color: var(--accent-blue-light); }
.feature-tag.advanced { background: rgba(139,92,246,0.1); color: var(--accent-purple-light); }
.feature-tag.creative { background: rgba(6,182,212,0.1); color: var(--accent-cyan-light); }
.feature-tag.technical { background: rgba(225,29,72,0.1); color: var(--accent-rose-light); }

/* ============================================================
   GALLERY — 9 Photo Slots
   ============================================================ */
#gallery {
  position: relative;
  z-index: 1;
  padding: 8rem 0;
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-section) 50%, var(--bg-deep) 100%);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-rows: 250px;
  grid-auto-flow: dense;
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.gallery-slot {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0.008) 100%);
  border: 1px solid var(--glass-border);
  transition: all 0.5s var(--ease-smooth);
  opacity: 0;
  transform: scale(0.95);
}

.gallery-slot.span-col-2 { grid-column: span 2; }
.gallery-slot.span-row-2 { grid-row: span 2; }

.gallery-slot:hover {
  border-color: rgba(59,130,246,0.2);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), inset 0 0 60px rgba(59,130,246,0.03);
  transform: scale(1);
}

.gallery-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-smooth);
}

.gallery-slot:hover img { transform: scale(1.05); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(3,7,18,0.8) 100%);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-slot:hover .gallery-overlay { opacity: 1; }

.gallery-overlay span {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
}

/* Placeholder state (before user adds images) */
.gallery-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, rgba(59,130,246,0.03) 0%, rgba(139,92,246,0.02) 100%);
}

.gallery-placeholder-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.gallery-slot:hover .gallery-placeholder-icon {
  background: rgba(59,130,246,0.08);
  border-color: rgba(59,130,246,0.2);
  color: var(--accent-blue-light);
}

.gallery-placeholder-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
}

.gallery-placeholder-num {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255,255,255,0.12);
  letter-spacing: 0.1em;
}

/* ============================================================
   PARTICIPANTS / COMMUNITY
   ============================================================ */
#participants {
  position: relative;
  z-index: 1;
  padding: 8rem 0;
  overflow: hidden;
}

.participants-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.participants-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  margin-bottom: 5rem;
  flex-wrap: wrap;
}

.participant-stat-card {
  text-align: center;
  padding: 2.5rem 3rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  transition: all 0.5s var(--ease-smooth);
  opacity: 0;
  transform: translateY(30px);
  min-width: 240px;
}

.participant-stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-hover);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 800;
  margin-bottom: 0.25rem;
  line-height: 1;
}

.stat-number.blue { color: var(--accent-blue-light); }
.stat-number.purple { color: var(--accent-purple-light); }
.stat-number.cyan { color: var(--accent-cyan-light); }

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

/* Community section */
.community-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.community-card {
  padding: 2.5rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0.01) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  opacity: 0;
  transform: translateY(30px);
}

.community-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

/* Avatar cluster */
.avatar-cluster {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--bg-deep);
  margin-left: -14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s var(--ease-bounce);
  position: relative;
  overflow: hidden;
}

.avatar:first-child { margin-left: 0; }

.avatar:hover {
  transform: translateY(-6px) scale(1.15);
  z-index: 10;
  border-color: var(--accent-blue);
}

.avatar-gradient {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
}

.avatar-more {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.12) !important;
}

.avatar-more .avatar-gradient {
  font-size: 0.6rem;
  color: var(--text-secondary);
}

.cluster-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Recent registrations */
.registrations-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.registration-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  transition: all 0.3s ease;
}

.registration-item:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

.reg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.reg-info {
  flex: 1;
  min-width: 0;
}

.reg-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.reg-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.reg-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-family: var(--font-heading);
}

/* Ripple circles */
.ripple-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

.ripple-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(59,130,246,0.06);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: rippleExpand 6s ease-out infinite;
}

.ripple-circle:nth-child(1) { width: 200px; height: 200px; animation-delay: 0s; }
.ripple-circle:nth-child(2) { width: 400px; height: 400px; animation-delay: 1.5s; }
.ripple-circle:nth-child(3) { width: 600px; height: 600px; animation-delay: 3s; }
.ripple-circle:nth-child(4) { width: 800px; height: 800px; animation-delay: 4.5s; }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
#testimonials {
  position: relative;
  z-index: 1;
  padding: 8rem 0;
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-section) 50%, var(--bg-deep) 100%);
  overflow: hidden;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.testimonial-card {
  position: relative;
  padding: 2.25rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.015) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  transition: all 0.6s var(--ease-smooth);
  opacity: 0;
  transform: translateY(30px);
}

.testimonial-card:hover {
  transform: translateY(-8px);
  border-color: var(--glass-border-hover);
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
}

.testimonial-card:nth-child(2) { margin-top: 2rem; }

.testimonial-quote-mark {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

.testimonial-card:nth-child(1) .testimonial-quote-mark { color: var(--accent-blue); }
.testimonial-card:nth-child(2) .testimonial-quote-mark { color: var(--accent-purple); }
.testimonial-card:nth-child(3) .testimonial-quote-mark { color: var(--accent-cyan); }

.testimonial-text {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-style: italic;
}

.testimonial-stars {
  display: flex;
  gap: 0.2rem;
  margin-bottom: 1.25rem;
  color: var(--accent-gold);
  font-size: 0.85rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.testimonial-card:nth-child(1) .testimonial-avatar { background: rgba(59,130,246,0.15); }
.testimonial-card:nth-child(2) .testimonial-avatar { background: rgba(139,92,246,0.15); }
.testimonial-card:nth-child(3) .testimonial-avatar { background: rgba(6,182,212,0.15); }

.testimonial-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.testimonial-role {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  position: relative;
  z-index: 1;
  padding: 5rem 0 0;
  overflow: hidden;
}

.footer-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 200px;
  background: radial-gradient(ellipse, rgba(59,130,246,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.footer-brand {
  max-width: 300px;
}

.footer-brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand-link img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(59,130,246,0.3));
}

.footer-brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text-primary);
}

.footer-brand p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all 0.3s var(--ease-smooth);
}

.social-icon:hover {
  background: rgba(59,130,246,0.1);
  border-color: rgba(59,130,246,0.25);
  color: var(--accent-blue-light);
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(59,130,246,0.15);
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-col a:hover {
  color: var(--accent-blue-light);
  transform: translateX(4px);
}

.footer-bottom {
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-bottom-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.footer-bottom-links a:hover { color: var(--text-secondary); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes loadingPulse {
  0%, 100% { opacity: 0.5; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes revealLine {
  to { transform: translateY(0); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes scrollBounce {
  0%, 100% { transform: scaleY(0.6); opacity: 0.3; transform-origin: top; }
  50% { transform: scaleY(1); opacity: 1; }
}

@keyframes badgePulse {
  0%, 100% { opacity: 0.4; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

@keyframes rippleExpand {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.4; }
  100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

/* Reveal animation class (added by GSAP) */
.revealed {
  opacity: 1 !important;
  transform: none !important;
}

/* ============================================================
   GALLERY & BEST MEMBERS ADDITIONS
   ============================================================ */
.gallery-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-smooth);
}

.gallery-slot:hover img {
  transform: scale(1.08);
}

.best-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.best-member-card {
  position: relative;
  padding: 2.5rem 2rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  text-align: center;
  transition: all 0.5s var(--ease-smooth);
}

.best-member-card:hover {
  transform: translateY(-8px);
  border-color: var(--glass-border-hover);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(59,130,246,0.1);
}

.member-photo {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  position: relative;
}

.member-photo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-deep);
  border: 3px solid var(--bg-deep);
}

.best-member-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.best-member-card p {
  font-size: 0.9rem;
  color: var(--accent-cyan-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .testimonials-grid { grid-template-columns: 1fr 1fr; }
  .testimonial-card:nth-child(2) { margin-top: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .community-section { grid-template-columns: 1fr; }
  .participants-hero { gap: 2rem; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(3,7,18,0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transform: translateX(100%);
    transition: transform 0.5s var(--ease-smooth);
  }

  .nav-links.open { transform: translateX(0); }

  .nav-links a {
    font-size: 1.2rem;
    padding: 0.75rem 1.5rem;
  }

  .nav-hamburger { display: flex; }

  .hero-title { font-size: clamp(2.2rem, 8vw, 3.5rem); }
  .hero-buttons { flex-direction: column; gap: 0.75rem; }
  .hero-stats { flex-direction: column; gap: 1.5rem; }
  .hero-stat-divider { width: 40px; height: 1px; }

  /* Timeline mobile */
  .timeline-line, .timeline-progress { left: 20px; }
  .timeline-dot { left: 20px; }
  .timeline-item,
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) { flex-direction: column !important; }
  .timeline-item:nth-child(odd) .timeline-card,
  .timeline-item:nth-child(even) .timeline-card {
    margin: 0 0 0 56px !important;
    text-align: left !important;
    max-width: 100% !important;
  }

  .features-grid { grid-template-columns: 1fr; }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
  .gallery-slot:nth-child(1) { grid-column: span 2; grid-row: span 1; }
  .gallery-slot:nth-child(5) { grid-column: span 1; }

  .participants-hero { flex-direction: column; }
  .participant-stat-card { min-width: unset; width: 100%; }

  .testimonials-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-slot:nth-child(1) { grid-column: span 1; }
  .section-title { font-size: 1.8rem; }
  .hero-badge { font-size: 0.7rem; padding: 0.4rem 1rem; }
}
