/* Standard - Modern (FEA-875).
   The standard template's pages and forms, in the mortgagewizard design
   language (mortgagewizard/static/site.css). Every page still extends
   bs4_base2.html, so this sheet also neutralises the base template's dark
   navbar, photo background, `.content` padding/colour and the Bootstrap
   container width where they fight the layout. Brand colours are
   generator-filled below; everything else derives from them. */

:root {
    --sm-brand: #4d35c4;
    --sm-accent: #4d35c4;
    --sm-kicker: #f8fcfc;
    --sm-header-bg: #ffffff;
    --sm-footer-bg: #f8fcfc;
    --sm-footer-text: #000000;
    --sm-brand-dark: color-mix(in srgb, var(--sm-brand) 78%, #000);
    --sm-brand-tint: color-mix(in srgb, var(--sm-brand) 8%, #fff);
    --sm-brand-ring: color-mix(in srgb, var(--sm-brand) 25%, transparent);
    --sm-ink: #15201a;
    --sm-muted: #5b6a64;
    --sm-line: #d7dfdb;
    --sm-bg: #f4f6f3;
    --sm-danger: #c0392b;
    --sm-radius: 14px;
    /* kept for any herocontent / copy-library HTML that references it */
    --btncolor: #4d35c4;
}

/* ---- base-template neutralisation -------------------------------------- */
html {
    height: auto;
    -webkit-text-size-adjust: 100%;
}
body {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    margin: 0;
    padding-top: 0 !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--sm-ink);
    background: var(--sm-bg) !important;
    overflow-x: hidden;
}
body > .container.content {
    flex: 1 0 auto;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 !important;
    color: var(--sm-ink);
}
body > .container.content > .row {
    display: block;
    margin: 0 !important;
}
.inputs { color: var(--sm-ink); }
.custom-bg-top { position: relative; }
svg { flex: none; }

.sm-wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.sm-wrap--narrow { max-width: 900px; }

/* ---- header ------------------------------------------------------------- */
.sm-header {
    position: sticky; top: 0; z-index: 20;
    background: var(--sm-header-bg);
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.sm-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.sm-logo { order: 1; }
.sm-logo img { display: block; width: auto; max-width: 220px; height: auto; }
.sm-header-actions { order: 3; display: flex; align-items: center; gap: 10px; margin-left: auto; }
.sm-header-call {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--sm-brand); text-decoration: none; font-weight: 700; white-space: nowrap;
}
.sm-header-call:hover, .sm-header-call:focus { color: var(--sm-brand-dark); text-decoration: none; }
.sm-header-call svg { width: 36px; height: 36px; padding: 8px; border-radius: 50%;
    background: var(--sm-brand-tint); stroke: var(--sm-brand); fill: none; stroke-width: 2; }
.sm-header-call-text { display: flex; flex-direction: column; line-height: 1.15; }
.sm-header-call-text small { font-size: 12px; font-weight: 500; color: var(--sm-muted); }

/* micro-site links: inline on desktop, behind the toggle below 992px */
.sm-nav { order: 2; display: flex; flex-wrap: wrap; gap: 4px 6px; justify-content: center; flex: 1; }
.sm-nav a {
    padding: 6px 10px; border-radius: 8px; font-size: 15px; font-weight: 600;
    color: var(--sm-ink); text-decoration: none; white-space: nowrap;
}
.sm-nav a:hover, .sm-nav a:focus { color: var(--sm-brand); background: var(--sm-brand-tint); text-decoration: none; }
.sm-nav-toggle {
    display: none; width: 40px; height: 40px; padding: 8px; border-radius: 10px;
    border: 1.5px solid var(--sm-line); background: #fff; cursor: pointer;
}
.sm-nav-toggle svg { width: 22px; height: 22px; stroke: var(--sm-ink); fill: none; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 991.98px) {
    .sm-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .sm-nav { display: none; order: 4; flex-basis: 100%; flex-direction: column; padding: 6px 0 12px; border-top: 1px solid rgba(0, 0, 0, .06); }
    .sm-nav.show { display: flex; }
}

/* ---- hero --------------------------------------------------------------- */
.sm-hero {
    position: relative;
    padding: 56px 0 72px;
    color: #fff;
    background:
        radial-gradient(900px 420px at 85% -10%, color-mix(in srgb, var(--sm-accent) 35%, transparent), transparent 70%),
        radial-gradient(700px 500px at -10% 110%, rgba(255, 255, 255, .10), transparent 60%),
        linear-gradient(160deg, var(--sm-brand) 0%, var(--sm-brand-dark) 100%);
    overflow: hidden;
}
.sm-hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
    background-image: linear-gradient(rgba(255,255,255,.9) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,.9) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 80%);
            mask-image: linear-gradient(180deg, #000, transparent 80%);
}
.sm-hero > .sm-wrap { position: relative; z-index: 1; display: grid; gap: 40px; align-items: start; }
@media (min-width: 960px) {
    .sm-hero > .sm-wrap { grid-template-columns: 1.05fr 1fr; gap: 56px; }
    .sm-pitch { padding-top: 24px; }
}
.sm-pitch, .sm-card { min-width: 0; }

