:root {
    --lightpink: #f8dbe6;
    --darkpink: #dd267f;
    --accent1: #f49cbd;
    --accent2: #541630;
    --accent3: #f2bc53;
    --accent4: #f3ac5b;
    --headlinered: #c60d5e;

    --titlescale: 1.2;

    /* Navbar height, used for the anchor-link offset below.
       Desktop is roughly logo (4rem) + nav padding (1.5rem x 2). */
    --nav-h: 7rem;

    --section-offset: 1rem;
}

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

html{
    scroll-behavior: smooth;
}

body {
    display: flex;
    font-family: "Poppins";
    background: var(--accent1);
    color: var(--darkpink);
    line-height: 1.6;
    z-index: 0;
    width: 100%;
    flex-direction: column;
}

a {
    text-decoration: none; 
}

/* ---------- Navbar ---------- */

nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: transparent;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
    box-sizing: border-box;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    font-size: 1rem;
    padding: 1rem 1.5rem;
    background-color: var(--accent1);
    border-radius: 100px;
}

nav a {
    color: var(--darkpink);
    font-size: 1.3rem;
    transition: color 200ms;
    font-weight: 600;
}

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

.logo img {
    height: 4rem;
    width: auto;
    filter: drop-shadow(0px 0px 5px transparent);
    transition: filter 200ms;
}

.logo img:hover {
    filter: drop-shadow(0px 0px 5px var(--lightpink));
}

/* hamburger button: hidden on desktop */
nav-bar .menu-toggle {
    display: none;
}

/* ---------- Hero ---------- */

.hero-page {
    width: 100%;
    min-height: 100svh;
    position: relative;
    display: grid;
    place-items: center;
    overflow: clip;
}

fit-headline {
    display: block;
    z-index: 10;
    position: relative;
}

.headline {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    font-size: 1em;
    position: relative;
    color: var(--lightpink);
    font-family: "Anton";
    font-weight: 700;
    text-align: center;
}

.top-line {
    letter-spacing: -0.01em;
    transform: scaleY(var(--titlescale));
    transform-origin: bottom;
    white-space: nowrap;
}

.subtitle {
    font-family: "Bodoni Moda";
    font-style: italic;
    font-weight: 900;
    font-size: 6rem;
    position: relative;
    letter-spacing: -0.02em;
    color: var(--lightpink);
    margin-top: -0.7em;
    white-space: nowrap;
}

#bigcookie {
    position: absolute;
    z-index: 5;
    left: 50%;
    transform: translateX(-50%);
    height: calc(var(--sub-size, 11svh) * 8.5);
    width: auto;
    max-width: 85%;
    object-fit: contain;
    max-height: 100vh;
    margin-bottom: 1rem;
}

/* ---------- Typography ---------- */

h1 {
    font-family: 'Anton';
    color: var(--lightpink);
    font-size: 6rem;
    font-weight: 200;
    text-align: center;
}

h2 {
    font-family: 'Bodoni Moda';
    font-style: italic;
    font-weight: 800;
    font-size: 3rem;
    text-align: center;
}

/* ---------- Sections ---------- */

section {
    min-height: 100svh;
    display:grid;
    align-content: center;
    box-sizing: border-box;
    height: fit-content;
    justify-items: center;
}

/* every section except the hero stops below the fixed navbar
   when reached through an anchor link */
section:not(#home) {
    scroll-margin-top: var(--section-offset);
}

/* ---------- Menu ---------- */

.itembox {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 1rem;
    margin: 0;
    max-width: 500px;
    text-align: center;
    box-sizing: border-box;
}

.itembox img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.itembox h3 {
    font-weight: 200;
    font-family: 'Anton';
    color: var(--lightpink);
    font-size: 2.5rem;
}

.itembox h4{
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
}

#menu .gridbox {
    --gap: 1.5rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--gap);
    justify-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

