/* all main css styles here */
@font-face {
    font-family: 'CookieRun Bold';
    src: url(/assets/CookieRun\ Bold.ttf);
}

/* colour palettes
root - light
dark - dark */

:root {
    --nav-main: #E0CDB5;
    --hero-main: #EFE2CF;
    --section-main: #F5EBDD;
    --text: #2B1D14;
    --text-outline: #ffffff;
    --hover: #d3656c;
    --hover-2: #b9444c;
    --divider: #C9973E;
    --shadow: #5A4636;
    --subtle-shadow: #ceab8f;
    --search-main: #FFFFFF;
    --drop-down-sub: #6B4423;
    --greyed-out: #C2A98A;
}

.darkmode {
    --nav-main: #241A14;
    --hero-main: #2E2119;
    --section-main: #3A2A20;
    --text: #F5E6D3;
    --text-outline: #000000;
    --hover: #CC6284;
    --hover-2: #b44065;
    --divider: #D6A85F;
    --shadow: #1A1410;
    --subtle-shadow: #110d0a;
    --search-main: #000000;
    --drop-down-sub: #C9B39A;
    --greyed-out: #8A7763;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background-color: var(--nav-main);
    color: var(--text);
    font-family: 'CookieRun Bold';
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* navbar styles */

.main-nav {
    top: 0;
    position: sticky;
    z-index: 100;
    padding: 10px;
    display: flex;
    background-color: color-mix(in srgb, var(--nav-main) 90%, transparent);
    color: var(--text);
    box-shadow: 0 10px 5px var(--nav-main);
    border-bottom: 1px solid var(--divider);
}

.logo-img {
    height: 2em;
    vertical-align: middle;
}

.logo a {
    font-size: 1.5em;
    text-decoration: none;
    color: var(--text);
}

.logo a:hover {
    color: var(--hover);
}

.nav-links {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    padding: 5px 10px;
    display: block;
    text-wrap: nowrap;
    font-size: 1.4em;
}

.nav-links a:hover {
    color: var(--hover);
}

.submenu {
    display: none;
    position: absolute;
    background-color: var(--nav-main);
    list-style: none;
    padding: 0;
    font-size: 0.8em;
    box-shadow: 0 10px 5px var(--nav-main);
    border: 1px solid var(--divider);
    border-top: 0;
}

.nav-links li:hover .submenu {
    display: block;
}

.nav-right {
    display: flex;
    margin-left: auto;
    gap: 10px;
}

.search {
    width: 15vw;
    border: 1px solid var(--divider);
    background-color: var(--search-main);
    color: var(--text);
    border-radius: 50px;
    padding: 2%;
    font-family: 'CookieRun Bold';
    font-size: 1em;
    box-shadow: var(--subtle-shadow) 0px 5px 15px;
}

.search::placeholder {
    color: var(--greyed-out);
}

.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.burger span {
    width: 25px;
    height: 2.5px;
    background: var(--text);
    margin: 3px 0;
}

.theme-button {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--section-main);
    border: 1px solid var(--divider);
    box-shadow: var(--subtle-shadow) 0px 5px 15px;
}

.theme-button:hover {
    background-color: var(--hover);
}

.sun-icon,
.moon-icon {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 1.5em;
    cursor: pointer;
}

.sun-icon {
    display: none;
}

.darkmode .moon-icon {
    display: none;
}

.darkmode .sun-icon {
    display: grid;
}

/* hero styles */

.hero {
    display: flex;
    background-color: var(--hero-main);
    border-bottom: 1px solid var(--divider);
}

.title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2%;
}

.hero h1 {
    font-size: 10vw;
    color: var(--text);
    text-shadow: 7px 5px 0px var(--text-outline), 2px 2px 0 var(--text-outline), 2px -2px 0 var(--text-outline), -2px 2px 0 var(--text-outline), -2px -2px 0 var(--text-outline), 2px 0px 0 var(--text-outline), 0px 2px 0 var(--text-outline), -2px 0px 0 var(--text-outline), 0px -2px 0 var(--text-outline);
    margin: 0;
}

.hero p {
    font-size: 2vw;
    text-align: center;
}

.hero-sprite {
    width: 35%;
    height: auto;
    object-fit: contain;
    margin-left: auto;
}

/* section styles */

