:root {
    /* Color Palette */
    --bg-color: #0a0a0a;
    --surface-color: #121212;
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --accent-color: #f43f5e;
    --border-color: rgba(255, 255, 255, 0.1);

    /* Typography - Fluid Sizes */
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Spacing & Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-max-width: 1200px;
}

/* Tema Light (Definições Globais) */
:root.light-theme {
    --bg-color: #fcfcfc;
    --surface-color: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: rgba(0, 0, 0, 0.1);
}

:root.light-theme header {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.05);
}

:root.light-theme #theme-toggle i.fa-sun {
    color: var(--text-primary);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 min(5vw, 2rem);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Header Flutuante Adaptável */
header {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(95%, var(--container-max-width));
    z-index: 1000;
    padding: 0.8rem clamp(1rem, 3vw, 2.5rem);
    background: rgba(18, 18, 18, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    max-width: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary-color);
}

nav ul {
    display: flex;
    gap: clamp(1rem, 2vw, 2.5rem);
}

nav ul li a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem clamp(1.5rem, 3vw, 2rem);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    white-space: nowrap;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #4f46e5);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

/* Sections & Grids */
.section {
    padding: clamp(4rem, 10vw, 8rem) 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title span {
    background: linear-gradient(135deg, var(--primary-color), #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.services-grid,
.portfolio-grid,
.values-grid,
.team-grid,
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 2rem;
}

.contact-info-grid {
    margin-top: 4rem;
}

/* Cards & Items */
.card,
.team-member,
.portfolio-item {
    background: var(--surface-color);
    border-radius: 28px;
    border: 1px solid var(--border-color);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card {
    padding: clamp(1.5rem, 5vw, 2.5rem);
}

.card:hover,
.portfolio-item:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-10px) scale(1.02);
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.2),
        0 10px 10px -5px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(99, 102, 241, 0.15);
    /* Glow subtil */
}

/* Portfolio Details */
.portfolio-image {
    width: 100%;
    height: 250px;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    overflow: hidden;
    /* Garante que a imagem não sai do cartão */
}

.portfolio-image img {
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

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

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-category {
    font-size: 0.7rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

/* Team Details */
.team-member {
    text-align: center;
    padding: clamp(2rem, 5vw, 3rem);
}

.team-member:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.member-photo img {
    width: clamp(120px, 15vw, 150px);
    height: clamp(120px, 15vw, 150px);
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    border: 3px solid var(--primary-color);
}

.member-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.member-role {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
}

/* Hero Section & Background Animation */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 6rem;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 100%);
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at 50% 50%, black, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, black, transparent 80%);
    animation: gridMove 60s linear infinite;
}

@keyframes gridMove {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 100% 100%;
    }
}

.blob {
    position: absolute;
    width: clamp(300px, 50vw, 600px);
    height: clamp(300px, 50vw, 600px);
    background: var(--primary-color);
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.15;
    animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    background: var(--primary-color);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    background: var(--accent-color);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 60%;
    background: #4f46e5;
    opacity: 0.1;
    animation-duration: 25s;
}

:root.light-theme .blob {
    opacity: 0.1;
    filter: blur(120px);
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(5vw, 5vh) scale(1.1);
    }

    100% {
        transform: translate(-2vw, 2vh) scale(0.9);
    }
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Contact Form */
.contact-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface-color);
    padding: clamp(1.5rem, 5vw, 3.5rem);
    border-radius: 32px;
    border: 1px solid var(--border-color);
}

.contact-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: white;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    padding: 4rem 0;
    background: var(--surface-color);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    #mobile-menu-btn {
        display: block !important;
    }

    .hide-mobile {
        display: none !important;
    }

    header nav {
        position: fixed;
        top: 90px;
        left: 50%;
        transform: translateX(-50%) translateY(-20px);
        width: 90%;
        background: var(--surface-color);
        padding: 2.5rem;
        border-radius: 24px;
        border: 1px solid var(--border-color);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    }

    header nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }

    header nav ul {
        flex-direction: column;
        gap: 1.5rem;
    }

    .hero-btns .btn {
        width: 100%;
    }
}

/* Preloader */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-color);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-content .logo {
    font-size: 3rem;
    animation: pulse 1.5s infinite;
    margin-left: 0;
}

.loader-bar {
    width: 100px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 20px auto 0;
    position: relative;
    overflow: hidden;
}

.loader-bar::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    animation: loading 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(0.95);
        opacity: 0.8;
    }

    50% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes loading {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Process Section Enhancements */
.process-card {
    position: relative;
    padding-top: 4rem !important;
    text-align: center;
}

.process-number {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 900;
    color: #4b5563;
    /* Cinzento escuro */
    opacity: 0.08;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.process-card:hover .process-number {
    color: var(--primary-color);
    opacity: 0.15;
    transform: translateX(-50%) scale(1.1);
}

.process-card i,
.process-card h4,
.process-card p {
    position: relative;
    z-index: 1;
}

/* Proteção de Imagens */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}