/* =========================================================
   STICKMAN: THE TYPING FIGHTER
   HOME SCREEN
   ========================================================= */


/* ---------------------------------------------------------
   HOME SCREEN
   --------------------------------------------------------- */

.home-screen {
    position: relative;

    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;

    overflow: hidden;

    background: #111;
}


/* ---------------------------------------------------------
   BACKGROUND ARTWORK
   --------------------------------------------------------- */

.home-background {
    position: absolute;

    inset: 0;

    z-index: 1;

    background-image:
        url("../assets/images/home-bg.png");

    background-repeat: no-repeat;

    background-position: center center;

    background-size: cover;
}


/* ---------------------------------------------------------
   DARK OVERLAY
   --------------------------------------------------------- */

.home-background::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.05),
            rgba(0, 0, 0, 0.08)
        );

    pointer-events: none;
}


/* ---------------------------------------------------------
   BUTTON AREA
   --------------------------------------------------------- */

.home-controls {
    position: absolute;

    z-index: 5;

    left: 50%;
    top: 59%;

    width: 340px;

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

    display: flex;

    flex-direction: column;

    gap: 14px;
}


/* ---------------------------------------------------------
   BUTTON BASE
   --------------------------------------------------------- */

.home-button {
    position: relative;

    width: 100%;

    height: 60px;

    border-radius: 5px;

    font-family:
        "Segoe UI",
        Arial,
        sans-serif;

    font-size: 18px;

    font-weight: 900;

    letter-spacing: 4px;

    cursor: pointer;

    transition:
        transform 180ms ease,
        background 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;

    outline: none;
}


/* ---------------------------------------------------------
   PLAY
   --------------------------------------------------------- */

.play-button {
    background: #f4f4f4;
    color: #111;
    border:
        1px solid #ffffff;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.42);

    overflow: hidden;
}


.play-button:hover {
    transform:
        translateY(-3px);

    background: #ffffff;

    box-shadow:
        0 14px 32px rgba(0, 0, 0, 0.55);
}


.play-button:active {
    transform:
        translateY(1px)
        scale(0.985);
}


/* ---------------------------------------------------------
   HISTORY
   --------------------------------------------------------- */

.history-button {
    background:
        rgba(15, 15, 15, 0.22);

    color: #ffffff;

    border:
        1px solid rgba(255, 255, 255, 0.78);

    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.2);
}


.history-button:hover {
    transform:
        translateY(-3px);

    background:
        rgba(255, 255, 255, 0.10);

    border-color:
        #ffffff;

    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.4);
}


.history-button:active {
    transform:
        translateY(1px)
        scale(0.985);
}


/* ---------------------------------------------------------
   BUTTON SHINE
   --------------------------------------------------------- */

.play-button::after {
    content: "";

    position: absolute;

    top: 0;
    left: -120%;

    width: 60%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,0.65),
            transparent
        );

    transform:
        skewX(-20deg);

    transition:
        left 550ms ease;

    pointer-events: none;
}


.play-button:hover::after {
    left: 150%;
}


/* ---------------------------------------------------------
   TABLET
   --------------------------------------------------------- */

@media (max-width: 900px) {

    .home-controls {
        width: 310px;

        top: 59%;
    }

}


/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 600px) {

    .home-background {
        background-position:
            center center;
    }


    .home-controls {
        width: min(320px, 78vw);

        top: 60%;
    }


    .home-button {
        height: 55px;

        font-size: 16px;

        letter-spacing: 3px;
    }
}

/* ---------------------------------------------------------
   SITE INFORMATION LINK
   --------------------------------------------------------- */

.home-site-links {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 7px;
    transform: translateX(-50%);
    white-space: nowrap;
}

.home-site-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.home-site-links a {
    color: rgba(255,255,255,0.52);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.home-site-links a:hover {
    color: rgba(255,255,255,0.9);
    text-decoration: underline;
}

@media (max-width: 600px) {
    .home-site-links {
        bottom: 3px;
        gap: 7px;
    }

    .home-site-links a {
        font-size: 10px;
    }
}


/* Informational content below the game controls. Does not alter gameplay screens. */
.home-information { width: min(1040px, 92vw); margin: 28px auto 110px; color: #fff; }
.home-information-inner { padding: 28px 32px; background: rgba(15,15,15,.78); border: 1px solid rgba(255,255,255,.12); border-radius: 8px; backdrop-filter: blur(2px); }
.home-information h1 { margin: 0 0 12px; font-size: clamp(24px, 3vw, 38px); letter-spacing: .5px; }
.home-information h2 { margin: 0 0 8px; font-size: 17px; }
.home-information p { margin: 0; color: rgba(255,255,255,.76); line-height: 1.7; font-size: 14px; }
.home-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.home-info-grid article { padding: 17px 18px; border: 1px solid rgba(255,255,255,.10); border-radius: 6px; background: rgba(255,255,255,.035); }
.home-information-links { margin-top: 20px !important; }
.home-information a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 700px) { .home-information { width: 94vw; margin-bottom: 80px; } .home-information-inner { padding: 22px 18px; } .home-info-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------
   ADSENSE-READINESS: INFORMATIONAL HOME CONTENT
   --------------------------------------------------------- */
.home-screen {
    overflow-x: hidden;
    overflow-y: auto;
    isolation: isolate;
    background: #101214;
}

/* Keep the cinematic game artwork limited to the first viewport.
   The informational area gets its own solid background so the artwork
   never shows through the text while scrolling. */
.home-background {
    position: absolute;
    z-index: 1;
    inset: 0 0 auto 0;
    height: 100vh;
    height: 100dvh;
}

.home-controls {
    top: 59vh;
}

.home-information {
    position: relative;
    z-index: 4;
    width: 100%;
    margin: 100vh 0 0;
    padding: 42px 0 80px;
    color: #fff;
    background: #101214;
}

.home-information-inner {
    width: min(1040px, 92vw);
    margin: 0 auto;
    padding: 32px;
    background: #17191c;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    box-shadow: 0 18px 60px rgba(0,0,0,.28);
}

.home-information h1 {
    margin: 0 0 12px;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.15;
    letter-spacing: .4px;
}

.home-lead,
.home-information p {
    margin: 0;
    color: rgba(255,255,255,.80);
    line-height: 1.78;
    font-size: 15px;
}

.home-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.home-info-grid article {
    padding: 20px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 7px;
    background: rgba(255,255,255,.035);
}

.home-info-grid h2,
.home-section-title {
    margin: 0 0 9px;
    font-size: 18px;
    line-height: 1.35;
}

.home-section-title {
    margin-top: 28px;
}

.home-information a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.home-information-links {
    margin-top: 22px !important;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.10);
}

@media (max-width: 700px) {
    .home-controls { top: 60vh; }
    .home-information {
        margin-top: 100dvh;
        padding: 28px 0 54px;
    }
    .home-information-inner {
        width: 94vw;
        padding: 23px 19px;
    }
    .home-info-grid { grid-template-columns: 1fr; }
    .home-information p { font-size: 14px; }
}
