/* =============================================================
   Dylan McCaghren — Spire Financial LO landing page
   Style: "The Closer v3 / Dream Rate" warm editorial canvas
   Brand: Spire colors (Paul-ratified 2026-07-09) in AA-safe roles:
     #005B94 workhorse — links, small accents, CTA fill w/ WHITE text
     #3494D1 LARGE display text + decorative only; BLACK text on its fills
     #000000 neutral dark (body uses the Dream Rate ink #2B2B2B)
   ============================================================= */

:root {
    /* Spire brand */
    --spire-primary: #005B94;      /* AA both directions on white (7.2:1) */
    --spire-primary-hover: #004670;
    --spire-sky: #3494D1;          /* large/decorative ONLY (3.3:1) */
    --spire-black: #000000;

    /* Dream Rate warm canvas */
    --cream: #F4F1DE;
    --paper: #FDFBF7;
    --sand: #E8E5D5;
    --sand-deep: #D1CDBA;
    --ink: #2B2B2B;
    --dark: #1E1E1E;

    /* Functional (VIP base inheritance) */
    --success: #157960;
    --success-tint: #E3F4EE;
    --error: #B0451E;
    --error-tint: #F8E5DD;
    --hush-aa: #566472;            /* AA-safe fine print (6.07:1), ≥12px */
    --gold: #FCAF17;               /* decorative fill only; black text on gold; dark grounds only */
    --gold-hover: #E89E0A;

    /* Type */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-serif: 'Merriweather', Georgia, serif;
    --font-hand: 'Caveat', cursive;

    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
    --shadow-editorial: 0 20px 60px -15px rgba(0, 0, 0, 0.08);
    --max-w: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 900px; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---------- Typography ---------- */

.section-headline {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 12px;
    color: var(--ink);
}

/* Large display accent — #3494D1 is AA-cleared at display sizes only */
.headline-italic { font-style: italic; color: var(--spire-sky); }

.section-sub {
    font-family: var(--font-serif);
    color: var(--hush-aa);
    font-size: 1.1rem;
    margin: 0;
}

.section { padding: 96px 0; }
.section-white { background: var(--paper); }
.section-cream { background: var(--cream); }
.section-sand { background: var(--sand); }
.section-intro { text-align: center; margin-bottom: 56px; }
.section-cta { text-align: center; margin-top: 48px; }

/* ---------- Links & buttons ---------- */

a { color: var(--spire-primary); }

.link-accent {
    color: var(--spire-primary);
    font-weight: 700;
    text-decoration: none;
}
.link-accent:hover { text-decoration: underline; }

.link-on-dark { color: #fff; font-weight: 600; text-decoration: underline; }
.link-on-dark:hover { color: var(--sand); }

.btn {
    display: inline-block;
    padding: 14px 28px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn-lg { padding: 18px 36px; font-size: 1.05rem; }

.btn-primary { background: var(--spire-primary); color: #fff; }
.btn-primary:hover { background: var(--spire-primary-hover); }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--dark); }
.btn-outline:hover { background: var(--dark); color: #fff; }

/* Gold energy variant — dark grounds only; black text (white on gold fails AA) */
.btn-gold { background: var(--gold); color: var(--spire-black); }
.btn-gold:hover { background: var(--gold-hover); }

.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
    outline: 2px solid var(--spire-sky);
    outline-offset: 2px;
}

.cta-microcopy { font-size: 0.85rem; color: var(--hush-aa); margin-top: 12px; }

/* ---------- Header ---------- */

.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: rgba(244, 241, 222, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--sand);
    transition: box-shadow 0.2s;
}
.site-header.is-scrolled { box-shadow: var(--shadow-soft); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 80px;
}

.brand-lockup { text-decoration: none; line-height: 1.15; }
.brand-name {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--ink);
    letter-spacing: -0.02em;
}
.brand-logo {
    display: block;
    height: 32px;
    width: auto;
    margin-top: 3px;
}

