:root {
    --bg-top: #D4DDFC;
    --bg-bottom: #E0EAFF;
    --black: #000000;
    --white: #FFFFFF;
    --maroon: #760D17;

    --menu: 24px;
    --def: 16px;
    --h1: 64px;
    --space: 24px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    color-scheme: light;
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(var(--bg-top), var(--bg-bottom));
    color: var(--black);
    font-family: "Montserrat", Arial, Helvetica, sans-serif;
}

::selection {
    background: var(--maroon);
    color: var(--bg-top);
}

button {
    font: inherit;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 6px;
}

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

header {
    position: relative;
    z-index: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    min-height: 175px;
    padding: 32px 25px 32px 32px;
    border-radius: 0 0 64px 64px;
    background: var(--maroon);
}

#logos {
    display: block;
    flex-shrink: 0;
}

#logo {
    width: 256px;
    height: auto;
}

#logo_small {
    display: none;
}

nav {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: var(--menu);
    font-weight: 700;
}

nav a,
#btn-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 64px;
    padding: 12px;
    border: 3px solid transparent;
    border-radius: 25px;
    background: transparent;
    color: var(--white);
    text-decoration: none;
    white-space: nowrap;
}

nav a img,
nav a svg,
#btn-mobile img {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

nav a:hover {
    text-decoration: underline;
}

nav a[aria-current="page"] {
    border-color: #FFFFFF51;
}

#btn-home:hover {
    border-color: #CC9F2C51;
    color: #FFF200;
}

#btn-event:hover {
    border-color: #EE181751;
    color: #EE1817;
}

#btn-about:hover {
    border-color: #009DFF51;
    color: #59BDFF;
}

#btn-contact:hover {
    border-color: #2CC77551;
    color: #00FFC8;
}

#btn-mobile {
    display: none;
    cursor: pointer;
}

#btn-mobile:hover {
    border-color: #760D1751;
    text-decoration: underline;
}

body.nav-locked {
    overflow: hidden;
}

nav.mobile-open {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    height: 100vh;
    height: 100vh;
    padding: 120px 0 40px;
    background: #000000E6;
    overflow-y: auto;
}

nav.mobile-open a {
    display: flex;
    width: 80%;
    min-height: 64px;
    padding: 18px 20px;
    border: 0;
    border-radius: 0;
    font-size: 20px;
    white-space: normal;
    text-align: center;
}

nav.mobile-open #btn-home {
    background: linear-gradient(90deg, #FFF20000, #E6C81699, #CC9F2C00);
}

nav.mobile-open #btn-event {
    background: linear-gradient(90deg, #EE181700, #E2391999, #D6591B00);
}

nav.mobile-open #btn-about {
    background: linear-gradient(90deg, #009DFF00, #009DFF99, #009DFF00);
}

nav.mobile-open #btn-contact {
    background: linear-gradient(90deg, #00FFC800, #16E39E99, #2CC77500);
}

nav.mobile-open #btn-mobile {
    position: fixed;
    top: 25px;
    right: 25px;
    display: flex;
    border-color: #FFFFFF51;
    background: var(--maroon);
}

main {
    flex: 1;
    min-width: 0;
}

#about {
    width: min(100% - 64px, 1440px);
    margin: 0 auto;
    padding: 50px 0 160px;
}

.about-heading {
    margin-bottom: var(--space);
    text-align: center;
}

h1 {
    color: var(--maroon);
    font-size: var(--h1);
    font-weight: 800;
    line-height: 1;
}

.subtitle {
    margin-top: 30px;
    font-size: 24px;
    font-style: italic;
    font-weight: 700;
    line-height: 1.4;
}

.about-text {
    width: min(100%, 1300px);
    margin: 0 auto;
}

.about-text p {
    font-family: "Platypi", Georgia, "Times New Roman", serif;
    font-size: var(--def);
    line-height: 2.25;
    text-align: justify;
    overflow-wrap: break-word;
}

.about-text p + p {
    margin-top: 50px;
}

strong {
    font-weight: 700;
}

.about-photos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 100px;
    width: min(100%, 1300px);
    margin: var(--space) auto;
}

.about-photos img {
    width: auto;
    min-width: 0;
    height: 350px;
    object-fit: contain;
}

.about-logos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    justify-items: center;
    gap: 50px;
    margin-top: var(--space);
}

.about-logos img {
    width: 420px;
    height: 420px;
    object-fit: contain;
}

.gallery-action {
    margin-top: 125px;
    text-align: center;
}

