/*
 * ============================================
 * SPLASH PAGE STYLES
 * ============================================
 * 
 * Table of Contents:
 * 1. CSS Variables
 * 2. Reset & Base Styles
 * 3. Layout
 * 4. Artwork Container
 * 5. Image Layers & Positioning
 * 6. Clickable Hotspots
 * 7. Hover Effects - Button Swaps
 * 8. Hover Effects - Animations
 * 9. Instructions Text
 * 10. Responsive / Mobile
 *
 * ============================================
 */


/* ============================================
   1. CSS VARIABLES
   ============================================
   Edit these to change colors/fonts site-wide
*/

:root {
    --bg-color: #b7b4a3;
    --text-color: #4c4741;
    --font-main: "Times New Roman", Times, serif;
}


/* ============================================
   2. RESET & BASE STYLES
   ============================================
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    background-color: var(--bg-color);
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}


/* ============================================
   3. LAYOUT
   ============================================
*/

.splash-container {
    text-align: center;
    padding: 20px;
    width: 100%;
}


/* ============================================
   4. ARTWORK CONTAINER
   ============================================
   This container holds all images and hotspots.
   Position: relative makes it the reference 
   point for all absolutely positioned children.
*/

.artwork {
    position: relative;
    display: inline-block;
    max-width: 100%;
}


/* ============================================
   5. IMAGE LAYERS & POSITIONING
   ============================================
*/

/* --- Base body image --- 
   This sets the size of the container.
   All other images are positioned relative to this.
*/
.body-base {
    display: block;
    max-height: 99vh;
    width: auto;
    position: relative;
    z-index: 2;
}

/* --- Shared styles for all overlay images --- */
.soul-organ,
.mind-organ,
.heart-organ,
.mind-btn-static,
.mind-btn-hover,
.heart-btn-static,
.heart-btn-hover,
.soul-btn-static,
.soul-btn-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* --- Soul (sun/halo) ---
   Special positioning: cropped image, sits BEHIND body
*/
.soul-organ {
    width: 55%;
    height: auto;
    top: 2%;
    left: 22.5%;
    z-index: 1;
    transform-origin: center center;
}

/* --- Mind & Heart organs --- 
   These sit IN FRONT of the body
*/
.mind-organ,
.heart-organ {
    z-index: 3;
}

/* --- All buttons ---
   Buttons sit on top of everything except hotspots
*/
.mind-btn-static,
.mind-btn-hover,
.heart-btn-static,
.heart-btn-hover,
.soul-btn-static,
.soul-btn-hover {
    z-index: 4;
}

/* --- Button visibility ---
   Static buttons: always visible
   Hover buttons: hidden until hover
*/
.mind-btn-static,
.heart-btn-static,
.soul-btn-static {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.mind-btn-hover,
.heart-btn-hover,
.soul-btn-hover {
    opacity: 0;
    transition: opacity 0.3s ease;
}


/* ============================================
   6. CLICKABLE HOTSPOTS
   ============================================
   Invisible boxes positioned over interactive areas.
   Users click/hover these to trigger effects.
*/

.hotspot {
    position: absolute;
    z-index: 50;
    cursor: pointer;
    /* Uncomment below to debug hotspot positions: */
    /* background: rgba(255, 0, 0, 0.3); */
}

/* --- Body region hotspots --- */
.hotspot-soul-area {
    top: 0;
    left: 20%;
    width: 60%;
    height: 18%;
}

.hotspot-mind-area {
    top: 8%;
    left: 25%;
    width: 50%;
    height: 22%;
}

.hotspot-heart-area {
    top: 30%;
    left: 30%;
    width: 40%;
    height: 20%;
}

/* --- Button hotspots ---
   Positioned over where buttons appear in the image
*/
.hotspot-soul-btn {
    top: 3%;
    right: 2%;
    width: 20%;
    height: 10%;
}

.hotspot-mind-btn {
    top: 10%;
    left: 2%;
    width: 22%;
    height: 10%;
}

.hotspot-heart-btn {
    top: 34%;
    right: 2%;
    width: 22%;
    height: 10%;
}


/* ============================================
   7. HOVER EFFECTS - BUTTON SWAPS
   ============================================
   When hovering a hotspot, hide static button
   and show hover button.
   
   Uses :has() selector - supported in all 
   modern browsers (Chrome 105+, Firefox 121+, 
   Safari 15.4+)
*/

/* --- Soul button swap --- */
.artwork:has(.hotspot-soul-area:hover) .soul-btn-static,
.artwork:has(.hotspot-soul-btn:hover) .soul-btn-static {
    opacity: 0;
}

.artwork:has(.hotspot-soul-area:hover) .soul-btn-hover,
.artwork:has(.hotspot-soul-btn:hover) .soul-btn-hover {
    opacity: 1;
}

/* --- Mind button swap --- */
.artwork:has(.hotspot-mind-area:hover) .mind-btn-static,
.artwork:has(.hotspot-mind-btn:hover) .mind-btn-static {
    opacity: 0;
}

.artwork:has(.hotspot-mind-area:hover) .mind-btn-hover,
.artwork:has(.hotspot-mind-btn:hover) .mind-btn-hover {
    opacity: 1;
}

/* --- Heart button swap --- */
.artwork:has(.hotspot-heart-area:hover) .heart-btn-static,
.artwork:has(.hotspot-heart-btn:hover) .heart-btn-static {
    opacity: 0;
}

.artwork:has(.hotspot-heart-area:hover) .heart-btn-hover,
.artwork:has(.hotspot-heart-btn:hover) .heart-btn-hover {
    opacity: 1;
}


/* ============================================
   8. HOVER EFFECTS - ANIMATIONS
   ============================================
*/

/* --- Mind: Gentle floating up and down --- */
@keyframes float {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(-6px); 
    }
}

.artwork:has(.hotspot-mind-area:hover) .mind-organ,
.artwork:has(.hotspot-mind-btn:hover) .mind-organ {
    animation: float 3s ease-in-out infinite;
}

/* --- Heart: Beating pulse --- */
@keyframes beat {
    0%, 100% { 
        transform: scale(1); 
    }
    15% { 
        transform: scale(1.05); 
    }
    30% { 
        transform: scale(1); 
    }
    45% { 
        transform: scale(1.05); 
    }
}

.artwork:has(.hotspot-heart-area:hover) .heart-organ,
.artwork:has(.hotspot-heart-btn:hover) .heart-organ {
    animation: beat 1.2s ease-in-out infinite;
}

/* --- Soul: Spinning rotation --- */
@keyframes spin {
    from { 
        transform: rotate(0deg); 
    }
    to { 
        transform: rotate(360deg); 
    }
}

.artwork:has(.hotspot-soul-area:hover) .soul-organ,
.artwork:has(.hotspot-soul-btn:hover) .soul-organ {
    animation: spin 8s linear infinite;
}


/* ============================================
   9. INSTRUCTIONS TEXT
   ============================================
*/

.instructions {
    margin-top: 20px;
    font-size: 1.2em;
    font-style: italic;
    letter-spacing: 0.1em;
    animation: fade-in 2s ease-in;
}

@keyframes fade-in {
    from { 
        opacity: 0; 
    }
    to { 
        opacity: 1; 
    }
}


/* ============================================
   10. RESPONSIVE / MOBILE
   ============================================
*/

@media screen and (max-width: 768px) {
    .body-base {
        max-height: 86vh;
    }
    
    .instructions {
        font-size: 1em;
        margin-top: 15px;
    }
}

@media screen and (max-width: 480px) {
    .splash-container {
        padding: 10px;
    }
    
    .body-base {
        max-height: 79vh;
    }
}