.header-nav { display: flex; gap: 32px; }
.header-nav a {
    color: var(--ink);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}
.header-nav a:hover { color: var(--spire-primary); }

.header-actions { display: flex; align-items: center; gap: 20px; }
.header-phone {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.9rem;
    color: var(--ink);
    text-decoration: none;
}
.header-phone:hover { color: var(--spire-primary); }

/* ---------- Hero ---------- */

.hero { padding: 170px 0 100px; overflow: hidden; }

.hero-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 48px;
    align-items: center;
}

.hero-kicker {
    font-family: var(--font-hand);
    font-size: 1.7rem;
    color: var(--spire-primary);
    transform: rotate(-2deg);
    margin: 0 0 16px;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 7vw, 5.2rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin: 0 0 24px;
    color: var(--ink);
}

.headline-accent {
    font-style: italic;
    -webkit-text-stroke: 1.5px var(--ink);
    color: transparent;
}

.hero-sub {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    line-height: 1.65;
    color: var(--ink);
    max-width: 34em;
    margin: 0 0 32px;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; }

.trust-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 36px;
    font-size: 0.9rem;
    font-weight: 500;
}
.trust-item { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.trust-item i { color: var(--spire-primary); }
.trust-reviews { text-decoration: none; }
.trust-reviews:hover { text-decoration: underline; color: var(--spire-primary); }

.hero-media { position: relative; }
.hero-image-slot {
    aspect-ratio: 4 / 5;
    background: var(--sand);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-image-slot::before, .hero-image-slot::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(48px);
    opacity: 0.30;
    pointer-events: none;
}
.hero-image-slot::before { width: 200px; height: 200px; bottom: -32px; left: -32px; background: var(--spire-sky); }
.hero-image-slot::after { width: 260px; height: 260px; top: -32px; right: -32px; background: var(--spire-primary); }

.pending-label {
    font-size: 0.85rem;
    color: var(--hush-aa);
    border: 2px dashed var(--sand-deep);
    padding: 12px 16px;
    background: var(--paper);
    text-align: center;
    max-width: 85%;
}

/* ---------- Stars ---------- */

.stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.stars-sm .star, .stars-sm svg { width: 14px; height: 14px; }

/* ---------- About / Meet Your Loan Officer ---------- */

.about-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 64px;
    align-items: center;
}

.about-media { position: relative; }
.lo-headshot { width: 100%; height: auto; background: var(--sand); }

.nmls-badge {
    position: absolute;
    bottom: -24px;
    right: -16px;
    background: var(--spire-primary);
    color: #fff;
    padding: 20px 24px;
    box-shadow: var(--shadow-editorial);
}
.nmls-badge-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 4px;
}
.nmls-badge-value { font-family: var(--font-display); font-size: 1.8rem; }

.about-title { font-weight: 600; color: var(--spire-primary); margin: 0 0 20px; }

.about-para {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    line-height: 1.75;
    margin: 0 0 18px;
}

.about-licenses { margin: 8px 0 28px; font-weight: 500; }
.about-licenses i { color: var(--spire-primary); margin-right: 8px; }

/* ---------- Stories of Home ---------- */

.stories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.story-card { background: var(--paper); box-shadow: var(--shadow-soft); }

.story-photo {
    aspect-ratio: 16 / 10;
    width: 100%;
    object-fit: cover;
    background: var(--sand);
}
.story-photo-pending { display: flex; align-items: center; justify-content: center; }

.story-quote { padding: 24px; }
.story-quote blockquote {
    font-family: var(--font-serif);
    font-style: italic;
    margin: 10px 0 14px;
    line-height: 1.7;
}
.story-attribution { font-weight: 700; margin: 0; font-size: 0.9rem; }

/* ---------- Loan programs ---------- */

.programs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.program-card {
    background: var(--paper);
    padding: 32px;
    box-shadow: var(--shadow-soft);
    transition: box-shadow 0.2s;
}
.program-card:hover { box-shadow: var(--shadow-editorial); }

