/* ============================================================
   ZACHMAN — Scroll Motion Layer
   Premium, restrained, deliverable transitions and effects.
   All effects honor prefers-reduced-motion.
   ============================================================ */

/* ---------- Scroll progress bar in header ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--c-gold) 0%, var(--c-gold-dark) 50%, var(--c-gold) 100%);
  background-size: 200% 100%;
  z-index: 200;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(200,162,74,0.45);
  animation: shimmerBar 4s linear infinite;
  will-change: width;
}
@keyframes shimmerBar {
  0%   { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

/* ---------- Sticky header morph on scroll ---------- */
html.scrolled .header {
  background: rgba(250, 248, 243, 0.92);
  border-bottom-color: rgba(14, 42, 71, 0.12);
  box-shadow: 0 4px 24px rgba(14, 42, 71, 0.06);
}
.header { transition: background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease); }

/* ---------- Premium reveal easing tokens ---------- */
:root {
  --ease-premium: cubic-bezier(0.22, 1, 0.36, 1);   /* expo-out, soft settle */
  --ease-elite:   cubic-bezier(0.16, 1, 0.3, 1);    /* quint-out, gallery feel */
  --ease-snap:    cubic-bezier(0.2, 0.85, 0.25, 1); /* smart-out, button feel */
}

/* ---------- Reveal base — auto-applied + explicit ---------- */
html.js-loaded .reveal:not(.in),
html.js-loaded .auto-reveal:not(.in) {
  opacity: 0;
  transform: translate3d(0, 32px, 0);
}
.reveal,
.auto-reveal {
  transition:
    opacity 1.05s var(--ease-elite),
    transform 1.15s var(--ease-elite),
    filter 1.05s var(--ease-elite);
  will-change: opacity, transform;
}
.reveal.in,
.auto-reveal.in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: none;
}

/* Directional variants */
html.js-loaded .reveal-left:not(.in)  { opacity: 0; transform: translate3d(-44px, 0, 0); }
html.js-loaded .reveal-right:not(.in) { opacity: 0; transform: translate3d( 44px, 0, 0); }
html.js-loaded .reveal-scale:not(.in) { opacity: 0; transform: scale(0.93); }
html.js-loaded .reveal-blur:not(.in)  { opacity: 0; filter: blur(16px); transform: translate3d(0, 22px, 0); }
.reveal-blur { transition: opacity 1.1s var(--ease-elite), transform 1.2s var(--ease-elite), filter 1.2s var(--ease-elite); }

.reveal-left.in,
.reveal-right.in,
.reveal-scale.in,
.reveal-blur.in {
  opacity: 1;
  transform: translate3d(0,0,0) scale(1);
  filter: none;
}

/* Stagger children — cap at 12 to avoid huge tail */
.stagger > .reveal,
.stagger > *,
.auto-stagger > * {
  --stagger-i: 0;
  transition-delay: calc(min(var(--stagger-i, 0), 12) * 70ms);
}

/* Tighter cadence on mobile so reveals don't feel slow on small screens */
@media (max-width: 760px) {
  .reveal, .auto-reveal {
    transition-duration: 0.85s, 0.95s, 0.85s;
  }
  html.js-loaded .reveal:not(.in),
  html.js-loaded .auto-reveal:not(.in) {
    transform: translate3d(0, 22px, 0);
  }
  .stagger > *, .auto-stagger > * {
    transition-delay: calc(min(var(--stagger-i, 0), 12) * 55ms);
  }
}

/* ---------- Hero word-by-word entrance ---------- */
.hero h1 .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}
.hero h1 .word > span {
  display: inline-block;
  transform: translate3d(0, 110%, 0);
  opacity: 0;
  transition:
    transform 1.05s cubic-bezier(0.2, 0.85, 0.25, 1),
    opacity 0.7s ease-out;
  will-change: transform, opacity;
}
html.is-loaded .hero h1 .word > span {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}
/* word-by-word delay */
.hero h1 .word:nth-child(1)  > span { transition-delay: 0.10s; }
.hero h1 .word:nth-child(2)  > span { transition-delay: 0.16s; }
.hero h1 .word:nth-child(3)  > span { transition-delay: 0.22s; }
.hero h1 .word:nth-child(4)  > span { transition-delay: 0.28s; }
.hero h1 .word:nth-child(5)  > span { transition-delay: 0.34s; }
.hero h1 .word:nth-child(6)  > span { transition-delay: 0.40s; }
.hero h1 .word:nth-child(7)  > span { transition-delay: 0.46s; }
.hero h1 .word:nth-child(8)  > span { transition-delay: 0.52s; }
.hero h1 .word:nth-child(9)  > span { transition-delay: 0.58s; }
.hero h1 .word:nth-child(10) > span { transition-delay: 0.64s; }
.hero h1 .word:nth-child(11) > span { transition-delay: 0.70s; }
.hero h1 .word:nth-child(12) > span { transition-delay: 0.76s; }

