/* ============================================================
   ODD BIT — CGA-inspired theme (Mode 4, high-intensity palette)
   Display: Bungee · Body: Space Mono
   ============================================================ */

:root {
    /* Surfaces — CGA black */
    --bg: #07070d;
    --bg-2: #0e0e1a;
    --panel: #141426;

    /* Ink — CGA white / light gray */
    --ink: #ffffff;
    --ink-dim: #aaaaaa;

    /* Accents — CGA high-intensity cyan/magenta */
    --magenta: #ff55ff;
    --cyan: #55ffff;

    /* Lines & shadow */
    --line: rgba(85, 255, 255, 0.16);
    --shadow: #000000;

    --header-h: 74px;
    --transition: 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

body {
    font-family: 'Space Mono', monospace;
    background-color: var(--bg);
    background-image: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 42%, var(--bg) 100%);
    background-attachment: fixed;
    color: var(--ink);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Bungee', cursive;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: 0.5px;
    line-height: 1.1;
    text-transform: uppercase;
}

a {
    color: inherit;
}

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

.container {
    width: 90%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---------- Full-page decorative overlays ---------- */
.fx-scanlines,
.fx-grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
}

.fx-scanlines {
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.22) 0px,
        rgba(0, 0, 0, 0.22) 1px,
        transparent 1px,
        transparent 3px
    );
    opacity: 0.4;
    mix-blend-mode: multiply;
}

.fx-grain {
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    font-family: 'Bungee', cursive;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 14px 26px;
    border: 2px solid var(--ink);
    background: var(--panel);
    color: var(--ink);
    cursor: pointer;
    box-shadow: 4px 4px 0 var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition), background 0.2s ease, color 0.2s ease;
}

.btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--shadow);
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--shadow);
}

.btn-primary {
    background: var(--magenta);
    color: var(--bg);
    border-color: var(--ink);
}

.btn-primary:hover {
    box-shadow: 6px 6px 0 var(--cyan);
}

.btn-sm {
    font-size: 0.7rem;
    padding: 10px 18px;
}

/* ---------- Header ---------- */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(7, 7, 13, 0.78);
    backdrop-filter: blur(8px);
    border-bottom: 2px solid var(--line);
    transition: padding 0.3s ease, background 0.3s ease;
}

.header-bar {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#site-header.scrolled {
    background: rgba(7, 7, 13, 0.56);
    border-bottom-color: var(--magenta);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Bungee', cursive;
    font-size: 1.5rem;
    color: var(--ink);
    text-decoration: none;
}

.logo-bit {
    color: var(--magenta);
}

.logo-mark {
    width: 36px;
    height: 36px;
    color: var(--cyan);
    transition: transform var(--transition);
}

.logo-mark-face {
    fill: #243345;
    stroke: currentColor;
    stroke-width: 1.5;
}

.logo-mark-cap,
.logo-mark-ear {
    fill: #42596c;
    stroke: currentColor;
    stroke-width: 1;
}

.logo-mark-eye {
    fill: var(--ink);
    stroke: currentColor;
    stroke-width: 1.2;
}

.logo-mark-pupil {
    fill: var(--bg);
}

.logo:hover .logo-mark {
    transform: translateY(-3px);
}

nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

nav ul li a {
    position: relative;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--ink);
    padding: 4px 0;
    transition: color 0.2s ease;
}

nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 3px;
    background: var(--magenta);
    transition: width var(--transition);
}

nav ul li a:hover {
    color: var(--magenta);
}

nav ul li a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--ink);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--header-h) 0 60px;
    overflow: hidden;
}

.hero-boot,
.games-boot,
.about-boot {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(7, 7, 13, 0.94) 0%, rgba(7, 7, 13, 0.72) 50%, rgba(7, 7, 13, 0.40) 100%),
        linear-gradient(180deg, rgba(85, 255, 255, 0.06) 0%, transparent 45%, rgba(255, 85, 255, 0.04) 100%);
}

