/* ============================================================
   STOLEN SPOTLIGHT — general.css
   Responsive across mobile, tablet, and desktop.
   Desktop design preserved; smaller screens adapt progressively.
   ============================================================ */


/* ------------------------------------------------------------
   1. BASE
   ------------------------------------------------------------ */

* {
    box-sizing: border-box;
    overflow: hidden;
}

html, body, head {
    overflow-x: hidden;
    overflow-y: scroll;
    margin: 0;
    padding: 0;
    /* Clamped base size: scales with viewport but stays readable
       on tiny phones and doesn't get gigantic on 4K displays. */
    font-size: clamp(14px, 1.7vw, 22px);
    background-color: white;
}

/* The play-viewer page (Stolen_Spotlight.html) uses body#show
   and is locked to a single viewport — no scrolling. */
#show {
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    height: 100dvh; /* dynamic viewport — accounts for mobile browser chrome */
}

#parent {
    width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

#parent section {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

canvas { display: block; }

button {
    border: 0;
    background-color: transparent;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

button:active { color: gray; }

a { text-decoration: inherit; color: inherit; }
a:visited { color: inherit; }

audio { position: absolute; opacity: 0; }


/* ------------------------------------------------------------
   2. LAYOUT UTILITIES
   ------------------------------------------------------------ */

.bottomArrows,
.please { display: none; }

#break {
    width: 100%;
    height: 2vh;
}

.flex {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
}

.flex2 {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
}

.flexRM {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.flexVert {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 18vw;
}

.center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.start {
    margin-left: auto;
    margin-right: auto;
    width: 68vw;
}

.curtain {
    background-image: url('../images/curtain3.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    width: 30vw;
    height: 17vw;
    cursor: pointer;
}

.curtain:hover {
    background-image: url('../images/curtain4.svg');
}


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

.type,
.typeDP {
    font-size: max(1.8333rem, 30px);
    color: black;
    text-align: left;
    font-family: Arial, Helvetica, sans-serif;
    margin-bottom: 0;
    margin-left: 12vw;
    margin-right: 12vw;
}

.type span,
.typeDP span {
    font-size: max(2.5rem, 36px) !important;
    color: black;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
}

.produced {
    font-size: max(1.8333rem, 16px);
    color: black;
    text-align: left;
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    margin-top: 1vh;
    margin-bottom: 6vh;
    margin-left: 12vw;
    margin-right: 12vw;
}

.startText {
    font-size: max(1rem, 16px);
    color: black;
    text-align: left;
    font-family: 'Courier New', Courier, monospace;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 3vw;
    margin-right: 0;
    width: 35vw;
}

.startText span {
    font-family: Arial, Helvetica, sans-serif;
    font-size: max(1.2rem, 24px);
    font-weight: bold;
}

#help {
    font-size: max(0.8rem, 10px);
    color: #B29A70;
}

.please {
    font-size: max(2rem, 32px) !important;
    color: black;
    text-align: left;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    margin-bottom: 4vh;
}

.warning {
    margin-left: auto;
    margin-right: auto;
    width: 68vw;
    font-size: max(0.8rem, 14px);
    color: black;
    text-align: left;
    font-family: 'Courier New', Courier, monospace;
}

.warning span {
    font-family: Arial, Helvetica, sans-serif;
    font-size: max(1.1rem, 20px);
    font-weight: bold;
}

.dedication {
    margin-left: 5vw;
    margin-right: 5vw;
    margin-top: 1rem;
    width: 90vw;
    padding-top: 0.5rem;
    font-size: max(0.7rem, 12px);
    color: black;
    text-align: left;
    font-family: Arial, Helvetica, sans-serif;
    border-top: 1pt black solid;
}

#megaphone {
    font-size: max(1.1rem, 20px);
    margin-right: 0.4rem;
    overflow: visible;
}

#bold { font-weight: bold; }
#italics { font-style: italic; }


/* ------------------------------------------------------------
   4. CONTENT BLOCKS
   ------------------------------------------------------------ */

.chapters {
    margin-left: 12vw;
    margin-right: 12vw;
    font-size: max(1.2rem, 20px);
    color: black;
    text-align: left;
    font-family: 'Courier New', Courier, monospace;
    overflow: scroll;
    height: 25vh;
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='20'><text x='50%' y='50%' font-family='Arial' font-weight='bold' font-size='20' dominant-baseline='middle' text-anchor='middle' fill='black'>SCROLL</text></svg>") 16 0, ns-resize;
}

.chapters span {
    font-family: Arial, Helvetica, sans-serif;
    font-size: max(1.5rem, 22px);
    font-weight: bold;
}

.allWorksheets {
    margin-left: 12vw;
    margin-right: 12vw;
    font-size: max(1rem, 16px);
    color: black;
    text-align: left;
    font-family: Arial, Helvetica, sans-serif;
    height: fit-content;
    width: fit-content;
    border: black 2pt solid;
    border-radius: 100px;
    padding: 1.3vh;
}

