/* ===== ENHANCEMENT LAYER — v2.0 visual + motion polish ===== */

/* --- Fluid type scale upgrade: tighter headline rhythm --- */
h1 { letter-spacing: -0.025em; line-height: 1.08; }
h2 { letter-spacing: -0.02em; line-height: 1.15; }
.hero h1, .page-hero h1 { font-weight: 600; }

/* --- Gradient text accent utility --- */
.text-gradient {
  background: linear-gradient(135deg, var(--navy) 0%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* --- Glass header upgrade --- */
header {
  background: rgba(253, 251, 246, 0.72) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
}
header.scrolled {
  box-shadow: 0 6px 24px rgba(28, 46, 92, 0.08);
  border-bottom-color: transparent;
}

/* --- Button shine micro-interaction --- */
.btn-primary, .btn-getcare, .btn-navy {
  position: relative; overflow: hidden;
}
.btn-primary::after, .btn-getcare::after, .btn-navy::after {
  content: ""; position: absolute; top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.btn-primary:hover::after, .btn-getcare:hover::after, .btn-navy:hover::after {
  left: 130%;
}

/* --- Animated link underline --- */
a.underline-anim { position: relative; }
a.underline-anim::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1.5px;
  background: currentColor; transform: scaleX(0);
  transform-origin: right; transition: transform 0.3s ease;
}
a.underline-anim:hover::after { transform: scaleX(1); transform-origin: left; }

/* --- Scroll reveal --- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s cubic-bezier(.2,.8,.2,1), transform 0.7s cubic-bezier(.2,.8,.2,1); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }
.reveal.delay-3 { transition-delay: 0.24s; }
.reveal.delay-4 { transition-delay: 0.32s; }

/* --- Card upgrade: richer hover, subtle inner glow --- */
.card {
  position: relative;
  border: 1px solid var(--border);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s, border-color 0.35s;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), rgba(201,160,99,0.08), transparent 40%);
  opacity: 0; transition: opacity 0.35s; pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card:hover { transform: translateY(-6px); border-color: var(--gold-light); box-shadow: 0 20px 50px -12px rgba(28,46,92,0.20); }
.card .icon-wrap { transition: transform 0.35s cubic-bezier(.2,.8,.2,1), background 0.35s; }
.card:hover .icon-wrap { transform: scale(1.08) rotate(-3deg); background: var(--gold); color: #fff; }

/* --- Bento service grid (index only) --- */
.bento-services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 1.5rem;
}
.bento-services .card { padding: 2.2rem; display: flex; flex-direction: column; }
.bento-services .card h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.bento-services .card .btn-link { margin-top: auto; padding-top: 1.2rem; }
.bento-services .card.feature {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
}
.bento-services .card.feature h3 { color: #fff; }
.bento-services .card.feature p { color: #d8e0ef; }
.bento-services .card.feature .icon-wrap { background: rgba(255,255,255,0.14); color: var(--gold); }
.bento-services .card.feature .btn-link { color: var(--gold); }
.bento-services .card.feature .service-badge { background: var(--gold); }

/* --- Hero: animated gradient mesh --- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: -20%;
  background:
    radial-gradient(45% 55% at 18% 22%, rgba(201,160,99,0.35), transparent 60%),
    radial-gradient(40% 50% at 82% 30%, rgba(91,186,220,0.28), transparent 60%),
    radial-gradient(50% 50% at 50% 100%, rgba(28,46,92,0.55), transparent 60%);
  filter: blur(20px); z-index: -1;
  animation: meshDrift 18s ease-in-out infinite alternate;
}
@keyframes meshDrift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(-3%, -2%, 0) scale(1.08); }
}

/* --- Hero eyebrow chip --- */
.hero-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22);
  color: #fff; padding: 0.5rem 1rem; border-radius: 999px;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.5px;
  backdrop-filter: blur(6px); margin-bottom: 1.5rem;
}
.hero-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: #7ce38b; box-shadow: 0 0 0 0 rgba(124,227,139,0.7); animation: pulseDot 2.2s infinite; }
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(124,227,139,0.7); }
  70% { box-shadow: 0 0 0 10px rgba(124,227,139,0); }
  100% { box-shadow: 0 0 0 0 rgba(124,227,139,0); }
}

