/* ========= 1. VARIÁVEIS E ESTILOS GLOBAIS ========= */
:root {
    /* Paleta de Cores - Premium Indigo */
    --color-background: #111827; 
    --color-surface: #1f2937;    
    
    --color-primary: #4f46e5;    /* Indigo 600 */
    --color-primary-dark: #3730a3; 
    --color-primary-hover: #6366f1; 
    
    --color-text-primary: #f3f4f6;  
    --color-text-secondary: #9ca3af; 
    
    /* Bordas */
    --color-border-subtle: rgba(255, 255, 255, 0.05);
    --color-border-hover: rgba(139, 92, 246, 0.5);

    /* Efeitos e Animações */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    --shadow-glow: 0 0 30px -10px rgba(139, 92, 246, 0.3), 0 0 10px 0 rgba(139, 92, 246, 0.15);
    --shadow-card-hover: 0 20px 40px -15px rgba(0,0,0,0.5);

    /* Tipografia e Layout */
    --font-family: 'Figtree', sans-serif;
    --container-width: 1120px;
    --container-padding: 1.5rem;
    --section-padding: 8rem 0;
}

body {
    background-color: var(--color-background); 
    color: var(--color-text-secondary);
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6; 
    position: relative;
    background-image: radial-gradient(circle at 50% 0%, rgba(79, 70, 229, 0.1) 0%, transparent 50%);
    background-attachment: fixed;
    margin: 0;
}

/* NOISE TEXTURE */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999; 
    opacity: 0.04; 
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

main { position: relative; z-index: 1; }

.container {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* Tipografia Utilitária */
.section-title {
    font-size: 2.5rem;
    font-weight: 700; 
    color: var(--color-text-primary);
    text-align: center;
    margin-bottom: 4rem;
    letter-spacing: -0.025em; 
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(to right, #ffffff 0%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* ========= 2. BOTÕES ========= */
.button {
    display: inline-block;
    padding: 0.875rem 2.5rem; 
    border-radius: 8px; 
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: -0.01em;
    border: none; 
    transition: var(--transition-base);
}

.button-primary {
    color: #ffffff;
    background: var(--color-primary); 
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.3); 
}

.button-primary:hover {
    transform: translateY(-2px); 
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.5), 0 0 40px rgba(79, 70, 229, 0.2);
    background: var(--color-primary-hover);
}

.button-light {
    background-color: transparent;
    color: var(--color-text-primary);
    border: 1px solid rgba(243, 244, 246, 0.2); 
}

.button-light:hover {
    background-color: rgba(255, 255, 255, 0.05); 
    border-color: #fff; 
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1); 
    transform: translateY(-1px);
}

/* ========= 3. HEADER & NAV ========= */
.main-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 100;
    padding: 1.25rem 0;
    background-color: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border-subtle); 
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem; 
    font-weight: 800;
    color: var(--color-text-primary);
    z-index: 102;
    letter-spacing: -0.03em;
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none; /* Reset padrão */
    margin: 0; padding: 0;
}

.main-nav a {
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    transition: color 0.2s ease;
}

.main-nav a:hover { color: var(--color-text-primary); }

.menu-toggle {
    display: none;
    width: 30px; height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 102;
    position: relative;
}

.hamburger-line {
    width: 100%; height: 2px;
    background-color: var(--color-text-primary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: absolute;
    left: 0;
}
.hamburger-line:nth-child(1) { top: 0; }
.hamburger-line:nth-child(2) { top: 10px; }
.hamburger-line:nth-child(3) { top: 20px; }

/* ========= 4. HERO SECTION ========= */
.hero-section {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    text-align: center;
}

.hero-title {
    font-size: 5.5rem;
    font-weight: 800;
    color: var(--color-text-primary);
    max-width: 1100px;
    margin: 0 auto;
    letter-spacing: -0.04em; 
    line-height: 1.25; 
    padding-bottom: 10px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 580px;
    margin: 2rem auto 3rem;
    font-weight: 400;
    line-height: 1.6; 
}

/* ========= 5. ESTILOS COMPARTILHADOS (Cards) ========= */
.service-card,
.tech-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border-subtle);
    border-radius: 12px; 
    padding: 2.5rem;
    text-align: left; 
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: var(--transition-smooth);
    backface-visibility: hidden; 
    transform: translateZ(0); 
}

