/* styles.css */
:root {
    --color-primary-green: #4caf50;
    --color-primary-red: #f44336;
    --color-primary-blue: #29b6f6;
    --color-primary-yellow: #ffca28;
    --color-panel-bg: #fdf5e6;
    --color-text-dark: #3e2723;
    --color-text-light: #ffffff;
    
    --border-color: #3e2723;
    --border-width: 3px;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    /* Sombras duras estilo cartoon/sticker das referências */
    --shadow-solid: 4px 4px 0px var(--border-color);
    --shadow-solid-sm: 2px 2px 0px var(--border-color);
    
    --font-main: 'Nunito', sans-serif;
    
    --safe-bottom: env(safe-area-inset-bottom, 16px);
}

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

body, html {
    width: 100%; height: 100%;
    font-family: var(--font-main);
    color: var(--color-text-dark);
    overflow: hidden;
    background: #000;
}

/* Falso Panorama */
#panorama-placeholder {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Use an image of a colorful kids place if possible, or a colorful gradient */
    background: linear-gradient(135deg, #a8e063 0%, #56ab2f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.placeholder-text {
    font-size: 2.5rem;
    font-weight: 900;
    color: rgba(255,255,255,0.9);
    text-shadow: 2px 2px 0px rgba(0,0,0,0.2);
}

/* Camada AERON */
.aeron-skin {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.aeron-skin > * {
    pointer-events: auto;
}

.desktop-only { display: none; }
@media (min-width: 768px) {
    .desktop-only { display: inline-flex; }
}
.mobile-only { display: inline-flex; }
@media (min-width: 768px) {
    .mobile-only { display: none; }
}

button {
    font-family: var(--font-main);
    border: var(--border-width) solid var(--border-color);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 900;
    transition: transform 0.1s, box-shadow 0.1s;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-solid);
}
button:active { 
    transform: translate(4px, 4px); 
    box-shadow: 0px 0px 0px var(--border-color); 
}

/* Header */
.top-bar {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-container {
    background: #fff;
    padding: 8px 12px;
    border-radius: var(--radius-lg);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-solid);
}
.logo {
    height: 60px;
    width: auto;
    display: block;
}

.stats-pill {
    background: var(--color-panel-bg);
    padding: 8px 32px;
    border-radius: var(--radius-pill);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-solid);
    display: flex;
    gap: 40px;
}
.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.stat-val { font-size: 1.6rem; font-weight: 900; line-height: 1.1; }
.stat-label { font-size: 0.7rem; font-weight: 900; color: var(--color-text-dark); text-transform: uppercase; letter-spacing: 0.5px; }

#stat-pessoas { color: var(--color-primary-yellow); }
#stat-brinquedos { color: var(--color-primary-blue); }
#stat-duracao { color: var(--color-primary-red); }

#btn-contact {
    background: var(--color-primary-green);
    color: #fff;
    padding: 12px 24px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

#btn-menu-mobile {
    background: #fff;
    color: var(--color-text-dark);
    padding: 12px 20px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

/* Scene Label */
.scene-label {
    position: absolute;
    bottom: 110px;
    left: 24px;
}
.scene-label span {
    background: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-weight: 900;
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-solid);
    color: var(--color-text-dark);
    font-size: 0.95rem;
    text-transform: uppercase;
    display: inline-block;
}

/* Bottom Dock (Desktop) */
.bottom-dock {
    padding: 24px;
    padding-bottom: calc(24px + var(--safe-bottom));
    display: flex;
    justify-content: center;
    width: 100%;
}
.dock-container {
    display: flex;
    gap: 16px;
    background: var(--color-panel-bg);
    padding: 16px 24px;
    border-radius: var(--radius-pill);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-solid);
}

.dock-btn {
    flex-direction: column;
    padding: 16px;
    min-width: 100px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--color-text-light);
}
.dock-btn svg { margin-bottom: 8px; }
.dock-btn.bg-blue { background: var(--color-primary-blue); }
.dock-btn.bg-yellow { background: var(--color-primary-yellow); color: var(--color-text-dark); }
.dock-btn.bg-red { background: var(--color-primary-red); }
.dock-btn.bg-green { background: var(--color-primary-green); }
.dock-btn.bg-white { background: #fff; color: var(--color-text-dark); }

/* Painéis Modais */
.panel-backdrop {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    backdrop-filter: blur(4px);
}
.panel-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.panel {
    background: var(--color-panel-bg);
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    border-radius: var(--radius-lg);
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-solid);
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}
.panel-backdrop.active .panel { transform: translateY(0); }