.gallery-button {
    max-width: 100%;
    padding: 3px 10px;
    border: 2px solid #9098AA;
    border-radius: 999px;
    background: transparent;
    color: var(--black);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    opacity: 1;
    cursor: default;
    -webkit-text-fill-color: var(--black);
}

footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    min-height: 108px;
    padding: 28px 64px;
    border-radius: 64px 64px 0 0;
    background: var(--maroon);
    color: var(--white);
    font-size: var(--menu);
    font-weight: 700;
    line-height: 1.6;
}

#copyright {
    max-width: 75%;
}

#law {
    flex-shrink: 0;
}

#law a {
    color: var(--white);
}

#law a:hover {
    color: var(--bg-bottom);
}

@media (max-width: 1560px) {
    nav {
        flex-direction: column;
        flex-wrap: wrap;
        height: 150px;
    }

    .about-text p {
        line-height: 2;
    }

    .about-photos {
        gap: var(--space);
    }

    .about-photos img {
        width: calc((100% - var(--space)) / 2);
        height: auto;
    }

    .about-logos img {
        height: 320px;
    }

    footer {
        font-size: 18px;
    }
}

@media (max-width: 1000px) {
    #logo {
        width: 200px;
    }

    nav {
        gap: 0;
    }

    nav a {
        padding: 8px;
        gap: 6px;
    }

    .about-logos {
        gap: var(--space);
    }

    .about-logos img {
        height: 240px;
    }

    .gallery-action {
        margin-top: 80px;
    }

    .gallery-button {
        font-size: 18px;
    }

    footer {
        padding-inline: 32px;
        font-size: 16px;
    }
}

@media (max-width: 800px) {
    :root {
        --menu: 18px;
        --def: 16px;
        --h1: 48px;
    }

    header {
        min-height: 128px;
        padding: 16px 24px;
        border-radius: 0 0 32px 32px;
    }

    #logo {
        display: none;
    }

    #logo_small {
        display: block;
        width: 96px;
        height: 96px;
        object-fit: contain;
    }

    nav a {
        display: none;
    }

    #btn-mobile {
        display: flex;
        border-color: #FFFFFF51;
    }

    #about {
        width: 90%;
        padding-top: 35px;
        padding-bottom: 80px;
    }

    .subtitle {
        font-size: 18px;
    }

    .about-text p {
        line-height: 1.9;
        text-align: left;
        hyphens: auto;
    }

    .about-text p + p {
        margin-top: 32px;
    }

    .about-logos img {
        height: 200px;
    }

    footer {
        flex-direction: column;
        gap: 12px;
        padding: 28px 24px;
        border-radius: 32px 32px 0 0;
        text-align: center;
    }

    #copyright {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .about-photos {
        flex-direction: column;
    }

    .about-photos img {
        width: min(100%, 520px);
        height: auto;
    }

    .gallery-action {
        margin-top: 60px;
    }
}

@media (max-width: 480px) {
    :root {
        --h1: 40px;
        --menu: 16px;
    }

    header {
        gap: 16px;
        padding-inline: 16px;
    }

    #btn-mobile {
        min-height: 48px;
        padding: 8px;
    }

    #btn-mobile img {
        width: 24px;
        height: 24px;
    }

    .subtitle {
        font-size: 16px;
    }

    .about-logos {
        grid-template-columns: 1fr;
    }

    .about-logos img {
        width: 220px;
        height: 220px;
    }

    footer {
        font-size: 14px;
    }
}

@media (max-height: 500px) {
    nav.mobile-open {
        justify-content: flex-start;
        gap: 16px;
        padding-top: 100px;
    }
}

@keyframes percFadeIn {
    from {
        opacity: 0;
        transform: translateY(-45px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes percFadeInSoft {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes percMenuSlideDown {
    from {
        opacity: 0;
        transform: translateY(-45px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

body > header,
body > main,
body > footer {
    animation: percFadeIn 700ms ease-out backwards;
}

body > header { animation-delay: 80ms; }
body > main { animation-delay: 220ms; }
body > footer { animation-delay: 360ms; }

body > main > * {
    animation: percFadeInSoft 600ms ease-out 320ms both;
}

header #logos {
    animation: percFadeIn 550ms ease-out 180ms backwards;
}

header nav {
    animation: percMenuSlideDown 650ms cubic-bezier(0.22, 1, 0.36, 1) 180ms backwards;
}

header nav.mobile-open {
    animation: none;
}

body.nav-locked > header {
    opacity: 1 !important;
    transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    body > header,
    body > main,
    body > footer,
    body > main > *,
    header #logos,
    header nav {
        animation: none;
    }
}
