/* =========================================
   ULTRA-PREMIUM MOTION & AQUATIC SYSTEM (V5)
   ========================================= */

/* High-End Typography & Rhythm */
h1 { letter-spacing: -0.03em; line-height: 1.05; }
h2 { letter-spacing: -0.02em; line-height: 1.15; }
h3, h4 { letter-spacing: -0.01em; }
p, .area-desc {
  line-height: 1.85 !important;
  color: #4a4a4a !important; 
  font-weight: 400;
}
.subhead {
  letter-spacing: 0.15em; 
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--color-accent) !important;
  font-weight: 800;
  margin-bottom: 2rem;
}

/* =========================================
   GLOBAL DARK BACKGROUND READABILITY (ZERO EXCEPTIONS)
   ========================================= */
.page-hero-content *, 
.hero-content *, 
.cta-strip *, 
.tech-section *, 
.area-block *, 
.footer-grid *, 
.dark-section *,
.owner-image-placeholder span,
.value-card.bg-dark *,
.service-card-primary * {
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.page-hero-content p, .cta-strip p, .hero-content p, .service-card-primary p {
  font-weight: 600 !important;
  opacity: 1 !important;
}

/* Base Spacing Enhancements */
@media (min-width: 1024px) {
  .section-padding { padding: 140px 0; }
  .split-grid { gap: 6rem; align-items: center; }
}

/* Rules applied globally to remove visual noise */
.apart-card { border-left: none !important; border: 1px solid #eaeaea !important; }

/* Easing Master Variables */
:root {
  --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-mask: cubic-bezier(0.7, 0, 0.1, 1);
  --ease-liquid: cubic-bezier(0.25, 1, 0.5, 1);
  --shadow-float: 0 40px 80px rgba(0,0,0,0.08), 0 15px 30px rgba(0,0,0,0.04);
  --shadow-rest: 0 10px 30px rgba(0,0,0,0.03);
}

/* Parallax Protection */
.page-hero, .hero {
  background-attachment: fixed !important;
  animation: none !important;
  transform: none !important;
}

/* 1. Dramatic Content Reveal System */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s var(--ease-reveal), transform 1.2s var(--ease-reveal);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 2. THE GRAND AQUATIC LIQUID SYSTEM */
@keyframes liquidFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes waterRippleRadiate {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.06); opacity: 0; }
}

.luxury-frame-wrapper {
  position: relative;
  z-index: 1;
  /* padding removed to fix the black strip boundary breaking */
}
.luxury-img-inner {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: var(--shadow-rest);
  transition: box-shadow 0.8s var(--ease-reveal);
  z-index: 2;
  /* background: #000 REMOVED fixing black strip entirely */
}

/* Liquid Shimmer Image Wipe Mask */
.luxury-img-inner::after {
  content: '';
  position: absolute;
  top: -20%; left: -50%; width: 200%; height: 140%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255,255,255,0.4) 35%,
    rgba(226,221,192,1) 50%,
    rgba(255,255,255,0.4) 65%,
    transparent 100%
  );
  transform: translateX(-100%);
  transition: transform 1.8s var(--ease-liquid);
  z-index: 10;
  pointer-events: none;
  mix-blend-mode: overlay;
}
.luxury-frame-wrapper.is-visible .luxury-img-inner::after {
  transform: translateX(100%);
}

.luxury-img-inner img {
  opacity: 0;
  transform: scale(1.1) !important; 
  transition: transform 2s var(--ease-reveal), opacity 1.5s var(--ease-reveal) !important;
  will-change: transform, opacity;
}
.luxury-frame-wrapper.is-visible .luxury-img-inner img {
  opacity: 1;
  transform: scale(1) !important;
}
.luxury-frame-wrapper:hover .luxury-img-inner img {
  transform: scale(1.03) !important;
}
.luxury-img-inner { background: transparent !important; }
.luxury-img-inner img { margin-bottom: 0 !important; }
.luxury-frame-wrapper > h3, .luxury-frame-wrapper > h4 { margin-top: 1rem; margin-bottom: 0 !important; }

/* ::before is now used for poolwater tint shimmer — see Phase 2 section below */

/* =========================================
   PHASE 2: CONTAINED WATER SHIMMER ON HOVER
   Replaces offset accent box. Stays inside
   image bounds. Pool-water inspired, subtle.
   ========================================= */

/* Water shimmer sweep on hover — retriggers the in-image sheen */
.luxury-frame-wrapper:hover .luxury-img-inner::after {
  transform: translateX(110%);
  transition: transform 1.4s var(--ease-liquid);
}

/* Subtle poolwater tint overlay on hover — faint aqua wash */
@keyframes waterTint {
  0%   { opacity: 0; }
  40%  { opacity: 1; }
  100% { opacity: 0; }
}
.luxury-img-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(100, 180, 220, 0.32) 0%, transparent 70%);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  z-index: 12;
  transition: opacity 0.6s var(--ease-liquid);
}
.luxury-frame-wrapper:hover .luxury-img-inner::before {
  opacity: 1;
  transition: opacity 0.4s var(--ease-liquid);
}

/* Inset ring pulse on the ::before overlay — no box-shadow conflict */
@keyframes waterRingPulse {
  0%   { box-shadow: inset 0 0 0 0 rgba(100, 180, 220, 0.0); }
  50%  { box-shadow: inset 0 0 0 15px rgba(100, 200, 255, 0.7); }
  100% { box-shadow: inset 0 0 0 25px rgba(100, 200, 255, 0.0); }
}
.luxury-frame-wrapper:hover .luxury-img-inner::before {
  animation: waterRingPulse 1.6s var(--ease-liquid) forwards;
}

