:root {
    --almost-white: hsl(0, 0%, 98%);
    --medium-gray: hsl(0, 0%, 41%);
    --almost-black: hsl(0, 0%, 8%);

    --fw-light: 500;
    --fw-bold: 700;

    --ff-Epilogue: "Epilogue", sans-serif;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
}

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

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: transparent;
}

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

p {
    font-size: 1.125rem;
}

h1 {
    line-height: 1.1;
}

body {
    line-height: 1.5;
    font-weight: var(--fw-light);
    font-family: var(--ff-Epilogue);
}

/* screen reader only */
.sr-only {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    margin: -1px;
}

.flex {
    display: flex;
}

.flex-aic {
    align-items: center;
}

.flex-jc-sb {
    justify-content: space-between;
}

.overlay {
    position: absolute;
    inset: 0;
    background-color: var(--medium-gray);
    opacity: 0;
    visibility: hidden;
    transition: opacity 350ms ease-in-out, visibility 350ms ease;
}

.overlay.active {
    opacity: 0.7;
    visibility: visible;
}

.header {
    min-height: 100dvh;
    position: relative;
}

.nav>.content-wrapper {
    margin-inline: auto;
    width: min(1400px, 100% - 3rem);
    height: 80px;
}

/* menubar */
.nav__links {
    position: fixed;
    right: -300px;
    /* right: 0; */
    top: 0;
    bottom: 0;
    min-height: 100dvh;
    background-color: var(--almost-white);
    width: 300px;
    padding: 2rem;
    transition: right 350ms ease;
}

.nav__links.active {
    right: 0;
}

.nav__links ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav__links li button,
.nav__links li a {
    color: var(--medium-gray);
    transition: all 350ms ease;
}

.nav__links li button:hover,
.nav__links li a:hover {
    color: var(--almost-black);
}

ul[role="navigation"] {
    margin-block-end: 3rem;
}

ul.auth-nav {
    text-align: center;
}

.register-link {
    display: inline-block;
    padding-block: 8px;
    border-radius: 8px;
    border: 2px solid var(--medium-gray);
    width: 100%;
}

.nav__links li button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.close-btn {
    /* display: inline-block; */
    display: block;
    margin-inline-start: auto;
    margin-block-end: 2rem;
}

.interactive-section>.content-wrapper {
    margin-inline: auto;
    width: min(1100px, 100%);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-block-end: 2rem;
}

.interactive-section__text {
    width: 90%;
    margin-inline: auto;
    flex-direction: column;
    text-align: center;
    gap: 1.75rem;
}

.interactive-section__text h1 {
    /* TODO increase base size clamp */
    font-size: clamp(2.5rem, 3.824vw + 1.276rem, 6.5rem);
    color: var(--almost-black);
    letter-spacing: -1px;
}

br.breaker {
    display: none;
}

.interactive-section__text p {
    color: var(--medium-gray);
}

.cta {
    align-self: center;
    font-weight: var(--fw-bold);
    display: inline-block;
    background-color: var(--almost-black);
    color: var(--almost-white);
    padding: 12px 36px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: background-color 350ms ease-in-out, color 350ms ease-in-out, border-color 350ms ease-in-out;
}

.cta:hover {
    background-color: var(--almost-white);
    color: var(--almost-black);
    border-color: var(--almost-black);
}

.sponsors {
    gap: 0.5rem;
}


@media screen and (width >=50em) {
    .menu-btn,
    .close-btn,
    .overlay {
        display: none;
    }

    br.breaker {
        display: block;
    }

    .nav>.content-wrapper {
        gap: 2rem;
    }

    ul[role="navigation"] {
        margin-block-end: 0;
    }


    .nav__links ul {
        gap: 3rem;
        align-items: center;
    }

    .register-link {
        padding-inline: 20px;
    }

    .interactive-section>.content-wrapper {
        flex-direction: row-reverse;
        align-items: center;
        align-items: end;
        /* make the gap responsive */
        gap: 8vw;
    }

    .interactive-section__text {
        width: 100%;
        gap: 3.5rem;
        text-align: left;
    }

    .interactive-section__text p {
        max-width: 90%;
    }

    .cta {
        align-self: start;
    }

    .sponsors {
        flex-wrap: wrap;
        gap: 2rem;
    }

    .nav__links {
        position: static;
        min-height: auto;
        background: transparent;
        flex: 1;
        display: flex;
        justify-content: space-between;
    }

    .nav__links ul {
        flex-direction: row;
    }
}

@media screen and (width >=64em) {
    .interactive-section__text {
        gap: 3.75rem;
    }
}

/* had to be separate */
/* sub-menu */
.dropdown button > img {
    transition: transform 350ms ease;
}

.dropdown button.active > img {
    transform: rotate(-180deg);
}

@media screen and (width <= 50em) {    
    .sub-menu {
        display: grid;
        grid-template-rows: 0fr;
        transition: grid-template-rows 350ms ease;
    }
    /* use case for is pseudo class */
    button:is(.active) + .sub-menu {
        grid-template-rows: 1fr;
    }
    .sub-menu > * {
        overflow: hidden;
    }
    .sub-menu ul {
        padding: 1.5rem;
    }
    .sub-menu li a {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
}

@media screen and (width >= 50em) {
    .dropdown {
        position: relative;
    }

    .sub-menu {
        position: absolute;
        right: 0;
        transform: translateY(-16px);
        opacity: 0;
        width: max-content;
        border-radius: 8px;
        padding: 1.25rem;
        margin-top: 1rem;
        background: hsl(0, 0%, 100%);
        box-shadow: 0 0 16px rgba(0, 0, 0, 0.1);
        transition: opacity 350ms ease, transform 350ms ease;
    }

    button:is(.active) + .sub-menu {
        transform: translateY(0);
        opacity: 1;
    }

    .sub-menu ul {
        flex-direction: column;
        gap: 0.875rem;
    }

    .sub-menu li {
        width: 100%;
    }

    .sub-menu ul li a {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
}