/* === Reset Básico, Variáveis Otimizadas e Configurações Globais === */
:root {
    /* Fundos */
    --bg-light: #f8f9fa;
    --bg-white: #FFFFFF;
    --bg-dark: #101214;
    --bg-dark-alt: #191b1e; /* Para cards e elementos em fundo escuro */
    --bg-header: #101214;
    --bg-header-scrolled: rgba(16, 18, 20, 0.85);
    --bg-card-dark: #191b1e;

    /* Cores de Destaque */
    --accent: #1DD8DE;
    --accent-dark: #15b0b5; /* Para hover de acento */
    --accent-glow: rgba(29, 216, 222, 0.18); /* Sombra sutil */
    --accent-light-bg: rgba(29, 216, 222, 0.07); /* Fundo claro para tags */

    /* Textos */
    --text-dark: #212529; /* Em fundos claros */
    --text-medium: #495057; /* Parágrafos em fundos claros */
    --text-light: #adb5bd; /* Em fundos escuros - secundário */
    --text-on-dark: #f1f3f5; /* Principal em fundos escuros */
    --text-on-dark-muted: #adb5bd; /* Parágrafos em fundos escuros */
    --text-on-accent: #070708; /* Texto sobre botão de acento */

    /* Bordas */
    --border-color: rgba(0, 0, 0, 0.08); /* Em fundos claros */
    --border-color-dark: rgba(255, 255, 255, 0.1); /* Em fundos escuros */

    /* Sombras */
    --shadow-sm: 0 4px 10px rgba(18, 20, 22, 0.07);
    --shadow-md: 0 10px 25px rgba(18, 20, 22, 0.1);
    --shadow-lg: 0 20px 45px rgba(18, 20, 22, 0.12);
    --shadow-dark-sm: 0 4px 15px rgba(0, 0, 0, 0.2);
    --shadow-dark-md: 0 8px 30px rgba(0, 0, 0, 0.3);

    /* Outros */
    --border-radius: 8px;
    --border-radius-large: 12px;
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-quick: all 0.3s ease-in-out;
    --font-primary: 'Poppins', sans-serif;
    --gradient-accent: linear-gradient(135deg, var(--accent), var(--accent-dark));
    --gradient-dark-subtle: linear-gradient(180deg, #151719 0%, var(--bg-dark) 100%);

    /* Layout */
    --header-height: 70px;
    --header-height-scrolled: 60px;
    --section-padding-y: 100px;
    --container-max-width: 1160px;
    --grid-gap: 30px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 100%; /* Base para REMs */
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    line-height: 1.7;
    background-color: var(--bg-dark);
    color: var(--text-on-dark-muted);
    overflow-x: clip; /* Previne scroll horizontal indesejado */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative; /* Para contexto de empilhamento (preloader, back-to-top) */
}

body.no-scroll {
    overflow: hidden; /* Usado quando menu mobile está aberto */
}

/* === Estilos Gerais para Seções === */
main { display: block; } /* Garante main como block */
section {
    padding: var(--section-padding-y) 0;
    position: relative;
    overflow: hidden; /* Contém elementos de fundo/animações */
    z-index: 1; /* Abaixo do header */
}
.section-padding { padding: var(--section-padding-y) 0; }

/* Reset de Cores para Seções Claras (Default) */
section:not(.dark-bg):not(.hero-section):not(.contact-cta-section) {
    background-color: var(--bg-light);
    color: var(--text-medium);
}
section:not(.dark-bg):not(.hero-section):not(.contact-cta-section) h2,
section:not(.dark-bg):not(.hero-section):not(.contact-cta-section) h3,
section:not(.dark-bg):not(.hero-section):not(.contact-cta-section) h4 {
    color: var(--text-dark);
}
section:not(.dark-bg):not(.hero-section):not(.contact-cta-section) p {
    color: var(--text-medium);
}
section:not(.dark-bg):not(.hero-section):not(.contact-cta-section) .section-tag {
    color: var(--accent-dark);
    background: rgba(29, 216, 222, 0.1);
}
section:not(.dark-bg):not(.hero-section):not(.contact-cta-section) .section-title::after {
    background: linear-gradient(90deg, var(--accent-dark), var(--accent));
}

/* === Utilitários === */
.container {
    width: 90%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 15px; /* Pequeno padding lateral */
}

.dark-bg {
    background-color: var(--bg-dark);
    color: var(--text-on-dark);
}
.dark-bg p, .dark-bg .testimonial-quote p {
    color: var(--text-on-dark-muted);
}
.dark-bg h2, .dark-bg h3, .dark-bg h4, .dark-bg cite {
    color: var(--text-on-dark);
}
.dark-bg .section-tag.light {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent);
}
.dark-bg .section-title.light { color: var(--bg-white); }
.dark-bg .section-title.light::after { background: var(--gradient-accent); }

