/* alm-child motion.css (1.2.0) – Project 3F5c9U6iA2. Calm, premium motion layer on top of main.css / inner.css.
   Rules: transform + opacity only for anything that moves; content is never hidden unless BOTH the head gate
   (html.alm-anim: IntersectionObserver + no reduced motion) AND motion.js (html.m-ready) are active;
   motion.js reveals everything at 1.5s and a CSS animation backstop at 2.5s; no clip-path anywhere. */
:root { --m-ease: cubic-bezier(.22,.61,.36,1); --m-dur: .7s; }

/* 1. Hero entrance – staggered (eyebrow, headline, lede, pills/buttons, form card / visual) */
@keyframes mRise { from { opacity: 0; transform: translate3d(0,18px,0); } to { opacity: 1; transform: none; } }
.alm-anim .hero-copy > *, .alm-anim .page-hero .ph-grid > .reveal:first-child > *, .alm-anim .hero .lead-card { animation: mRise .8s var(--m-ease) both; }
.alm-anim .hero-copy > :nth-child(1), .alm-anim .page-hero .ph-grid > .reveal:first-child > :nth-child(1) { animation-delay: .05s; }
.alm-anim .hero-copy > :nth-child(2), .alm-anim .page-hero .ph-grid > .reveal:first-child > :nth-child(2) { animation-delay: .15s; }
.alm-anim .hero-copy > :nth-child(3), .alm-anim .page-hero .ph-grid > .reveal:first-child > :nth-child(3) { animation-delay: .25s; }
.alm-anim .hero-copy > :nth-child(4), .alm-anim .page-hero .ph-grid > .reveal:first-child > :nth-child(4) { animation-delay: .35s; }
.alm-anim .hero-copy > :nth-child(n+5), .alm-anim .page-hero .ph-grid > .reveal:first-child > :nth-child(n+5) { animation-delay: .45s; }
.alm-anim .hero .lead-card { animation-duration: .95s; animation-delay: .4s; }
/* the hero wrappers themselves should not double-fade */
.alm-anim .hero .reveal, .alm-anim .page-hero .reveal { opacity: 1; transform: none; }
/* hero photo settles in slowly (scale only) */
@keyframes mSettle { from { transform: scale(1.06); } to { transform: none; } }
.alm-anim .hero-bg img { animation: mSettle 2.4s var(--m-ease) both; }

/* 2. Staggered scroll reveals for cards / list items (classes added by motion.js) */
.alm-anim.m-ready .m-rise:not(.m-in) { opacity: 0; transform: translate3d(0,22px,0); animation: mBackstop .01s linear 2.5s forwards; }
.m-rise { transition: opacity var(--m-dur) var(--m-ease), transform var(--m-dur) var(--m-ease); transition-delay: var(--m-d, 0s); }
.m-rise.m-in { opacity: 1; transform: none; }
@keyframes mBackstop { to { opacity: 1; transform: none; } }
/* after the reveal, hover transitions must be immediate (no stagger delay) */
.m-rise.m-done { transition-delay: 0s; }
/* section heads: slightly longer, smoother reveal */
.alm-anim .section-head.reveal, .alm-anim .reveal { transition-duration: .8s; transition-timing-function: var(--m-ease); }

/* 3. Hover lift + shadow on cards */
.loan-card, .program, .bento-card, .value-card, .fit-card, .elig-card, .c-card, .next-card, .type-card, .model-card, .help-card, .tl-step, .vstep, .trust-item {
  transition: transform .45s var(--m-ease), box-shadow .45s var(--m-ease), opacity var(--m-dur) var(--m-ease);
  transition-delay: var(--m-d, 0s);
}
.m-done { --m-d: 0s; }
@media (hover: hover) {
  .loan-card:hover, .bento-card:not(.photo):hover, .value-card:hover, .fit-card:hover, .elig-card:hover, .c-card:hover,
  .next-card:hover, .type-card:hover, .model-card:hover, .help-card:hover {
    transform: translate3d(0,-5px,0); box-shadow: 0 18px 40px rgba(12, 35, 64, .12);
  }
  .program:hover { transform: translate3d(0,-3px,0); box-shadow: 0 22px 48px rgba(12, 35, 64, .12); }
  /* buttons: soft lift, deeper shadow, arrow nudge */
  .btn, .nav-cta { transition: transform .3s var(--m-ease), box-shadow .3s var(--m-ease), background-color .25s, color .25s, border-color .25s; }
  .btn:hover, .nav-cta:hover { transform: translate3d(0,-2px,0); }
  .btn-primary:hover, .nav-cta:hover { box-shadow: 0 14px 28px rgba(10, 77, 140, .32); }
  .btn:active, .nav-cta:active { transform: translate3d(0,0,0) scale(.98); }
  .text-link { transition: color .25s; }
  /* 4. Slow image zoom inside rounded frames that already clip (frames tagged .m-zoom by motion.js) */
  .m-zoom > img, .m-zoom > picture img { transition: transform 1.4s var(--m-ease); will-change: transform; }
  .m-zoom:hover > img, .m-zoom:hover > picture img, .m-zoom-host:hover .m-zoom > img { transform: scale(1.05); }
}

