/* ==========================================================================
   Flames Games — shared styles
   Palette: #53c937 accent (used sparingly) + black / white / gray
   ========================================================================== */

:root {
    --accent: #53c937;
    --accent-dark: #3fa428;
    --ink: #1a1a1a;
    --ink-soft: #444;
    --muted: #6b6b6b;
    --line: #e6e6e6;
    --surface: #ffffff;
    --surface-alt: #f6f7f6;
    --bg: #ffffff;
    --radius: 12px;
    --maxw: 1120px;
    --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
        Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    color: var(--ink);
    background-color: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--accent-dark);
    text-decoration: none;
    transition: color .15s ease;
}

a:hover {
    color: var(--accent);
    text-decoration: underline;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ------- Layout helpers ------- */
.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

/* ------- Header ------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 68px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--ink);
}

.brand:hover {
    text-decoration: none;
    color: var(--ink);
}

.brand img {
    height: 34px;
    width: auto;
    display: block;
}

.brand span {
    font-size: 1.05rem;
}

.nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav a {
    color: var(--ink-soft);
    font-size: .93rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    position: relative;
}

.nav a:hover {
    color: var(--ink);
    background: var(--surface-alt);
    text-decoration: none;
}

.nav a.active {
    color: var(--ink);
}

.nav a.active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
}

/* Hamburger */
.nav-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    content: "";
    display: block;
    width: 18px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle span {
    position: relative;
}

.nav-toggle span::before {
    position: absolute;
    top: -6px;
}

.nav-toggle span::after {
    position: absolute;
    top: 6px;
}

.nav-toggle[aria-expanded="true"] span {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
    top: 0;
    transform: rotate(-45deg);
}

/* ------- Main ------- */
main {
    flex: 1;
}

/* Hero (home) */
.hero {
    padding: 96px 0 80px;
    text-align: center;
}

.eyebrow {
    display: inline-block;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent-dark);
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    margin-bottom: 22px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.12;
    letter-spacing: -.02em;
    margin: 0 0 20px;
    color: var(--ink);
}

.hero h1 .accent {
    color: var(--accent-dark);
}

.hero p {
    font-size: clamp(1rem, 2.2vw, 1.18rem);
    color: var(--ink-soft);
    max-width: 720px;
    margin: 0 auto 16px;
}

.hero .lede {
    color: var(--muted);
    font-size: 1rem;
    max-width: 640px;
}

/* Feature row */
.features {
    padding: 8px 0 72px;
}

.features .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: left;
}

.card h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: var(--ink);
}

.card h3::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 3px;
    background: var(--accent);
    margin-right: 10px;
    vertical-align: middle;
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: .95rem;
}

/* ------- Buttons ------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: .95rem;
    padding: 12px 22px;
    border-radius: 10px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.btn:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}

.btn-ghost:hover {
    background: var(--surface-alt);
    color: var(--ink);
    border-color: var(--line);
}

/* ------- Legal / document pages ------- */
.doc {
    padding: 56px 0 72px;
}

.doc .container {
    max-width: 820px;
}

.doc-head {
    border-bottom: 1px solid var(--line);
    padding-bottom: 24px;
    margin-bottom: 8px;
}

.doc-head h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    letter-spacing: -.02em;
    margin: 0 0 10px;
    color: var(--ink);
}

.doc-meta {
    color: var(--muted);
    font-size: .9rem;
    margin: 0;
}

.doc-meta strong {
    color: var(--ink-soft);
    font-weight: 600;
}

.doc h2 {
    font-size: 1.25rem;
    letter-spacing: -.01em;
    margin: 40px 0 12px;
    padding-top: 6px;
    color: var(--ink);
}

.doc h2 .num {
    color: var(--accent-dark);
    font-variant-numeric: tabular-nums;
    margin-right: 10px;
}

.doc p,
.doc li {
    color: var(--ink-soft);
    font-size: 1rem;
}

.doc ul {
    padding-left: 22px;
}

.doc li {
    margin: 6px 0;
}

.doc li::marker {
    color: var(--accent);
}

.doc strong {
    color: var(--ink);
}

.callout {
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    padding: 16px 20px;
    margin: 24px 0;
}

.callout p {
    margin: 0;
    font-size: .95rem;
}

/* ------- Footer ------- */
.site-footer {
    border-top: 1px solid var(--line);
    background: var(--surface-alt);
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    padding-top: 28px;
    padding-bottom: 28px;
}

.site-footer .foot-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--ink);
}

.site-footer .foot-brand img {
    height: 24px;
}

.site-footer nav {
    margin-left: auto;
    display: flex;
    gap: 18px;
}

.site-footer nav a {
    color: var(--muted);
    font-size: .9rem;
}

.site-footer nav a:hover {
    color: var(--accent-dark);
    text-decoration: none;
}

.site-footer .copy {
    width: 100%;
    color: var(--muted);
    font-size: .85rem;
    margin: 0;
    padding-top: 6px;
    border-top: 1px solid var(--line);
    margin-top: 6px;
    padding-top: 18px;
}

/* ------- Responsive ------- */
@media (max-width: 860px) {
    .features .grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 68px;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        padding: 10px 16px 16px;
        margin: 0;
        display: none;
    }

    .nav.open {
        display: flex;
    }

    .nav a {
        padding: 12px 14px;
    }

    .nav a.active::after {
        display: none;
    }

    .nav a.active {
        background: var(--surface-alt);
    }

    .hero {
        padding: 64px 0 56px;
    }

    .site-footer nav {
        margin-left: 0;
        width: 100%;
    }
}