.section-header {
    margin-bottom: 50px;
    position: relative;
    z-index: 2; /* Acima de elementos de fundo */
}
.section-header.centered { text-align: center; }

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    background: var(--accent-light-bg);
    padding: 6px 14px;
    border-radius: 4px;
}

.section-title {
    font-size: clamp(1.8rem, 4.5vw, 2.5rem); /* Título responsivo */
    font-weight: 700;
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 0;
    line-height: 1.3;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 1.5px;
}
.section-header.centered .section-title { display: inline-block; } /* Permite centralizar o after */
.section-header.centered .section-title::after { left: 50%; transform: translateX(-50%); }

/* === Tipografia Base === */
h1, h2, h3, h4 { line-height: 1.3; font-weight: 600; }
h1 { font-size: clamp(2.4rem, 6.5vw, 3.8rem); letter-spacing: -1.5px; font-weight: 800; }
h3 { font-size: 1.1rem; margin-bottom: 10px; font-weight: 600; }
h4 { font-size: 1rem; margin-bottom: 8px; font-weight: 600; }

p { margin-bottom: 1.2rem; font-size: 0.95rem; line-height: 1.8; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; transition: var(--transition-quick); }
a:hover { color: var(--accent-dark); }

ul { list-style: none; padding: 0; }
img { max-width: 100%; height: auto; display: block; border-radius: var(--border-radius); }

svg.feather { width: 1em; height: 1em; stroke-width: 2; vertical-align: middle; }
.icon-small { width: 0.9em; height: 0.9em; margin-left: 8px; }

.link-arrow { display: inline-flex; align-items: center; font-weight: 600; }
.link-arrow svg { margin-left: 6px; transition: transform 0.3s ease; }
.link-arrow:hover svg { transform: translateX(4px); }
.link-arrow.white { color: var(--bg-white); }
.link-arrow.white:hover { color: var(--accent); }

/* === Header Sólido e Funcional === */
#main-header {
    background-color: var(--bg-header);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    border-bottom: 1px solid transparent;
    transition: background-color 0.4s ease, height 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    will-change: background-color, height, border-color, box-shadow;
}
#main-header.scrolled {
    background-color: var(--bg-header-scrolled);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: var(--header-height-scrolled);
    border-color: var(--border-color-dark);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
}
/* Add class when mobile menu is open */
#main-header.menu-open {
    background-color: var(--bg-dark); /* Ensure solid background when menu is open */
    border-color: transparent;
    box-shadow: none;
}

#main-header nav.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    padding: 0;
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
    flex-shrink: 0; /* Prevent logo from shrinking */
}
.logo img {
    height: 35px; /* Adjust as needed */
    filter: brightness(0) invert(1); /* Make logo white */
    transition: opacity 0.3s ease;
    display: block;
}
.logo:hover img { opacity: 0.85; }

/* Container for mobile menu navigation */
.nav-menu-container {
    display: flex;
    align-items: center;
    height: 100%;
    margin-left: auto; /* Pushes nav links left before desktop CTA */
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
}
.nav-links li {
    margin-left: 35px; /* Spacing between nav items */
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-link {
    color: var(--text-on-dark-muted);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 0 10px; /* Horizontal padding */
    line-height: var(--header-height); /* Vertically centers text */
    position: relative;
    transition: color 0.3s ease, line-height 0.4s ease;
    display: flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
}
#main-header.scrolled .nav-link {
    line-height: var(--header-height-scrolled);
}
/* Underline effect */
.nav-link::after {
    content: '';
    position: absolute;
    /* Adjust bottom position dynamically based on header height */
    bottom: calc(var(--header-height) * 0.25); /* Adjust multiplier as needed */
    left: 10px;
    right: 10px;
    height: 2px;
    background-color: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), bottom 0.4s ease;
}
#main-header.scrolled .nav-link::after {
     bottom: calc(var(--header-height-scrolled) * 0.2); /* Adjust for scrolled state */
}
.nav-link:hover,
.nav-link.active { /* Active class added by JS */
    color: var(--bg-white);
}
.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

