:root {
    --primary-red: #ff0000;
    --bg-black: #000000;
    --box-bg: #0a0a0a;
    --glass-border: #ff0000;
    --text-white: #ffffff;
    --text-grey: #888888;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Prevents the gray box highlight when tapping on Android */
    -webkit-tap-highlight-color: transparent;
}

/* BASE STYLES */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-black);
    color: var(--text-white);
    line-height: 1.5;
}

/* NARRATIVE PAGE LOCK (Applied to index.html body) */
body.is-narrative {
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: fixed;
    overscroll-behavior: none;
    touch-action: none;
}

/* SEARCHLIGHT EFFECT */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 0, 0, 0.12) 0%, transparent 20%);
    pointer-events: none;
    z-index: 5000;
}

/* Header - CENTERED "ISLAND" */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 4000;
    background: transparent;
    pointer-events: none;
}

.header-left {
    text-align: center;
    background: #000;
    padding: 10px 60px;
    pointer-events: auto;
    box-shadow: 0 0 50px #000, 0 0 30px #000;
    border-bottom: 1px solid rgba(255, 0, 0, 0.2);
}

.logo-red {
    color: var(--primary-red);
    font-size: 2.5rem;
    font-family: 'Playball', cursive;
    text-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
    letter-spacing: 2px;
}

.logo-sub {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: var(--text-white);
    opacity: 0.8;
    margin-top: -2px;
}

/* GLOBAL BACKGROUND HEADLINES */
.headlines-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    opacity: 0.4;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    pointer-events: none;
}

.headline-row {
    display: flex;
    white-space: nowrap;
    width: fit-content;
    animation: marquee 10s linear infinite;
}

.headline-row span {
    font-size: 2.2rem;
    font-weight: 900;
    text-transform: uppercase;
    padding-right: 80px;
    letter-spacing: 4px;
    color: var(--text-white);
}

.headline-row:nth-child(even) span {
    color: var(--primary-red);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

#scroll-wrapper {
    height: 100vh;
    width: 100vw;
    touch-action: none;
}

#fixed-stage {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    pointer-events: none;
}

