@import url('https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600&display=swap');

/* =========================================
   Design Tokens - Replicando Sparo.com.br
   ========================================= */
:root {
    /* Cores */
    --bg-dark: #000000;
    --bg-card: #0d0d0d;
    --border-color: #222222;
    --text-main: #f0f0f0;
    --text-muted: #888888;
    --accent-color: #e57d42; /* Laranja acobreado */
    --accent-glow: rgba(229, 125, 66, 0.3);
    --btn-glow: rgba(100, 150, 255, 0.15); /* Brilho azulado sutil no botão */

    /* Fontes */
    --font-sans: 'Geist', 'Inter', sans-serif;
    --font-serif: 'Instrument Serif', serif;

    --transition-smooth: 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

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

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}

/* =========================================
   Tipografia
   ========================================= */
h1, h2, h3 {
    font-weight: 500;
    line-height: 1.2;
}

.text-accent {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--accent-color);
    font-weight: 400;
}

.title-lg {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    text-align: center;
    margin-bottom: 1rem;
    line-height: 1.1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* =========================================
   Layout & Header
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header {
    padding: 1.5rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    backdrop-filter: blur(4px);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    letter-spacing: -1px;
}

.nav-pill {
    display: flex;
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    padding: 0.5rem 1.5rem;
    gap: 2rem;
    backdrop-filter: blur(10px);
}

.nav-pill a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-pill a:hover {
    color: white;
}

/* =========================================
   Botões e Animações de Botão
   ========================================= */
.btn {
    background: #0a0a0a;
    color: white;
    text-decoration: none;
    padding: 0.8rem 2rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: inset 0 20px 20px -20px var(--btn-glow);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 20px 20px -20px rgba(100, 150, 255, 0.4), 0 0 20px rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.btn:hover::before {
    left: 100%;
}

/* =========================================
   Seção Hero
   ========================================= */
.hero {
    min-height: 100vh;
    position: relative;
    padding-top: 120px;
    overflow: hidden; /* Impede que o brilho (glow) crie rolagem lateral no mobile */
}

.split-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

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

.hero-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 500px;
}

/* =========================================
   Botão Neon Rotativo
   ========================================= */
.btn-neon {
    position: relative;
    display: inline-flex;
    padding: 2px;
    border-radius: 100px;
    overflow: hidden;
    background: #000;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.btn-neon:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(229, 125, 66, 0.15);
}

.btn-neon::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(transparent, transparent, transparent, var(--accent-color));
    animation: rotate-neon 4s linear infinite;
}

.btn-neon-inner {
    position: relative;
    background: linear-gradient(to bottom, #151515, #050505);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 100px;
    z-index: 1;
    font-size: 1.05rem;
    font-weight: 500;
}

@keyframes rotate-neon {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =========================================
   Elementos Visuais Direitos (Foguete e Cards)
   ========================================= */
.hero-visuals {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.rocket-container {
    position: absolute;
    left: 25%;
    top: 25%;
    width: 400px; /* Tamanho ajustável para a imagem do foguete */
    z-index: 3;
    animation: float-rocket 6s ease-in-out infinite;
    /* Rotaciona o foguete para a direita (ajuste os graus se a imagem já estiver inclinada) */
    transform: rotate(45deg);
    filter: drop-shadow(0 30px 40px rgba(0,0,0,0.6));
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rocket-container:hover {
    /* Impulsiona para cima e para a direita no hover */
    transform: rotate(45deg) translate(20px, -60px) scale(1.05);
}

@keyframes float-rocket {
    0%, 100% { transform: rotate(45deg) translate(0, 0); }
    /* Flutuação diagonal (cima/direita na perspectiva rotacionada) */
    50% { transform: rotate(45deg) translate(10px, -20px); }
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    top: 20%;
    z-index: -1;
}

.hero-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    /* Grid de quadrados com bordas arredondadas imitando o screenshot */
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='10' y='10' width='60' height='60' rx='12' fill='rgba(255,255,255,0.015)'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    background-position: center top;
    opacity: 0;
    animation: fadeInGrid 1.5s ease-out 0.2s forwards;
    /* Faz o fundo sumir suavemente nas bordas para misturar com o resto do site */
    mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
}

@keyframes fadeInGrid {
    from { opacity: 0; transform: scale(1.05); }
    to { opacity: 1; transform: scale(1); }
}

/* =========================================
   Esteira de Logos (Marquee)
   ========================================= */
.logos-section {
    padding: 4rem 0;
    background: transparent; /* Combina com o fundo escuro atual */
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
    position: relative;
    margin-bottom: 4rem; /* Espaço antes da próxima seção */
    width: 100%;
    max-width: 100%;
}

.logos-title {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 3rem;
}

.marquee-wrapper {
    display: flex;
    overflow: hidden;
    user-select: none;
    gap: 4rem; /* Espaço entre os dois blocos */
    width: 100%;
    max-width: 100%;
    /* Efeito de fade nas laterais para sumirem suavemente */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 4rem; /* Espaço entre cada logo */
    align-items: center;
    flex-shrink: 0;
    animation: scroll-marquee 80s linear infinite;
}

.marquee-track img {
    height: 70px; /* Altura aumentada */
    transition: all 0.3s ease;
}

.marquee-track img:hover {
    transform: scale(1.05);
}

.logo-item {
    font-size: 1.5rem;
    font-weight: 600;
    color: #444;
    white-space: nowrap;
    transition: color 0.3s;
}

.logo-item:hover {
    color: var(--text-main);
}

@keyframes scroll-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-100% - 4rem)); } /* Desloca o bloco inteiro + 1 gap para dar o loop exato */
}

