/* Futuristic CSS Reset & Variables */
:root {
    /* Glowing Brand Colors */
    --purple: #8B5CF6; 
    --blue: #06B6D4;   
    --pink: #EC4899;   
    
    /* True Dark Futuristic Theme - richer, no slate gray */
    --bg-main: #05020a;
    --bg-body: #05020a;
    --bg-secondary: #0d061c;
    --text-main: #ffffff;
    --text-muted: #b8c0cc;
    --border: rgba(139, 92, 246, 0.3);
    --glass-bg: rgba(20, 10, 40, 0.3);
    --glass-border: rgba(6, 182, 212, 0.3);
    --nav-bg: rgba(5, 2, 10, 0.6);
    --mockup-bg: rgba(10, 5, 25, 0.6);
    --footer-bg: rgba(0, 0, 0, 0.3);
    --input-bg: rgba(0, 0, 0, 0.2);

    /* Gradients */
    --gradient-brand: linear-gradient(90deg, var(--blue), var(--purple), var(--pink));
    --gradient-purple-blue: linear-gradient(135deg, var(--purple), var(--blue));
    
    /* Layout */
    --max-width: 1200px;
    --nav-height: 80px;
}

[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-body: #f8fafc;
    --bg-secondary: #e2e8f0;
    --text-main: #020617;
    --text-muted: #334155;
    --border: rgba(139, 92, 246, 0.3);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(139, 92, 246, 0.3);
    --nav-bg: rgba(248, 250, 252, 0.75);
    --mockup-bg: rgba(255, 255, 255, 0.8);
    --footer-bg: rgba(255, 255, 255, 0.6);
    --input-bg: rgba(255, 255, 255, 0.8);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
    position: relative;
}

/* Base64 Noise Overlay for Premium "Top" Look */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.8;
}

/* Aurora Futuristic Background */
.aurora-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -2;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, var(--bg-secondary) 0%, var(--bg-main) 100%);
    pointer-events: none;
}
.aurora-blob {
    position: absolute;
    filter: blur(120px);
    border-radius: 50%;
    animation: floatBlob 20s infinite alternate ease-in-out;
    mix-blend-mode: screen;
}
.blob-1 { top: -15%; left: 0%; width: 55vw; height: 55vw; background: rgba(139, 92, 246, 0.5); }
.blob-2 { bottom: -10%; right: -5%; width: 65vw; height: 65vw; background: rgba(6, 182, 212, 0.35); animation-delay: -5s; }
.blob-3 { top: 30%; left: 30%; width: 50vw; height: 50vw; background: rgba(236, 72, 153, 0.35); animation-delay: -10s; }

/* Subtle Animated Stars */
.aurora-bg::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        radial-gradient(1.5px 1.5px at 10% 20%, rgba(255,255,255,0.7) 50%, transparent),
        radial-gradient(1px 1px at 40% 60%, rgba(255,255,255,0.5) 50%, transparent),
        radial-gradient(2px 2px at 80% 30%, rgba(6,182,212,0.8) 50%, transparent),
        radial-gradient(1px 1px at 30% 90%, rgba(236,72,153,0.5) 50%, transparent);
    animation: twinkle 15s infinite linear;
    opacity: 0.6;
}

html[data-theme="light"] body::before { opacity: 0.15; }
html[data-theme="light"] .aurora-blob { opacity: 0.6; mix-blend-mode: multiply; }
html[data-theme="light"] .aurora-bg::after { 
    filter: invert(1);
    opacity: 0.8;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    33% { transform: translate(15vw, 15vh) scale(1.15) rotate(15deg); }
    66% { transform: translate(-10vw, 10vh) scale(0.85) rotate(-10deg); }
    100% { transform: translate(5vw, -15vh) scale(1.1) rotate(5deg); }
}

@keyframes twinkle {
    0% { transform: translateY(0); }
    100% { transform: translateY(-200px); }
}

h1, h2, h3, h4 { font-family: 'Outfit', sans-serif; line-height: 1.2; letter-spacing: -0.5px; }

