/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #1a1a2e;
  --secondary-color: #16213e;
  --accent-color: #0f3460;
  --highlight-color: #e94560;
  --text-color: #eaeaea;
  --transition-speed: 0.8s;
}

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--primary-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Animated Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(233, 69, 96, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(15, 52, 96, 0.15) 0%, transparent 50%);
  animation: backgroundPulse 10s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes backgroundPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

/* Section Styling with Parallax */
.section {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem;
  transition: all var(--transition-speed) ease;
  overflow: hidden;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: inherit;
  transform-origin: center;
  z-index: 0;
}

.section-content {
  max-width: 1200px;
  width: 100%;
  z-index: 10;
  position: relative;
}

/* Navigation */
.nav-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(234, 234, 234, 0.1);
  transition: transform 0.3s ease, background 0.3s ease;
  animation: slideInDown 0.8s ease;
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.nav-hidden {
  transform: translateY(-100%);
}

.nav-container.scrolled {
  background: rgba(26, 26, 46, 0.98);
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

nav {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--highlight-color);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.logo::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--highlight-color);
  transition: width 0.3s ease;
}

.logo:hover::after {
  width: 100%;
}

.logo:hover {
  transform: scale(1.05);
  text-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--highlight-color);
  transition: width 0.3s ease;
}

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

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

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

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Hero Background Video */
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  opacity: 0.25;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  filter: blur(2px);
}

.hero::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

@keyframes rotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  margin-bottom: 1rem;
  background: linear-gradient(45deg, var(--text-color), var(--highlight-color), var(--text-color));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite, fadeInUp 1s ease 0.2s both;
  font-weight: 900;
  letter-spacing: -2px;
  position: relative;
  z-index: 10;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

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

.hero p {
  font-size: clamp(1rem, 3vw, 1.5rem);
  margin-bottom: 2rem;
  opacity: 0.9;
  animation: fadeInUp 1s ease 0.4s both;
  position: relative;
  z-index: 10;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--highlight-color);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: fadeInUp 1s ease 0.6s both;
  position: relative;
  overflow: hidden;
  z-index: 10;
  box-shadow: 0 5px 15px rgba(233, 69, 96, 0.3);
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.cta-button:hover::before {
  width: 300px;
  height: 300px;
}

.cta-button:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 40px rgba(233, 69, 96, 0.5);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  z-index: 10;
  cursor: pointer;
  transition: all 0.3s ease;
}

.scroll-indicator:hover {
  transform: translateX(-50%) scale(1.2);
}

.scroll-indicator svg {
  width: 30px;
  height: 30px;
  opacity: 0.7;
  filter: drop-shadow(0 0 10px rgba(233, 69, 96, 0.5));
}

/* Section Backgrounds */
.section:nth-child(odd) {
  background: var(--primary-color);
}

.section:nth-child(even) {
  background: var(--secondary-color);
}

/* Content Cards with 3D Effect */
.card {
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  cursor: grab;
  transform-style: preserve-3d;
  perspective: 1000px;
}

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

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

.card:hover {
  transform: translateY(-10px) rotateX(5deg);
  border-color: var(--highlight-color);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(233, 69, 96, 0.2);
}

.card:active {
  cursor: grabbing;
}

.card.dragging {
  opacity: 0.8;
  cursor: grabbing;
  transform: rotate(5deg) scale(1.05);
  z-index: 100;
}

/* Grid Layouts */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* Typography */
h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
  color: var(--highlight-color);
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--highlight-color);
  box-shadow: 0 0 10px var(--highlight-color);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.card:hover h3 {
  color: var(--highlight-color);
  transform: translateX(10px);
}

p {
  margin-bottom: 1rem;
  opacity: 0.9;
}

/* Social Links */
.social-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.social-links a {
  color: var(--text-color);
  font-size: 1.5rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.social-links a::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--highlight-color);
  opacity: 0;
  transform: scale(0);
  transition: all 0.4s ease;
  z-index: -1;
}

.social-links a:hover::before {
  opacity: 0.2;
  transform: scale(1.2);
}

.social-links a:hover {
  color: var(--highlight-color);
  transform: translateY(-5px) rotate(5deg) scale(1.1);
  box-shadow: 0 10px 30px rgba(233, 69, 96, 0.4);
}

/* Footer */
footer {
  background: var(--primary-color);
  padding: 2rem;
  text-align: center;
  border-top: 1px solid rgba(234, 234, 234, 0.1);
  position: relative;
  z-index: 2;
}

/* Scroll Animations */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scale-in.active {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children animations */
.grid .card {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.grid.animate-in .card {
  opacity: 1;
  transform: translateY(0);
}

.grid.animate-in .card:nth-child(1) { transition-delay: 0.1s; }
.grid.animate-in .card:nth-child(2) { transition-delay: 0.2s; }
.grid.animate-in .card:nth-child(3) { transition-delay: 0.3s; }
.grid.animate-in .card:nth-child(4) { transition-delay: 0.4s; }
.grid.animate-in .card:nth-child(5) { transition-delay: 0.5s; }
.grid.animate-in .card:nth-child(6) { transition-delay: 0.6s; }

/* Parallax Elements */
.parallax {
  transition: transform 0.1s ease-out;
  will-change: transform;
}

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

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

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

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

/* Glowing text effect */
.glow-text {
  animation: textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {
  0%, 100% {
    text-shadow: 0 0 5px rgba(233, 69, 96, 0.5);
  }
  50% {
    text-shadow: 0 0 20px rgba(233, 69, 96, 0.8), 0 0 30px rgba(233, 69, 96, 0.6);
  }
}

/* Loading animation */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .nav-links {
    gap: 1rem;
    font-size: 0.9rem;
  }
  
  .section {
    padding: 1rem;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .card:hover {
    transform: translateY(-5px);
  }
  
  .social-links a {
    width: 50px;
    height: 50px;
  }
}

/* Smooth scroll for browsers that don't support scroll-snap */
@supports not (scroll-snap-type: y mandatory) {
  html {
    scroll-behavior: smooth;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--primary-color);
}

::-webkit-scrollbar-thumb {
  background: var(--highlight-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ff5577;
}

/* Selection */
::selection {
  background: var(--highlight-color);
  color: white;
}
