:root {
    --bg: #0a0c0f;
    --fg: #f4f6f8;
    --muted: #aab2bd;
    --accent: #ffd54a;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Flame canvas — full viewport, behind the content */
#flame {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: block;
}

/* Fallback gradient if WebGL is unavailable (toggled via .no-webgl on body) */
body.no-webgl #flame {
    background:
        radial-gradient(
            ellipse 60% 50% at 50% 62%,
            rgba(255, 180, 40, 0.35),
            rgba(255, 100, 20, 0.12) 40%,
            transparent 70%
        );
}

.stage {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    padding: 2rem 1.25rem;
    text-align: center;
}

.logo {
    width: min(46vw, 17rem);
    max-width: 80vw;
    height: auto;
    /* soft dark halo lifts the round emblem off the flame without a hard box */
    filter:
        drop-shadow(0 0 0.5rem rgba(0, 0, 0, 0.75))
        drop-shadow(0 0 2.5rem rgba(0, 0, 0, 0.55));
    user-select: none;
    -webkit-user-drag: none;
}

.tagline {
    margin: 0;
    max-width: 36rem;
    font-size: clamp(1rem, 2.6vw, 1.5rem);
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--fg);
    text-shadow: 0 0.125rem 1rem rgba(0, 0, 0, 0.6);
}

.social {
    display: flex;
    gap: 1.75rem;
    align-items: center;
}

.social__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    color: var(--fg);
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-decoration: none;
    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        color 0.18s ease;
}

.social__link:hover,
.social__link:focus-visible {
    transform: translateY(-0.15rem);
    background-color: rgba(255, 255, 255, 0.14);
    color: var(--accent);
    outline: none;
}

.social__link:focus-visible {
    box-shadow: 0 0 0 0.18rem rgba(255, 213, 74, 0.5);
}

@media (max-width: 30rem) {
    .stage {
        gap: 1.75rem;
    }

    .social__link {
        width: 2.75rem;
        height: 2.75rem;
    }
}

/* Respect reduced-motion: the JS also stops the animation;
   this hides any fallback shimmer and darkens the backdrop. */
@media (prefers-reduced-motion: reduce) {
    #flame {
        opacity: 0.5;
    }
}

/* --- Cookie consent banner (bottom-right card) --- */
/* Single row, vertically centered: cookie image | text | stacked buttons. */
/* `display: flex` below would otherwise override the [hidden] attribute, so this
   explicit rule lets banner.hidden = true actually hide it. */
.cookie-banner[hidden] {
    display: none;
}

.cookie-banner {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 50;
    width: min(31rem, calc(100vw - 2.5rem));
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1.1rem;
    border-radius: 0.9rem;
    background-color: rgba(14, 18, 22, 0.92);
    border: 1px solid rgba(120, 200, 120, 0.28);
    box-shadow:
        0 0.5rem 1.75rem rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: var(--fg);
    animation: cookie-rise 0.35s ease both;
}

.cookie-banner__img {
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    user-select: none;
    -webkit-user-drag: none;
}

/* middle column: the text, taking the available width */
.cookie-banner__body {
    flex: 1 1 auto;
    min-width: 0;
}

@keyframes cookie-rise {
    from {
        opacity: 0;
        transform: translateY(0.75rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-banner__text {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--muted);
}

/* right column: buttons stacked, Accept on top */
.cookie-banner__actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cookie-banner__actions .cookie-btn {
    width: 100%;
}

.cookie-btn {
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.55rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition:
        transform 0.15s ease,
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.cookie-btn:hover,
.cookie-btn:focus-visible {
    transform: translateY(-0.08rem);
    outline: none;
}

.cookie-btn:focus-visible {
    box-shadow: 0 0 0 0.18rem rgba(120, 200, 120, 0.45);
}

/* Reject — quiet, outlined */
.cookie-btn--ghost {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.22);
    color: var(--muted);
}

.cookie-btn--ghost:hover,
.cookie-btn--ghost:focus-visible {
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--fg);
}

/* Accept — solid green/gold accent */
.cookie-btn--solid {
    background-color: #4caf50;
    border-color: #4caf50;
    color: #07140a;
}

.cookie-btn--solid:hover,
.cookie-btn--solid:focus-visible {
    background-color: #5cc35f;
    border-color: #5cc35f;
}

@media (max-width: 30rem) {
    /* On phones, stack: [icon + text] on top, buttons side-by-side below.
       Pin to the bottom with safe-area padding and cap height so it never
       overflows off-screen. */
    .cookie-banner {
        right: 0.75rem;
        left: 0.75rem;
        bottom: max(0.75rem, env(safe-area-inset-bottom));
        width: auto;
        flex-wrap: wrap;
        gap: 0.6rem 0.75rem;
        max-height: calc(100vh - 1.5rem);
        max-height: calc(100dvh - 1.5rem);
        overflow-y: auto;
    }

    .cookie-banner__body {
        /* take the rest of the first row, next to the icon */
        flex: 1 1 8rem;
    }

    .cookie-banner__actions {
        /* drop to a full-width second row, buttons side by side */
        flex: 1 1 100%;
        flex-direction: row;
    }

    .cookie-banner__actions .cookie-btn {
        flex: 1 1 0;
    }
}
