/* =========================
   PAGE BACKGROUND
========================= */

.antechamber-page {
    height: 100vh;
    /* Page takes full viewport height */

    overflow-y: auto;
    overflow-x: hidden;
    /* Prevents scrolling */

    background-image: url("../images/antechamber.jpg");
    /* Background image */

    background-size: cover;
    /* Image fills screen (may crop) */

    background-position: center;
    /* Keeps center aligned */

    background-repeat: no-repeat;
    /* No tiling */
}


/* =========================
   MAIN LAYOUT
========================= */

.antechamber-container {
    height: 100vh;
    /* Full screen container */

    display: flex;
    /* Enables flexbox */

    flex-direction: column;
    /* Stack top → bottom */

    justify-content: flex-start;
    /* Content starts from top */
}

.top-section {
    display: flex;
    flex-direction: column;
    /* Stack sigil + greeting */

    align-items: center;
    /* Center horizontally */

    justify-content: flex-start;
    /* Stick to top */

    margin-bottom: 50px;
    /* Controls gap between top & bottom sections */
}

.bottom-section {
    display: flex;
    flex-direction: column;
    /* Stack text box */

    align-items: center;
    /* Center horizontally */

    justify-content: flex-start;
    /* Start from top */

    padding: 0 10px;
    /* Prevents touching screen edges */
}

.antechamber-content {
    width: 100%;
    /* Wrapper spans full width */
}


/* =========================
   SIGIL
========================= */

.sigil {
    width: 500px;
    aspect-ratio: 16 / 9;

    display: block;

    margin-top: 3vh;

    filter: drop-shadow(0 0px 20px rgba(0, 0, 0, 1))
            drop-shadow(0 20px 30px rgba(0, 0, 0, 1));

    cursor: pointer;
}


/* =========================
   AVATAR
========================= */

.avatar {
    top: 50px;
    right: 100px;
    z-index: 1000;
}

.avatar-icon {
    width: 60px;
}


/* =========================
   TEXT
========================= */

.greeting {
    font-size: 36px;
    /* Greeting size */

    color: #e0a353;
    /* Gold tone d8a36e */

    text-shadow: 0 0 6px rgba(201, 162, 74, 0.4);
    /* Subtle glow */
}

.immersion-text {
    position: relative;

    background: rgba(0, 0, 0, 0.7);

    display: flex;
    flex-direction: column;

    gap: 10px;

    max-width: 634px;

    padding: 50px 90px;

    border: 1px solid rgba(193,154,107,0.3);
}

.immersion-text::before {
    content: "";
    position: absolute;

    inset: -3px;

    border: 1px solid #c19a6b66;

    pointer-events: none;
}

.immersion-text::after {
    content: "";
    position: absolute;

    inset: 5px;

    background:

    /* ===== OUTER ===== */

    linear-gradient(to right, #c19a6b, transparent) top left / 45px 1px no-repeat,
    linear-gradient(#c19a6b, transparent) top left / 1px 45px no-repeat,

    linear-gradient(to left, #c19a6b, transparent) top right / 45px 1px no-repeat,
    linear-gradient(#c19a6b, transparent) top right / 1px 45px no-repeat,

    linear-gradient(to right, #c19a6b, transparent) bottom left / 45px 1px no-repeat,
    linear-gradient(to top, #c19a6b, transparent) bottom left / 1px 45px no-repeat,

    linear-gradient(to left, #c19a6b, transparent) bottom right / 45px 1px no-repeat,
    linear-gradient(to top, #c19a6b, transparent) bottom right / 1px 45px no-repeat,

    /* ===== INNER ===== */

    linear-gradient(to right, #c19a6b, transparent) top 1px left / 30px 1px no-repeat,
    linear-gradient(#c19a6b, transparent) top left 1px / 1px 30px no-repeat,

    linear-gradient(to left, #c19a6b, transparent) top 1px right / 30px 1px no-repeat,
    linear-gradient(#c19a6b, transparent) top right 1px / 1px 30px no-repeat,

    linear-gradient(to right, #c19a6b, transparent) bottom 1px left / 30px 1px no-repeat,
    linear-gradient(to top, #c19a6b, transparent) bottom left 1px / 1px 30px no-repeat,

    linear-gradient(to left, #c19a6b, transparent) bottom 1px right / 30px 1px no-repeat,
    linear-gradient(to top, #c19a6b, transparent) bottom right 1px / 1px 30px no-repeat;

    pointer-events: none;
}

.immersion-text p + p {
    margin-top: 6px;
    /* Extra spacing between paragraphs */
}

.immersion-text p {
    text-align: center;
    /* Centered text */

    font-size: 24px;
    /* Text size */

    letter-spacing: 0.04em;
    /* Slight spacing between letters */

    color: #e0a353;
    /* Gold tone */

    margin: 0;
    /* Removes default spacing */

    line-height: 1.4;
    /* Improves readability */
}

.immersion-text form {
    display: flex;
    /* Flex container */

    justify-content: center;
    /* Centers button */

    margin-top: 20px;
    /* Space above button */
}


/* ==================================================
   MOBILE OVERRIDES
================================================== */

@media (max-width: 768px) and (pointer: coarse) {
    .avatar {
        top: 20px;
        right: 15px;
        z-index: 1000;
    }

    .avatar-icon {
        width: 40px;
    }

    .antechamber-page {
        height: auto;
        min-height: 100dvh;

        background-size: auto 100%;
        background-position: center top;
    }

    .antechamber-container {
        height: auto;
    }

    .top-section {
        margin-bottom: 0px;
    }

    .sigil {
        width: 75vw;
        filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.9))
                drop-shadow(0 15px 25px rgba(0, 0, 0, 0.6))
    }

    .greeting {
        font-size: 26px;
    }

    .immersion-text {
        width: min(700px, 90vw);
        margin: 0 auto;
        padding: 30px 40px;
        box-sizing: border-box;
    }

    .immersion-text p {
        font-size: 18px;
        line-height: 1.2;
    }

    .immersion-text form {
        margin-top: 10px;
    }
}