/* ============================================================
   DAVE'S GAME ARENA
   Main Site Styles

   Clean retro game-developer aesthetic.
   The site provides the frame; the games provide the personality.
   ============================================================ */


/* ============================================================
   VARIABLES
   ============================================================ */

:root {
    --page: #eee9dc;
    --paper: #fffdf7;

    --ink: #182238;
    --text: #30394a;
    --muted: #6c7280;

    --blue: #2856a3;
    --blue-dark: #18376d;
    --blue-darker: #10284f;
    --blue-light: #dbe5f3;

    --red: #c83e35;

    --line: #c9c4b8;
    --line-light: #ddd8cc;

    --max-width: 1100px;
}


/* ============================================================
   RESET / BASE
   ============================================================ */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--text);

    font-family: Verdana, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}


img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}


/* ============================================================
   HEADER
   ============================================================ */

.site-header {
    background: var(--blue);
    color: white;

    border-bottom: 5px solid var(--blue-dark);
}

.header-inner {
    width: min(100% - 40px, var(--max-width));

    margin: 0 auto;

    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;

    min-height: 115px;

    padding-top: 28px;
}


/* ============================================================
   SITE LOGO
   ============================================================ */

/* Site name */

.site-logo {
    display: block;
    padding-bottom: 25px;

    color: white;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 28px;
    font-weight: bold;

    line-height: 1;
    letter-spacing: -0.5px;

    /* NO uppercase transform */
}





/* ============================================================
   NAVIGATION
   ============================================================ */

.site-nav {
    display: flex;
    align-items: stretch;

    align-self: flex-end;
}

/* Navigation */

.site-nav a {
    display: flex;
    align-items: center;

    min-height: 50px;
    padding: 0 20px;

    border-left: 1px solid rgba(255, 255, 255, 0.16);

    color: white;

    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;

    letter-spacing: 0;

    /* NO uppercase transform */
}

.site-nav a:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.site-nav a:hover {
    background: var(--blue-dark);
    color: white;
}

.site-nav a.active {
    background: var(--paper);
    color: var(--blue-dark);
}


/* ============================================================
   MAIN
   ============================================================ */

main {
    display: block;
}


/* ============================================================
   HERO
   ============================================================ */

.hero {
    background: var(--paper);

    border-bottom: 1px solid var(--line);
}

.hero-inner {
    width: min(100% - 40px, var(--max-width));

    margin: 0 auto;

    padding: 68px 0 72px;

    text-align: center;
}


/* Little hero intro */

.hero-eyebrow {
    margin-bottom: 10px;

    color: var(--red);

    font-size: 11px;
    font-weight: bold;

    letter-spacing: 0;

    text-transform: none;
}

/* Main hero title */

.hero h1 {
    margin: 0;

    color: var(--ink);

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(40px, 5vw, 58px);
    font-weight: normal;

    line-height: 1.1;
    letter-spacing: -1px;

    text-transform: none;
}


/* Hero tagline */

.hero-tagline {
    margin: 18px 0 0;

    color: var(--blue);

    font-family: Verdana, Arial, sans-serif;
    font-size: 18px;
    font-weight: bold;
}


/* Hero description */

.hero-description {
    max-width: 590px;

    margin: 15px auto 0;

    color: var(--muted);

    font-size: 16px;
}


/* ============================================================
   BUTTONS
   ============================================================ */

/* Buttons */

.button {
    display: inline-block;

    margin-top: 28px;
    padding: 10px 18px;

    border: 1px solid var(--blue);

    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;

    letter-spacing: 0;

    text-transform: none;
}

.button:hover {
    background: var(--blue);
    color: white;
}


/* Primary button intentionally isn't a giant modern CTA */

.button-primary {
    background: var(--blue);
    color: white;
}

.button-primary:hover {
    background: var(--blue-dark);
    border-color: var(--blue-dark);
}


/* ============================================================
   GENERAL SECTION LAYOUT
   ============================================================ */

.section-inner {
    width: min(100% - 40px, var(--max-width));

    margin: 0 auto;
}


/* ============================================================
   GAMES SECTION
   ============================================================ */

.games-section {
    padding: 55px 0 80px;

    background: var(--page);
}


/* ============================================================
   SECTION HEADING
   ============================================================ */

.section-heading {
    margin-bottom: 25px;
}

/* Section eyebrow */

.section-label {
    display: block;

    margin-bottom: 3px;

    color: var(--red);

    font-size: 11px;
    font-weight: bold;

    letter-spacing: 0;

    text-transform: none;
}

.section-heading h2 {
    margin: 0;

    color: var(--ink);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    font-weight: normal;

    line-height: 1.15;
    letter-spacing: 0;

    text-transform: none;
}

.section-heading h2::after {
    content: "";

    display: block;

    width: 50px;
    height: 4px;

    margin-top: 10px;

    background: var(--blue);
}

.section-heading p {
    max-width: 600px;

    margin: 15px 0 0;

    color: var(--muted);

    font-size: 14px;
}


/* ============================================================
   GAME GRID

   Despite the name, this isn't intended to look like a modern
   "card grid." Games are displayed more like catalog/editorial
   entries.
   ============================================================ */

.game-grid {
    display: block;
}