/* 3. Cards & Grids */
.value-card, .apart-card, .included-card, .service-card {
  position: relative;
  background: #ffffff;
  transition: transform 0.6s var(--ease-reveal), box-shadow 0.6s var(--ease-reveal);
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
  z-index: 1;
  overflow: hidden;
  border: 1px solid #eaeaea;
}
.value-card p, .apart-card p { color: #4a4a4a !important; }

.value-card::before, .apart-card::before, .included-card::before {
  content: '';
  position: absolute; inset: 0;
  border-bottom: 4px solid var(--color-accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s var(--ease-reveal);
  z-index: -1;
}
.value-card:hover, .apart-card:hover, .included-card:hover, .service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-float);
}
.value-card:hover::before, .apart-card:hover::before, .included-card:hover::before {
  transform: scaleY(1);
}

/* 4. Luxury Hero Entrance Text Only */
@keyframes luxuryFadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-hero-content h1, .hero-content h1 {
  animation: luxuryFadeUp 1.2s var(--ease-reveal) 0.1s both;
}
.page-hero-content > p, .hero-content > p {
  animation: luxuryFadeUp 1.2s var(--ease-reveal) 0.3s both;
}
.page-hero-content .btn, .hero-content .btn, .hero-buttons {
  animation: luxuryFadeUp 1.2s var(--ease-reveal) 0.5s both;
}

/* 5. Custom Button Unification */
.btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: color 0.4s var(--ease-reveal), border-color 0.4s, box-shadow 0.4s;
  padding: 1.2rem 3rem !important; 
  font-size: 1.1rem !important;
  background: transparent;
}
.btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: var(--color-accent);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-reveal);
}
.btn:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Button Pulse/Ripple effect on Hover natively */
@keyframes buttonRippleWater {
  0% { box-shadow: 0 0 0 0 rgba(226, 221, 192, 0.7); }
  100% { box-shadow: 0 0 0 18px rgba(226, 221, 192, 0); }
}
.btn:hover {
  animation: buttonRippleWater 1.5s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.btn-dark {
  background-color: var(--color-primary);
  color: #fff !important;
  border: 2px solid var(--color-primary);
}
.btn-dark:hover {
  color: var(--color-primary) !important;
  border-color: var(--color-accent) !important;
  box-shadow: var(--shadow-float);
}

.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-primary) !important;
  border: 2px solid var(--color-accent);
  text-shadow: none !important; 
}
.btn-accent::after {
  background: var(--color-primary); 
}
.btn-accent:hover {
  color: #fff !important;
  border-color: var(--color-primary) !important;
  box-shadow: var(--shadow-float);
}

.btn-hero-liquid {
  position: relative;
  background: linear-gradient(120deg, var(--color-accent), #fefdf6, var(--color-accent));
  background-size: 300% auto; animation-duration: 3s !important;
  color: var(--color-primary) !important;
  border: none;
  overflow: hidden;
  z-index: 1;
  animation: liquidFlow 4s ease infinite;
  box-shadow: 0 10px 30px rgba(226, 221, 192, 0.4);
  text-shadow: none !important;
}
.btn-hero-liquid::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s var(--ease-reveal);
  z-index: -1;
}
.btn-hero-liquid:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.btn-hero-liquid:hover {
  color: #fff !important;
  box-shadow: var(--shadow-float);
  animation: none; 
}

.btn.magnetic-active {
  transition: box-shadow 0.3s ease, background-color 0.3s ease; 
}

/* Nav Link Underline (PROPERLY RESTORED) */
.nav-group a { position: relative; }
.nav-group a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--color-accent);
  transition: width 0.3s var(--ease-reveal);
}
.nav-group a:hover::after { width: 100%; }

/* Glassmorphic Header */
.site-header {
  transition: background-color 0.4s var(--ease-reveal), box-shadow 0.4s var(--ease-reveal), backdrop-filter 0.4s var(--ease-reveal);
}
.site-header.is-scrolled {
  background-color: rgba(43, 43, 43, 0.88) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Mobile Priority Safeties */
@media (max-width: 991px) {
  .luxury-img-inner::after { display: none; }
  .luxury-img-inner::before { display: none; }
  [data-reveal] { transform: translateY(20px); }
  .value-card:hover, .apart-card:hover, .included-card:hover, .service-card:hover { transform: none; box-shadow: var(--shadow-rest); }
  .btn:hover { animation: none; }
  .luxury-frame-wrapper:hover .luxury-img-inner { animation: none; }
}

/* Reduced Motion Safeguard */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
/* 4. Fix What We Do text on mobile */
.services-overview .section-header p { color: #ffffff !important; opacity: 1 !important; }

/* =========================================
   STRICT ARTIFACT ANNIHILATION
   ========================================= */
.luxury-img-inner { 
    background: transparent !important; 
    margin-bottom: 1.25rem !important; /* Always push spacer OUTSIDE wrapper */
    height: auto !important; /* Hug image */
}
.luxury-img-inner img { 
    margin-bottom: 0 !important; /* Strip inline margins that break the boundary mask */
}
/* Rebalance headings directly underneath */
.luxury-frame-wrapper > h4, .luxury-frame-wrapper > h3 { 
    margin-top: 0.5rem !important; 
}