/* hero meta items also lift up after headline */
.hero-copy .eyebrow,
.hero-copy .hero-sub,
.hero-copy .star-strip,
.hero-copy .hero-ctas,
.hero-copy .hero-meta {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity 0.8s var(--ease),
    transform 0.9s var(--ease);
}
html.is-loaded .hero-copy .eyebrow    { opacity: 1; transform: none; transition-delay: 0.05s; }
html.is-loaded .hero-copy .hero-sub   { opacity: 1; transform: none; transition-delay: 0.85s; }
html.is-loaded .hero-copy .star-strip { opacity: 1; transform: none; transition-delay: 0.95s; }
html.is-loaded .hero-copy .hero-ctas  { opacity: 1; transform: none; transition-delay: 1.05s; }
html.is-loaded .hero-copy .hero-meta  { opacity: 1; transform: none; transition-delay: 1.15s; }

/* Hero image — clip-path reveal + slight scale-in */
.hero-image-wrap {
  --reveal: 100%;
  clip-path: inset(0 0 var(--reveal) 0);
  transition: clip-path 1.4s cubic-bezier(0.7, 0, 0.2, 1);
}
html.is-loaded .hero-image-wrap { --reveal: 0%; }

.hero-image-wrap img {
  transform: scale(1.15);
  transition: transform 1.6s cubic-bezier(0.2, 0.85, 0.25, 1);
}
html.is-loaded .hero-image-wrap img { transform: scale(1); }

/* Hero badge soft float in */
.hero-badge {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 0.9s var(--ease), transform 1s var(--ease);
  transition-delay: 1.2s;
}
html.is-loaded .hero-badge { opacity: 1; transform: none; }

/* ---------- Parallax driven by JS via CSS vars ---------- */
.parallax {
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}
.parallax-img {
  transform: scale(1.08) translate3d(0, var(--py, 0px), 0);
  will-change: transform;
  transition: transform 0.05s linear;
}

/* ---------- Section transitions / dividers ---------- */
section + section { position: relative; }

/* Hero gets a subtle ambient gradient */
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 80%;
  background:
    radial-gradient(60% 70% at 80% 20%, rgba(200,162,74,0.10), transparent 70%),
    radial-gradient(50% 60% at 10% 40%, rgba(31, 138, 138, 0.06), transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(20px);
  opacity: 0;
  animation: fadeInAmbient 1.6s 0.2s var(--ease) forwards;
}
.hero-grid { position: relative; z-index: 1; }

@keyframes fadeInAmbient {
  to { opacity: 1; }
}

/* ---------- Proof strip — number count-up emphasis ---------- */
.proof-num {
  display: inline-block;
  transition: transform 0.4s var(--ease), color 0.4s var(--ease);
}
.proof-strip {
  position: relative;
  overflow: hidden;
}
.proof-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 50% 100%, rgba(200,162,74,0.10), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.proof-strip.in-view::before { opacity: 1; }
.proof-strip.in-view .proof-num { animation: numberPulse 0.9s cubic-bezier(0.2, 0.85, 0.25, 1) both; }
.proof-strip.in-view .proof-item:nth-child(1) .proof-num { animation-delay: 0.05s; }
.proof-strip.in-view .proof-item:nth-child(2) .proof-num { animation-delay: 0.15s; }
.proof-strip.in-view .proof-item:nth-child(3) .proof-num { animation-delay: 0.25s; }
.proof-strip.in-view .proof-item:nth-child(4) .proof-num { animation-delay: 0.35s; }
@keyframes numberPulse {
  0%   { opacity: 0.4; transform: translateY(14px) scale(0.97); }
  60%  { opacity: 1; transform: translateY(0)    scale(1.04); }
  100% { opacity: 1; transform: translateY(0)    scale(1); }
}
/* Guarantee final state if user prefers reduced motion or animation gets interrupted */
.proof-num { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .proof-strip.in-view .proof-num { animation: none; opacity: 1; transform: none; }
}

