﻿:root {
    --color-bg: #F9FAFB; /* Light Gray */
    --color-surface: #FFFFFF; /* White */
    --color-primary: #0091D5; /* Azul da logo */
    --color-secondary: #3DB54A; /* Verde da logo */
    --color-text-primary: #111827; /* Quase preto */
    --color-text-secondary: #6B7281; /* Cinza médio */
    --font-family: 'Inter', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.logo-menu-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

    .menu-toggle .bar {
        height: 6px;
        width: 100%;
        background: #0091D5;
        margin: 4px 0;
        border-radius: 2px;
        transition: 0.3s;
    }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.15;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.25;
    }
}

@keyframes travel {
    0% {
        transform: translate(-100px, -100px);
    }

    100% {
        transform: translate(100px, 100px);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-15px);
    }

    60% {
        transform: translateY(-7px);
    }
}

.animated {
    animation-duration: 0.8s;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

.slide-up {
    animation-name: slideUp;
}

/* Staggered animation delays */
.hero-content h1 {
    animation-delay: 0.2s;
}

.hero-content .subtitle {
    animation-delay: 0.4s;
}

.scroll-down-wrapper {
    animation-delay: 0.6s;
}

.service-card:nth-child(1) {
    animation-delay: 0.3s;
}

.service-card:nth-child(2) {
    animation-delay: 0.5s;
}

.service-card:nth-child(3) {
    animation-delay: 0.7s;
}

.service-card:nth-child(4) {
    animation-delay: 0.9s;
}

.service-card:nth-child(5) {
    animation-delay: 1.1s;
}


/* --- Header --- */
.header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    background: rgba(249, 250, 251, 0.8); /* Light bg with transparency */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    animation: fadeIn 1s ease-in-out;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-text-primary);
    text-decoration: none;
}

.nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

    .nav a:hover {
        color: var(--color-primary);
    }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, background-position 0.5s ease;
    text-align: center;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    border: none;
    background-size: 100% 100%;
    box-shadow: 0 4px 16px rgba(0, 169, 157, 0.08);
    border-radius: 8px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: #007BB8; /* tom mais escuro do primary */
    box-shadow: 0 8px 24px rgba(0, 169, 157, 0.13);
    color: #fff;
    outline: none;
    transform: translateY(-2px) scale(1.03);
}

.btn-primary:active {
    background: #005F7F; /* ainda mais escuro para active */
    box-shadow: 0 2px 6px rgba(0, 169, 157, 0.10);
    transform: scale(0.98);
}

.btn-primary[disabled],
.btn-primary.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    background: var(--color-primary);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text-primary);
    border: 2px solid #D1D5DB; /* Light Gray border */
}

    .btn-secondary:hover {
        background: var(--color-text-primary);
        color: var(--color-surface);
        border-color: var(--color-text-primary);
    }

.nav .btn-secondary:hover {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* --- Hero Section --- */
.hero {
    padding: 8rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-color: #f0f2f5; /* A slightly different bg for contrast */
}

    .hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: linear-gradient(90deg, rgba(200, 208, 221, 0.3) 1px, transparent 1px), linear-gradient(rgba(200, 208, 221, 0.3) 1px, transparent 1px);
        background-size: 60px 60px;
        animation: background-pan 30s linear infinite;
        opacity: 0.5;
        z-index: 0;
    }

@keyframes background-pan {
    from {
        background-position: 0% 0%;
    }

    to {
        background-position: -60px -60px;
    }
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.primary-text {
    color: var(--color-primary);
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(0, 169, 157, 0.2), transparent 70%);
    transform: translate(-50%, -50%);
    filter: blur(120px);
    z-index: 1;
    animation: pulse 8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    opacity: 0;
    animation: particle-animation 20s linear infinite;
}

    .particle:nth-child(1) {
        top: 10%;
        left: 15%;
        animation-delay: 0s;
    }

    .particle:nth-child(2) {
        top: 80%;
        left: 20%;
        animation-delay: -5s;
        animation-duration: 25s;
    }

    .particle:nth-child(3) {
        top: 50%;
        left: 80%;
        animation-delay: -10s;
    }

    .particle:nth-child(4) {
        top: 20%;
        left: 90%;
        animation-delay: -15s;
        animation-duration: 18s;
    }

    .particle:nth-child(5) {
        top: 90%;
        left: 50%;
        animation-delay: -2s;
    }

@keyframes particle-animation {
    0% {
        transform: translate(0, 0) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translate(100px, -100px) scale(1.5);
        opacity: 0;
    }
}

.scroll-down-wrapper {
    margin-top: 3rem;
}

.scroll-down-arrow {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 2px solid var(--color-text-secondary);
    border-radius: 50%;
    transition: all 0.4s ease;
    animation: bounce 2.5s infinite;
}

    .scroll-down-arrow svg {
        width: 24px;
        height: 100%;
        color: var(--color-text-secondary);
        transition: color 0.4s ease;
    }

    .scroll-down-arrow:hover {
        border-color: var(--color-primary);
        background-color: rgba(0, 169, 157, 0.05);
    }

        .scroll-down-arrow:hover svg {
            color: var(--color-primary);
        }


