/*
Theme Name: Mortgage Finders Network
Theme URI: https://www.mortgagefindersnetwork.com/
Author: Amir Bagheri
Author URI: https://ravisite.com/
Description: Custom block theme for MortgageFindersNetwork.com: mortgage guides by section, national rate averages, a payment calculator, and quote and contact forms that email each request. Rates and the lead email are managed under Settings > Mortgage Finders.
Tags: block-patterns, full-site-editing, custom-colors, editor-style, one-column, two-columns, right-sidebar, translation-ready
Version: 1.0.8
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mfn
*/

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
body { -webkit-font-smoothing: antialiased; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
.wp-site-blocks { padding-top: 0; padding-bottom: 0; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--wp--preset--color--green); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.mfn-header { background: #fff; border-bottom: 1px solid var(--wp--preset--color--border); }
.mfn-topbar { background: var(--wp--preset--color--navy); color: #DCE5EE; font-size: 13px; }
.mfn-topbar__inner, .mfn-mainbar__inner { max-width: 1248px; margin: 0 auto; padding: 6px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; }
.mfn-topbar a { color: #fff; text-decoration: none; }
.mfn-topbar a:hover { color: var(--wp--preset--color--mint); }
.mfn-topbar__links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.mfn-topbar .wp-block-search__inside-wrapper { background: #13324F; border: 1px solid #3A5370; border-radius: 8px; padding: 0; }
.mfn-topbar .wp-block-search__input { background: transparent; border: 0; color: #fff; font-size: 13px; height: 32px; padding: 0 10px; width: 180px; }
.mfn-topbar .wp-block-search__input::placeholder { color: #9FB0C2; }
.mfn-topbar .wp-block-search__button { background: transparent; color: #9FB0C2; border: 0; padding: 0 8px; margin: 0; }
.mfn-mainbar__inner { padding: 14px 24px; gap: 12px 24px; }
.mfn-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--wp--preset--color--navy); }
.mfn-logo__mark { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.mfn-logo__mfn { font-family: var(--wp--preset--font-family--heading); font-weight: 800; font-size: 28px; line-height: .95; letter-spacing: -0.04em; }
.mfn-logo__rule { width: 1.5px; height: 40px; background: #CBD5E0; }
.mfn-logo__words { display: flex; flex-direction: column; gap: 3px; }
.mfn-logo__mortgage { font-family: var(--wp--preset--font-family--heading); font-weight: 800; font-size: 16px; line-height: 1; letter-spacing: .07em; }
.mfn-logo__network { font-weight: 600; font-size: 12px; letter-spacing: .03em; color: var(--wp--preset--color--green); }
.mfn-nav .wp-block-navigation-item__content { display: inline-flex; align-items: center; min-height: 44px; padding: 0 11px !important; border-radius: 8px; color: #33475B; font-size: 14.5px; font-weight: 500; text-decoration: none; }
.mfn-nav .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--surface); color: var(--wp--preset--color--navy); }
.mfn-nav .current-menu-item > .wp-block-navigation-item__content,
.mfn-nav .current-menu-ancestor > .wp-block-navigation-item__content { background: var(--wp--preset--color--green-tint); color: var(--wp--preset--color--green); font-weight: 600; }
.mfn-nav .wp-block-navigation__container { gap: 2px; }

/* ---------- buttons ---------- */
.wp-block-button.is-style-gold .wp-block-button__link { background: var(--wp--preset--color--gold); color: var(--wp--preset--color--navy); }
.wp-block-button.is-style-gold .wp-block-button__link:hover { background: #E5A52F; }
.wp-block-button.is-style-outline-light .wp-block-button__link { background: transparent; color: #fff; border: 1px solid #3A5370; font-weight: 600; }
.wp-block-button.is-style-outline-light .wp-block-button__link:hover { border-color: #fff; }
.wp-block-button__link { min-height: 48px; display: inline-flex; align-items: center; }

/* ---------- hero ---------- */
.mfn-hero { background: var(--wp--preset--color--navy); color: #fff; padding-top: 40px !important; padding-bottom: 56px !important; }
.mfn-hero h1, .mfn-hero h2, .mfn-hero h3 { color: #fff; }
.mfn-hero .mfn-lead, .mfn-hero p { color: #C5D2DF; font-size: 19px; max-width: 720px; }
.mfn-hero a:not(.wp-block-button__link) { color: #DCE5EE; }
.mfn-hero--home { padding-top: 80px !important; padding-bottom: 96px !important; }
.mfn-hero--home h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.05; }
.mfn-chip { display: inline-block; padding: 6px 12px; border-radius: 999px; background: #13324F; color: #9FE3CC !important; font-size: 13px !important; font-weight: 600; }
.mfn-checks { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 12px 28px; color: #DCE5EE; font-size: 15px; }
.mfn-checks li { display: flex; align-items: center; gap: 8px; }
.mfn-checks li::before { content: ""; width: 18px; height: 18px; flex: none; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236FD3B2' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }

/* page header: breadcrumb strip, then title (left) balanced by a quote card (right) */
.mfn-hero:not(.mfn-hero--home) { padding-top: 0 !important; padding-bottom: 52px !important; }
.mfn-hero:not(.mfn-hero--home) h1 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.12; letter-spacing: -0.02em; margin: 0; max-width: 760px; }
.mfn-hero .wp-block-post-excerpt { margin-top: 14px; }
.mfn-hero .wp-block-post-excerpt__excerpt, .mfn-hero .mfn-lead { font-size: 18px; line-height: 1.55; max-width: 680px; }
.mfn-hero__cols { margin-top: 0 !important; margin-bottom: 0 !important; }
.mfn-hero__text > * { max-width: 760px; }
.mfn-hero__text > .wp-block-post-excerpt, .mfn-hero__text > .mfn-lead, .mfn-hero__text > .wp-block-term-description { max-width: 680px; }
.mfn-hero h1 { text-wrap: balance; }
/* .mfn-narrow sits in a centered container: limit its children, not itself, so content stays left-aligned with the header */
.mfn-narrow > * { max-width: 820px; }
.mfn-hero__eyebrow { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 0 !important; margin-bottom: 12px !important; font-size: 12.5px !important; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--wp--preset--color--mint) !important; }
.mfn-hero__eyebrow a { color: var(--wp--preset--color--mint) !important; text-decoration: none; }
.mfn-hero__eyebrow span[aria-hidden] { color: #3A5370; }

.mfn-breadcrumbs { margin-top: 0 !important; margin-bottom: 40px !important; padding: 14px 0; border-bottom: 1px solid #1E3A57; font-size: 13.5px; }
.mfn-breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
.mfn-breadcrumbs li { display: flex; align-items: center; color: #9FB0C2; }
.mfn-breadcrumbs li + li::before { content: ""; width: 6px; height: 6px; margin: 0 12px; border-top: 1.5px solid #5B7590; border-right: 1.5px solid #5B7590; transform: rotate(45deg); }
.mfn-breadcrumbs a { color: #C5D2DF !important; text-decoration: none; }
.mfn-breadcrumbs a:hover { color: #fff !important; text-decoration: underline; }
.mfn-breadcrumbs [aria-current] { color: #fff; font-weight: 600; }

.mfn-hero-card { background: #13324F; border: 1px solid #22476B; border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.mfn-hero-card p { margin: 0; font-size: 14.5px !important; color: #C5D2DF; }
.mfn-hero-card .mfn-hero-card__title { font-family: var(--wp--preset--font-family--heading); font-size: 19px !important; font-weight: 700; line-height: 1.3; color: #fff; }
.mfn-hero-card__button { margin-top: 8px; display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 10px; background: var(--wp--preset--color--gold); color: var(--wp--preset--color--navy) !important; font-weight: 700; text-decoration: none; }
.mfn-hero-card__button:hover { background: #E5A52F; }

/* ---------- layout ---------- */
.mfn-section { padding-top: 64px !important; padding-bottom: 64px !important; }
.mfn-section--white { background: #fff; border-top: 1px solid var(--wp--preset--color--border); }
.mfn-eyebrow { font-size: 13px !important; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--wp--preset--color--green) !important; margin: 0; }
.mfn-eyebrow a { color: inherit; text-decoration: none; }
.mfn-muted { color: var(--wp--preset--color--slate); }
.mfn-body { padding-top: 56px; padding-bottom: 72px; }
.mfn-body > .wp-block-column:first-child { min-width: 0; }
.mfn-content { font-size: 17.5px; color: var(--wp--preset--color--ink); }
.mfn-content h2 { margin-top: 2rem; }
.mfn-content li + li { margin-top: .4em; }
.mfn-sidebar { display: flex; flex-direction: column; gap: 20px; }

/* ---------- cards ---------- */
.mfn-card { background: #fff; border: 1px solid var(--wp--preset--color--border); border-radius: 18px; padding: 28px !important; }
.mfn-card h3 { margin: 0; font-size: 20px; }
.mfn-card p { margin: 0; color: var(--wp--preset--color--slate); font-size: 15.5px; }
.mfn-card--dark { background: var(--wp--preset--color--navy); color: #fff; border: 0; }
.mfn-card--dark h2, .mfn-card--dark h3 { color: #fff; }
.mfn-card--dark p { color: #C5D2DF; }
.mfn-card--green { background: var(--wp--preset--color--green); color: #fff; border: 0; }
.mfn-card--green h2, .mfn-card--green h3 { color: #fff; }
.mfn-card--green p { color: #D6EEE6; }
.mfn-card .wp-block-list { padding-left: 0; list-style: none; font-size: 14.5px; }
.mfn-card .wp-block-list a { text-decoration: none; }
.mfn-card-link { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; min-height: 104px; background: var(--wp--preset--color--surface); border-radius: 14px; text-decoration: none; color: var(--wp--preset--color--navy) !important; }
.mfn-card-link:hover { background: var(--wp--preset--color--green-tint); }
.mfn-card-link strong { font-family: var(--wp--preset--font-family--heading); font-size: 16.5px; line-height: 1.3; }
.mfn-card-link span { font-size: 14px; color: var(--wp--preset--color--slate); line-height: 1.45; }
.mfn-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mfn-cta { background: var(--wp--preset--color--green); color: #fff; padding-top: 72px !important; padding-bottom: 72px !important; }
.mfn-cta h2 { color: #fff; }
.mfn-cta p { color: #D6EEE6; }

/* posts */
.mfn-post-card { height: 100%; gap: 12px; }
.mfn-post-card .wp-block-post-title { font-size: 18px; line-height: 1.3; margin: 0; }
.mfn-post-card .wp-block-post-title a { color: var(--wp--preset--color--navy); text-decoration: none; }
.mfn-post-card .wp-block-post-excerpt { font-size: 14.5px; color: var(--wp--preset--color--slate); margin: 0; }
.mfn-post-card .wp-block-post-excerpt__more-link { display: none; }
.mfn-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mfn-chips li a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid #CBD5E0; background: #fff; color: #33475B; font-size: 14px; font-weight: 500; text-decoration: none; }
.mfn-chips li a:hover, .mfn-chips li.current-cat a { background: var(--wp--preset--color--navy); border-color: var(--wp--preset--color--navy); color: #fff; }
.wp-block-query-pagination { margin-top: 32px; gap: 8px; }

/* ---------- forms ---------- */
.mfn-form { display: flex; flex-direction: column; gap: 14px; }
.mfn-form h2 { margin: 0; font-size: 20px; }
.mfn-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mfn-form__full { grid-column: 1 / -1; }
.mfn-field { display: flex; flex-direction: column; gap: 6px; }
.mfn-field label { font-size: 13px; font-weight: 600; color: #33475B; }
.mfn-field input, .mfn-field select, .mfn-field textarea { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid #CBD5E0; border-radius: 10px; background: #fff; color: var(--wp--preset--color--navy); font: 15px var(--wp--preset--font-family--body); }
.mfn-field textarea { padding: 12px; min-height: 140px; resize: vertical; }
.mfn-form button { min-height: 48px; border: 0; border-radius: 10px; background: var(--wp--preset--color--green); color: #fff; font: 700 15px var(--wp--preset--font-family--body); cursor: pointer; padding: 0 22px; }
.mfn-form button:hover { background: var(--wp--preset--color--green-dark); }
/* WordPress auto-paragraphs shortcode output, so the button may arrive wrapped in a <p> */
.mfn-form > p { margin: 0; }
.mfn-form > p:empty { display: none; }
.mfn-form > button, .mfn-form > p > button { width: 100%; }
.mfn-form--dark { background: var(--wp--preset--color--navy); color: #fff; border-radius: 18px; padding: 24px; }
.mfn-form--dark h2 { color: #fff; }
.mfn-form--dark .mfn-field label { color: #DCE5EE; }
.mfn-form--dark .mfn-field select { background: #13324F; border-color: #3A5370; color: #fff; }
.mfn-form--dark button { background: var(--wp--preset--color--gold); color: var(--wp--preset--color--navy); }
.mfn-form--dark button:hover { background: #E5A52F; }
.mfn-form--hero { background: #fff; color: var(--wp--preset--color--navy); border-radius: 20px; padding: 28px; box-shadow: 0 24px 60px rgba(3, 12, 24, .35); }
.mfn-form--hero h2 { color: var(--wp--preset--color--navy); font-size: 22px; }
.mfn-form--hero p { color: var(--wp--preset--color--muted); font-size: 14px; margin: 0; }
.mfn-form__note { font-size: 12.5px; color: var(--wp--preset--color--muted); margin: 0; }
.mfn-form__hp { position: absolute; left: -9999px; }
.mfn-notice { padding: 14px 18px; border-radius: 12px; font-weight: 600; }
.mfn-notice--ok { background: var(--wp--preset--color--green-tint); color: var(--wp--preset--color--green-dark); }
.mfn-notice--error { background: #FBE9E4; color: #8A2E12; }
.mfn-card-form { background: #fff; border: 1px solid var(--wp--preset--color--border); border-radius: 20px; padding: 32px; }

/* ---------- rates ---------- */
.mfn-rates { background: #fff; border: 1px solid var(--wp--preset--color--border); border-radius: 18px; padding: 22px 24px; }
.mfn-rates__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.mfn-rates__head h2 { margin: 0; font-size: 18px; }
.mfn-rates__date { font-size: 12.5px; color: var(--wp--preset--color--muted); }
.mfn-rates__tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 32px; }
.mfn-rates table { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 8px; }
.mfn-rates caption { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--wp--preset--color--green); padding: 8px 0 2px; }
.mfn-rates th { text-align: left; font-weight: 500; color: #33475B; padding: 10px 0; border-top: 1px solid #EEF2F5; }
.mfn-rates td { text-align: right; font-weight: 700; padding: 10px 0; border-top: 1px solid #EEF2F5; font-family: var(--wp--preset--font-family--heading); }
.mfn-rates__note { font-size: 12.5px; color: var(--wp--preset--color--muted); margin: 10px 0 0; }
.mfn-rates--large { padding: 32px; }
.mfn-rates--large .mfn-rates__head h2 { font-size: 26px; }
.mfn-rates--large td { font-size: 18px; }

/* ---------- calculator ---------- */
.mfn-calc { background: var(--wp--preset--color--green); color: #fff; border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.mfn-calc h2 { color: #fff; margin: 0; font-size: 24px; }
.mfn-calc__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mfn-calc .mfn-field label { color: #D6EEE6; }
.mfn-calc .mfn-field input { background: #08513F; border-color: #2E8A74; color: #fff; }
.mfn-calc__result { background: #08513F; border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.mfn-calc__label { font-size: 13px; color: #BFE5D8; }
.mfn-calc__total { font-family: var(--wp--preset--font-family--heading); font-size: 36px; font-weight: 800; line-height: 1.1; }
.mfn-calc__rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; color: #D6EEE6; }
.mfn-calc__rows li { display: flex; justify-content: space-between; gap: 12px; }
.mfn-calc__rows strong { color: #fff; }
.mfn-calc__note { font-size: 12.5px; color: #BFE5D8; margin: 0; }

/* ---------- footer ---------- */
.mfn-footer { background: var(--wp--preset--color--navy); color: #C5D2DF; font-size: 14px; padding-top: 64px !important; padding-bottom: 32px !important; }
.mfn-footer h2 { font-size: 12px !important; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin: 0 0 12px; font-family: var(--wp--preset--font-family--body); }
.mfn-footer a { color: #DCE5EE; text-decoration: none; }
.mfn-footer a:hover { color: #fff; }
.mfn-footer .wp-block-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mfn-footer .mfn-logo { color: #fff; }
.mfn-footer .mfn-logo__rule { background: #3A5370; }
.mfn-footer .mfn-logo__network { color: var(--wp--preset--color--mint); }
.mfn-social { display: flex; flex-wrap: wrap; gap: 8px; }
.mfn-social a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid #3A5370; color: #fff; font-weight: 600; font-size: 13.5px; }
.mfn-footer__bottom { border-top: 1px solid #22374D; margin-top: 48px !important; padding-top: 24px; font-size: 13px; color: #9FB0C2; }

/* ---------- block glue ---------- */
.mfn-topbar__inner > *, .mfn-topbar__links > *, .mfn-mainbar__inner > *, .mfn-sidebar > * { margin: 0 !important; }
.mfn-topbar__links p { margin: 0; }
.mfn-hero .wp-block-post-title, .mfn-hero .wp-block-query-title { color: #fff; max-width: 860px; margin-top: .5rem; }
.mfn-hero .wp-block-post-excerpt__excerpt { margin: 0; }
.mfn-hero .wp-block-post-excerpt__more-link { display: none; }
.mfn-card-link.mfn-card--green { background: var(--wp--preset--color--green); color: #fff !important; }
.mfn-card-link.mfn-card--green span { color: #D6EEE6; }
.mfn-card-link.mfn-card--green:hover { background: var(--wp--preset--color--green-dark); }
.mfn-section-pages, .mfn-related { padding: 8px 0 88px; }
.mfn-section-pages h2 { margin-bottom: 20px; }
.mfn-post-card .mfn-eyebrow a { color: var(--wp--preset--color--green); }
.wp-block-categories.mfn-chips { margin-bottom: 32px; }
.mfn-card.wp-block-group { gap: 14px; }
.mfn-content .wp-block-shortcode, .mfn-content > .mfn-calc, .mfn-content > .mfn-rates { margin-bottom: 2rem; }

/* ---------- motion ----------
   One easing curve and three durations for everything, so the site moves with one voice.
   Load animations need html.mfn-motion (set in <head> unless reduced motion is preferred). */
:root {
	--mfn-ease: cubic-bezier(.2, .7, .2, 1);
	--mfn-fast: 180ms;
	--mfn-med: 320ms;
	--mfn-slow: 700ms;
}

@keyframes mfn-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes mfn-rise-card { from { opacity: 0; transform: translateY(22px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes mfn-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mfn-draw { to { stroke-dashoffset: 0; } }
@keyframes mfn-drift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-5px); } }
@keyframes mfn-cue { 0% { box-shadow: 0 0 0 0 rgba(242, 181, 68, .55); } 100% { box-shadow: 0 0 0 16px rgba(242, 181, 68, 0); } }
@keyframes mfn-spin { to { transform: rotate(360deg); } }

/* Page headers ease in, line by line */
.mfn-motion .mfn-hero .mfn-breadcrumbs { animation: mfn-fade var(--mfn-slow) var(--mfn-ease) both; }
.mfn-motion .mfn-hero--home .wp-block-column:first-child > *,
.mfn-motion .mfn-hero__cols > .wp-block-column:first-child > *,
.mfn-motion .mfn-hero__text > * { animation: mfn-rise var(--mfn-slow) var(--mfn-ease) both; animation-delay: 60ms; }
.mfn-motion .mfn-hero--home .wp-block-column:first-child > :nth-child(2),
.mfn-motion .mfn-hero__cols > .wp-block-column:first-child > :nth-child(2),
.mfn-motion .mfn-hero__text > :nth-child(2) { animation-delay: 130ms; }
.mfn-motion .mfn-hero--home .wp-block-column:first-child > :nth-child(3),
.mfn-motion .mfn-hero__cols > .wp-block-column:first-child > :nth-child(3),
.mfn-motion .mfn-hero__text > :nth-child(3) { animation-delay: 200ms; }
.mfn-motion .mfn-hero--home .wp-block-column:first-child > :nth-child(4) { animation-delay: 270ms; }
.mfn-motion .mfn-hero--home .wp-block-column:first-child > :nth-child(5) { animation-delay: 340ms; }
.mfn-motion .mfn-hero--home .wp-block-column:last-child > *,
.mfn-motion .mfn-hero__cols > .wp-block-column:last-child > * { animation: mfn-rise-card 900ms var(--mfn-ease) 260ms both; }

/* The logo ribbon draws itself on the first page of a visit, and drifts gently on hover */
.mfn-logo svg path { transform-box: fill-box; }
.mfn-motion:not(.mfn-seen) .mfn-header .mfn-logo path { stroke-dasharray: 140; stroke-dashoffset: 140; animation: mfn-draw 1100ms cubic-bezier(.65, 0, .35, 1) 200ms forwards; }
.mfn-motion:not(.mfn-seen) .mfn-header .mfn-logo path + path { animation-delay: 380ms; }
.mfn-motion .mfn-logo:hover path { animation: mfn-drift 2.4s ease-in-out infinite; }
.mfn-motion .mfn-logo:hover path + path { animation-delay: -1.2s; }

/* Scroll reveal: only elements below the fold get data-reveal (from motion.js) */
.mfn-motion [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity var(--mfn-slow) var(--mfn-ease), transform var(--mfn-slow) var(--mfn-ease); transition-delay: var(--mfn-d, 0ms); }
.mfn-motion [data-reveal].is-in { opacity: 1; transform: none; }

/* Sliding menu highlight */
.mfn-nav.has-pill { position: relative; }
.mfn-nav.has-pill .wp-block-navigation-item { position: relative; z-index: 1; }
.mfn-nav.has-pill .wp-block-navigation-item__content:hover { background: transparent; }
.mfn-nav.has-pill .current-menu-item > .wp-block-navigation-item__content:hover,
.mfn-nav.has-pill .current-menu-ancestor > .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--green-tint); }
.mfn-nav-pill { position: absolute; left: 0; top: 0; z-index: 0; border-radius: 8px; background: #EEF2F5; opacity: 0; pointer-events: none; transition: transform var(--mfn-med) var(--mfn-ease), width var(--mfn-med) var(--mfn-ease), opacity var(--mfn-fast) ease; }
.mfn-nav-pill.is-on { opacity: 1; }
.mfn-nav-pill.no-slide { transition: opacity var(--mfn-fast) ease; }

/* Mobile menu opens with a soft fade instead of snapping */
.mfn-motion .wp-block-navigation__responsive-container.is-menu-open { animation: mfn-fade 240ms var(--mfn-ease); }

/* Quote form cue after "Get free quotes" */
.mfn-form.is-cued { animation: mfn-cue 1100ms var(--mfn-ease) 2; }

/* Sending state */
.mfn-form button.is-sending { pointer-events: none; opacity: .85; }
.mfn-form button.is-sending::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: mfn-spin .7s linear infinite; }

/* Hover and press: small, quick, and only on things you can click */
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
	.wp-block-button__link, .mfn-form button, .mfn-hero-card__button { transition: transform var(--mfn-fast) var(--mfn-ease), box-shadow var(--mfn-fast) var(--mfn-ease), background-color var(--mfn-fast) ease; }
	.wp-block-button__link:hover, .mfn-form button:hover, .mfn-hero-card__button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgba(11, 31, 51, .45); }
	.wp-block-button__link:active, .mfn-form button:active, .mfn-hero-card__button:active { transform: translateY(0) scale(.985); box-shadow: none; transition-duration: 80ms; }

	.mfn-card-link, .mfn-post-card { transition: transform var(--mfn-med) var(--mfn-ease), box-shadow var(--mfn-med) var(--mfn-ease), background-color var(--mfn-fast) ease, border-color var(--mfn-fast) ease; }
	.mfn-card-link:hover, .mfn-post-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(11, 31, 51, .35); }
	.mfn-post-card:hover { border-color: #D3DCE4; }

	.mfn-card-link strong::after { content: "→"; display: inline-block; margin-left: 6px; opacity: 0; transform: translateX(-6px); transition: opacity var(--mfn-fast) ease, transform var(--mfn-med) var(--mfn-ease); }
	.mfn-card-link:hover strong::after { opacity: 1; transform: none; }

	.mfn-nav .wp-block-navigation-item__content, .mfn-chips li a, .mfn-topbar a, .mfn-footer a, .mfn-breadcrumbs a { transition: background-color var(--mfn-fast) ease, color var(--mfn-fast) ease, border-color var(--mfn-fast) ease; }
	.mfn-field input, .mfn-field select, .mfn-field textarea { transition: border-color var(--mfn-fast) ease, box-shadow var(--mfn-fast) ease; }
	.mfn-rates tr { transition: background-color var(--mfn-fast) ease; }
}
.mfn-field input:focus, .mfn-field select:focus, .mfn-field textarea:focus { outline: none; border-color: var(--wp--preset--color--green); box-shadow: 0 0 0 3px rgba(11, 107, 87, .16); }
.mfn-form--dark .mfn-field select:focus, .mfn-calc .mfn-field input:focus { border-color: var(--wp--preset--color--mint); box-shadow: 0 0 0 3px rgba(111, 211, 178, .22); }

/* Respect reduced motion everywhere */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* ---------- small screens ---------- */
@media (max-width: 781px) {
	.mfn-form__grid, .mfn-calc__grid { grid-template-columns: 1fr; }
	.mfn-topbar__tagline { display: none; }
	.mfn-hero--home { padding-top: 48px !important; padding-bottom: 56px !important; }
	.mfn-card-grid { grid-template-columns: 1fr; }
	.mfn-breadcrumbs { margin-bottom: 28px !important; }
	.mfn-hero__cols { gap: 28px !important; }
}

/* ---------- phones ----------
   WordPress collapses the menu below 600px. There the top bar is hidden and its
   search and links move into the menu (items marked .mfn-nav-mobile). */
@media (min-width: 600px) {
	.mfn-nav .mfn-nav-mobile { display: none !important; }
}
@media (max-width: 599px) {
	.mfn-topbar { display: none; }

	/* one row: logo · Get quotes · menu */
	.mfn-mainbar__inner { flex-wrap: nowrap; gap: 10px; padding: 12px 16px; }
	.mfn-logo { margin-right: auto; gap: 9px; }
	.mfn-logo__mfn { font-size: 24px; }
	.mfn-logo svg { width: 52px; }
	.mfn-logo__rule { height: 34px; }
	.mfn-logo__mortgage { font-size: 14px; }
	.mfn-logo__network { font-size: 11px; }
	.mfn-mainbar__inner > .wp-block-buttons { order: 2; flex: none; }
	.mfn-mainbar__inner > .mfn-nav { order: 3; flex: none; }
	.mfn-mainbar__inner .wp-block-button__link { min-height: 40px; padding: 8px 14px; font-size: 14px; }

	/* the hero pill wraps to two lines on phones; a softer corner suits that shape */
	.mfn-chip { border-radius: 12px; line-height: 1.5; }

	/* hero buttons share one full width instead of two ragged widths */
	.mfn-hero .wp-block-buttons { flex-direction: column; align-items: stretch; }
	.mfn-hero .wp-block-button__link { width: 100%; justify-content: center; }
}

/* the open phone menu */
.mfn-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 20px 20px 32px; }
.mfn-nav .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 44px; align-items: stretch !important; }
.mfn-nav .is-menu-open .wp-block-navigation__container { align-items: stretch !important; gap: 2px; width: 100%; }
.mfn-nav .is-menu-open .wp-block-navigation-item { width: 100%; }
.mfn-nav .is-menu-open .wp-block-navigation-item__content { width: 100%; min-height: 52px; padding: 0 12px !important; font-size: 18px; font-weight: 600; color: var(--wp--preset--color--navy); }
.mfn-nav .is-menu-open .mfn-nav-search { width: 100%; margin: 0 0 10px; }
.mfn-nav .is-menu-open .mfn-nav-search .wp-block-search__inside-wrapper { border: 1px solid #CBD5E0; border-radius: 12px; padding: 0; background: #fff; }
.mfn-nav .is-menu-open .mfn-nav-search .wp-block-search__input { height: 48px; border: 0; padding: 0 14px; font-size: 16px; background: transparent; }
.mfn-nav .is-menu-open .mfn-nav-search .wp-block-search__button { background: transparent; color: var(--wp--preset--color--muted); border: 0; margin: 0; }
.mfn-nav .is-menu-open .wp-block-navigation-item:not(.mfn-nav-extra) + .mfn-nav-extra { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--wp--preset--color--border); }
.mfn-nav .is-menu-open .mfn-nav-extra .wp-block-navigation-item__content { font-size: 16px; font-weight: 500; color: var(--wp--preset--color--slate); min-height: 46px; }
