/* =========================================
GLOBAL VARIABLES
========================================= */
:root {
    --primary-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --accent-font: 'Cinzel Decorative', serif;
    --bg-overlay: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
    --text-color: #ffffff;
    --shadow-heavy: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-icon: 0 2px 4px rgba(0, 0, 0, 0.8);
    --transition-standard: 0.3s ease;
    --transition-smooth: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* =========================================
2. ICON-SPECIFIC VARIABLES (Scoped)
========================================= */
.icon-wrapper:nth-child(1) {
    --icon-y: -10px;
    --icon-base-scale: 1.1;
    --icon-hover-scale: 1.5;
    --icon-active-scale: 1.5;
}
.icon-wrapper:nth-child(2) {
    --icon-y: 0px;
    --icon-base-scale: 1;
    --icon-hover-scale: 1.1;
    --icon-active-scale: 1.1;
}
.icon-wrapper:nth-child(3) {
    --icon-y: 0px;
    --icon-base-scale: 0.8;
    --icon-hover-scale: 0.9;
    --icon-active-scale: 0.9;
}

/* =========================================
3. BASE RESETS & LAYOUT
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--primary-font);
    
    /* 🔥 FIX: Removed background-color so no black can bleed through */
    
    /* 🔥 FIX: 100svh (Small Viewport Height) ignores the mobile browser URL bar */
    min-height: 100vh; 
    min-height: 100svh; 
    
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    
    /* 🔥 FIX: Matches the exact visible screen height, ignoring the URL bar */
    height: 100vh; 
    height: 100svh; 
    
    z-index: -1;
    background-image: url('./images/landing/background_pc.webp');
    
    /* 🔥 FIX: 100% 100% forces the image to fill the screen exactly. 
       This guarantees 100% visibility AND zero black gaps. */
    background-size: 100% 100%; 
    
    background-position: center center;
    background-repeat: no-repeat;
}

.overlay {
    position: absolute;
    inset: 0;
    background-image: var(--bg-overlay);
    z-index: 1;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 2;
    
    /* 🔥 FIX: 100svh ensures the container ends exactly at the bottom of the visible screen */
    height: 100vh;
    height: 100svh; 
    
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    touch-action: pan-y pinch-zoom;
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 60vh;
    height: 100%;
    width: 100%;
    max-width: 1200px;
}

.icons-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    animation: fadeIn 1.5s ease-out;
}

.carousel {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    touch-action: pan-y pinch-zoom;
}

/* =========================================
4. ICON & HOVER RESPONSIVENESS
========================================= */
.icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    touch-action: pan-y pinch-zoom;
    -webkit-tap-highlight-color: transparent;
}

.icon {
    width: auto;
    max-width: 200px;
    height: 230px;
    object-fit: contain;
    filter: drop-shadow(var(--shadow-icon));
}

/* Base State (All Children) */
.icon-wrapper .icon {
    max-width: var(--icon-max-width, 200px);
    transform-origin: center center;
    transform: translateY(var(--icon-y)) scale(var(--icon-base-scale));
    transition: transform var(--transition-standard), filter var(--transition-standard), opacity var(--transition-standard);
}

/* Responsive Hover State (Desktop/Mouse only) */
@media (hover: hover) {
    .icon-wrapper:hover .icon {
        transform: translateY(var(--icon-y)) scale(var(--icon-hover-scale));
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.6));
    }
    .icon-wrapper:hover .icon-label {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Active State (Mobile Tap / Click) */
.icon-wrapper.active .icon {
    transform: translateY(var(--icon-y)) scale(var(--icon-active-scale));
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.6));
}

.icon-label {
    font-family: var(--accent-font);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity var(--transition-standard), transform var(--transition-standard);
    pointer-events: none;
    white-space: nowrap;
}

/* =========================================
5. ABOUT SECTION
========================================= */
.about-section {
    width: 100%;
    margin: 0;
    padding: 3rem 2vw;
    background: rgba(110, 25, 25, 0.75);
    position: relative;
    z-index: 10;
    border-top: 1px solid rgba(245, 240, 232, 0.15);
    border-bottom: 1px solid rgba(245, 240, 232, 0.15);
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.about-title {
    font-family: 'Times New Roman', Times, serif;
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: #f5f0e8;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.2s;
}

.about-text {
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.1rem;
    line-height: 1.9;
    color: #f5f0e8;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-align: justify;
    hyphens: auto;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
6. MOBILE STYLES (Max Width 768px)
========================================= */
@media (max-width: 768px) {
    body::before {
        background-image: url('./images/landing/background_mobile.webp');
        /* 🔥 FIX: Ensure mobile also stretches to 100% to prevent black gaps */
        background-size: 100% 100%; 
    }

    .container {
        padding: 1rem;
        perspective: 1000px;
        overflow: hidden;
    }

    .logo-section {
        padding-top: 70%;
        width: 100%;
        height: 100%;
    }

    .icons-row {
        gap: 0;
        width: 100%;
        height: 320px;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        perspective: 1000px;
        z-index: 10;
        margin: 0;
    }

    .carousel {
        width: 100px;
        height: 100px;
        position: relative;
        transform-style: preserve-3d;
        transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
        will-change: transform;
        touch-action: pan-y pinch-zoom;
    }

    .icon-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        touch-action: pan-y pinch-zoom;
    }

    /* 3D Carousel Positions */
    .icon-wrapper:nth-child(1) { transform: rotateY(0deg) translateZ(120px); }
    .icon-wrapper:nth-child(2) { transform: rotateY(120deg) translateZ(120px); }
    .icon-wrapper:nth-child(3) { transform: rotateY(240deg) translateZ(120px); }

    .icon {
        max-width: 150px;
        max-height: 150px;
        transition: transform var(--transition-smooth), filter var(--transition-smooth);
        filter: brightness(0.5) blur(1px);
    }

    /* Mobile Active State (Tap) */
    .icon-wrapper.active .icon {
        filter: brightness(1) blur(0) drop-shadow(0 0 15px rgba(255, 255, 255, 0.6));
    }

    .icon-label {
        margin-top: 0.5rem;
        font-size: 1.2rem; 
        opacity: 0;
        transform: translateY(10px);
        transition: all 0.3s ease;
        text-align: center;
        position: absolute;
        bottom: -60px; 
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
        pointer-events: none;
    }

    .icon-wrapper.active .icon-label {
        opacity: 1;
        transform: translateY(0);
    }

    .about-section {
        padding: 3rem 1.5rem;
    }

    .about-title {
        font-size: 1.6rem;
        letter-spacing: 0.12em;
        margin-bottom: 1.5rem;
    }

    .about-text {
        font-size: 0.95rem;
        line-height: 1.7;
        text-align: left;
    }
}