/* =========================================
   FONTS (self-hosted EB Garamond, SIL OFL licence)
   ========================================= */

@font-face {
    font-family: "EB Garamond";
    src: url("assets/fonts/eb-garamond-latin-400-normal.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}


/* =========================================
   GLOBAL SETTINGS
   ========================================= */

:root {
    --cream: #F8F0DD;
    --green: #62732B;
    --dark-green: #475841;
    --pink: #BF3684;
    --purple: #78356F;

    --header-height: 4.5rem;
    --heading-font: "EB Garamond", Garamond, Georgia, serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--cream);
    color: var(--dark-green);
    font-family: Helvetica, Arial, sans-serif;
    line-height: 1.6;
}

/* Stops the fixed header covering a section heading after a nav click */
section[id] {
    scroll-margin-top: var(--header-height);
}

/* Visible keyboard focus */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--purple);
    outline-offset: 3px;
}

.intro a:focus-visible,
.tickets a:focus-visible {
    outline-color: var(--cream);
}


/* =========================================
   TYPOGRAPHY
   ========================================= */

h1,
h2 {
    font-family: var(--heading-font);
    font-weight: normal;
}

h1 {
    font-size: clamp(3rem, 11vw, 6rem);
    line-height: 0.95;
}

h2 {
    font-size: clamp(2.5rem, 7vw, 4rem);
    line-height: 1;
    margin-bottom: 1.5rem;
}

p {
    font-size: 1.1rem;
}


/* =========================================
   HEADER
   ========================================= */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 0 3rem;

    background-color: var(--cream);

    z-index: 1000;
}

.logo {
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 0.12em;
}

/* When the logo is a link (404 page) */
a.logo {
    color: var(--dark-green);
    text-decoration: none;
}

.site-nav {
    display: flex;
    gap: 2rem;
}

.site-nav a {
    color: var(--dark-green);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

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


/* Menu button: hidden on desktop, shown on mobile */

.menu-toggle {
    display: none;

    width: 2.75rem;
    height: 2.75rem;

    background: none;
    border: none;
    cursor: pointer;

    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
}

.menu-bar {
    display: block;
    width: 1.5rem;
    height: 2px;
    background-color: var(--dark-green);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(1) {
    transform: translateY(0.5rem) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-bar:nth-child(3) {
    transform: translateY(-0.5rem) rotate(-45deg);
}


/* =========================================
   HERO
   ========================================= */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 8rem 2rem 4rem;

    /* Clips the fixed background to the hero, so it
       appears stationary while the page scrolls */
    clip-path: inset(0);
}

.hero::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;

    background-image:
        linear-gradient(
            rgba(71, 88, 65, 0.15),
            rgba(71, 88, 65, 0.15)
        ),
        url("assets/hero.jpg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-panel {
    position: relative;
    z-index: 1;

    width: min(560px, 85%);
    padding: 3rem 2.5rem;

    text-align: center;

    background-color: rgba(248, 240, 221, 0.94);

    border: 2px solid var(--green);
}

.eyebrow {
    color: var(--green);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
}

.hero h1 {
    color: var(--purple);
}

.subtitle {
    font-family: var(--heading-font);
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--pink);
    margin-top: 1rem;
}

.date {
    margin-top: 2rem;
    font-size: 1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}


/* =========================================
   BUTTONS
   ========================================= */

.button {
    display: inline-block;

    margin-top: 2rem;
    padding: 0.9rem 1.8rem;

    background-color: var(--green);
    color: var(--cream);

    text-decoration: none;

    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    transition:
        background-color 0.25s ease,
        transform 0.25s ease;
}

.button:hover {
    background-color: var(--pink);
    transform: translateY(-2px);
}


/* =========================================
   SECTIONS
   ========================================= */

.intro,
.information,
.tickets,
.sponsors {
    padding: 8rem 10%;
}

.intro {
    background-color: var(--green);
    color: var(--cream);
}

.intro h2 {
    color: var(--cream);
}

.information {
    color: var(--dark-green);
}

.tickets {
    background-color: var(--dark-green);
    color: var(--cream);
}

.tickets h2 {
    color: var(--cream);
}

.sponsors {
    color: var(--dark-green);
}


/* =========================================
   INFORMATION LINKS
   ========================================= */

.information-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;

    margin-top: 3rem;
}

.info-card {
    padding: 1.5rem;

    border: 1px solid var(--green);

    color: var(--green);
}

.coming-soon {
    display: block;

    margin-top: 0.4rem;

    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;

    opacity: 0.75;
}


/* Placeholder button (not clickable) until tickets go live */
.button.is-disabled {
    background-color: transparent;
    border: 1px solid var(--cream);
    color: var(--cream);
    cursor: default;
}

.button.is-disabled:hover {
    background-color: transparent;
    transform: none;
}


/* Mailing list line in the Tickets section */
.ticket-alerts {
    margin-top: 2rem;
}

.ticket-alerts a {
    color: var(--cream);
    text-underline-offset: 0.2em;
}

.ticket-alerts a:hover {
    color: var(--pink);
}


/* =========================================
   FOOTER
   ========================================= */

.site-footer {
    padding: 3rem 10%;

    display: flex;
    justify-content: space-between;

    background-color: var(--cream);

    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

.site-footer a {
    color: var(--dark-green);
    text-underline-offset: 0.2em;
}

.site-footer a:hover {
    color: var(--pink);
}


/* =========================================
   404 PAGE
   ========================================= */

.not-found {
    min-height: 100vh;
    min-height: 100svh;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 8rem 2rem 4rem;
}

.not-found h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    color: var(--purple);
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 768px) {

    :root {
        --header-height: 4rem;
    }

    .site-header {
        padding: 0 1.5rem;
    }

    /* Show the menu button, turn the nav into a dropdown */
    .menu-toggle {
        display: flex;
    }

    .site-nav {
        display: none;

        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;

        flex-direction: column;
        gap: 0;

        padding: 0.5rem 1.5rem 1rem;

        background-color: var(--cream);
        border-bottom: 1px solid var(--green);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        padding: 0.9rem 0;
        font-size: 1rem;
    }

    .intro,
    .information,
    .tickets,
    .sponsors {
        padding: 5rem 1.5rem;
    }

    .information-links {
        grid-template-columns: 1fr;
    }

    .site-footer {
        padding: 2rem 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Contact links on their own lines, without the separator dot */
    .site-footer a {
        display: block;
    }

    .site-footer span[aria-hidden="true"] {
        display: none;
    }

    .hero,
    .not-found {
        padding: 7rem 1.5rem 4rem;
    }

    /* Approved design: background scrolls with the page on mobile */
    .hero::before {
        position: absolute;
    }

    .hero-panel {
        width: 100%;
        padding: 3rem 1.5rem;
    }
}