/* ---------- Why grid — sticky-feel gold rail draws in ---------- */
.why-item {
  position: relative;
  padding-top: var(--s-6);
}
.why-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 56px; height: 2px;
  background: var(--c-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s cubic-bezier(0.2, 0.85, 0.25, 1) 0.2s;
}
.why-item.in::before { transform: scaleX(1); }
.why-item.in:nth-child(1)::before { transition-delay: 0.10s; }
.why-item.in:nth-child(2)::before { transition-delay: 0.25s; }
.why-item.in:nth-child(3)::before { transition-delay: 0.40s; }

/* ---------- Reviews — 3D tilt on hover, staggered entry ---------- */
.review-card {
  transform-style: preserve-3d;
  transition:
    transform 0.5s cubic-bezier(0.2, 0.85, 0.25, 1),
    box-shadow 0.4s var(--ease),
    opacity 0.9s var(--ease);
}
.review-card:hover {
  transform: translateY(-4px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  box-shadow:
    0 18px 40px rgba(14, 42, 71, 0.12),
    0 6px 12px rgba(14, 42, 71, 0.08);
}
.review-card .stars {
  background: linear-gradient(90deg, var(--c-gold) 0%, var(--c-gold-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* staggered entry on review grid */
.review-grid .review-card { transition-delay: calc(var(--i, 0) * 80ms); }

/* ---------- Loan tiles — magnetic hover lift + icon spin ---------- */
.loan-tile {
  position: relative;
  overflow: hidden;
}
.loan-tile::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(200,162,74,0.3), transparent 40%, rgba(200,162,74,0.2));
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
  z-index: 0;
}
.loan-tile:hover::after { opacity: 1; }
.loan-tile > * { position: relative; z-index: 1; }
.loan-tile .loan-icon { transition: transform 0.5s cubic-bezier(0.2, 0.85, 0.25, 1), color 0.3s var(--ease); }
.loan-tile:hover .loan-icon { transform: scale(1.08) rotate(-3deg); color: var(--c-navy); }

.loan-tile .link {
  position: relative;
}
.loan-tile .link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: var(--c-gold-dark);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.loan-tile:hover .link::after { transform: scaleX(1); }

.loans-grid .loan-tile { transition-delay: calc(var(--i, 0) * 60ms); }

/* ---------- Local image — slow zoom (clip-reveal removed; was unreliable
   on some viewports and could leave the image hidden on desktop) ---------- */
.local-image img {
  transition: transform 14s linear;
  transform: scale(1.0);
}
.local-image.in img { transform: scale(1.08); }

/* area chip bouncy entrance */
.area-list .area-chip {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity 0.6s var(--ease), transform 0.6s cubic-bezier(0.2, 1.4, 0.5, 1), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.area-list.in .area-chip { opacity: 1; transform: none; }
.area-list.in .area-chip:nth-child(1) { transition-delay: 0.10s; }
.area-list.in .area-chip:nth-child(2) { transition-delay: 0.16s; }
.area-list.in .area-chip:nth-child(3) { transition-delay: 0.22s; }
.area-list.in .area-chip:nth-child(4) { transition-delay: 0.28s; }
.area-list.in .area-chip:nth-child(5) { transition-delay: 0.34s; }
.area-list.in .area-chip:nth-child(6) { transition-delay: 0.40s; }
.area-list.in .area-chip:nth-child(7) { transition-delay: 0.46s; }
.area-list.in .area-chip:nth-child(8) { transition-delay: 0.52s; }
.area-chip:hover { transform: translateY(-2px); }

/* ---------- Team cards ---------- */
.team-card {
  transition: transform 0.5s cubic-bezier(0.2, 0.85, 0.25, 1), box-shadow 0.4s var(--ease), opacity 0.9s var(--ease);
}
.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(14, 42, 71, 0.14);
}
.team-card-image img {
  transition: transform 1.2s var(--ease);
}
.team-card:hover .team-card-image img { transform: scale(1.05); }

/* ---------- Realtors section — gold sweep on points ---------- */
.realtors-points li {
  opacity: 0;
  transform: translate3d(-16px, 0, 0);
  transition: opacity 0.6s var(--ease), transform 0.7s var(--ease);
}
.realtors-content.in .realtors-points li { opacity: 1; transform: none; }
.realtors-content.in .realtors-points li:nth-child(1) { transition-delay: 0.15s; }
.realtors-content.in .realtors-points li:nth-child(2) { transition-delay: 0.25s; }
.realtors-content.in .realtors-points li:nth-child(3) { transition-delay: 0.35s; }
.realtors-content.in .realtors-points li:nth-child(4) { transition-delay: 0.45s; }
.realtors-content.in .realtors-points li:nth-child(5) { transition-delay: 0.55s; }

.realtors-points .check {
  transition: transform 0.5s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.realtors-content.in .realtors-points li .check { animation: checkPop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
.realtors-content.in .realtors-points li:nth-child(1) .check { animation-delay: 0.25s; }
.realtors-content.in .realtors-points li:nth-child(2) .check { animation-delay: 0.35s; }
.realtors-content.in .realtors-points li:nth-child(3) .check { animation-delay: 0.45s; }
.realtors-content.in .realtors-points li:nth-child(4) .check { animation-delay: 0.55s; }
.realtors-content.in .realtors-points li:nth-child(5) .check { animation-delay: 0.65s; }
@keyframes checkPop {
  0%   { transform: scale(0); }
  70%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ---------- Calculator amount number transition ---------- */
.calc-result .amount {
  transition: transform 0.25s var(--ease), color 0.25s var(--ease);
  transform-origin: center;
}
.calc-result .amount.bump {
  transform: scale(1.04);
  color: var(--c-gold-dark);
}
.calc-result {
  position: relative;
  overflow: hidden;
}
.calc-result::before {
  content: '';
  position: absolute;
  width: 200%; height: 200%;
  top: -50%; left: -50%;
  background: radial-gradient(circle, rgba(200,162,74,0.12), transparent 50%);
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  pointer-events: none;
}
.calc-result.flash::before { opacity: 1; }

/* range slider styling */
.calc-field input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: linear-gradient(to right, var(--c-gold-dark) var(--fill, 50%), rgba(14,42,71,0.12) var(--fill, 50%));
  border-radius: var(--r-full);
  outline: none;
}
.calc-field input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--c-navy);
  border: 3px solid var(--c-cream);
  box-shadow: 0 2px 8px rgba(14,42,71,0.2);
  cursor: grab;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.calc-field input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 16px rgba(14,42,71,0.3);
}
.calc-field input[type=range]::-webkit-slider-thumb:active {
  cursor: grabbing;
  background: var(--c-gold-dark);
}
.calc-field input[type=range]::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--c-navy);
  border: 3px solid var(--c-cream);
  cursor: grab;
}