.sm-eyebrow {
    display: inline-block; margin: 0 0 16px; padding: 6px 12px; border-radius: 999px;
    font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
}
.sm-hello { margin: 0 0 8px; font-size: clamp(22px, 3vw, 30px); line-height: 1.15; font-weight: 800; letter-spacing: -.01em; color: var(--sm-accent); }
.sm-sub { font-size: 18px; color: rgba(255, 255, 255, .86); max-width: 34em; overflow-wrap: anywhere; }
.sm-sub > strong:first-child,
.sm-sub > b:first-child,
.sm-sub h1, .sm-sub h2 {
    display: block; margin: 0 0 16px; color: #fff;
    font-size: clamp(30px, 4.4vw, 48px); line-height: 1.08; font-weight: 800; letter-spacing: -.02em;
}
.sm-sub p { margin: 0 0 12px; padding-top: 0 !important; }
.sm-sub ul { list-style: none; margin: 16px 0 0; padding: 0; }
.sm-sub li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.sm-sub li::before {
    content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--sm-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.sm-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 28px 0 0; padding: 0; font-size: 14px; color: rgba(255, 255, 255, .8); }
.sm-trust li { display: inline-flex; align-items: center; gap: 8px; }
.sm-trust svg { width: 18px; height: 18px; fill: none; stroke: var(--sm-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Hero CTA stack classes (kicker / headline / bullets / tagline) used by
   config-driven herocontent HTML -- same names as the standard template. */
.hero-stack { max-width: 560px; }
.hero-kicker { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.12em; margin-bottom: 0.35rem; color: var(--sm-accent); }
.hero-headline { font-weight: 800; margin-bottom: 0.75rem; color: #fff; }
.hero-bullets { list-style: none; padding-left: 0; margin-bottom: 0.9rem; }
.hero-tagline { font-style: italic; font-weight: 600; margin-bottom: 0; }

/* ---- form card ---------------------------------------------------------- */
.sm-card {
    color: var(--sm-ink); background: #fff; border-radius: 22px; padding: 28px;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .06);
}
@media (max-width: 520px) { .sm-card { padding: 22px 18px; border-radius: 18px; } }
.sm-card-title { margin: 0 0 18px; font-size: 22px; line-height: 1.25; font-weight: 750; letter-spacing: -.01em; color: var(--sm-ink); }

.sm-field { margin-bottom: 16px; min-width: 0; }
.sm-field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--sm-ink); }
.sm-field .required { color: var(--sm-danger); margin-left: 2px; }
.sm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .sm-row--stack { grid-template-columns: 1fr; } }
.sm-card .form-control,
.sm-field select {
    display: block; width: 100%; height: 52px; padding: 0 14px;
    font: inherit; font-size: 16px; color: var(--sm-ink);
    background: #fff; border: 1.5px solid var(--sm-line); border-radius: 12px;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none; appearance: none;
}
.sm-card .sm-field select {
    padding-right: 36px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%235b6a64' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E") right 12px center / 14px no-repeat;
}
.sm-card .form-control:focus,
.sm-field select:focus { outline: none; border-color: var(--sm-brand); box-shadow: 0 0 0 4px var(--sm-brand-ring); }
.sm-input--code { height: 60px !important; font-size: 22px !important; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

/* the submit stays an <input type="submit" class="btn ..."> -- the base
   template's disable_form_submit.html sets its value to "Processing..." */
.sm-card .btn.btn-submit,
.sm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; height: 56px; margin-top: 8px; padding: 0 20px;
    font: inherit; font-size: 17px; font-weight: 700; color: #fff; text-decoration: none;
    background: var(--sm-brand); border: 0; border-radius: 12px; cursor: pointer;
    box-shadow: 0 10px 20px -10px var(--sm-brand);
    transition: background .15s, transform .1s;
}
.sm-card .btn.btn-submit:hover,
.sm-card .btn.btn-submit:focus,
.sm-btn:hover { background: var(--sm-brand-dark); color: #fff; text-decoration: none; }
.sm-card .btn.btn-submit:active, .sm-btn:active { transform: translateY(1px); }
.sm-card .btn.btn-submit:disabled { opacity: .7; cursor: progress; }
.sm-btn--ghost { background: #fff; color: var(--sm-brand); border: 2px solid var(--sm-brand); box-shadow: none; }
.sm-btn--ghost:hover { background: var(--sm-brand-tint); color: var(--sm-brand); }
.sm-alt { margin: 16px 0 0; text-align: center; font-size: 14px; color: var(--sm-muted); }
.sm-alt a { color: var(--sm-brand); font-weight: 700; }

/* consent: the shared partial and the brand-voice fallback */
.sm-card .sms-consent-container { font-size: 13px; background: var(--sm-brand-tint) !important; border-color: color-mix(in srgb, var(--sm-brand) 18%, #fff) !important; border-radius: 12px !important; }
.sm-card .sms-consent-container .form-check { display: flex; gap: 10px; align-items: flex-start; padding-left: 0; }
.sm-card .sms-consent-container .form-check-input { position: static; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--sm-brand); }
.sm-fineprint { margin: 14px 0 0; font-size: 12px; line-height: 1.45; color: var(--sm-muted); }
.sm-fineprint a { color: var(--sm-brand); font-weight: 600; }

/* ---- below the fold ----------------------------------------------------- */
.sm-how { padding: 56px 0 24px; }
.sm-how-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .sm-how-grid { grid-template-columns: 1fr; } }
.sm-how-item { padding: 24px; background: #fff; border-radius: var(--sm-radius); border: 1px solid #e3e9e6; }
.sm-how-item h3 { margin: 12px 0 6px; font-size: 18px; font-weight: 700; color: var(--sm-ink); }
.sm-how-item p { margin: 0; color: var(--sm-muted); }
.sm-how-num { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; font-weight: 800; color: #fff; background: var(--sm-brand); }

.sm-disclosure { padding: 24px 0 48px; }
.sm-disclosure p { margin: 0; padding: 18px 20px; font-size: 13px; line-height: 1.55; color: var(--sm-muted); background: #fff; border-radius: var(--sm-radius); border: 1px solid #e3e9e6; }

/* ---- inner pages (thank you, micro-site, legal) ------------------------- */
.sm-page {
    padding: 40px 0 56px;
    background: linear-gradient(160deg, var(--sm-brand) 0%, var(--sm-brand-dark) 100%) top / 100% 240px no-repeat;
}
.sm-done { text-align: center; }
.sm-done-icon svg { width: 72px; height: 72px; margin: 4px auto 14px; display: block; fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.sm-done-icon circle { stroke: var(--sm-brand); stroke-dasharray: 151; stroke-dashoffset: 151; animation: sm-draw .6s ease forwards; }
.sm-done-icon path { stroke: var(--sm-accent); stroke-dasharray: 36; stroke-dashoffset: 36; animation: sm-draw .35s .5s ease forwards; }
@keyframes sm-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .sm-done-icon circle, .sm-done-icon path { animation: none; stroke-dashoffset: 0; } }
.sm-done h1 { margin: 0 0 8px; font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; letter-spacing: -.02em; color: var(--sm-ink); }
.sm-done h2 { margin: 0 0 16px; font-size: 19px; font-weight: 600; color: var(--sm-brand); }
.sm-done-msg { margin: 0 auto 18px; max-width: 36em; font-size: 17px; color: var(--sm-ink); }
.sm-callcard { margin: 0 0 16px; padding: 16px 20px; border-radius: var(--sm-radius); background: var(--sm-brand-tint); }
.sm-callcard p { margin: 0; color: var(--sm-muted); }
.sm-done-thanks { margin: 0; font-size: 14px; color: var(--sm-muted); }

.ms-info-card { overflow-wrap: anywhere; }
.ms-info-card h1 { font-weight: 800; font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -.02em; margin-bottom: 12px; color: var(--sm-ink); }
.ms-info-card h2 { font-weight: 700; font-size: 1.25rem; margin-top: 28px; margin-bottom: 10px; color: var(--sm-ink); }
.ms-info-card p, .ms-info-card li { font-size: 1rem; line-height: 1.65; }
.ms-info-card ul { padding-left: 22px; }
.ms-lead { font-size: 1.1rem; margin-bottom: 24px; color: var(--sm-muted); }
.ms-contact-grid,
.ms-services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.ms-contact-card,
.ms-service-card { background: var(--sm-bg); border: 1px solid #e3e9e6; border-radius: var(--sm-radius); padding: 20px; }
.ms-contact-card h3,
.ms-service-card h3 { font-weight: 700; font-size: 1rem; margin: 0 0 8px; color: var(--sm-ink); }
.ms-contact-card h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--sm-muted); }
.ms-service-card p { font-size: 0.92rem; line-height: 1.55; margin: 0; color: var(--sm-muted); }
.ms-contact-card a { color: var(--sm-brand); text-decoration: none; font-weight: 700; }
.ms-contact-card a:hover { text-decoration: underline; }
.ms-disclosure-box { background: var(--sm-brand-tint); border-left: 4px solid var(--sm-brand); padding: 14px 18px; margin-top: 30px; border-radius: 8px; }
.ms-disclosure-box p { font-size: 0.88rem; line-height: 1.55; margin: 0; }
.ms-cta-row { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }
.ms-cta-row a { display: inline-block; width: auto; padding: 12px 20px; border-radius: 12px; text-decoration: none; font-weight: 700; }
.ms-cta-primary { background: var(--sm-brand); color: #fff !important; }
.ms-cta-secondary { background: #fff; color: var(--sm-brand) !important; border: 2px solid var(--sm-brand); }

/* Legal-page card: the shared-legal body partials carry their own
   `container py-5` wrapper; inside the card that padding doubles up. */
.ms-legal-card { color: #212529; }
.ms-legal-card > .container {
    max-width: none;
    padding: 0 !important;
}

/* ---- footer (mortgagewizard footer) ------------------------------------- */
.sm-footer { padding: 32px 0; font-size: 14px; text-align: center; color: var(--sm-footer-text); background: var(--sm-footer-bg); }
.sm-footer p { margin: 0 0 10px; }
.sm-footer a { color: inherit; }
.sm-footer a:hover { color: inherit; opacity: .85; }
.sm-footer-nmls { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; opacity: .9; flex-wrap: wrap; }
.sm-footer-nmls svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.sm-footer-nmls a { text-decoration: underline; }
.sm-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; }
.sm-footer-links a { text-decoration: none; }
.sm-footer-links a:hover, .sm-footer-links a:focus { text-decoration: underline; text-underline-offset: 3px; }
.sm-footer-sep { opacity: .5; }
.sm-footer-copy { opacity: .75; font-size: 13px; }

@media (max-width: 520px) {
    .sm-hero { padding: 28px 0 40px; }
    .sm-hero > .sm-wrap { gap: 24px; }
    /* Phones: keep the form near the top -- greeting and the first lines of
       copy above it; the bullet list and trust row are desktop-only. */
    .sm-sub { font-size: 16px; }
    .sm-sub ul, .sm-trust { display: none; }
    .sm-header-call-text small { display: none; }
    .sm-logo img { max-width: 150px; max-height: 40px !important; }
    .sm-page { padding-top: 24px; }
}
