/* Design System - Rounded, Modern Light Theme (Blue Palette) */
:root {
    /* Colors (OKLCH for vibrant, accurate colors) */
    --color-bg: oklch(0.98 0.01 250); /* Off-white icy blue */
    --color-surface: oklch(1 0 0); /* Pure White */
    --color-text: oklch(0.2 0.05 250); /* Dark Slate Navy */
    --color-text-muted: oklch(0.45 0.04 250); /* Medium Slate */
    
    /* Vibrant Blue Palette */
    --color-primary: oklch(0.55 0.25 250); /* Vibrant Electric Blue */
    --color-primary-hover: oklch(0.45 0.2 250); /* Darker Blue */
    --color-accent: oklch(0.25 0.1 250); /* Very Deep Blue Accent */
    
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Quicksand', sans-serif;
    --font-accent: 'Quicksand', sans-serif;
    --font-pixel: 'Press Start 2P', system-ui;
    
    /* Spacing (Fluid) */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: clamp(1.5rem, 3vw, 2rem);
    --space-lg: clamp(2.5rem, 5vw, 4rem);
    --space-xl: clamp(4rem, 8vw, 8rem);
    
    /* Rounded Corners - Restored */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    /* Soft Shadows - Restored */
    --shadow-subtle: 0 4px 20px rgba(0, 40, 120, 0.05);
    --shadow-hover: 0 10px 30px rgba(0, 40, 120, 0.12);
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.2, 0, 0, 1);
    --transition-medium: 0.4s cubic-bezier(0.2, 0, 0, 1);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    font-weight: 600;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-text);
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-lg);
    max-width: 600px;
    margin-inline: auto;
}

.section-header p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-top: var(--space-xs);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    z-index: 1000;
    border-bottom: none;
    transition: all var(--transition-fast);
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 40, 120, 0.08);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: height var(--transition-fast);
}

.navbar.scrolled .nav-content {
    height: 70px;
}

.logo {
    font-family: var(--font-pixel);
    font-weight: 400;
    font-size: 1.1rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color var(--transition-fast);
}

.navbar.scrolled .logo {
    color: var(--color-accent);
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-links a {
    font-weight: 600;
    font-size: 1rem;
    color: white;
    transition: color var(--transition-fast);
}

.navbar.scrolled .nav-links a {
    color: var(--color-text);
}

.nav-links a:hover, .navbar.scrolled .nav-links a:hover {
    color: var(--color-primary);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
}

.mobile-menu-btn .bar {
    width: 24px;
    height: 2px;
    background-color: white;
    transition: var(--transition-fast);
}

.navbar.scrolled .mobile-menu-btn .bar {
    background-color: var(--color-text);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    transition: transform var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
    cursor: pointer;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 14px oklch(0.55 0.25 250 / 30%);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    box-shadow: 0 6px 20px oklch(0.55 0.25 250 / 40%);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
}

.btn-outline:hover {
    background-color: var(--color-accent);
    color: white;
}

.navbar:not(.scrolled) .btn-outline {
    border-color: rgba(255, 255, 255, 0.8);
    color: white;
}

.navbar:not(.scrolled) .btn-outline:hover {
    background-color: white;
    color: var(--color-accent);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100dvh; /* Otimização para telas infinitas/browsers mobile */
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    color: white;
    padding-top: 80px; /* Offset for navbar */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 15, 30, 0.5) 0%, rgba(0, 15, 30, 0.85) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-icon-3d {
    margin-bottom: var(--space-md);
    perspective: 800px;
}

.hero-icon-3d svg {
    animation: rotate3d 3s linear infinite;
}

@keyframes rotate3d {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

.hero h1 {
    color: white;
    margin: var(--space-sm) 0;
}

.hero h1 strong {
    color: var(--color-primary);
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-lg);
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    justify-content: center;
    flex-wrap: wrap;
}

/* Scroll Arrow */
.scroll-down-arrow {
    position: absolute;
    bottom: max(var(--space-md), env(safe-area-inset-bottom, 30px)); /* Respeita a barra de navegação dos celulares novos */
    left: 50%;
    transform: translateX(-50%);
    color: white;
    z-index: 10;
    animation: bounce 2s infinite;
    opacity: 0.7;
    transition: opacity var(--transition-fast), color var(--transition-fast);
    padding: 10px;
}

.scroll-down-arrow:hover {
    opacity: 1;
    color: var(--color-primary);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-15px) translateX(-50%);
    }
    60% {
        transform: translateY(-7px) translateX(-50%);
    }
}

/* Services */
.services {
    background-color: var(--color-surface);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
}

.service-card {
    background: var(--color-surface);
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-subtle);
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}

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

.service-icon {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
    background: oklch(0.95 0.05 250); /* Soft blue bg */
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.service-card h3 {
    margin-bottom: var(--space-xs);
}

.service-card p {
    color: var(--color-text-muted);
}

/* Gallery */
.gallery {
    background-color: var(--color-bg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-md);
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow-subtle);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0, 0, 1);
}

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

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--space-md);
    background: linear-gradient(to top, rgba(0,10,30,0.85), transparent);
    color: white;
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    transform: translateY(10px);
    opacity: 0;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Testimonials */
.testimonials {
    background-color: var(--color-accent);
    color: white;
    position: relative;
    overflow: hidden;
}

.testimonials::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, oklch(0.55 0.25 250 / 15%) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.testimonials .section-header h2 {
    color: white;
}

.testimonials .section-header p {
    color: rgba(255, 255, 255, 0.8);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg);
    position: relative;
    z-index: 1;
}

