:root {
    --blue: #2853c7;
    --blue-dark: #17378e;
    --blue-soft: #eef3ff;
    --yellow: #ffd91c;
    --ink: #17213a;
    --muted: #5f6b80;
    --white: #fff;
    --cream: #fffdf5;
    --line: #dfe5f2;
    --shadow: 0 18px 48px rgba(23, 55, 142, .13);
    --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; }

fieldset { min-width: 0; }

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

.skip-link {
    position: fixed;
    z-index: 100;
    left: 16px;
    top: -80px;
    padding: 10px 16px;
    background: var(--yellow);
    color: var(--ink);
    border-radius: 8px;
    font-weight: 800;
}

.skip-link:focus { top: 16px; }

.site-header {
    position: sticky;
    z-index: 50;
    top: 0;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid rgba(40, 83, 199, .1);
    backdrop-filter: blur(14px);
}

.nav-wrap {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand img { width: 205px; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a {
    padding: 10px 12px;
    text-decoration: none;
    border-radius: 999px;
    font-size: .94rem;
    font-weight: 750;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.active {
    color: var(--blue-dark);
    background: var(--blue-soft);
}

.nav-links .donate-link {
    margin-left: 4px;
    padding-inline: 18px;
    color: var(--ink);
    background: var(--yellow);
}

.nav-links .donate-link:hover,
.nav-links .donate-link:focus-visible,
.nav-links .donate-link.active {
    color: var(--ink);
    background: #ffe55d;
}

.menu-button {
    display: none;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: var(--blue);
    cursor: pointer;
}

.hero {
    position: relative;
    min-height: 590px;
    display: grid;
    align-items: center;
    overflow: hidden;
    color: var(--white);
    background: var(--blue-dark);
}

.hero::before {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(17, 38, 100, .94) 0%, rgba(23, 55, 142, .72) 47%, rgba(23, 55, 142, .15) 78%),
        url("/images/buddy-walk-photo-1.jpg") center / cover;
}

.hero::after {
    position: absolute;
    width: 320px;
    height: 320px;
    right: -80px;
    bottom: -160px;
    content: "";
    border: 54px solid rgba(255, 217, 28, .72);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    padding: 92px 0;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--blue);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.hero .eyebrow { color: var(--yellow); }

h1, h2, h3 {
    margin-top: 0;
    line-height: 1.08;
    letter-spacing: -.035em;
}

h1 {
    margin-bottom: 22px;
    font-size: clamp(3rem, 7vw, 5.8rem);
}

h2 { font-size: clamp(2rem, 4vw, 3.6rem); }
h3 { font-size: 1.4rem; }

.hero-lead {
    max-width: 610px;
    margin: 0 0 32px;
    color: #f3f6ff;
    font-size: clamp(1.08rem, 2vw, 1.3rem);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border: 2px solid var(--blue);
    border-radius: 999px;
    color: var(--white);
    background: var(--blue);
    text-decoration: none;
    font-weight: 850;
    cursor: pointer;
}

.button:hover,
.button:focus-visible {
    border-color: var(--blue-dark);
    background: var(--blue-dark);
}

.amount-fieldset {
    margin: 24px 0;
    padding: 0;
    border: 0;
}

.amount-fieldset legend,
.field > span {
    display: block;
    margin-bottom: 8px;
    font-weight: 800;
}

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

.amount-choice { cursor: pointer; }
.amount-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.amount-choice span {
    min-height: 48px;
    display: grid;
    place-items: center;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    font-weight: 850;
}

.amount-choice input:checked + span {
    border-color: var(--blue);
    color: var(--white);
    background: var(--blue);
}

.amount-choice input:focus-visible + span {
    outline: 3px solid rgba(40, 83, 199, .25);
    outline-offset: 2px;
}

.giving-card .field { display: block; margin: 16px 0; }
.giving-card input[type="text"],
.giving-card input[type="number"],
.giving-card textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    background: var(--white);
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    font-weight: 700;
}

.checkbox-field input { width: 18px; height: 18px; }
.field-error { display: block; margin-top: 6px; color: #a51d2d; font-size: .9rem; }
.donation-submit { width: 100%; margin-top: 10px; }
.success-card { max-width: 760px; margin: 50px auto; text-align: center; }

.button-yellow {
    border-color: var(--yellow);
    color: var(--ink);
    background: var(--yellow);
}

.button-yellow:hover,
.button-yellow:focus-visible {
    border-color: #ffe66d;
    background: #ffe66d;
}

.button-outline {
    border-color: rgba(255, 255, 255, .7);
    color: var(--white);
    background: transparent;
}

.button-outline:hover,
.button-outline:focus-visible {
    border-color: var(--white);
    background: rgba(255, 255, 255, .12);
}

.section { padding: 92px 0; }
.section-soft { background: var(--blue-soft); }
.section-cream { background: var(--cream); }

.section-heading {
    max-width: 720px;
    margin-bottom: 44px;
}

.section-heading p,
.lead {
    color: var(--muted);
    font-size: 1.13rem;
}

.intro-grid,
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(40px, 7vw, 90px);
}

.photo-frame {
    position: relative;
}

.photo-frame::before {
    position: absolute;
    z-index: -1;
    width: 65%;
    height: 70%;
    right: -18px;
    bottom: -18px;
    content: "";
    border-radius: var(--radius);
    background: var(--yellow);
}

.photo-frame img {
    width: 100%;
    min-height: 430px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.check-list {
    display: grid;
    gap: 14px;
    padding: 0;
    list-style: none;
}

.check-list li {
    position: relative;
    padding-left: 34px;
}

.check-list li::before {
    position: absolute;
    left: 0;
    top: .12em;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    content: "✓";
    border-radius: 50%;
    color: var(--white);
    background: var(--blue);
    font-size: .76rem;
    font-weight: 900;
}

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

.card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 10px 34px rgba(23, 55, 142, .08);
}

.card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-body { padding: 26px; }
.card-body p { color: var(--muted); }
.card-link { color: var(--blue-dark); font-weight: 850; }

.impact-strip {
    color: var(--white);
    background: var(--blue);
}

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

.impact-item {
    padding: 44px 34px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, .22);
}