.aboutParent {
    height: 50vh;
    margin-left: 12vw;
    margin-right: 12vw;
    font-size: max(1rem, 16px);
    color: black;
    text-align: left;
    font-family: Arial, Helvetica, sans-serif;
    overflow-y: scroll;
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='20'><text x='50%' y='50%' font-family='Arial' font-weight='bold' font-size='20' dominant-baseline='middle' text-anchor='middle' fill='black'>SCROLL</text></svg>") 16 0, ns-resize;
}

.about span { font-weight: bold; }

.presents {
    font-size: max(0.9rem, 12px);
    font-family: 'Courier New', Courier, monospace;
}

.funding {
    font-size: max(0.9rem, 12px);
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
}

.presents span,
.funding span { font-weight: bold; }

.cast {
    font-size: max(0.9rem, 12px);
    font-family: 'Courier New', Courier, monospace;
}

.cast span {
    font-size: max(1.2rem, 18px);
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
}

.follow {
    font-size: max(0.9rem, 12px);
    font-family: 'Courier New', Courier, monospace;
}

.follow span {
    font-size: max(1rem, 16px);
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
}

.follow a { text-decoration: underline; }


/* ------------------------------------------------------------
   5. LOGOS (footer)
   ------------------------------------------------------------ */

.logos {
    position: fixed;
    bottom: 20px;
    margin-left: 12vw;
    margin-right: 12vw;
}

#pcc {
    width: 300px;
    height: 85px;
    background-image: url(../images/logos/pcclogo.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

#thislife {
    width: 85px;
    height: 85px;
    background-image: url(../images/logos/thislifelogo.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

#WT {
    width: 85px;
    height: 85px;
    background-image: url(../images/logos/WTlogo.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}


/* ============================================================
   6. RESPONSIVE BREAKPOINTS
   ============================================================ */


/* ---------- Small laptop / large tablet (≤ 1024px) ---------- */
@media only screen and (max-width: 1024px) {
    .type,
    .typeDP,
    .produced,
    .aboutParent,
    .chapters,
    .allWorksheets {
        margin-left: 8vw;
        margin-right: 8vw;
    }

    .logos {
        margin-left: 8vw;
        margin-right: 8vw;
    }

    .start { width: 84vw; }

    /* Internal scroll regions get a bit more breathing room */
    .aboutParent { height: 55vh; }
    .chapters { height: 35vh; }
}


/* ---------- Tablet / large phone landscape (≤ 768px) ---------- */
@media only screen and (max-width: 768px) {
    /* Internal scroll containers become natural-flow on touch devices.
       The "SCROLL" cursor is desktop-only anyway and nested scrolling
       on touch is a known UX trap. */
    .aboutParent,
    .chapters {
        height: auto;
        max-height: none;
        overflow: visible;
        cursor: default;
    }

    /* Logos rejoin the document flow so they don't overlap content. */
    .logos {
        position: static;
        margin: 3rem 8vw 1rem;
    }

    /* The curtain + welcome text stack vertically. */
    .flexRM {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }

    .start { width: 84vw; }

    .curtain {
        width: 84vw;
        height: 48vw;
        min-height: 200px;
    }

    .startText {
        width: 84vw;
        margin-left: 0;
    }

    .flexVert {
        height: auto;
        gap: 0.75rem;
    }

    .warning,
    .dedication { width: 84vw; }

    .warning {
        margin-left: 8vw;
        margin-right: 8vw;
    }

    .dedication {
        margin-left: 8vw;
        margin-right: 8vw;
    }

    /* The dedication's megaphone + text don't crush together. */
    .flex2 { gap: 0.5rem; }

    #parent {
        padding-top: 5rem;
        padding-bottom: 2rem;
    }
}


/* ---------- Mobile portrait (≤ 480px) ---------- */
@media only screen and (max-width: 480px) {
    .typeDP {
        margin-top: 2rem;
        margin-left: 6vw;
        margin-right: 6vw;
        font-size: max(1.4rem, 21px);
    }

    .typeDP span {
        font-size: max(1.6rem, 24px) !important;
    }

    .produced {
        margin-bottom: 2vh;
        margin-left: 6vw;
        margin-right: 6vw;
    }

    .aboutParent,
    .chapters,
    .allWorksheets {
        margin-left: 6vw;
        margin-right: 6vw;
    }

    .logos {
        margin: 3rem 6vw 1rem;
        gap: 1rem;
    }

    /* Center-stack the smaller marketing logos on mobile */
    .logos #pcc {
        width: 100%;
        max-width: 300px;
        height: 80px;
        background-size: contain;
        background-position: left center;
    }

    .start { width: 88vw; }

    .curtain {
        width: 88vw;
        height: 52vw;
        min-height: 200px;
    }

    .startText { width: 88vw; }

    .warning,
    .dedication {
        width: 88vw;
        margin-left: 6vw;
        margin-right: 6vw;
    }

    #break { height: 0; }
    .flexVert { height: auto; }

    /* Slideshow page — bottom arrows replace side arrows in narrow viewports. */
    .slideshowArrowsDiv { display: none; }

    .bottomArrows {
        display: flex;
        justify-content: space-between;
        width: 80vw;
        margin: 2vh auto 0;
    }

    .bottomArrows .sliderArrow {
        position: static;
        transform: none;
    }

    .please { display: block; }
}



