:root {
    --bg-color: #fcfcfc;
    --text-main: #2b2b2b;
    --text-muted: #6b7280;
    --green-light: #15c36b;
    /* Vibrant green for text highlights */
    --green-btn: #3ef499;
    /* Button green */
    --card-bg: #0d1217;
    /* Dark card background */
}

body,
html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: #0f0f0f;
    /* Updated dark background */
    color: var(--text-main);
    overflow-x: hidden;
}

/* Navbar / Header */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: transparent;
    position: fixed;
    /* Make it sticky/fixed to see glass effect */
    top: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
}

.menu-horizontal {
    display: flex;
    gap: 30px;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.menu-horizontal li a {
    text-decoration: none;
    color: #fff;
    /* Start white on dark bg */
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 10px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-horizontal li a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--green-light);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Typography Utilities */
.text-green {
    color: var(--green-light);
}

.text-center {
    text-align: center;
}

/* Landing Section Layout */
.landing-section {
    padding: 120px 20px 80px 20px;
    /* added top padding to clear fixed navbar */
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

#matrix-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.matrix-fade-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 400px;
    background: linear-gradient(to bottom, transparent 0%, rgba(15, 15, 15, 0.8) 60%, rgba(15, 15, 15, 1) 100%) !important;
    z-index: 5;
    pointer-events: none;
}

.landing-content-wrapper {
    position: relative;
    z-index: 10;
    max-width: 1000px;
    margin: 0 auto;
}

.main-title {
    font-size: 3rem;
    font-weight: 400;
    /* Light weight for main title like image */
    margin-bottom: 1.5rem;
    color: #fff;
    /* White for dark bg */
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 60px auto;
    line-height: 1.6;
}

/* Cards System */
.cards-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 100px;
}

.card {
    background-color: var(--card-bg);
    border-radius: 20px;
    color: white;
    width: 100%;
    max-width: 450px;
    padding: 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background-image: radial-gradient(circle at top right, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
}

.card h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-top: 0;
    margin-bottom: 1rem;
}

.card-desc {
    color: #9ca3af;
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
    line-height: 1.5;
    height: 3rem;
    /* Align desc lengths loosely */
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
    flex-grow: 1;
}

.feature-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 18px;
    font-size: 0.95rem;
    color: #e5e7eb;
}

.feature-list li::before {
    content: "✦";
    /* Little star/diamond */
    color: var(--green-light);
    font-size: 0.8rem;
    position: absolute;
    left: 0;
    top: 2px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--green-btn);
    color: #000;
}

