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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-light);
  background-color: var(--deep-navy);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Cosmic Vortex Background - radial burst from center */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 80% 60% at 30% 35%, rgba(60, 12, 120, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 75% 30%, rgba(130, 25, 150, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse 90% 40% at 50% 50%, rgba(12, 35, 120, 0.15) 0%, transparent 55%),
    radial-gradient(ellipse 60% 70% at 20% 65%, rgba(80, 18, 130, 0.10) 0%, transparent 45%),
    radial-gradient(ellipse 55% 55% at 80% 60%, rgba(18, 60, 140, 0.12) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Cosmic Vortex Aurora - radial energy bursts */
.aurora-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora-layer {
  position: absolute;
  width: 150%;
  height: 150%;
  top: -25%;
  left: -25%;
  opacity: 0;
  mix-blend-mode: screen;
  filter: blur(60px);
  will-change: transform, opacity;
}

/* Purple-magenta nebula cloud (left side) */
.aurora-layer--1 {
  background:
    radial-gradient(ellipse 55% 50% at 25% 40%, rgba(100, 18, 150, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 40% 35% at 35% 25%, rgba(140, 30, 130, 0.16) 0%, transparent 50%),
    radial-gradient(ellipse 30% 25% at 15% 55%, rgba(70, 12, 110, 0.14) 0%, transparent 50%);
  animation: vortexPulse1 12s ease-in-out infinite;
}

/* Blue-cyan energy stream (right side) */
.aurora-layer--2 {
  background:
    radial-gradient(ellipse 50% 45% at 75% 35%, rgba(18, 60, 160, 0.20) 0%, transparent 50%),
    radial-gradient(ellipse 35% 30% at 65% 50%, rgba(20, 140, 180, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 45% 35% at 85% 25%, rgba(35, 90, 200, 0.14) 0%, transparent 55%);
  animation: vortexPulse2 15s ease-in-out infinite;
}

/* Pink-orange energy wisps (radial) */
.aurora-layer--3 {
  background:
    radial-gradient(ellipse 60% 30% at 50% 45%, rgba(150, 35, 130, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 35% 40% at 40% 60%, rgba(180, 70, 140, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 60% 30%, rgba(200, 90, 60, 0.08) 0%, transparent 50%);
  animation: vortexPulse3 18s ease-in-out infinite;
}

/* Subtle central glow */
.aurora-layer--4 {
  background:
    radial-gradient(ellipse 35% 35% at 50% 42%, rgba(100, 65, 200, 0.18) 0%, transparent 45%),
    radial-gradient(ellipse 25% 25% at 50% 42%, rgba(160, 40, 180, 0.14) 0%, transparent 40%);
  filter: blur(50px);
  animation: vortexCore 8s ease-in-out infinite;
}

@keyframes vortexPulse1 {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 0.5; }
  25% { transform: translate(3%, -2%) scale(1.08) rotate(2deg); opacity: 0.75; }
  50% { transform: translate(-2%, 3%) scale(1.02) rotate(-1deg); opacity: 0.6; }
  75% { transform: translate(1%, 1%) scale(1.12) rotate(1deg); opacity: 0.65; }
}

@keyframes vortexPulse2 {
  0%, 100% { transform: translate(0, 0) scale(1.05) rotate(0deg); opacity: 0.4; }
  30% { transform: translate(-3%, 2%) scale(1) rotate(-2deg); opacity: 0.7; }
  60% { transform: translate(2%, -1%) scale(1.15) rotate(1deg); opacity: 0.55; }
}

@keyframes vortexPulse3 {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 0.35; }
  35% { transform: translate(2%, 2%) scale(1.1) rotate(3deg); opacity: 0.6; }
  70% { transform: translate(-1%, -2%) scale(1.05) rotate(-2deg); opacity: 0.45; }
}

@keyframes vortexCore {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.15); opacity: 0.7; }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-layer {
    animation: none !important;
    opacity: 0.7 !important;
    filter: blur(80px);
  }
}

/* Stars + nebula canvas */
#stars-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Main content above background */
.page-wrapper {
  position: relative;
  z-index: 1;
}

/* Skip to content - accessibility */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-sm) var(--space-lg);
  background: var(--accent-violet);
  color: var(--text-heading);
  border-radius: var(--radius-md);
  z-index: 10000;
  font-weight: 600;
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-to-content:focus {
  top: var(--space-md);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Section base */
.section {
  padding: var(--space-5xl) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-4xl);
}

.section-label {
  display: inline-block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-violet);
  margin-bottom: var(--space-md);
}

.section-title {
  font-size: var(--section-title);
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.2;
  margin-bottom: var(--space-lg);
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-heading);
}

p {
  color: var(--text-muted);
  line-height: 1.7;
}

a {
  color: var(--accent-violet);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-blue);
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--accent-violet);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: rgba(124, 92, 255, 0.3);
  color: var(--text-heading);
}

/* Scroll animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.stagger-children .animate-on-scroll:nth-child(1) { transition-delay: 0ms; }
.stagger-children .animate-on-scroll:nth-child(2) { transition-delay: 80ms; }
.stagger-children .animate-on-scroll:nth-child(3) { transition-delay: 160ms; }
.stagger-children .animate-on-scroll:nth-child(4) { transition-delay: 240ms; }
.stagger-children .animate-on-scroll:nth-child(5) { transition-delay: 320ms; }
.stagger-children .animate-on-scroll:nth-child(6) { transition-delay: 400ms; }
.stagger-children .animate-on-scroll:nth-child(7) { transition-delay: 480ms; }
.stagger-children .animate-on-scroll:nth-child(8) { transition-delay: 560ms; }
.stagger-children .animate-on-scroll:nth-child(9) { transition-delay: 640ms; }
.stagger-children .animate-on-scroll:nth-child(10) { transition-delay: 720ms; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Utility: gradient text */
.gradient-text {
  background: var(--cta-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Utility: divider line */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--card-border), transparent);
  border: none;
}

/* Image defaults */
img {
  max-width: 100%;
  height: auto;
  display: block;
}