/* ---------- Closings — horizontal row with peek ---------- */
.closings-row { scroll-snap-type: x mandatory; scroll-padding: 0 var(--s-6); }
.closing-card {
  scroll-snap-align: start;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.closing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-gold);
}
.closings-row .closing-card {
  opacity: 0;
  transform: translate3d(40px, 0, 0);
  transition: opacity 0.7s var(--ease), transform 0.8s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.closings-row.in .closing-card { opacity: 1; transform: none; }
.closings-row.in .closing-card:nth-child(1) { transition-delay: 0.05s; }
.closings-row.in .closing-card:nth-child(2) { transition-delay: 0.13s; }
.closings-row.in .closing-card:nth-child(3) { transition-delay: 0.21s; }
.closings-row.in .closing-card:nth-child(4) { transition-delay: 0.29s; }
.closings-row.in .closing-card:nth-child(5) { transition-delay: 0.37s; }
.closings-row.in .closing-card:nth-child(6) { transition-delay: 0.45s; }

/* ---------- FAQ — smooth height + chevron rotate ---------- */
.faq-item summary { list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .faq-q span:first-child {
  transition: color 0.3s var(--ease);
}
.faq-item[open] .faq-q span:first-child { color: var(--c-gold-dark); }

.faq-a {
  overflow: hidden;
  animation: faqOpen 0.5s cubic-bezier(0.2, 0.85, 0.25, 1) both;
  transform-origin: top;
}
@keyframes faqOpen {
  0%   { opacity: 0; transform: translateY(-6px); max-height: 0; }
  100% { opacity: 1; transform: translateY(0); max-height: 1200px; }
}
.faq-item { transition: background 0.3s var(--ease); }
.faq-item:hover { background: rgba(14,42,71,0.025); }
.faq-item[open] { background: rgba(200,162,74,0.06); padding-left: var(--s-3); padding-right: var(--s-3); margin: 0 calc(var(--s-3) * -1); border-radius: var(--r-md); }

/* ---------- Final CTA — cards lift, dark glows on entry ---------- */
.final-card {
  transition: transform 0.5s cubic-bezier(0.2, 0.85, 0.25, 1), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.final-card.dark {
  position: relative;
  overflow: hidden;
}
.final-card.dark::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(200,162,74,0.25), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.final-card.dark:hover::after { opacity: 1; }

/* ============================================================
   Buttons — premium glossy treatment
   Layered: base gradient + inner top-highlight + ambient glow
   + specular sheen sweep on hover + magnetic cursor light
   ============================================================ */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.32s var(--ease-snap),
    box-shadow 0.4s var(--ease-snap),
    background 0.3s var(--ease),
    color 0.3s var(--ease),
    filter 0.3s var(--ease);
}

/* Inner top highlight — creates the convex-glass feel */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.22) 0%,
    rgba(255,255,255,0.08) 35%,
    rgba(255,255,255,0) 55%,
    rgba(0,0,0,0.06) 100%
  );
  mix-blend-mode: overlay;
  opacity: 0.9;
  transition: opacity 0.3s var(--ease);
}

