:root {
    --primary: #ffffff;
    --accent: #00d2ff;
    --accent-dark: #3a7bd5;
    --bg-dark: #050508;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body, html {
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    color: var(--primary);
    overflow-x: hidden;
    overflow-y: auto;
    perspective: 2000px;
}

/* Video Background Layer */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -3;
    overflow: hidden;
}

#bg-video {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    transform: scale(1.1); /* To allow panning if wanted */
    filter: saturate(1.2) contrast(1.1);
}

.video-atmosphere {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, transparent 20%, rgba(5, 5, 8, 0.85) 80%),
                linear-gradient(to bottom, rgba(5,5,8,0.4) 0%, rgba(5,5,8,0.95) 100%);
    mix-blend-mode: multiply;
}

/* Canvas Layer */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
    mix-blend-mode: screen;
}

/* UI Layer */
.ui-layer {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    padding: 5vh 20px;
}

/* Header */
.hero-header {
    text-align: center;
    margin-bottom: 8vh;
    animation: fadeInDown 1.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    opacity: 0;
    transform: translateY(-50px);
}

.glitch {
    font-size: 4rem;
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
    letter-spacing: 4px;
    background: linear-gradient(90deg, #fff, #a2d2ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 210, 255, 0.5);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 200;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: #ccc;
    margin-bottom: 20px;
}

.tech-tags {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.tech-tags span {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* iPhones Showcase */
.iphone-showcase {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2vw; /* Reduced gap since we added padding to buttons */
    flex-wrap: wrap;
    flex-grow: 1;
    perspective: 2000px;
    transform-style: preserve-3d;
}

.iphone-btn {
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    outline: none;
    transform-style: preserve-3d;
    opacity: 0;
    cursor: pointer;
    /* Create a massive, forgiving invisible hitbox around the phone */
    padding: 30px;
    border-radius: 40px;
    animation: floatingPhones 2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: calc(0.2s * var(--i));
    transform: translateY(100px) translateZ(-500px) rotateX(20deg);
}

.iphone-3d-wrapper {
    position: relative;
    width: 220px;
    height: auto;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    pointer-events: none; /* Let the wrapper ignore mouse, pass it up to the button padding */
}

.center-phone {
    width: 260px; /* Make the middle one (WhatsApp) slightly larger */
    z-index: 5;
}

.iphone-img {
    width: 100%;
    height: auto;
    display: block;
    transform: translateZ(50px);
    transition: all 0.5s ease;
    /* Use ONLY drop-shadow to perfectly trace the transparent PNG alpha channel! No Box-Shadow! */
    filter: 
        drop-shadow(0 20px 30px rgba(0,0,0,0.8))
        drop-shadow(0 0 20px var(--dynamic-glow-dim, rgba(0, 210, 255, 0.3)));
}

.hologram-glow {
    position: absolute;
    inset: -20px;
    /* Default background is updated by JS dynamically */
    background: radial-gradient(circle at 50% 50%, var(--dynamic-glow-dim, rgba(0, 210, 255, 0.4)) 0%, transparent 60%);
    opacity: 0;
    transform: translateZ(10px);
    transition: opacity 0.4s;
    pointer-events: none;
    border-radius: 40px;
}

/* Hover Effects */
.iphone-btn:hover .iphone-3d-wrapper {
    /* Fast, snappy transition for JS mouse tracking */
    transition: transform 0.1s ease-out;
}

.iphone-btn:hover .iphone-img {
    /* Enhanced drop-shadow for hover state */
    filter: 
        drop-shadow(0 30px 40px rgba(0,0,0,0.9))
        drop-shadow(0 0 30px var(--dynamic-glow, rgba(0, 210, 255, 0.6)))
        brightness(1.1);
}

.iphone-btn:hover .hologram-glow {
    opacity: 1;
}

.btn-label {
    font-size: 1rem;
    letter-spacing: 2px;
    font-weight: 500;
    text-transform: uppercase;
    opacity: 0.7;
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.4);
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    transform: translateZ(30px);
}

.highlight-label {
    color: var(--accent);
    opacity: 1;
    border-color: rgba(0, 210, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.2);
}

.iphone-btn:hover .btn-label {
    opacity: 1;
    transform: translateZ(50px) scale(1.1);
    color: #fff;
    background: var(--dynamic-glow-dim, rgba(0, 210, 255, 0.2));
    border-color: var(--dynamic-glow, rgba(0, 210, 255, 0.5));
}

/* Animations */
@keyframes fadeInDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatingPhones {
    to {
        opacity: 1;
        transform: translateY(0) translateZ(0) rotateX(0deg);
    }
}

/* Ambient floating for all phones */
@keyframes ambientFloat {
    0%, 100% { transform: translateY(0px) rotateX(2deg) rotateY(-2deg); }
    50% { transform: translateY(-15px) rotateX(-2deg) rotateY(2deg); }
}

.iphone-btn {
    /* Apply ambient float after entry animation completes */
    animation: floatingPhones 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards,
               ambientFloat 6s ease-in-out infinite 1.5s;
}

.iphone-btn:nth-child(2) {
    animation: floatingPhones 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards,
               ambientFloat 7s ease-in-out infinite 1.6s;
}

.iphone-btn:nth-child(3) {
    animation: floatingPhones 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards,
               ambientFloat 5.5s ease-in-out infinite 1.7s;
}

/* Footer */
.footer-info {
    margin-top: 5vh;
    font-size: 0.9rem;
    color: #888;
    text-align: center;
    background: rgba(0,0,0,0.5);
    padding: 10px 25px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
}

@media (max-width: 900px) {
    .iphone-showcase {
        flex-direction: column;
        gap: 8vh;
    }
    .iphone-3d-wrapper {
        width: 180px;
    }
    .center-phone {
        width: 220px;
    }
}

/* Hologram Modal */
.hologram-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.hologram-modal.active {
    opacity: 1;
    pointer-events: all;
}

.hologram-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 8, 0.85);
    backdrop-filter: blur(15px);
}

