/* ============================================
   IntelliDreams — Custom Styles
   ============================================ */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

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

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8B5CF6, #D4A84B);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #A78BFA, #E5C06E);
}

/* ---- Typography ---- */

.font-heading {
  font-family: 'Playfair Display', serif;
}

.font-body {
  font-family: 'Inter', sans-serif;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #D4A84B 0%, #F5E6B8 40%, #D4A84B 60%, #8B5CF6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-purple {
  background: linear-gradient(135deg, #8B5CF6 0%, #C4B5FD 50%, #8B5CF6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-gold {
  background: linear-gradient(135deg, #D4A84B 0%, #F5E6B8 50%, #D4A84B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Backgrounds ---- */

.bg-main {
  background: linear-gradient(180deg, #0c0a1a 0%, #1a1145 30%, #0f172a 70%, #0c0a1a 100%);
}

.bg-hero {
  background: radial-gradient(ellipse at 30% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 60%, rgba(212, 168, 75, 0.08) 0%, transparent 50%),
              linear-gradient(180deg, #0c0a1a 0%, #1e1055 40%, #151030 70%, #0c0a1a 100%);
}

.bg-section-alt {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(30, 16, 85, 0.3) 50%, rgba(15, 23, 42, 0) 100%);
}

/* Animated gradient orbs for hero */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 8s ease-in-out infinite;
}

.hero-orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #8B5CF6, transparent);
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.hero-orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #D4A84B, transparent);
  top: 50%;
  right: -80px;
  animation-delay: -3s;
  opacity: 0.2;
}

.hero-orb-3 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, #6366F1, transparent);
  bottom: -50px;
  left: 30%;
  animation-delay: -5s;
  opacity: 0.25;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) scale(1); }
  33% { transform: translateY(-20px) scale(1.05); }
  66% { transform: translateY(10px) scale(0.95); }
}

/* ---- Glass morphism ---- */

.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.glass-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 60px -15px rgba(139, 92, 246, 0.2),
              0 10px 30px -10px rgba(0, 0, 0, 0.4);
}

.glass-card-subtle {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.glass-card-subtle:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(212, 168, 75, 0.2);
}

/* ---- Product card image ---- */

.product-image-wrapper {
  overflow: hidden;
  position: relative;
}

.product-image-wrapper img {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.glass-card:hover .product-image-wrapper img {
  transform: scale(1.08);
}

.product-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(12, 10, 26, 0.8) 100%);
  pointer-events: none;
}

/* ---- Buttons ---- */

.btn-primary {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: inline-block;
  text-decoration: none;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px -8px rgba(139, 92, 246, 0.5);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-gold {
  background: linear-gradient(135deg, #D4A84B 0%, #B8912E 100%);
  color: #0c0a1a;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px -8px rgba(212, 168, 75, 0.5);
}

.btn-outline {
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #C4B5FD;
  padding: 0.5rem 1.25rem;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
  font-size: 0.875rem;
}

.btn-outline:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.7);
  transform: translateY(-1px);
}

/* ---- Navbar ---- */

.navbar {
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background: rgba(12, 10, 26, 0.9) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
  position: relative;
  color: #C4B5FD;
  transition: color 0.3s ease;
  text-decoration: none;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #8B5CF6, #D4A84B);
  transition: width 0.3s ease;
  border-radius: 1px;
}

.nav-link:hover {
  color: #F5E6B8;
}

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

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

/* ---- Scroll animations ---- */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Staggered card reveals */
.reveal-stagger > .reveal {
  transition-delay: calc(var(--index, 0) * 0.1s);
}

/* ---- Dividers ---- */

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3), rgba(212, 168, 75, 0.2), transparent);
}

/* ---- Collection header ---- */

.collection-header {
  position: relative;
  padding-bottom: 1rem;
}

.collection-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, #8B5CF6, #D4A84B);
  border-radius: 2px;
}

/* ---- Badge ---- */

.badge-ai {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(212, 168, 75, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 9999px;
  padding: 0.375rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #C4B5FD;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.badge-ai .dot {
  width: 6px;
  height: 6px;
  background: #8B5CF6;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

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

/* ---- Stars / sparkle decoration ---- */

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #D4A84B;
  border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
}

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

/* ---- Mobile nav ---- */

.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-menu.open {
  max-height: 300px;
}

/* ---- Misc ---- */

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Image loading placeholder */
.img-skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #8B5CF6;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Price text */
.price-text {
  color: #D4A84B;
  font-weight: 600;
}

/* Collection anchor offset for fixed nav */
.collection-anchor {
  scroll-margin-top: 100px;
}

/* About page timeline */
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #8B5CF6, #D4A84B, #8B5CF6);
  transform: translateX(-50%);
}

@media (max-width: 768px) {
  .timeline-line {
    left: 24px;
  }
}
