@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300&display=swap');

@font-face {
    font-family: 'cooper_blackregular';
    src: url('Fonts/coopbl-webfont.eot');
    src: url('Fonts/coopbl-webfont.eot?#iefix') format('embedded-opentype'), url('Fonts/coopbl-webfont.woff') format('woff'), url('Fonts/coopbl-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/*** 
Body Information
____________________________________________*/

/* Prevent horizontal scroll - only on body, not html.
   Setting overflow on html breaks position:sticky inside pages.
   Black background on html prevents white overscroll flash on mobile. */
html {
    background-color: black;
}

body {
    max-width: 100%;
    overflow-x: hidden;
    background-color: black;
}

/* Clip any page content that bleeds wider than the viewport.
   This catches elements like .navSection that use negative margins
   without breaking position:sticky (which only cares about html/body overflow). */
#content {
    overflow-x: clip;
}

body {
    background-image: url("CSS/Images/Background1.png");
    background-size: 5%;
    padding-left: 5%;
    padding-right: 5%;
    box-shadow: 
        0px 4px 6px -1px rgba(255, 66, 42, 0.7),
        0px -4px 6px -1px rgba(255, 66, 42, 0.7),
        0px -6px 8px -2px rgba(0, 0, 0, 0.5),
        inset 0px 0px 20px 5px rgba(0, 0, 0, 0.6);
}

/*** 
Header Information
____________________________________________*/
header {
    height: 120px;
    width: 100%;
    background: linear-gradient(90deg, rgba(255,66,42,0.85) 0%, rgba(255,180,127,0.85) 100%), url("CSS/Images/Texture2.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 
        0px 4px 6px -1px rgba(255, 66, 42, 0.7),
        0px -4px 6px -1px rgba(255, 66, 42, 0.7),
        0px -6px 8px -2px rgba(0, 0, 0, 0.5),
        inset 0px 0px 20px 5px rgba(0, 0, 0, 0.6);
}

header > img {
    margin-right: auto;
    margin-left: auto;
    display: block;
    height: 100%;
}

/*** 
Nav Information
____________________________________________*/

.navBar {
    position: sticky;
    top: 0;
    z-index: 9999;
    text-align: center;
    background-color: black;
    background-image: url("CSS/Images/Texture1.png");
    padding-top: 15px;
    padding-bottom: 15px;
    border-radius: 0 0 20px 20px;
    box-shadow: 
        0px 4px 6px -1px rgba(255, 66, 42, 0.7),
        0px -4px 6px -1px rgba(255, 66, 42, 0.7),
        0px -6px 8px -2px rgba(0, 0, 0, 0.5),
        inset 0px 0px 20px 5px rgba(0, 0, 0, 0.6);
}

/* Hamburger button - hidden on desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 16px;
    margin-left: auto;
    margin-right: 16px;
}

.hamburger-line {
    display: block;
    width: 28px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animate hamburger into an X when active */
.nav-toggle.is-active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.nav-toggle.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
}
.nav-toggle.is-active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

li {
    display: inline;
}

.navItem a {
    padding-left: 20px;
    padding-right: 50px;
    font-family: 'Oswald', sans-serif;
    font-size: 50px;
    font-style: italic;
    text-decoration: none;
    color: white;
    transition: 0.3s;
}

.navItem a:hover {
    color: rgb(255, 207, 200);
    text-shadow: 0 0 1px rgb(255, 207, 200);
    letter-spacing: 0.1em;
    background-image: linear-gradient(45deg, #3A2C26 25%, transparent 25%), linear-gradient(-45deg, #3A2C26 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #3A2C26 75%), linear-gradient(-45deg, transparent 75%, #3A2C26 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    background-color: #161616;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent), linear-gradient(to bottom, transparent, black 30%, black 100%);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent), linear-gradient(to bottom, transparent, black 30%, black 100%);
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
}

#content {
    margin-top: -20px;
}

/*** 
Footer Information
____________________________________________*/

footer {
    height: 200px;
    width: 100%;
    background: linear-gradient(90deg, rgba(255,66,42,0.85) 0%, rgba(255,180,127,0.85) 100%), url("CSS/Images/Texture2.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 
        0px 4px 6px -1px rgba(255, 66, 42, 0.7),
        0px -4px 6px -1px rgba(255, 66, 42, 0.7),
        0px -6px 8px -2px rgba(0, 0, 0, 0.5),
        inset 0px 0px 20px 5px rgba(0, 0, 0, 0.6);
        border-radius: 20px;
    z-index: 10;
    position: relative;
}

#content {
    position: relative;
    opacity: 0;
    transform: translateY(-60px);
}

#content.slide-in {
    animation: slideInFromTop 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes slideInFromTop {
    0% {
        opacity: 0;
        transform: translateY(-60px);
    }
    60% {
        opacity: 1;
        transform: translateY(5px);
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/*** 
Mobile Styles
____________________________________________*/

/* Tablet: scale nav font down */
@media (max-width: 768px) {

    /* Hard clamp - nothing escapes the viewport */
    html {
        overflow-x: hidden;
    }

    body {
        padding-left: 0;
        padding-right: 0;
        width: 100vw;
        overflow-x: hidden;
        box-shadow: none;
    }

    header {
        height: 80px;
        position: sticky;
        top: 0;
        z-index: 9998;
        width: 100vw;
        box-sizing: border-box;
        /* Trim box-shadow so it doesn't push scroll width */
        box-shadow:
            0px 4px 6px -1px rgba(255, 66, 42, 0.7),
            inset 0px 0px 20px 5px rgba(0, 0, 0, 0.6);
    }

    /* Show hamburger, restructure nav */
    .navBar {
        display: flex;
        align-items: center;
        padding-top: 0;
        padding-bottom: 0;
        border-radius: 0;
        min-height: 54px;
        width: 100vw;
        box-sizing: border-box;
    }

    .nav-toggle {
        display: flex;
    }

    /* Nav collapses vertically, hidden until toggled */
    /* top: 54px = height of the navbar bar itself */
    #mainNav {
        position: absolute;
        top: 54px;
        left: 0;
        right: 0;
        background-color: black;
        background-image: url("CSS/Images/Texture1.png");
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, padding 0.35s ease;
        border-radius: 0 0 20px 20px;
        box-shadow: 
            0px 8px 10px -2px rgba(255, 66, 42, 0.5),
            inset 0px 0px 20px 5px rgba(0, 0, 0, 0.6);
    }

    #mainNav.nav-open {
        max-height: 300px;
        padding-bottom: 16px;
    }

    /* Stack nav links vertically */
    #mainNav ul {
        display: flex;
        flex-direction: column;
        padding-top: 8px;
    }

    li {
        display: block;
    }

    .navItem a {
        display: block;
        padding: 10px 24px;
        font-size: 36px;
        text-align: left;
    }

    /* Simplify hover background pattern on mobile - it's invisible on touch anyway */
    .navItem a:hover,
    .navItem a:active {
        background-image: none;
        background-color: #1a1a1a;
        letter-spacing: 0.05em;
    }

    #content {
        margin-top: 0;
    }

    footer {
        height: 120px;
        border-radius: 10px;
    }
}

/* Small phones: tighten further */
@media (max-width: 480px) {

    header {
        height: 60px;
        width: 100vw;
        box-sizing: border-box;
        box-shadow:
            0px 4px 6px -1px rgba(255, 66, 42, 0.7),
            inset 0px 0px 20px 5px rgba(0, 0, 0, 0.6);
    }

    .navItem a {
        font-size: 28px;
        padding: 8px 20px;
    }

    footer {
        height: 80px;
    }
}