/* CTAs */
.desktop-cta {
    display: inline-flex; /* Shows on desktop */
    align-items: center;
    margin-left: 30px; /* Space between nav and button */
    flex-shrink: 0;
}
.mobile-cta {
    display: none !important; /* Hidden by default, shown in mobile menu */
}

/* Hamburger Menu Toggle */
.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1011; /* Above nav container */
    flex-shrink: 0;
    margin-left: 15px; /* Space from desktop CTA or nav links */
}
.menu-icon-line {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-on-dark);
    border-radius: 1px;
    transition: all 0.3s ease-in-out;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.line1 { top: calc(50% - 7px); }
.line2 { top: 50%; transform: translateX(-50%) translateY(-50%); }
.line3 { top: calc(50% + 5px); } /* Changed from bottom for better animation */

/* Hamburger Active State (X) */
.menu-toggle.active .line1 {
    top: 50%;
    transform: translateX(-50%) translateY(-50%) rotate(45deg);
}
.menu-toggle.active .line2 {
    opacity: 0;
    transform: translateX(-50%) translateY(-50%) scaleX(0);
}
.menu-toggle.active .line3 {
    top: 50%; /* Bring to center */
    transform: translateX(-50%) translateY(-50%) rotate(-45deg);
}

/* === Header & Mobile Menu Responsiveness === */
@media (max-width: 992px) {
    .menu-toggle { display: block; }
    .desktop-cta { display: none; } /* Hide desktop CTA */

    .nav-menu-container {
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        width: clamp(280px, 80vw, 360px); /* Responsive width */
        height: 100dvh; /* Dynamic viewport height */
        background-color: var(--bg-dark-alt);
        transition: right 0.5s cubic-bezier(0.645, 0.045, 0.355, 1);
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.4);
        z-index: 1005; /* Below toggle, above content */
        overflow-y: auto; /* Allow scrolling if content overflows */
        /* Padding top matches header height to avoid overlap */
        padding-top: var(--header-height);
        display: flex; /* Use flex for easier CTA positioning */
        flex-direction: column;
        justify-content: space-between; /* Push CTA to bottom */
    }
    /* Adjust padding if header is scrolled when menu opens */
    #main-header.scrolled + main .nav-menu-container {
        padding-top: var(--header-height-scrolled);
    }

    .nav-menu-container.active { right: 0; } /* Slide in */

    .nav-links {
        flex-direction: column;
        align-items: stretch; /* Links take full width */
        padding: 25px 35px 40px; /* More padding */
        height: auto; /* Height adjusts to content */
        width: 100%;
    }
    .nav-links li {
        margin: 0; /* Remove desktop margin */
        width: 100%;
        height: auto;
        border-bottom: 1px solid var(--border-color-dark);
    }
    .nav-links li:last-of-type {
         border-bottom: none; /* Remove border from last link */
    }

    .nav-link {
        display: block; /* Make links block level */
        padding: 18px 0; /* Vertical padding */
        font-size: 1.1rem;
        line-height: normal;
        color: var(--text-on-dark);
        width: 100%;
        text-align: left;
        height: auto;
        transition: color 0.3s ease, background-color 0.3s ease;
    }
    .nav-link::after { display: none; } /* Hide underline on mobile */
    .nav-link:hover, .nav-link.active {
        color: var(--accent);
        background-color: rgba(29, 216, 222, 0.05); /* Subtle hover bg */
    }

    /* Mobile CTA Styling */
    .mobile-cta {
        display: block !important; /* Show the CTA */
        margin: 0; /* Reset margin */
        padding: 30px 35px 40px; /* Padding around button */
        width: 100%;
        text-align: center;
        border: none; /* Remove list item border */
        margin-top: auto; /* Push to bottom */
    }
    .mobile-cta .cta-button {
        width: 100%;
        max-width: 280px; /* Limit button width */
    }
}


/* === Botões CTA === */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Slightly more gap */
    padding: 12px 30px; /* Adjusted padding */
    border-radius: 50px; /* Fully rounded */
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid transparent;
    transition: var(--transition-quick), transform 0.2s ease; /* Add transform transition */
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden; /* For potential inner effects */
    position: relative;
    z-index: 1;
    will-change: transform, box-shadow;
}
.cta-button span, .cta-button i, .cta-button svg {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}
/* Primary Button */
.cta-button.primary {
    background: var(--gradient-accent);
    color: var(--text-on-accent);
    box-shadow: 0 5px 15px var(--accent-glow);
}
.cta-button.primary:hover {
    color: var(--text-on-accent);
    box-shadow: 0 8px 20px rgba(29, 216, 222, 0.35); /* Enhanced shadow */
    transform: translateY(-2px); /* Subtle lift */
}
/* Hover effect - subtle scale/brightness */
.cta-button.primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50px;
    z-index: 0;
}
.cta-button.primary:hover::before {
    opacity: 1;
    filter: brightness(1.1);
}

