/* ===== Base & Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(212, 160, 23, 0.3);
  color: #f5f0f8;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #120b18;
}
::-webkit-scrollbar-thumb {
  background: #3d1d3d;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #5c2d5c;
}

/* ===== Navbar ===== */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #D4A017;
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

#navbar.scrolled {
  background: rgba(18, 11, 24, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 160, 23, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===== Mobile Menu ===== */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.menu-line {
  display: block;
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#mobile-menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
}
#mobile-menu-btn.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 1.5rem;
}

/* ===== Floating Cards ===== */
@keyframes float1 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(0.5deg); }
}
@keyframes float2 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(-0.5deg); }
}
@keyframes float3 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(0.5deg); }
}
@keyframes float4 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(-0.5deg); }
}

.floating-card {
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
.card-1 { animation: float1 4s ease-in-out infinite; }
.card-2 { animation: float2 5s ease-in-out infinite; }
.card-3 { animation: float3 4.5s ease-in-out infinite; }
.card-4 { animation: float4 5.5s ease-in-out infinite; }

/* ===== Product Cards ===== */
.product-card {
  transform: translateY(0);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}
.product-card:hover {
  transform: translateY(-6px);
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}
.testimonial-card:hover {
  transform: translateY(-4px);
}

/* ===== Reveal Animations ===== */
.reveal {
  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);
}
.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; }

/* ===== Gold shimmer line ===== */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.gold-shimmer {
  background: linear-gradient(90deg, #D4A017, #f5c842, #D4A017);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ===== Pulse dot ===== */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 160, 23, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(212, 160, 23, 0); }
}
.pulse-dot {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* ===== Form focus states ===== */
input:focus, select:focus, textarea:focus {
  outline: none;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
  .floating-card {
    display: none;
  }
}

/* ===== Subtle grain texture overlay ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}