.subtitle-badge {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    padding: 0.6rem 1.2rem;
    backdrop-filter: blur(5px);
}

.subtitle-badge::before, .subtitle-badge::after {
    display: none;
}

/* =========================================
   Timeline / Processo (Layout de Linha)
   ========================================= */
.timeline-section {
    padding: 6rem 0;
    position: relative;
}

.timeline-header {
    text-align: center;
    margin-bottom: 4rem;
}

/* O Botão/Logo 7 Flutuante */
.timeline-logo-top {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto;
    border-radius: 50%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 3px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    transform: translateY(-50%); /* Para ficar metade fora, em cima da linha */
}

.timeline-logo-top::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(transparent, transparent, transparent, var(--accent-color));
    animation: rotate-neon 3s linear infinite;
}

.timeline-logo-inner {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #222, #050505);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.logo-7 {
    font-family: var(--font-sans);
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 0 15px rgba(255,255,255,0.6);
}

/* A Linha Central */
.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 45px; /* Começa logo após o logo */
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--accent-color), transparent);
    transform: translateX(-50%);
    opacity: 0.4;
}

/* O ponto laranja animado que desce (simulação com CSS) */
.timeline-dot-tracker {
    position: sticky;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background-color: var(--accent-color);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 15px var(--accent-color);
    z-index: 2;
}

/* Itens da Timeline */
.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8rem;
    position: relative;
}

/* Removido o nth-child(even) para controlarmos manualmente no HTML a posição esquerda/direita */

.timeline-content {
    width: 45%;
}

.timeline-empty {
    width: 45%;
}

/* Ponto fixo em cada item */
.item-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: #333;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.timeline-item.active .item-dot {
    background-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Cards Escuros com Bordas Sutis */
.glass-card {
    background: linear-gradient(145deg, #111111, #0a0a0a);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 3rem;
    transition: transform var(--transition-smooth), border-color var(--transition-smooth);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

@keyframes card-border-pulse {
    0%, 100% {
        border-color: rgba(255, 255, 255, 0.05);
        box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    }
    50% {
        border-color: rgba(229, 125, 66, 0.4);
        box-shadow: 0 20px 40px rgba(0,0,0,0.5), inset 0 0 15px rgba(229, 125, 66, 0.05), 0 0 20px rgba(229, 125, 66, 0.15);
    }
}

.timeline-item .glass-card {
    animation: card-border-pulse 4s infinite alternate;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.1);
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--accent-color);
}