/* THE MIDDLE BOX - WIDER (Changed to match screenshot) */
.glass-box {
    width: 72vw;
    height: 62vh;
    background: #000;
    border: 2px solid var(--primary-red);
    border-top: 5px solid var(--primary-red);
    position: relative;
    overflow-y: scroll;
    overflow-x: hidden;
    box-shadow: 0 0 100px rgba(0, 0, 0, 1), 0 0 40px rgba(255, 0, 0, 0.15);
    display: flex;
    flex-direction: row;
    pointer-events: auto;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

.glass-box::-webkit-scrollbar {
    display: none;
}

/* Internal fixed container for narrative elements */
.glass-inner-content {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    z-index: 5;
    pointer-events: none;
}

.glass-inner-content > * {
    pointer-events: auto;
}

/* Spacer inside the box to create the scroll length */
.box-scroll-spacer {
    height: 1000vh;
    width: 1px;
    flex-shrink: 0;
    pointer-events: none;
}

.box-headlines-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.2;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.narrative-bg-container {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 45%;
    z-index: 2;
    background-size: cover;
    background-position: center;
    filter: brightness(0.6) grayscale(0.1);
    transition: background-image 0.8s ease-in-out, opacity 0.8s;
    opacity: 0;
}

.face-container {
    width: 45%;
    height: 100%;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    background: transparent;
    position: relative;
}

.face-img {
    height: 100%;
    width: 100%;
    object-fit: contain;
    object-position: center;
    mix-blend-mode: screen;
    filter: brightness(1.2) contrast(1.2);
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.face-img:hover {
    transform: scale(1.02);
    filter: brightness(1.4) contrast(1.3);
}

/* GLOW BLINK ANIMATION */
.face-glow {
    animation: blink-glow 2s infinite ease-in-out;
}

@keyframes blink-glow {
    0%, 100% {
        filter: brightness(1.2) contrast(1.2) drop-shadow(0 0 5px rgba(255, 0, 0, 0.4));
    }
    50% {
        filter: brightness(1.4) contrast(1.3) drop-shadow(0 0 20px rgba(255, 0, 0, 0.8));
    }
}

.content-layer {
    width: 55%;
    height: 100%;
    padding: 40px;
    position: relative;
    display: grid;
    place-items: center left;
    z-index: 20;
    background: transparent;
}

.chapter {
    grid-area: 1 / 1;
    width: 100%;
    max-width: 600px;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.6s ease;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.chapter.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chapter h2 {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary-red);
    margin-bottom: 15px;
    line-height: 1.1;
    text-shadow: 0 0 15px rgba(0,0,0,1);
}

.chapter p {
    font-size: 1.1rem;
    color: #fff;
    line-height: 1.6;
    text-shadow: 0 2px 4px rgba(0,0,0,1);
}

.mission-highlight {
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 15px;
    text-transform: uppercase;
}

/* BUTTONS */
.doc-btn, .secret-btn, .strike-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 30px;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    transition: 0.3s;
    cursor: pointer;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.doc-btn {
    border: 2px solid var(--primary-red);
    color: #fff;
    background: var(--primary-red);
}

.secret-btn {
    border: 1px solid rgba(255, 0, 0, 0.5);
    color: var(--primary-red);
    background: rgba(0, 0, 0, 0.5);
    font-family: 'Courier Prime', monospace;
}

.secret-btn:hover {
    background: var(--primary-red);
    color: #000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}

.strike-btn {
    border: 2px solid var(--primary-red);
    color: #fff;
    background: #000;
    width: 100%;
    text-align: center;
    padding: 20px;
    font-size: 1.2rem;
}

.strike-btn:hover {
    background: var(--primary-red);
    color: #fff;
    box-shadow: 0 0 50px rgba(255, 0, 0, 0.5);
}

/* Progress Bar */
.scroll-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary-red);
}

/* BOTTOM LEFT ACTION TRIGGER */
.bottom-action-trigger {
    position: fixed;
    bottom: 40px;
    left: 40px;
    z-index: 3500;
    cursor: pointer;
    transition: opacity 0.5s, transform 0.5s, filter 0.3s;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    text-align: left;
}

.bottom-action-trigger.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.bottom-action-trigger h3 {
    color: var(--primary-red);
    font-weight: 900;
    font-size: 1.6rem;
    text-transform: uppercase;
}

.bottom-action-trigger p {
    color: #fff;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* MODAL SYSTEM - MATCHING GLASS BOX SIZE */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.98);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(20px);
}

.modal-overlay.active {
    display: flex;
}

.report-modal-box, .glass-modal {
    background: #000;
    border: 2px solid var(--primary-red);
    border-top: 5px solid var(--primary-red);
    padding: 60px;
    width: 72vw;
    height: 75vh;
    position: relative;
    box-shadow: 0 0 150px rgba(255, 0, 0, 0.3);
    overflow-y: auto;
}

.report-modal-box h3 {
    color: var(--primary-red);
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: 2px;
}

/* TYPEWRITER STYLE INPUTS */
#direct-report input, #rep-issue {
    width: 100%;
    background: #050505;
    border: 1px solid #222;
    color: #fff;
    font-family: 'Courier Prime', monospace;
    font-weight: 700;
    font-size: 1.2rem;
    padding: 18px;
    text-transform: uppercase;
}

#direct-report input {
    margin-bottom: 25px;
}

#rep-issue {
    height: 200px;
    resize: none;
}

#direct-report input:focus, #rep-issue:focus {
    border-color: var(--primary-red);
    outline: none;
    box-shadow: 0 0 100px rgba(255, 0, 0, 0.2);
}

.textarea-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 40px;
}

.custom-placeholder {
    position: absolute;
    top: 18px;
    left: 18px;
    right: 18px;
    color: var(--primary-red);
    font-size: 1rem;
    pointer-events: none;
    line-height: 1.5;
    transition: opacity 0.3s;
    font-weight: 400;
    opacity: 0.8;
}

