/* =========================================================
   THE THREE-LEGGED STAG
   Website Stylesheet

   Visual direction:
   - dark highland atmosphere
   - mist and old stone
   - TLS sand and burnt copper
   - subtle blue-white Aelthir resonance
   - minimal, cinematic presentation
   ========================================================= */


/* ---------------------------------------------------------
   1. GLOBAL VARIABLES
   --------------------------------------------------------- */

:root {
    --black: #050708;
    --deep-black: #080b0e;
    --navy-black: #0b1219;
    --stone-dark: #151a1e;
    --stone-mid: #252c31;

    --text-main: #ece8dc;
    --text-soft: #b9bbb7;
    --text-muted: #83898c;

    /* TLS branding */
    --sand: #ddcda5;
    --sand-light: #eee2c2;

    --copper: #c87536;
    --copper-light: #dc955a;
    --copper-dark: #75411f;

    /* Ancient resonance */
    --aelthir-blue: #b8d9df;
    --aelthir-glow: rgba(184, 217, 223, 0.18);

    --border-soft: rgba(200, 117, 54, 0.28);
    --border-sand: rgba(221, 205, 165, 0.20);

    --content-width: 900px;
}


/* ---------------------------------------------------------
   2. BASIC RESET
   --------------------------------------------------------- */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    background:
        radial-gradient(
            circle at 50% 8%,
            rgba(35, 49, 57, 0.22),
            transparent 43%
        ),
        linear-gradient(
            180deg,
            #0b1015 0%,
            var(--black) 55%,
            #040506 100%
        );

    color: var(--text-main);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    line-height: 1.7;

    overflow-x: hidden;
}


/* Accessible text that remains available to screen readers */

.sr-only {
    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;
}


/* ---------------------------------------------------------
   3. GLOBAL TYPOGRAPHY
   --------------------------------------------------------- */

h1,
h2,
p {
    margin-top: 0;
}

h2 {
    margin-bottom: 22px;

    color: var(--text-main);

    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;

    line-height: 1.1;

    letter-spacing: 0.02em;
}

p {
    color: var(--text-soft);
}


/* ---------------------------------------------------------
   4. HERO
   --------------------------------------------------------- */

.hero {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 100vh;

    padding: 72px 28px;

    overflow: hidden;

    isolation: isolate;

    border-bottom: 1px solid var(--border-soft);
}


/* Soft distant resonance light */

.hero::before {
    content: "";

    position: absolute;
    z-index: -2;

    width: 950px;
    height: 950px;

    left: 50%;
    top: 46%;

    transform: translate(-50%, -50%);

    background:
        radial-gradient(
            circle,
            rgba(184, 217, 223, 0.09) 0%,
            rgba(184, 217, 223, 0.025) 32%,
            transparent 68%
        );

    pointer-events: none;
}


/* Moving lower mist */

.hero::after {
    content: "";

    position: absolute;
    z-index: -1;

    left: -20%;
    right: -20%;
    bottom: -8%;

    height: 48%;

    background:
        radial-gradient(
            ellipse at 20% 70%,
            rgba(200, 210, 214, 0.08),
            transparent 50%
        ),
        radial-gradient(
            ellipse at 65% 45%,
            rgba(180, 195, 200, 0.07),
            transparent 55%
        ),
        radial-gradient(
            ellipse at 90% 75%,
            rgba(210, 215, 218, 0.05),
            transparent 45%
        );

    filter: blur(22px);

    opacity: 0.75;

    animation: mistDrift 18s ease-in-out infinite alternate;

    pointer-events: none;
}


.hero-content {
    width: min(100%, 1050px);

    text-align: center;
}


/* ---------------------------------------------------------
   5. HERO BRANDING
   --------------------------------------------------------- */

.hero-emblem {
    display: block;

    width: min(100%, 740px);
    height: auto;

    margin:
        10px
        auto
        30px;

    filter:
        drop-shadow(0 18px 38px rgba(0, 0, 0, 0.48));

    user-select: none;
}


.eyebrow {
    margin-bottom: 24px;

    color: var(--copper-light);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 0.77rem;
    font-weight: 600;

    letter-spacing: 0.32em;

    text-transform: uppercase;

    opacity: 0.88;
}


.intro {
    max-width: 600px;

    margin:
        0
        auto
        38px;

    color: var(--text-soft);

    font-size: clamp(1rem, 2vw, 1.2rem);

    letter-spacing: 0.02em;
}


/* ---------------------------------------------------------
   6. ENTER THE MIST BUTTON
   --------------------------------------------------------- */

