@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital,wght@0,400;0,400italic;1,400;1,400italic&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  --color-green: #1F6B3B;     /* Deep Green */
  --color-orange: #F26522;    /* Saffron Orange */
  --color-white: #FFFFFF;     /* Pure White */
  --color-beige: #F8F6F1;     /* Light Beige */
  --color-charcoal: #121212;  /* Dark Charcoal */
  --color-gold: #D6B16D;      /* Luxury Gold Accent */
  --color-gold-light: #EBD39C;
  --color-gold-dark: #A88344;
}

html {
  scroll-behavior: smooth;
  font-family: 'Montserrat', sans-serif;
  background-color: var(--color-beige); /* Solves bottom footer gap bounce */
  color: var(--color-charcoal);
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--color-beige);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .font-serif {
  font-family: 'Instrument Serif', serif;
}

/* Zoom & Pan Utilities */
.zoom-container {
  overflow: hidden;
  position: relative;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.zoom-container:active {
  cursor: grabbing;
}

.zoom-image {
  transition: transform 0.1s ease-out;
  transform-origin: center center;
  will-change: transform;
}

/* Premium Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-charcoal);
}

::-webkit-scrollbar-thumb {
  background: var(--color-gold);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-orange);
}

/* Glassmorphism Styles */
.glass-panel {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.glass-panel-dark {
  background: rgba(18, 18, 18, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card-light {
  background: rgba(248, 245, 239, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(29, 77, 58, 0.1);
}

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

.bg-gold-gradient {
  background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 50%, var(--color-gold-dark) 100%);
}

.bg-green-gradient {
  background: linear-gradient(135deg, #2D6A4F 0%, var(--color-green) 100%);
}

.bg-luxury-radial {
  background: radial-gradient(circle at top right, rgba(242, 101, 34, 0.08) 0%, rgba(18, 18, 18, 0) 60%), var(--color-beige);
}

.bg-luxury-dark-radial {
  background: radial-gradient(circle at bottom left, rgba(243, 106, 33, 0.08) 0%, rgba(18, 18, 18, 0) 70%), var(--color-charcoal);
}

/* Hover glow effect */
.glow-on-hover {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.glow-on-hover:hover {
  box-shadow: 0 0 25px rgba(214, 177, 109, 0.35);
  transform: translateY(-2px);
}

/* Interactive Masterplan Styling */
.plot-available {
  fill: #22c55e;
  fill-opacity: 0.25;
  stroke: #16a34a;
  stroke-width: 1.5;
  transition: all 0.3s ease;
}
.plot-available:hover {
  fill-opacity: 0.55;
  stroke: #22c55e;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.6));
  cursor: pointer;
}

.plot-reserved {
  fill: #eab308;
  fill-opacity: 0.3;
  stroke: #ca8a04;
  stroke-width: 1.5;
  transition: all 0.3s ease;
}
.plot-reserved:hover {
  fill-opacity: 0.6;
  stroke: #eab308;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 8px rgba(234, 179, 8, 0.6));
  cursor: pointer;
}

.plot-sold {
  fill: #ef4444;
  fill-opacity: 0.35;
  stroke: #dc2626;
  stroke-width: 1.5;
  transition: all 0.3s ease;
}
.plot-sold:hover {
  fill-opacity: 0.65;
  stroke: #ef4444;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.6));
  cursor: pointer;
}

/* Native CSS Scroll Reveals */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(60px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    @keyframes scaleUp {
      from {
        opacity: 0.6;
        transform: scale(0.9);
      }
      to {
        opacity: 1;
        transform: scale(1);
      }
    }

    .reveal-on-scroll {
      animation: fadeInUp auto linear backwards;
      animation-timeline: view();
      animation-range: entry 10% cover 40%;
    }
    
    .scale-on-scroll {
      animation: scaleUp auto linear backwards;
      animation-timeline: view();
      animation-range: entry 5% cover 30%;
    }
  }
}

/* Fallback transitions if no scroll timeline support */
.reveal-fallback {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-fallback.active {
  opacity: 1;
  transform: translateY(0);
}

/* Preloader styling */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #FFFFFF;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.draw-svg path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw 3.5s forwards ease-in-out;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

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

/* Hotspot pulse for Virtual Tour */
@keyframes pulseGlow {
  0% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.5; }
}
.hotspot-pulse {
  animation: pulseGlow 2s infinite ease-in-out;
}
