:root {
    --ice: #d4e7ee;
    --mist: #d7e8ef;
    --ink: #18181a;
    --hover: #0e3a61;
    --white: #ffffff;
    --line: rgba(24, 24, 26, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: #f8fbfc;
    font-family: "Cera Pro", "Avenir Next", "Segoe UI", Arial, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

.container {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

.narrow {
    width: min(820px, 100%);
}

.site-header {
    width: 100%;
    background: rgba(212, 231, 238, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.site-header .nav-shell {
    width: 100%;
    max-width: none;
    margin: 0;
    min-height: 132px;
    padding: 14px clamp(20px, 4vw, 48px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-size: clamp(1.3rem, 2vw, 2rem);
    line-height: 1;
    font-weight: 600;
}

.brand-logo-only {
    gap: 0;
}

.brand-logo {
    display: block;
    object-fit: contain;
}

.site-header .brand-logo {
    width: auto;
    height: 80px;
    max-width: min(340px, 46vw);
}

.footer-brand .brand-logo {
    width: 72px;
    height: 72px;
}

.brand-mark {
    width: 56px;
    height: 48px;
    display: inline-block;
    position: relative;
}

.brand-mark::before,
.brand-mark::after {
    content: "";
    position: absolute;
    background: #173754;
}

.brand-mark::before {
    width: 40px;
    height: 34px;
    left: 8px;
    bottom: 0;
}

.brand-mark::after {
    width: 40px;
    height: 40px;
    left: 8px;
    top: -7px;
    transform: rotate(45deg);
    clip-path: polygon(0 0, 100% 0, 100% 18%, 18% 100%, 0 100%);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.site-nav a {
    padding: 14px 20px;
    background: var(--white);
    border: 1px solid rgba(24, 24, 26, 0.08);
    box-shadow: 0 6px 18px rgba(24, 24, 26, 0.08);
    font-weight: 600;
}

.site-nav a:hover,
.text-link:hover {
    color: var(--hover);
}

.site-nav .nav-cta {
    color: var(--white);
    background: var(--ink);
    border-color: var(--ink);
}

.site-nav .nav-cta:hover {
    color: var(--white);
    background: var(--hover);
    border-color: var(--hover);
}

.hero {
    position: relative;
    min-height: min(72vh, 760px);
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.home-hero {
    background:
        linear-gradient(90deg, rgba(212, 231, 238, 0.98) 0%, rgba(212, 231, 238, 0.9) 42%, rgba(212, 231, 238, 0.15) 68%),
        var(--hero-image) center / cover no-repeat;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
    padding: 72px clamp(20px, 4vw, 48px);
    margin-right: auto;
    text-align: left;
}

.home-hero .hero-content {
    margin-left: 0;
}

.home-hero .button-row {
    justify-content: flex-start;
}

.eyebrow {
    margin: 0 0 16px;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.hero h1,
.page-hero h1 {
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.05;
    letter-spacing: 0;
    margin-bottom: 24px;
}

.hero-heading {
    display: grid;
    gap: 0.12em;
}

.hero-heading-line {
    display: block;
}

.hero-copy,
.lead-copy,
.contact-grid p {
    font-size: 1.08rem;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border: 1px solid transparent;
    font-weight: 700;
    transition: 180ms ease;
    cursor: pointer;
}

.button-primary {
    color: var(--white);
    background: var(--ink);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(24, 24, 26, 0.16);
}

.button:hover {
    color: var(--white);
    background: var(--hover);
}

.section {
    padding: 88px 0;
}

.split-grid,
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
    gap: 48px;
    align-items: start;
}

.split-grid h2,
.contact-grid h2 {
    font-size: clamp(1.7rem, 2.6vw, 2.7rem);
    line-height: 1.1;
}

.stacked-copy p:last-child {
    margin-bottom: 0;
}

.cards-band {
    background: var(--mist);
}

.card-grid {
    display: grid;
    gap: 18px;
}

.three-up {
    grid-template-columns: repeat(3, 1fr);
}

.info-card {
    min-height: 210px;
    padding: 28px;
    background: var(--white);
    border: 1px solid rgba(24, 24, 26, 0.08);
}

.info-card h3,
.process-grid h3,
.mortgage-list h2 {
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.process-grid {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.process-grid article {
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.process-grid span {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--hover);
    font-weight: 700;
}

.page-hero {
    padding: 88px 0 48px;
    background: var(--ice);
}

.mortgage-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.mortgage-list article {
    padding: 28px;
    background: var(--white);
    border: 1px solid rgba(24, 24, 26, 0.08);
}

.contact-form {
    display: grid;
    gap: 18px;
    padding: 28px;
    background: var(--white);
    border: 1px solid rgba(24, 24, 26, 0.08);
}

.contact-form label {
    display: grid;
    gap: 8px;
    font-weight: 600;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    border: 1px solid rgba(24, 24, 26, 0.18);
    padding: 14px 15px;
    background: #fff;
    font: inherit;
}

.contact-form textarea {
    resize: vertical;
}

.alert {
    padding: 14px 16px;
}

.alert.success {
    background: rgba(14, 58, 97, 0.12);
}

.alert.error {
    background: rgba(173, 31, 31, 0.1);
}

.alert ul {
    margin: 0;
    padding-left: 18px;
}

.site-footer {
    padding: 56px 0;
    background: var(--ink);
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.6fr 0.8fr;
    gap: 32px;
}

.footer-brand {
    margin-bottom: 16px;
}

.footer-grid h2 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.footer-grid a:not(.brand) {
    display: block;
    margin-bottom: 10px;
}

@media (max-width: 860px) {
    .nav-shell,
    .split-grid,
    .contact-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .nav-shell {
        display: grid;
        padding: 20px 0;
    }

    .site-header .brand-logo {
        height: 80px;
        max-width: min(280px, 72vw);
    }

    .site-nav {
        justify-content: flex-start;
    }

    .three-up,
    .process-grid,
    .mortgage-list {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 620px;
    }

    .home-hero {
        background:
            linear-gradient(180deg, rgba(212, 231, 238, 0.98) 0%, rgba(212, 231, 238, 0.9) 44%, rgba(212, 231, 238, 0.3) 100%),
            var(--hero-image) center / cover no-repeat;
    }
}