.hero-boot-text,
.games-boot-text,
.about-boot-text {
    filter: blur(5px);
    position: absolute;
    top: calc(var(--header-h) + 8px);
    left: clamp(-8px, -0.6vw, 0px);
    width: max-content;
    min-width: 150vw;
    margin: 0;
    color: rgba(170, 170, 170, 0.1);
    font-family: 'Space Mono', monospace;
    font-size: clamp(1rem, 4.3vh, 2.6rem);
    font-weight: bold;
    line-height: 1.05;
    letter-spacing: 0.025em;
    white-space: pre;
    text-shadow: 0 0 18px rgba(85, 255, 255, 0.08);
    transform: none;
}

.hero-boot::after,
.games-boot::after,
.about-boot::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(7, 7, 13, 0.10) 0%, rgba(7, 7, 13, 0.52) 100%),
        linear-gradient(-90deg, rgba(7, 7, 13, 0.70) 0%, rgba(7, 7, 13, 0.18) 62%, transparent 100%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 780px;
}

.hero-kicker {
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 22px;
}

.hero-title {
    font-size: clamp(3.2rem, 13vw, 8rem);
    color: var(--ink);
    text-shadow:
        5px 5px 0 var(--magenta),
        10px 10px 0 var(--cyan);
    margin-bottom: 26px;
}

.hero-sub {
    font-family: 'Space Mono', monospace;
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    font-weight: 700;
    text-transform: none;
    color: var(--cyan);
    max-width: 620px;
    margin-bottom: 18px;
}

.press-start {
    display: inline-block;
    margin-top: 30px;
    font-family: 'Bungee', cursive;
    font-size: clamp(1.6rem, 4.5vw, 2.8rem);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--magenta);
    text-shadow: 3px 3px 0 var(--shadow);
    animation: blink 0.6s steps(2) infinite;
    transition: color 0.2s ease, transform var(--transition);
}

.press-start:hover {
    color: var(--cyan);
    transform: translateX(6px);
    animation: none;
}

/* ---------- Ticker ---------- */
.ticker {
    background: var(--magenta);
    border-top: 2px solid var(--bg);
    border-bottom: 2px solid var(--bg);
    overflow: hidden;
    white-space: nowrap;
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: ticker 24s linear infinite;
    will-change: transform;
}

.ticker-track span {
    flex: 0 0 auto;
    font-family: 'Bungee', cursive;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--bg);
    padding: 12px 0;
}

/* ---------- Sections ---------- */
section {
    padding: 110px 0;
}

.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 64px;
}

.eyebrow {
    display: inline-block;
    font-family: 'Bungee', cursive;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--bg);
    background: var(--cyan);
    padding: 5px 12px;
    margin-bottom: 18px;
}

.section-head h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 18px;
}

.section-head p {
    color: var(--ink-dim);
    font-size: 1.02rem;
}

/* ---------- Games (alternating horizontal bands) ---------- */
#games,
#about {
    position: relative;
    overflow: hidden;
}

#games > .container,
#about > .container {
    position: relative;
    z-index: 1;
}

.game-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.game-row {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    background: var(--bg-2);
    border: 2px solid var(--ink);
    box-shadow: 6px 6px 0 var(--shadow);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.game-row:hover {
    transform: translate(-3px, -3px);
    box-shadow: 9px 9px 0 var(--magenta);
}

.row-media {
    position: relative;
    min-height: 300px;
    overflow: hidden;
    border-right: 2px solid var(--ink);
}

.row-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.05);
    transition: transform 0.4s ease;
}

.game-row:hover .row-media img {
    transform: scale(1.04);
}

.badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 1;
    font-family: 'Bungee', cursive;
    font-size: 0.62rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 11px;
    border: 2px solid var(--bg);
}

.badge-live {
    background: var(--magenta);
    color: var(--bg);
}

.badge-dev {
    background: var(--cyan);
    color: var(--bg);
}

.badge-soon {
    background: var(--ink);
    color: var(--bg);
}

.row-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 38px 42px;
}

.row-body h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.7rem;
}

.row-body h3 i {
    color: var(--magenta);
    font-size: 1.2rem;
}

.row-body p {
    color: var(--ink-dim);
    font-size: 0.9rem;
    line-height: 1.7;
}

