/* ===== ROOT VARIABLES ===== */
:root {
  --gold: #d4a012;
  --gold-light: #ffd24d;
  --gold-dark: #b8860b;
  --dark: #0a0a0a;
  --darker: #050505;
  --gray: #1a1a1a;
}

/* ===== BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(212, 160, 18, 0.3);
  color: #fff;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--darker);
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* ===== PRELOADER ===== */
.sigma-logo-animate .draw-path {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: draw 2s ease forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* ===== HERO BACKGROUND ===== */
.hero-bg {
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(212, 160, 18, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(184, 134, 11, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(212, 160, 18, 0.04) 0%, transparent 50%),
    linear-gradient(180deg, #050505 0%, #0a0a0a 50%, #050505 100%);
  background-size: 200% 200%;
  animation: heroGradient 15s ease infinite;
}

@keyframes heroGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Grid Overlay */
.grid-overlay {
  background-image: 
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ===== PARTICLES ===== */
.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(212, 160, 18, 0.4);
  border-radius: 50%;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(50px);
    opacity: 0;
  }
}

/* ===== TEXT GRADIENT ===== */
.text-gradient-gold {
  background: linear-gradient(135deg, #ffd24d 0%, #d4a012 50%, #b8860b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== NAVBAR ===== */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link {
  position: relative;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #9ca3af;
  transition: color 0.3s ease;
  text-decoration: none;
}

.nav-link:hover {
  color: #d4a012;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 2px;
  background: linear-gradient(90deg, #ffd24d, #b8860b);
  border-radius: 1px;
  transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav-link.active {
  color: #ffd24d;
}

.mobile-nav-link {
  font-size: 1.5rem;
  font-weight: 600;
  color: #9ca3af;
  transition: color 0.3s ease;
  text-decoration: none;
}

.mobile-nav-link:hover {
  color: #ffd24d;
}

/* ===== BUTTON GLOW ===== */
.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-glow:hover::before {
  width: 300px;
  height: 300px;
}

/* ===== FORM INPUTS ===== */
.form-input option {
  background: #1a1a1a;
  color: #fff;
}

/* ===== SCROLL ANIMATIONS ===== */
.scroll-animate {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0s);
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== FADE IN UP ANIMATION ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

/* ===== PORTFOLIO CARD ===== */
.portfolio-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-card:hover {
  transform: translateY(-8px);
}

/* ===== SERVICE CARD ===== */
.service-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover {
  transform: translateY(-5px);
}

/* ===== LOGIN MODAL ===== */
#loginModal.active {
  display: flex;
}

.login-modal-content {
  animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ===== BACK TO TOP ===== */
#backToTop.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ===== PARALLAX ===== */
.parallax-element {
  will-change: transform;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
  .mobile-nav-link {
    font-size: 1.25rem;
  }
}

/* ===== LOADING STATE ===== */
.loading .form-input {
  pointer-events: none;
  opacity: 0.6;
}

/* ===== CUSTOM CURSOR GLOW ===== */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(212, 160, 18, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
  .cursor-glow {
    display: none;
  }
}

/* ===== SMOOTH SECTION TRANSITIONS ===== */
section {
  position: relative;
}

/* ===== FORM SUCCESS ANIMATION ===== */
@keyframes successPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.success-pulse {
  animation: successPulse 0.5s ease;
}

/* ===== TILT EFFECT ===== */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}