/* ============================================================
   Roadside Games — site styles
   Dark asphalt + road-yellow identity, refined.
   ============================================================ */

:root {
    --road-yellow:  #FFD23F;
    --road-amber:   #FFB627;
    --bg:           #0b0b0d;
    --bg-raised:    #141417;
    --bg-card:      #18181c;
    --line:         #2a2a30;
    --text:         #f3f3f5;
    --text-dim:     #a9a9b2;
    --good:         #4ade80;
    --bad:          #f87171;
    --radius:       14px;
    --radius-sm:    9px;
    --maxw:         1100px;
    --ease:         cubic-bezier(.4, 0, .2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Space Grotesk', system-ui, sans-serif; line-height: 1.15; }

a { color: var(--road-yellow); text-decoration: none; }

img { max-width: 100%; display: block; }

:focus-visible {
    outline: 3px solid var(--road-yellow);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--road-yellow);
    color: #000;
    padding: 10px 16px;
    border-radius: 0 0 8px 0;
    z-index: 3000;
    font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Navbar ---------- */
.nav {
    background: rgba(11, 11, 13, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nav__brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.nav__brand img { height: 48px; width: 48px; border-radius: 50%; object-fit: cover; }
.nav__brand-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: .2px;
}

.nav__links { list-style: none; display: flex; gap: 28px; align-items: center; }
.nav__links a {
    color: var(--text-dim);
    font-weight: 500;
    font-size: .98rem;
    position: relative;
    padding: 4px 0;
    transition: color .2s var(--ease);
}
.nav__links a::after {
    content: '';
    position: absolute;
    left: 0; bottom: -2px;
    width: 0; height: 2px;
    background: var(--road-yellow);
    transition: width .25s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 22px;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
}
.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--road-yellow);
    border-radius: 2px;
    transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.hamburger.is-open span:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }

/* Side menu */
.side-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    max-width: 80vw;
    height: 100%;
    background: linear-gradient(180deg, var(--bg-raised), #050506);
    border-left: 1px solid var(--line);
    box-shadow: -8px 0 40px rgba(0, 0, 0, .6);
    transition: right .32s var(--ease);
    padding: 84px 24px 24px;
    z-index: 2000;
    overflow-y: auto;
}
.side-menu.active { right: 0; }
.side-menu ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.side-menu li a {
    display: block;
    color: var(--text);
    font-size: 1.05rem;
    padding: 14px 12px;
    border-radius: var(--radius-sm);
    transition: background .2s var(--ease), color .2s var(--ease);
}
.side-menu li a:hover { background: rgba(255, 210, 63, .1); color: var(--road-yellow); }

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 1500;
    opacity: 0;
    transition: opacity .3s var(--ease);
}
.overlay.active { opacity: 1; }

/* ---------- Layout helpers ---------- */
.section { padding: 88px 24px; }
.section__inner { max-width: var(--maxw); margin: 0 auto; }
.section__head { text-align: center; margin-bottom: 48px; }
.eyebrow {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: .82rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--road-amber);
    margin-bottom: 12px;
}
.section h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--text); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    text-align: center;
    padding: clamp(90px, 16vw, 160px) 24px;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 420px at 50% -10%, rgba(255, 210, 63, .14), transparent 70%),
        repeating-linear-gradient(180deg, transparent 0 38px, rgba(255, 210, 63, .04) 38px 42px);
    pointer-events: none;
    z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 {
    font-size: clamp(2.4rem, 7vw, 4.4rem);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 18px;
}
.hero h1 .accent {
    background: linear-gradient(120deg, var(--road-yellow), var(--road-amber));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p {
    font-size: clamp(1.05rem, 2.4vw, 1.35rem);
    color: var(--text-dim);
    max-width: 540px;
    margin: 0 auto 36px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(120deg, var(--road-yellow), var(--road-amber));
    color: #1a1300;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255, 182, 39, .3); }
.btn:active { transform: translateY(0); }

/* ---------- Game grid ---------- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    max-width: 760px;
    margin: 0 auto;
}
.game-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.game-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 210, 63, .4);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

/* Slider */
.slider { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
.slider__track { display: flex; height: 100%; transition: transform .45s var(--ease); }
.slider__track img { width: 100%; height: 100%; flex: 0 0 100%; object-fit: cover; }

.slider__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, .55);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: grid;
    place-items: center;
    transition: background .2s var(--ease);
    z-index: 4;
}
.slider__arrow:hover { background: rgba(0, 0, 0, .8); }
.slider__arrow--left { left: 10px; }
.slider__arrow--right { right: 10px; }

.slider__dots {
    position: absolute;
    bottom: 10px;
    left: 0; right: 0;
    display: flex;
    justify-content: center;
    gap: 7px;
    z-index: 4;
}
.slider__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .4);
    cursor: pointer;
    padding: 0;
    transition: background .2s var(--ease), transform .2s var(--ease);
}
.slider__dot.is-active { background: var(--road-yellow); transform: scale(1.25); }

