/* Shared styles for content pages (about, rules, leaderboards).
   Follows the site's light/dark theme from layout.njk. */

html[data-theme="dark"] {
    --surface: #1c1d24;
    --surface-2: #25262f;
    --border: #2e3039;
    --text-muted: #9aa0ab;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --ink: #ececef;
    --ink-text: #141418;
    --accent: #8fb3d9;
}

html[data-theme="light"] {
    --surface: #ffffff;
    --surface-2: #f1f2f4;
    --border: #e1e3e8;
    --text-muted: #6b7280;
    --shadow: 0 1px 2px rgba(17, 24, 39, 0.06);
    --ink: #18181b;
    --ink-text: #ffffff;
    --accent: #3b6ea5;
}

:root {
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --gold: #f5c542;
    --silver: #c3cad5;
    --bronze: #d08a4f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    line-height: 1.55;
}

.page {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 24px 16px 64px;
}

/* === Header === */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: inherit;
    text-decoration: none;
    font-size: 0.95rem;
    transition: border-color 0.2s var(--ease), transform 0.15s var(--ease);
}

.back:hover {
    border-color: var(--accent);
    transform: translateX(-2px);
}

.page-header {
    text-align: center;
    margin-bottom: 36px;
    animation: fadeUp 0.4s var(--ease) both;
}

.page-header h1 {
    margin: 0 0 8px;
    font-size: clamp(1.6rem, 4vw, 2.1rem);
    font-weight: 650;
    letter-spacing: -0.02em;
}

.page-header p {
    margin: 0 auto;
    max-width: 600px;
    color: var(--text-muted);
    font-size: 1rem;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* === Cards === */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.muted {
    color: var(--text-muted);
}

h2.section-title {
    margin: 44px 0 6px;
    font-size: 1.25rem;
    font-weight: 650;
    letter-spacing: -0.01em;
}

p.section-intro {
    margin: 0 0 24px;
    color: var(--text-muted);
    max-width: 720px;
}

/* === Pills (tabs / jump links) === */
.pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
}

.pill {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: inherit;
    font: inherit;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition:
        border-color 0.2s var(--ease),
        background-color 0.2s var(--ease),
        color 0.2s var(--ease),
        transform 0.1s var(--ease);
}

.pill:hover {
    border-color: var(--text-muted);
}

.pill:active {
    transform: scale(0.97);
}

.pill.active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--ink-text);
    font-weight: 600;
}

/* === Buttons === */
.btn-primary {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 8px;
    background: var(--ink);
    color: var(--ink-text);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: filter 0.2s var(--ease), transform 0.15s var(--ease);
}

.btn-primary:hover {
    opacity: 0.88;
}

/* === Staggered entrance === */
.stagger > * {
    animation: fadeUp 0.45s var(--ease) both;
}

.stagger > *:nth-child(2) { animation-delay: 0.05s; }
.stagger > *:nth-child(3) { animation-delay: 0.1s; }
.stagger > *:nth-child(4) { animation-delay: 0.15s; }
.stagger > *:nth-child(5) { animation-delay: 0.2s; }
.stagger > *:nth-child(6) { animation-delay: 0.25s; }

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
