* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #050505;
    font-family: 'Georgia', serif;
    color: rgba(255, 255, 255, 0.85);
}

video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

#lightRaysCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#shadow-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.content-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

header {
    text-align: center;
    opacity: 0.9;
}

h1 {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.tagline {
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    opacity: 0.7;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
}

/* Text overlay used by boxwriter.js */
.box-text-layer {
    position: absolute;
    pointer-events: auto;
    overflow-y: auto !important; /* Enable scrolling */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y; /* Enable vertical scrolling on touch devices */
    color: rgb(220,220,230);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 16px;
    line-height: 26px;
    white-space: pre-wrap;
    user-select: text;
    -webkit-user-select: text;
    -webkit-font-smoothing: antialiased;
    z-index: 999;
    padding: 0;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 0.95rem;
    }
    
    .box-text-layer {
        font-size: 15px;
        line-height: 24px;
        padding-right: 20px; /* reserve space for canvas scrollbar */
    }
}

@media (max-width: 600px) {
    /* Allow native touch scrolling on small screens while keeping scrollbars hidden visually */
    .box-text-layer {
        overflow-y: auto; 
        -webkit-overflow-scrolling: touch;
        padding-right: 28px;
    }

    /* Scale down header and title font sizes for small devices */
    h1 { font-size: 2rem; }
    .tagline { font-size: 0.85rem; }

    /* Slightly reduce canvas shadows and glows for perf and clarity */
    #shadow-canvas, #lightRaysCanvas { 
        image-rendering: optimizeQuality;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    .tagline { font-size: 0.8rem; }
}

/* Mobile menu button styling */
.mobile-menu-option {
    transition: all 0.2s ease !important;
}

.mobile-menu-option:hover {
    background: rgba(25,25,35,0.98) !important;
    border-color: rgba(120,120,140,0.6) !important;
    transform: scale(1.02) !important;
}

.mobile-menu-option:active {
    background: rgba(35,35,45,1) !important;
    transform: scale(0.98) !important;
}

/* Make the canvas non-interfering with touch gestures on the text overlay */
#shadow-canvas, #lightRaysCanvas {
    touch-action: none;
}

/* Hide native scrollbar visually - use canvas-drawn scrollbar instead */
.box-text-layer {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}
.box-text-layer::-webkit-scrollbar {
    width: 0px;
    height: 0px;
    display: none;
}
