:root {
    --atlas-purple: #823DEE;
    --atlas-neon: #C6FF00;
    --atlas-black: #030303;
    --atlas-surface: rgba(10, 10, 15, 0.85); /* Darker, more premium surface */
    --atlas-border: rgba(130, 61, 238, 0.2);
    --atlas-glow: rgba(130, 61, 238, 0.4);
    --atlas-blue: #2F6BFF;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

body {
    background-color: var(--atlas-black);
    color: #fff;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* Fixed coordinate system release: perspective moved to containers */
}

.tech-font { font-family: 'JetBrains Mono', monospace; }

img {
    max-width: 100%;
    display: block;
}

/* ── Mesh Background 2.0 ────────────────── */
.bg-mesh {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -2;
    background: #000;
}

.blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--atlas-purple) 0%, transparent 70%);
    filter: blur(80px);
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
}

.blob-1 { top: -10%; left: -10%; animation: float 20s infinite alternate; }
.blob-2 { bottom: -10%; right: -10%; background: radial-gradient(circle, var(--atlas-blue) 0%, transparent 70%); animation: float 25s infinite alternate-reverse; }

@keyframes float {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(100px, 50px) scale(1.1); }
}

.grid-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background-image: 
        radial-gradient(circle at 2px 2px, rgba(255,255,255,0.05) 1px, transparent 0);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black, transparent 80%);
}

/* ── Atlas Abstract Logo ────────────────── */
.logo-atlas {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, var(--atlas-purple) 0%, #2F6BFF 100%);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(130, 61, 238, 0.4);
    padding: 2px;
}

.logo-inner {
    width: 100%;
    height: 100%;
    background: var(--atlas-black);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-svg {
    width: 24px;
    height: 24px;
    fill: #fff;
    filter: drop-shadow(0 0 4px var(--atlas-neon));
}

/* ── Typography & Components ────────────── */
.title-main {
    font-size: clamp(2.3rem, 6vw + 1rem, 5rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
    font-weight: 900;
}

.text-gradient {
    background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.6) 100%);
    background-clip: text; /* Fixed for compatibility */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-primary {
    background: #fff;
    color: #000;
    padding: 16px 32px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    display: inline-block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255,255,255,0.2);
}

.btn-secondary {
    background: rgba(255,255,255,0.05);
    color: #fff;
    padding: 16px 32px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.4s;
    display: inline-block;
    text-decoration: none;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
}

/* ── Glass Cards 2.0 ────────────────────── */
.glass-card {
    background: var(--atlas-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--atlas-border);
    border-radius: 24px;
    padding: 48px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d; /* Garante profundidade no tilt */
    transition: border-color 0.4s ease, transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.tech-label {
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 10px;
    color: rgba(255,255,255,0.4);
}

/* ── Hero ───────────────────────────────── */
.hero {
    padding: clamp(100px, 15vh, 160px) 20px 100px;
    text-align: center;
    max-width: 1400px;
    margin: 0 auto;
    perspective: 1200px; /* Isolated 3D context for Nucleus animations */
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.5);
    max-width: 600px;
    margin: 32px auto 48px;
    font-weight: 400;
}

.mockup-container {
    perspective: 2000px;
    margin-top: 40px;
    position: relative;
    z-index: 5;
}

.nucleus-wrapper {
    width: 100%;
    height: clamp(400px, 60vh, 700px);
    position: relative;
    border-radius: 40px;
    overflow: hidden;
    background: radial-gradient(circle at center, rgba(130, 61, 238, 0.05) 0%, transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotateX(5deg) scale(0.95);
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.nucleus-wrapper:hover {
    transform: rotateX(0deg) scale(1.02);
}

.nucleus-hud {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    z-index: 10;
}

.nucleus-title {
    font-size: clamp(2.5rem, 8vw, 6.5rem);
    font-weight: 900;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(198, 255, 0, 0.3);
    opacity: 0.9;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.15em; /* Reduzido para evitar overflows laterais */
    min-width: max-content;
    white-space: nowrap;
}

.nucleus-title span {
    display: inline-block;
    flex-shrink: 0; /* Nunca encolhe as letras */
    transition: transform 0.3s;
}

.nucleus-title .dot {
    color: var(--atlas-neon);
    font-weight: 300;
}

.nucleus-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.6rem, 1.5vw, 0.8rem);
    letter-spacing: 0.8em;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
}

#nucleusCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ── Sections ───────────────────────────── */
.section-title {
    font-size: clamp(2.2rem, 5vw + 0.5rem, 3.5rem);
    letter-spacing: -0.02em;
    margin-bottom: 60px;
}

/* ── Pricing ────────────────────────────── */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 32px;
}

@media (max-width: 768px) {
    .pricing-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding: 20px 0 40px;
        margin-inline: -20px;
        padding-inline: 20px;
        gap: 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .pricing-grid::-webkit-scrollbar { display: none; }

    .pricing-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }
}

.pricing-kicker,
.comparison-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.comparison-kicker::before,
.pricing-kicker::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--atlas-neon), var(--atlas-purple));
    box-shadow: 0 0 18px rgba(198, 255, 0, 0.55);
}

.pricing-card {
    min-height: 100%;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.pricing-card-featured {
    border-color: var(--atlas-purple);
    box-shadow: 0 0 40px rgba(130, 61, 238, 0.15);
    background:
        linear-gradient(180deg, rgba(130, 61, 238, 0.18), rgba(10, 10, 15, 0.92)),
        rgba(10, 10, 15, 0.96);
}

/* Efeito Shimmer Apple Vision para o card em destaque */
.pricing-card-featured::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 25%,
        rgba(255, 255, 255, 0) 45%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0) 55%,
        transparent 75%
    );
    transform: rotate(35deg);
    animation: shimmer 6s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translate(-30%, -30%) rotate(35deg); }
    100% { transform: translate(30%, 30%) rotate(35deg); }
}

/* ── Testimonials (Cases) ───────────────── */
.marquee-container {
    padding: 80px 0;
    overflow: hidden;
    position: relative;
    width: 100%;
    /* Trilho Visual (Trunk Line) */
    background: linear-gradient(to bottom, transparent 49.5%, rgba(255,255,255,0.03) 50%, transparent 50.5%);
    /* Máscara de desfoque nas bordas (Entrando e Saindo) */
    mask-image: linear-gradient(
        to right,
        transparent,
        black 15%,
        black 85%,
        transparent
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent,
        black 15%,
        black 85%,
        transparent
    );
}

.marquee-track {
    display: flex;
    width: max-content;
    gap: 32px;
    animation: marquee 40s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.case-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    width: 380px;
    flex-shrink: 0;
}

.case-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--atlas-purple);
    transform: translateY(-10px) scale(1.02);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 16px)); } /* 16px is half the gap */
}

/* ── Mini-Pulse Chat Widget (Interactive) ── */
.chat-widget {
    position: fixed;
    bottom: 40px; /* Aumentado para libertação total do footer */
    right: 40px;
    z-index: 99999; /* Soberania absoluta */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Visibility managed by GSAP to avoid DOM parsing ghosts */
}

.chat-floating-bubble {
    background: rgba(130, 61, 238, 0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(130, 61, 238, 0.3);
    color: #fff;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 10px; /* Reduzido conforme pedido */
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    white-space: nowrap;
    animation: bubbleWave 3s ease-in-out infinite;
    position: relative;
    letter-spacing: 0.05em;
}

.chat-floating-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 20px;
    width: 10px;
    height: 10px;
    background: rgba(130, 61, 238, 0.15);
    transform: rotate(45deg);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(130, 61, 238, 0.3);
    border-bottom: 1px solid rgba(130, 61, 238, 0.3);
}

.chat-button {
    width: 58px;
    height: 58px;
    background: radial-gradient(circle at center, #823DEE 0%, #030303 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px var(--atlas-glow), inset 0 0 15px rgba(130, 61, 238, 0.5);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    border: 1px solid rgba(198, 255, 0, 0.2);
    position: relative;
}

.pulse-core {
    width: 14px;
    height: 14px;
    background: var(--atlas-neon);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--atlas-neon);
    animation: orbVibration 2s ease-in-out infinite;
    z-index: 2;
}

