
/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --space-deep: #050816;
  --space-mid: #0a0f2e;
  --nebula: #1a0b3e;
  --cyan: #22d3ee;
  --purple: #a855f7;
  --pink: #ec4899;
  --gold: #fbbf24;
  --blue: #3b82f6;
  --emerald: #10b981;
  --rose: #f43f5e;
  --indigo: #818cf8;
  --amber: #f59e0b;
  --violet: #8b5cf6;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --glass-bg: rgba(10, 10, 40, 0.4);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-bg-solid: rgba(10, 10, 40, 0.75);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-glow: 0 0 30px rgba(34,211,238,0.12);
  --transition-smooth: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

body {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--space-deep);
  overflow-x: hidden;
  line-height: 1.6;
}

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

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--space-deep); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--purple), var(--cyan)); border-radius: 4px; }

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

@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(34,211,238,0.3), 0 0 60px rgba(168,85,247,0.15); transform: scale(1); }
  50% { box-shadow: 0 0 30px rgba(34,211,238,0.5), 0 0 80px rgba(168,85,247,0.25); transform: scale(1.04); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(50px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  0%, 100% { border-right-color: var(--cyan); }
  50% { border-right-color: transparent; }
}

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

@keyframes orbit {
  0% { transform: rotate(0deg) translateX(8px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(8px) rotate(-360deg); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

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

/* ============================================================
   TOP BAR / NAV
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 clamp(1rem, 4vw, 3rem);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(5, 8, 22, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.navbar.scrolled {
  background: rgba(5, 8, 22, 0.88);
  box-shadow: 0 4px 30px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.04);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1001;
}

.nav-logo-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.15rem;
  color: #fff;
  box-shadow: 0 0 20px rgba(168,85,247,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
}

.nav-logo-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, transparent 50%);
  border-radius: inherit;
}

.nav-logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  background: linear-gradient(90deg, #fff, var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

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

.nav-links a {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: color 0.25s, background 0.25s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

/* Burger menu */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 8px;
  z-index: 1001;
}

.burger span {
  display: block;
  width: 24px; height: 2.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.burger.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(5, 8, 22, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.35s ease;
  overflow-y: auto;
  padding: 70px 20px 30px;
}

.mobile-menu.open {
  display: flex;
  opacity: 1;
}

.mobile-menu a {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: color 0.2s, background 0.2s;
}

.mobile-menu a:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url('../img/nebula-bg.png') center/cover no-repeat;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5,8,22,0.6) 0%, rgba(5,8,22,0.3) 40%, rgba(5,8,22,0.7) 80%, var(--space-deep) 100%),
    linear-gradient(90deg, rgba(5,8,22,0.7) 0%, transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 120px clamp(1.5rem, 5vw, 4rem) 80px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-text { max-width: 640px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 10px;
  background: rgba(168,85,247,0.15);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 1.5rem;
  animation: fadeIn 1s ease 0.2s both;
}

.hero-badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 8px var(--purple);
  animation: pulse-glow 2s ease-in-out infinite;
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
  animation: fadeIn 1s ease 0.4s both;
}

.hero-title .line1 {
  display: block;
  background: linear-gradient(135deg, #fff 0%, #e2e8f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 30px rgba(255,255,255,0.1));
}

.hero-title .line2 {
  display: block;
  background: linear-gradient(135deg, var(--cyan), var(--purple), var(--pink));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 6s ease infinite;
  filter: drop-shadow(0 0 40px rgba(34,211,238,0.2));
}

.hero-subtitle-wrap {
  margin-bottom: 2rem;
  animation: fadeIn 1s ease 0.7s both;
  min-height: 2rem;
}

.hero-subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: clamp(0.9rem, 1.8vw, 1.15rem);
  color: var(--cyan);
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--cyan);
  animation: blink-caret 0.8s step-end infinite;
  letter-spacing: 0.01em;
}

.hero-desc {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  max-width: 520px;
  animation: fadeIn 1s ease 0.9s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 3rem;
  animation: fadeIn 1s ease 1.1s both;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  background-size: 200% 200%;
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  border-radius: 16px;
  border: none;
  border-bottom: 4px solid rgba(0,0,0,0.25);
  box-shadow: 0 0 30px rgba(168,85,247,0.3), 0 8px 32px rgba(0,0,0,0.3);
  transition: transform 0.2s, box-shadow 0.3s, background-position 0.5s;
  animation: pulse-glow 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before { left: 100%; }

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 50px rgba(168,85,247,0.4), 0 12px 40px rgba(0,0,0,0.4);
  background-position: 100% 0;
}

.btn-primary:active {
  transform: translateY(1px);
  border-bottom-width: 2px;
  box-shadow: 0 0 20px rgba(168,85,247,0.3), 0 4px 16px rgba(0,0,0,0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 16px;
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

/* Stat badges */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  animation: fadeIn 1s ease 1.3s both;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  transition: border-color 0.3s, transform 0.25s;
}

.stat-badge:hover {
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

.stat-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.stat-icon.missions { background: linear-gradient(135deg, rgba(168,85,247,0.25), rgba(168,85,247,0.1)); color: var(--purple); }
.stat-icon.tasks { background: linear-gradient(135deg, rgba(34,211,238,0.25), rgba(34,211,238,0.1)); color: var(--cyan); }
.stat-icon.certs { background: linear-gradient(135deg, rgba(251,191,36,0.25), rgba(251,191,36,0.1)); color: var(--gold); }

.stat-value {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.15rem;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Hero image */
.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-image img {
  width: clamp(280px, 50vw, 520px);
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 20px 60px rgba(168,85,247,0.25)) drop-shadow(0 0 80px rgba(34,211,238,0.1));
  position: relative;
  z-index: 1;
}

.hero-image-glow {
  position: absolute;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168,85,247,0.2) 0%, rgba(34,211,238,0.08) 50%, transparent 70%);
  filter: blur(60px);
  animation: pulse-glow 4s ease-in-out infinite;
  z-index: 0;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: fadeIn 1s ease 2s both;
}

.scroll-indicator span {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.scroll-mouse {
  width: 24px; height: 38px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  position: relative;
}

.scroll-mouse::after {
  content: '';
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 3px; height: 8px;
  background: var(--cyan);
  border-radius: 2px;
  animation: float 2s ease-in-out infinite;
}

/* ============================================================
   MISSIONS SECTION
   ============================================================ */
.missions {
  position: relative;
  z-index: 2;
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 4vw, 3rem);
  background: linear-gradient(180deg, var(--space-deep) 0%, rgba(10,15,46,0.5) 50%, var(--space-deep) 100%);
}

.section-header {
  text-align: center;
  margin-bottom: clamp(3rem, 5vw, 4.5rem);
}

.section-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.section-eyebrow::before,
.section-eyebrow::after {
  content: '';
  width: 30px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan));
}