/* Size Variants */
.cta-button.large {
    padding: 15px 40px;
    font-size: 1rem;
}
.cta-button.small {
    padding: 9px 22px;
    font-size: 0.8rem;
}

/* Specific Mailto Button Style (if needed) */
.cta-button.large.accent { /* Used for mailto */
    background: var(--gradient-accent);
    color: var(--text-on-accent);
    font-weight: 700;
    border: none;
}
.cta-button.large.accent:hover {
    box-shadow: 0 8px 25px var(--accent-glow);
    transform: translateY(-2px);
}
.cta-button.large.accent svg { color: var(--text-on-accent); }


/* === Hero Section === */
.hero-section {
    min-height: 100vh; /* Full viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    position: relative; /* For absolute children */
    padding-top: var(--header-height); /* Avoid overlap with fixed header */
}
.aurora-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0; /* Behind content */
    background-color: var(--bg-dark);
}
.aurora-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px); /* Softer blur */
    opacity: 0.2; /* Slightly less opacity */
    animation: moveAurora 25s infinite alternate ease-in-out;
    will-change: transform, opacity;
}
.aurora-shape.shape1 { width: 65vw; height: 65vw; max-width: 750px; max-height: 750px; background: rgba(29, 216, 222, 0.6); top: -15%; left: -25%; animation-duration: 28s; }
.aurora-shape.shape2 { width: 55vw; height: 55vw; max-width: 650px; max-height: 650px; background: rgba(21, 160, 165, 0.5); bottom: -20%; right: -20%; animation-duration: 22s; animation-delay: -6s; }
.aurora-shape.shape3 { width: 45vw; height: 45vw; max-width: 550px; max-height: 550px; background: rgba(29, 216, 222, 0.4); top: 30%; left: 25%; animation-duration: 30s; animation-delay: -12s; opacity: 0.15; }
@keyframes moveAurora {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 0.2; }
    50% { transform: translate(5vw, 8vh) scale(1.2) rotate(15deg); opacity: 0.25; }
    100% { transform: translate(-3vw, -6vh) scale(0.9) rotate(-10deg); opacity: 0.18; }
}

.hero-content {
    position: relative;
    z-index: 1; /* Above aurora */
    padding-bottom: 120px; /* Space for scroll indicator */
}
.hero-text { /* Contains H1, P, CTA */
    max-width: 700px; /* Control text width */
    margin: 0 auto;
}
.hero-title {
    color: var(--bg-white);
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.2;
}
/* Reveal Animation Setup */
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line .reveal-span { display: inline-block; transform: translateY(110%); /* Start hidden */ }
.hero-title .highlight { color: var(--accent); display: inline-block; } /* Highlight word */

.hero-subtitle {
    color: var(--text-on-dark);
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 600px; /* Slightly narrower */
    margin: 0 auto 40px;
    opacity: 0.9;
}
.hero-cta { margin-top: 30px; }

/* Scroll Down Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--text-on-dark-muted);
    opacity: 0.7;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: subtleBounce 2.5s infinite ease-in-out;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.scroll-indicator:hover { opacity: 1; }
.scroll-indicator span {
    writing-mode: vertical-rl; /* Vertical text */
    text-orientation: mixed;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.scroll-indicator svg { width: 20px; height: 20px; }
@keyframes subtleBounce {
    0%, 100% { transform: translate(-50%, 0); opacity: 0.6; }
    50% { transform: translate(-50%, 8px); opacity: 1; }
}


/* === Solutions Section === */
.solutions-section { background-color: var(--bg-light); }
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); /* Responsive grid */
    gap: var(--grid-gap);
    margin-top: 40px;
}
.solution-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    padding: 35px 30px;
    border-radius: var(--border-radius-large); /* More rounded */
    transition: var(--transition-quick), transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    border-left: 4px solid transparent; /* Placeholder for hover effect */
}
.solution-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-left-color: var(--accent); /* Highlight on hover */
}
.solution-icon {
    width: 55px; /* Slightly larger icon */
    height: 55px;
    border-radius: 12px; /* Match card radius */
    background: var(--accent-light-bg);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    transition: var(--transition-quick);
    flex-shrink: 0;
}
.solution-icon svg { width: 26px; height: 26px; }
.solution-card:hover .solution-icon {
    background: var(--gradient-accent);
    color: var(--text-on-accent);
    transform: scale(1.05) rotate(-5deg);
}
.solution-title {
    font-size: 1.15rem; /* Slightly larger title */
    color: var(--text-dark);
    margin-bottom: 12px;
    font-weight: 600;
}
.solution-description {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-bottom: 0;
    flex-grow: 1; /* Allows description to fill space */
    line-height: 1.7;
}


