/* Core Variables */
:root {
    --prussian-blue: #002D5C; 
    --warm-ivory: #FFFFF0;    
    --faded-ivory: rgba(255, 255, 240, 0.6);
    --locked-grey: rgba(255, 255, 240, 0.2);
    --font-heading: 'Barlow Condensed', sans-serif; 
    --font-body: 'Barlow', sans-serif; 
}

/* Reset & Global */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #000; 
    color: var(--warm-ivory);
    font-family: var(--font-body);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden; 
}

/* The Mobile Container */
#app-container {
    background-color: var(--prussian-blue);
    width: 100%;
    max-width: 430px; 
    height: 100%;
    max-height: 932px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0,0,0,0.8); 
}

/* Screen Management */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: opacity 0.6s ease;
}

.hidden {
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
}

/* ==========================================
   CINEMATIC SPLASH SCREEN
   ========================================== */
#screen-splash {
    background-color: var(--prussian-blue);
    display: flex;
    justify-content: center;
    align-items: center;
}

.splash-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Prevents truncation */
    opacity: 0;
    animation: splashFadeIn 2s ease forwards 0.2s; /* Step 1: Image appears */
}

.splash-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15% 2rem 10% 2rem; 
    pointer-events: none;
    z-index: 5;
}

.splash-title {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 3rem;
    letter-spacing: 8px;
    color: var(--warm-ivory);
    text-align: center;
    opacity: 0;
    animation: splashFadeIn 1.5s ease forwards 1.8s; /* Step 2: Title appears */
}

.splash-subtitle {
    font-family: var(--font-body);
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 4px;
    color: var(--faded-ivory);
    text-align: center;
    opacity: 0;
    animation: splashFadeIn 1.5s ease forwards 3.0s; /* Step 3: Subtitle appears */
}

@keyframes splashFadeIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   GENERAL UI & LAYOUT
   ========================================== */
.content-wrapper {
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2; 
}

/* Scrolling & Media */
.scrollable {
    overflow-y: auto;
    justify-content: flex-start; 
    padding-bottom: 3rem; 
}

.scrollable::-webkit-scrollbar { width: 4px; }
.scrollable::-webkit-scrollbar-thumb { background: var(--faded-ivory); }

.module-header { text-align: center; margin-bottom: 1rem; margin-top: 1rem; }

.media-display { display: flex; flex-direction: column; gap: 15px; margin-bottom: 1.5rem; width: 100%; }

/* Uncropped 9:16 Image Scaling */
#module-image, #vault-image {
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    object-fit: contain; 
    border: 1px solid var(--faded-ivory); 
    background-color: var(--prussian-blue);
    transition: all 1s ease;
}

#module-audio { width: 100%; height: 45px; outline: none; border-radius: 0; }

/* Typography */
.title { font-family: var(--font-heading); text-transform: uppercase; font-weight: 700; font-size: 2.2rem; line-height: 1.1; letter-spacing: 2px; margin-bottom: 0.5rem; }
.subtitle { font-family: var(--font-heading); text-transform: uppercase; font-size: 1rem; letter-spacing: 4px; color: var(--faded-ivory); }
.prompt { font-size: 1.2rem; line-height: 1.6; margin-top: 1.5rem; margin-bottom: 2rem; border-left: 2px solid var(--warm-ivory); padding-left: 1rem; white-space: pre-wrap; }

/* Buttons */
button { background: transparent; border: 1px solid var(--warm-ivory); color: var(--warm-ivory); font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 2px; padding: 1rem; margin: 0.5rem 0; cursor: pointer; transition: all 0.3s ease; width: 100%; }
button:active, button:hover { background: var(--warm-ivory); color: var(--prussian-blue); }
.secondary-btn { border-color: var(--faded-ivory); color: var(--faded-ivory); }

/* ==========================================
   THE MAIN HUB (DASHBOARD)
   ========================================== */
.hub-grid { display: flex; flex-direction: column; gap: 15px; margin-top: 2rem; }
.hub-card { border: 1px solid var(--warm-ivory); padding: 1.5rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; background: rgba(255, 255, 240, 0.03); transition: all 0.3s ease; }
.hub-card.completed { border-color: var(--faded-ivory); color: var(--faded-ivory); }
.hub-card.locked { border-color: var(--locked-grey); color: var(--locked-grey); cursor: not-allowed; background: transparent; }
.hub-card h2 { font-family: var(--font-heading); font-size: 1.2rem; text-transform: uppercase; letter-spacing: 2px; }
.hub-icon { font-size: 1.2rem; }

/* ==========================================
   INTERACTIVE ELEMENTS & MEDITATIVE FADES
   ========================================== */
#interactive-zone { transition: opacity 3s ease-in-out, transform 3s ease-in-out; margin-bottom: 2rem; display: none; }
.fade-out { opacity: 0; pointer-events: none; transform: translateY(15px); }
.fade-in { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* Sliders and Inputs */
.cfq-block { margin-bottom: 2.5rem; }
.cfq-block label { display: block; margin-bottom: 0.5rem; font-size: 1.1rem; line-height: 1.4; }
.slider-wrapper { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 10px; }
.slider-value-label { font-family: var(--font-heading); color: var(--warm-ivory); font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; }

.architectural-slider { -webkit-appearance: none; width: 100%; height: 2px; background: var(--faded-ivory); outline: none; }
.architectural-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--prussian-blue); border: 2px solid var(--warm-ivory); cursor: pointer; }

.architectural-textarea { width: 100%; min-height: 200px; background: rgba(0, 45, 92, 0.5); border: 1px solid var(--warm-ivory); color: var(--warm-ivory); font-family: var(--font-body); font-size: 1.1rem; padding: 1rem; resize: none; outline: none; margin-bottom: 1rem; }
.architectural-textarea::placeholder { color: var(--faded-ivory); }

/* Vault Styling */
.vault-block { margin-bottom: 2rem; }
.vault-block h3 { font-family: var(--font-heading); color: var(--faded-ivory); text-transform: uppercase; font-size: 1rem; letter-spacing: 2px; margin-bottom: 0.5rem; }
.vault-block p { font-size: 1.1rem; line-height: 1.5; white-space: pre-wrap; }
.vault-divider { border: 0; height: 1px; background: var(--faded-ivory); margin: 3rem 0; }
.next-step-block { text-align: center; padding: 2rem; border: 1px solid var(--warm-ivory); background: rgba(255, 255, 240, 0.05); }