/* Reset, typography and the small components every page shares. */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: "Inter", system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}
h1,
h2,
h3,
.display {
    font-family: "Bricolage Grotesque", "Inter", sans-serif;
    letter-spacing: -0.02em;
    line-height: 1.02;
}
a {
    color: inherit;
    text-decoration: none;
}
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}
.mono {
    font-family: "DM Mono", monospace;
}

/* ---------- layout rails ---------- */
.wrap {
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: 22px;
}
/* a game board gets more room than the site's reading width */
.wrap-wide {
    max-width: var(--maxw-wide);
    margin-inline: auto;
    padding-inline: 22px;
}

/* baseplate stud texture */
.baseplate {
    background-image: radial-gradient(
        circle at center,
        rgba(27, 34, 64, 0.08) 2.4px,
        transparent 2.6px
    );
    background-size: 26px 26px;
    background-position: 9px 9px;
}

/* ---------- shared components ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: "DM Mono", monospace;
    font-size: 12.5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--blue-deep);
    background: var(--tint);
    padding: 7px 13px;
    border-radius: 999px;
    font-weight: 500;
}
.eyebrow b {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--teal);
}

/* highlighter stroke behind a word — sizes itself to the text it wraps */
.hl {
    position: relative;
    white-space: nowrap;
    z-index: 1;
}
.hl::after {
    content: "";
    position: absolute;
    left: -2px;
    right: -2px;
    bottom: 0.1em;
    height: 0.22em;
    background: var(--yellow);
    z-index: -1;
    border-radius: 3px;
    transform: rotate(-1deg);
}

.btn-primary {
    background: var(--blue);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    padding: 15px 26px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    box-shadow: 0 8px 20px -8px rgba(47, 107, 255, 0.7);
    transition:
        transform 0.15s,
        box-shadow 0.15s;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -10px rgba(47, 107, 255, 0.8);
}
.btn-ghost {
    background: var(--surface);
    border: 1.5px solid var(--line);
    font-weight: 600;
    font-size: 16px;
    padding: 15px 24px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    transition:
        border-color 0.15s,
        transform 0.15s;
}
.btn-ghost:hover {
    border-color: var(--ink);
    transform: translateY(-2px);
}

/* ---------- section heading ---------- */
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 46px 0 22px;
    flex-wrap: wrap;
}
.section-head h2 {
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 700;
}
.section-head p {
    color: var(--ink-soft);
    font-size: 15px;
    margin-top: 6px;
}

/* pill filters — used by the shop grid and the games hub */
.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.filter {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-soft);
    padding: 8px 15px;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    background: var(--surface);
    transition: all 0.15s;
}
.filter:hover {
    color: var(--ink);
}
.filter.on {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

/* skill chips — "what this game grows", on cards and on a game page */
.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.skill {
    font-family: "DM Mono", monospace;
    font-size: 11.5px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--blue-deep);
    background: var(--tint);
    border-radius: 999px;
    padding: 6px 11px;
}

/* ---------- motion ---------- */
:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
    border-radius: 4px;
}
.reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
.reveal.d1 {
    animation-delay: 0.06s;
}
.reveal.d2 {
    animation-delay: 0.12s;
}
.reveal.d3 {
    animation-delay: 0.18s;
}
@keyframes rise {
    to {
        opacity: 1;
        transform: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}
