/* =========================================================
   Tempestates Temporalis - Reality Transformation Engine
   ========================================================= */

/* --- CSS Custom Properties for Streams --- */
:root {
    /* Physics (Default) */
    --bg-color: #0A1128; /* Quantum Vacuum Blue */
    --text-primary: #F8F9FA; /* Soliton Plasma White */
    --accent-color: #FFD700; /* Vortex Gold */
    --panel-bg: rgba(255, 255, 255, 0.05);
    
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;
}

[data-active-stream="stream-psi"] {
    --bg-color: #2F353B; /* Shielded Lead Grey */
    --text-primary: #f0f0f0;
    --accent-color: #00E5FF; /* Bio-Electric Cyan */
    --panel-bg: #B87333; /* Faraday Copper with opacity below */
}

[data-active-stream="stream-occult"] {
    --bg-color: #0B0C10; /* Obsidian Black */
    --text-primary: #f8f8f8;
    --accent-color: #C5A059; /* Egyptian Electrum Gold */
    --panel-bg: rgba(139, 0, 0, 0.2); /* Alchemical Crimson */
}

[data-active-stream="stream-ai"] {
    --bg-color: #05101A; /* Deep Oceanic Teal/Blue */
    --text-primary: #E0F7FA;
    --accent-color: #00E5FF; /* Cyan/Teal Electric */
    --panel-bg: transparent;
}

[data-active-stream="stream-biology"] {
    --bg-color: #1B1B1B; /* Deep Earth Bio-Char */
    --text-primary: #f5f5f5;
    --accent-color: #E0A96D; /* Luminescent Spore Gold */
    --panel-bg: #0F5257; /* Mycelial Emerald */
}

[data-active-stream="stream-consciousness"] {
    --bg-color: #1A1B41; /* Deep Mind Indigo */
    --text-primary: #E9C46A; /* Synchronicity Pearl */
    --accent-color: #F4A261; /* Retinal Gold */
    --panel-bg: rgba(255,255,255,0.05);
}

/* --- Global Reset & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    position: relative;
    z-index: 0;
}

/* --- Breathing Fluid Background (The Pleroma) --- */
body::before {
    content: "";
    position: fixed;
    top: -50%; left: -50%;
    width: 200vw; height: 200vh;
    background: radial-gradient(circle at 50% 50%, var(--accent-color) 0%, transparent 40%),
                radial-gradient(circle at 30% 70%, var(--text-primary) 0%, transparent 30%);
    opacity: 0.04;
    z-index: -1;
    pointer-events: none;
    animation: pleroma-breathe 15s infinite alternate ease-in-out;
}

@keyframes pleroma-breathe {
    0% { transform: scale(1) translate(0, 0); opacity: 0.03; }
    50% { opacity: 0.06; }
    100% { transform: scale(1.1) translate(2%, 2%); opacity: 0.03; }
}

h1, h2, h3, h4, .badge {
    font-family: var(--font-heading);
}

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

/* --- Utility Classes --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Layout System --- */
#app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 100px 20px;
    position: relative;
    z-index: 10;
    /* Smooth transition to a semi-transparent background so the video remains visible while reading */
    background: linear-gradient(to bottom, transparent 0vh, transparent 50vh, color-mix(in srgb, var(--bg-color) 80%, transparent) 90vh, color-mix(in srgb, var(--bg-color) 80%, transparent) 100%);
}

/* --- Navigation / Stream Selector --- */
.stream-selector-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.secondary-nav {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.secondary-nav a {
    color: var(--text-primary);
    opacity: 0.7;
    transition: opacity 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.secondary-nav a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.nav-contact-btn {
    background: var(--accent-color);
    color: var(--bg-color) !important;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 800;
    opacity: 1 !important;
}

.nav-contact-btn:hover {
    transform: translateY(-2px);
}

.sigil-container {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent-color);
}

.nav-sigil {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stream-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.stream-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.stream-btn:hover {
    border-color: var(--accent-color);
    background: rgba(255,255,255,0.05);
}

.stream-btn.active {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color);
}

/* --- Bottom Stream Selector (Yellow) --- */
.bottom-stream-selector {
    margin: 40px auto 20px auto;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 40px;
}

.bottom-stream-btn {
    border-color: rgba(255, 215, 0, 0.5); /* Yellow border */
    color: #FFD700; /* Yellow text */
}

.bottom-stream-btn:hover, .bottom-stream-btn.active {
    background: #FFD700 !important; /* Solid yellow background */
    color: #000 !important;
    border-color: #FFD700 !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8) !important;
}

/* --- Zone 1: Hero --- */
.zone-hero {
    position: relative;
    margin-top: 75vh; /* Pushes content down so the video dominates the first view */
    margin-bottom: 80px;
    padding: 20px 0 60px 0;
}

/* --- Global Video Background --- */
.global-video-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -2;
    overflow: hidden;
    background: #000;
}

.global-video-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85; /* Slight dimming for better text contrast */
}

.global-video-mask {
    position: absolute;
    top: 0; left: 0;
    width: 40vw; /* Narrower */
    height: 100%;
    /* Much more transparent so the video is highly visible behind the text */
    background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 40%, transparent 100%);
    z-index: 1;
}