.impact-item:last-child { border: 0; }
.impact-item strong { display: block; color: var(--yellow); font-size: 2.2rem; }

.cta {
    position: relative;
    overflow: hidden;
    padding: 58px;
    border-radius: 30px;
    color: var(--white);
    background: var(--blue-dark);
}

.cta::after {
    position: absolute;
    width: 190px;
    height: 190px;
    right: -58px;
    top: -90px;
    content: "";
    border: 32px solid var(--yellow);
    border-radius: 50%;
}

.cta-inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.cta p { color: #e6edff; font-size: 1.12rem; }

.page-hero {
    position: relative;
    min-height: 370px;
    display: grid;
    align-items: end;
    overflow: hidden;
    color: var(--white);
    background: var(--blue-dark);
}

.page-hero::before {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(18, 43, 119, .94), rgba(18, 43, 119, .46)),
        var(--page-image) center / cover;
}

.page-hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    padding: 76px 0 64px;
}

.page-hero h1 { margin-bottom: 12px; font-size: clamp(2.8rem, 6vw, 5rem); }
.page-hero p { margin: 0; color: #eef3ff; font-size: 1.18rem; }

.event-list { display: grid; gap: 24px; }

.event-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 10px 34px rgba(23, 55, 142, .08);
}

.event-card img {
    width: 100%;
    height: 100%;
    min-height: 240px;
    object-fit: cover;
}

.event-content { padding: 30px; }

.tag {
    display: inline-flex;
    padding: 5px 11px;
    border-radius: 999px;
    color: var(--blue-dark);
    background: var(--blue-soft);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.notice {
    padding: 18px 20px;
    border-left: 5px solid var(--yellow);
    border-radius: 12px;
    color: #37425a;
    background: #fff9ce;
}

.donation-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 44px;
}

.giving-card,
.form-card {
    padding: clamp(26px, 5vw, 46px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 24px 0;
}

.amount {
    padding: 14px;
    border: 2px solid var(--line);
    border-radius: 12px;
    color: var(--blue-dark);
    background: var(--white);
    font-weight: 900;
}

.amount.featured {
    border-color: var(--yellow);
    background: #fffbe1;
}

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.field {
    display: grid;
    gap: 7px;
    margin-bottom: 18px;
}

.field label { font-weight: 800; }

.field input,
.field textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #c9d1e2;
    border-radius: 10px;
    color: var(--ink);
    background: var(--white);
}