/* Magnetic cursor light (kept) */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.32), transparent 55%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  z-index: 0;
  pointer-events: none;
}
.btn > * { position: relative; z-index: 1; }
.btn:hover::before { opacity: 1; }

/* Specular sheen sweep on hover */
.btn .btn-sheen,
.btn::placeholder { display: none; }

.btn .sheen,
.btn-sheen {
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255,255,255,0.0) 30%,
    rgba(255,255,255,0.55) 50%,
    rgba(255,255,255,0.0) 70%,
    transparent 100%
  );
  transform: skewX(-18deg);
  pointer-events: none;
  transition: left 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
  mix-blend-mode: screen;
  opacity: 0.85;
}
.btn:hover .sheen { left: 130%; }

/* --- Primary (navy) glossy --- */
.btn-primary {
  background: linear-gradient(180deg, #1c3e6a 0%, #0E2A47 55%, #0a1f37 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    inset 0 -1px 0 rgba(0,0,0,0.20),
    0 1px 2px rgba(14,42,71,0.18),
    0 8px 24px -8px rgba(14,42,71,0.35);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #234876 0%, #143458 55%, #0c2444 100%);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.24),
    inset 0 -1px 0 rgba(0,0,0,0.22),
    0 2px 4px rgba(14,42,71,0.22),
    0 14px 32px -10px rgba(14,42,71,0.45),
    0 0 0 1px rgba(200,162,74,0.15);
}
.btn-primary:active { transform: translateY(0); filter: brightness(0.97); }

/* --- Gold glossy (hero CTA) --- */
.btn-gold {
  background: linear-gradient(180deg, #e0bf7d 0%, #c8a24a 50%, #a4842f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.55),
    inset 0 -1px 0 rgba(120,90,30,0.30),
    0 1px 2px rgba(120,90,30,0.18),
    0 10px 26px -8px rgba(200,162,74,0.45);
  color: var(--c-navy-deep);
  text-shadow: 0 1px 0 rgba(255,255,255,0.25);
}
.btn-gold:hover {
  background: linear-gradient(180deg, #ecd093 0%, #d5b25a 50%, #b3923a 100%);
  color: var(--c-navy-deep);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.7),
    inset 0 -1px 0 rgba(120,90,30,0.32),
    0 2px 4px rgba(120,90,30,0.20),
    0 16px 38px -10px rgba(200,162,74,0.60),
    0 0 0 1px rgba(255,255,255,0.18);
}
.btn-gold:active { transform: translateY(0); filter: brightness(0.97); }

/* --- Ghost glossy (transparent / outlined) --- */
.btn-ghost {
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.15) 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.5),
    0 1px 2px rgba(14,42,71,0.06);
}
.btn-ghost:hover {
  background: linear-gradient(180deg, #1c3e6a 0%, #0E2A47 100%);
  color: var(--c-cream);
  border-color: var(--c-navy-deep);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 12px 28px -8px rgba(14,42,71,0.32);
}
.btn-ghost::after { opacity: 0.5; }

/* --- Light glossy (on dark sections) --- */
.btn-light {
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.08) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 1px 2px rgba(0,0,0,0.10);
}
.btn-light:hover {
  background: linear-gradient(180deg, rgba(255,255,255,0.32) 0%, rgba(255,255,255,0.16) 100%);
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    0 12px 28px -8px rgba(0,0,0,0.32);
}

