/* Guest landing (spec 049): "the game box". Self-contained - on a direct load this page has no
   Bootstrap and no components.css, so every rule it needs lives here, scoped to .guest-landing. */

body:has(.guest-landing) {
    margin: 0;
}

/* The landing shows the inline BGG badge in its footer; hide the floating one. */
body:has(.guest-landing) .bgg-attribution:not(.bgg-attribution--inline) {
    display: none;
}

[data-cookie-consent-static][hidden],
[data-cookie-consent-static] [hidden] {
    display: none !important;
}

/* Palette taken from the login page (auth.css) and the signed-in dashboard (home-dashboard.css). */
.guest-landing {
    --gl-bg: var(--tt-page);
    --gl-text: var(--tt-ink);
    --gl-muted: var(--tt-muted);
    --gl-accent: var(--tt-accent);
    --gl-amber: var(--tt-accent);
    --gl-gradient: linear-gradient(135deg, var(--tt-accent-from), var(--tt-accent-to));
    --gl-line: var(--tt-line);
    --gl-surface: var(--tt-area);
    --gl-shadow: none;
    /* Cards keep the one short bottom-left corner of the rest of the app (decorations.css). */
    --gl-radius: 0;
    --gl-pill-bg: var(--tt-field);
    --gl-pill-line: var(--tt-line);
    position: relative;
    min-height: 100vh;
    color: var(--gl-text);
    line-height: 1.55;
    overflow-x: clip;
}

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

/* One class of specificity: beats Bootstrap's element rules (in-app arrival), loses to the .gl-* rules below. */
.guest-landing :where(h1, h2, h3, p, ul, ol) {
    margin: 0;
}

.guest-landing :where(a) {
    color: var(--gl-accent);
}

.guest-landing a:focus-visible,
.guest-landing button:focus-visible,
.guest-landing summary:focus-visible {
    outline: 2px solid var(--gl-amber);
    outline-offset: 3px;
}

.guest-landing > section,
.gl-footer {
    width: min(1080px, 100% - 2rem);
    margin-inline: auto;
}

.guest-landing h2 {
    font-size: clamp(1.45rem, 4vw, 2rem);
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* --- Top bar --- */

.gl-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem max(1rem, (100% - 1080px) / 2);
    border-bottom: 1px solid;
}

.gl-brand {
    flex-shrink: 0;
}

.gl-brand img {
    display: block;
    width: auto;
    height: 30px;
}

.gl-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
}

.gl-lang {
    display: inline-flex;
    border: 1px solid;
    overflow: hidden;
    font-size: 0.78rem;
    font-weight: 700;
}

.gl-lang a {
    padding: 0.4rem 0.5rem;
    text-decoration: none;
}

/* Text links keep a finger-sized hit area (WCAG 2.2 target size). */
.gl-link {
    display: inline-block;
    padding: 0.55rem 0.15rem;
    font-weight: 600;
    text-decoration: none;
}

.gl-link:hover {
    color: var(--tt-accent);
}

/* --- Buttons --- */

.gl-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.gl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9rem;
    padding: 0.65rem 1.3rem;
    border: 1px solid;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gl-btn:hover {
    transform: translateY(-2px);
}

.guest-landing .gl-btn-primary:hover {
    box-shadow: none;
}

.gl-btn-small {
    min-height: 2.2rem;
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
}

/* --- Box cover --- */

.gl-hero {
    position: relative;
    display: grid;
    gap: 1.25rem;
    padding: 1.75rem 0 2rem;
}

/* Site name drawn like the wordmark: light "Board", orange "Conquest", and spec 284's cardboard bar below. */
.gl-hero .gl-title {
    position: relative;
    display: inline-block;
    padding-bottom: 0.32em;
    font-size: clamp(2.3rem, 9vw, 3.8rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--tt-ink);
}

/* A straight bar the length of the name, its ends cut to a point like the cardboard buttons' corners. */
.gl-hero .gl-title::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.08em;
    height: 0.1em;
    background: var(--tt-print, #f2924a);
    clip-path: polygon(0.08em 0, calc(100% - 0.08em) 0, 100% 50%, calc(100% - 0.08em) 100%, 0.08em 100%, 0 50%);
}

.gl-title-accent {
    color: var(--tt-accent);
}

.gl-hero-subtitle {
    max-width: 46ch;
    margin: 1rem 0 1.4rem;
    color: var(--gl-muted);
    font-size: 1.05rem;
}

.gl-table-scene {
    position: absolute;
    top: 0.4rem;
    right: -3.2rem;
    width: 170px;
    opacity: 0.2;
    pointer-events: none;
}

/* Scene colours follow the logo mark: cream card, orange meeple, terracotta and amber. */
.gl-scene-card rect {
    fill: var(--tt-ink);
}

.gl-scene-card .gl-scene-card-inner {
    fill: none;
    stroke: var(--tt-accent);
    stroke-width: 2;
}

.gl-scene-card-mark {
    fill: var(--tt-accent);
}

.gl-scene-card {
    transform: rotate(-9deg);
    transform-origin: 93px 112px;
}

.gl-scene-meeple path {
    fill: var(--gl-amber);
}

.gl-die rect {
    fill: var(--tt-ink);
    stroke: var(--tt-accent);
    stroke-width: 2;
}

.gl-die circle {
    fill: var(--tt-accent);
}

.gl-die {
    transform: rotate(14deg);
    transform-box: fill-box;
    transform-origin: center;
    animation: gl-die-roll 0.9s cubic-bezier(0.2, 0.8, 0.3, 1.1) both;
}

@keyframes gl-die-roll {
    from {
        transform: translate(-120px, -60px) rotate(-200deg);
        opacity: 0;
    }
    to {
        transform: rotate(14deg);
        opacity: 1;
    }
}