/* --- Trust strip: fade-in on load --- */
.trust-strip { position: relative; z-index: 2; }

/* --- Stat count-up --- */
.stat .num { font-variant-numeric: tabular-nums; }

/* --- Service area map polish --- */
.wi-map .wi-region { transition: fill 0.25s ease, filter 0.25s ease; }
.wi-map a:hover .wi-region { filter: drop-shadow(0 4px 10px rgba(201,160,99,0.55)); }
.wi-map .wi-marker circle { transition: r 0.25s ease, fill 0.25s ease; }
.wi-map a:hover .wi-marker circle { r: 8.5; fill: #b35a12; }

/* --- Testimonial card polish --- */
.testimonial, .featured-quote, .featured-testimonial {
  position: relative;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s;
}
.testimonial:hover, .featured-quote:hover, .featured-testimonial:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px -20px rgba(28,46,92,0.28);
}

/* --- Section title: add subtle gradient underline --- */
.section-title h2 { position: relative; display: inline-block; }
.section-title h2::after {
  content: ""; display: block; width: 56px; height: 3px;
  margin: 0.9rem auto 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
}

/* --- Eyebrow: gradient dot before --- */
.eyebrow::before {
  content: ""; display: inline-block; width: 18px; height: 2px;
  background: var(--gold); vertical-align: middle;
  margin-right: 0.55rem; border-radius: 1px;
}

/* --- Desktop sticky CTA (appears after scrolling past hero) --- */
.sticky-cta-desktop {
  position: fixed; top: 50%; right: 1.5rem; transform: translateY(-50%) translateX(140%);
  z-index: 60; display: flex; flex-direction: column; gap: 0.6rem;
  transition: transform 0.5s cubic-bezier(.2,.8,.2,1);
}
.sticky-cta-desktop.show { transform: translateY(-50%) translateX(0); }
.sticky-cta-desktop .btn {
  writing-mode: vertical-rl; text-orientation: mixed;
  padding: 1.1rem 0.7rem; font-size: 0.85rem; letter-spacing: 0.5px;
  box-shadow: 0 10px 30px rgba(28,46,92,0.25);
}
@media (max-width: 1100px) { .sticky-cta-desktop { display: none; } }

/* --- Mobile: hide desktop sticky when floating bar shows --- */
@media (max-width: 880px) {
  .sticky-cta-desktop { display: none !important; }
  .bento-services { grid-template-columns: 1fr !important; }
  .bento-services .card.feature { grid-column: span 1; }
}

/* --- Inner page hero: gentle animated glow (restrained for a care brand) --- */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
}
.page-hero::before {
  content: ""; position: absolute; inset: -20%;
  background:
    radial-gradient(40% 55% at 18% 20%, rgba(201,160,99,0.16), transparent 60%),
    radial-gradient(35% 45% at 85% 25%, rgba(91,186,220,0.12), transparent 60%),
    radial-gradient(45% 50% at 50% 115%, rgba(0,0,0,0.28), transparent 60%);
  filter: blur(18px); z-index: -1;
  animation: pageHeroDrift 16s ease-in-out infinite alternate;
}
@keyframes pageHeroDrift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(2%, 2%, 0) scale(1.06); }
}
.page-hero > * { position: relative; z-index: 1; }

/* --- Value card / benefit / service-detail hover polish (inner pages) --- */
.value-card, .benefit, .service-detail, .location-card {
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s, border-color 0.35s;
}
.value-card:hover, .benefit:hover, .service-detail:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 50px -18px rgba(28,46,92,0.25);
}

/* --- Reduced motion safety --- */
@media (prefers-reduced-motion: reduce) {
  .hero::before, .page-hero::before { animation: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .btn-primary::after, .btn-getcare::after, .btn-navy::after { display: none; }
  .hero-chip .dot { animation: none; }
}