.global-overlay-text {
    position: absolute;
    top: 50%;
    left: 8vw;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.title-line {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.05;
    text-shadow: 0 4px 20px rgba(0,0,0,0.9);
}

.author-line {
    font-family: var(--font-primary);
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    font-weight: 400;
    color: var(--accent-color);
    margin-top: 25px; /* Creates the empty "Line 3" gap */
    letter-spacing: 3px;
    text-transform: uppercase;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    border-radius: 20px;
}

#hero-headline {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 800;
}

#hero-subhead {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.8;
    margin-bottom: 40px;
}

.cta-button {
    display: inline-block;
    background: var(--accent-color);
    color: var(--bg-color);
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    text-shadow: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.book-cover-wrapper {
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    perspective: 1000px;
}

.book-cover {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    position: relative;
    z-index: 2;
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.book-cover-wrapper:hover .book-cover {
    transform: rotateY(0deg) rotateX(0deg);
}

.book-glow {
    position: absolute;
    top: 50%; left: 50%;
    width: 100%; height: 100%;
    transform: translate(-50%, -50%);
    background: var(--accent-color);
    filter: blur(80px);
    opacity: 0.2;
    z-index: 1;
}

/* --- Zone 2: Agitation --- */
.zone-agitation {
    margin: 0 0 120px 0;
}

.content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-label {
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: center;
}

.agitation-text {
    font-size: 1.15rem;
    opacity: 0.9;
    text-align: justify;
}

/* --- Image Grids --- */
.agitation-grid, .solution-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.infographic-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.1);
}

.mt-2 { margin-top: 30px; }

/* --- Zone 3: Solution --- */
.zone-solution {
    margin-bottom: 120px;
}

.solution-text-col {
    padding-right: 20px;
}

#solution-body {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* --- Zone 4: Proof --- */
.zone-proof {
    margin-bottom: 80px;
}

.formula-container {
    border-left: 4px solid var(--accent-color);
    padding: 20px 40px;
}

.formula-block {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 30px;
    overflow-x: auto;
    color: var(--accent-color);
}

#formula-explanation {
    font-size: 1.05rem;
    opacity: 0.85;
}

/* --- Zone 5: Conversion --- */
.zone-conversion {
    margin-bottom: 80px;
}

.conversion-box {
    padding: 60px 0;
    text-align: center;
}

.unified-splash {
    max-width: 800px;
    margin: 0 auto 40px auto;
    display: block;
}

.conversion-headline {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

#conversion-body {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.purchase-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.format-btn {
    padding: 12px 24px;
    font-size: 1rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--accent-color);
    color: var(--text-primary);
    border-radius: 30px;
}

.format-btn:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

.secure-checkout {
    margin-top: 20px;
    font-size: 0.85rem;
    opacity: 0.5;
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 40px 0;
    opacity: 0.5;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* --- Oz Factor Transition Effect --- */
.oz-factor-transition {
    animation: oz-shimmer 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes oz-shimmer {
    0% { filter: blur(0px) contrast(1); transform: scale(1); }
    15% { filter: blur(6px) contrast(1.3) hue-rotate(25deg); transform: scale(0.98) skewX(4deg); opacity: 0.7; }
    35% { filter: blur(12px) contrast(1.8) hue-rotate(-25deg); transform: scale(1.03) skewX(-4deg); opacity: 0.4; }
    55% { filter: blur(4px) contrast(1.2) hue-rotate(15deg); transform: scale(0.99) skewX(2deg); opacity: 0.8; }
    75% { filter: blur(8px) contrast(1.5) hue-rotate(-10deg); transform: scale(1.02) skewX(-2deg); opacity: 0.6; }
    100% { filter: blur(0px) contrast(1); transform: scale(1); opacity: 1; }
}

/* --- Responsive Layout --- */
@media (max-width: 900px) {
    .hero-content, .agitation-grid, .solution-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    #hero-headline { font-size: 2.5rem; }
    .book-cover-wrapper { width: 60%; }
    .stream-selector-nav { flex-direction: column; }
    .purchase-buttons { flex-direction: column; gap: 10px; }
}

/* --- Prominent Video Section --- */
.prominent-video-section {
    margin: 40px 0 80px 0;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
}

.prominent-video {
    width: 100%;
    height: auto;
    display: block;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .split-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    #hero-headline {
        font-size: 2.5rem;
    }

    .title-line {
        font-size: 2.5rem;
    }

    .zone-hero {
        margin-top: 50vh; /* Don't push down as much on smaller screens */
    }

    .global-video-mask {
        width: 100vw; /* Cover full width to ensure text readability on mobile */
        background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.5) 50%, transparent 100%);
    }

    .stream-selector-nav {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .nav-left {
        justify-content: center;
    }

    .stream-tabs {
        justify-content: center;
    }

    .purchase-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 0;
        text-align: left;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-dot {
        left: 10px;
    }
    
    .timeline-item:nth-child(even) .timeline-dot {
        left: 10px;
    }
}

@media (max-width: 480px) {
    #hero-headline {
        font-size: 2rem;
    }

    .section-label {
        font-size: 2rem;
    }

    #app-container {
        padding: 0 15px 80px 15px;
    }
}
