
@font-face {
    font-family: "GameFont";
    src: url("fonts/Awesome%209.ttf");
    font-weight: normal;
    font-style: normal;
}

:root {
    --background: #11110f;
    --paper: #d8d3c5;
    --paper-dark: #aaa596;
    --ink: #171714;
    --screen: #151813;
    --screen-light: #242920;
    --border: 3px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 40px 20px;

    background-color: var(--background);
    background-image: url("assets/tlwrbg.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    color: var(--ink);
    font-family: "GameFont", monospace;
    min-height: 100vh;
}

/* CRT SCANLINES */

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;

    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.08) 0px,
        rgba(0, 0, 0, 0.08) 1px,
        transparent 1px,
        transparent 4px
    );

    z-index: 100;
}

.scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99;
    opacity: 0.25;

    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0, 0, 0, 0.2) 4px
    );
}

/* PAGE LAYOUT */

.page {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
}

/* MAIN BOXES */

.title-box,
.summary-box,
.information-box {
    background: var(--paper);
    border: var(--border) solid var(--ink);

    box-shadow: 6px 6px 0 var(--paper-dark);
}

.title-box {
    padding: 25px 30px;
    margin-bottom: 40px;
    text-align: center;
}

.title-box h1 {
    margin: 0;
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    font-weight: normal;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* SUMMARY */

.summary-box {
    padding: 35px;
    margin-bottom: 45px;
    transform: rotate(0.3deg);
}

.summary-box h2 {
    margin: 0 0 25px;
    font-size: 2rem;
    font-weight: normal;
    text-transform: uppercase;
    border-bottom: 2px solid var(--ink);
    padding-bottom: 10px;
}

.summary-box p {
    max-width: 800px;
    margin: 12px 0;
    font-size: 1rem;
    line-height: 1.7;
}

.summary-box a {
    color: var(--ink);
}

/* NAVIGATION BUTTONS */

.links {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 50px;
}

.info-button {
    width: 220px;
    min-height: 130px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
    background: var(--paper);
    border: var(--border) solid var(--ink);
    box-shadow: 6px 6px 0 var(--paper-dark);

    color: var(--ink);
    text-decoration: none;
    font-size: 1.4rem;

    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.info-button:hover {
    transform: translate(5px, 5px);
    box-shadow: 1px 1px 0 var(--paper-dark);
}

/* GAME */

.game-section {
    width: 100%;
    margin-bottom: 50px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 12px 18px;

    background: var(--paper);
    border: var(--border) solid var(--ink);
    border-bottom: none;

    font-size: 0.9rem;
}

.game-container {
    width: 100%;
    aspect-ratio: 16 / 9;

    background: var(--screen);
    border: var(--border) solid var(--ink);

    overflow: hidden;
    position: relative;
}

.game-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* INFORMATION SECTIONS */

.information-box {
    padding: 35px;
    margin-bottom: 45px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 20px;

    border-bottom: 2px solid var(--ink);
    margin-bottom: 30px;
}

.section-heading span {
    font-size: 0.9rem;
}

.section-heading h2 {
    margin: 0;
    padding-bottom: 10px;
    font-size: 2rem;
    font-weight: normal;
}

/* ZINE */

.zine-section .section-heading {
    border-bottom: 2px solid aliceblue;
}

.zine-section .section-heading span,
.zine-section p,
.zine-section h2 {
    color: aliceblue;
}

.zine-section h2 {
    margin: 0;
    padding-bottom: 10px;
    font-size: 2rem;
    font-weight: normal;
}

.zine-viewer {
    width: 100%;
    height: 700px;

    border: 3px solid var(--ink);
    background: var(--screen);
    overflow: hidden;
}

.zine-viewer iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.zine-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
}

.zine-button {
    display: inline-block;
    padding: 15px 25px;

    background: var(--paper);
    border: 3px solid var(--ink);
    color: var(--ink);
    text-decoration: none;

    box-shadow: 5px 5px 0 var(--paper-dark);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.zine-button:hover {
    transform: translate(4px, 4px);
    box-shadow: 1px 1px 0 var(--paper-dark);
}

/* CONTROLS */

.controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.control {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control p {
    margin: 0;
    font-size: 0.8rem;
}

.key {
    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    font-size: 1.1rem;
}

.key.wide {
    width: 65px;
}

/* ASSET GALLERY */

.asset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.asset {
    aspect-ratio: 4 / 3;
    background: var(--screen);
    border: 3px solid var(--ink);
    overflow: hidden;
    cursor: pointer;
    transition: 0.2s ease;
}

.asset img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: 0.2s ease;
}

.asset:hover {
    transform: translateY(-5px);
    box-shadow: 5px 5px 0 var(--paper-dark);
}

.asset:hover img {
    transform: scale(1.04);
}

/* IMAGE LIGHTBOX */

.lightbox {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 50px;
    background: rgba(0, 0, 0, 0.92);

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;

    z-index: 1000;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;

    border: 3px solid var(--paper);
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.5);
}

.close-button {
    position: absolute;
    top: 25px;
    right: 35px;

    width: 55px;
    height: 55px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--paper);
    border: 3px solid var(--ink);
    color: var(--ink);

    font-family: "GameFont", monospace;
    font-size: 2rem;
    line-height: 1;

    cursor: pointer;
    box-shadow: 5px 5px 0 var(--paper-dark);
}