.mist-button {
    display: inline-block;

    padding: 14px 30px;

    border: 1px solid rgba(200, 117, 54, 0.72);

    background:
        linear-gradient(
            180deg,
            rgba(200, 117, 54, 0.10),
            rgba(200, 117, 54, 0.025)
        );

    color: var(--sand);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 0.76rem;
    font-weight: 600;

    letter-spacing: 0.25em;

    text-decoration: none;
    text-transform: uppercase;

    transition:
        background 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease;
}


.mist-button:hover {
    background: rgba(200, 117, 54, 0.16);

    color: var(--sand-light);

    border-color: var(--copper-light);

    box-shadow:
        0 0 28px rgba(200, 117, 54, 0.14);

    transform: translateY(-2px);
}


.mist-button:focus-visible {
    outline: 2px solid var(--aelthir-blue);
    outline-offset: 5px;
}


/* ---------------------------------------------------------
   7. GENERAL SECTION LAYOUT
   --------------------------------------------------------- */

main {
    position: relative;
}

.mist-section,
.about-section {
    position: relative;

    display: flex;
    justify-content: center;

    padding: 120px 28px;
}


.section-content {
    width: min(100%, var(--content-width));

    margin: 0 auto;
}


/* ---------------------------------------------------------
   8. STAG IN THE MIST SECTION
   --------------------------------------------------------- */

.mist-section {
    min-height: 85vh;

    align-items: center;

    text-align: center;

    background:
        radial-gradient(
            ellipse at 50% 22%,
            rgba(58, 76, 84, 0.16),
            transparent 52%
        ),
        linear-gradient(
            180deg,
            rgba(11, 16, 21, 0.92),
            rgba(7, 9, 11, 0.99)
        );

    border-bottom:
        1px solid rgba(255, 255, 255, 0.05);
}


.section-label {
    margin-bottom: 18px;

    color: var(--copper-light);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 0.72rem;
    font-weight: 600;

    letter-spacing: 0.3em;

    text-transform: uppercase;
}


.game-intro {
    max-width: 650px;

    margin:
        0
        auto
        48px;

    font-size: 1.05rem;
}


/* ---------------------------------------------------------
   9. GAME SHELL
   --------------------------------------------------------- */

.game-shell {
    width: min(100%, 840px);

    margin: 0 auto;

    border:
        1px solid rgba(200, 117, 54, 0.24);

    background:
        rgba(5, 8, 10, 0.74);

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.32),
        inset 0 0 70px rgba(0, 0, 0, 0.28);

    overflow: hidden;
}


/* ---------------------------------------------------------
   10. GAME TOOLBAR
   --------------------------------------------------------- */

.game-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    min-height: 70px;

    padding:
        14px
        20px;

    border-bottom:
        1px solid rgba(221, 205, 165, 0.11);

    background:
        linear-gradient(
            180deg,
            rgba(20, 27, 31, 0.72),
            rgba(9, 12, 14, 0.82)
        );
}


#game-status {
    margin: 0;

    color: var(--sand);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 0.76rem;
    font-weight: 600;

    letter-spacing: 0.16em;

    text-transform: uppercase;
}


/* ---------------------------------------------------------
   11. GAME BUTTON
   --------------------------------------------------------- */

.game-button {
    appearance: none;

    padding:
        10px
        18px;

    border:
        1px solid rgba(200, 117, 54, 0.58);

    background:
        rgba(200, 117, 54, 0.07);

    color: var(--sand);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 0.68rem;
    font-weight: 600;

    letter-spacing: 0.17em;

    text-transform: uppercase;

    cursor: pointer;

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        box-shadow 0.25s ease;
}


.game-button:hover {
    background:
        rgba(200, 117, 54, 0.15);

    border-color:
        var(--copper-light);

    color:
        var(--sand-light);

    box-shadow:
        0 0 20px rgba(200, 117, 54, 0.11);
}


.game-button:focus-visible {
    outline:
        2px solid var(--aelthir-blue);

    outline-offset: 4px;
}


/* ---------------------------------------------------------
   12. GAME STAGE
   --------------------------------------------------------- */

.game-stage {
    position: relative;

    width: 100%;

    overflow: hidden;

    background:
        radial-gradient(
            ellipse at 50% 48%,
            rgba(54, 68, 73, 0.19),
            transparent 48%
        ),
        linear-gradient(
            180deg,
            #091015 0%,
            #040607 100%
        );

    box-shadow:
        inset 0 0 100px rgba(0, 0, 0, 0.62);
}


/* Very subtle atmospheric wash over the canvas */

.game-stage::after {
    content: "";

    position: absolute;

    inset: 0;

    z-index: 3;

    background:
        linear-gradient(
            115deg,
            transparent 10%,
            rgba(184, 217, 223, 0.025) 48%,
            transparent 80%
        );

    animation:
        gameMist 14s ease-in-out infinite alternate;

    pointer-events: none;
}


/* ---------------------------------------------------------
   13. GAME CANVAS
   --------------------------------------------------------- */

