/* dog-bg.jpg is 1422x1600. Overlay % are relative to the image box. */
:root {
    --scene-w: 1422;
    --scene-h: 1600;

    /* Inner CRT screen (inside the green bezel). Tweak these to reposition. */
    --monitor-left: 27.2%;
    --monitor-top: 23.4%;
    --monitor-width: 45.6%;
    --monitor-height: 28.4%;
}

html,
body {
    margin: 0;
    height: 100%;
    background: #000;
    color: #f3e6d0;
    font-family: VT323;
}

.scene {
    position: relative;
    width: min(100vw, calc(100vh * var(--scene-w) / var(--scene-h)));
    height: min(100vh, calc(100vw * var(--scene-h) / var(--scene-w)));
    margin: 0 auto;
}

.scene-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

.monitor {
    position: absolute;
    left: var(--monitor-left);
    top: var(--monitor-top);
    width: var(--monitor-width);
    height: var(--monitor-height);
    box-sizing: border-box;
    padding: 2% 3.5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35em;
    text-align: center;
    overflow: hidden;
    container-type: size;
    z-index: 2;
}

.question {
    color: #f7ecd8;
    margin: 0;
    letter-spacing: 0.04em;
    text-shadow:
        0 1px 2px #000,
        0 0 8px rgba(255, 40, 40, 0.55);
}

.prompt {
    color: #e8d7c0;
    font-size: clamp(8px, 3.6cqw, 11px);
    margin: 0;
    max-width: 100%;
    text-shadow: 0 1px 2px #000, 0 0 6px #000;
}

input,
#form input[type="email"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.45em 0.5em;
    background: rgba(8, 0, 0, 0.55);
    border: 1px solid #8a2a2a;
    color: #f3e6d0;
    font-family: VT323;
    font-size: clamp(11px, 5.4cqw, 16px);
    outline: none;
    text-align: center;
}

input:focus,
#form input[type="email"]:focus {
    border-color: #e8c9a0;
}

#opening-questions-button,
#form-button {
    margin-top: 0.15em;
    padding: 0.2em 0.7em;
    background: rgba(8, 0, 0, 0.55);
    border: 1px solid #8a2a2a;
    color: #f3e6d0;
    font-family: VT323;
    font-size: clamp(10px, 5cqw, 14px);
    cursor: pointer;
    display: inline;
}

#opening-questions-button:hover,
#form-button:hover {
    background: rgba(40, 0, 0, 0.7);
    color: #fff;
    border-color: #e8c9a0;
}

#response,
#form-response {
    color: #c9b8a0;
    min-height: 0;
    font-size: clamp(9px, 4.4cqw, 13px);
}

#response {
    margin-top: 0.2em;
}

#form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Under 800px: zoom so the CRT glass fills most of the width (full-image
   contain makes the screen ~45% of a small photo, so type cannot stay large).
   Fade the photo edge from the image border grey (#101010) out to black. */
@media (max-width: 799px) {
    html,
    body {
        height: 100%;
        overflow: hidden;
    }

    body {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100dvh;
        background: #000;
    }

    .scene {
        width: min(128vw, calc(78dvh * var(--scene-w) / var(--scene-h)));
        height: min(78dvh, calc(128vw * var(--scene-h) / var(--scene-w)));
        margin: 0;
        flex-shrink: 0;
        box-shadow:
            0 0 24px 12px #101010,
            0 0 64px 36px #070707,
            0 0 120px 72px #000;
    }

    .scene::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        pointer-events: none;
        background: radial-gradient(
            ellipse 72% 68% at 50% 42%,
            transparent 52%,
            rgb(16 16 16 / 0.45) 78%,
            #000 100%
        );
    }

    .monitor {
        --monitor-height: 34%;
        padding: 0.5% 1.5%;
        gap: 0.28em;
    }
}

@media (max-width: 799px) and (orientation: landscape) {
    .scene {
        width: min(62vw, calc(92dvh * var(--scene-w) / var(--scene-h)));
        height: min(92dvh, calc(62vw * var(--scene-h) / var(--scene-w)));
    }
}

/* =========================================
   CRT TEXT: BIGGER, BOLDER, MORE LEGIBLE
   ========================================= */

/* Main question */
.question {
    font-size: clamp(13px, 6.9cqw, 18px);
    font-weight: 400;
    -webkit-text-stroke: 0.2px rgba(199, 199, 199, 0.8);

    text-shadow:
        0 1px 2px #030303,
        0 0 4px #000000,
        0 0 8px rgba(109, 17, 17, 0.7),
        0 0 14px rgba(255, 40, 40, 0.35);
}

/* Supporting prompt */
.prompt {
    font-size: clamp(10px, 4.1cqw, 13px);
    font-weight: 600;

    text-shadow:
        0 1px 2px #000,
        0 0 4px rgba(0, 0, 0, 0.95),
        0 0 7px rgba(0, 0, 0, 0.8);
}

/* Text entered into the form */
input,
#form input[type="email"] {
    font-size: clamp(12px, 5.8cqw, 18px);
    font-weight: 600;
    text-shadow: 0 1px 2px #000;
}

/* Buttons */
#opening-questions-button,
#form-button {
    font-size: clamp(12px, 5.4cqw, 16px);
    font-weight: 700;
    text-shadow: 0 1px 2px #000;
}

/* Responses and feedback */
#response,
#form-response {
    font-size: clamp(10px, 4.8cqw, 15px);
    font-weight: 600;

    text-shadow:
        0 1px 2px #000,
        0 0 4px rgba(0, 0, 0, 0.95);
}


/* =========================================
   MOBILE: KEEP TEXT COMFORTABLY READABLE
   ========================================= */

@media (max-width: 799px) {

    .question {
        font-size: 13px;/*clamp(14px, 6vw, 28px);*/
    }

    .prompt {
        font-size: clamp(13px, 3.5vw, 15px);
    }

    input,
    #form input[type="email"] {
        font-size: 18px;
        font-weight: 600;
    }

    #opening-questions-button,
    #form-button {
        font-size: clamp(14px, 4vw, 18px);
    }

    #response,
    #form-response {
        font-size: clamp(13px, 3.5vw, 15px);
    }
}


/* Mobile landscape: override the mobile question size */
@media (max-width: 799px) and (orientation: landscape) {

    .question {
        font-size: clamp(13px, 3.6vw, 14px);
    }
}

@media (max-width: 799px) {

    .email, #form-button {
        display: inline-block;
    }

    #opening-questions-button,
    #form-button {
        margin-top: 0.05em;
        padding: 0.1em 0.3em;
    }

    input,
    #form input[type="email"]{
        padding: 0.05em 0.15em;
    }

    .text-4{
        font-size: 20px;
    }
}

@media (max-width: 622px) {

    .question {
        font-size: clamp(18px, 3.6vw, 28px);
    }
}