/* --- General Section Styling --- */
section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
}

/* --- Services Section --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--color-surface);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    border: 1px solid #E5E7EB; /* Lighter border */
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}

    .service-card:hover {
        transform: translateY(-8px);
        border-color: var(--color-primary);
        box-shadow: 0 10px 15px -3px rgba(0, 169, 157, 0.1), 0 4px 6px -4px rgba(0, 169, 157, 0.1);
    }

.card-icon {
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}

    .card-icon svg {
        width: 48px;
        height: 48px;
    }

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--color-text-secondary);
    flex-grow: 1;
}

/* --- About Section --- */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    background-color: var(--color-surface);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -4px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

    .about-container:hover {
        box-shadow: 0 20px 25px -5px rgba(0,0,0,0.07), 0 8px 10px -6px rgba(0,0,0,0.07);
    }

    .about-container.reverse .about-content {
        order: 1;
    }

    .about-container.reverse .about-image {
        order: 2;
    }

.about-image img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

    .about-image img:hover {
        transform: scale(1.03);
    }

.about-content .section-title {
    text-align: left;
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
}

.about-content ul {
    list-style: none;
    margin-top: 1.5rem;
}

.about-content li {
    padding-left: 2rem;
    position: relative;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

    .about-content li::before {
        content: '✓';
        position: absolute;
        left: 0;
        color: var(--color-primary);
        font-weight: bold;
    }


/* --- Tech Stack Section --- */
.tech-stack {
    background-color: var(--color-surface);
}

.tech-scroller {
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    -webkit-mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
    mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
}

    .tech-scroller:hover .tech-grid {
        animation-play-state: paused;
    }

.tech-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 4rem;
    width: max-content;
    animation: scroll 40s linear infinite;
}

@keyframes scroll {
    to {
        transform: translateX(-50%);
    }
}

.tech-grid img {
    height: 50px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

    .tech-grid img:hover {
        filter: grayscale(0%);
        opacity: 1;
        transform: scale(1.1);
    }

/* --- Contact Section --- */
.contact {
    text-align: center;
}

.contact-container h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-container p {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-form {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.form-row {
    display: flex;
    gap: 2rem;
}

    .form-row .form-group {
        flex: 1;
    }

.form-group {
    margin-bottom: 1.5rem;
}

    .form-group label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 500;
        color: var(--color-text-primary);
    }

    .form-group input,
    .form-group textarea {
        width: 100%;
        padding: 0.85rem 1rem;
        border-radius: 8px;
        border: 1px solid #D1D5DB;
        background-color: var(--color-bg);
        font-family: var(--font-family);
        font-size: 1rem;
        color: var(--color-text-primary);
        transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }

        .form-group input::placeholder,
        .form-group textarea::placeholder {
            color: #9CA3AF;
        }

        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--color-primary);
            box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.2);
        }

    .form-group textarea {
        resize: vertical;
        min-height: 120px;
    }

    .form-group input.invalid, .form-group textarea.invalid {
        border-color: #ef4444;
    }

.contact-form button {
    cursor: pointer;
    border: none;
    display: block;
    margin: 1rem auto 0;
    width: 100%;
    max-width: 250px;
}

#form-status {
    margin-top: 1.5rem;
    font-weight: 500;
    min-height: 1.2em; /* Reserve space to prevent layout shift */
}


/* --- Footer --- */
.footer {
    padding: 3rem 0;
    border-top: 1px solid #E5E7EB;
    background-color: var(--color-surface);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer p {
    color: var(--color-text-secondary);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

    .social-links a {
        color: var(--color-text-secondary);
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .social-links a:hover {
            color: var(--color-primary);
        }

.message-success {
    color: #10B981; /* Green for success */
}

.message-error {
    color: #EF4444; /* Red for error */
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .about-container,
    .about-container.reverse {
        grid-template-columns: 1fr;
    }

        .about-container.reverse .about-image {
            order: 0;
        }

        .about-container.reverse .about-content {
            order: 0;
        }

    .about-content .section-title {
        text-align: center;
    }

    .about-content {
        text-align: center;
    }

        .about-content ul {
            text-align: left;
            display: inline-block;
        }
}

@media (max-width: 768px) {
    .nav ul {
        display: none;
        flex-direction: column;
        background: #fff;
        position: absolute;
        top: 60px;
        right: 0;
        width: 200px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        padding: 1rem;
    }

    .nav.open ul {
        display: flex;
    }

    .menu-toggle {
        display: flex;
        position: absolute;
        right: 15px;
        top: 35px;
        margin-top: 0;
    }

    .nav {
        position: absolute;
        top: 15px;
        right: 15px
    }

    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
    }

    .nav ul {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .section-title,
    .contact-container h2 {
        font-size: 2rem;
    }

    .about-container {
        padding: 2rem;
        gap: 2rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .footer-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .about-container {
        padding: 1.5rem;
    }

    .nav ul {
        gap: 1rem;
    }

    .nav a {
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}