/* ==========================================================================
   Whitworth Scholarship Awards
   Carries over the original blue/white card identity, rebuilt as a
   responsive, keyboard-navigable layout.
   ========================================================================== */

:root {
    --blue: #1f4a99;
    --blue-dark: #163a7a;
    --blue-light: #3f6ab9;
    --blue-tint: #eef2fa;
    --ink: #333333;
    --ink-muted: #5a5a5a;
    --page: #f8f8ff;
    --card: #ffffff;
    --rule: #e2e6f0;
    --shadow: 0 2px 4px rgba(31, 74, 153, .08), 0 8px 24px rgba(31, 74, 153, .08);
    --radius: 10px;
    --measure: 68ch;
    --gutter: clamp(1rem, 4vw, 2.5rem);
    --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    --font-quote: Georgia, "Times New Roman", Times, serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.65;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img { max-width: 100%; height: auto; }

a { color: var(--blue); text-decoration: none; }
a:hover, a:focus-visible { color: var(--blue-light); text-decoration: underline; }

:focus-visible {
    outline: 3px solid var(--blue-light);
    outline-offset: 2px;
}

h1, h2, h3, h4 {
    color: var(--blue);
    line-height: 1.25;
    margin: 0 0 .6em;
    font-weight: 600;
}

h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); }
h2 { font-size: clamp(1.25rem, 1.05rem + .9vw, 1.6rem); }
h3 { font-size: 1.1rem; }

p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: .4em; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ---- skip link ---------------------------------------------------------- */

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: var(--blue);
    color: #fff;
    padding: .75rem 1.25rem;
    border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
    left: 0;
    color: #fff;
}

/* ---- shell -------------------------------------------------------------- */