@media (max-width: 1100px) {
    #menu .gridbox {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    #menu .gridbox {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    :root {
        --section-offset: 2rem;   /* mobile, tuned separately */
    }
}

/* ---------- Lore / paragraphs ---------- */

section .paragraph-holder {
    width: fit-content;
    align-items: center;
}

.paragraph-holder p {
    margin: 0 10%;
    max-width: 1000px;
    text-align: center;
    font-size: 1.3rem;
    line-height: 1.2em;
}

.bold{
    font-weight: 600;
    font-size: 1.5rem;
}

.blondies-p-logo {
    height: 1.6em;
    vertical-align: -0.25em;
}

.bold:has(.blondies-p-logo) {
    font-size: 1.2em;
    font-family: "Bodoni Moda";
    font-style: italic;
    font-weight: 900;
}

.headline-lore{
    font-family: 'Anton';
    font-size: 1.7em;
    letter-spacing: -0.01em;
    margin-bottom: -1rem;
}

.subtitle-lore{
    font-family: 'Bodoni Moda';
    font-style: italic;
    font-weight: 900;
    font-size: 1.2em;
    letter-spacing: -0.02em;
    padding-bottom: 3rem;
}

/* ---------- Phones and tablets: compact navbar + hamburger ---------- */

@media (max-width: 1024px) {
    :root {
        --nav-h: 3.25rem;
    }

    nav-bar {
        height: var(--nav-h);
        padding: 0 1rem;
    }

    nav-bar .logo img {
        height: calc(var(--nav-h) * 0.6);
        width: auto;
        display: block;
    }

    /* hamburger button */
    nav-bar .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 2.5rem;
        height: 2.5rem;
        padding: 0;
        background: var(--accent1);
        border: 0;
        border-radius: 50%;
        cursor: pointer;
    }

    .menu-toggle span {
        display: block;
        width: 1.5rem;
        height: 2px;
        background: var(--darkpink);
        transition: transform 0.2s, opacity 0.2s;
    }

    /* animate into an X when open (7px = 5px gap + 2px bar) */
    nav-bar.open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    nav-bar.open .menu-toggle span:nth-child(2) { opacity: 0; }
    nav-bar.open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* dropdown panel */
    nav-bar nav {
        display: none;
        position: absolute;
        top: calc(100% + 0.25rem);
        left: 2rem;
        right: 2rem;
        background: var(--lightpink);
        border-radius: 2rem;
        padding: 0.5rem;
    }

    nav-bar.open nav {
        display: block;
    }

    nav-bar nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0;
        background: transparent;
        border-radius: 0;
    }

    nav-bar nav a {
        display: block;
        padding: 0.75rem 1rem;
        text-align: center;
    }

    /* the desktop hover colour is the same as this panel's background */
    nav-bar nav a:hover {
        color: var(--headlinered);
    }
}

.inputholder {
    display: flex;
    flex-direction: column;
    min-width: 20rem;
    align-items: center;
    height: fit-content;
}

input, textarea, button {
    border: none;
    padding: 1rem;
    margin: 1rem;
    display: block;
    background-color: var(--lightpink);
    font-family: 'Poppins';
    caret-color: var(--darkpink);
    color: var(--darkpink);
    font-size: 1.5rem;
    border: 2px solid transparent;
    transition: border 200ms;
}

input:focus, textarea:focus{
    outline: 2px solid var(--darkpink);
}

input:hover, textarea:hover, button:hover {
    border: 2px solid var(--darkpink);
}

input, button {
    border-radius: 300px;
    
}

button {
    font-family: 'Anton';
    color: var(--darkpink);
    font-size: 2rem;
    padding: 0.5rem 1.5rem;
    
}

textarea {
    border-radius: 30px;
    height: 20rem;
    min-width: 95%;
    resize: none;
}

::placeholder {
    color: var(--accent1);
    font-size: 1.5rem;
    font-weight: 600;
}