/* Magnetic cursor variants */
.btn-ghost::before { background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(14,42,71,0.18), transparent 55%); }
.btn-light::before { background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.28), transparent 55%); }

/* Focus-visible glow — accessibility + premium feel */
.btn:focus-visible {
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    0 0 0 3px rgba(200,162,74,0.45),
    0 12px 30px -8px rgba(14,42,71,0.35);
}

/* ---------- Hero image float (idle motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-image-wrap {
    animation: heroFloat 9s ease-in-out infinite;
    animation-delay: 2s;
  }
  @keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
  }
}

/* ---------- Star strip subtle shimmer ---------- */
.star-strip .stars {
  background: linear-gradient(90deg, var(--c-gold) 0%, var(--c-gold-dark) 25%, var(--c-gold) 50%, var(--c-gold-dark) 75%, var(--c-gold) 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: starShimmer 6s linear infinite;
}
@keyframes starShimmer {
  0%   { background-position: 0% 0; }
  100% { background-position: 300% 0; }
}

/* ---------- Section enter — gradient bg fade for dark sections ---------- */
.lead-section::before,
.realtors-section::before {
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}
.lead-section.in-view::before,
.realtors-section.in-view::before {
  opacity: 1;
}

/* ============================================================
   ULTRA-PREMIUM SCROLL LAYER — added 2026-05-18
   Adds depth, parallax richness, scroll-driven gradient washes,
   gallery-style clip reveals, magnetic gold filaments, sticky
   cinema cues, and scroll-progress accents.
   ============================================================ */

/* ---------- Soft long-scroll gradient wash on dark sections ---------- */
/* NOTE: .lead-section is excluded — it has its own aerial video bg system
   (.section-bg-video) that must remain visible. Adding isolation + ::after
   here would cover the video. */
.realtors-section,
.final-cta-section {
  position: relative;
  isolation: isolate;
}
.realtors-section::after,
.final-cta-section::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background:
    radial-gradient(60% 50% at var(--mx, 50%) var(--my, 30%), rgba(200,162,74,0.16), transparent 65%),
    radial-gradient(50% 60% at 80% 100%, rgba(200,162,74,0.08), transparent 70%);
  transition: opacity 1.6s var(--ease-elite);
  mix-blend-mode: screen;
}
.realtors-section.in-view::after,
.final-cta-section.in-view::after { opacity: 1; }
.realtors-section > *, .final-cta-section > * { position: relative; z-index: 1; }

/* ---------- Section-entry gold filament divider ---------- */
.section-head {
  position: relative;
}
.section-head::before {
  content: '';
  position: absolute;
  top: -22px; left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-gold) 25%, var(--c-gold-dark) 50%, var(--c-gold) 75%, transparent);
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
  opacity: 0.75;
}
.section-head.in::before { width: min(180px, 38%); }

/* ---------- Scroll-driven hero parallax stack ---------- */
.hero {
  --hero-scroll: 0;
}
.hero-image-wrap img {
  /* Combined with existing scale-in: subtle scroll-driven drift */
  transform: scale(calc(1 + var(--hero-scroll) * 0.04))
             translate3d(0, calc(var(--hero-scroll) * -28px), 0);
}
html.is-loaded .hero-image-wrap img {
  transition: transform 0.8s var(--ease-elite);
}
.hero-copy {
  transform: translate3d(0, calc(var(--hero-scroll) * 12px), 0);
  transition: transform 0.4s linear;
  will-change: transform;
}

