:root {
    /* Light theme palette */
    --color-primary: #ffffff; /* surfaces */
    --color-primary-transparent: #00000014; /* subtle on-light hover tint */
    --color-secondary: #111111; /* primary text */
    --color-secondary-invert: #ffffff; /* text on dark buttons */
    --color-secondary-link: #555555; /* links and subdued text */
    --color-johnny-jump-up-primary: #D91C38;
    --color-jenny-lay-back-primary: #6AC351;
    --color-jimmy-kickstart-primary: #07857D;
    --color-jinnie-the-witch-primary: #787878;
    --color-acv: white;
    --color-border: #e6e6e6; /* light divider */

    --color-shadow: rgba(0, 0, 0, 0.12);

    /* Unified rounding token for cards and buttons */
    --brand-rounding: 1.5rem;

    font-family: sans-serif;

    --main-width: 120rem;

    --shadow: 0 6px 16px var(--color-shadow);
}

/* Brand heading font */
@font-face {
    font-family: "Manx Cider 2024";
    src: url("../font/manx-cider-2024-font.ttf?17") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

/* Apply brand font to all headings */
h1, h2, h3, h4, h5, h6 {
    font-family: "Manx Cider 2024", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    text-transform: uppercase;
    margin: 0;
}

@media (max-width: 120rem) {
    :root {
        --brand-rounding: 0rem;
    }
}

* {
    box-sizing: border-box;
}

html,
body,
div,
header,
nav,
main,
footer {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
}

body {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--color-primary);
    color: var(--color-secondary);
    /* Cider-themed wallpaper with subtle light overlay for a brighter look */
    background-image: linear-gradient(180deg, #FFFFFFCC, #FFFFFFB3), url("/assets/img/acv/apple-cider-vinegar-2023-11-27-04-49-30-utc-mcc.jpeg?17");
    background-attachment: fixed;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

main {
    display: flex;
    flex: 1 1 auto;
    width: min(var(--main-width), 100%);
    flex-direction: column;
    align-items: center;

    gap: 1rem;
    margin: 1rem auto;

    & > section {
        width: 100%;
    }
}

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

& a.link:hover {
    background-color: var(--color-primary-transparent);
}

a:hover {
    h1, h2 {
        text-decoration: none;
        color: var(--color-secondary);
    }
}


header {
    display: flex;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-primary);
    position: relative;

    & > div.spacer {
        flex: 1 1 auto;
    }

    a {
        align-items: center;
        display: flex;
        padding: 0 1rem;

        & h1 {
            font-style: normal;
            font-weight: 400;
            letter-spacing: .06rem;
            line-height: 1.2;
            word-break: break-word;
            font-size: 2.3rem;
            color: var(--color-secondary-link);
            padding: 1rem;
        }

        & > h2 {
            font-style: normal;
            font-weight: 400;
            letter-spacing: .06rem;
            word-break: break-word;
            font-size: 1.4rem;

        }
    }

    .hamburger {
        display: none;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        background: none;
        border: none;
        padding: 1rem;
        cursor: pointer;
        z-index: 1001;

        span {
            display: block;
            width: 24px;
            height: 2px;
            background-color: var(--color-secondary);
            transition: transform 0.3s ease, opacity 0.3s ease;
        }

        &[aria-expanded="true"] span:nth-child(1) {
            transform: translateY(6px) rotate(45deg);
        }

        &[aria-expanded="true"] span:nth-child(2) {
            opacity: 0;
        }

        &[aria-expanded="true"] span:nth-child(3) {
            transform: translateY(-6px) rotate(-45deg);
        }
    }

    .nav-links {
        display: flex;
        flex-direction: row;
    }

    @media (max-width: 60rem) {
        h1.header {
            padding: 0 !important;
        }

        .hamburger {
            display: flex;
        }

        .nav-links {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            flex-direction: column;
            background-color: var(--color-primary);
            border-bottom: 1px solid var(--color-border);
            z-index: 1000;

            &.active {
                display: flex;
            }

            a {
                padding: 1rem;
                border-bottom: 1px solid var(--color-border);

                &:last-child {
                    border-bottom: none;
                }

                &.nav-text-link h2 {
                    font-size: 1rem;
                    font-family: sans-serif;
                    text-transform: none;
                    font-weight: normal;
                }
            }
        }
    }
}

footer {

    display: flex;
    width: 100%;
    color: var(--color-secondary);
    background-color: var(--color-primary);
    border-top: 1px solid var(--color-border);
    align-items: center;
    justify-content: center;

    div {
        flex: 1 1 auto;
        display: flex;
        max-width: var(--main-width);
        flex-wrap: wrap;
        justify-content: space-between;
        align-content: center;

        section {
            display: flex;
            gap: 1rem;
            margin: 1rem;

            .social-icons__icon-wrapper {
                display: inline-flex;
                align-items: center;
                line-height: 0;
                color: var(--color-secondary-link);

                a {
                    display: inline-flex;
                    align-items: center;
                    justify-content: center;
                    border-radius: 50%;
                    line-height: 0;

                    & > svg {
                        width: 1.25rem;
                        height: 1.25rem;
                        display: block;
                    }
                }
            }
        }
    }

}

img.responsive {
    max-width: 100%;
    height: auto;
}

.btn {
    display: inline-block;
    padding: .75rem 1.25rem;
    border-radius: var(--brand-rounding);
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid transparent;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-secondary);
    color: var(--color-secondary-invert);
}

.btn-primary:hover {
    background: #e6e6e6;
    color: var(--color-secondary); /* ensure contrast on light hover */
}

.btn-secondary {
    background: transparent;
    color: var(--color-secondary);
    border-color: var(--color-secondary-link);
}

.btn-secondary:hover {
    border-color: var(--color-secondary);
}

.rounded {
    border-radius: var(--brand-rounding);
}

.background-color-primary {
    background-color: var(--color-primary);
}

.background-color-secondary{
    background-color: var(--color-secondary);
}

.unselectable {
    -webkit-user-select: none; /* Safari, Chrome, Edge */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;    /* Internet Explorer 10+ */
    user-select: none;        /* Standard syntax */
}

/* Accessibility helper */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}