#stag-game {
    position: relative;
    z-index: 1;

    display: block;

    width: 100%;
    height: auto;

    aspect-ratio: 16 / 9;

    background: transparent;
}


/* ---------------------------------------------------------
   14. GAME MESSAGE OVERLAY
   --------------------------------------------------------- */

.game-message {
    position: absolute;
    z-index: 4;

    inset: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 30px;

    background:
        radial-gradient(
            circle at center,
            rgba(8, 12, 15, 0.46),
            rgba(4, 6, 7, 0.82)
        );

    text-align: center;

    transition:
        opacity 0.5s ease,
        visibility 0.5s ease;
}


.game-message p {
    max-width: 500px;

    margin:
        0
        auto
        8px;

    color: var(--text-soft);
}


.game-message-title {
    color: var(--sand) !important;

    font-size: clamp(1.35rem, 3vw, 2rem);

    font-style: italic;

    letter-spacing: 0.05em;
}


/* JavaScript will use this later */

.game-message.is-hidden {
    opacity: 0;

    visibility: hidden;

    pointer-events: none;
}


/* ---------------------------------------------------------
   15. GAME CONTROLS
   --------------------------------------------------------- */

.game-controls {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 14px;

    padding:
        15px
        20px;

    border-top:
        1px solid rgba(221, 205, 165, 0.09);

    color:
        var(--text-muted);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 0.70rem;
    font-weight: 600;

    letter-spacing: 0.15em;

    text-transform: uppercase;
}


.control-divider {
    color: var(--copper-dark);

    font-size: 0.60rem;
}


.game-note {
    max-width: 600px;

    margin:
        30px
        auto
        0;

    color: var(--text-muted);

    font-size: 0.92rem;

    font-style: italic;

    letter-spacing: 0.025em;
}


/* ---------------------------------------------------------
   16. ABOUT SECTION
   --------------------------------------------------------- */

.about-section {
    min-height: 60vh;

    align-items: center;

    background:
        linear-gradient(
            180deg,
            #07090b 0%,
            #090c0e 100%
        );
}


.about-section .section-content {
    max-width: 760px;
}


.about-section h2 {
    position: relative;

    padding-bottom: 22px;
}


.about-section h2::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: 0;

    width: 72px;
    height: 1px;

    background:
        var(--copper);
}


.about-section p {
    font-size: 1.05rem;
}


/* ---------------------------------------------------------
   17. FOOTER
   --------------------------------------------------------- */

footer {
    padding:
        42px
        25px;

    background:
        #040506;

    border-top:
        1px solid rgba(200, 117, 54, 0.16);

    text-align: center;
}


footer p {
    margin: 0;

    color:
        #707577;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size:
        0.72rem;

    letter-spacing:
        0.1em;
}


/* ---------------------------------------------------------
   18. TEXT SELECTION
   --------------------------------------------------------- */

::selection {
    background:
        rgba(200, 117, 54, 0.34);

    color:
        white;
}


/* ---------------------------------------------------------
   19. ANIMATION
   --------------------------------------------------------- */

@keyframes mistDrift {

    0% {
        transform:
            translateX(-2%);

        opacity:
            0.58;
    }

    50% {
        opacity:
            0.78;
    }

    100% {
        transform:
            translateX(3%);

        opacity:
            0.64;
    }
}


@keyframes gameMist {

    0% {
        transform:
            translateX(-5%);

        opacity:
            0.55;
    }

    100% {
        transform:
            translateX(5%);

        opacity:
            0.85;
    }
}


/* ---------------------------------------------------------
   20. MOBILE
   --------------------------------------------------------- */

@media (max-width: 700px) {

    .hero {
        min-height:
            92vh;

        padding:
            65px
            20px
            60px;
    }


    .eyebrow {
        font-size:
            0.66rem;

        letter-spacing:
            0.22em;
    }


    .hero-emblem {
        width:
            min(100%, 540px);

        margin-bottom:
            26px;
    }


    .mist-section,
    .about-section {
        padding:
            85px
            20px;
    }


    .game-toolbar {
        flex-direction:
            column;

        justify-content:
            center;

        gap:
            12px;

        padding:
            16px;
    }


    #game-status {
        text-align:
            center;
    }


    .game-button {
        width:
            100%;

        max-width:
            280px;
    }


    .game-message {
        padding:
            20px;
    }


    .game-controls {
        flex-wrap:
            wrap;

        gap:
            10px;

        font-size:
            0.64rem;
    }

}


/* ---------------------------------------------------------
   21. REDUCED MOTION ACCESSIBILITY
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior:
            auto;
    }


    .hero::after,
    .game-stage::after {
        animation:
            none;
    }


    .mist-button,
    .game-button,
    .game-message {
        transition:
            none;
    }

}
