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

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: #065f46;
  border-radius: 4px;
}

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

/* Selection */
::selection {
  background: #065f46;
  color: #fefce8;
}

/* Navigation */
.navbar-scrolled {
  background: rgba(10, 10, 10, 0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(251, 191, 36, 0.1);
}

.navbar-scrolled .nav-link {
  color: #d1fae5 !important;
}

/* Reveal Animations - Progressive Enhancement */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Menu */
.mobile-link {
  position: relative;
}

.mobile-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 1px;
  background: #fbbf24;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.mobile-link:hover::after {
  width: 100%;
}

/* Button Hover Effects */
a {
  text-decoration: none;
}

/* Image Hover */
img {
  max-width: 100%;
  height: auto;
}

/* Focus Styles */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

/* Gradient Text Utility */
.gradient-text {
  background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glow Effects */
.glow-emerald {
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.15);
}

.glow-gold {
  box-shadow: 0 0 40px rgba(251, 191, 36, 0.15);
}

/* Smooth Transitions */
.transition-all-300 {
  transition: all 0.3s ease;
}

.transition-all-500 {
  transition: all 0.5s ease;
}

/* Card Hover */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Loading State */
.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Star Animation */
@keyframes twinkle {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.star {
  animation: twinkle 3s ease-in-out infinite;
}

.star:nth-child(2) {
  animation-delay: 0.5s;
}

.star:nth-child(3) {
  animation-delay: 1s;
}

/* Floating Animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.float {
  animation: float 6s ease-in-out infinite;
}

/* Border Gradient Animation */
@keyframes borderRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Form Focus States */
input:focus,
textarea:focus {
  border-color: rgba(16, 185, 129, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Image Lazy Load Fallback */
img[loading="lazy"] {
  opacity: 1;
  transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Responsive Typography */
@media (max-width: 640px) {
  .font-serif {
    font-size: clamp(1.5rem, 8vw, 2.5rem);
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .font-serif {
    font-size: clamp(2rem, 5vw, 3.5rem);
  }
}

@media (min-width: 1025px) {
  .font-serif {
    font-size: clamp(2.5rem, 4vw, 4.5rem);
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Print Styles */
@media print {
  nav,
  button,
  .no-print {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  section {
    page-break-inside: avoid;
  }
}
