@import url('https://fonts.googleapis.com/css2?family=Bad+Script&family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap');

:root {
    --purple: #925e9e;
    --purple-panel: #925e9ecc;
    --line: rgba(255, 255, 255, 0.65);
    --text-shadow: 0 1px 3px rgba(50, 15, 60, 0.35);
    --sans: "IBM Plex Sans", 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    --script: "Bad Script", cursive;
}

html {
    /* Reserve the scrollbar's space so the page doesn't shift when it appears */
    scrollbar-gutter: stable;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: clip;
}

html, body {
    font-family: var(--sans);
    background-color: var(--purple);
    margin: 0;
    padding: 0;
}

body {
    overflow-x: clip;
    isolation: isolate;
}

/*
 * Background photo lives on its own fixed layer sized to the *large* viewport
 * (lvh). Sizing it to dvh made it rescale whenever the mobile browser toolbar
 * showed or hid, which caused the jump while scrolling. iOS also ignores
 * background-attachment: fixed, so a fixed layer is more reliable.
 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    height: 100lvh;
    z-index: -1;
    pointer-events: none;
    background-image: url("./images/graduation-bg.jpg");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: auto 100%;
}

.row {
    display: flex;
    justify-content: space-between;
}
.col {
    width: 100%;
    box-sizing: border-box;
}
.half {
    width: 50%;
}
.quarter {
    width: 25%;
}
.threefourths {
    width: 75%;
}
.sixty {
    width: 60%;
}
img {
    max-width: 100%;
    height: auto;
}

.padding {
    padding: 3rem 2rem;
}

.form-jacket {
    /* background-color: rgba(255, 255, 255, 0.25) */
}

h1 {
    color: #ffffff;
    text-decoration: underline;
    text-decoration-thickness: 0.5px;
    text-underline-offset: 5px;
    text-decoration-style: dotted;
}

.ibm-plex-sans {
    font-family: var(--sans);
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings:
        "wdth" 100;
}
.bad-script {
    font-family: var(--script);
    font-weight: 400;
    font-style: normal;
}

/* ---------- Scholarship page ---------- */

.site-title {
    font-size: 3rem;
    line-height: 1.2;
    margin: 0.67em 0 0;
    text-shadow: var(--text-shadow);
}

.large {
    color: #fff;
    font-size: 1.2rem;
    line-height: 1.55;
    text-shadow: var(--text-shadow);
}

.story {
    padding-top: 0;
}

.story p {
    text-indent: 2rem;
    margin: 0 0 1.1rem;
}

.story .quote,
.closing .quote {
    text-indent: 0;
    font-size: 1.45rem;
    line-height: 1.4;
    margin: 1.5rem 0;
}

.story hr {
    border: 0;
    height: 1px;
    margin: 2rem 0;
    background: linear-gradient(to right, var(--line), rgba(255, 255, 255, 0));
}

.story .signature {
    text-indent: 0;
    font-size: 1.45rem;
    margin-top: 0.25rem;
}

.photo-row {
    padding-top: 0;
}

.photo {
    border: 20px solid #fff;
    border-radius: 3px;
    border-bottom: 0;
    max-width: 500px;
    transform: rotate(-2deg);
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
.photo img {
    display: block;
    width: 100%;
}
.photo .label {
    background-color: #ddd;
    border-bottom: 20px solid #fff;
    padding: 0.9rem 1rem;
    color: #333;
    font-family: var(--script);
    font-size: 2rem;
    line-height: 1.3;
    text-align: center;
}

.recipients {
    padding-top: 0;
    padding-bottom: 0;
}
.recipients .large {
    margin: 0;
}
.recipients .eyebrow {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.85;
}

.pill {
    display: inline-block;
    padding: 0.45rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #fff;
    font-size: 1rem;
    text-decoration: none;
    text-shadow: none;
    background-color: rgba(255, 255, 255, 0.08);
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.pill:hover,
.pill:focus-visible {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #fff;
}
.pill:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.closing .quote {
    margin: 0;
}

.logo-row {
    margin: 0;
    padding: 0 0 3rem;
    background: transparent;
}
.logo {
    display: block;
    margin: 0 auto;
    width: 300px;
    opacity: 0.35;
}


@media screen and (max-width: 639px) {
    body::before {
        background-position: right bottom;
    }
    .row {
        display: block;
    }
    hr {
        display: none;
    }
    .mobile-margin {
        margin-top: 20rem;
    }
    h1 {
        margin-top: 10rem;
    }
    .site-title {
        margin-top: 10rem;
        font-size: 2.6rem;
    }
    .padding {
        padding: 2.25rem 1.5rem;
    }
    .half, .quarter, .threefourths, .sixty {
        display: block;
        width: 100%;
        background-color: var(--purple-panel);
        border-top: 1px solid #fff;
    }
    .half:last-of-type {
        border-bottom: 1px solid #fff;
    }
    .story, .photo-row, .recipients {
        border-bottom: 0;
    }
    .story {
        padding-top: 2.25rem;
    }
    .story .quote {
        margin: 1.5rem 0 2rem;
    }
    .photo-row {
        padding-top: 2.25rem;
    }
    .photo {
        border-width: 14px;
        transform: rotate(-1.5deg);
    }
    .photo .label {
        border-bottom-width: 14px;
        font-size: 1.7rem;
    }
    .recipients {
        padding-top: 1.75rem;
        padding-bottom: 1.75rem;
    }
    .logo-row {
        padding: 2.5rem 0;
    }
    .logo {
        width: 220px;
    }
}
