:root {
    /* Colors */
    --bg-color: #050507;
    --bg-color-translucent: rgba(5, 5, 7, 0.8);
    --text-color: #e0e0e0;
    --text-muted: #9ca3af;
    --primary-color: #00f3ff;
    --primary-glow: rgba(0, 243, 255, 0.4);
    --secondary-color: #7000ff;
    --secondary-glow: rgba(112, 0, 255, 0.4);
    --accent-color: #ffffff;

    /* Gradients */
    --gradient-main: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    --gradient-text: linear-gradient(90deg, #fff, #999);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-xl) 0;
}

.text-gradient {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 0 20px var(--secondary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 40px var(--secondary-glow);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.btn-outline::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: var(--transition-normal);
    pointer-events: none;
}

.btn-outline:hover::after {
    opacity: 1;
}

.btn-outline:hover {
    border-color: var(--primary-color);
    background: rgba(0, 243, 255, 0.05);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition-normal);
}

.header.scrolled {
    padding: 1rem 0;
    background: rgba(5, 5, 7, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    position: relative;
    /* Base para o alinhamento central */
}

.desktop-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    /* Evita que o container bloqueie cliques se crescer demais */
}

.nav-links {
    display: flex;
    gap: 3rem;
    pointer-events: auto;
    /* Reativa cliques nos links */
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 10;
}

.logo,
.login-logo,
.sidebar-logo,
.signup-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: #fff;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition-fast);
}

.logo span,
.login-logo span,
.sidebar-logo span,
.signup-logo span {
    color: var(--primary-color);
}

.login-logo,
.signup-logo {
    font-size: 2.5rem;
    justify-content: center;
}

.sidebar-logo {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
}

/* Hero Section */
.hero {
    position: relative;
    height: 115vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    z-index: -1;
    background:
        radial-gradient(circle at 10% 20%, rgba(112, 0, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 243, 255, 0.1) 0%, transparent 40%);
    /* Removed transition to avoid conflict with JS Lerp smoothing */
    /* Removed transform to avoid conflict with JS Lerp smoothing */
    will-change: transform;
    backface-visibility: hidden;
    pointer-events: none;
}

.hero-content {
    max-width: 900px;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s cubic-bezier(0.23, 1, 0.32, 1) both 0.4s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes titleReveal {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
        letter-spacing: -0.08em;
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        letter-spacing: -0.04em;
    }
}

.hero h1 {
    animation: titleReveal 1.2s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.hero p {
    animation: fadeInUp 1s cubic-bezier(0.23, 1, 0.32, 1) both 0.2s;
}

/* Scroll Indicator */
.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    opacity: 0.5;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2000;
}

.mobile-menu-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: #fff;
    border-radius: 10px;
    transition: var(--transition-normal);
}

.mobile-menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(5, 5, 7, 0.98);
    backdrop-filter: blur(20px);
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-bounce);
}

.mobile-menu.active {
    right: 0;
}

.mobile-nav-links {
    text-align: center;
}

.mobile-nav-link {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    padding: 1rem 0;
    font-family: 'Outfit', sans-serif;
    transition: var(--transition-fast);
}

.mobile-nav-link:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

@media (max-width: 992px) {
    .desktop-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hide-mobile {
        display: none;
    }

    .header-btn {
        padding: 0.5rem 1.2rem !important;
        font-size: 0.8rem !important;
    }
}

@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .btn {
        width: 100%;
    }

    .hero-content {
        padding: 0 1.5rem;
    }

    .section {
        padding: var(--spacing-lg) 0;
    }
}

@media (max-width: 480px) {
    .header-btn {
        display: none;
    }
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(112, 0, 255, 0.1);
    border: 1px solid rgba(112, 0, 255, 0.2);
    border-radius: var(--radius-full);
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* Cards (Glassmorphism) */
.card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 243, 255, 0.3);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 243, 255, 0.1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: var(--transition-normal);
}

.card:hover::before {
    opacity: 1;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(112, 0, 255, 0.2), rgba(0, 243, 255, 0.1));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.service-desc {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.service-link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.2s;
}