.service-card:hover,
.tech-card:hover {
    transform: translateY(-6px);
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-glow), var(--shadow-card-hover);
}

/* Services */
.services-section { padding: var(--section-padding); }
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}
.service-card-icon {
    width: 42px; height: 42px;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
    flex-shrink: 0;
}
.service-card-title, .tech-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}
.service-card-description, .tech-card-description {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Techs */
.techs-section {
    padding: 6rem 0;
    border-top: 1px solid var(--color-border-subtle);
}
.techs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.tech-card { padding: 2rem; }
.tech-card-description { flex-grow: 1; margin-bottom: 1.5rem; }
.tech-icons-row {
    display: flex; gap: 1.25rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border-subtle);
    width: 100%;
}
.tech-icons-row i {
    font-size: 1.5rem; color: #6b7280; 
    transition: color 0.3s ease;
}
.tech-icons-row i:hover { color: var(--color-text-primary); }

/* ========= 6. METHODOLOGY SECTION (TIMELINE COM QUADRADOS) ========= */
.methodology-section {
    padding: 4rem 0 8rem;
    border-bottom: 1px solid var(--color-border-subtle);
}

.methodology-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    position: relative;
    /* Adicionado padding top para dar espaço ao "overflow" visual se necessário */
    padding-top: 1rem;
}

/* A Linha Horizontal da Timeline */
.methodology-steps::before {
    content: "";
    position: absolute;
    /* Ajuste fino para a linha passar EXATAMENTE no meio do quadrado */
    /* Altura do quadrado (100px) / 2 = 50px. + Padding top do container (16px) = 66px */
    top: 66px; 
    left: 0; 
    width: 100%; 
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--color-border-hover) 15%, 
        var(--color-border-hover) 85%, 
        transparent 100%
    );
    z-index: 0; /* Fica atrás de tudo */
    opacity: 0.7;
}

.step-item {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    /* Remove padding lateral para alinhar com o grid */
}

.step-number {
    /* O Quadrado */
    display: flex;
    justify-content: center;
    align-items: center;
    
    width: 100px;
    height: 100px;
    
    background-color: var(--color-background); /* Fundo igual ao site para cobrir a linha */
    border: 1px solid var(--color-border-subtle); /* Borda sutil do quadrado */
    /* Opcional: Efeito vidro sutil */
    /* background: rgba(17, 24, 39, 0.95); */
    
    margin-bottom: 2rem; /* Espaço até o título */
    position: relative;
    z-index: 2; /* Fica acima da linha */
    
    /* Tipografia do Número */
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    
    /* Estilo Outline (Contorno) */
    color: transparent; 
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.4); 
    
    transition: var(--transition-base);
}

/* Efeito Hover no passo inteiro ilumina o quadrado */
.step-item:hover .step-number {
    border-color: var(--color-primary);
    -webkit-text-stroke: 1px var(--color-primary);
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.15);
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff; 
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.step-description {
    font-size: 1rem;
    color: #9ca3af; 
    line-height: 1.6;
    max-width: 95%;
}

/* ========= 7. ABOUT SECTION ========= */
.about-section {
    padding: var(--section-padding);
    background: radial-gradient(circle at 0% 50%, rgba(79, 70, 229, 0.05) 0%, transparent 40%);
}
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr; 
    gap: 4rem;
    align-items: center;
}
.about-content-left .section-title.align-left {
    text-align: left;
    margin-bottom: 2rem; 
}
.about-text p {
    font-size: 1.125rem;
    line-height: 1.75;
    color: #d1d5db; 
    margin-bottom: 1.5rem;
}
.quote-card {
    background: rgba(31, 41, 55, 0.4); 
    border: 1px solid var(--color-border-subtle);
    border-radius: 16px;
    padding: 3rem;
    position: relative;
    backdrop-filter: blur(10px); 
    box-shadow: 20px 20px 40px -10px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(255,255,255,0.05);
}
.quote-icon {
    color: var(--color-primary);
    opacity: 0.8;
    margin-bottom: 1.5rem;
}
.quote-text {
    font-size: 1.75rem;
    font-weight: 600; 
    font-style: italic;
    color: #ffffff;
    line-height: 1.4;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}