/* Chat Particles */
.core-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--atlas-neon);
    border-radius: 50%;
    opacity: 0.5;
    pointer-events: none;
}

.core-particle:nth-child(1) { animation: pOrbit 3s linear infinite; }
.core-particle:nth-child(2) { animation: pOrbit 4s linear infinite reverse; animation-delay: -1s; }
.core-particle:nth-child(3) { animation: pOrbit 5s linear infinite; animation-delay: -2s; }

.chat-button:hover { 
    transform: rotate(15deg) scale(1.1);
    border-color: var(--atlas-neon);
}

@keyframes pOrbit {
    from { transform: rotate(0deg) translateX(24px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(24px) rotate(-360deg); }
}

@keyframes bubbleWave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes orbVibration {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.15); filter: brightness(1.3); }
}

.chat-box {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 480px;
    background: #0A0A0F;
    border: 1px solid var(--atlas-border);
    border-radius: 24px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    backdrop-filter: blur(20px);
}

.chat-header {
    background: var(--atlas-surface);
    padding: 20px;
    border-bottom: 1px solid var(--atlas-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.msg {
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 80%;
    font-size: 13px;
    line-height: 1.4;
}
.msg-bot { background: rgba(130, 61, 238, 0.15); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg-user { background: #fff; color: #000; border-bottom-right-radius: 4px; align-self: flex-end; }

.chat-input {
    padding: 15px;
    border-top: 1px solid var(--atlas-border);
    display: flex;
    gap: 10px;
}
.chat-input input {
    background: rgba(255,255,255,0.05);
    border: none;
    border-radius: 10px;
    padding: 10px;
    color: #fff;
    flex-grow: 1;
    font-size: 13px;
}

.plan-price { font-size: 4rem; font-weight: 800; letter-spacing: -0.04em; }

.pricing-toggle {
    background: rgba(255,255,255,0.05);
    border-radius: 100px;
    padding: 6px;
    display: inline-flex;
    margin-bottom: 60px;
    border: 1px solid rgba(255,255,255,0.1);
}

.toggle-btn {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}
.toggle-btn.active { background: #fff; color: #000; }

/* ── Features Grid 2.0 ────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.4s;
    text-align: left;
}
.feature-item:hover {
    background: rgba(255,255,255,0.04);
    border-color: var(--atlas-purple);
    transform: translateY(-8px);
}

.feature-icon-box {
    width: 48px;
    height: 48px;
    background: rgba(130, 61, 238, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--atlas-purple);
}

/* ── FAQ Section ────────────────────────── */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.faq-item {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 24px 0;
}

.faq-question {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: color 0.3s;
}
.faq-question:hover { color: var(--atlas-neon); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
    color: rgba(255,255,255,0.5);
    font-size: 0.95rem;
    padding-top: 0;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding-top: 16px;
    transition: max-height 0.5s ease-in;
}

.faq-item.active .faq-icon { transform: rotate(180deg); }
.faq-icon { transition: transform 0.3s; }

/* ── Scroll Animations ──────────────────── */
.gsap-reveal { opacity: 0; transform: translateY(40px); }

header {
    padding-inline: clamp(16px, 3vw, 32px);
}

header nav {
    gap: clamp(12px, 2vw, 40px);
}

.comparison-table {
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    vertical-align: middle;
}

/* ── Structural Fluid Adaptations (Mobile-First Architecture) ── */
@media (max-width: 768px) {
    .mockup-container { margin-top: 56px; }
    .comparison-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
}

@media (max-width: 640px) {
    header, header nav { flex-wrap: wrap; gap: 12px; }
    header nav { justify-content: flex-end; width: 100%; }
    .hero h1 > div { flex-wrap: wrap; }
    .pricing-toggle { width: min(100%, 360px); justify-content: center; }
    .toggle-btn { flex: 1 1 0; padding-inline: 14px; font-size: 11px; }
    .chat-box { width: min(350px, calc(100vw - 32px)); height: 400px; }
    .btn-primary, .btn-secondary { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
    .hero h1 > div { gap: 10px; }
    .hero h1 > div > div { width: 56px; height: 56px; }
    .case-card, .feature-item { padding: 24px; }
}