#rep-issue:focus + .custom-placeholder,
.textarea-wrapper.has-content .custom-placeholder {
    opacity: 0;
}

#direct-report button {
    width: 100%;
    padding: 20px;
    background: var(--primary-red);
    color: #fff;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1.3rem;
    cursor: pointer;
    border: none;
}

/* SANSTHA MODAL specific centering */
.glass-modal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.modal-face-img {
    width: 150px;
    height: auto;
    mix-blend-mode: screen;
    filter: brightness(1.2) contrast(1.2);
    margin-bottom: 30px;
}

.glass-modal h3 {
    color: var(--primary-red);
    font-size: 2.2rem;
    margin-bottom: 25px;
    text-transform: uppercase;
    font-weight: 900;
}

.glass-modal p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #fff;
}

.contact-email {
    color: var(--primary-red);
    font-weight: 900;
    font-size: 1.4rem;
    font-family: 'Courier Prime', monospace;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

.doc-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 35px;
    border: 2px solid var(--primary-red);
    color: #fff;
    background: var(--primary-red);
    text-decoration: none;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 1rem;
    transition: all 0.3s;
}

/* FLOATING ARCHITECT LOGO */
.architect-floating-logo {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    z-index: 6000;
    mix-blend-mode: screen;
    filter: brightness(1.2) drop-shadow(0 0 10px rgba(255, 0, 0, 0.5));
    border: 1px solid rgba(255, 0, 0, 0.3);
    padding: 5px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.architect-floating-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.architect-floating-logo:hover {
    transform: scale(1.1);
}

/* BOTTOM FLAG LOGO */
.bottom-flag-logo {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 80px;
    height: auto;
    z-index: 6000;
    mix-blend-mode: screen;
    filter: brightness(1.2) drop-shadow(0 0 15px rgba(255, 0, 0, 0.6));
    opacity: 0.8;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.bottom-flag-logo:hover {
    transform: scale(1.1);
    opacity: 1;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .main-header {
        height: 80px;
    }

    .header-left {
        padding: 5px 15px;
        width: 100%;
        box-shadow: none;
    }

    .logo-red {
        font-size: 1.5rem;
    }

    .logo-sub {
        font-size: 0.45rem;
        letter-spacing: 2px;
    }

    .glass-box, .report-modal-box, .glass-modal {
        flex-direction: column;
        width: 95vw;
        height: 72vh;
        align-items: center;
        padding: 20px;
    }

    .glass-inner-content {
        flex-direction: column;
        justify-content: flex-start;
    }

    .face-container {
        width: 100%;
        height: 35%;
        padding: 5px;
        border-bottom: 1px solid rgba(255, 0, 0, 0.2);
    }

    .face-img {
        height: 100%;
        width: auto;
    }

    .content-layer {
        width: 100%;
        height: 65%;
        padding: 15px;
        place-items: center;
    }

    .narrative-bg-container {
        left: 0;
        top: 35%;
        opacity: 0.3 !important;
    }

    .chapter {
        max-width: 100%;
        text-align: center;
        padding: 15px;
        backdrop-filter: blur(5px);
    }

    .chapter h2 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .chapter p {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .mission-highlight {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .headline-row span {
        font-size: 1.1rem;
        padding-right: 30px;
    }

    .bottom-action-trigger {
        bottom: 10px;
        left: 10px;
        right: 10px;
        text-align: center;
    }

    .bottom-action-trigger h3 {
        font-size: 0.9rem;
    }

    .bottom-action-trigger p {
        font-size: 0.6rem;
    }

    .report-modal-box h3 { font-size: 1.3rem; }
    .glass-modal h3 { font-size: 1.2rem; }
    .glass-modal p { font-size: 0.8rem; }
    .contact-email { font-size: 0.9rem; }

    .architect-floating-logo {
        width: 45px;
        height: 45px;
        top: 15px;
        right: 15px;
    }

    .bottom-flag-logo {
        width: 50px;
        bottom: 15px;
        right: 15px;
    }
}