/* --- What's in the box: a hand of cards --- */

.gl-components {
    padding: 1rem 0 1.75rem;
}

.gl-hand {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(78%, 290px);
    gap: 0.9rem;
    margin-inline: -1rem;
    padding: 0.5rem 1rem 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
}

.gl-card {
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1rem;
    border: 1px solid;
    transition: transform 0.2s ease;
}

.gl-card-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.gl-card-icon {
    display: inline-flex;
    padding: 0.45rem;
}

.gl-card h3 {
    font-size: 1.05rem;
    line-height: 1.25;
}

.gl-card p {
    color: var(--gl-muted);
    font-size: 0.93rem;
}

.gl-card-shot {
    display: block;
    width: 100%;
    height: auto;
    margin-top: auto;
    border: 1px solid;
    background: var(--tt-field);
}

/* --- Pricing teaser --- */

.gl-pricing {
    padding: 2.25rem 0 0.5rem;
}

.gl-price-cards {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.gl-price-card {
    padding: 1rem 1.1rem;
    border: 1px solid;
}

.gl-price-card h3 {
    font-size: 1.05rem;
}

.gl-price {
    margin: 0.2rem 0 0.4rem;
    color: var(--gl-accent);
    font-size: 1.7rem;
    font-weight: 800;
}

.gl-price span {
    color: var(--gl-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.gl-price-card p:last-child,
.gl-billing-note {
    color: var(--gl-muted);
    font-size: 0.92rem;
}

.gl-billing-note {
    margin-bottom: 0.5rem;
}

/* --- FAQ --- */

.gl-faq {
    padding: 2rem 0 0.5rem;
}

.gl-faq-list {
    border-top: 1px solid;
}

.gl-faq-item {
    border-bottom: 1px solid;
}

.gl-faq-item summary {
    position: relative;
    padding: 0.7rem 2rem 0.7rem 0;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
}

.gl-faq-item summary::-webkit-details-marker {
    display: none;
}

.gl-faq-item summary::after {
    content: "+";
    position: absolute;
    right: 0.25rem;
    top: 0.55rem;
    color: var(--gl-amber);
    font-size: 1.3rem;
    line-height: 1;
}

.gl-faq-item[open] summary::after {
    content: "-";
}

.gl-faq-item p {
    padding-bottom: 0.9rem;
    color: var(--gl-muted);
}

/* --- Your move --- */

.gl-final {
    margin-top: 2rem;
    padding: 2rem 1.3rem;
    border: 1px solid;
    text-align: center;
}

.gl-final h2 {
    font-size: clamp(1.9rem, 6vw, 2.6rem);
    margin-bottom: 0.5rem;
}

.gl-final p {
    margin-bottom: 1.2rem;
    color: var(--gl-muted);
}

.gl-final .gl-actions {
    justify-content: center;
}

/* --- Footer --- */

.gl-footer {
    padding: 2rem 0 2.5rem;
    color: var(--gl-muted);
    font-size: 0.85rem;
    text-align: center;
}

.gl-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1.1rem;
    margin-bottom: 1rem;
}

.gl-footer-links a,
.gl-footer-cookies {
    display: inline-block;
    padding: 0.55rem 0.15rem;
    color: var(--gl-text);
    text-decoration: none;
}

.gl-footer-cookies {
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
}

.gl-footer-links a:hover,
.gl-footer-cookies:hover {
    color: var(--tt-accent);
}

.gl-paddle {
    max-width: 640px;
    margin: 0 auto 1rem;
}

.gl-bgg {
    display: flex;
    justify-content: center;
}

/* --- Wider screens --- */

@media (max-width: 440px) {
    /* Phone: only the mark of the wordmark, so both account actions fit on one line. */
    .gl-brand {
        width: 30px;
        overflow: hidden;
    }

    .gl-topbar-actions {
        gap: 0.45rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 374px) {
    /* Small phones (iPhone SE 1st gen, 360px Androids): tighter top bar, stacked hero buttons. */
    .gl-topbar {
        gap: 0.35rem;
        padding-inline: 0.75rem;
    }

    .gl-topbar-actions {
        gap: 0.3rem;
        font-size: 0.78rem;
    }

    .gl-lang a {
        padding-inline: 0.35rem;
    }

    .gl-topbar .gl-topbar-login {
        padding-inline: 0;
    }

    .gl-btn-small {
        padding-inline: 0.5rem;
    }

    .gl-hero .gl-actions .gl-btn {
        flex: 1 1 100%;
    }
}

@media (min-width: 768px) {
    .gl-hero {
        grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
        align-items: center;
        padding: 4rem 0 3.5rem;
    }

    .gl-table-scene {
        position: static;
        width: 100%;
        max-width: 360px;
        justify-self: center;
        opacity: 1;
    }

    .gl-hand {
        grid-auto-flow: row;
        /* Spec 228 rule 2: six cards, three in a row. */
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 1.6rem;
        margin-inline: 0;
        padding-inline: 0;
        overflow: visible;
    }

    .gl-card:nth-child(3n + 1) { transform: rotate(-2deg) translateY(8px); }
    .gl-card:nth-child(3n + 2) { transform: rotate(0deg); }
    .gl-card:nth-child(3n) { transform: rotate(2deg) translateY(8px); }

    .gl-card:hover {
        transform: translateY(-8px) rotate(0deg);
    }

    /* Spec 227 rule 7: two or three plans side by side. */
    .gl-price-cards {
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .gl-die,
    .gl-btn,
    .gl-card {
        animation: none;
        transition: none;
    }

    .gl-card:hover {
        transform: none;
    }
}