.row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    padding-top: 20px;
    border-top: 2px dashed var(--line);
}

.row-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--ink-dim);
}

.row-meta span i {
    color: var(--cyan);
}

/* Stack on narrow screens (image always on top) */
@media (max-width: 768px) {
    .game-row {
        grid-template-columns: 1fr;
    }

    .game-row .row-media {
        min-height: 220px;
        border-right: none;
        border-bottom: 2px solid var(--ink);
    }

    .game-row .row-body {
        padding: 30px 26px;
    }
}

/* ---------- About ---------- */
.about-content {
    max-width: 760px;
    margin: 0 auto;
}

.about-content p {
    color: var(--ink-dim);
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 1.5em;
}

.about-content p:first-child::first-letter {
    font-family: 'Bungee', cursive;
    font-size: 3rem;
    float: left;
    line-height: 1;
    padding: 4px 14px 0 0;
    color: var(--magenta);
}

/* ---------- Contact ---------- */
.large-link {
    text-align: center;
    font-family: 'Bungee', cursive;
    font-size: clamp(1.3rem, 4vw, 2.4rem);
    overflow-wrap: anywhere;
}

.large-link a {
    display: inline-block;
    color: var(--ink);
    text-decoration: none;
    padding: 18px 28px;
    border: 2px dashed var(--cyan);
    transition: color 0.2s ease, background 0.2s ease, transform var(--transition);
}

.large-link a i {
    color: var(--magenta);
    margin-right: 8px;
}

.large-link a:hover {
    color: var(--bg);
    background: var(--cyan);
    transform: translateY(-4px);
}

.large-link a:hover i {
    color: var(--bg);
}

/* ---------- Footer ---------- */
footer {
    background: var(--bg-2);
    border-top: 2px solid var(--magenta);
    padding: 70px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h3 {
    position: relative;
    font-size: 1.15rem;
    padding-bottom: 12px;
    margin-bottom: 22px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 42px;
    height: 4px;
    background: var(--magenta);
}

.footer-col p {
    color: var(--ink-dim);
    font-size: 0.9rem;
    margin-bottom: 22px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--ink);
    border: 2px solid var(--line);
    transition: transform var(--transition), background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.social-links a:hover {
    transform: translateY(-4px);
    background: var(--magenta);
    color: var(--bg);
    border-color: var(--bg);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a,
.footer-links span {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--ink-dim);
    text-decoration: none;
    transition: color 0.2s ease, transform var(--transition);
}

.footer-links a i,
.footer-links span i {
    font-size: 0.7rem;
    color: var(--cyan);
}

.footer-links a:hover {
    color: var(--magenta);
    transform: translateX(5px);
}

.copyright {
    text-align: center;
    padding-top: 28px;
    border-top: 2px solid var(--line);
    color: var(--ink-dim);
    font-size: 0.82rem;
}

/* ---------- Scroll reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered hero entrance */
.hero .reveal.visible { transition-delay: 0s; }
.hero-title.visible { transition-delay: 0.08s; }
.hero-sub.visible { transition-delay: 0.16s; }
.press-start.visible { transition-delay: 0.24s; }

/* ---------- Animations ---------- */
@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@keyframes ticker {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-50%, 0, 0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    #site-nav {
        position: fixed;
        top: var(--header-h);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-h));
        background: var(--bg-2);
        border-right: none;
        transition: left 0.3s ease;
    }

    #site-nav.open {
        left: 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 30px 0;
    }

    nav ul li {
        margin: 16px 0;
    }

    nav ul li a {
        font-size: 1.1rem;
    }

    section {
        padding: 80px 0;
    }

    .hero {
        padding-top: calc(var(--header-h) + 20px);
    }

    .hero-boot-text,
    .games-boot-text,
    .about-boot-text {
        top: calc(var(--header-h) + 10px);
        left: -4px;
        min-width: 220vw;
        font-size: clamp(1.02rem, 4.2vh, 2.2rem);
        line-height: 1.05;
        opacity: 0.82;
    }
}

@media (max-width: 576px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        text-shadow:
            3px 3px 0 var(--magenta),
            6px 6px 0 var(--cyan);
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
