/* ============================================
   Royal Traders - Custom Styles
   Supplements Tailwind CSS with animations
   and custom utilities
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@400;500;600;700;800;900&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --navy: #0b1d3a;
  --navy-light: #142d54;
  --blue: #1e4d8c;
  --blue-light: #2a6bc7;
  --gold: #c9a84c;
  --gold-light: #e4c96a;
  --gold-dark: #a68a3a;
  --white: #ffffff;
  --off-white: #f7f8fa;
  --gray-100: #f1f3f6;
  --gray-200: #e2e6ec;
  --gray-600: #6b7a8d;
  --gray-800: #2d3748;
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6,
.font-display {
  font-family: 'Playfair Display', serif;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-light); }

/* ---------- Scroll Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1), transform 0.7s cubic-bezier(.4,0,.2,1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1), transform 0.7s cubic-bezier(.4,0,.2,1);
}
.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1), transform 0.7s cubic-bezier(.4,0,.2,1);
}
.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children */
.stagger > *:nth-child(1) { transition-delay: 0.05s; }
.stagger > *:nth-child(2) { transition-delay: 0.15s; }
.stagger > *:nth-child(3) { transition-delay: 0.25s; }
.stagger > *:nth-child(4) { transition-delay: 0.35s; }
.stagger > *:nth-child(5) { transition-delay: 0.45s; }
.stagger > *:nth-child(6) { transition-delay: 0.55s; }

/* ---------- Hero ---------- */
.hero-gradient {
  background: linear-gradient(135deg, rgba(11,29,58,0.92) 0%, rgba(30,77,140,0.85) 50%, rgba(11,29,58,0.88) 100%);
}

.hero-bg {
  background-image: url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* ---------- Blob / Decorative Shapes ---------- */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Gold Gradient Text ---------- */
.text-gradient-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Card Hover ---------- */
.card-hover {
  transition: transform 0.35s cubic-bezier(.4,0,.2,1), box-shadow 0.35s ease;
}
.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(11,29,58,0.15);
}

/* ---------- Property Card Image Zoom ---------- */
.property-img {
  transition: transform 0.5s cubic-bezier(.4,0,.2,1);
}
.group:hover .property-img {
  transform: scale(1.08);
}

/* ---------- Button Shine ---------- */
.btn-shine {
  position: relative;
  overflow: hidden;
}
.btn-shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: skewX(-25deg);
  transition: left 0.5s ease;
}
.btn-shine:hover::after {
  left: 125%;
}

/* ---------- Navbar Glass ---------- */
.navbar-glass {
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  background: rgba(11, 29, 58, 0.85);
  border-bottom: 1px solid rgba(201, 168, 76, 0.15);
}

/* ---------- Section Divider ---------- */
.section-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
}

/* ---------- Testimonial Card ---------- */
.testimonial-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid rgba(201, 168, 76, 0.15);
  backdrop-filter: blur(10px);
}

/* ---------- Pulse Ring ---------- */
@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 1; }
  60% { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(0.9); opacity: 0; }
}
.pulse-ring::before {
  content: '';
  position: absolute;
  inset: -6px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  animation: pulse-ring 2s infinite;
}

/* ---------- Counter ---------- */
.counter-box {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border: 1px solid rgba(201, 168, 76, 0.2);
}

/* ---------- CTA Section ---------- */
.cta-gradient {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 50%, var(--navy-light) 100%);
}

/* ---------- Footer ---------- */
.footer-gradient {
  background: linear-gradient(180deg, var(--navy) 0%, #060f1f 100%);
}

/* ---------- Form Focus ---------- */
.form-input:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

/* ---------- Loading Spinner ---------- */
@keyframes spinner {
  to { transform: rotate(360deg); }
}
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spinner 0.6s linear infinite;
  display: inline-block;
}

/* ---------- Mobile Menu ---------- */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}
.mobile-menu.open {
  transform: translateX(0);
}

/* ---------- Floating Animation ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.float-anim {
  animation: float 3s ease-in-out infinite;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hero-bg {
    background-attachment: scroll;
  }
}
