/* Horizon Lux — Design System Extensions */

:root {
  --color-navy: #163A70;
  --color-navy-dark: #0f2a52;
  --color-gold: #C9A962;
  --color-gold-light: #E8D5A3;
  --color-surface: #FAFAFA;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: rgba(22, 58, 112, 0.15);
  color: #163A70;
}

/* Glass morphism */
.glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.glass-light {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.glass-dark {
  background: rgba(15, 42, 82, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Navbar scroll state */
.navbar-scrolled {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.04);
}

.navbar-scrolled .nav-link {
  color: #1a1a1a !important;
}

.navbar-scrolled .nav-link:hover {
  color: var(--color-navy) !important;
}

.navbar-scrolled .logo-text {
  color: var(--color-navy) !important;
}

.navbar-scrolled .hamburger-line {
  background-color: #1a1a1a;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* Property card hover */
.property-card {
  transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-out-expo);
}

.property-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px -12px rgba(22, 58, 112, 0.15);
}

.property-card .property-image {
  transition: transform 0.7s var(--ease-out-expo);
}

.property-card:hover .property-image {
  transform: scale(1.06);
}

/* Ripple effect */
.ripple-btn {
  position: relative;
  overflow: hidden;
}

.ripple-btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Gold accent line */
.gold-line {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
}

/* Section separator */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(22, 58, 112, 0.12), transparent);
}

/* Decorative blob */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

/* Counter */
.counter-value {
  font-variant-numeric: tabular-nums;
}

/* Carousel */
.carousel-track {
  display: flex;
  transition: transform 0.6s var(--ease-out-expo);
}

.carousel-slide {
  flex: 0 0 100%;
}

@media (min-width: 768px) {
  .carousel-slide {
    flex: 0 0 50%;
  }
}

@media (min-width: 1024px) {
  .carousel-slide {
    flex: 0 0 33.333%;
  }
}

/* Testimonial slider */
.testimonial-track {
  display: flex;
  transition: transform 0.7s var(--ease-out-expo);
}

.testimonial-slide {
  flex: 0 0 100%;
}

@media (min-width: 768px) {
  .testimonial-slide {
    flex: 0 0 50%;
  }
}

@media (min-width: 1024px) {
  .testimonial-slide {
    flex: 0 0 33.333%;
  }
}

/* Timeline */
.timeline-line {
  background: linear-gradient(90deg, var(--color-navy), var(--color-gold), var(--color-navy));
  height: 2px;
}

.timeline-step.active .timeline-icon {
  background: var(--color-navy);
  color: white;
  box-shadow: 0 0 0 4px rgba(22, 58, 112, 0.15);
}

/* Map placeholder */
.map-container {
  background: linear-gradient(135deg, #e8edf4 0%, #d4dce8 100%);
  position: relative;
  overflow: hidden;
}

.map-pin {
  animation: pin-bounce 2s ease-in-out infinite;
}

@keyframes pin-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Mobile menu */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.4s var(--ease-out-expo);
}

.mobile-menu.open {
  transform: translateX(0);
}

.hamburger-line {
  transition: transform 0.3s var(--ease-out-expo), opacity 0.3s;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Form focus glow */
.form-input:focus {
  box-shadow: 0 0 0 3px rgba(22, 58, 112, 0.12);
}

/* Hero parallax */
.hero-bg {
  will-change: transform;
}

/* Loading fade */
.page-loader {
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Hover glow on buttons */
.btn-glow:hover {
  box-shadow: 0 8px 32px rgba(22, 58, 112, 0.25);
}

.btn-gold-glow:hover {
  box-shadow: 0 8px 32px rgba(201, 169, 98, 0.35);
}

/* Feature card */
.feature-card {
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px -8px rgba(22, 58, 112, 0.1);
}

.feature-card:hover .feature-icon {
  transform: scale(1.08);
}

.feature-icon {
  transition: transform 0.4s var(--ease-spring);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1;
    transform: none;
  }
}