/* === Process Section (Timeline) === */
.process-section { background: var(--gradient-dark-subtle); }
.process-background-elements { /* Fading shapes */
    position: absolute; inset: 0; overflow: hidden; z-index: 0; opacity: 0.4;
}
.bg-shape { position: absolute; border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; background: rgba(29, 216, 222, 0.05); animation: morph 18s infinite linear alternate; will-change: transform, border-radius; }
.p-shape1 { width: 35vw; height: 35vw; max-width: 450px; max-height: 450px; top: 10%; left: 5%; transform: rotate(15deg); animation-duration: 20s; }
.p-shape2 { width: 45vw; height: 45vw; max-width: 550px; max-height: 550px; bottom: 5%; right: 10%; transform: rotate(-30deg); animation-duration: 25s; animation-delay: -5s; }
@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: rotate(0deg) scale(1); }
    50% { transform: rotate(15deg) scale(1.1); }
    100% { border-radius: 60% 40% 30% 70% / 70% 50% 50% 30%; transform: rotate(-10deg) scale(0.95); }
}

.process-section .container { position: relative; z-index: 1; }
.process-timeline-wrapper { max-width: 800px; margin: 60px auto 0; } /* Wider timeline */
.process-timeline {
    position: relative;
    padding-left: 50px; /* More space for dot and line */
}
/* The vertical line */
.process-timeline::before {
    content: '';
    position: absolute;
    top: 10px; /* Start below first dot */
    bottom: 10px; /* End above last dot */
    left: 15px; /* Position relative to wrapper */
    width: 3px;
    background-color: rgba(255, 255, 255, 0.15); /* Slightly more visible line */
    border-radius: 1.5px;
    z-index: 0;
}
.timeline-item {
    position: relative;
    margin-bottom: 45px; /* More space between items */
    padding-left: 45px; /* Space from dot */
    min-height: 70px;
}
.timeline-item:last-child { margin-bottom: 0; }
/* The dot on the timeline */
.timeline-dot {
    position: absolute;
    left: 7px; /* Position dot over the line */
    top: 8px; /* Align with text */
    width: 20px;
    height: 20px;
    background-color: var(--bg-dark-alt);
    border: 4px solid var(--accent);
    border-radius: 50%;
    z-index: 1; /* Above line */
    transition: transform 0.3s ease;
}
.timeline-item:hover .timeline-dot {
    transform: scale(1.1); /* Subtle scale on hover */
}

.timeline-content { padding: 0; }
.timeline-step {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 14px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}
.timeline-content h4 {
    color: var(--text-on-dark);
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px; /* Space between icon and text */
    line-height: 1.4;
}
.timeline-content h4 svg {
    color: var(--accent);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.9;
}
.timeline-content p {
    color: var(--text-on-dark-muted);
    font-size: 0.95rem; /* Slightly larger text */
    margin-bottom: 0;
    line-height: 1.7;
}

@media (max-width: 768px) { /* Timeline Responsive */
    .process-timeline { padding-left: 35px; }
    .timeline-item { padding-left: 35px; min-height: auto; }
    .timeline-dot { left: -8px; top: 6px; width: 18px; height: 18px; border-width: 3px;}
    .timeline-content h4 { font-size: 1.1rem; }
}


/* === Showcase Section (Portfolio Grid) === */
.showcase-section { background-color: var(--bg-light); }
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Slightly larger min size */
    gap: var(--grid-gap);
    margin-top: 40px;
}
.showcase-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-md);
    display: block;
    text-decoration: none;
    background-color: var(--bg-dark-alt); /* Fallback bg */
    transition: box-shadow 0.3s ease;
}
.showcase-item:hover {
     box-shadow: var(--shadow-lg); /* Elevate shadow on hover */
}

.showcase-item img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3; /* Maintain aspect ratio */
    object-fit: cover; /* Cover the area */
    transition: transform 0.6s var(--transition-smooth), opacity 0.4s ease;
    border-radius: var(--border-radius-large); /* Match container */
}
.showcase-item:hover img {
    transform: scale(1.05); /* Subtle zoom on hover */
}