.shell {
    width: min(1200px, 100%);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

main { flex: 1 0 auto; padding-block: clamp(1.5rem, 4vw, 3rem); }

/* ---- banner ------------------------------------------------------------- */

.banner {
    background: var(--blue-dark);
    display: flex;
    justify-content: center;
}

.banner img {
    display: block;
    width: 100%;
    max-width: 1200px;
    object-fit: cover;
}

/* ---- navigation --------------------------------------------------------- */

.site-nav {
    background: var(--blue);
    position: relative;
    align-items: center;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.nav-toggle {
    display: none;
    width: 100%;
    padding: .85rem var(--gutter);
    background: none;
    border: 0;
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    align-items: center;
    gap: .6rem;
}

.nav-toggle::before {
    content: "";
    width: 1.15rem;
    height: 2px;
    background: currentColor;
    box-shadow: 0 6px 0 currentColor, 0 -6px 0 currentColor;
    flex: none;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-item { position: relative; }

.nav-link {
    display: block;
    padding: .85rem 1.1rem;
    color: #fff;
    font-size: .95rem;
    font-weight: 500;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-item:hover > .nav-link,
.nav-item:focus-within > .nav-link {
    background: var(--blue-light);
    color: #fff;
    text-decoration: none;
}

.nav-link[aria-current="page"] {
    background: var(--blue-dark);
    color: #fff;
}

.nav-item.has-children > .nav-link::after {
    content: "";
    display: inline-block;
    margin-left: .45em;
    border: .3em solid transparent;
    border-top-color: currentColor;
    transform: translateY(.15em);
}

.nav-sub {
    list-style: none;
    margin: 0;
    padding: .35rem 0;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: max(100%, 14rem);
    background: #fff;
    box-shadow: var(--shadow);
    border-radius: 0 0 var(--radius) var(--radius);
    z-index: 20;
    display: none;
}

.nav-item:hover > .nav-sub,
.nav-item:focus-within > .nav-sub {
    display: block;
}

.nav-sub a {
    display: block;
    padding: .55rem 1.1rem;
    color: var(--ink);
    font-size: .93rem;
}

.nav-sub a:hover,
.nav-sub a:focus-visible {
    background: var(--blue-tint);
    color: var(--blue);
    text-decoration: none;
}

@media (max-width: 860px) {
    .nav-toggle { display: flex; }

    .nav-list {
        display: none;
        flex-direction: column;
        padding-bottom: .5rem;
    }

    .site-nav.is-open .nav-list { display: flex; }

    .nav-link { padding-inline: var(--gutter); }

    .nav-sub {
        position: static;
        display: block;
        box-shadow: none;
        border-radius: 0;
        background: rgba(255, 255, 255, .1);
        padding: 0;
    }

    .nav-sub a {
        color: #e6ecf8;
        padding-left: calc(var(--gutter) + 1rem);
    }

    .nav-sub a:hover,
    .nav-sub a:focus-visible { background: var(--blue-light); color: #fff; }

    .nav-item.has-children > .nav-link::after { display: none; }
}

/* ---- cards -------------------------------------------------------------- */

@media (min-width: 700px) {
    /* 1. Remove the grid layout from the header */
    .case-header {
        display: block;
    }

        /* 2. Float the container holding the image to the right */
        .case-header div:last-child {
            float: right;
            width: 14rem; /* Matches your current image column width */
            margin-left: 2rem;
            margin-bottom: 1rem;
        }
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(1.1rem, 3vw, 1.75rem);
    margin-bottom: 1.25rem;
}

.card > :last-child { margin-bottom: 0; }

.card--outline {
    box-shadow: none;
    border: 2px solid var(--blue);
}

.card--footnote {
    box-shadow: none;
    background: transparent;
    border: 1px solid var(--rule);
    font-size: .85rem;
    color: var(--ink-muted);
}

.card__heading {
    font-size: 1.15rem;
    margin-bottom: .5em;
}

/* Blue emphasis paragraphs, the old .medBluText */
.notice {
    color: var(--blue);
    font-weight: 600;
}

/* ---- page header -------------------------------------------------------- */

.page-title {
    margin-bottom: 1.25rem;
}

.page-title .eyebrow {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: .25rem;
}

/* ---- section layout (body + sidebar) ------------------------------------ */

.with-sidebar {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2.25rem);
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}

@media (min-width: 900px) {
    .with-sidebar { grid-template-columns: minmax(0, 1fr) 21rem; }
}

.sidebar__intro {
    font-family: var(--font-quote);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--blue);
}

.sidebar__nav { list-style: none; margin: 1rem 0 0; padding: 0; }

.sidebar__nav li + li { border-top: 1px solid var(--rule); }

.sidebar__nav a {
    display: block;
    padding: .7rem .25rem;
    font-size: 1.05rem;
    font-weight: 500;
}

.sidebar__nav a[aria-current="page"] {
    color: var(--blue-dark);
    font-weight: 700;
}

/* ---- home --------------------------------------------------------------- */

.intro {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2rem);
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
}

@media (min-width: 820px) {
    .intro { grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); }
}

.intro__text p {
    font-family: var(--font-quote);
    font-size: clamp(1.05rem, .95rem + .4vw, 1.3rem);
    color: var(--ink-muted);
}

.intro__attribution {
    font-family: var(--font);
    font-size: .9rem !important;
    font-style: normal;
    color: var(--ink) !important;
    font-weight: 600;
}

.intro img { border-radius: var(--radius); }

.promos {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    margin-block: 2rem;
    list-style: none;
    padding: 0;
}

.promo {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin: 0;
}

.promo img { flex: none; width: 5rem; border-radius: 6px; }

.promo__kicker {
    display: block;
    font-weight: 700;
    color: var(--ink-muted);
    font-size: .9rem;
}

.promo__link { font-weight: 700; }

.promo p { margin: .2rem 0 0; font-size: .93rem; color: var(--ink-muted); }

.logos {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1rem, 4vw, 2.5rem);
    align-items: center;
    justify-content: center;
    list-style: none;
    margin: 2rem 0 0;
    padding: 1.5rem 0 0;
    border-top: 1px solid var(--rule);
}

.logos img { max-height: 3.25rem; width: auto; }

/* ---- case studies ------------------------------------------------------- */

@media (min-width: 700px) {
    /* 1. Remove the grid layout from the header */
    .case-header {
        display: block;
    }

        /* 2. Float the container holding the image to the right */
        .case-header div:last-child {
            float: right;
            width: 14rem; /* Matches your current image column width */
            margin-left: 2rem;
            margin-bottom: 1rem;
        }
}

