:root {
    --highlight: #7575ff;
    --shadow: #729ad57a;
    /* Default hero palette — override per page with --hero-a and --hero-b */
    --hero-a: #ccd6e6;
    --hero-b: #8ca2ab;
    /* Fallback computed values (overridden at runtime by hero.js) */
    --color-bg1: rgb(215, 218, 222);
    --color-bg2: rgb(232, 234, 237);
    --color1: 160, 163, 168;
    --color2: 190, 192, 196;
    --color3: 130, 133, 138;
    --color4: 100, 102, 106;
    --color5: 210, 212, 215;
    --color-interactive: 170, 172, 176;
    --circle-size: 120%;
    --blending: hard-light;
}

html,
body {
    font-family: 'Dongle', sans-serif;
    margin: 0;
    padding: 0;
}

.liquid-bg {
    width: 100vw;
    height: max(50vh, 300px);
    position: relative;
    overflow: hidden;
}

.liquid-bg--slim {
    width: 100vw;
    height: max(30vh, 200px);
    position: relative;
    overflow: hidden;
}

.text-container {
    z-index: 9;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    /* opacity: 0.8; */
    user-select: none;
}

.text-container h1 {
    text-shadow: 1px 1px rgba(0, 0, 0, 0.1), 0px 0px 30px rgba(0, 0, 0, 0.3);
    color: white;
    font-size: clamp(28px, 3vw, 40px);
    margin-bottom: 12px;
    margin-top: 0;
}

.text-container p {
    text-shadow: 1px 1px rgba(0, 0, 0, 0.1), 0px 0px 30px rgba(0, 0, 0, 0.3);
    max-width: 80ch;
}

@keyframes moveInCircle {
    0% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(180deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes moveVertical {
    0% {
        transform: translateY(-50%);
    }

    50% {
        transform: translateY(50%);
    }

    100% {
        transform: translateY(-50%);
    }
}

@keyframes moveHorizontal {
    0% {
        transform: translateX(-50%) translateY(-10%);
    }

    50% {
        transform: translateX(50%) translateY(10%);
    }

    100% {
        transform: translateX(-50%) translateY(-10%);
    }
}

.gradient-bg {
    /* Extend ~2x the blur radius beyond the hero on every side so the blurred
       edges fall outside .liquid-bg's overflow:hidden clip — otherwise the
       blur fades to transparent and shows a white fringe at the borders. */
    width: calc(100% + 160px);
    height: calc(100% + 160px);
    position: relative;
    overflow: hidden;
    background: linear-gradient(40deg, var(--color-bg1), var(--color-bg2));
    top: -80px;
    left: -80px;
    /* Soft cloud blur lives here, separate from the SVG goo filter below.
       Chaining url(#goo) and blur() on one element makes Safari drop the
       blur() and render hard-edged blobs. */
    filter: blur(40px);
}

.gradient-bg svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
}

.gradient-bg .gradients-container {
    filter: url(#goo);
    width: 100%;
    height: 100%;
}

.gradient-bg .g1 {
    position: absolute;
    background: radial-gradient(circle at center, rgba(var(--color1), 0.8) 0, rgba(var(--color1), 0) 50%) no-repeat;
    mix-blend-mode: var(--blending);
    width: var(--circle-size);
    height: var(--circle-size);
    top: calc(50% - var(--circle-size) / 2);
    left: calc(50% - var(--circle-size) / 2);
    transform-origin: center center;
    animation: moveVertical 30s ease infinite;
    opacity: 1;
}

.gradient-bg .g2 {
    position: absolute;
    background: radial-gradient(circle at center, rgba(var(--color2), 0.8) 0, rgba(var(--color2), 0) 50%) no-repeat;
    mix-blend-mode: var(--blending);
    width: var(--circle-size);
    height: var(--circle-size);
    top: calc(50% - var(--circle-size) / 2);
    left: calc(50% - var(--circle-size) / 2);
    transform-origin: calc(50% - 400px);
    animation: moveInCircle 20s reverse infinite;
    opacity: 1;
}

.gradient-bg .g3 {
    position: absolute;
    background: radial-gradient(circle at center, rgba(var(--color3), 0.8) 0, rgba(var(--color3), 0) 50%) no-repeat;
    mix-blend-mode: var(--blending);
    width: var(--circle-size);
    height: var(--circle-size);
    top: calc(50% - var(--circle-size) / 2 + 200px);
    left: calc(50% - var(--circle-size) / 2 - 500px);
    transform-origin: calc(50% + 400px);
    animation: moveInCircle 40s linear infinite;
    opacity: 1;
}

.gradient-bg .g4 {
    position: absolute;
    background: radial-gradient(circle at center, rgba(var(--color4), 0.8) 0, rgba(var(--color4), 0) 50%) no-repeat;
    mix-blend-mode: var(--blending);
    width: var(--circle-size);
    height: var(--circle-size);
    top: calc(50% - var(--circle-size) / 2);
    left: calc(50% - var(--circle-size) / 2);
    transform-origin: calc(50% - 200px);
    animation: moveHorizontal 40s ease infinite;
    opacity: 0.7;
}

.gradient-bg .g5 {
    position: absolute;
    background: radial-gradient(circle at center, rgba(var(--color5), 0.8) 0, rgba(var(--color5), 0) 50%) no-repeat;
    mix-blend-mode: var(--blending);
    width: calc(var(--circle-size) * 2);
    height: calc(var(--circle-size) * 2);
    top: calc(50% - var(--circle-size));
    left: calc(50% - var(--circle-size));
    transform-origin: calc(50% - 800px) calc(50% + 200px);
    animation: moveInCircle 20s ease infinite;
    opacity: 1;
}

.gradient-bg .interactive {
    position: absolute;
    background: radial-gradient(circle at center, rgba(var(--color-interactive), 0.8) 0, rgba(var(--color-interactive), 0) 50%) no-repeat;
    mix-blend-mode: var(--blending);
    width: 100%;
    height: 100%;
    top: -50%;
    left: -50%;
    opacity: 0.7;
}


@media (max-width: 768px) {

    :root {
        --circle-size: 180%;
    }

    .liquid-bg {
        height: calc(80vh - var(--navbar-height));
    }

    .liquid-bg--slim {
        height: calc(80vh - var(--navbar-height));
    }

    .text-container h1 {
        font-size: clamp(36px, 10vw, 42px);
        margin-bottom: 16px;
        padding: 0 24px;
    }

    .text-container p {
        font-size: clamp(16px, 4vw, 24px);
        max-width: 90vw;
        padding: 0 24px;
    }

    .glass-btn {
        padding: 12px 28px;
        margin-top: 48px;
        font-size: clamp(26px, 4vw, 36px);
    }
}