.quote-author { display: flex; align-items: center; gap: 1rem; }
.quote-author::before {
    content: "";
    display: block;
    width: 40px; height: 2px;
    background-color: var(--color-border-subtle);
}
.author-role {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-primary);
    font-weight: 700;
}

/* ========= 8. PROJECTS SECTION ========= */
.projects-section { padding: var(--section-padding); }
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 4rem; 
}
.project-card {
    display: flex;
    flex-direction: column;
    cursor: default; 
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.project-card:hover { transform: translateY(-6px); }
.project-image-wrapper {
    display: block;
    width: 100%;
    aspect-ratio: 16/10; 
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--color-border-subtle);
    background-color: var(--color-surface);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    backface-visibility: hidden;
}
.project-card:hover .project-image-wrapper {
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-glow), var(--shadow-card-hover);
}
.project-image-wrapper img {
    width: 100%; height: 100%;
    object-fit: cover; 
    object-position: top center;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.project-card:hover .project-image-wrapper img { transform: scale(1.025); }
.project-info {
    display: flex;
    flex-direction: column;
    padding-top: 1.5rem;
    text-align: left;
}
.project-category {
    color: var(--color-primary);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.5rem;
    display: inline-block;
    opacity: 0.9;
}
.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.3;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}
.project-title a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
.project-title a:hover { color: var(--color-primary-hover); }

/* ========= 9. CONTACT SECTION ========= */
.contact-section {
    padding: 8rem 0;
    background: linear-gradient(180deg, var(--color-background) 0%, rgba(79, 70, 229, 0.08) 100%); 
    text-align: center;
    border-top: 1px solid var(--color-border-subtle);
}
.contact-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}
.contact-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 500px;
    margin: 0 auto 3rem;
}

/* ========= 10. RODAPÉ ========= */
.main-footer {
    padding: 4rem 0; 
    border-top: 1px solid var(--color-border-subtle);
    background-color: #0d121c; 
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
}
.footer-col h4 {
    color: var(--color-text-primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.brand-col .footer-logo {
    display: block;
    margin-bottom: 1rem;
    color: #fff;
    text-decoration: none;
}
.footer-mission {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    max-width: 300px;
    margin-bottom: 2rem;
}
.footer-copyright {
    display: block;
    font-size: 0.8rem;
    color: #4b5563;
}
.links-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
    padding: 0; margin: 0;
}
.links-col a {
    text-decoration: none;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    transition: color 0.2s;
}
.links-col a:hover { color: var(--color-primary); }
.footer-social { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.footer-social a {
    width: 24px; height: 24px;
    fill: var(--color-text-secondary);
    transition: fill 0.3s ease;
}
.footer-social a:hover { fill: #fff; }
.footer-policies { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-policies a { text-decoration: none; font-size: 0.8rem; color: #4b5563; }

/* ========= 11. MEDIA QUERIES ========= */
@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; gap: 3rem; }
    .about-content-left .section-title.align-left { text-align: center; }
    .about-text { text-align: center; }
    .quote-card { padding: 2rem; text-align: center; }
    .quote-author { justify-content: center; }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; flex-direction: column; justify-content: space-between; }
    .main-nav { display: none; }
    .nav-open .main-nav {
        display: flex; justify-content: center; align-items: center;
        position: fixed; top: 0; left: 0;
        width: 100%; height: 100vh;
        background-color: var(--color-background);
        z-index: 101;
    }
    .nav-open .main-nav ul { flex-direction: column; gap: 2rem; }
    .nav-open .main-nav a { font-size: 1.5rem; }
    body.nav-open { overflow: hidden; }
    .hero-title { font-size: 3.2rem; }
    
    /* Ajuste Timeline Mobile */
    .methodology-steps { grid-template-columns: 1fr; gap: 3rem; }
    /* Esconde a linha horizontal no mobile ou ajusta para vertical (aqui optamos por esconder) */
    .methodology-steps::before { display: none; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
    .footer-mission { margin: 0 auto 2rem; }
    .footer-social { justify-content: center; }
}