/* 5. Sticky header: soft shadow + slight shrink on scroll (transform/opacity only, header height unchanged in layout) */
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 18px; pointer-events: none;
  box-shadow: 0 10px 24px rgba(12, 35, 64, .10); opacity: 0; transform: translateY(-18px); transition: opacity .35s var(--m-ease); }
.site-header.m-scrolled::after { opacity: 1; }
.site-header .brand img { transform-origin: left center; transition: transform .35s var(--m-ease); }
.site-header.m-scrolled .brand img { transform: scale(.9); }
@media (min-width: 1025px) {
  .site-header .header-inner { transition: transform .35s var(--m-ease); }
}

/* 6. Stat count-up (numbers set by motion.js; tabular figures so the width never jumps) */
.m-count { font-variant-numeric: tabular-nums; display: inline-block; }

/* 7. Form micro-interactions */
.wpcf7 input[type=text], .wpcf7 input[type=email], .wpcf7 input[type=tel], .wpcf7 input[type=number], .wpcf7 select, .wpcf7 textarea,
.calc input, .calc select { transition: border-color .25s, box-shadow .3s var(--m-ease), background-color .25s; }
.wpcf7 input[type=text]:focus, .wpcf7 input[type=email]:focus, .wpcf7 input[type=tel]:focus, .wpcf7 select:focus, .wpcf7 textarea:focus {
  border-color: var(--blue, #0a4d8c); box-shadow: 0 0 0 4px rgba(10, 77, 140, .14); outline: none;
}
.alm-chips .wpcf7-list-item label, .alm-choices .wpcf7-list-item label { transition: transform .3s var(--m-ease), border-color .25s, background-color .25s, box-shadow .3s var(--m-ease); }
@keyframes mPop { 0% { transform: scale(1); } 40% { transform: scale(1.045); } 100% { transform: scale(1); } }
.alm-chips .wpcf7-list-item label.m-pop { animation: mPop .38s var(--m-ease); }
@keyframes mPopLift { 0% { transform: translateY(-2px) scale(1); } 40% { transform: translateY(-2px) scale(1.025); } 100% { transform: translateY(-2px) scale(1); } }
.alm-choices .wpcf7-list-item label.m-pop { animation: mPopLift .38s var(--m-ease); }
.alm-js .alm-step.is-active { animation: mStep .45s var(--m-ease) both; }
@keyframes mStep { from { opacity: 0; transform: translate3d(14px,0,0); } to { opacity: 1; transform: none; } }
.lead-progress .dot { transition: background-color .3s, transform .35s var(--m-ease); }
.lead-progress .dot.is-active { transform: scale(1.25); }

/* Mobile stays light: shorter distances, no image zoom */
@media (max-width: 767px) {
  .alm-anim.m-ready .m-rise:not(.m-in) { transform: translate3d(0,14px,0); }
  .m-zoom > img { transition: none; will-change: auto; }
}

/* Reduced motion: everything visible, no movement */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .m-rise, .hero-copy > *, .lead-card, .ph-visual { opacity: 1 !important; transform: none !important; }
  .site-header.m-scrolled .brand img, .m-zoom:hover > img { transform: none !important; }
}

/* ---- 1.2.0 QA fixes (About page) ---- */
@media (max-width: 1024px) {
  .portrait-ph { width: 100%; max-width: 520px; margin-inline: auto; }   /* bio stacks under it (about-intro is 1 column here) */
}
.stat-strip strong .ph-mark { vertical-align: middle; line-height: 1.4; white-space: nowrap; }

/* ---- 1.2.0 QA fix (Contact map): fixed-height box, iframe always the top layer ---- */
.map-col .map-frame { flex: 0 0 auto; align-self: stretch; height: 420px; min-height: 0; overflow: hidden; }
.map-col .map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; z-index: 5; }
.map-col .map-frame::before { pointer-events: none; }
.map-col .map-frame:has(iframe)::before { display: none; }          /* placeholder address layer off once the iframe exists */
.map-col .map-frame:has(iframe) { background: var(--bg-alt, #eef3f8); } /* pin/circle placeholder art off; plain tint while the map loads */
@media (max-width: 768px) { .map-col .map-frame { height: 320px; } }