a { text-decoration: none; color: inherit; }

/* Advanced Glassmorphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3), inset 0 0 20px rgba(139, 92, 246, 0.05);
}

.gradient-text {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    filter: drop-shadow(0 0 30px rgba(6, 182, 212, 0.4));
}

.purple-gradient { background: linear-gradient(135deg, #A78BFA, var(--purple)); }
.blue-gradient { background: linear-gradient(135deg, #22D3EE, var(--blue)); }
.pink-gradient { background: linear-gradient(135deg, #F472B6, var(--pink)); }

/* Futuristic Nav */
.navbar {
    position: fixed;
    top: 0; width: 100%;
    height: var(--nav-height);
    background: var(--nav-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-container { max-width: var(--max-width); height: 100%; margin: 0 auto; padding: 0 2rem; display: flex; justify-content: space-between; align-items: center; }

.logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo { height: 80px; object-fit: contain; filter: none; transition: transform 0.3s ease; }
.nav-logo:hover { transform: scale(1.05); }

.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a { font-size: 0.95rem; font-weight: 500; color: var(--text-main); position: relative; padding-bottom: 5px; }

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--gradient-brand);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--blue);
}
.nav-links a:hover::after { width: 100%; }

.theme-toggle { background: none; border: none; color: var(--text-main); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0.5rem; border-radius: 50%; transition: transform 0.3s; }
.theme-toggle:hover { transform: scale(1.1) rotate(15deg); }

html[data-theme="light"] .sun-icon { display: none; }
html[data-theme="dark"] .moon-icon { display: none; }

.mobile-menu-btn { display: none; flex-direction: column; gap: 4px; cursor: pointer; }
.mobile-menu-btn span { width: 24px; height: 2px; background: var(--text-main); transition: 0.3s; }

/* Glowing Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.8rem 2rem; border-radius: 8px; font-weight: 600; font-size: 1rem;
    cursor: pointer; transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid transparent; text-transform: uppercase; letter-spacing: 1px;
}

.btn-primary {
    background: var(--gradient-brand);
    color: white;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4), inset 0 0 10px rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.6), inset 0 0 15px rgba(255,255,255,0.4);
}

.btn-secondary {
    color: var(--text-main);
    border: 1px solid var(--border);
}
.btn-secondary:hover { 
    background: var(--glass-bg); 
    border-color: var(--blue); 
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

/* Hero Section */
.hero {
    position: relative; padding: calc(var(--nav-height) + 8rem) 2rem 6rem;
    min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden;
}

.hero-bg-shapes { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; filter: blur(100px); opacity: 0.4; }
html[data-theme="light"] .hero-bg-shapes { opacity: 0.2; }

.shape { position: absolute; border-radius: 50%; animation: orbit 25s infinite linear; }
.shape-purple { top: 20%; left: 20%; width: 40vw; height: 40vw; background: var(--purple); }
.shape-blue { top: 50%; right: 10%; width: 35vw; height: 35vw; background: var(--blue); animation-direction: reverse; }
.shape-pink { bottom: -10%; left: 40%; width: 30vw; height: 30vw; background: var(--pink); animation-duration: 30s; }

@keyframes orbit {
    0% { transform: rotate(0deg) translateX(50px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(50px) rotate(-360deg); }
}

.hero-content { text-align: center; max-width: 900px; z-index: 1; position: relative; }
.hero-title { font-size: clamp(3.5rem, 6vw, 5.5rem); margin-bottom: 2rem; font-weight: 800; line-height: 1.1; }
.hero-subtitle { font-size: 1.25rem; color: var(--text-muted); margin-bottom: 3rem; font-weight: 500; }
.hero-cta { display: flex; gap: 1.5rem; justify-content: center; }

/* Sections */
.section-container { max-width: var(--max-width); margin: 0 auto; padding: 6rem 2rem; }
.section-header { text-align: center; margin-bottom: 5rem; }
.section-header h2 { font-size: 3rem; margin-bottom: 1.5rem; }
.highlight { color: var(--blue); filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.5)); }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 3rem; }