/* Card body — always visible (mobile-first; no hover dependency) */
.game-card__body { padding: 22px; }
.game-card__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
.game-card__body h3 { color: var(--road-yellow); font-size: 1.4rem; }
.badge {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--good);
    background: rgba(74, 222, 128, .12);
    border: 1px solid rgba(74, 222, 128, .35);
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.game-card__tagline { color: var(--text); font-weight: 500; margin-bottom: 10px; }
.game-card__desc { color: var(--text-dim); font-size: .96rem; margin-bottom: 16px; }

.platforms { display: flex; flex-wrap: wrap; gap: 8px; }
.platforms span {
    font-size: .82rem;
    color: var(--text-dim);
    background: var(--bg-raised);
    border: 1px solid var(--line);
    padding: 5px 12px;
    border-radius: 999px;
}

/* ---------- About / Contact prose ---------- */
.prose { max-width: 640px; margin: 0 auto; text-align: center; color: var(--text-dim); font-size: 1.08rem; }
.contact-email {
    display: inline-block;
    margin-top: 10px;
    font-size: 1.15rem;
    font-weight: 600;
}

/* Alternating section backgrounds */
.section--alt { background: var(--bg-raised); border-block: 1px solid var(--line); }

/* ---------- Document pages (privacy / terms) ---------- */
.doc { max-width: 820px; margin: 56px auto; padding: 0 24px; }
.doc__card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(24px, 5vw, 48px);
}
.doc h1 { color: var(--text); text-align: center; font-size: clamp(1.8rem, 5vw, 2.4rem); }
.doc__updated { text-align: center; color: var(--text-dim); margin: 12px 0 32px; font-size: .92rem; }
.doc h2 { color: var(--road-yellow); margin-top: 34px; margin-bottom: 12px; font-size: 1.25rem; }
.doc p { color: #d9d9de; margin-bottom: 14px; }
.doc ul { padding-left: 22px; margin: 10px 0 14px; color: #d9d9de; }
.doc li { margin-bottom: 7px; }

/* ---------- Forms (accounts page) ---------- */
.form-wrap { max-width: 460px; margin: 0 auto; }
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px;
    text-align: left;
}
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 8px; font-weight: 500; font-size: .95rem; }
.field input, .field select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg-raised);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color .2s var(--ease);
}
.field input:focus, .field select:focus { border-color: var(--road-yellow); outline: none; }
.field .hint { font-size: .82rem; color: var(--text-dim); margin-top: 6px; }
.form-card .btn { width: 100%; justify-content: center; margin-top: 8px; }

.notice {
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 24px;
    text-align: left;
}
.notice--ok { background: rgba(74, 222, 128, .08); border: 1px solid rgba(74, 222, 128, .4); color: var(--good); }
.notice--err { background: rgba(248, 113, 113, .08); border: 1px solid rgba(248, 113, 113, .4); color: var(--bad); }

/* ---------- Footer ---------- */
.footer {
    background: #060607;
    border-top: 1px solid var(--line);
    padding: 40px 24px;
    margin-top: 40px;
}
.footer__inner { max-width: var(--maxw); margin: 0 auto; text-align: center; }
.footer__brand { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--road-yellow); margin-bottom: 14px; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-bottom: 16px; }
.footer__links a { color: var(--text-dim); font-size: .92rem; transition: color .2s var(--ease); }
.footer__links a:hover { color: var(--road-yellow); }
.footer__copy { color: #6a6a72; font-size: .85rem; }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .nav__links { display: none; }
    .hamburger { display: flex; }
    .nav__brand-text { font-size: 1rem; }
    .section { padding: 64px 20px; }
    .game-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}
