@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700&family=Quicksand:wght@400;500;600;700&display=swap');

:root {
  --brown: #210F04;
  --cream: #FFFBD8;
  --white: #ffffff;
  --font: 'Courier New', monospace;
  --ink-soft: #3A2314;
}

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

body {
    font-family: 'Quicksand', var(--font);
    color: var(--brown);
    background-color: var(--cream);
    padding-top: 88px; /* matches header's normal height (60px logo + 28px padding) so content isn't hidden under it */

    /* STICKY FOOTER: keeps the footer at the bottom when the page content is short */
    min-height: 100vh;   /* fallback */
    min-height: 100dvh;  /* accounts for mobile browser address bars */
    display: flex;
    flex-direction: column;
}

h1, h2, h3,
nav a,
.touch-cta {
    font-family: 'Baloo 2', 'Quicksand', var(--font);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--ink-soft);
    outline-offset: 3px;
}

/*HEADER*/

header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background-color: var(--brown);
    color: var(--white);
    padding: 14px 40px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.logo {
    justify-self: start;
}

header nav {
    justify-self: center;
}

.header-icons {
    justify-self: end;
}

/* Admin pages' logout link (see Orders.html) uses this class instead
   of .header-icons — needs the same right-alignment in the grid's
   3rd column, otherwise it defaults to justify-self: stretch and the
   icon renders flush-left next to the nav links. */
.logout-icon {
    justify-self: end;
}

header a:focus-visible {
    outline-color: var(--white);
}

.logo img {
    height: 60px;
    width: auto;
    padding-left: 20px;
    margin-left: 10px;
}

nav ul {
    display: flex;
    gap: 30px;
}

.header-icons {
    display: flex;
    gap: 20px;
    justify-self: end;
}

nav a {
  letter-spacing: 0.3px;
  font-size: 1.05rem;
  font-weight: 600;
  padding-bottom: 4px;
}

nav a:hover {
    opacity: 0.75;
}

.nav-active {
    border-bottom: 2px solid var(--white);
}

/*FOOTER*/

footer {
  background-color: var(--brown);
  color: var(--white);
  padding: 10px 40px;
  margin-top: auto; /* pushes the footer to the bottom of the page */
}

.footer-logo img {
    height: 60px; /* same as the header logo */
    width: auto;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 30px;
}

.socials-label {
    display: flex;
    justify-content: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 15px;
}

.footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    justify-content: center;
    margin-top: 50px; /* re-centered for the smaller footer logo */
}

.footer-disclaimer {
    text-align: center;
    margin-top: -25px;
    padding-top: 10px;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* STICKY HEADER (scroll-based) */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: padding 0.25s ease, box-shadow 0.25s ease;
}

header.scrolled {
    padding: 8px 40px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

header.scrolled .logo img {
    height: 48px;
    transition: height 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
    header,
    header.scrolled .logo img {
        transition: none;
    }
}

/* ===== MOBILE MENU PARTS (hidden on desktop) ===== */
.menu-toggle,
.menu-close,
.nav-overlay,
.drawer-head {
    display: none;
}

/* ===== MOBILE VIEW (keep this block at the very bottom) ===== */
@media (max-width: 768px) {

    body {
        padding-top: 76px; /* mobile header height: 12 + 52 + 12 */
    }

    body.menu-open {
        overflow: hidden;
    }

    /* HEADER: hamburger | logo | icons */
    header {
        padding: 12px 16px;
    }

    header.scrolled {
        padding: 6px 16px;
    }

    .logo {
        justify-self: center;
    }

    .logo img {
        height: 52px;
        padding-left: 0;
        margin-left: 0;
    }

    header.scrolled .logo img {
        height: 44px;
    }

    .header-icons {
        gap: 14px;
    }

    .menu-toggle,
    .menu-close {
        display: flex;
        align-items: center;
        justify-content: center;
        justify-self: start;
        background: none;
        border: none;
        color: var(--white);
        cursor: pointer;
        padding: 4px;
    }

    /* SLIDE-IN MENU (the existing header nav) */
    header nav {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        height: 100dvh;
        width: min(80vw, 320px);
        background-color: var(--brown);
        padding: 20px 16px;
        z-index: 1100;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform 0.3s ease, visibility 0.3s;
    }

    header nav.open {
        transform: translateX(0);
        visibility: visible;
    }

    .drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 28px;
    }

    .drawer-head img {
        height: 56px;
        width: auto;
    }

    header nav ul {
        flex-direction: column;
        gap: 6px;
    }

    header nav a {
        display: block;
        padding: 14px 18px;
        border-radius: 999px;
        font-size: 1.15rem;
    }

    header nav a.nav-active {
        border-bottom: none;
        background-color: rgba(255, 255, 255, 0.12);
    }

    .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 1050;
    }

    .nav-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }

    /* FOOTER: one centered column */
    footer {
        padding: 16px 16px 10px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 12px;
    }

    .footer-brand {
        width: 100%;
    }

    .footer-logo {
        width: 100%;
        text-align: center;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(243, 227, 184, 0.4);
    }

    .footer-logo img {
        height: 56px;
    }

    .footer-nav ul {
        margin-top: 0;
        gap: 14px;
        font-size: 0.85rem;
    }

    .footer-disclaimer {
        margin-top: 10px;
        font-size: 0.7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    header nav,
    .nav-overlay {
        transition: none;
    }
}