.case-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
    list-style: none;
    padding: 0;
    margin: 0;
}

.case-card { margin: 0; display: flex; flex-direction: column; }

.case-card img {
    width: 100%;
    aspect-ratio: 3 / 3;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: .75rem;
}

.case-card h2 { font-size: 1.15rem; margin-bottom: .25em; }
.case-card p { font-size: .9rem; color: var(--ink-muted); margin: 0; }

.case-header {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}

@media (min-width: 700px) {
    .case-header { grid-template-columns: minmax(0, 1fr) 14rem; }
}

.case-header img { border-radius: var(--radius); width: 100%; }

.video {
    position: relative;
    aspect-ratio: 16 / 9;
    margin-bottom: 1.25rem;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
}

.video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.prose { max-width: var(--measure); }

/* ---- downloads ---------------------------------------------------------- */

.downloads {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
    list-style: none;
    padding: 0;
    margin: 0;
}

.download {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin: 0;
}

.download__preview {
    flex: none;
    width: 5.5rem;
    border: 1px solid var(--rule);
    border-radius: 4px;
}

.download h3 { font-size: 1rem; margin-bottom: .35em; }
.download p { font-size: .9rem; color: var(--ink-muted); margin-bottom: .5em; }

.download__link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-weight: 600;
    font-size: .92rem;
}

.download__type {
    display: inline-block;
    background: var(--blue-tint);
    color: var(--blue);
    border-radius: 3px;
    padding: .1rem .4rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* ---- eligibility check -------------------------------------------------- */

.check__group + .check__group { margin-top: 1.25rem; }

.check__fieldset { border: 0; margin: 0; padding: 0; }
.check__fieldset > legend { padding: 0; }

.check__questions { list-style: none; margin: 0 0 1.25rem; padding: 0; }

.check__question {
    display: grid;
    gap: .5rem 1.5rem;
    grid-template-columns: minmax(0, 1fr);
    padding: .9rem 0;
    border-bottom: 1px solid var(--rule);
}

@media (min-width: 640px) {
    .check__question { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
}

.check__answers { display: flex; gap: 1.25rem; }

.check__answer {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-weight: 600;
    color: var(--ink-muted);
    cursor: pointer;
}

.check__answer input { width: 1.1rem; height: 1.1rem; accent-color: var(--blue); }

.button {
    display: inline-block;
    background: var(--blue);
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: .7rem 1.6rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.button:hover, .button:focus-visible { background: var(--blue-light); color: #fff; text-decoration: none; }

.result { border-left: 4px solid var(--blue); }
.result--no { border-left-color: #a8442a; }
.result--no h2 { color: #a8442a; }

.field-error {
    color: #a8442a;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ---- aside image -------------------------------------------------------- */

.aside-figure { margin: 0; }
.aside-figure img { border-radius: var(--radius); width: 100%; }

.aside-figure figcaption {
    font-size: .85rem;
    color: var(--ink-muted);
    margin-top: .5rem;
}

/* ---- footer ------------------------------------------------------------- */

.site-footer {
    background: var(--blue);
    color: #fff;
    margin-top: 3rem;
    padding-block: clamp(1.5rem, 4vw, 2.5rem);
}

.site-footer a { color: #fff; text-decoration: underline; }
.site-footer a:hover, .site-footer a:focus-visible { color: #d9e3f6; }

.footer-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
}

@media (min-width: 760px) {
    .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.footer-grid h2 { color: #fff; font-size: 1.05rem; }
.footer-contact p { margin: 0 0 .35em; font-size: .93rem; }

.footer-quote {
    font-family: var(--font-quote);
    font-size: clamp(1.2rem, 1rem + .8vw, 1.6rem);
    font-style: italic;
    margin: 0;
}

.footer-quote cite {
    display: block;
    font-family: var(--font);
    font-size: .85rem;
    font-style: normal;
    margin-top: .5rem;
    opacity: .85;
}

@media print {
    .site-nav, .banner, .skip-link { display: none; }
    body { background: #fff; }
    .card { box-shadow: none; border: 1px solid #ccc; }
}