.btn-primary:hover {
    background-color: #2edb86;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 9rem;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Floating WhatsApp */
.floating-wa {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: ringInterval 5s infinite;
}

.floating-wa svg {
    width: 38px;
    height: 38px;
}

.floating-wa:hover {
    background-color: #1ebe5d;
    transform: scale(1.05);
}

@keyframes ringInterval {

    0%,
    80% {
        transform: scale(1) rotate(0deg);
    }

    82% {
        transform: scale(1.1) rotate(15deg);
    }

    84% {
        transform: scale(1.1) rotate(-15deg);
    }

    86% {
        transform: scale(1.1) rotate(15deg);
    }

    88% {
        transform: scale(1.1) rotate(-15deg);
    }

    90% {
        transform: scale(1) rotate(0deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* Decorative Badge */
.gen-ai-badge {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #0ba360 0%, #3bc1b1 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.1rem;
    opacity: 0.9;
    /* This element might be cropped by overflow, adjusting card to allow it */
}

.card-business {
    overflow: visible;
    /* so badge can stick out */
}

/* Bottom section */
.bottom-title {
    font-size: 2.5rem;
    font-weight: 400;
    color: #fff;
    line-height: 1.3;
    position: relative;
    z-index: 10;
}

/* Responsive constraints */
@media (max-width: 768px) {
    .cards-container {
        flex-direction: column;
        align-items: center;
    }

    .card {
        max-width: 100%;
    }

    .gen-ai-badge {
        display: none;
        /* Hide decorative element on small screens */
    }

    .navbar {
        flex-direction: column;
        gap: 15px;
    }
}

/* --- NEW SECTIONS AND CUSTOM CURSOR --- */

/* Cursor Follower */
.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 10px;
    /* Slightly larger base */
    height: 10px;
    background: rgba(255, 255, 255, 0.784);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(112, 112, 112, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    display: none;
    transform: translate(-50%, -50%);
    /* Removed CSS transition for transform so GSAP can handle the trail/delay perfectly */
    transition: width 0.3s, height 0.3s;
}

.cursor-follower.rainbow-red {
    animation: rainbowToRed 4s linear forwards;
}

@keyframes rainbowToRed {
    0% {
        background-color: rgba(238, 130, 238, 0.5);
        border-color: violet;
    }

    25% {
        background-color: rgba(0, 0, 255, 0.5);
        border-color: blue;
    }

    50% {
        background-color: rgba(0, 128, 0, 0.5);
        border-color: green;
    }

    75% {
        background-color: rgba(255, 165, 0, 0.5);
        border-color: orange;
    }

    100% {
        background-color: rgba(255, 0, 0, 0.8);
        border-color: red;
    }
}

.cursor-follower.vibrating {
    animation: cursorShake 0.05s infinite both;
}

@keyframes cursorShake {
    0% {
        margin-left: -2px;
        margin-top: -3px;
    }

    25% {
        margin-left: 2px;
        margin-top: 3px;
    }

    50% {
        margin-left: -3px;
        margin-top: 2px;
    }

    75% {
        margin-left: 3px;
        margin-top: -2px;
    }

    100% {
        margin-left: -2px;
        margin-top: 2px;
    }
}

.cursor-follower.cracked::before {
    content: '';
    position: absolute;
    top: -10%;
    left: 45%;
    width: 3px;
    height: 120%;
    background: transparent;
    border-left: 3px solid #0f0f0f;
    transform: rotate(15deg);
    z-index: 5;
}

.cursor-follower.cracked::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 45%;
    width: 3px;
    height: 60%;
    background: transparent;
    border-left: 3px solid #0f0f0f;
    transform: rotate(-35deg);
    z-index: 5;
}

.cursor-particle {
    position: fixed;
    width: 3px;
    /* Tiny particles */
    height: 3px;
    background-color: var(--green-light);
    /* Green particles */
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
}

@media (pointer: fine) {
    .cursor-follower {
        display: block;
    }

    body,
    html {
        cursor: none;
    }

    a,
    button,
    .card,
    .btn,
    .map-point,
    .project-card {
        cursor: none;
    }
}

/* --- SECTION 2: Interactive Map --- */
.map-section {
    background-color: #0f0f0f;
    background-image: radial-gradient(circle at center, #020513 0%, #0f0f0f 70%);
    padding: 100px 20px;
    position: relative;
    z-index: 10;
    overflow: hidden;
    /* Keeps shooting stars + globe bounded */
    box-sizing: border-box;
}

/* Twinkling Star Layer */
.map-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 20px 30px, #ffffff, transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 50px 160px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1.5px 1.5px at 90px 40px, #ffffff, transparent),
        radial-gradient(1.5px 1.5px at 130px 80px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255, 255, 255, 0.6), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.5;
    animation: twinkle 4s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes twinkle {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 0.9;
    }
}

/* Shooting Stars */
.shooting-star {
    position: absolute;
    width: 150px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(21, 195, 107, 0.8) 100%);
    transform: rotate(var(--angle, -45deg));
    opacity: 0;
    pointer-events: none;
    animation: shoot 8s linear infinite;
    z-index: 1;
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: -1.5px;
    right: 0;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(21, 195, 107, 0.8);
}

@keyframes shoot {
    0% {
        transform: rotate(var(--angle, -45deg)) translateX(-100px);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    20% {
        transform: rotate(var(--angle, -45deg)) translateX(900px);
        /* Shoot across a good distance */
        opacity: 0;
    }

    100% {
        transform: rotate(var(--angle, -45deg)) translateX(900px);
        opacity: 0;
    }
}

.map-container {
    position: relative;
    z-index: 5;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* This explicitly centralizes the map-wrapper and map-title together */
}

.map-title {
    color: #fff;
    margin-bottom: 60px;
    font-size: 2.5rem;
    font-weight: 400;
}

.map-wrapper {
    position: relative;
    width: 100%;
    max-width: 700px;
    height: 700px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
    /* CSS sphere: dark radial gradient + circle clip replaces the WebGL showGlobe sphere */
    border-radius: 50%;
    background: radial-gradient(circle at 38% 38%, #0d1f1400 0%, #050d0a00 55%, #02080400 100%);
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0), 0 0 50px rgba(0, 0, 0, 0);
    overflow: hidden;
    /* clips the WebGL canvas to the circle */
}

.map-wrapper:active {
    cursor: grabbing;
}

.globe-viz {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* transparent — clipping and background are handled by the parent .map-wrapper */
    overflow: hidden;
}

.map-point {
    position: absolute;
    width: 20px;
    height: 20px;
    /* Globe.gl will handle positioning */
    z-index: 20;
    will-change: transform, opacity;
}

/* Base styles for the dot. Positioning is now handled strictly in JS mathematically */

.pulse-dot {
    width: 12px;
    height: 12px;
    background-color: var(--green-light);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--green-light);
}

.pulse-dot::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid var(--green-light);
    animation: mapPulse 2s infinite ease-out;
}

@keyframes mapPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}

