/* ============================================================
   STELLAR PROPERTY HOLDINGS — Premium Upgrade Layer
   $10K Agency Quality: Glass, Motion, Depth, Cursor, Transitions
   ============================================================ */

/* ── Custom Cursor ──────────────────────────────────────────── */
*, *::before, *::after { cursor: none !important; }
#cursor {
  position: fixed;
  width: 36px; height: 36px;
  border: 1px solid rgba(201,168,76,0.6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, background 0.25s ease, opacity 0.25s ease;
  mix-blend-mode: normal;
}
#cursor-dot {
  position: fixed;
  width: 5px; height: 5px;
  background: var(--gold, #C9A84C);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease;
}
body.cursor-hover #cursor {
  width: 56px; height: 56px;
  background: rgba(201,168,76,0.08);
  border-color: var(--gold, #C9A84C);
}
body.cursor-hover #cursor-dot { transform: translate(-50%, -50%) scale(0); }
@media (hover: none) { #cursor, #cursor-dot { display: none; } }

/* ── Page Transition Overlay ────────────────────────────────── */
#page-transition {
  position: fixed;
  inset: 0;
  background: #05080F;
  z-index: 99998;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.55s cubic-bezier(0.76,0,0.24,1);
}
#page-transition.exit { opacity: 0; }

/* ── Noise Texture Overlay ──────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 1;
}

/* ── Custom Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #05080F; }
::-webkit-scrollbar-thumb { background: linear-gradient(to bottom, #C9A84C, #8B6F35); border-radius: 2px; }

/* ── Liquid Glass Navbar ────────────────────────────────────── */
.nav {
  background: transparent !important;
  border-bottom: none !important;
  box-shadow: none !important;
}
.nav.scrolled {
  background: rgba(5,8,15,0) !important;
  backdrop-filter: none !important;
}
.nav-inner {
  position: relative;
}
.nav-glass {
  position: absolute;
  inset: 0;
  background: rgba(5,8,15,0.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(201,168,76,0);
  transition: border-color 0.4s ease, background 0.4s ease;
  pointer-events: none;
  z-index: -1;
}
.nav.scrolled .nav-glass {
  background: rgba(5,8,15,0.82);
  border-bottom-color: rgba(201,168,76,0.15);
}
/* Animated shimmer line under nav */
.nav-shimmer {
  position: absolute;
  bottom: 0; left: 0;
  height: 1px;
  width: 0%;
  background: linear-gradient(90deg, transparent, #C9A84C, transparent);
  transition: width 0.6s ease;
  pointer-events: none;
}
.nav.scrolled .nav-shimmer { width: 100%; }

/* ── Hero Canvas ────────────────────────────────────────────── */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

/* ── Hero Glass Orbs ────────────────────────────────────────── */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}
.hero-orb-1 {
  width: 600px; height: 600px;
  top: -150px; right: -80px;
  background: radial-gradient(circle at 35% 35%, rgba(201,168,76,0.07) 0%, transparent 70%);
  border: 1px solid rgba(201,168,76,0.05);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  animation: orbFloat1 18s ease-in-out infinite;
}
.hero-orb-2 {
  width: 350px; height: 350px;
  bottom: 80px; right: 15%;
  background: radial-gradient(circle at 40% 30%, rgba(201,168,76,0.05) 0%, transparent 60%);
  border: 1px solid rgba(201,168,76,0.04);
  animation: orbFloat2 13s ease-in-out infinite;
}
.hero-orb-3 {
  width: 180px; height: 180px;
  top: 35%; left: 55%;
  background: radial-gradient(circle at 50% 50%, rgba(201,168,76,0.08) 0%, transparent 60%);
  border: 1px solid rgba(201,168,76,0.06);
  animation: orbFloat3 9s ease-in-out infinite;
}
@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-30px, 20px) scale(1.03); }
  66% { transform: translate(20px, -30px) scale(0.97); }
}
@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(20px, -24px) rotate(8deg); }
}
@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-16px, 16px); }
}

/* ── Hero content z-index fix ──────────────────────────────── */
.hero-content { z-index: 2; }
.hero-bg, .hero-grid { z-index: 0; }

/* ── Split Text Animation ───────────────────────────────────── */
.split-text { overflow: hidden; }
.split-word { display: inline; white-space: nowrap; }
.split-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(60%) rotate(4deg);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.split-char.visible {
  opacity: 1;
  transform: none;
}
.split-word { display: inline-block; overflow: hidden; white-space: nowrap; }
.split-word + .split-word::before { content: '\00a0'; }

/* ── Glassmorphism Property Cards ───────────────────────────── */
.property-card {
  background: rgba(13,18,32,0.7) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
  border: 1px solid rgba(201,168,76,0.1) !important;
  transform-style: preserve-3d;
  will-change: transform;
  transition: border-color 0.35s ease, box-shadow 0.35s ease !important;
  transform: perspective(1200px) rotateX(0deg) rotateY(0deg) translateZ(0px);
}
.property-card:hover {
  border-color: rgba(201,168,76,0.3) !important;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 40px rgba(201,168,76,0.05) !important;
  transform: none !important; /* JS handles the 3D transform */
}

