:root {
    /* Paleta Clara & Tech (Awwwards Style) */
    --bg-body: #f3f6fa;
    --bg-surface: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-highlight: rgba(255, 255, 255, 0.9);
    
    --primary-accent: #2563eb; /* Azul Royal Tech */
    --secondary-accent: #06b6d4; /* Ciano */
    --text-main: #0f172a; /* Quase preto */
    --text-muted: #64748b;
    
    --gradient-text: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    --gradient-glow: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    
    --shadow-soft: 0 20px 40px -10px rgba(37, 99, 235, 0.1);
    --shadow-hover: 0 30px 60px -12px rgba(6, 182, 212, 0.2);

    --nav-height: 90px;
}

/* --- Reset e Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

/* --- Fundo Dinâmico (Blobs Animados) --- */
.ambient-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    animation: floatBlob 15s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, #60a5fa, transparent);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, #22d3ee, transparent);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, #a78bfa, transparent); /* Toque roxo */
    animation-delay: -8s;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(40px, 60px) scale(1.1) rotate(10deg); }
    100% { transform: translate(-30px, -40px) scale(0.9) rotate(-10deg); }
}

/* --- Cursor Customizado --- */
.cursor-glow {
    position: fixed;
    width: 24px;
    height: 24px;
    border: 1px solid var(--primary-accent);
    background: rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: width 0.3s, height 0.3s, background 0.3s;
    mix-blend-mode: multiply;
}

@media (hover: none) {
    .cursor-glow { display: none; }
}

/* --- Header & Nav --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    transition: all 0.4s ease;
}

header.scrolled {
    height: 70px;
    background: rgba(255, 255, 255, 0.85);
}

nav {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-main);
}

.tech-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.menu a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    font-size: 1rem;
    transition: color 0.3s;
}

.menu a:hover, .menu a.active {
    color: var(--primary-accent);
}

.menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-text);
    transition: width 0.3s ease;
}

.menu a:hover::after, .menu a.active::after {
    width: 100%;
}

/* --- Menu Mobile (Overlay Fullscreen) --- */
.menu-toggle {
    display: none;
    cursor: pointer;
    z-index: 1002;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.8);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.menu-toggle i {
    font-size: 1.5rem;
    color: var(--text-main);
}

@media (max-width: 991px) {
    .menu-toggle { display: flex; }

    .menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateY(-100%);
        transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1001;
        gap: 2rem;
        padding-bottom: 2rem;
    }

    .menu.active { transform: translateY(0); }
    
    .menu a {
        font-size: 2rem;
        font-weight: 700;
        letter-spacing: -1px;
    }
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: var(--nav-height);
    position: relative;
    text-align: center;
    padding: 0 20px;
}

.hero-content {
    max-width: 900px;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 30px;
    background: rgba(255,255,255,0.7);
    border: 1px solid var(--glass-border);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-accent);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    backdrop-filter: blur(5px);
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    font-weight: 800;
}

/* Cursor piscando para o efeito typewriter */
.hero h1::after {
    content: '|';
    animation: blink 0.7s infinite;
    color: var(--primary-accent);
    font-weight: 300;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Stats Modernos */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    background: var(--bg-surface);
    backdrop-filter: blur(10px);
    padding: 1.2rem 2rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px -5px rgba(0,0,0,0.05);
    min-width: 140px;
}

.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Botão Moderno */
.cta-button {
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 2.5rem;
    background: var(--text-main); /* Preto moderno */
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    background: var(--primary-accent);
}

.cta-button i {
    transition: transform 0.3s;
}

