/* ---- Global reset / tokens ---- */
:root {
    --frootcake-color-bg: #ffffff;
    --frootcake-color-text: #1a1a1a;
    --frootcake-color-accent: #6d4aff;
    
    /*
        Sets the gradient. Used only for logo atm
    */
    --frootcake-logo-bubble:#FF5CB8;
    --frootcake-logo-bubble-edge:#C70988;

    --frootcake-color-pink: #FF5CB8;
    --frootcake-color-pink-edge: #C70988;

    --frootcake-max-width: 1200px;
    --frootcake-space-unit: 8px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: Karantina, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---- Header ---- */
.site-header {
    position: relative;   /* anchor for the absolutely-positioned circles */
    overflow: hidden;     /* clip circles that bleed past the header edge */
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: var(--frootcake-color-bg);
}

/* ---- Circle pinned behind the site logo ----
   Anchored to .site-branding, so it tracks the logo wherever it is —
   no matter its size, replacements, or wrapping on mobile. */
.site-branding {
    position: relative; /* anchor for the pseudo-element */
    isolation: isolate; /* creates a stacking context scoped to the logo */
}

.site-branding::before {
    content: "";
    position: absolute;
    z-index: -1;        /* behind the logo link, above the header bg */
    width: 430px;
    height: 430px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* centre on the logo */

    /* Same radial gradient treatment as the other circles */
    background: radial-gradient(
        circle at 50% 50%,
        var(--frootcake-logo-bubble) 0%,
        var(--frootcake-logo-bubble-edge) 100%
    );
    opacity: 0.55;
    border-radius: 50%;
    pointer-events: none; /* clicks pass through to the logo */
}

/* The content row paints ON TOP of the circles. Without this
   position:relative, the logo/nav could end up underneath them. */
.site-header__inner {
    position: relative;
    max-width: var(--frootcake-max-width);
    margin-inline: auto;
    padding: calc(var(--frootcake-space-unit) * 3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(var(--frootcake-space-unit) * 4);
    flex-wrap: wrap; /* stacks gracefully on small screens */
}

.custom-logo-link img {
    display: block;
    height: auto;
    max-height: 96px; /* adjust to taste */
    width: auto;
}

/* ---- Primary navigation ---- */
.main-nav ul {
    display: flex;
    gap: calc(var(--frootcake-space-unit) * 3);
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ---- Circle behind each top-level menu item ---- */
.main-nav > ul > li {
    position: relative; /* anchor for the pseudo-element */
    isolation: isolate; /* keeps the circle behind this item's link */
    padding-inline: calc(var(--frootcake-space-unit) * 2);
}

.main-nav > ul > li::before {
    content: "";
    position: absolute;
    z-index: -1;               /* behind the link text */
    inset: 50% auto auto 50%;  /* start at the item's centre… */
    transform: translate(-50%, -50%); /* …and centre on it */

    width: 56px;               /* circle diameter */
    height: 56px;
    border-radius: 50%;
    background: radial-gradient(
        circle at 50% 50%,
        var(--frootcake-color-pink) 0%,
        var(--frootcake-color-pink-edge) 70%
    );
    opacity: 0.5;
    pointer-events: none;      /* clicks pass through to the link */

    transition: transform 0.25s ease, opacity 0.25s ease;
}

.main-nav a {
    position: relative; /* NEW — guarantees link text paints above circle */
    text-decoration: none;
    color: var(--frootcake-color-text);
    font-weight: 500;
}

.main-nav a:hover,
.main-nav .current-menu-item > a {
    color: var(--frootcake-color-accent);
}

/* Small-screen fallback: simply wraps thanks to flex-wrap above. */