.btn-close {
    position: absolute;
    top: 24px; right: 24px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: #fff;
    color: var(--color-text-dark);
    padding: 0;
    z-index: 2;
}

.panel-header {
    padding: 32px 40px 16px;
}
.panel-title { font-size: 2rem; font-weight: 900; margin-top: 4px; color: var(--color-text-dark); }
.panel-subtitle { font-size: 0.9rem; color: var(--color-primary-red); font-weight: 900; text-transform: uppercase; letter-spacing: 1px; }

.panel-content {
    padding: 16px 40px 40px;
    overflow-y: auto;
    flex: 1;
}

.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 24px;
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-solid);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
}
.card:active {
    transform: translate(4px, 4px); 
    box-shadow: 0px 0px 0px var(--border-color); 
}

.card-badge {
    flex-shrink: 0;
    width: 48px; height: 48px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 900; font-size: 1.4rem;
    border: var(--border-width) solid var(--border-color);
}
.card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.card-title { font-size: 1.2rem; font-weight: 900; color: var(--color-text-dark); }
.card-desc { font-size: 0.9rem; color: #555; line-height: 1.4; font-weight: 700;}

/* Responsive adjustments */
@media (max-width: 767px) {
    .top-bar {
        padding: 16px;
        flex-wrap: wrap;
        gap: 12px;
    }
    .logo-container {
        padding: 4px;
        border-radius: var(--radius-md);
    }
    .logo { height: 40px; }
    
    #btn-contact { padding: 0; width: 48px; height: 48px; border-radius: 50%; }
    #btn-contact svg { width: 20px; height: 20px; }

    .stats-pill {
        width: 100%;
        order: 3;
        justify-content: space-between;
        padding: 12px 24px;
        gap: 12px;
    }
    .stat-val { font-size: 1.2rem; }
    
    /* Mobile main dock logic */
    .bottom-dock {
        display: none; /* Hide desktop dock */
    }
    
    /* Panel becomes a huge bottom sheet */
    .panel {
        width: 100%;
        max-height: 90vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        border-bottom: none;
        align-self: flex-end;
        transform: translateY(100%);
    }
    .panel-header { padding: 24px 24px 12px; }
    .panel-content { padding: 12px 24px 24px; }
    .btn-close { top: 16px; right: 16px; width: 40px; height: 40px; }
    
    .card-list {
        grid-template-columns: 1fr;
    }
    .card {
        padding: 16px;
        border-radius: var(--radius-md);
    }
}

/* Mobile horizontal */
@media (max-height: 500px) and (orientation: landscape) {
    .top-bar { padding: 12px 20px; }
    .logo { height: 40px; }
    .bottom-dock { padding: 12px; padding-bottom: calc(12px + var(--safe-bottom)); }
    .dock-btn { padding: 8px 16px; flex-direction: row; gap: 8px; border-radius: var(--radius-pill); }
    .dock-btn svg { margin-bottom: 0; width: 16px; height: 16px; }
    .scene-label { bottom: 80px; left: 16px; transform: none; }
    .panel { 
        max-height: 95vh; 
        align-self: center;
        border-radius: var(--radius-lg);
        border-bottom: var(--border-width) solid var(--border-color);
    }
}

/* --- SPLASH SCREEN (NOVO MOCKUP) --- */
.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    background: #fdfaf6;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    font-family: 'Nunito', sans-serif;
    overflow-x: hidden;
}

/* Photo area */
.splash-photo-area {
    position: relative;
    flex: 1;
    background: url('assets/bg-splash.jpg') center/cover no-repeat;
    display: flex;
    flex-direction: column;
}

/* Aeron Badge on Photo (Desktop) */
.splash-aeron-badge {
    position: absolute;
    top: 24px;
    left: 24px;
    background: #fff;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-solid);
    border: var(--border-width) solid var(--border-color);
}

/* Label sizes */
.aeron-label {
    font-size: 0.6rem;
    font-weight: 900;
    color: var(--color-primary-blue);
    margin-bottom: 4px;
}
.splash-aeron-badge img,
.splash-aeron-footer img {
    height: 16px;
}

/* Content Area */
.splash-content-area {
    flex: 1;
    max-width: 600px;
    background: #fdfaf6;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    border-left: var(--border-width) solid var(--border-color);
    box-shadow: -4px 0px 0px rgba(62, 39, 35, 1);
}