.hologram-content {
    position: relative;
    width: 90%;
    max-width: 450px;
    /* Degradê misturando o Vermelho Bordô (do botão) com o Azul Nova Era */
    background: linear-gradient(135deg, rgba(180, 40, 50, 0.15), rgba(0, 210, 255, 0.15));
    border: 1px solid rgba(180, 40, 50, 0.4);
    border-radius: 30px;
    padding: 40px;
    text-align: center;
    box-shadow: 
        0 0 60px rgba(180, 40, 50, 0.2),
        inset 0 0 30px rgba(0, 210, 255, 0.1);
    transform: translateY(50px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.hologram-modal.active .hologram-content {
    transform: translateY(0) scale(1);
}

/* Scanner Line Effect */
.hologram-scanner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 210, 255, 0.8);
    box-shadow: 0 0 15px rgba(0, 210, 255, 1);
    opacity: 0.6;
    animation: scan 3s linear infinite;
}

@keyframes scan {
    0% { top: -10%; }
    100% { top: 110%; }
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.3s;
    outline: none;
}

.close-btn:hover {
    opacity: 1;
    color: var(--accent);
    transform: scale(1.1);
}

.glitch-small {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 3px;
    color: #fff;
    margin-bottom: 25px;
    text-shadow: 0 0 20px rgba(180, 40, 50, 0.8);
}

.loc-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.highlight-text {
    width: 100%;
    font-size: 1.1rem;
    font-weight: 300;
    color: #ccc;
    letter-spacing: 1px;
}

.loc-box {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 210, 255, 0.3);
    padding: 15px 30px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.box-label {
    font-size: 0.8rem;
    color: var(--accent);
    letter-spacing: 2px;
}

.box-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
}

.loc-tip {
    font-size: 0.95rem;
    color: #aaa;
    line-height: 1.5;
    margin-bottom: 35px;
}

.action-btn {
    display: inline-block;
    /* Gradiente vermelho para azul (holográfico) */
    background: linear-gradient(90deg, rgba(180, 40, 50, 0.7), rgba(0, 210, 255, 0.5));
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    letter-spacing: 2px;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(180, 40, 50, 0.4);
}

.action-btn:hover {
    background: linear-gradient(90deg, rgba(180, 40, 50, 0.9), rgba(0, 210, 255, 0.8));
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.6);
}
