/* Estilos base */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
    font-size: 93.75%; /* 15px base size (down from 16px) */
}

body {
    font-family: 'Sora', sans-serif;
    background-color: #ffffff;
    color: #454d60;
}

/* Background de grid (Hero) */
.grid-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image: linear-gradient(to right, rgba(0, 102, 255, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 102, 255, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: pan-grid 40s linear infinite;
}

/* Glow do Conteúdo (Hero) */
.content-glow {
    background-image: radial-gradient(ellipse 50% 50% at 50% 0%, rgba(0, 102, 255, 0.15), rgba(0, 9, 24, 0));
    background-repeat: no-repeat;
    background-size: 100% 1000px;
}

/* Gradiente de Texto (Hero) */
.text-gradient-blue {
    background: linear-gradient(90deg, #0066ff 0%, #00aaff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

/* Animação de Delay */
.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

.delay-400 {
    animation-delay: 400ms;
}

.delay-500 {
    animation-delay: 500ms;
}

.delay-600 {
    animation-delay: 600ms;
}

.delay-700 {
    animation-delay: 700ms;
}

.delay-800 {
    animation-delay: 800ms;
}

.delay-900 {
    animation-delay: 900ms;
}

.delay-1000 {
    animation-delay: 1000ms;
}

/* Estilos do Menu Mobile */
.hamburger line {
    transition: all 0.3s ease-in-out;
}

.hamburger.open .line1 {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open .line2 {
    opacity: 0;
}

.hamburger.open .line3 {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Estilo para link ativo no menu */
#menu-mobile a.active {
    color: #0066ff;
    /* brand-blue */
}

/* Animação do Hero */
@keyframes heroWordReveal {
    from {
        opacity: 0;
        transform: translateY(100%);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-line {
    display: block;
    overflow: hidden;
    /* Essencial para o efeito de "subir" */
    padding-bottom: 0.1em;
}

.hero-word {
    display: inline-block;
    /* Permite a transformação */
    opacity: 0;
    /* Começa invisível */
    transform: translateY(100%);
    /* Começa 100% abaixo */
    animation: heroWordReveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    margin-right: 0.2em;
    /* Espaço leve entre as palavras */
}

.hero-word:last-child {
    margin-right: 0;
}

/* Scrollbar customizada para o slider (opcional, mas melhora a aparência) */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* FAQ */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.faq-chevron {
    transition: transform 0.3s ease-in-out;
}

.faq-item.open .faq-chevron {
    transform: rotate(180deg);
}

.faq-item.open .faq-button {
    color: #0066ff;
}

/* ScrollSpy Active Link */
#main-header .header-link.active {
    color: #0066ff !important;
    font-weight: 600;
}

/* MELHORIA: Botão Voltar ao Topo */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 40;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Novas Animações */
@keyframes textFocusIn {
    0% {
        filter: blur(12px);
        opacity: 0;
    }

    100% {
        filter: blur(0px);
        opacity: 1;
    }
}

@keyframes slideInBottom {
    0% {
        transform: translateY(50px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-text-focus-in {
    animation: textFocusIn 1s cubic-bezier(0.550, 0.085, 0.680, 0.530) both;
}

.animate-slide-in-bottom {
    animation: slideInBottom 0.8s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Utilitário para iniciar invisível (para o observer) */
.opacity-0-start {
    opacity: 0;
}

/* 
   Pausa as animações quando o elemento estiver invisível (antes do scroll).
   Isso garante que a animação só comece quando o JS remover a classe de opacidade.
*/
.opacity-0-start,
.opacity-0.animate-fade-in-up,
.opacity-0.animate-fade-in-left {
    animation-play-state: paused;
}