.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid rgba(40, 83, 199, .18); border-color: var(--blue); }
.field small { color: #a32121; font-weight: 700; }
.field [aria-invalid="true"] { border-color: #b72d2d; }
.honeypot { position: absolute; left: -9999px; }

.alert {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 10px;
    font-weight: 750;
}

.alert-success { color: #175d31; background: #e3f7e9; }
.alert-error { color: #8a2525; background: #fde7e7; }

.auth-shell {
    min-height: 690px;
    display: grid;
    place-items: center;
    padding: 70px 20px;
    background: linear-gradient(145deg, var(--blue-soft), var(--cream));
}

.auth-card {
    width: min(520px, 100%);
    padding: 44px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.auth-logo { width: 210px; margin: 0 auto 28px; }
.auth-card h1 { margin-bottom: 12px; font-size: 2.4rem; text-align: center; }
.auth-card > p { color: var(--muted); text-align: center; }

.auth-submit { width: 100%; }

.auth-links {
    display: grid;
    gap: 8px;
    margin-top: 22px;
    text-align: center;
}

.auth-links a { color: var(--blue-dark); font-weight: 750; }
.field-help { color: var(--muted); font-size: .88rem; }

.text-button {
    width: 100%;
    margin-top: 18px;
    padding: 8px;
    border: 0;
    color: var(--blue-dark);
    background: transparent;
    text-decoration: underline;
    font-weight: 750;
    cursor: pointer;
}

.account-summary {
    display: grid;
    gap: 12px;
    margin: 26px 0;
}

.account-summary div {
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--blue-soft);
}

.account-summary dt { color: var(--muted); font-size: .82rem; font-weight: 800; text-transform: uppercase; }
.account-summary dd { margin: 2px 0 0; font-weight: 750; overflow-wrap: anywhere; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.auth-actions form { margin: 0; }

.button-secondary {
    border-color: var(--line);
    color: var(--blue-dark);
    background: var(--white);
}

.site-footer {
    padding: 64px 0 28px;
    color: #e9efff;
    background: #101b3d;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr .7fr .8fr;
    gap: 60px;
}

.footer-logo { width: 220px; margin-bottom: 18px; }
.footer-heading { color: var(--white); font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; }
.footer-links { display: grid; gap: 8px; }
.footer-links a { color: #d6dff6; text-decoration: none; }
.footer-links a:hover { color: var(--yellow); }

.footer-bottom {
    margin-top: 42px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .13);
    color: #aebbdc;
    font-size: .88rem;
}

@media (max-width: 860px) {
    .menu-button { display: grid; place-items: center; }

    .nav-links {
        position: absolute;
        top: 84px;
        left: 0;
        right: 0;
        display: none;
        padding: 18px 20px 24px;
        border-bottom: 1px solid var(--line);
        background: var(--white);
        box-shadow: var(--shadow);
    }

    .nav-links.open { display: grid; }
    .nav-links a { padding: 12px 16px; }
    .nav-links .donate-link { margin: 4px 0 0; text-align: center; }

    .hero { min-height: 570px; }
    .hero::before { background: linear-gradient(90deg, rgba(17, 38, 100, .94), rgba(23, 55, 142, .58)), url("/images/buddy-walk-photo-1.jpg") 62% center / cover; }

    .intro-grid, .split, .donation-grid { grid-template-columns: 1fr; }
    .card-grid { grid-template-columns: 1fr 1fr; }
    .impact-grid { grid-template-columns: 1fr; }
    .impact-item { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.2); }
    .event-card { grid-template-columns: 1fr; }
    .event-card img { height: 260px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 580px) {
    .container { width: min(100% - 28px, 1160px); }
    .brand img { width: 175px; }
    .hero-content { padding: 70px 0; }
    h1 { font-size: 3rem; }
    .section { padding: 68px 0; }
    .card-grid, .field-grid, .footer-grid { grid-template-columns: 1fr; }
    .photo-frame img { min-height: 330px; }
    .cta { padding: 36px 28px; }
    .amounts { grid-template-columns: 1fr 1fr; }
    .auth-card { padding: 32px 24px; }
}