.testimonial-card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: var(--space-xl) var(--space-lg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-medium), background-color var(--transition-medium);
}

.testimonial-card:hover {
    transform: translateY(-8px);
    background-color: rgba(255, 255, 255, 0.06);
}

.quote-icon {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    color: rgba(255, 255, 255, 0.05);
    width: 60px;
    height: 60px;
}

.stars {
    color: var(--color-primary);
    font-size: 1.2rem;
    margin-bottom: var(--space-sm);
    letter-spacing: 2px;
}

.testimonial-text {
    font-size: 1.1rem;
    font-family: var(--font-body);
    font-weight: 600;
    margin-bottom: var(--space-xl);
    line-height: 1.6;
    flex-grow: 1;
    color: rgba(255, 255, 255, 0.95);
}

.testimonial-author-box {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-md);
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
}

.testimonial-author {
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.testimonial-role {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* About & Contact */
.about-contact {
    background-color: var(--color-surface);
}

.two-col-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.about-img {
    width: 100%;
    max-width: 400px;
    border-radius: var(--radius-lg);
    margin: var(--space-md) 0;
    box-shadow: var(--shadow-hover);
}

.features-list {
    list-style: none;
    margin-top: var(--space-md);
}

.features-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: var(--space-sm);
    font-weight: 500;
}

.features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: 800;
}

.contact-card {
    background-color: var(--color-bg);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-subtle);
    border: 1px solid rgba(0,0,0,0.02);
}

.contact-methods {
    margin-top: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.contact-info {
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: oklch(0.15 0.05 250);
    color: rgba(255, 255, 255, 0.7);
    padding: var(--space-lg) 0;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-pixel);
    font-size: 1.1rem;
    font-weight: 400;
    color: white;
    margin-bottom: var(--space-md);
}

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

/* Floating Action Button (WhatsApp) */
.fab-whatsapp {
    position: fixed;
    bottom: var(--space-md);
    right: var(--space-md);
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 100;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.fab-whatsapp:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
}

/* Motion & Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.2, 0, 0, 1), transform 0.6s cubic-bezier(0.2, 0, 0, 1);
    will-change: opacity, transform;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    .two-col-layout {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

@media (max-width: 768px) {
    .logo-name {
        display: none;
    }

    .hero {
        padding-top: 80px;
    }

    /* Maintain Logo and Button Above Fullscreen Menu */
    .logo, .mobile-menu-btn {
        position: relative;
        z-index: 1002;
    }

    .logo span:last-child {
        color: white;
    }

    /* Force colors on logo when menu is open or bar is scrolled (white background) */
    .navbar.menu-open .logo {
        color: var(--color-accent) !important;
    }
    
    .navbar.scrolled .logo span:last-child,
    .navbar.menu-open .logo span:last-child {
        color: var(--color-primary) !important;
    }

    .navbar.menu-open .mobile-menu-btn .bar {
        background-color: var(--color-text) !important;
    }

    /* Fullscreen Clip-Path Menu */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--color-surface);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: var(--space-xl) var(--space-md);
        /* Animation Base */
        clip-path: circle(0px at calc(100% - 40px) 40px);
        visibility: hidden;
        transition: clip-path 0.6s cubic-bezier(0.8, 0, 0.2, 1), visibility 0.6s;
        gap: clamp(1rem, 4vh, 2rem);
    }
    
    .nav-links.active {
        clip-path: circle(150vh at calc(100% - 40px) 40px);
        visibility: visible;
    }
    
    .nav-links a {
        color: var(--color-text); /* Force dark text in mobile menu */
        font-size: clamp(1.5rem, 6vw, 2.5rem);
        font-family: var(--font-heading);
        font-weight: 800;
        letter-spacing: 1px;
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .nav-links.active a {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stagger Animations for Menu Links */
    .nav-links.active a:nth-child(1) { transition-delay: 0.2s; }
    .nav-links.active a:nth-child(2) { transition-delay: 0.25s; }
    .nav-links.active a:nth-child(3) { transition-delay: 0.3s; }
    .nav-links.active a:nth-child(4) { transition-delay: 0.35s; }
    .nav-links.active a:nth-child(5) { transition-delay: 0.4s; }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-menu-btn.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .mobile-menu-btn.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Mobile Optimization for Texts, Buttons, and Cards */
    .section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: var(--space-md);
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .section-header p {
        font-size: 0.95rem;
    }
    
    /* About & Contact section */
    .about-text, .contact-card {
        text-align: center;
    }

    .about-img {
        margin: var(--space-md) auto;
    }

    .features-list {
        display: inline-block;
        text-align: left;
    }

    .contact-card {
        padding: var(--space-md);
    }

    .contact-methods {
        align-items: center;
    }

    .contact-methods .btn {
        width: 100%;
        justify-content: center;
        margin-bottom: var(--space-sm);
    }
    
    /* Hero section */
    .hero {
        padding-bottom: 15dvh; /* Empurra o conteúdo para cima */
    }

    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: var(--space-md);
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
    }
    
    .btn {
        padding: 0.8rem 1.2rem;
    }

    .service-card, .testimonial-card, .contact-card {
        padding: var(--space-md);
    }

    .testimonial-text {
        font-size: 1rem;
        margin-bottom: var(--space-lg);
    }

    .quote-icon {
        width: 40px;
        height: 40px;
        top: var(--space-md);
        right: var(--space-md);
    }

    /* Ativar efeitos de hover na galeria pelo scroll no mobile */
    .gallery-item.gallery-active img {
        transform: scale(1.05);
    }

    .gallery-item.gallery-active .gallery-caption {
        opacity: 1;
        transform: translateY(0);
    }
}