.service-link:hover {
    gap: 0.75rem;
}

/* Products / SaaS Section */
.products-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.product-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.product-content {
    padding: 3rem;
}

.product-image {
    background: linear-gradient(135deg, #111, #1a1a1a);
    height: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-tag {
    color: var(--secondary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: block;
}

.product-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.product-desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.feature-list {
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    color: #ddd;
}

.feature-item svg {
    color: var(--primary-color);
}

@media (max-width: 900px) {
    .product-card {
        grid-template-columns: 1fr;
    }

    .product-image {
        min-height: 300px;
        order: -1;
    }

    .product-content {
        padding: 2rem;
    }
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    align-items: start;
    /* Importante: impede que os cards estiquem para a altura do maior */
}

.portfolio-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    background: #050507;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    /* Proporção fixa 16:9 */
    transition: transform 0.3s ease;
}

/* ...rest of portfolio styles... */

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
        filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    filter: blur(10px);
    will-change: transform, opacity, filter;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

/* Staggered Children Animations */
.stagger-container .animate-on-scroll:nth-child(1) {
    transition-delay: 0.1s;
}

.stagger-container .animate-on-scroll:nth-child(2) {
    transition-delay: 0.2s;
}

.stagger-container .animate-on-scroll:nth-child(3) {
    transition-delay: 0.3s;
}

.stagger-container .animate-on-scroll:nth-child(4) {
    transition-delay: 0.4s;
}

.stagger-container .animate-on-scroll:nth-child(5) {
    transition-delay: 0.5s;
}

.stagger-container .animate-on-scroll:nth-child(6) {
    transition-delay: 0.6s;
}

/* Global Floating Animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}



/* Background blob animations (Ambient) */
.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(112, 0, 255, 0.1), transparent 50%);
    animation: rotateBlob 20s linear infinite;
    z-index: -1;
}

@keyframes rotateBlob {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .contact-container {
        padding: 1.5rem;
    }
}

.portfolio-item-bg {
    width: 100%;
    height: 100% !important;
    display: block;
    object-fit: cover !important;
    /* Preenche todo o card 16:9 sem distorcer */
    transition: transform 0.5s ease;
    background-color: #050507;
    z-index: 1;
}

.portfolio-item:hover .portfolio-item-bg {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-title {
    font-size: 1.5rem;
    color: #fff;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.portfolio-tag {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    transform: translateY(20px);
    transition: transform 0.3s ease 0.1s;
}

.portfolio-item:hover .portfolio-title,
.portfolio-item:hover .portfolio-tag {
    transform: translateY(0);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Contact Section */
.contact-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-lg);
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: inherit;
    transition: var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(0, 243, 255, 0.05);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #020203;
    padding: 4rem 0 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .contact-container {
        padding: 1.5rem;
    }
}

/* Portfolio Background Effect */
#portfolio {
    position: relative;
    overflow: hidden;
}

.portfolio-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 50%, rgba(112, 0, 255, 0.18) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(0, 243, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
    will-change: transform;
}

/* Section Divider Gradients */
.section-divider-top {
    height: 15vh;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(to bottom, var(--bg-color), transparent);
    pointer-events: none;
    z-index: 1;
}

.section-divider-bottom {
    height: 15vh;
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    background: linear-gradient(to top, var(--bg-color), transparent);
    pointer-events: none;
    z-index: 1;
}

/* Specific fading for Hero and Portfolio */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 12vh;
    background: linear-gradient(to top, var(--bg-color), transparent);
    pointer-events: none;
    z-index: 2;
}

#portfolio .portfolio-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 12vh;
    background: linear-gradient(to bottom, var(--bg-color), transparent);
    z-index: 1;
}

#portfolio .portfolio-bg::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 12vh;
    background: linear-gradient(to top, var(--bg-color), transparent);
    z-index: 1;
}

/* Skeleton Loader Styles */
.skeleton-card {
    aspect-ratio: 16 / 9;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.skeleton-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.03) 20%,
            rgba(255, 255, 255, 0.06) 60%,
            rgba(255, 255, 255, 0) 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}