.section-eyebrow::after {
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-title .gradient {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-desc {
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Decorative line */
.section-line {
  width: 80px; height: 4px;
  margin: 1.5rem auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  box-shadow: 0 0 20px rgba(34,211,238,0.3);
}

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
}

/* Individual mission card */
.mission-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
  cursor: pointer;
  /* scroll reveal */
  opacity: 0;
  transform: translateY(50px) scale(0.97);
}

.mission-card.revealed {
  animation: slideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.mission-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* Theme border glow on hover */
.mission-card[data-theme="blue"]:hover { border-color: rgba(59,130,246,0.4); box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(59,130,246,0.15); }
.mission-card[data-theme="emerald"]:hover { border-color: rgba(16,185,129,0.4); box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(16,185,129,0.15); }
.mission-card[data-theme="pink"]:hover { border-color: rgba(236,72,153,0.4); box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(236,72,153,0.15); }
.mission-card[data-theme="indigo"]:hover { border-color: rgba(129,140,248,0.4); box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(129,140,248,0.15); }
.mission-card[data-theme="cyan"]:hover { border-color: rgba(34,211,238,0.4); box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(34,211,238,0.15); }
.mission-card[data-theme="rose"]:hover { border-color: rgba(244,63,94,0.4); box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(244,63,94,0.15); }
.mission-card[data-theme="amber"]:hover { border-color: rgba(245,158,11,0.4); box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(245,158,11,0.15); }
.mission-card[data-theme="violet"]:hover { border-color: rgba(139,92,246,0.4); box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(139,92,246,0.15); }

/* Card top shimmer */
.card-shimmer {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity 0.4s;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--purple), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

.mission-card:hover .card-shimmer { opacity: 1; }

/* Card image */
.card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(10,15,46,0.8), rgba(26,11,62,0.8));
}

