/**
 * Deers Creek Farms Luxury Resort - 3D Animated UI Stylesheet
 * Ultra-Modern 3D Perspective, Depth Elevations, Ambient Orbs & Glassmorphism
 */

:root {
  --gold-primary: #f59e0b;
  --gold-bright: #fbbf24;
  --gold-glow: rgba(245, 158, 11, 0.4);
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --blue-pool-glow: rgba(56, 189, 248, 0.3);
  --card-3d-shadow: 0 20px 45px -12px rgba(15, 23, 42, 0.12), 0 8px 16px -6px rgba(15, 23, 42, 0.08);
  --card-3d-hover-shadow: 0 30px 60px -15px rgba(245, 158, 11, 0.25), 0 15px 30px -8px rgba(15, 23, 42, 0.18);
}

/* Smooth Scrolling & Top Scroll Progress Bar */
html {
  scroll-behavior: smooth;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

#scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b, #10b981);
  background-size: 200% 100%;
  animation: shimmerSweep 3s infinite linear;
  z-index: 100000;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.8), 0 0 20px rgba(251, 191, 36, 0.5);
  transition: width 0.1s ease-out;
}

/* Ambient 3D Mesh Background Floating Orbs */
.ambient-3d-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
  will-change: transform;
}

.ambient-orb-gold {
  top: 5%;
  right: -5%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.35) 0%, rgba(217, 119, 6, 0.08) 60%, transparent 80%);
  animation: float3DOrb1 18s ease-in-out infinite alternate;
}

.ambient-orb-pool {
  top: 45%;
  left: -8%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.25) 0%, rgba(56, 189, 248, 0.05) 60%, transparent 80%);
  animation: float3DOrb2 22s ease-in-out infinite alternate;
}

.ambient-orb-emerald {
  bottom: 10%;
  right: 15%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.05) 60%, transparent 80%);
  animation: float3DOrb3 20s ease-in-out infinite alternate;
}

@keyframes float3DOrb1 {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-60px, 40px, 0) scale(1.12); }
  100% { transform: translate3d(-30px, 90px, 0) scale(0.95); }
}

@keyframes float3DOrb2 {
  0% { transform: translate3d(0, 0, 0) scale(0.95); }
  50% { transform: translate3d(80px, -50px, 0) scale(1.15); }
  100% { transform: translate3d(40px, -90px, 0) scale(1); }
}

@keyframes float3DOrb3 {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-50px, -40px, 0) scale(1.1); }
  100% { transform: translate3d(-80px, 30px, 0) scale(0.9); }
}

/* 3D Card Depth & Tilt Styles */
.card-3d-tilt {
  transform-style: preserve-3d;
  perspective: 1200px;
  transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  will-change: transform;
}

.card-3d-tilt:hover {
  box-shadow: var(--card-3d-hover-shadow) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
}

/* 3D Specular Light Glare Overlay on Cards */
.card-3d-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
  mix-blend-mode: overlay;
  z-index: 10;
}

.card-3d-tilt:hover .card-3d-glare {
  opacity: 1;
}

/* 3D Elevated Buttons with Tactile Depth */
button, a.btn-3d, .btn-3d {
  position: relative;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease;
  will-change: transform;
}

.btn-3d-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #0f172a !important;
  font-weight: 900 !important;
  border: 1px solid rgba(254, 240, 138, 0.6) !important;
  box-shadow: 0 6px 16px -2px rgba(245, 158, 11, 0.4), 0 2px 0 #b45309 !important;
}

.btn-3d-gold:hover {
  transform: translateY(-2.5px) scale(1.02) !important;
  box-shadow: 0 12px 26px -4px rgba(245, 158, 11, 0.6), 0 4px 0 #b45309 !important;
}

.btn-3d-gold:active {
  transform: translateY(1.5px) scale(0.98) !important;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3), 0 1px 0 #b45309 !important;
}

/* 3D Shimmer Light Animation across buttons */
@keyframes shimmerSweep {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.btn-shimmer-3d {
  position: relative;
  overflow: hidden;
}

.btn-shimmer-3d::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  animation: btnShimmer 3.5s infinite;
}

@keyframes btnShimmer {
  0%, 60% { left: -150%; }
  100% { left: 200%; }
}

/* 3D Floating Badges */
.badge-3d-floating {
  animation: floatBadge 3.2s ease-in-out infinite alternate;
  will-change: transform;
  transform-style: preserve-3d;
}

@keyframes floatBadge {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(0.8deg); }
  100% { transform: translateY(-7px) rotate(-0.8deg); }
}

/* 3D Glow Pulse for Hero Highlights */
.glow-pulse-3d {
  animation: glowPulse 2.8s infinite;
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4), 0 0 30px rgba(245, 158, 11, 0.2);
  }
  50% {
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.7), 0 0 50px rgba(245, 158, 11, 0.35);
  }
}

/* 3D Image Container Depth Frame */
.img-frame-3d {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  box-shadow: 0 18px 40px -10px rgba(15, 23, 42, 0.18);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}

.img-frame-3d:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 25px 55px -12px rgba(245, 158, 11, 0.3), 0 10px 20px -5px rgba(15, 23, 42, 0.15);
}

.img-frame-3d img, .img-frame-3d video {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.img-frame-3d:hover img, .img-frame-3d:hover video {
  transform: scale(1.05);
}

/* 3D Section Entrance Reveal */
.reveal-3d {
  opacity: 0;
  transform: translateY(30px) perspective(800px) rotateX(6deg);
  transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-3d.active {
  opacity: 1;
  transform: translateY(0) perspective(800px) rotateX(0deg);
}

/* Glassmorphism Luxury Panels */
.glass-panel-3d {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 20px 45px -15px rgba(15, 23, 42, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.8) !important;
}

/* Mobile Viewport Safeguards & Footer Clearance */
@media (max-width: 768px) {
  /* Ensures footer text, navigation & copyright are completely visible above the fixed bottom bar */
  footer {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