.showcase-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, rgba(18, 20, 22, 0.95) 95%); /* Stronger gradient */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Align text to bottom */
    padding: 30px; /* More padding */
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: var(--border-radius-large);
}
.showcase-item:hover .showcase-overlay { opacity: 1; }

.showcase-title {
    color: var(--bg-white);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    transform: translateY(20px); /* Start lower */
    transition: transform 0.5s ease 0.1s;
}
.showcase-category {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px; /* More space before link */
    transform: translateY(20px);
    transition: transform 0.5s ease 0.15s;
}
.showcase-link {
    color: var(--bg-white);
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex; /* Use flex for alignment */
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s, color 0.3s ease;
}
.showcase-link svg { margin-left: 6px; width: 1em; height: 1em; }

/* Animate overlay text on hover */
.showcase-item:hover .showcase-title,
.showcase-item:hover .showcase-category,
.showcase-item:hover .showcase-link {
    transform: translateY(0);
    opacity: 1;
}
.showcase-link:hover { color: var(--accent); }


/* === Testimonials Section === */
.testimonials-section { background-color: var(--bg-dark); }
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--grid-gap);
    margin-top: 50px;
}
.testimonial-card {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-color-dark);
    padding: 40px; /* More padding */
    border-radius: var(--border-radius-large);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-dark-sm);
    transition: var(--transition-quick), transform 0.3s ease, box-shadow 0.3s ease;
}
.testimonial-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-dark-md);
    border-color: rgba(255, 255, 255, 0.18); /* Slightly lighter border */
}
.testimonial-icon { /* Quote icon */
    color: var(--accent);
    opacity: 0.3; /* Subtler icon */
    width: 35px;
    height: 35px;
    margin-bottom: 25px;
    flex-shrink: 0;
}
.testimonial-quote {
    font-size: 1rem;
    color: var(--text-on-dark);
    font-style: italic; /* Italicize quote */
    font-weight: 400;
    line-height: 1.8; /* More line height */
    margin-bottom: 30px;
    flex-grow: 1; /* Quote takes available space */
}
.testimonial-quote p { margin-bottom: 0; } /* Remove default p margin inside blockquote */

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: auto; /* Push author to bottom */
    padding-top: 25px;
    border-top: 1px solid var(--border-color-dark);
}
.author-avatar { /* Use class for avatar */
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color-dark);
    flex-shrink: 0;
}
.author-info { line-height: 1.4; }
.author-name { /* Use cite for semantic meaning */
    display: block;
    color: var(--text-on-dark);
    font-weight: 600;
    font-size: 0.95rem;
    font-style: normal; /* Override blockquote italic */
}
.author-title {
    display: block;
    font-size: 0.8rem;
    color: var(--text-on-dark-muted);
}


/* === Contact CTA Section === */
.contact-cta-section {
    background-color: var(--bg-light); /* Light background for contrast */
    text-align: center;
}
.contact-cta-content {
    max-width: 700px; /* Wider content area */
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.cta-title {
    color: var(--text-dark);
    font-size: clamp(1.8rem, 4.5vw, 2.4rem);
    line-height: 1.35; /* Adjusted line height */
    margin-bottom: 20px;
}
.cta-description {
    color: var(--text-medium);
    font-size: 1.05rem; /* Slightly larger */
    margin-bottom: 35px;
    line-height: 1.8;
}
.contact-cta-content .cta-button { margin-top: 10px; }


/* === Footer === */
#main-footer {
    background-color: var(--bg-dark);
    border-top: 1px solid var(--border-color-dark);
    padding-top: 70px;
    font-size: 0.9rem;
    position: relative;
    z-index: 5; /* Ensure footer is above section background elements */
}
.footer-content {
    display: grid;
    /* 4 columns on large screens */
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px 30px; /* Row and column gap */
    padding-bottom: 60px;
}
.footer-col h4 {
    color: var(--text-on-dark);
    margin-bottom: 25px; /* More space below heading */
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Footer Column 1: About */
.footer-about .footer-logo { display: block; max-width: 150px; margin-bottom: 20px; }
.footer-about .footer-logo img { filter: brightness(0) invert(1); }
.footer-about p { color: var(--text-on-dark-muted); margin-bottom: 25px; font-size: 0.85rem; line-height: 1.7; }
.social-links-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; /* Slightly larger */
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-on-dark-muted);
    margin-right: 12px; /* More space */
    transition: var(--transition-quick), transform 0.2s ease;
}
.social-links-footer a:hover {
    background-color: var(--accent);
    color: var(--text-on-accent);
    transform: translateY(-3px); /* Lift effect */
}
.social-links-footer svg { width: 18px; height: 18px; }

