/* styles/index.css - 3D Lego Stage & Interactive Index View */

@import url('common.css');

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Splashscreen */
html.skip-splashscreen .intro {
    display: none !important;
}

.intro {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(circle at center, #1a1a1a 0%, #0d0d0d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: top 1s cubic-bezier(0.77, 0, 0.175, 1);
    cursor: pointer;
}

.intro svg {
    width: 90%;
    max-width: 692px;
    height: auto;
}

#splashscreen {
    animation: fill 0.7s ease forwards 3.4s;
}

#splashscreen path:nth-child(1) { stroke-dasharray: 502px; stroke-dashoffset: 502px; animation: line-anim 4s ease forwards 2.4s; }
#splashscreen path:nth-child(2) { stroke-dasharray: 837px; stroke-dashoffset: 837px; animation: line-anim 4s ease forwards 2.1s; }
#splashscreen path:nth-child(3) { stroke-dasharray: 1290px; stroke-dashoffset: 1290px; animation: line-anim 4s ease forwards 1.8s; }
#splashscreen path:nth-child(4) { stroke-dasharray: 900px; stroke-dashoffset: 900px; animation: line-anim 4s ease forwards 1.5s; }
#splashscreen path:nth-child(5) { stroke-dasharray: 870px; stroke-dashoffset: 870px; animation: line-anim 4s ease forwards 1.2s; }
#splashscreen path:nth-child(6) { stroke-dasharray: 569px; stroke-dashoffset: 569px; animation: line-anim 4s ease forwards 0.9s; }
#splashscreen path:nth-child(7) { stroke-dasharray: 837px; stroke-dashoffset: 837px; animation: line-anim 4s ease forwards 0.6s; }
#splashscreen path:nth-child(8) { stroke-dasharray: 1390px; stroke-dashoffset: 1390px; animation: line-anim 4s ease forwards 0.3s; }

@keyframes line-anim { to { stroke-dashoffset: 0; } }
@keyframes fill { from { fill: transparent; } to { fill: rgb(var(--bright)); } }

/* --- Main Layout Container --- */
.main-wrapper {
    position: relative;
    width: 100vw;
    min-width: 320px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 1.5rem;
}

/* --- Mobile Device Desktop Recommendation Toast --- */
.mobile-device-banner {
    position: fixed;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%) translateY(-140%);
    width: calc(100% - 2rem);
    max-width: 440px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.15rem;
    background: rgba(22, 26, 30, 0.94);
    border: 1px solid rgba(var(--colour-glow), 0.4);
    border-radius: 12px;
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7), 0 0 24px rgba(var(--colour), 0.22);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.mobile-device-banner.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: all;
}

.mobile-banner-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 8px;
    background: rgba(var(--colour), 0.18);
    border: 1px solid rgba(var(--colour-glow), 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(var(--colour-glow));
    flex-shrink: 0;
}

