/* LuxeHomes Atelier - Editorial Luxury & Motion System */
:root {
  --obsidian: #0b0f17;
  --obsidian-soft: #141a26;
  --ivory: #f8f6f1;
  --ivory-deep: #efebe1;
  --gold: #c9a96e;
  --gold-light: #e3cb98;
  --gold-dark: #9e7e43;
  --slate-ink: #1e293b;
}

html {
  scroll-behavior: auto; /* Handled by Lenis */
}

body {
  background-color: var(--ivory);
  color: var(--obsidian);
  font-family: 'Plus Jakarta Sans', sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.font-serif-luxury {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--obsidian);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold), var(--gold-dark));
  border-radius: 999px;
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold));
  z-index: 9999;
  transition: width 0.08s linear;
  box-shadow: 0 0 12px rgba(201, 169, 110, 0.7);
}

/* Architectural Preloader */
#lux-preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--obsidian);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.85s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.5s ease;
}
#lux-preloader.is-done {
  transform: translateY(-100%);
  pointer-events: none;
}
.preloader-line {
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: preloaderLine 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes preloaderLine {
  to { width: 220px; }
}

/* Page Transition Overlay */
#page-curtain {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: var(--obsidian);
  transform: translateY(100%);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.55s cubic-bezier(0.77, 0, 0.175, 1);
}
#page-curtain.is-entering {
  transform: translateY(0%);
  pointer-events: all;
}

/* Custom Magnetic Cursor (Desktop) */
@media (pointer: fine) {
  .custom-cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 34px;
    height: 34px;
    border: 1.5px solid rgba(201, 169, 110, 0.75);
    border-radius: 9999px;
    pointer-events: none;
    z-index: 9995;
    transform: translate(-50%, -50%);
    transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                height 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                background-color 0.28s ease,
                border-color 0.28s ease,
                opacity 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    mix-blend-mode: normal;
    opacity: 0;
  }
  .custom-cursor-ring.is-visible {
    opacity: 1;
  }
  .custom-cursor-ring.is-badge {
    width: 88px;
    height: 88px;
    background: rgba(11, 15, 23, 0.88);
    backdrop-filter: blur(6px);
    border-color: var(--gold);
  }
  .custom-cursor-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--gold-light);
    text-transform: uppercase;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .custom-cursor-ring.is-badge .custom-cursor-label {
    opacity: 1;
    transform: scale(1);
  }
}

/* Header Glassmorphism States */
.site-header {
  transition: background-color 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              backdrop-filter 0.45s ease,
              border-color 0.45s ease,
              box-shadow 0.45s ease;
}
.site-header.is-transparent {
  background-color: rgba(11, 15, 23, 0.28);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.site-header.is-scrolled {
  background-color: rgba(11, 15, 23, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(201, 169, 110, 0.22);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* Animated Nav Underline */
.nav-link-luxury {
  position: relative;
}
.nav-link-luxury::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1.5px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-link-luxury:hover::after,
.nav-link-luxury.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Ken Burns Hero Animation */
@keyframes kenBurnsSlow {
  0% { transform: scale(1.0) translate3d(0, 0, 0); }
  50% { transform: scale(1.08) translate3d(-1%, -1%, 0); }
  100% { transform: scale(1.0) translate3d(0, 0, 0); }
}
.animate-ken-burns {
  animation: kenBurnsSlow 22s ease-in-out infinite;
}

/* Infinite Marquee */
@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 34s linear infinite;
}
.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

/* 3D Property Card + Hover Secondary Image Crossfade + Glare */
.estate-card {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.estate-card:hover {
  box-shadow: 0 28px 60px -15px rgba(11, 15, 23, 0.22);
}
.estate-card .img-primary,
.estate-card .img-secondary {
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.estate-card .img-secondary {
  opacity: 0;
}
.estate-card:hover .img-primary {
  transform: scale(1.07);
}
.estate-card:hover .img-secondary {
  opacity: 1;
  transform: scale(1.07);
}

/* Gold Shimmer Button */
.btn-gold-shimmer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #c9a96e 0%, #e3cb98 50%, #b38e4c 100%);
  color: #0b0f17;
}
.btn-gold-shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-25deg);
  transition: left 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-gold-shimmer:hover::before {
  left: 150%;
}

/* Pulse Beacon for Map Pins */
@keyframes mapBeacon {
  0% { transform: scale(1); opacity: 0.85; }
  70% { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}
.map-pin-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  border: 2px solid var(--gold);
  animation: mapBeacon 2.1s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

/* Floating Heart Burst */
@keyframes heartPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.45); }
  65% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.animate-heart-pop {
  animation: heartPop 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Subtle Float Animation */
@keyframes floatGentle {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
.animate-float-gentle {
  animation: floatGentle 4.5s ease-in-out infinite;
}

/* Clip Path Reveal Helpers */
.reveal-clip {
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Interactive Tabs Indicator */
.lux-tab-btn.is-active {
  background-color: var(--obsidian);
  color: var(--gold-light);
  border-color: var(--obsidian);
}