/* Footer Column 2 & 4: Links */
.footer-col ul li { margin-bottom: 14px; }
.footer-col ul li a {
    color: var(--text-on-dark-muted);
    font-size: 0.9rem;
    transition: var(--transition-quick), transform 0.2s ease;
    display: inline-block;
    position: relative;
    padding-left: 0; /* Reset padding */
}
.footer-col ul li a::before { /* Subtle underline effect */
     content: '';
     position: absolute;
     bottom: -3px;
     left: 0;
     width: 0;
     height: 1px;
     background-color: var(--accent);
     transition: width 0.3s ease;
}
.footer-col ul li a:hover {
    color: var(--accent);
    transform: translateX(4px); /* Slight move right */
}
.footer-col ul li a:hover::before {
    width: 100%; /* Show underline on hover */
}

/* Footer Column 3: Contact */
.footer-contact p {
    display: flex;
    align-items: flex-start; /* Align icon with first line */
    margin-bottom: 15px;
    font-size: 0.9rem;
    line-height: 1.6;
}
.footer-contact svg {
    margin-right: 12px;
    color: var(--accent);
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    margin-top: 5px; /* Align icon vertically */
}
.footer-contact a {
    color: var(--text-on-dark-muted);
    word-break: break-word;
    transition: color 0.3s ease;
}
.footer-contact a:hover { color: var(--accent); }

/* Footer Bottom Bar */
.footer-bottom {
    background-color: #0c0e0f; /* Slightly darker than footer */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 25px 0;
    text-align: center;
    font-size: 0.8rem;
}
.footer-bottom p {
    margin: 0;
    color: var(--text-on-dark-muted);
    opacity: 0.7; /* Less prominent text */
}


/* === Preloader === */
.preloader {
    position: fixed;
    inset: 0;
    background-color: var(--bg-dark);
    z-index: 10001; /* Highest index */
    display: flex;
    align-items: center;
    justify-content: center;
    /* Fade out transition */
    transition: opacity 0.6s ease 0.3s, visibility 0s linear 0.9s; /* Delay visibility change */
    opacity: 1;
    visibility: visible;
}
.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Allow interaction with content below */
}
.loader-ring {
    width: 45px;
    height: 45px;
    border: 4px solid var(--border-color-dark); /* Base ring color */
    border-top-color: var(--accent); /* Accent spinner color */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* === Back to Top Button === */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px; /* Slightly larger */
    height: 45px;
    background: var(--accent);
    color: var(--text-on-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-dark-md); /* Darker shadow */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9); /* Start lower and smaller */
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease; /* Bounce effect */
    z-index: 999;
    border: none;
    cursor: pointer;
}
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1); /* Animate to final position */
}
#back-to-top:hover {
    background: var(--accent-dark);
    transform: scale(1.08) translateY(-3px); /* Scale up and lift */
    box-shadow: var(--shadow-dark-lg); /* Even more shadow */
}
#back-to-top svg { width: 22px; height: 22px; }


/* === Scroll Animations === */
/* Initial State: Hidden */
.animate-on-load, .animate-on-scroll {
    opacity: 0;
    will-change: opacity, transform; /* Optimize animation */
}

/* Animation Types (Define initial transform) */
.animate-on-scroll[data-animation="fade-in"],
.animate-on-load[data-animation="fade-in"] {
    transform: translateY(25px);
}
.animate-on-scroll[data-animation="fade-in-up"],
.animate-on-load[data-animation="fade-in-up"] {
    transform: translateY(50px);
}
.animate-on-scroll[data-animation="fade-in-up-slow"],
.animate-on-load[data-animation="fade-in-up-slow"] {
    transform: translateY(60px);
}
.animate-on-scroll[data-animation="fade-in-left"] {
    transform: translateX(-50px);
}
.animate-on-scroll[data-animation="fade-in-right"] {
    transform: translateX(50px);
}
.animate-on-scroll[data-animation="zoom-in"] {
    transform: scale(0.9);
}

/* Hero Text Reveal Animation Setup */
.animate-on-load[data-animation="reveal-up"] {
    opacity: 1; /* Container is visible */
}
.animate-on-load[data-animation="reveal-up"] .line {
    overflow: hidden; /* Clip the inner span */
    display: block;
}
.animate-on-load[data-animation="reveal-up"] .line .reveal-span {
    display: inline-block; /* Needed for transform */
    transform: translateY(110%); /* Start fully below */
    transition: none; /* Transition applied by JS */
    will-change: transform;
}