.card-image-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mission-card:hover .card-image-wrap img {
  transform: scale(1.08);
}

.card-image-glow {
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--glass-bg), transparent);
  z-index: 1;
}

/* Card tags */
.card-tags {
  position: absolute;
  top: 14px; left: 14px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.card-tag {
  padding: 4px 10px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 6px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card-tag.popular { background: rgba(168,85,247,0.35); color: #d8b4fe; border: 1px solid rgba(168,85,247,0.3); }
.card-tag.new { background: rgba(34,211,238,0.3); color: #a5f3fc; border: 1px solid rgba(34,211,238,0.3); }
.card-tag.challenge { background: rgba(251,191,36,0.3); color: #fde68a; border: 1px solid rgba(251,191,36,0.3); }

/* Card body */
.card-body {
  padding: 20px 24px 24px;
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 8px;
  line-height: 1.3;
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Card button */
.card-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-weight: 800;
  font-size: 0.85rem;
  border-radius: 12px;
  border: none;
  border-bottom: 3px solid rgba(0,0,0,0.25);
  color: #fff;
  transition: transform 0.2s, box-shadow 0.3s, filter 0.3s;
  position: relative;
  overflow: hidden;
  width: 100%;
  justify-content: center;
}

.card-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.5s;
}

.card-btn:hover::before { left: 100%; }

.card-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.card-btn:active {
  transform: translateY(1px);
  border-bottom-width: 1px;
}

/* Theme button colors */
.card-btn.theme-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 4px 20px rgba(59,130,246,0.3); }
.card-btn.theme-emerald { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 4px 20px rgba(16,185,129,0.3); }
.card-btn.theme-pink { background: linear-gradient(135deg, #ec4899, #db2777); box-shadow: 0 4px 20px rgba(236,72,153,0.3); }
.card-btn.theme-indigo { background: linear-gradient(135deg, #818cf8, #6366f1); box-shadow: 0 4px 20px rgba(129,140,248,0.3); }
.card-btn.theme-cyan { background: linear-gradient(135deg, #22d3ee, #06b6d4); box-shadow: 0 4px 20px rgba(34,211,238,0.3); }
.card-btn.theme-rose { background: linear-gradient(135deg, #f43f5e, #e11d48); box-shadow: 0 4px 20px rgba(244,63,94,0.3); }
.card-btn.theme-amber { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 4px 20px rgba(245,158,11,0.3); }
.card-btn.theme-violet { background: linear-gradient(135deg, #8b5cf6, #7c3aed); box-shadow: 0 4px 20px rgba(139,92,246,0.3); }

.card-btn .arrow {
  transition: transform 0.3s;
}

.card-btn:hover .arrow {
  transform: translateX(4px);
}

/* Card number badge */
.card-number {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--text-secondary);
  z-index: 2;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, var(--space-deep) 0%, #020510 100%);
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem) 2rem;
  border-top: 1px solid var(--glass-border);
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.05rem;
  color: #fff;
  box-shadow: 0 0 16px rgba(168,85,247,0.3);
}

.footer-logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 320px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.footer-links a {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: color 0.25s;
}

.footer-links a:hover { color: var(--cyan); }

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.footer-copy {
  color: var(--text-secondary);
  font-size: 0.8rem;
  opacity: 0.7;
}

.footer-stars {
  display: flex;
  gap: 8px;
}

.footer-star {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--text-secondary);
  opacity: 0.4;
  animation: twinkle 3s ease-in-out infinite;
}

.footer-star:nth-child(2) { animation-delay: 0.5s; opacity: 0.6; background: var(--cyan); }
.footer-star:nth-child(3) { animation-delay: 1s; }
.footer-star:nth-child(4) { animation-delay: 1.5s; opacity: 0.5; background: var(--purple); }
.footer-star:nth-child(5) { animation-delay: 2s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* 640px+ */
@media (min-width: 640px) {
  .footer-content {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .footer-links {
    justify-content: flex-end;
  }
}

/* 768px+ */
@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 1024px+ */
@media (min-width: 1024px) {
  .burger { display: none !important; }

  .nav-links { display: flex !important; }

  .hero-content {
    grid-template-columns: 1fr 1fr;
    padding-top: 140px;
    padding-bottom: 100px;
  }

  .hero-image {
    order: 2;
  }

  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Under 1024 */
@media (max-width: 1023px) {
  .nav-links { display: none; }
  .burger { display: flex; }

  .hero-text {
    text-align: center;
    margin: 0 auto;
  }

  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-text { order: 1; }
  .hero-image { order: 2; margin-top: 1.5rem; }

  .hero-subtitle-wrap { text-align: center; }
}

/* 1280px+ */
@media (min-width: 1280px) {
  .hero-content {
    gap: 4rem;
  }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible */
*:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   GAME OVERLAYS & LAYOUT PROTECTION
   ============================================================ */
.hidden { display: none !important; }

#game1-wrapper:not(.active),
#g2-game-wrapper:not(.active),
#game3-wrapper:not(.active),
#game4-wrapper:not(.active),
#game5-wrapper:not(.active),
#game6-wrapper:not(.active),
#game7-wrapper:not(.active),
#game8-wrapper:not(.active),
#game9-wrapper:not(.active),
#game10-wrapper:not(.active),
#daily-quest-wrapper:not(.active) {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  position: fixed !important;
  top: -99999px !important;
  left: -99999px !important;
  visibility: hidden !important;
}

/* ============================================================
   CARD FALLBACK BADGE (FOR MISSING/BROKEN IMAGES)
   ============================================================ */
.card-fallback-badge {
  display: none;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 180px;
  font-size: 3.8rem;
  background: linear-gradient(135deg, rgba(15,23,42,0.95), rgba(30,16,48,0.95));
  border-radius: 16px;
  filter: drop-shadow(0 0 15px rgba(34,211,238,0.3));
}

/* ============================================================
   AGE PATH SELECTOR ("ILE MA DZIECKO?")
   ============================================================ */
.age-path-selector {
  max-width: 820px;
  margin: -1rem auto 2.5rem;
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
}

.age-path-label {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.age-path-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.age-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 18px;
  min-height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.age-btn:hover {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.5);
  transform: translateY(-2px);
}

.age-btn.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(34, 211, 238, 0.35));
  border-color: #22d3ee;
  color: #fff;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.35);
}

.age-btn .age-badge {
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
}

.age-btn .age-desc {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}

.age-btn.active .age-desc {
  color: #67e8f9;
}

.age-recommendation-hint {
  margin-top: 12px;
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
  background: rgba(34, 211, 238, 0.08);
  padding: 8px 14px;
  border-radius: 10px;
  display: inline-block;
}

.age-highlight {
  box-shadow: 0 0 35px rgba(34, 211, 238, 0.7), 0 0 20px rgba(168, 85, 247, 0.5) !important;
  border-color: #22d3ee !important;
  transform: translateY(-8px) scale(1.02) !important;
  transition: all 0.35s ease !important;
}

/* ============================================================
   COOKIE CONSENT BANNER (RODO / ePrivacy)
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000000;
  padding: 16px 20px;
  background: rgba(8, 12, 36, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1.5px solid rgba(34, 211, 238, 0.4);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(34, 211, 238, 0.2);
  font-family: 'Nunito', sans-serif;
  animation: slideUpCookie 0.4s ease-out;
}

@keyframes slideUpCookie {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-banner-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
}

.cookie-banner-text {
  flex: 1;
  min-width: 280px;
}

.cookie-banner-text h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.cookie-banner-text p {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 10px 18px;
  min-height: 44px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cookie-btn-essential {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
}

.cookie-btn-essential:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.cookie-btn-all {
  background: linear-gradient(135deg, #a855f7, #06b6d4);
  border: none;
  color: #fff;
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.4);
}

.cookie-btn-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(34, 211, 238, 0.7);
}

/* Tap target minimums */
.btn-primary, .btn-secondary, .card-btn, .pricing-btn, .school-download-btn, .neuro-btn {
  min-height: 44px;
}

