body.promo-modal-open {
    overflow: hidden;
}

.promo-modal[hidden] {
    display: none !important;
}

.promo-modal {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: grid;
    place-items: center;
    padding: clamp(0.75rem, 2.5vw, 2rem);
}

.promo-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 8, 26, 0.82);
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
}

.promo-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 1080px);
    max-height: calc(100vh - clamp(1.5rem, 5vw, 4rem));
    overflow: auto;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
}

.promo-modal__close {
    position: absolute;
    z-index: 5;
    top: 0.85rem;
    right: 0.85rem;
    display: grid;
    place-items: center;
    width: 2.9rem;
    height: 2.9rem;
    padding: 0;
    border: 1px solid rgba(255, 200, 117, 0.75);
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 8, 26, 0.82);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: transform 160ms ease, background-color 160ms ease;
}

.promo-modal__close:hover,
.promo-modal__close:focus-visible {
    transform: scale(1.06);
    background: #b85120;
}

.promo-modal__close::before,
.promo-modal__close::after {
    position: absolute;
    width: 1.35rem;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    content: "";
}

.promo-modal__close::before {
    transform: rotate(45deg);
}

.promo-modal__close::after {
    transform: rotate(-45deg);
}

.promo-modal__close-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.promo-modal__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid transparent;
    border-radius: 4px;
    font-family: "BarlowBold", sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    line-height: 1.1;
    text-align: center;
    text-decoration: none !important;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.promo-modal__button:hover,
.promo-modal__button:focus-visible {
    transform: translateY(-2px);
}

/* Legacy in Blue invitation */
.promo-modal--legacy .promo-modal__dialog {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 465px;
    width: min(100%, 1260px);
    overflow: hidden;
    border: 1px solid #d69a3b;
    border-radius: 18px;
    background: #03152d;
}

