/* ---------- Base ---------- */

:root {
    --page-bg: #ffffff;
    --surface: #f5f8fb;
    --surface-strong: #eaf0f6;
    --text: #1b2733;
    --muted: #5c6b79;
    --border: #d8e0e8;
    --accent: #315f86;
    --accent-dark: #234a69;
    --accent-soft: #dfeaf3;

    --content-width: 1120px;
    --narrow-width: 760px;

    --radius: 14px;
    --shadow: 0 12px 30px rgba(27, 39, 51, 0.08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 1rem;
    line-height: 1.65;
}

img {
    max-width: 100%;
}

a {
    color: var(--accent);
    text-underline-offset: 0.16em;
}

a:hover {
    color: var(--accent-dark);
}

.container {
    width: min(calc(100% - 2.5rem), var(--content-width));
    margin-inline: auto;
}

.narrow {
    max-width: var(--narrow-width);
    margin-inline: auto;
}

h1,
h2,
h3 {
    margin-top: 0;
    color: var(--text);
    line-height: 1.15;
}

h1 {
    margin-bottom: 1.25rem;
    font-size: clamp(3rem, 7vw, 5.6rem);
    letter-spacing: -0.045em;
}

h2 {
    margin-bottom: 1.25rem;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.025em;
}

h3 {
    margin-bottom: 0.85rem;
    font-size: 1.25rem;
}

p {
    margin-top: 0;
}

.eyebrow {
    margin-bottom: 0.9rem;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    align-items: center;
    min-height: 2.85rem;
    padding: 0.7rem 1.05rem;
    border-radius: 0.65rem;
    background: var(--accent);
    color: #ffffff;
    font-weight: 650;
    text-decoration: none;
}

.button:hover {
    background: var(--accent-dark);
    color: #ffffff;
}

.text-link {
    font-weight: 650;
    text-decoration-thickness: 0.08em;
}


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

.site-header {
    position: relative;
    z-index: 10;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.96);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 4.5rem;
}

.site-name {
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 750;
    text-decoration: none;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 1.25rem;
}

.site-nav a {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}

.site-nav a:hover {
    color: var(--accent-dark);
}


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

.hero {
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background:
        linear-gradient(
            135deg,
            rgba(234, 240, 246, 0.9),
            rgba(255, 255, 255, 0.92) 55%,
            rgba(223, 234, 243, 0.82)
        );
}

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 39%);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: stretch;
    min-height: clamp(500px, 63vw, 660px);
}

.hero-content {
    align-self: center;
    max-width: 690px;
    padding-block: clamp(4rem, 8vw, 7rem);
}

.hero-intro {
    max-width: 640px;
    margin-bottom: 2rem;
    color: var(--muted);
    font-size: clamp(1.08rem, 2vw, 1.3rem);
    line-height: 1.65;
}

.hero-portrait {
    display: flex;
    align-self: stretch;
    align-items: flex-end;
    justify-content: center;
    min-width: 0;
}

.hero-portrait img {
    display: block;
    width: min(100%, 455px);
    height: auto;
    margin-top: auto;

    /*
     * The image background is very light, so it can sit directly in the
     * section rather than inside a card or circular crop.
     *
     * Keeping this as a normal image, aligned with flex-end, means the
     * bottom of the portrait always meets the bottom of the hero.
     */
}


/* ---------- Main sections ---------- */

.section {
    padding-block: clamp(4rem, 8vw, 6.5rem);
}

.section-alt {
    border-block: 1px solid var(--border);
    background: var(--surface);
}

.section-intro {
    max-width: 760px;
    margin-bottom: 2.25rem;
    color: var(--muted);
    font-size: 1.08rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.card h3 a {
    color: inherit;
    text-decoration: none;
}

.card h3 a:hover {
    color: var(--accent);
}

.card p {
    color: var(--muted);
}

.card .text-link {
    margin-top: auto;
}

.card-wide {
    grid-column: 1 / -1;
}


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

.site-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 5rem;
    color: var(--muted);
    font-size: 0.94rem;
}

.footer-inner p {
    margin: 0;
}


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

@media (max-width: 900px) {
    .hero-layout {
        grid-template-columns: minmax(0, 1fr) minmax(225px, 34%);
        gap: 2rem;
        min-height: 520px;
    }

    .hero-content {
        padding-block: 4.25rem;
    }

    .hero-portrait img {
        width: min(112%, 360px);
        max-width: none;
    }
}

@media (max-width: 700px) {
    .container {
        width: min(calc(100% - 2rem), var(--content-width));
    }

    .header-inner {
        align-items: flex-start;
        padding-block: 1rem;
    }

    .site-nav {
        gap: 0.8rem 1rem;
    }

    .hero-layout {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
        min-height: 0;
    }

    .hero-content {
        align-self: auto;
        padding-top: 3.5rem;
        padding-bottom: 0;
    }

    .hero-portrait {
        width: 100%;
        justify-content: center;
    }

    .hero-portrait img {
        width: min(82vw, 360px);
        max-width: 100%;
        margin-top: 0;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .card-wide {
        grid-column: auto;
    }
}

@media (max-width: 480px) {
    .header-inner {
        display: block;
    }

    .site-name {
        display: inline-block;
        margin-bottom: 0.8rem;
    }

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

    .hero-content {
        padding-top: 3rem;
    }

    .hero-portrait img {
        width: min(88vw, 320px);
    }

    .section {
        padding-block: 3.5rem;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 0.35rem;
        padding-block: 1.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