section {
    background-color: var(--section-main);
    margin: 0;
    padding: 0;
}

h2 {
    padding: 0;
    margin: 0;
}

/* popular guides styles */

.popular-guides {
    padding: 1%;
}

.popular-guides h2 {
    text-align: center;
    font-size: 3em;
}

/* carousel styles */

.carousel {
    max-width: 1080px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    margin: 0 auto;
}

.carousel-track {
    display: flex;
    gap: 10px;
    padding: 5px 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.carousel-card {
    flex: 0 0 calc((100% - 25px) / 3);
    box-sizing: border-box;
    border: 1px solid var(--divider);
    background-color: var(--hero-main);
    border-radius: 10px;
    margin: 0;
    padding: 1%;
    box-shadow: 0 5px 5px var(--shadow);
    text-align: center;
}

.carousel-viewport {
    overflow: hidden;
}

.carousel-card h3 {
    margin: 0 0 5px;
    font-size: 1.3em;
}

.carousel-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
}

.carousel-button {
    display: inline-block;
    padding: 1% 2%;
    background-color: var(--hover);
    border: 1px solid var(--hover-2);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
}

.carousel-button:hover {
    background-color: var(--hover-2);
}

.carousel-arrow {
    width: 4em;
    height: 4em;
    background-color: var(--nav-main);
    border: 1px solid var(--divider);
    border-radius: 25%;
    color: var(--text);
    font-family: 'CookieRun Bold';
    cursor: pointer;
    margin: 10px;
}

/* about section styles */

.about {
    display: flex;
    flex-direction: row;
    padding: 2%;
}

.about h2 {
    font-size: 3em;
    text-align: left;
}

.about p {
    font-size: 1.8em;
}

.latest-video {
    margin-left: auto;
    border: 1px solid var(--divider);
    border-radius: 20px;
    padding: 12px;
    width: min(100%, 900px);
}

.video-frame {
    width: 100%;
}

.video-frame iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.about .video-subtext {
    font-size: 0.9em;
}

.latest-video h3 {
    font-size: 2em;
    margin: 0;
    padding: 1%;
}

/* content use styles */

.content-disclaimer {
    background-color: var(--section-main);
    padding: 1%;
    margin: 0;
    color: var(--text);
}

.content-disclaimer h1 {
    padding: 0;
    margin: 0;
}

.content-disclaimer a {
    color: var(--hover);
    text-decoration: none;
}

.content-disclaimer a:hover {
    color: var(--hover-2);
}

/* footer styles */

footer {
    display: flex;
    background-color: var(--nav-main);
    padding: 1%;
    flex-direction: row;
    align-items: center;
    border-top: 1px solid var(--divider);
}

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

footer a svg {
    width: 2.5em;
    height: 2.5em;
    display: block;
    padding: 0 10px 0 10px;
    fill: currentColor;
}

footer a:hover {
    color: var(--hover);
    scale: calc(1.2);
}

footer a:last-child {
    margin-left: auto;
}

/* misc styles */

.striked {
    text-decoration: line-through;
}

.flip-image {
    transform: scaleX(-1);
}

.text-deco-left::before {
    content: "»»——— ";
    font-size: 0.8em;
    color: var(--divider);
}

.text-deco-right::after {
    content: " ———««";
    font-size: 0.8em;
    color: var(--divider);
}

/* media specific styles */
@media (max-width: 1050px) {
    .main-nav {
        background-color: var(--nav-main);
    }

    .nav-links {
        top: 60px;
        display: none;
        width: 100%;
        flex-direction: column;
        background-color: var(--nav-main);
        font-size: 1.1em;
        text-align: center;
    }

    .burger {
        display: flex;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li:first-child {
        border-top: 1px solid var(--divider);
    }

    .submenu {
        border: none;
        display: block;
        position: static;
    }

    .submenu li:last-child {
        border-bottom: 1px solid var(--divider);
    }

    .search {
        max-width: 100px;
        font-size: 0.7em;
        padding: 10px;
    }

    .about {
        flex-direction: column;
        align-items: stretch;
    }

    .about-text {
        width: 100%;
    }

    .latest-video {
        width: 95%;
        margin-inline: auto;
    }
}

@media (max-width: 750px) {
    .carousel {
        max-width: 400px;
    }

    .carousel-card {
        flex-basis: 100%;
    }
}