/* ============================================================
   GAME ENTRY
   ============================================================ */

.game-card {
    display: grid;

    grid-template-columns:
        minmax(0, 1.55fr)
        minmax(260px, 0.75fr);

    gap: 38px;

    padding: 28px 0 45px;

    border-bottom: 1px solid var(--line);
}


.game-card h3 {
    margin: 0;

    color: var(--blue-dark);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
    font-weight: normal;

    line-height: 1.2;
    letter-spacing: 0;

    text-transform: none;
}


/* First game gets a top border */

.game-card:first-child {
    border-top: 1px solid var(--line);

    padding-top: 35px;
}


/* ============================================================
   GAME IMAGE
   ============================================================ */

.game-image {
    display: block;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    background: #111;

    border: 6px solid var(--paper);

    outline: 1px solid var(--line);

    box-shadow:
        2px 3px 0 rgba(0, 0, 0, 0.08);
}

.game-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 0.2s ease;
}

.game-image:hover img {
    transform: scale(1.015);
}


/* ============================================================
   TEMPORARY GAME IMAGE PLACEHOLDER
   ============================================================ */

.image-placeholder {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        repeating-linear-gradient(
            -45deg,
            #263d68,
            #263d68 12px,
            #2d4778 12px,
            #2d4778 24px
        );

    color: rgba(255, 255, 255, 0.75);

    font-size: 15px;
    font-weight: 800;

    letter-spacing: 1.5px;

    text-transform: uppercase;
}


/* ============================================================
   GAME INFORMATION
   ============================================================ */

.game-card-body {
    align-self: center;

    padding: 10px 0;
}


/* Small game category */

.game-meta {
    margin-bottom: 6px;

    color: var(--red);

    font-size: 10px;
    font-weight: bold;

    letter-spacing: 0;

    text-transform: none;
}


/* View game */




/* Game title */

.game-card h3 {
    margin: 0;

    color: var(--blue-dark);

    font-size: 30px;
    font-weight: 900;

    line-height: 1.1;

    letter-spacing: -0.5px;

    text-transform: uppercase;
}

.game-card h3 a {
    color: inherit;
}

.game-card h3 a:hover {
    color: var(--red);
}


/* Game description */

.game-card p {
    margin: 15px 0 20px;

    color: var(--muted);

    font-size: 15px;
    line-height: 1.65;
}


/* ============================================================
   VIEW GAME LINK
   ============================================================ */
.game-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: var(--red);

    font-size: 12px;
    font-weight: bold;

    letter-spacing: 0;

    text-transform: none;
}

.game-link span {
    font-size: 17px;

    transition: transform 0.12s ease;
}

.game-link:hover {
    color: var(--blue-dark);
}

.game-link:hover span {
    transform: translateX(4px);
}


/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    background: var(--blue-dark);

    color: white;

    border-top: 5px solid var(--blue-darker);

    padding: 35px 0;
}

.footer-inner {
    width: min(100% - 40px, var(--max-width));

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}

.site-footer strong {
    font-size: 13px;
    font-weight: 800;

    letter-spacing: 0.8px;

    text-transform: uppercase;
}

.site-footer p {
    margin: 3px 0 0;

    color: rgba(255, 255, 255, 0.65);

    font-size: 12px;
}

.footer-copy {
    color: rgba(255, 255, 255, 0.55);

    font-size: 11px;
}


/* ============================================================
   TEXT SELECTION
   ============================================================ */

::selection {
    background: var(--blue);
    color: white;
}


/* ============================================================
   RESPONSIVE - TABLET
   ============================================================ */

@media (max-width: 800px) {

    /* HEADER */

    .header-inner {
        width: 100%;

        min-height: 0;

        padding-top: 0;

        display: block;
    }

    .site-logo {
        padding: 25px 20px 22px;

        font-size: 26px;
    }

    .site-nav {
        width: 100%;

        overflow-x: auto;

        background: var(--blue-dark);
    }

    .site-nav a {
        flex: 0 0 auto;

        min-height: 48px;

        padding: 0 17px;

        white-space: nowrap;
    }


    /* HERO */

    .hero-inner {
        padding: 55px 0 60px;
    }

    .hero h1 {
        letter-spacing: -1px;
    }


    /* GAMES */

    .games-section {
        padding: 45px 0 65px;
    }

    .game-card {
        grid-template-columns: 1fr;

        gap: 20px;

        padding: 30px 0 40px;
    }

    .game-card-body {
        padding: 0;
    }


    /* FOOTER */

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;

        gap: 15px;
    }

}


/* ============================================================
   RESPONSIVE - PHONE
   ============================================================ */

@media (max-width: 480px) {

    .hero-inner,
    .section-inner,
    .footer-inner {
        width: calc(100% - 28px);
    }


    /* HERO */

    .hero-inner {
        padding: 45px 0 50px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero-tagline {
        font-size: 18px;
    }

    .hero-description {
        font-size: 14px;
    }


    /* SECTION */

    .games-section {
        padding-top: 38px;
    }

    .section-heading h2 {
        font-size: 28px;
    }


    /* GAME */

    .game-image {
        border-width: 4px;
    }

    .game-card h3 {
        font-size: 26px;
    }

    .game-card p {
        font-size: 14px;
    }

}