/* ============================================
   ANOMALY LANDING PAGE - MAIN STYLES
   ============================================ */

/* CSS VARIABLES */
:root {
  /* Colors */
  --color-purple: #8708C0;
  --color-yellow: #FEC840;
  --color-black: #000000;
  --color-white: #FFFFFF;

  /* Backgrounds */
  --bg-dark-purple: #0a0118;
  --bg-mid-purple: #1a0b2e;
  --bg-light-purple: #2d1b4e;

  /* Gradients */
  --gradient-bg: linear-gradient(180deg,
    #0a0118 0%,
    #1a0b2e 25%,
    #2d1b4e 50%,
    #1a0b2e 75%,
    #0a0118 100%
  );

  --gradient-card: linear-gradient(135deg,
    rgba(135, 8, 192, 0.3) 0%,
    rgba(254, 200, 64, 0.15) 100%
  );

  /* Typography */
  --font-display: 'Space Grotesk', 'Montserrat', sans-serif;
  --font-body: 'Inter', 'DM Sans', sans-serif;

  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 48px;
  --spacing-xl: 80px;
  --spacing-2xl: 120px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 50px;

  /* Shadows */
  --shadow-glow: 0 0 30px rgba(254, 200, 64, 0.4);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--gradient-bg);
  background-attachment: fixed;
  color: var(--color-white);
  overflow-x: hidden;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 11, 46, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--spacing-md) 0;
  transition: all var(--transition-base);
}

.navbar.scrolled {
  background: rgba(26, 11, 46, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-yellow);
  text-decoration: none;
  transition: all var(--transition-base);
}

.nav-logo:hover {
  text-shadow: 0 0 20px rgba(254, 200, 64, 0.6);
}

.nav-links {
  display: flex;
  gap: var(--spacing-lg);
  list-style: none;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: all var(--transition-base);
  position: relative;
  padding: 8px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-yellow);
  transition: width var(--transition-base);
}

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

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--color-yellow);
}

.nav-links a.active::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--color-white);
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}

.nav-toggle:hover {
  border-color: var(--color-yellow);
  color: var(--color-yellow);
}

.nav-toggle svg {
  display: block;
  width: 24px;
  height: 24px;
}

/* Mobile Menu */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;
    background: rgba(26, 11, 46, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--spacing-lg);
    gap: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    font-size: 18px;
    padding: 12px 0;
  }
}

/* Add padding to body to account for fixed navbar */
body {
  padding-top: 80px;
}

/* ============================================
   SECTION 1: HERO/INTRO
   ============================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--spacing-lg) var(--spacing-md);
}

/* Hero Background Effects */
.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

/* Animated Stars */
.stars {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(2px 2px at 20% 30%, white, transparent),
    radial-gradient(2px 2px at 60% 70%, white, transparent),
    radial-gradient(1px 1px at 50% 50%, white, transparent),
    radial-gradient(1px 1px at 80% 10%, white, transparent),
    radial-gradient(2px 2px at 90% 60%, white, transparent),
    radial-gradient(1px 1px at 33% 80%, white, transparent),
    radial-gradient(1px 1px at 15% 90%, white, transparent);
  background-size: 200% 200%;
  background-position: 0% 0%;
  opacity: 0.3;
  animation: twinkle 8s ease-in-out infinite;
}

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

/* Floating Shapes */
.floating-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.shape-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--color-purple), transparent);
  top: 10%;
  left: 10%;
  animation-duration: 25s;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(254, 200, 64, 0.3), transparent);
  bottom: 20%;
  right: 10%;
  animation-duration: 30s;
  animation-delay: -5s;
}

.shape-3 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--color-purple), transparent);
  top: 50%;
  right: 30%;
  animation-duration: 35s;
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1) translateZ(0);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1) translateZ(0);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9) translateZ(0);
  }
}

/* Hero Content */
.hero-content {
  max-width: 900px;
  text-align: center;
  z-index: 10;
  position: relative;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--color-white), var(--color-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtext {
  font-size: clamp(16px, 2.5vw, 22px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--spacing-lg);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-graphic-container {
  margin: var(--spacing-lg) auto;
  max-width: 600px;
}

.hero-graphic {
  width: 100%;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 10px 40px rgba(135, 8, 192, 0.5));
}

/* CTA Button */
.cta-button {
  background: var(--color-yellow);
  color: var(--color-black);
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 18px 48px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-base);
  display: inline-block;
  margin-top: var(--spacing-md);
}

.cta-button:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 40px rgba(254, 200, 64, 0.6);
}

.cta-button:active {
  transform: translateY(-2px) scale(0.98);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-arrow {
  width: 30px;
  height: 30px;
  border-left: 3px solid var(--color-yellow);
  border-bottom: 3px solid var(--color-yellow);
  transform: rotate(-45deg);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(10px);
  }
  60% {
    transform: translateX(-50%) translateY(5px);
  }
}

/* Fade In Animations */
.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.fade-in-up:nth-child(2) { animation-delay: 0.3s; }
.fade-in-up:nth-child(3) { animation-delay: 0.5s; }
.fade-in-up:nth-child(4) { animation-delay: 0.7s; }

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

/* ============================================
   FEATURE SECTIONS (Sections 2-5)
   ============================================ */

.feature-section {
  padding: var(--spacing-2xl) var(--spacing-md);
  position: relative;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

.feature-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Feature Card */
.feature-card {
  background: var(--gradient-card);
  border-radius: var(--radius-xl);
  padding: 60px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: var(--spacing-xl);
  align-items: center;
  transition: all var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(135, 8, 192, 0.4);
}

/* Desktop: Two-column layout with alternating sides */
@media (min-width: 1025px) {
  .feature-card {
    grid-template-columns: 1fr 1fr;
  }

  .feature-card--right .feature-content {
    order: 1;
  }

  .feature-card--right .feature-graphic {
    order: 2;
  }

  .feature-card--left .feature-content {
    order: 2;
  }

  .feature-card--left .feature-graphic {
    order: 1;
  }
}

/* Feature Content */
.feature-content {
  max-width: 600px;
}

.feature-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--color-white);
}

.feature-subtext {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

/* Feature Graphic */
.feature-graphic {
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: var(--radius-lg);
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
}

/* Large variant for specific images */
.feature-image--large {
  max-width: 800px;
}

/* ============================================
   RESPONSIVE: MOBILE
   ============================================ */

@media (max-width: 640px) {
  .hero {
    padding: var(--spacing-md);
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtext {
    font-size: 16px;
  }

  .cta-button {
    font-size: 16px;
    padding: 16px 36px;
  }

  .floating-shape {
    filter: blur(40px);
  }

  .shape-1 { width: 200px; height: 200px; }
  .shape-2 { width: 250px; height: 250px; }
  .shape-3 { width: 150px; height: 150px; }

  /* Feature Sections Mobile */
  .feature-section {
    padding: 60px var(--spacing-md);
  }

  .feature-card {
    padding: 32px;
    gap: var(--spacing-lg);
  }

  .feature-title {
    font-size: 28px;
  }

  .feature-subtext {
    font-size: 16px;
  }

  .feature-image {
    max-width: 100%;
  }

  /* Footer Mobile */
  .footer {
    padding: 40px var(--spacing-md);
  }
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  padding: var(--spacing-xl) var(--spacing-md);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: var(--spacing-2xl);
}

.footer-text {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

/* ============================================
   RESPONSIVE: TABLET
   ============================================ */

@media (min-width: 641px) and (max-width: 1024px) {
  .hero-title {
    font-size: 56px;
  }

  .hero-subtext {
    font-size: 20px;
  }
}