/* ---------- Closing-card stagger reveal with directional lift ---------- */
.closings-row .closing-card {
  opacity: 0;
  transform: translate3d(0, 36px, 0) scale(0.96);
  transition:
    opacity 0.9s var(--ease-elite),
    transform 1s var(--ease-elite);
}
.closings-row.in .closing-card { opacity: 1; transform: none; }
.closings-row.in .closing-card:nth-child(1) { transition-delay: 0.05s; }
.closings-row.in .closing-card:nth-child(2) { transition-delay: 0.13s; }
.closings-row.in .closing-card:nth-child(3) { transition-delay: 0.21s; }
.closings-row.in .closing-card:nth-child(4) { transition-delay: 0.29s; }
.closings-row.in .closing-card:nth-child(5) { transition-delay: 0.37s; }
.closings-row.in .closing-card:nth-child(6) { transition-delay: 0.45s; }

.closing-card {
  position: relative;
  overflow: hidden;
}
.closing-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--c-gold), transparent);
  transform: translateX(-100%);
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}
.closings-row.in .closing-card.in::before,
.closings-row.in .closing-card::before { transform: translateX(100%); }

/* ---------- Loan tile cascade with rise + soft glow ---------- */
.loans-grid .loan-tile {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity 0.85s var(--ease-elite),
    transform 1s var(--ease-elite),
    box-shadow 0.4s var(--ease);
  will-change: opacity, transform;
}
.loans-grid .loan-tile.in { opacity: 1; transform: none; }
.loans-grid .loan-tile:nth-child(1).in { transition-delay: 0.05s; }
.loans-grid .loan-tile:nth-child(2).in { transition-delay: 0.13s; }
.loans-grid .loan-tile:nth-child(3).in { transition-delay: 0.21s; }
.loans-grid .loan-tile:nth-child(4).in { transition-delay: 0.29s; }
.loans-grid .loan-tile:nth-child(5).in { transition-delay: 0.37s; }
.loans-grid .loan-tile:nth-child(6).in { transition-delay: 0.45s; }

.loan-tile:hover { box-shadow: 0 22px 50px -16px rgba(14, 42, 71, 0.18), 0 4px 12px rgba(14, 42, 71, 0.06); transform: translateY(-3px); }

/* ---------- Why-grid: deeper rail + numeric tick ---------- */
.why-item {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity 0.9s var(--ease-elite), transform 1s var(--ease-elite);
}
.why-item.in { opacity: 1; transform: none; }
.why-item.in:nth-child(1) { transition-delay: 0.05s; }
.why-item.in:nth-child(2) { transition-delay: 0.15s; }
.why-item.in:nth-child(3) { transition-delay: 0.25s; }
.why-item.in:nth-child(4) { transition-delay: 0.35s; }
.why-item.in::before { width: 72px; }

/* ---------- FAQ item entrance + hover bloom ---------- */
.faq-item {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition:
    opacity 0.75s var(--ease-elite),
    transform 0.85s var(--ease-elite),
    background 0.3s var(--ease),
    border-color 0.3s var(--ease);
}
.faq-item.in { opacity: 1; transform: none; }
.faq-item:nth-child(1).in { transition-delay: 0.05s; }
.faq-item:nth-child(2).in { transition-delay: 0.10s; }
.faq-item:nth-child(3).in { transition-delay: 0.15s; }
.faq-item:nth-child(4).in { transition-delay: 0.20s; }
.faq-item:nth-child(5).in { transition-delay: 0.25s; }
.faq-item:nth-child(6).in { transition-delay: 0.30s; }
.faq-item:nth-child(7).in { transition-delay: 0.35s; }
.faq-item:hover { border-color: rgba(200,162,74,0.45); }
.faq-toggle {
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.2, 0.85, 0.25, 1), color 0.3s var(--ease);
}
.faq-item details[open] .faq-toggle { transform: rotate(45deg); color: var(--c-gold-dark); }

/* ---------- Trust band ccm-stat cascade ---------- */
.ccm-stat {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition: opacity 0.85s var(--ease-elite), transform 0.95s var(--ease-elite);
}
.ccm-stat.in,
.ccm-band.in .ccm-stat { opacity: 1; transform: none; }
.ccm-stat:nth-child(1).in { transition-delay: 0.10s; }
.ccm-stat:nth-child(2).in { transition-delay: 0.22s; }
.ccm-stat:nth-child(3).in { transition-delay: 0.34s; }

