@font-face {
    font-family: "Inter";
    src: url("../fonts/Inter.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Lilita One";
    src: url("../fonts/LilitaOne-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

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

:root {
    --fg: #111;
    --muted: #888;
    --border: #e5e5e5;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background: #fff;
    color: var(--fg);
    font-size: 16px;
    line-height: 1.6;
    font-weight: 550;
    font-optical-sizing: none;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* ── LINKS ── */
a {
    color: var(--fg);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
    transition: color 0.2s, border-color 0.2s;
}

a:hover {
    color: var(--muted);
    border-color: var(--muted);
}

/* ── FOOTER ── */
footer {
    text-align: center;
    padding: 3rem 2rem;
    font-size: 12px;
    color: var(--muted);
    border-top: 1px solid var(--border);
}

footer a {
    color: var(--muted);
}

footer a:hover {
    color: var(--muted);
    border-color: transparent;
}

/* ── SUBPAGES ── */
.page {
    max-width: 520px;
    margin: 0 auto;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 2rem;
}

.back {
    position: fixed;
    top: 1.5rem;
    left: 2rem;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    border: none;
    padding: 0;
    transition: color 0.2s;
    z-index: 10;
}

.back:hover {
    color: var(--fg);
    border-color: transparent;
}

.page h1 {
    font-size: 11.2px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2rem;
}

.page h2 {
    font-size: 11.2px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.page p {
    margin-bottom: 1rem;
}

.not-found-page {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(4rem, 8vw, 8rem) 2rem 6rem;
    text-align: center;
}

.not-found-page p {
    max-width: 36rem;
    margin: 0 auto 1rem;
    color: var(--fg);
}


.updated {
    font-size: 12.8px;
    color: var(--muted);
    margin-bottom: 2.5rem;
}


/* ── RESPONSIVE ── */
@media (max-width: 600px) {
    .page {
        padding: 5rem 1.5rem;
    }

    .back {
        position: static;
        display: block;
        width: 100%;
        text-align: left;
        padding: 1rem 1.5rem 0 1.5rem;
    }
}

/* ── OUTLINE BUTTON ── */
.btn-outline {
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.5rem 1.25rem;
    border-radius: 2px;
    cursor: pointer;
    background: none;
    color: var(--muted);
    border: 1px solid var(--border);
    transition: color 0.2s, border-color 0.2s;
}

.btn-outline:hover {
    color: var(--fg);
    border-color: var(--muted);
}

/* ── FOOTER LINKS ── */
footer a {
    white-space: nowrap;
}

.f-item + .f-item::before {
    content: "·";
    margin: 0 0.6em;
    color: var(--muted);
}

/* ── HOME: full-screen gem wall (the game's board cells + plain gems) + logo. The footer bar sits below the fold and is only reached by scrolling. ── */
.hero {
    position: relative;
    height: 100vh;
    height: 100lvh; /* large viewport: stable while mobile browser toolbars show/hide, so the footer never peeks in */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #5c61b8; /* the game's board tray colour, shown until the wall image loads */
}

/* soft dark glow behind the logo so it reads on the light cells */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 50% 48% at 50% 50%, rgba(40, 28, 110, 0.78) 0%, rgba(40, 28, 110, 0.62) 45%, rgba(40, 28, 110, 0) 100%);
}

.hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-logo img {
    display: block;
    width: min(78vw, 600px);
    height: auto;
}

/* ── LEGAL BOX (mobile only; desktop keeps the full footer) ── */
.legal-box {
    display: none;
}

/* ── MOBILE / VERY NARROW WINDOWS ── */
@media (max-width: 600px) {
    /* home: 4-gem-wide wall (always exactly 4 gems across), logo a bit higher */
    .hero {
        padding-bottom: 16vh;
        /* width is always 100% of the screen = exactly 4 gems; height follows (repeats if the screen is taller than the image) */
        background: #5c61b8 url("../images/gems-bg-mobile.webp") center top / 100% auto repeat-y;
    }

    /* the <img> only exists so the browser picks the mobile file early; the wall is drawn as the background above */
    .hero-img {
        display: none;
    }

    .hero::after {
        background: radial-gradient(ellipse 75% 34% at 50% 42%, rgba(40, 28, 110, 0.78) 0%, rgba(40, 28, 110, 0.62) 45%, rgba(40, 28, 110, 0) 100%);
    }

    /* Legal becomes its own small box, like on 1137labs; only © + Imprint stay in the bottom bar */
    .legal-box {
        display: block;
        padding: 4rem 2rem;
        border-top: 1px solid var(--border);
    }

    .legal-box h2 {
        font-size: 11.2px;
        font-weight: 600;
        letter-spacing: 0.2em;
        text-transform: uppercase;
        color: var(--muted);
        margin-bottom: 2rem;
    }

    .legal-box p {
        color: var(--fg);
        margin-bottom: 1rem;
    }

    .legal-box p:last-child {
        margin-bottom: 0;
    }

    footer .f-legal {
        display: none;
    }
}

/* ── STORE BADGES (under the title; title keeps its centred position) ── */
.hero-content {
    position: relative;
    z-index: 1; /* above the glow */
}

.store-badges {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: clamp(1.2rem, 3vw, 2.2rem);
    display: flex;
    gap: 0.75rem;
    white-space: nowrap;
}

.store-badges a {
    display: block;
    transition: transform 0.12s ease;
}

.store-badges a:hover {
    transform: translateY(-2px);
}

.store-badges a:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
    border-radius: 8px;
}

.store-badges img {
    display: block;
    height: clamp(44px, 4.6vw, 60px);
    width: auto;
}

@media (max-width: 600px) {
    .store-badges {
        gap: 0.5rem;
    }

    .store-badges img {
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .store-badges a {
        transition: none;
    }
}

/* ── COOKIE BANNER ── */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    z-index: 1000;
    font-size: 12.8px;
    color: var(--muted);
}

#cookie-banner p {
    margin: 0;
    line-height: 1.5;
}

#cookie-banner a {
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

#cookie-banner a:hover {
    color: var(--fg);
    border-color: var(--muted);
}

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-banner-actions button {
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.5rem 1.25rem;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

#cookie-decline {
    background: var(--fg);
    color: #fff;
    border: 1px solid var(--fg);
}

#cookie-decline:hover {
    background: #333;
    border-color: #333;
}

#cookie-accept {
    background: var(--fg);
    color: #fff;
    border: 1px solid var(--fg);
}

#cookie-accept:hover {
    background: #333;
    border-color: #333;
}

@media (max-width: 600px) {
    #cookie-banner {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        padding: 0.85rem 1.25rem;
    }
}


.text-center {
    text-align: center;
}

/* "Coming soon" line under the title, until the store badges can go back in */
.coming-soon {
    margin-top: 1.5rem;
    text-align: center;
    font-family: "Lilita One", "Inter", sans-serif;
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    letter-spacing: 0.04em;
    color: #fff;
    text-shadow: 0 2px 0 #3b1670, 0 3px 8px rgba(0, 0, 0, 0.45); /* logo's deep purple, so it reads on the light cells */
}