.program-icon {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: rgba(52, 148, 209, 0.16); /* sky tint — decorative */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.program-icon i { color: var(--spire-primary); font-size: 1.4rem; }

.program-name { font-family: var(--font-display); font-size: 1.7rem; margin: 0 0 10px; }
.program-desc { font-family: var(--font-serif); color: var(--hush-aa); margin: 0 0 16px; line-height: 1.65; }

.program-points { list-style: none; padding: 0; margin: 0 0 20px; font-size: 0.92rem; }
.program-points li { display: flex; gap: 10px; margin-bottom: 8px; }
.program-points i { color: var(--success); margin-top: 4px; }

/* ---------- Calculator ---------- */

.calc-panel { background: var(--sand); padding: 40px; box-shadow: var(--shadow-editorial); }

.calc-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 36px;
}

.field label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.field input, .field select, .field textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 1.05rem;
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--ink);
    background: var(--paper);
    border: 2px solid rgba(43, 43, 43, 0.2);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--spire-primary); outline: none; }
.field input[aria-invalid="true"] { border-color: var(--error); }

.input-prefix, .input-suffix { position: relative; }
.input-prefix span, .input-suffix span {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    font-size: 1.1rem;
    color: var(--hush-aa);
}
.input-prefix span { left: 14px; }
.input-prefix input { padding-left: 34px; }
.input-suffix span { right: 14px; }
.input-suffix input { padding-right: 34px; }

.calc-result { background: var(--dark); color: var(--paper); padding: 36px; text-align: center; }
.calc-result-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--sand);
    margin: 0 0 8px;
}
.calc-result-value {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 4.5rem);
    margin: 0 0 12px;
    font-variant-numeric: tabular-nums;
}
.calc-disclaimer { font-size: 0.8rem; color: var(--sand); max-width: 44em; margin: 0 auto 24px; }

/* ---------- Process timeline ---------- */

.process-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}
.process-steps::before {
    content: '';
    position: absolute;
    left: 34px; top: 12px; bottom: 12px;
    width: 2px;
    background: var(--sand-deep);
}

.process-step {
    display: flex;
    gap: 28px;
    margin-bottom: 44px;
    position: relative;
}

.step-marker {
    flex: 0 0 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--spire-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: var(--shadow-soft);
    z-index: 1;
}
.process-step:nth-child(even) .step-marker { background: var(--dark); }

.step-title { font-family: var(--font-display); font-size: 1.6rem; margin: 6px 0 8px; }
.step-desc { font-family: var(--font-serif); color: var(--ink); margin: 0; line-height: 1.7; max-width: 44em; }

/* ---------- Social proof strip ---------- */

.social-proof { background: var(--dark); color: var(--paper); padding: 64px 0; }

.proof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
    text-align: center;
    align-items: center;
}

.proof-value {
    font-family: var(--font-display);
    font-size: 3rem;
    margin: 6px 0 2px;
    font-variant-numeric: tabular-nums;
}
.proof-label { font-size: 0.85rem; color: var(--sand); margin: 0; }

/* ---------- Pre-qual form ---------- */

.prequal-form { background: var(--sand); padding: 40px; box-shadow: var(--shadow-editorial); }

.form-progress { margin-bottom: 32px; }
.form-progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.form-progress-track { height: 8px; background: rgba(43, 43, 43, 0.1); border-radius: 4px; overflow: hidden; }
.form-progress-bar { height: 100%; background: var(--spire-primary); transition: width 0.3s ease; }

.form-step { border: 0; padding: 0; margin: 0 0 8px; }