/* ---------- Calculator card: subtle ambient breathing on in-view ---------- */
.calc-card {
  transition: transform 1.4s var(--ease-elite), box-shadow 1s var(--ease-elite);
}
.calc-section.in-view .calc-card {
  animation: calcBreath 8s ease-in-out infinite;
}
@keyframes calcBreath {
  0%, 100% { box-shadow: 0 30px 80px -30px rgba(14,42,71,0.20), 0 0 0 rgba(200,162,74,0); }
  50%      { box-shadow: 0 36px 90px -28px rgba(14,42,71,0.26), 0 0 60px -20px rgba(200,162,74,0.18); }
}

/* ---------- Section-edge gold rule that draws on scroll ---------- */
.eyebrow {
  position: relative;
  display: inline-block;
}
.eyebrow::after {
  content: '';
  position: absolute;
  left: 0; bottom: -8px;
  width: 0; height: 1px;
  background: var(--c-gold);
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}
.reveal.in .eyebrow::after,
.auto-reveal.in .eyebrow::after,
.section-head.in .eyebrow::after { width: 44px; }

/* ---------- Header logo scale on scroll ---------- */
html.scrolled .header .logo-mark { transform: scale(0.92); }
.header .logo-mark { transition: transform 0.4s var(--ease-elite); }

/* ---------- Floating sticky CTA bar after scroll depth ---------- */
.sticky-cta {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 120%);
  z-index: 95;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 18px;
  background: rgba(14, 42, 71, 0.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(200,162,74,0.35);
  border-radius: 999px;
  box-shadow: 0 18px 50px -10px rgba(14, 42, 71, 0.45), 0 0 0 1px rgba(255,255,255,0.04) inset;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s var(--ease-elite);
  opacity: 0;
}
.sticky-cta-label {
  color: rgba(250, 248, 243, 0.92);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.sticky-cta .btn { padding: 8px 16px; font-size: 13px; }
@media (min-width: 920px) {
  .sticky-cta { display: inline-flex; }
  html.deep-scroll .sticky-cta { transform: translate(-50%, 0); opacity: 1; }
}

/* ---------- Smooth scroll for anchor links ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- Subtle hover lift for stat / closing cards ---------- */
.closing-card { transition: transform 0.4s var(--ease-elite), box-shadow 0.4s var(--ease-elite), border-color 0.3s var(--ease); }
.closing-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -16px rgba(14,42,71,0.18); border-color: rgba(200,162,74,0.45); }

/* ---------- Hero ambient pulse (slow gold drift) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero::before {
    animation: heroPulse 14s ease-in-out infinite alternate;
  }
  @keyframes heroPulse {
    0%   { transform: translate3d(-3%, -2%, 0) scale(1); }
    100% { transform: translate3d( 3%,  2%, 0) scale(1.04); }
  }
}

/* ---------- Reveal velocity tweak — closer to expensive editorial feel ---------- */
.reveal, .auto-reveal {
  transition-duration: 1.15s, 1.25s, 1.15s;
}
@media (max-width: 760px) {
  .reveal, .auto-reveal { transition-duration: 0.95s, 1.05s, 0.95s; }
}

/* ---------- Mobile-friendly tweaks for new layer ---------- */
@media (max-width: 760px) {
  .sticky-cta { display: none !important; }
  .calc-section.in-view .calc-card { animation: none; }
  .hero::before { animation: none; }
}

/* ---------- Reduce motion — disable everything kinetic ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal, .reveal-left, .reveal-right, .reveal-scale, .reveal-blur,
  .hero h1 .word > span,
  .hero-copy .eyebrow, .hero-copy .hero-sub, .hero-copy .star-strip,
  .hero-copy .hero-ctas, .hero-copy .hero-meta,
  .hero-badge, .hero-image-wrap img, .hero-image-wrap,
  .local-image, .local-image img, .area-list .area-chip,
  .realtors-points li, .closings-row .closing-card {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
  }
  .parallax, .parallax-img { transform: none !important; }
  .scroll-progress { display: none; }
}
