:root {
    --egps-red: #9f1d2e;
    --egps-red-deep: #7f1725;
    --egps-charcoal: #3f444b;
    --egps-grey: #f3f4f5;
    --egps-grey-mid: #d7dade;
    --egps-white: #ffffff;
    --egps-shadow: 0 18px 38px rgb(28 31 35 / 12%);
    --egps-radius: 14px;
    --egps-radius-sm: 10px;
    --egps-max: 1220px;
    --egps-nav-height: 5.75rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Manrope, "Segoe UI", sans-serif;
    color: var(--egps-charcoal);
    background:
        radial-gradient(1000px 500px at -8% -15%, rgb(159 29 46 / 10%), transparent 55%),
        linear-gradient(180deg, #fcfcfd 0%, #f7f7f8 100%);
    line-height: 1.62;
}

a {
    color: var(--egps-red);
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--egps-red-deep);
}

h1,
h2,
h3,
h4 {
    margin: 0 0 0.55em;
    font-family: "Cormorant Garamond", Georgia, serif;
    line-height: 1.12;
    letter-spacing: 0.012em;
    color: #24272b;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
}

h2 {
    font-size: clamp(1.65rem, 4vw, 2.4rem);
}

h3 {
    font-size: clamp(1.3rem, 2.6vw, 1.7rem);
}