.goal-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.goal-card {
    background: var(--paper);
    border: 2px solid transparent;
    padding: 22px 16px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
}
.goal-card input { position: absolute; opacity: 0; }
.goal-card span { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.goal-card i { font-size: 1.5rem; color: var(--spire-primary); }
.goal-card:has(input:checked) { border-color: var(--spire-primary); }
.goal-card:has(input:focus-visible) { outline: 2px solid var(--spire-sky); outline-offset: 2px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.prequal-form .field { margin-bottom: 20px; }

.form-nav { display: flex; justify-content: flex-end; gap: 16px; margin-top: 8px; }

.form-error { background: var(--error-tint); color: var(--error); padding: 12px 16px; font-weight: 600; }
.form-success { background: var(--success-tint); color: var(--success); padding: 12px 16px; font-weight: 600; }

/* ---------- FAQ ---------- */

.faq-list { display: flex; flex-direction: column; gap: 16px; }

.faq-item { background: var(--paper); border: 2px solid var(--sand); }

.faq-item summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 28px;
    cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { color: var(--spire-primary); transition: transform 0.25s; }
.faq-item[open] summary i { transform: rotate(180deg); }

.faq-q { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 700; margin: 0; }
.faq-a {
    font-family: var(--font-serif);
    line-height: 1.75;
    margin: 0;
    padding: 0 28px 24px;
    color: var(--ink);
}

/* ---------- Insights ---------- */

.insights-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }

.insight-card { background: var(--sand); padding: 28px; box-shadow: var(--shadow-soft); }
.insight-tag {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 700;
    color: var(--spire-primary);
    margin: 0 0 12px;
}
.insight-title { font-family: var(--font-display); font-size: 1.4rem; margin: 0 0 10px; }
.insight-desc { font-family: var(--font-serif); font-size: 0.95rem; color: var(--hush-aa); margin: 0; }

/* ---------- Footer ---------- */

.site-footer { background: var(--dark); color: var(--paper); padding: 80px 0 32px; }

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(253, 251, 247, 0.12);
    margin-bottom: 32px;
}

.footer-name {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 4px;
    letter-spacing: -0.02em;
}
/* Light chip so the dark logo art sits on an approved light surface */
.footer-logo-chip {
    display: inline-block;
    background: var(--paper);
    padding: 10px 14px;
    margin: 4px 0 24px;
}
.footer-logo-chip img { height: 44px; width: auto; display: block; }

.footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-contact li { display: flex; gap: 12px; margin-bottom: 12px; align-items: baseline; }
.footer-contact i { color: var(--spire-sky); }

.site-footer a { color: var(--paper); }
.site-footer a:hover { color: var(--spire-sky); }

.footer-col h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--sand);
    margin: 0 0 18px;
}
.footer-col p { margin: 0 0 12px; font-size: 0.95rem; }

.footer-social { display: flex; gap: 12px; margin-top: 20px; }
.footer-social a {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(253, 251, 247, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}
.footer-social a:hover { border-color: var(--spire-sky); }

.footer-legal { font-size: 0.82rem; color: var(--sand); }
.footer-legal p { margin: 0 0 8px; }
.footer-disclaimer { line-height: 1.7; margin: 16px 0 !important; }
.footer-disclaimer a { color: var(--sand); text-decoration: underline; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .hero-grid, .about-grid { grid-template-columns: 1fr; }
    .hero { padding-top: 130px; }
    .hero-media { order: -1; max-width: 420px; }
    .stories-grid, .programs-grid, .insights-grid { grid-template-columns: 1fr 1fr; }
    .header-nav { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .nmls-badge { right: 8px; }
}

@media (max-width: 640px) {
    .section { padding: 64px 0; }
    .stories-grid, .programs-grid, .insights-grid, .goal-cards, .field-row, .calc-fields { grid-template-columns: 1fr; }
    .header-phone { display: none; }
    .header-actions .btn { padding: 10px 16px; font-size: 0.85rem; }
    .hero-ctas .btn { width: 100%; text-align: center; }
    .footer-grid { grid-template-columns: 1fr; }
    .calc-panel, .prequal-form { padding: 24px; }
    .process-steps::before { left: 26px; }
    .step-marker { flex-basis: 52px; height: 52px; font-size: 1.1rem; }
}