.legacy-invite__copy {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 500px;
    padding: clamp(2rem, 4vw, 3.35rem);
    color: #f8f0d8;
    background:
        radial-gradient(circle at 78% 42%, rgba(33, 91, 159, 0.22), transparent 34%),
        linear-gradient(125deg, #03152d 0%, #061d3a 62%, #03152d 100%);
    box-shadow: 7px 0 10px -6px rgba(0, 6, 20, 0.82);
}

.legacy-invite__copy::after {
    position: absolute;
    right: -1px;
    bottom: 2.25rem;
    left: 2.5rem;
    height: 1px;
    background: linear-gradient(90deg, #d69a3b 0 70%, transparent);
    content: "";
}

.legacy-invite__logo {
    width: min(100%, 240px);
    height: auto;
    margin-bottom: clamp(1.3rem, 2.5vw, 2rem);
}

.legacy-invite__eyebrow,
.student-promo__eyebrow {
    margin: 0 0 0.55rem;
    color: #dba348;
    font-family: "BarlowBold", sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.38em;
    text-transform: uppercase;
}

.legacy-invite__title {
    margin: 0;
    font-family: "OswaldBold", "BarlowBold", sans-serif;
    font-size: clamp(3rem, 5.4vw, 4.9rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 0.95;
    white-space: nowrap;
    text-transform: uppercase;
}

.legacy-invite__title-gold {
    color: #d9a34b;
}

.legacy-invite__title-blue {
    color: #2d6db5;
}

.legacy-invite__rule {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1.05rem 0 0.9rem;
    color: #d69a3b;
}

.legacy-invite__rule::before,
.legacy-invite__rule::after {
    height: 1px;
    background: currentColor;
    content: "";
}

.legacy-invite__rule::before {
    flex: 1;
}

.legacy-invite__rule::after {
    flex: 0.55;
}

.legacy-invite__diamond {
    width: 0.65rem;
    height: 0.65rem;
    border: 1px solid currentColor;
    transform: rotate(45deg);
}

.legacy-invite__event {
    margin: 0;
    color: #f3e6c7;
    font-family: "OswaldBold", "BarlowBold", sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.legacy-invite__date {
    margin: 0.55rem 0 0;
    color: #e37035;
    font-family: "OswaldBold", "BarlowBold", sans-serif;
    font-size: clamp(1.45rem, 2.8vw, 2rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.legacy-invite__description {
    max-width: 31rem;
    margin: 0.7rem 0 1.65rem;
    color: rgba(248, 240, 216, 0.92);
    font-family: "BarlowSemiBold", sans-serif;
    font-size: 1rem;
    font-style: italic;
    line-height: 1.55;
}

.legacy-invite__footer {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #dba348;
    font-family: "BarlowBold", sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.23em;
    text-transform: uppercase;
}

.legacy-invite__visual {
    position: relative;
    min-height: 500px;
    overflow: hidden;
    background: #06172f;
}

.legacy-invite__visual::after {
    display: none;
}

.legacy-invite__visual img {
    position: absolute;
    right: 0;
    bottom: -30px;
    left: 0;
    width: 100%;
    height: auto;
    max-width: none;
}

/* Student booklet */
.promo-modal--student .promo-modal__dialog {
    display: grid;
    grid-template-columns: minmax(245px, 0.72fr) minmax(0, 1.28fr);
    overflow: hidden;
    border: 1px solid rgba(192, 119, 55, 0.8);
    border-radius: 14px;
    background: #f8f7f3;
}

.student-promo__cover {
    position: relative;
    min-height: 575px;
    background: #061b39;
}

.student-promo__cover img {
    width: 100%;
    height: 100%;
    min-height: 575px;
    object-fit: cover;
    object-position: center top;
}

.student-promo__content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 575px;
    padding: clamp(2.2rem, 5vw, 4.5rem);
    color: #071c3b;
    background:
        linear-gradient(145deg, transparent 0 76%, rgba(194, 119, 54, 0.13) 76%),
        #f8f7f3;
}

.student-promo__content::before {
    position: absolute;
    top: 0;
    right: 0;
    width: 32%;
    height: 23%;
    background: #071c3b;
    clip-path: polygon(34% 0, 100% 0, 100% 100%);
    content: "";
}

.student-promo__eyebrow {
    color: #bd7131;
}

.student-promo__title {
    max-width: 34rem;
    margin: 0 0 0.9rem;
    color: #071c3b;
    font-family: "BarlowBold", sans-serif;
    font-size: clamp(2.2rem, 4.8vw, 3.7rem);
    line-height: 1;
}

.student-promo__title span {
    display: block;
    color: #bd7131;
}

.student-promo__lead {
    max-width: 35rem;
    margin: 0 0 1.3rem;
    color: #303441;
    font-family: "BarlowSemiBold", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
}

.student-promo__points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0 0 1.4rem;
    padding: 0;
    list-style: none;
}

.student-promo__points li {
    padding-left: 0.75rem;
    border-left: 3px solid #bd7131;
    color: #071c3b;
    font-family: "BarlowBold", sans-serif;
    font-size: 0.82rem;
    line-height: 1.35;
}

.student-promo__dates {
    display: flex;
    gap: 1.65rem;
    margin-bottom: 1.55rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(7, 28, 59, 0.15);
    border-bottom: 1px solid rgba(7, 28, 59, 0.15);
}

.student-promo__date {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.student-promo__date-label {
    color: #6a6e76;
    font-family: "BarlowBold", sans-serif;
    font-size: 0.63rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.student-promo__date-value {
    color: #071c3b;
    font-family: "OswaldBold", "BarlowBold", sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.student-promo__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.student-promo__actions .promo-modal__button:first-child {
    color: #fff;
    background: #071c3b;
    box-shadow: 0 10px 22px rgba(7, 28, 59, 0.2);
}

.student-promo__actions .promo-modal__button:last-child {
    border-color: #bd7131;
    color: #8c4b19;
    background: transparent;
}

.student-booklet-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0;
    border: 0;
    color: var(--orange-5);
    background: transparent;
    font-family: "BarlowBold", sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-decoration: underline;
    text-underline-offset: 0.25rem;
    text-transform: uppercase;
    cursor: pointer;
}

.student-booklet-button:hover,
.student-booklet-button:focus-visible {
    color: var(--orange-3);
}

@media (max-width: 1050px) {
    .promo-modal--legacy .promo-modal__dialog {
        grid-template-columns: minmax(0, 1fr) 400px;
    }
}

@media (max-width: 900px) {
    .promo-modal--legacy .promo-modal__dialog {
        grid-template-columns: minmax(0, 1fr);
    }

    .legacy-invite__copy {
        min-height: 480px;
    }

    .legacy-invite__visual {
        display: none;
    }

    .student-promo__points {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .promo-modal {
        align-items: start;
        overflow-y: auto;
    }

    .promo-modal__dialog {
        max-height: none;
        margin: auto 0;
    }

    .promo-modal--legacy .promo-modal__dialog,
    .promo-modal--student .promo-modal__dialog {
        grid-template-columns: 1fr;
    }

    .legacy-invite__copy {
        min-height: 0;
        padding: 3.4rem 1.5rem 2.25rem;
    }

    .legacy-invite__logo {
        width: min(78%, 230px);
        margin-bottom: 1.8rem;
    }

    .legacy-invite__title {
        font-size: clamp(2.3rem, 11vw, 4rem);
    }

    .legacy-invite__visual {
        min-height: 290px;
        max-height: 42vh;
    }

    .legacy-invite__visual img {
        bottom: -18px;
        width: 100%;
        height: auto;
    }

    .legacy-invite__visual::after {
        display: none;
    }

    .student-promo__cover {
        min-height: 0;
        max-height: 38vh;
    }

    .student-promo__cover img {
        min-height: 0;
        max-height: 38vh;
        object-position: center 37%;
    }

    .student-promo__content {
        min-height: 0;
        padding: 2.2rem 1.5rem;
    }

    .student-promo__dates {
        flex-direction: column;
        gap: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .promo-modal__close,
    .promo-modal__button {
        transition: none;
    }
}