/* Visible State (Applied via JS adding .is-visible class) */
.animate-on-load.is-visible,
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translate(0, 0) scale(1); /* Reset transform */
    /* Define the transition WHEN the class is added */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
/* Specific duration for slow animations */
.animate-on-load.is-visible[data-animation="fade-in-up-slow"],
.animate-on-scroll.is-visible[data-animation="fade-in-up-slow"] {
    transition-duration: 1.1s;
}
/* Hero Text Reveal Animation - Final State (Transform happens via JS adding transition style) */
.animate-on-load.is-visible[data-animation="reveal-up"] .line .reveal-span {
     transform: translateY(0);
     /* JS applies: transition: transform 1s [delay]ms cubic-bezier(0.16, 1, 0.3, 1); */
}


/* === Responsividade === */

/* Larger Tablets / Small Laptops */
@media (max-width: 1024px) {
    :root { --section-padding-y: 90px; }
    .container { max-width: 92%; }
    .process-timeline-wrapper { max-width: 90%; } /* Make timeline use more space */
    .footer-content { grid-template-columns: 1.5fr 1fr 1fr; gap: 35px; }
    /* Make legal column span full width below others */
    .footer-col.footer-legal {
        grid-column: span 3;
        text-align: center;
        padding-top: 30px;
        border-top: 1px solid var(--border-color-dark);
        margin-top: 10px;
    }
     .footer-col.footer-legal ul { display: inline-flex; gap: 25px; }
}

/* Tablets */
@media (max-width: 768px) {
    :root { --section-padding-y: 80px; --grid-gap: 25px; }
    .container { width: 90%; }

    h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
    .section-title { font-size: clamp(1.6rem, 5vw, 2.1rem); }

    .hero-section { min-height: 90vh; padding-bottom: 100px; }
    .hero-subtitle { font-size: 1rem; }

    .solutions-grid { grid-template-columns: 1fr; gap: 20px; }
    .showcase-grid { grid-template-columns: 1fr; gap: 20px; }
    .testimonial-grid { grid-template-columns: 1fr; gap: 25px; }

    /* Footer Stack */
    .footer-content {
        grid-template-columns: 1fr; /* Stack all columns */
        text-align: center;
        gap: 40px;
    }
    .footer-col { margin-bottom: 0; }
    /* Center align content within columns */
    .footer-about, .social-links-footer, .footer-col ul, .footer-contact p {
        align-items: center;
        justify-content: center;
    }
     .footer-about .footer-logo { margin-left: auto; margin-right: auto; }
    .footer-about p { max-width: 90%; margin-left: auto; margin-right: auto; }
    .footer-contact p { justify-content: center; } /* Center contact items */
    .social-links-footer { margin-top: 15px; }
    .footer-col.footer-legal { grid-column: auto; padding-top: 30px; margin-top: 10px; border-top: 1px solid var(--border-color-dark);}
    .footer-col.footer-legal ul { gap: 20px; }
}

/* Mobile Phones */
@media (max-width: 480px) {
    :root { --section-padding-y: 70px; }
    body { line-height: 1.65; } /* Slightly more line height */

    h1 { font-size: clamp(1.8rem, 8vw, 2.4rem); letter-spacing: -1px;}
    .hero-subtitle { font-size: 0.95rem; }

    .cta-button { padding: 10px 26px; font-size: 0.85rem; }
    .cta-button.large { padding: 13px 32px; font-size: 0.95rem; }

    .solution-card { padding: 30px 25px; }
    .timeline-item { margin-bottom: 35px; }
    .testimonial-card { padding: 35px 25px; }

    #back-to-top { width: 40px; height: 40px; bottom: 20px; right: 20px; }
    #back-to-top svg { width: 20px; height: 20px; }

    .footer-content { gap: 30px; padding-bottom: 50px;}
    .footer-col h4 { margin-bottom: 15px; }
    .footer-col ul li { margin-bottom: 10px; }
    .footer-bottom { padding: 20px 0; font-size: 0.75rem;}
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; /* Disable smooth scroll */ }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    transition-delay: 0ms !important;
  }
  /* Ensure animated elements are visible immediately */
 .animate-on-load, .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
   .animate-on-load[data-animation="reveal-up"] .line .reveal-span {
      transform: translateY(0);
  }
  .aurora-shape { animation: none; opacity: 0.1; } /* Static shapes */
  .scroll-indicator { animation: none; }
}