.service-card { padding: 3rem 2.5rem; transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); position: relative; overflow: hidden; }
.service-card::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-20deg); transition: 0.5s;
}

.service-card:hover { transform: translateY(-10px) scale(1.02); border-color: var(--blue); box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 20px rgba(6, 182, 212, 0.2); }
.service-card:hover::before { left: 150%; }

.service-icon { width: 70px; height: 70px; border-radius: 20px; display: flex; align-items: center; justify-content: center; margin-bottom: 2rem; box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.service-card h3 { margin-bottom: 1rem; font-size: 1.5rem; font-weight: 600; }
.service-card p { color: var(--text-muted); }

/* Mockup Showcase */
.mockup-showcase { background: rgba(0,0,0,0.2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.showcase-container { max-width: var(--max-width); margin: 0 auto; padding: 8rem 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }

.showcase-text h2 { margin-bottom: 2rem; font-size: 3rem; }
.showcase-text p { color: var(--text-muted); margin-bottom: 2rem; font-size: 1.15rem; }

.features-list { list-style: none; }
.features-list li { display: flex; gap: 1.5rem; margin-bottom: 2rem; background: var(--glass-bg); padding: 1.5rem; border-radius: 12px; border: 1px solid var(--border); transition: 0.3s; }
.features-list li:hover { border-color: var(--pink); box-shadow: 0 0 15px rgba(236, 72, 153, 0.2); transform: translateX(10px); }

.feature-icon { font-size: 2rem; }

.showcase-visual { position: relative; height: 500px; display: flex; align-items: center; justify-content: center; }
.glass-orb { position: absolute; width: 400px; height: 400px; border-radius: 50%; background: var(--gradient-brand); filter: blur(80px); opacity: 0.4; animation: pulse 4s infinite alternate; }

@keyframes pulse { 0% { transform: scale(1); opacity: 0.3; } 100% { transform: scale(1.1); opacity: 0.5; } }

.mockup-display {
    position: relative; width: 300px; height: 400px;
    display: flex; align-items: center; justify-content: center;
    transform: perspective(1200px) rotateY(-20deg) rotateX(15deg);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    background: var(--mockup-bg);
    border: 1px solid rgba(236, 72, 153, 0.5);
    box-shadow: -20px 20px 50px rgba(0,0,0,0.8), 0 0 30px rgba(139, 92, 246, 0.4);
    border-radius: 20px;
}

.mockup-display:hover { transform: perspective(1200px) rotateY(0deg) rotateX(0deg); }

.mockup-layers { position: relative; width: 220px; height: 320px; transform-style: preserve-3d; }
.layer {
    position: absolute; width: 100%; height: 100%; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.8rem; letter-spacing: 2px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    background: rgba(255,255,255,0.03); backdrop-filter: blur(10px);
}

.mockup-display:hover .layer-0 { transform: translateZ(0px); box-shadow: 0 0 20px var(--blue); }
.mockup-display:hover .layer-1 { transform: translateZ(30px); box-shadow: 0 0 20px var(--purple); }
.mockup-display:hover .layer-2 { transform: translateZ(60px); box-shadow: 0 0 20px var(--pink); }
.mockup-display:hover .layer-3 { transform: translateZ(90px); border-color: rgba(255,255,255,0.4); }

/* Contact */
.contact { padding: 8rem 2rem; display: flex; justify-content: center; }
.contact-card { display: grid; grid-template-columns: 1fr 1.5fr; max-width: 1100px; width: 100%; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 20px 50px rgba(0,0,0,0.8); border-radius: 20px; }
.contact-info { padding: 4rem; background: var(--bg-secondary); border-right: 1px solid var(--border); position: relative; }
.contact-info::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px; background: var(--gradient-brand); }

.contact-info h2 { margin-bottom: 2rem; font-size: 2.2rem; }
.contact-info p { color: var(--text-muted); margin-bottom: 3rem; }
.info-item { display: flex; gap: 1.5rem; align-items: center; color: var(--text-main); font-weight: 500; }

.contact-form { padding: 4rem; background: var(--glass-bg); }
.form-group { margin-bottom: 2rem; }
.form-group label { display: block; margin-bottom: 0.8rem; font-weight: 500; font-size: 0.95rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.form-group input, .form-group textarea {
    width: 100%; padding: 1rem 1.2rem; border-radius: 8px; border: 1px solid var(--border);
    background: var(--input-bg); color: var(--text-main); font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 15px rgba(6, 182, 212, 0.2); background: rgba(0,0,0,0.4); }
html[data-theme="light"] .form-group input:focus, html[data-theme="light"] .form-group textarea:focus { background: #fff; }

.btn-block { width: 100%; padding: 1.2rem; font-size: 1.1rem; }

/* Login no padrao do portal Clicheart */
#auth-login-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#auth-login-modal.open {
    opacity: 1;
    pointer-events: all;
}

body.auth-locked #auth-login-modal {
    opacity: 1;
    pointer-events: all;
}

.auth-modal-card {
    width: 100%;
    max-width: 420px;
    margin: 20px;
    background: var(--bg-body);
    border: 1px solid var(--glass-border);
    border-top: 2px solid #E41F26;
    border-radius: 20px;
    padding: 40px;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    transform: translateY(-10px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#auth-login-modal.open .auth-modal-card,
body.auth-locked #auth-login-modal .auth-modal-card {
    transform: translateY(0) scale(1);
}

.auth-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #64748B;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    transition: color 0.2s;
    line-height: 1;
}

.auth-modal-close:hover { color: #fff; }

.auth-modal-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-modal-brand-logo {
    height: 48px;
    object-fit: contain;
    display: block;
    margin: 0 auto 16px;
}

.auth-modal-logo .lock-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(1, 70, 144, 0.2), rgba(228, 31, 38, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 auto 15px;
    color: #fff;
}

.auth-modal-logo h2 {
    font-size: 1.4rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
}

.auth-modal-logo p {
    font-size: 0.85rem;
    color: #64748B;
    margin-top: 5px;
}

.auth-form-group {
    margin-bottom: 18px;
}

.auth-form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.auth-form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.auth-form-group input:focus {
    border-color: rgba(1, 70, 144, 0.6);
    box-shadow: 0 0 0 3px rgba(1, 70, 144, 0.15);
}

.auth-form-group input::placeholder { color: #64748B; }

#auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, #014690, #E41F26);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    margin-top: 8px;
}

#auth-submit-btn:hover { opacity: 0.9; transform: translateY(-1px); }
#auth-submit-btn:disabled { opacity: 0.6; transform: none; cursor: not-allowed; }

#auth-error {
    color: #f87171;
    font-size: 0.85rem;
    margin-top: 12px;
    text-align: center;
    min-height: 20px;
}

.portal-session {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: -1rem 0 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.portal-logout-btn {
    background: none;
    border: none;
    color: #E41F26;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
    font-family: 'Outfit', sans-serif;
    white-space: nowrap;
}

.portal-logout-btn:hover {
    background: rgba(228, 31, 38, 0.1);
}

/* Footer */
footer { border-top: 1px solid var(--border); padding: 3rem 2rem; text-align: center; background: var(--footer-bg); }
.footer-content { max-width: var(--max-width); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 2rem; }
.social-links { display: flex; gap: 1.5rem; }
.social-links a { transition: 0.3s; color: var(--text-muted); }
.social-links a:hover { color: var(--pink); filter: drop-shadow(0 0 8px var(--pink)); }

/* Responsive */
@media (max-width: 900px) {
    .showcase-container, .contact-card { grid-template-columns: 1fr; }
    .contact-info { border-right: none; border-bottom: 1px solid var(--border); }
    .hero-title { font-size: 3rem; }
}

@media (max-width: 768px) {
    .nav-links, .nav-actions .btn { display: none; }
    .mobile-menu-btn { display: flex; }
    .hero-cta { flex-direction: column; }
    .hero { padding-top: 15rem; }
}