.cta-button:hover i {
    transform: translateX(5px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
}

.mouse-icon {
    width: 26px;
    height: 42px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    position: relative;
}

.mouse-icon::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% { top: 6px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}

/* --- Marquee (Faixa de Texto Infinita) --- */
.marquee-section {
    padding: 2rem 0;
    background: var(--text-main);
    color: white;
    overflow: hidden;
    transform: rotate(-1deg);
    margin: 2rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
}

.marquee-item {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.marquee-item i { color: var(--secondary-accent); }

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Sections General --- */
section {
    padding: 8rem 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 4rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.section-title span {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.service-card {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    padding: 3rem 2rem;
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: var(--gradient-text);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    background: rgba(255, 255, 255, 0.9);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-accent);
    margin-bottom: 1.5rem;
    background: rgba(37, 99, 235, 0.1);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    transition: transform 0.4s;
}

.service-card:hover .service-icon {
    transform: rotateY(180deg);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.service-card ul {
    list-style: none;
    margin-top: 1.5rem;
}

.service-card ul li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-card ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--secondary-accent);
}

/* --- Tech Grid (Pills) --- */
.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.tech-item {
    background: white;
    padding: 1.2rem 2.5rem;
    border-radius: 100px; /* Pill shape */
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.tech-item:hover {
    transform: scale(1.05);
    border-color: var(--secondary-accent);
    box-shadow: var(--shadow-soft);
    color: var(--primary-accent);
}

.tech-item i { font-size: 1.4rem; }

/* --- About & Features --- */
.about-container {
    background: white;
    border-radius: 30px;
    padding: 4rem;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.15rem;
    color: var(--text-muted);
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.feature-box {
    text-align: center;
    padding: 2rem;
    border-radius: 20px;
    background: var(--bg-body);
    transition: transform 0.3s;
}

.feature-box:hover { transform: translateY(-5px); }

.feature-box i {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* --- Portfolio Grid (Critical Functionality) --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    background: white;
    aspect-ratio: 4/3;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.portfolio-item img, .portfolio-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.portfolio-item:hover .item-info {
    opacity: 1;
    transform: translateY(0);
}

/* --- Contact & Form --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    background: white;
    border-radius: 32px;
    padding: 4rem;
    box-shadow: var(--shadow-soft);
}

.contact-info-card {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--bg-body);
    border-radius: 16px;
    transition: 0.3s;
}

.info-item:hover { background: white; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }

.info-item i { font-size: 1.5rem; color: var(--primary-accent); }

.form-container h3 { margin-bottom: 2rem; font-size: 1.8rem; }

.form-group { position: relative; margin-bottom: 1.5rem; }

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

.form-group input:focus, .form-group textarea:focus {
    background: white;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* --- Modal (Functional) --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.9); /* Dark backdrop */
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-content img, .modal-content video {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.modal-close:hover { transform: rotate(90deg); color: var(--secondary-accent); }

.modal-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none; /* Let clicks pass through except on buttons */
}

.modal-nav button {
    pointer-events: auto;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    margin: 0 -60px;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.modal-nav button:hover:not(:disabled) {
    background: white;
    color: var(--text-main);
    transform: scale(1.1);
}

.modal-nav button:disabled { opacity: 0.3; cursor: default; }

/* --- Footer --- */
footer {
    background: white;
    padding-top: 5rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-section h3 { margin-bottom: 1.5rem; font-size: 1.2rem; }

.footer-section ul { list-style: none; }
.footer-section ul li a {
    color: var(--text-muted);
    text-decoration: none;
    line-height: 2;
    transition: 0.3s;
}
.footer-section ul li a:hover { color: var(--primary-accent); padding-left: 5px; }

.footer-bottom {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsividade Extra */
@media (max-width: 991px) {
    .contact-wrapper { grid-template-columns: 1fr; padding: 2rem; }
    .hero h1 { font-size: 2.8rem; }
    .modal-nav button { margin: 0 10px; }
}
@media (max-width: 991px) {
    .hero {
        padding-top: calc(var(--nav-height) + 20px);
        min-height: calc(100vh - var(--nav-height));
    }
}
@media (max-width: 768px) {
    .marquee-content {
        animation-duration: 7s !important;
    }
}
@media (max-width: 991px) {
    .scroll-indicator {
        bottom: 16px;
    }

    .hero {
        padding-bottom: 90px; /* reserva espaço pro scroll indicator */
    }
}


@media (max-width: 991px) and (max-height: 700px) {
    .scroll-indicator {
        bottom: 8px;
        transform: translateX(-50%) scale(0.9);
    }
}