.splash-content-inner {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
}

/* Header (Logo + Badge) */
.splash-header-desktop {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
}

.splash-kinder-card {
    background: #fff;
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-solid);
    display: inline-flex;
}

.splash-kinder-card img {
    width: 140px;
}

.splash-tour-badge {
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 8px 16px;
    font-weight: 900;
    font-size: 0.75rem;
    color: var(--color-text-dark);
    background: #fff;
    letter-spacing: 1px;
}

/* Typography */
.splash-kicker {
    font-weight: 900;
    font-size: 0.75rem;
    color: var(--color-text-dark);
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}

.splash-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--color-text-dark);
    line-height: 1.1;
    margin-bottom: 16px;
    position: relative;
    letter-spacing: -1px;
}

.title-dot {
    color: var(--color-text-dark);
}

/* Sun rays SVG */
.title-rays {
    position: absolute;
    right: -10px;
    bottom: -10px;
    width: 80px;
    height: 80px;
    transform: rotate(-10deg);
}

.splash-desc {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 40px;
    line-height: 1.4;
}

/* Actions */
.splash-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.btn-splash-outline,
.btn-splash-solid {
    flex: 1;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 900;
    padding: 16px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: transform 0.2s;
    text-align: center;
}

.btn-splash-outline {
    background: transparent;
    border: var(--border-width) solid var(--color-text-dark);
    color: var(--color-text-dark);
}

.btn-splash-solid {
    background: var(--color-primary-green);
    border: 2px solid var(--color-primary-green);
    color: #fff;
}

.btn-splash-outline:hover,
.btn-splash-solid:hover {
    transform: translateY(-2px);
}

/* Progress bar section */
.splash-progress-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.splash-progress-labels {
    display: flex;
    justify-content: space-between;
    font-weight: 900;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--color-text-dark);
}

.splash-progress-bar {
    display: flex;
    height: 12px;
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.splash-progress-bar .bar-blue { flex: 1; background: var(--color-primary-blue); }
.splash-progress-bar .bar-red { flex: 1; background: var(--color-primary-red); }
.splash-progress-bar .bar-yellow { flex: 1; background: var(--color-primary-yellow); }
.splash-progress-bar .bar-green { flex: 1; background: var(--color-primary-green); }

.splash-progress-note {
    font-size: 0.8rem;
    font-weight: 700;
    color: #666;
    margin-top: 4px;
}

.splash-aeron-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 32px;
}

.desktop-only { display: flex; }
.mobile-only { display: none; }

/* Loading State */
.splash-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--color-primary-green);
    font-weight: 900;
    margin-bottom: 40px;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--color-primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* MOBILE ADAPTATION (Vertical) */
@media (max-width: 900px) {
    .splash-screen {
        flex-direction: column;
    }
    
    .splash-photo-area {
        flex: 0 0 50%; /* Top half is photo */
        border-bottom: var(--border-width) solid var(--border-color);
    }
    
    .desktop-only { display: none !important; }
    .mobile-only { display: flex; }
    
    /* Center Kinder logo overlapping the border */
    .splash-kinder-badge {
        position: absolute;
        bottom: -50px;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: column;
        align-items: center;
        gap: 8px;
        z-index: 10;
    }
    
    .splash-content-area {
        flex: 1;
        max-width: none;
        border-left: none;
        box-shadow: none;
        padding: 64px 24px 32px; /* Extra padding top for logo overlap */
        border-radius: 32px 32px 0 0;
        background: #fdfaf6;
        margin-top: -32px; /* Pull up to round the corners over photo */
        position: relative;
        z-index: 5;
        border-top: var(--border-width) solid var(--border-color);
        box-shadow: 0px -4px 0px rgba(62, 39, 35, 1);
        justify-content: flex-start;
    }

    .splash-title {
        font-size: 2.8rem;
    }
    .title-rays {
        width: 60px;
        height: 60px;
        right: -5px;
        bottom: 0;
    }

    .splash-desc {
        font-size: 1rem;
    }

    .splash-actions {
        flex-direction: column;
    }
    .btn-splash-outline,
    .btn-splash-solid {
        width: 100%;
    }
    
    .splash-progress-section {
        margin-top: auto; /* Push to bottom */
    }
    
    .splash-aeron-footer {
        margin-top: 24px;
    }
}