.mobile-banner-content {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.mobile-banner-title {
    display: block;
    font-family: var(--ff-heading);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 0.15rem;
}

.mobile-banner-desc {
    font-size: 0.78rem;
    line-height: 1.35;
    color: rgba(var(--bright), 0.85);
    margin: 0;
}

.mobile-banner-close {
    background: transparent;
    border: none;
    color: rgba(var(--bright), 0.55);
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
    padding: 0;
}

.mobile-banner-close:hover,
.mobile-banner-close:active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

/* Header Branding */
.site-header {
    position: absolute;
    top: 2rem;
    left: 2.5rem;
    z-index: 20;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent !important;
}

.brand-logo {
    width: 32px;
    height: auto;
}

.brand-title {
    font-family: var(--ff-heading);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* --- Large Centered Hover Information Display --- */
.hover-info-center {
    position: absolute;
    top: calc(50% - 290px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 30;
    pointer-events: none;
    width: 100%;
    max-width: 500px;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.info-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.85rem 1.8rem;
    border-radius: 16px;
    background: rgba(25, 25, 25, 0.85);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(var(--bright), 0.14);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    transition: all 0.35s ease;
    width: 100%;
}

.info-tag {
    font-family: var(--ff-heading);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgb(var(--colour));
    margin-bottom: 0.2rem;
    transition: color 0.3s ease;
}

.info-title {
    font-family: var(--ff-heading);
    font-size: 1.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
}

.info-desc {
    font-size: 0.88rem;
    color: rgba(var(--bright), 0.78);
    line-height: 1.35;
    transition: color 0.3s ease;
}

/* Hover Accent Color Themes for Centered Info Badge */
.hover-info-center.theme-yellow .info-badge {
    border-color: rgba(var(--yellow1), 0.75);
    box-shadow: 0 12px 35px rgba(254, 223, 47, 0.25);
}
.hover-info-center.theme-yellow .info-tag,
.hover-info-center.theme-yellow .info-title {
    color: rgb(var(--yellow1));
}

.hover-info-center.theme-red .info-badge {
    border-color: rgba(var(--red1), 0.75);
    box-shadow: 0 12px 35px rgba(241, 121, 146, 0.25);
}
.hover-info-center.theme-red .info-tag,
.hover-info-center.theme-red .info-title {
    color: rgb(var(--red1));
}

.hover-info-center.theme-blue .info-badge {
    border-color: rgba(var(--blue1), 0.75);
    box-shadow: 0 12px 35px rgba(64, 168, 208, 0.25);
}
.hover-info-center.theme-blue .info-tag,
.hover-info-center.theme-blue .info-title {
    color: rgb(var(--blue1));
}

/* Real 3D WebGL Canvas Stage */
.webgl-stage {
    position: relative;
    width: min(90vw, 480px);
    height: min(48vh, 440px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 4.5rem;
    cursor: grab;
    background: transparent !important;
    outline: none !important;
    border: none !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
}

#webgl-canvas {
    width: 100%;
    height: 100%;
    outline: none !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
}

/* Footer Navigation Chips */
.footer-nav {
    position: absolute;
    bottom: 2.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    z-index: 20;
}

.nav-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.1rem;
    font-family: var(--ff-heading);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none !important;
    border-radius: 8px;
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    border: 1px solid rgba(var(--bright), 0.15);
    -webkit-tap-highlight-color: transparent !important;
}

.chip-btn::after {
    display: none !important;
}

.chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.chip-yellow .chip-dot { background: rgb(var(--yellow1)); box-shadow: 0 0 8px rgba(var(--yellow1), 0.8); }
.chip-yellow:hover,
.chip-yellow.active-hover { 
    border-color: rgb(var(--yellow1)); 
    background: rgba(254, 223, 47, 0.22); 
    transform: translateY(-2px); 
    box-shadow: 0 4px 16px rgba(254, 223, 47, 0.35);
}

.chip-red .chip-dot { background: rgb(var(--red1)); box-shadow: 0 0 8px rgba(var(--red1), 0.8); }
.chip-red:hover,
.chip-red.active-hover { 
    border-color: rgb(var(--red1)); 
    background: rgba(241, 121, 146, 0.22); 
    transform: translateY(-2px); 
    box-shadow: 0 4px 16px rgba(241, 121, 146, 0.35);
}

.chip-blue .chip-dot { background: rgb(var(--blue1)); box-shadow: 0 0 8px rgba(var(--blue1), 0.8); }
.chip-blue:hover,
.chip-blue.active-hover { 
    border-color: rgb(var(--blue1)); 
    background: rgba(64, 168, 208, 0.22); 
    transform: translateY(-2px); 
    box-shadow: 0 4px 16px rgba(64, 168, 208, 0.35);
}

.interaction-hint {
    font-size: 0.82rem;
    color: rgba(var(--bright), 0.65);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* --- Mobile & Small Screen Responsive Overrides --- */
@media (max-width: 768px) {
    .site-header {
        top: 1.25rem;
        left: 1.25rem;
    }

    .brand-logo {
        width: 28px;
    }

    .brand-title {
        font-size: 1.35rem;
    }

    .hover-info-center {
        top: 4.6rem;
        max-width: 90%;
    }

    .info-badge {
        padding: 0.65rem 1.2rem;
        border-radius: 12px;
    }

    .info-tag {
        font-size: 0.78rem;
    }

    .info-title {
        font-size: 1.55rem;
    }

    .info-desc {
        font-size: 0.8rem;
    }

    .webgl-stage {
        width: min(92vw, 360px);
        height: min(44vh, 340px);
        margin-top: 3.2rem;
    }

    .footer-nav {
        bottom: 1.25rem;
        gap: 0.5rem;
    }

    .nav-chips {
        gap: 0.5rem;
    }

    .chip-btn {
        padding: 0.4rem 0.85rem;
        font-size: 0.9rem;
    }

    .interaction-hint {
        font-size: 0.72rem;
    }
}

@media (max-height: 680px) and (max-width: 768px) {
    .hover-info-center {
        top: 3.8rem;
    }

    .webgl-stage {
        height: min(38vh, 280px);
        margin-top: 2.5rem;
    }

    .footer-nav {
        bottom: 0.75rem;
    }
}