/* ── Animated gradient border on card hover ─────────────────── */
.property-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 9px;
  background: conic-gradient(from var(--border-angle, 0deg), transparent 70%, rgba(201,168,76,0.4) 80%, transparent 90%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.35s ease;
}
.property-card:hover::before { opacity: 1; animation: borderSpin 3s linear infinite; }
@property --border-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes borderSpin { to { --border-angle: 360deg; } }

/* ── Property card image glow ────────────────────────────────── */
.property-image {
  position: relative;
  overflow: hidden;
}
.property-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.property-card:hover .property-image::after { opacity: 1; }

/* ── Premium Button Effects ─────────────────────────────────── */
.btn-primary {
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: all 0.3s ease !important;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.25) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.55s ease;
  z-index: 0;
}
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary * { position: relative; z-index: 1; }

/* Gold glow on primary CTA */
.btn-primary:hover {
  box-shadow: 0 0 30px rgba(201,168,76,0.4), 0 8px 32px rgba(201,168,76,0.25) !important;
}

/* ── Stats number glow ──────────────────────────────────────── */
.stat-number {
  text-shadow: 0 0 40px rgba(201,168,76,0.35);
}

/* ── Section header glowing label ───────────────────────────── */
.label {
  text-shadow: 0 0 20px rgba(201,168,76,0.4);
}

/* ── Gold accent line glow ──────────────────────────────────── */
.divider {
  box-shadow: 0 0 12px rgba(201,168,76,0.5);
}

/* ── Elevated service cards ─────────────────────────────────── */
.service-card {
  transition: background 0.35s ease, box-shadow 0.35s ease !important;
}
.service-card:hover {
  box-shadow: inset 0 0 40px rgba(201,168,76,0.03), 0 0 0 1px rgba(201,168,76,0.12) !important;
}

/* ── Why item glow ──────────────────────────────────────────── */
.why-item:hover .why-number {
  color: rgba(201,168,76,0.3);
  text-shadow: 0 0 30px rgba(201,168,76,0.2);
  transition: color 0.35s ease, text-shadow 0.35s ease;
}

/* ── CTA section enhanced glow orb ─────────────────────────── */
.cta-section::after {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.06) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: ctaPulse 4s ease-in-out infinite;
}
@keyframes ctaPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

/* ── Parallax hero section ───────────────────────────────────── */
.hero { overflow: hidden; }
[data-parallax] { will-change: transform; }

/* ── Page load fade-in for content ──────────────────────────── */
.page-loaded .hero-content,
.page-loaded .stats-bar {
  animation: none;
}

/* ── Scroll progress bar ─────────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #C9A84C, #E8C97E, #C9A84C);
  background-size: 200% 100%;
  animation: progressShimmer 2s linear infinite;
  z-index: 10001;
  transition: width 0.1s linear;
}
@keyframes progressShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Gold text shimmer on headline ─────────────────────────── */
.hero-title em {
  background: linear-gradient(105deg, #C9A84C 0%, #E8C97E 30%, #F5E6B8 50%, #E8C97E 70%, #C9A84C 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textShimmer 4s linear infinite;
}
@keyframes textShimmer {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* ── Enhanced nav logo mark ─────────────────────────────────── */
.nav-logo-mark {
  background: linear-gradient(135deg, #C9A84C, #E8C97E) !important;
  box-shadow: 0 0 20px rgba(201,168,76,0.3);
  transition: box-shadow 0.3s ease;
}
.nav-logo:hover .nav-logo-mark {
  box-shadow: 0 0 32px rgba(201,168,76,0.5);
}

/* ── Team card glow on hover ────────────────────────────────── */
.team-card:hover {
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(201,168,76,0.15) !important;
}
.team-card:hover .team-photo-initials {
  color: var(--gold, #C9A84C);
  opacity: 0.4;
  transition: color 0.3s ease, opacity 0.3s ease;
}

/* ── Contact form glow on focus ─────────────────────────────── */
.form-control:focus {
  box-shadow: 0 0 0 1px rgba(201,168,76,0.4), 0 0 20px rgba(201,168,76,0.08) !important;
}

/* ── Footer brand glow ──────────────────────────────────────── */
.footer-brand:hover .nav-logo-mark {
  box-shadow: 0 0 24px rgba(201,168,76,0.4);
}

/* ── Premium page hero (inner pages) ────────────────────────── */
.page-hero {
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(201,168,76,0.08) 0%, transparent 60%),
    var(--bg-deep, #05080F) !important;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
}

/* ── Floating contact form ──────────────────────────────────── */
.contact-form-wrap {
  background: rgba(13,18,32,0.8) !important;
  backdrop-filter: blur(32px) !important;
  -webkit-backdrop-filter: blur(32px) !important;
  box-shadow: 0 32px 80px rgba(0,0,0,0.4), inset 0 1px 0 rgba(201,168,76,0.08) !important;
}

/* ── Reveal upgrade — faster, crisper ───────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── Mobile: hide custom cursor ─────────────────────────────── */
@media (max-width: 768px) {
  #cursor, #cursor-dot { display: none !important; }
  *, *::before, *::after { cursor: auto !important; }
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-orb { animation: none !important; }
  .btn-primary::before { transition: none !important; }
  #cursor, #cursor-dot { display: none !important; }
  *, *::before, *::after { cursor: auto !important; }
  .split-char { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-title em { animation: none !important; -webkit-text-fill-color: #C9A84C !important; }
}