.close-button:hover {
    transform: translate(4px, 4px);
    box-shadow: 1px 1px 0 var(--paper-dark);
}

.no-scroll {
    overflow: hidden;
}

/* MOBILE WARNING
   Hidden by default on ALL devices.
   JavaScript only adds .visible when it detects mobile. */

.mobile-warning {
    display: none;

    position: fixed;
    inset: 0;
    z-index: 2000;

    align-items: center;
    justify-content: center;

    padding: 20px;
    overflow-y: auto;

    background: rgba(17, 17, 15, 0.96);

    background-image: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.12) 0px,
        rgba(0, 0, 0, 0.12) 1px,
        transparent 1px,
        transparent 4px
    );
}

.mobile-warning.visible {
    display: flex;
}

.mobile-warning.dismissed {
    display: none;
}

.mobile-warning-box {
    width: 100%;
    max-width: 420px;
    flex-shrink: 0;

    background: var(--paper);
    color: var(--ink);

    border: 3px solid var(--ink);
    box-shadow: 8px 8px 0 var(--paper-dark);
}

.mobile-warning-header {
    padding: 12px 16px;

    background: var(--ink);
    color: var(--paper);

    border-bottom: 3px solid var(--ink);

    font-size: 0.85rem;
    letter-spacing: 2px;
}

.mobile-warning-content {
    padding: 28px 24px;
    text-align: center;
}

.warning-label {
    margin: 0 0 12px;
    font-size: 0.7rem;
    letter-spacing: 2px;
}

.mobile-warning-content h2 {
    margin: 0 0 22px;
    font-size: clamp(2rem, 9vw, 3rem);
    font-weight: normal;
    letter-spacing: 2px;
}

.mobile-warning-content p {
    font-size: 0.95rem;
    line-height: 1.7;
}

.warning-divider {
    height: 2px;
    background: var(--ink);
    margin: 24px 0 16px;
}

.mobile-warning-content .warning-small {
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.warning-button {
    width: 100%;
    margin-top: 16px;
    padding: 16px 12px;

    background: var(--ink);
    color: var(--paper);

    border: 3px solid var(--ink);
    box-shadow: 5px 5px 0 var(--paper-dark);

    font-family: "GameFont", monospace;
    font-size: 0.9rem;

    cursor: pointer;

    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.warning-button:hover {
    transform: translate(4px, 4px);
    box-shadow: 1px 1px 0 var(--paper-dark);
}

.warning-button:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 5px;
}

/* FOOTER */

footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;

    padding: 25px 0 10px;

    font-size: 0.75rem;
    color: var(--paper);
}

/* TABLET AND MOBILE LAYOUT */

@media (max-width: 700px) {
    body {
        padding: 20px 10px;
        background-attachment: scroll;
        background-position: center top;
    }

    .page {
        width: 100%;
    }

    .title-box {
        padding: 20px 15px;
    }

    .summary-box,
    .information-box {
        padding: 22px;
    }

    .links {
        gap: 15px;
    }

    .info-button {
        width: 50%;
        min-height: 100px;
        font-size: 1rem;
    }

    .game-header {
        font-size: 0.7rem;
    }

    .controls {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .asset-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lightbox {
        padding: 20px;
    }

    .lightbox img {
        max-width: 95vw;
        max-height: 85vh;
    }

    .close-button {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }

    .zine-viewer {
        height: 500px;
    }

    .zine-buttons {
        flex-wrap: wrap;
    }
}

/* SMALL PHONES */

@media (max-width: 450px) {
    .links {
        flex-direction: column;
        align-items: center;
    }

    .info-button {
        width: 100%;
    }

    .controls {
        grid-template-columns: 1fr;
    }

    .asset-grid {
        grid-template-columns: 1fr;
    }

    .mobile-warning-content {
        padding: 22px 18px;
    }

    .mobile-warning-content h2 {
        font-size: 2rem;
    }

    .mobile-warning-content p {
        font-size: 0.85rem;
    }

    .zine-viewer {
        height: 400px;
    }

    footer {
        font-size: 0.65rem;
    }
}
