:root{
  /* Brand blue */
  --rem-primary:#014475;
  --rem-secondary:#5b4ea0;
  --rem-ink:#0f172a;
  --rem-muted:#64748b;
  --rem-line:#e2e8f0;
  --rem-bg:#f8fafc;

  /* Bootstrap sync */
  --bs-primary:#014475;
  --bs-primary-rgb:1,68,117;
}

/* Base */
*{box-sizing:border-box}
body{font-family:system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;display:flex;flex-direction:column;min-height:100vh}
main{flex:1 0 auto}
h1,h2,h3,h4,h5{font-weight:700}
a{color:var(--rem-primary)}
.btn-primary{background:var(--bs-primary);border-color:var(--bs-primary)}
.btn-primary:hover,.btn-primary:focus{filter:brightness(0.92)}
.btn-outline-primary{color:var(--bs-primary);border-color:var(--bs-primary)}
.btn-outline-primary:hover{background:var(--bs-primary);border-color:var(--bs-primary);color:#fff}
.nav-link{color:#334155}
.nav-link.active,.nav-link:hover{color:var(--rem-primary)}
.text-primary{color:var(--bs-primary)!important}



/* Reveal animations */
.reveal{opacity:0;transform:translateY(14px);transition:all .6s ease}
.reveal.show{opacity:1;transform:none}
.reveal-delay-1{transition-delay:.1s}.reveal-delay-2{transition-delay:.2s}.reveal-delay-3{transition-delay:.3s}

/* Stats counters */
.stat .k,.counter{font-weight:800;font-size:2rem}

/* Hero */
.hero img{max-height:440px;object-fit:cover;border-radius:1rem}

/* “As Seen On” logos */
.brand-row .brand-logo{height:26px;filter:grayscale(1);opacity:.9}
@media (min-width: 992px){ .brand-row .brand-logo{height:30px} }
.brand-row .brand-logo:hover{filter:grayscale(0);opacity:1}

/* Cards */
.card-rem{border:1px solid var(--rem-line);border-radius:1rem;box-shadow:0 8px 28px rgba(2,6,23,.06);transition:transform .35s ease, box-shadow .35s ease}
.card-rem:hover{transform:translateY(-6px);box-shadow:0 16px 44px rgba(2,6,23,.12)}
.card-rem .icon{width:44px;height:44px;border-radius:.8rem;display:inline-flex;align-items:center;justify-content:center;background:#f1f5f9}
.card-rem p{color:var(--rem-ink)}
.card-rem ul{margin-left:1rem}

/* Layout polish */
.section-title{letter-spacing:.2px}
img.rounded-4{border-radius:1rem!important}

/* ===== Case Study carousel sizing ===== */
/* Support BOTH ids so older markup doesn’t break */
#lavereda,#caseStudyCarousel{max-width:1100px;margin:0 auto}
#lavereda .carousel-inner,
#caseStudyCarousel .carousel-inner{height:520px}
#lavereda .carousel-item,#lavereda .carousel-item img,
#caseStudyCarousel .carousel-item,#caseStudyCarousel .carousel-item img{height:100%}
#lavereda .carousel-item img,
#caseStudyCarousel .carousel-item img{object-fit:cover}

/* Smaller subheading for case study */
.case-subheading{max-width:980px;margin:.25rem auto 1.25rem;line-height:1.35}
@media (min-width:992px){.case-subheading{font-size:1.125rem}}

/* Footer refinements */
.footer a{text-decoration:none}
.footer a:hover{opacity:.85}
.footer h6{letter-spacing:.03em}
.footer .link-light{opacity:.9}
.footer .link-light:hover{opacity:1;text-decoration:underline}

/* Simple caption chip (kept for reuse, but not used on hero video anymore) */
.video-box{background:transparent}
.corner-badge{
  position:absolute;right:12px;top:12px;
  background:rgba(15,23,42,.85);color:#fff;
  padding:.35rem .6rem;border-radius:.5rem;
  font-size:.8rem;line-height:1;pointer-events:none;
}

/* About attachments carousel */
.about-carousel-img{height:420px;width:100%;object-fit:cover}


/* ===== Education page bits (kept) ===== */
.video-frame iframe{width:100%;height:100%;display:block;border:0}
.steps .step{position:relative;border-radius:1rem}
.steps .step-number{width:42px;height:42px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-weight:700;background:#eef6fc;color:var(--rem-primary);margin-bottom:.5rem}
@media (min-width:992px){
  .steps{position:relative}
  .steps::before{content:"";position:absolute;top:50%;left:8%;right:8%;height:2px;background:var(--rem-line);transform:translateY(-50%);z-index:0}
  .steps .step .step-number{position:relative;z-index:1}
}
.steps .card:hover,.outcomes .card:hover{transform:translateY(-4px);box-shadow:0 14px 34px rgba(2,6,23,.12);transition:transform .3s ease, box-shadow .3s ease}

/* Flip cards */
.flipcard{perspective:1000px;cursor:pointer;outline:none;border-radius:1rem}
.flipcard:focus{box-shadow:0 0 0 .25rem rgba(24,107,172,.2)}
.flipcard-inner{position:relative;width:100%;height:240px;transform-style:preserve-3d;transition:transform .6s ease;border-radius:1rem;box-shadow:0 10px 24px rgba(2,6,23,.08);background:#fff}
.flipcard.flipped .flipcard-inner,.flipcard:hover .flipcard-inner{transform:rotateY(180deg)}
.flipcard-front,.flipcard-back{position:absolute;inset:0;backface-visibility:hidden;border-radius:1rem}
.flipcard-front{background:#fff}
.flipcard-back{background:#0f172a;color:#e5e7eb;transform:rotateY(180deg)}
@media (max-width:575.98px){.flipcard-inner{height:280px}}

/* Wealth Advisory */
.hero-mini{background:linear-gradient(180deg, rgba(24,107,172,.06), rgba(91,78,160,.04))}
.check-list{padding-left:0;list-style:none}
.check-list li{position:relative;padding-left:1.8rem;margin-bottom:.75rem}
.check-list li::before{content:"\F26E";font-family:"bootstrap-icons";position:absolute;left:0;top:.05rem;font-size:1.1rem;color:var(--rem-primary)}
.figure-caption{font-size:.9rem}


/* --------------------------------------------------------------- Services pages ---------------------------------------------------- */
/* Plan slideshow sizing (services page) */
.plan-carousel{max-width:1100px;margin:0 auto}
.plan-carousel .carousel-inner{height:560px}
.plan-carousel .plan-img{height:100%;object-fit:contain;background:#0b1320}
.plan-carousel .carousel-caption .badge{padding:.45rem .7rem;border-radius:.5rem}

/* Zoom Lightbox (services) */
.zoom-stage{position:relative;width:100%;height:calc(100vh - 180px);background:#0b1320;overflow:hidden;touch-action:none}
#zoomTarget{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(1);transform-origin:center;max-width:none;will-change:transform;user-select:none;pointer-events:none}


/* Brand + base already present above in your file */

/* Reverse-outline pair behavior (used by Learn More / SPEs) */
.btn-swap-group .btn-swap-primary:hover{
  background:transparent!important;
  color:var(--bs-primary)!important;
  border-color:var(--bs-primary)!important;
}
.btn-swap-group .btn-swap-outline:hover{
  background:var(--bs-primary)!important;
  color:#fff!important;
  border-color:var(--bs-primary)!important;
}

/* Hover for single primary button to flip to white (Schedule a Call) */
.btn-hover-white:hover{
  background:#fff !important;
  color:var(--bs-primary) !important;
  border-color:var(--bs-primary) !important;
}

/* Wealth page: small logo near headings */
.rem-wealth-logo { height: 50px; }

/* Animated 'Why it matters' cards (kept) */
.why-card { transition: transform .35s ease, box-shadow .35s ease; }
.why-card:hover { transform: translateY(-3px); box-shadow: 0 16px 44px rgba(2,6,23,.12); }
@keyframes rem-pop { 0%{opacity:0;transform:translateY(10px) scale(.98)} 100%{opacity:1;transform:translateY(0) scale(1)} }
.why-card.reveal.show { animation: rem-pop .6s ease-out both; }


/* --- Anchor scroll offset for sticky header --- */
:root { --anchor-offset: 120px; } /* tweak 100–140px as you like */

.anchor-offset {
  scroll-margin-top: var(--anchor-offset);
}


html { scroll-behavior: smooth; }