p {
    margin: 0 0 1.05rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.container {
    width: min(100% - 2rem, var(--egps-max));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: -999px;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 99;
    background: var(--egps-white);
    border: 2px solid var(--egps-red);
    padding: 0.6rem 0.95rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgb(255 255 255 / 97%);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgb(21 25 29 / 8%);
}

.site-header__utility {
    background: var(--egps-charcoal);
    color: var(--egps-white);
    font-size: 0.9rem;
}

.utility-row {
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    justify-content: flex-end;
}

.utility-row p {
    margin: 0;
}

.utility-row a {
    color: var(--egps-white);
}

.utility-row__button {
    background: var(--egps-red);
    color: var(--egps-white);
    font-weight: 600;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    transition: background 0.2s ease;
}

.utility-row__button:hover,
.utility-row__button:focus {
    color: var(--egps-white);
    background: var(--egps-red-deep);
}

.site-header__main {
    min-height: var(--egps-nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.branding,
.branding__link {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
}

.branding__crest {
    width: 58px;
    height: auto;
}

.branding__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

.branding__wordmark {
    width: min(300px, 38vw);
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.branding__name {
    margin: 0;
    font-size: 1.18rem;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 700;
    color: #1e2125;
}

.branding__tagline {
    margin: 0;
    color: #676f78;
    font-size: 0.82rem;
}

.primary-navigation {
    display: flex;
    align-items: center;
}

.primary-menu,
.primary-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-menu {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.primary-menu > li {
    position: relative;
}

.primary-menu a {
    display: block;
    color: #25292e;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.65rem 0.74rem;
    border-radius: 0.55rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current-menu-ancestor > a {
    color: var(--egps-red);
    background: rgb(159 29 46 / 9%);
}

.primary-menu ul {
    position: absolute;
    left: 0;
    top: calc(100% + 0.35rem);
    min-width: 230px;
    background: var(--egps-white);
    border-radius: var(--egps-radius-sm);
    border: 1px solid rgb(21 25 29 / 9%);
    box-shadow: var(--egps-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all 0.18s ease;
    z-index: 25;
}

.primary-menu li:hover > ul,
.primary-menu li:focus-within > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.primary-menu ul li {
    border-bottom: 1px solid rgb(21 25 29 / 8%);
}

.primary-menu ul li:last-child {
    border-bottom: 0;
}

.primary-menu ul a {
    padding: 0.62rem 0.85rem;
    font-size: 0.9rem;
    border-radius: 0;
}

.menu-toggle {
    display: none;
    border: 1px solid rgb(21 25 29 / 18%);
    background: var(--egps-white);
    color: #22252a;
    font-weight: 700;
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
}

.hero {
    position: relative;
    min-height: clamp(420px, 65vh, 700px);
    overflow: hidden;
}

.hero__slide {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 1s ease, transform 6s ease;
}

.hero__slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgb(35 37 43 / 82%) 0%, rgb(35 37 43 / 53%) 55%, rgb(35 37 43 / 28%) 100%);
}

.hero__slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.hero__content {
    position: relative;
    z-index: 2;
    padding-block: clamp(4.4rem, 8vw, 7.6rem);
    color: var(--egps-white);
    max-width: 44rem;
}

.hero__content h1 {
    color: var(--egps-white);
    margin-bottom: 0.35em;
}

.hero__content p {
    font-size: clamp(1.02rem, 2.2vw, 1.28rem);
    margin-bottom: 1.3rem;
}

.eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--egps-red);
    margin: 0 0 0.9rem;
    font-weight: 700;
}

.hero .eyebrow {
    color: #ffcfd6;
}

.hero__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.72rem 1.2rem;
    font-size: 0.92rem;
    font-weight: 700;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

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

.button--primary:hover,
.button--primary:focus {
    color: var(--egps-white);
    background: var(--egps-red-deep);
}

.button--ghost {
    border-color: rgb(255 255 255 / 58%);
    color: var(--egps-white);
    background: rgb(255 255 255 / 8%);
}

.button--ghost:hover,
.button--ghost:focus {
    color: #fff;
    background: rgb(255 255 255 / 14%);
}

.section {
    padding-block: clamp(2.8rem, 6vw, 5rem);
}

.section--quicklinks {
    margin-top: -2.9rem;
    position: relative;
    z-index: 3;
}

.cards {
    display: grid;
    gap: 1rem;
}

.cards--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.card {
    background: var(--egps-white);
    border: 1px solid rgb(26 29 34 / 8%);
    border-radius: var(--egps-radius);
    box-shadow: 0 10px 32px rgb(31 35 41 / 7%);
    padding: 1.25rem;
}

.card h2,
.card h3 {
    margin-bottom: 0.35em;
}

.card p {
    margin-bottom: 0;
    color: #5a626c;
}

.card--link {
    color: inherit;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card--link:hover,
.card--link:focus {
    transform: translateY(-4px);
    box-shadow: var(--egps-shadow);
    color: inherit;
}

.split {
    display: grid;
    gap: 2rem;
    align-items: center;
}

.split--balanced {
    grid-template-columns: 1.1fr 0.9fr;
}

.media-frame {
    border-radius: var(--egps-radius);
    overflow: hidden;
    border: 1px solid rgb(26 29 34 / 12%);
    box-shadow: var(--egps-shadow);
    margin: 0;
}

.text-link {
    display: inline-flex;
    margin-top: 0.8rem;
    font-weight: 700;
}

.section--pillars {
    background: linear-gradient(160deg, #fbfbfc 0%, #f0f1f3 100%);
    border-top: 1px solid rgb(27 31 37 / 8%);
    border-bottom: 1px solid rgb(27 31 37 / 8%);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.photo-grid img {
    border-radius: var(--egps-radius-sm);
    min-height: 220px;
    width: 100%;
    object-fit: cover;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 0.8rem;
    margin-bottom: 0.85rem;
}

.card__meta {
    margin-bottom: 0.35rem;
    font-size: 0.84rem;
    color: #777f89;
    font-weight: 600;
}

.section--cta {
    padding-top: 0;
}

.cta-panel {
    background: linear-gradient(130deg, #fefeff 0%, #f4f5f7 100%);
    border: 1px solid rgb(26 29 34 / 10%);
    border-radius: var(--egps-radius);
    box-shadow: var(--egps-shadow);
    padding: clamp(1.4rem, 4vw, 2.4rem);
}

.section--page {
    min-height: 60vh;
}

.page-layout {
    display: grid;
    gap: 1.4rem;
    grid-template-columns: 1fr;
}

.page-card {
    background: var(--egps-white);
    border-radius: var(--egps-radius);
    border: 1px solid rgb(27 31 37 / 10%);
    box-shadow: 0 10px 28px rgb(24 28 33 / 6%);
    overflow: hidden;
}

.page-header {
    padding: 1.4rem 1.4rem 0.2rem;
}

.entry-content {
    padding: 0.3rem 1.4rem 1.4rem;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.2rem;
}

.entry-content li {
    margin-bottom: 0.32rem;
}

.page-featured-image img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

.page-sidebar {
    background: #f8f8f9;
    border-radius: var(--egps-radius);
    border: 1px solid rgb(27 31 37 / 9%);
    padding: 1rem 1.15rem;
}

.page-sidebar h2 {
    font-size: 1.3rem;
    margin-bottom: 0.45rem;
}

.page-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.page-sidebar li {
    border-bottom: 1px solid rgb(23 27 32 / 10%);
}

.page-sidebar li:last-child {
    border-bottom: 0;
}

.page-sidebar a {
    display: block;
    padding: 0.5rem 0;
    font-weight: 600;
}

.pagination-row {
    margin-top: 1.2rem;
}

.site-footer {
    background: #23272d;
    color: #e6e8eb;
    margin-top: 2rem;
}

.site-footer h2 {
    color: #fff;
    font-size: 1.35rem;
    margin-bottom: 0.45rem;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 1.6rem;
    padding-block: 2rem;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer li {
    margin-bottom: 0.48rem;
}

.site-footer a {
    color: #f6f7f8;
}

.site-footer a:hover,
.site-footer a:focus {
    color: #ffd6dc;
}

.site-footer__bottom {
    border-top: 1px solid rgb(255 255 255 / 13%);
    padding-block: 0.8rem;
    font-size: 0.92rem;
}

.site-footer__bottom-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.search-form {
    display: flex;
    gap: 0.55rem;
    width: min(100%, 460px);
}

.search-field {
    width: 100%;
    border: 1px solid rgb(26 29 34 / 24%);
    border-radius: 0.6rem;
    padding: 0.62rem 0.7rem;
}

.search-submit {
    border: 0;
    border-radius: 0.6rem;
    background: var(--egps-red);
    color: var(--egps-white);
    font-weight: 700;
    padding: 0.62rem 0.9rem;
}

.egps-protected-form {
    min-height: 60vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
}

.egps-protected-form__card {
    width: min(100%, 460px);
    background: var(--egps-white);
    border: 1px solid rgb(25 29 35 / 12%);
    border-radius: var(--egps-radius);
    box-shadow: var(--egps-shadow);
    padding: 1.4rem;
}

.egps-protected-form__card h1 {
    font-size: 2rem;
    margin-bottom: 0.35rem;
}

.egps-protected-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.45rem;
}

.egps-protected-form input[type="password"] {
    width: 100%;
    border: 1px solid rgb(25 29 35 / 25%);
    border-radius: 0.65rem;
    padding: 0.7rem 0.78rem;
    margin-bottom: 0.85rem;
}

.egps-protected-form .button {
    width: 100%;
}

.egps-protected-form__error {
    color: #a11f2f;
    font-weight: 600;
}

@media (max-width: 1120px) {
    .cards--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cards--three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 920px) {
    .utility-row {
        justify-content: center;
        flex-wrap: wrap;
        padding-block: 0.35rem;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .primary-navigation {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: var(--egps-white);
        border-bottom: 1px solid rgb(27 31 37 / 10%);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }

    .primary-navigation.is-open {
        max-height: 78vh;
        overflow: auto;
        padding: 0.5rem 1rem 1rem;
    }

    .primary-menu {
        display: block;
        width: 100%;
    }

    .primary-menu a {
        padding: 0.7rem 0.55rem;
    }

    .primary-menu ul {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        margin-left: 0.5rem;
        display: block;
    }

    .primary-menu ul a {
        font-size: 0.9rem;
        padding: 0.45rem 0.45rem;
    }

    .section--quicklinks {
        margin-top: 0;
    }

    .split--balanced {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .cards--three,
    .cards--four,
    .photo-grid,
    .site-footer__grid {
        grid-template-columns: 1fr;
    }

    .site-footer__bottom-row {
        display: block;
    }

    .site-footer__bottom-row p {
        margin-bottom: 0.5rem;
    }

    .branding__crest {
        width: 48px;
    }

    .branding__wordmark {
        width: min(230px, 58vw);
    }

    .branding__tagline {
        display: none;
    }

    .hero {
        min-height: 450px;
    }
}