.glass-card h3 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.glass-card p {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================
   Animações de Scroll
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Atraso para múltiplos elementos na mesma tela */
.reveal.d-1 { transition-delay: 0.1s; }
.reveal.d-2 { transition-delay: 0.2s; }
.reveal.d-3 { transition-delay: 0.3s; }

/* =========================================
   Contact Section (Card e Mapa)
   ========================================= */
.contact-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    gap: 4rem;
}

.contact-text {
    flex: 1;
    text-align: left;
}

.contact-card {
    background: linear-gradient(180deg, #151516, #080808);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    flex-shrink: 0;
}

.contact-map {
    margin-bottom: 2rem;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-block h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.info-block p {
    color: #999;
    font-size: 0.95rem;
}

.contact-btn {
    width: 100%;
    margin-top: 1rem;
    background: #000;
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s, border-color 0.3s;
}

@keyframes btn-blink {
    0%, 100% {
        border-color: rgba(255, 255, 255, 0.1);
        background: #000;
        box-shadow: 0 0 0 0 rgba(229, 125, 66, 0);
    }
    50% {
        border-color: var(--accent-color);
        background: rgba(229, 125, 66, 0.1);
        box-shadow: 0 0 15px rgba(229, 125, 66, 0.4);
    }
}

.btn-pulse {
    animation: btn-blink 2s infinite ease-in-out;
}

.contact-btn:hover {
    background: #111;
    border-color: rgba(255,255,255,0.25);
    animation: none; /* Pausa o piscar ao passar o mouse */
}

/* =========================================
   Portfolio Cards
   ========================================= */
#portfolio {
    padding: 6rem 2rem;
    background: linear-gradient(to bottom, transparent, #0a0a0a);
}

.portfolio-grid {
    display: grid;
    gap: 2rem;
}

.portfolio-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    padding: 2rem;
    transition: transform var(--transition-smooth), border-color var(--transition-smooth);
}

.portfolio-card-content {
    text-align: left;
}

.portfolio-card-content h3 {
    color: white;
    margin-bottom: 0.5rem;
    font-family: var(--font-sans);
    font-weight: 500;
}

.portfolio-card-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: left;
}

.portfolio-card-arrow {
    color: var(--accent-color);
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-left: 1.5rem;
    transition: transform 0.3s ease;
}

.portfolio-card:hover .portfolio-card-arrow {
    transform: translateX(5px);
}

/* =========================================
   Responsividade
   ========================================= */
@media (max-width: 900px) {
    .split-hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 120px;
        gap: 0;
    }
    .text-left {
        text-align: center;
        align-items: center !important;
    }
    .hero-desc {
        margin: 0 auto;
    }
    .hero-visuals {
        height: 200px;
        margin-top: -30px;
        transform: scale(0.85);
    }
    .rocket-container {
        left: 0;
        width: 250px;
        margin: 0 auto;
        position: relative;
    }
    
    .header {
        padding: 1rem 1.5rem; /* Ajustado levemente para aproximar da direita e manter uma margem elegante no mobile */
    }
    
    .header-container {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .header .btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .title-lg {
        font-size: clamp(1.8rem, 8vw, 2.4rem) !important; /* Reduzido para evitar transbordamentos de palavras longas */
    }

    #portfolio {
        padding: 4rem 1rem !important; /* Reduzido padding do container para dar espaço total ao conteúdo no celular */
    }

    .portfolio-grid {
        gap: 1.5rem;
    }

    .portfolio-card {
        padding: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .portfolio-card-arrow {
        align-self: flex-end;
        margin-left: 0;
    }
    
    .timeline-line {
        left: 20px;
    }
    .timeline-dot-tracker {
        left: 20px;
    }
    .item-dot {
        left: 20px;
    }
    .timeline-item {
        flex-direction: column !important;
        align-items: flex-start;
        padding-left: 50px;
    }
    .timeline-content, .timeline-empty {
        width: 100%;
    }
    .timeline-empty {
        display: none;
    }
    .nav-pill {
        display: none;
    }
    
    .contact-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }
    .contact-text {
        text-align: center;
    }
    .contact-text > div {
        border-left: none;
        border-bottom: 3px solid var(--accent-color);
        padding-left: 0;
        padding-bottom: 1rem;
    }
}