.project-card {
    position: absolute;
    left: 30px;
    top: -50%;
    /* No translateY because it conflicts with 3D space transforms simply */
    background: rgba(15, 15, 15, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    width: max-content;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    /* Let parent handle hover */
}

.map-point:hover .project-card {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.project-card h3 {
    margin: 0 0 5px 0;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 500;
}

.project-card p {
    margin: 0 0 15px 0;
    color: var(--green-light);
    font-size: 0.85rem;
}

.view-project-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.view-project-link span {
    transition: transform 0.3s;
}

.view-project-link:hover {
    color: var(--green-light);
}

.view-project-link:hover span {
    transform: translateX(5px);
}

/* --- SECTION 3: Terminal Profile --- */
.services-info {
    padding: 10vh 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    position: relative;
    background-color: transparent;
}

.terminal-window {
    width: 100%;
    max-width: 900px;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 20px rgba(21, 195, 107, 0.1);
    overflow: hidden;
    font-family: 'Courier New', Courier, monospace;
    text-align: left;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.term-btns {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

.term-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.term-close {
    background: #ff5f56;
}

.term-min {
    background: #ffbd2e;
}

.term-max {
    background: #27c93f;
}

.term-title {
    color: #888;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
}

.terminal-body {
    padding: 30px;
    color: var(--green-light);
    /* Matrix style output */
    font-size: 1.1rem;
    line-height: 1.6;
    min-height: 350px;
}

.term-line {
    margin-bottom: 12px;
    word-break: break-word;
}

.term-prompt {
    color: var(--text-main);
    color: #fff;
    font-weight: bold;
    margin-right: 8px;
}

.term-caret {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background: var(--green-light);
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.term-progress {
    display: block;
    margin-top: 15px;
    font-family: monospace;
    color: #fff;
}

/* Services Slider Full Screen */
.services-slider {
    overflow: hidden;
    padding: 0;
    width: 100%;
    height: 100dvh;
}

.slider-container {
    display: flex;
    width: 400vw;
    height: 100dvh;
    transform-origin: center center;
    /* Pra o scale funcionar bem no eixo X e Y */
}

.slide {
    width: 100vw;
    height: 100dvh;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transform-origin: center center;
}

.slide-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.slide-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.slide-content h3 {
    margin: 0;
    font-size: 4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    color: #fff;
}

/* --- SECTION: Contact Form --- */
.contact-section {
    padding: 10vh 20px 15vh 20px;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-container {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.contact-container h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #fff;
    font-weight: 600;
}

.contact-container p {
    color: #888;
    margin-bottom: 40px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--green-light);
    background: rgba(21, 195, 107, 0.05);
    box-shadow: 0 0 15px rgba(21, 195, 107, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #666;
}

/* Footer Section */
.site-footer {
    background-color: #0f0f0f;
    /* Always dark */
    color: #ffffff;
    padding: 60px 20px 20px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
}

.footer-col h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--green-light);
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.footer-col p {
    color: #9ca3af;
    line-height: 1.6;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 15px;
    flex-direction: column;
}

.social-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--green-light);
}

.footer-bottom {
    max-width: 1000px;
    margin: 40px auto 0 auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: #6b7280;
    font-size: 0.85rem;
}

.mobile-hint {
    display: none;
    font-family: 'Courier New', Courier, monospace;
}

/* --- Mobile Responsive Adjustments --- */
@media (max-width: 768px) {
    .mobile-hint {
        display: inline-block;
        animation: pulse 2s infinite;
    }

    /* Mapeamento 3D: Centered, never touches screen edges */
    .map-wrapper {
        width: calc(100vw - 4px);
        /* 2px margin each side */
        max-width: calc(100vw - 4px);
        height: calc(100vw - 4px);
        /* square aspect ratio */
        max-height: 500px;
        /* cap on larger phones/small tablets */
        margin: 0 auto;
        overflow: hidden;
    }

    .map-section {
        padding: 60px 20px;
    }

    .map-title {
        font-size: 1.8rem;
    }

    /* Tipografia Header/Landing */
    .main-title {
        font-size: 3rem;
    }

    /* Tipografia do Zoom-In Slider */
    .slide-content h3 {
        font-size: 2.2rem;
        padding: 0 15px;
    }

    /* Contact Form margin shrinking */
    .contact-container {
        padding: 40px 20px;
    }
}

/* --- GDPR Banner --- */
.gdpr-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(15, 15, 15, 0.95);
    border-top: 1px solid var(--green-light);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    transform: translateY(110%);
    transition: transform 0.5s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.gdpr-banner.show {
    transform: translateY(0);
}

.gdpr-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.gdpr-content p {
    color: #e5e7eb;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

.gdpr-content p a {
    color: var(--green-light);
    text-decoration: underline;
}

.btn-gdpr {
    padding: 10px 20px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .gdpr-content {
        flex-direction: column;
        text-align: center;
    }
}