
/* Tema escuro base */
html {
    background-color: #0a0a0a;
    scroll-behavior: smooth;
}

body {
    background-color: #0a0a0a;
    color: #fafafa;
}

main {
    background-color: #0a0a0a;
}

/* Animações básicas usadas nas decorações */
@keyframes float-slow {
    0%,
    100% {
        transform: translateY(0px) translateX(0px);
    }
    50% {
        transform: translateY(-20px) translateX(10px);
    }
}

@keyframes float-delayed {
    0%,
    100% {
        transform: translateY(0px) translateX(0px);
    }
    50% {
        transform: translateY(15px) translateX(-10px);
    }
}

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

.animate-float-delayed {
    animation: float-delayed 10s ease-in-out infinite;
    animation-delay: 2s;
}

/* About us section: pulse + drift combined (different from hero float) */
@keyframes about-float {
    0%,
    100% {
        opacity: 0.12;
        transform: translate(0, 0) scale(1);
    }
    33% {
        opacity: 0.2;
        transform: translate(12px, -15px) scale(1.05);
    }
    66% {
        opacity: 0.15;
        transform: translate(-8px, 10px) scale(0.97);
    }
}

@keyframes about-float-slow {
    0%,
    100% {
        opacity: 0.1;
        transform: translate(0, 0) scale(1);
    }
    50% {
        opacity: 0.18;
        transform: translate(-10px, -8px) scale(1.03);
    }
}

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

.animate-about-float-slow {
    animation: about-float-slow 14s ease-in-out infinite;
    animation-delay: 2s;
}

/* Fade-in das seções – no responsivo conteúdo já visível (evita demora) */
@media (max-width: 639px) {
    .section-fade-in {
        opacity: 1;
        transform: translateY(0);
        content-visibility: auto;
    }
}

@media (min-width: 640px) {
    .section-fade-in {
        opacity: 0;
        transform: translateY(2rem);
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }

    .section-fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tipografia / fontes */
* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'kern' 1;
    font-kerning: normal;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 600;
}

.text-xs.uppercase,
p.text-xs.uppercase {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

p,
span,
li,
a,
button,
input,
textarea,
select,
label {
    font-size: clamp(0.875rem, 1vw, 1rem);
    line-height: 1.6;
    letter-spacing: -0.01em;
}

.text-sm,
small {
    font-size: 0.875rem;
    line-height: 1.5;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.7;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.6;
}

.text-neutral-50,
.text-neutral-100,
.text-neutral-200 {
    font-weight: 500;
}

button,
a[class*='bg-primary'],
button[class*='bg-primary'],
a[class*='bg-blue'],
button[class*='bg-blue'] {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Scrollbar dourada apenas no body */
html {
    scrollbar-width: thin;
    scrollbar-color: #eab308 #171717;
}

html::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

html::-webkit-scrollbar-track {
    background: #171717;
}

html::-webkit-scrollbar-thumb {
    background: #eab308;
    border-radius: 5px;
}

html::-webkit-scrollbar-thumb:hover {
    background: #facc15;
}

body {
    scrollbar-width: thin;
    scrollbar-color: #eab308 #171717;
}

body::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

body::-webkit-scrollbar-track {
    background: #171717;
}

body::-webkit-scrollbar-thumb {
    background: #eab308;
    border-radius: 5px;
}

body::-webkit-scrollbar-thumb:hover {
    background: #facc15;
}

/* Esconder scrollbars de containers internos */
*:not(html):not(body) {
    scrollbar-width: none;
}

*:not(html):not(body)::-webkit-scrollbar {
    width: 0;
    height: 0;
    background: transparent;
}

/* Melhorar contraste em seções escuras */
#about,
#services {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#about h2,
#about h3,
#services h2,
#services h3 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

#about p,
#services p,
#about li,
#services li {
    font-weight: 500;
}

/* Header fixo – mesmo fundo da seção Statistics */
.header-gradient {
    background: linear-gradient(to bottom right, #171717, #262626, #171717);
}

.header-transition {
    transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

#main-header.header-scrolled {
    background: linear-gradient(to bottom right, #171717, #262626, #171717);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

#main-header.header-scrolled .header-bg-deco {
    opacity: 1;
}

.nav-link.nav-link-active {
    color: #eab308;
}

.nav-link.nav-link-active::after {
    width: 100%;
}

.mobile-nav .nav-link.nav-link-active {
    background: rgba(59, 130, 246, 0.15);
}

/* Utilitários das animações de cards/gradientes (vindos do app.css) */
.animate-hero-title {
    opacity: 0;
    transform: translateY(12px);
    animation: hero-fade-up-title 700ms ease-out forwards;
    animation-delay: 120ms;
}

.animate-hero-text {
    opacity: 0;
    transform: translateY(10px);
    animation: hero-fade-up-text 700ms ease-out forwards;
    animation-delay: 260ms;
}

.tech-card-animate {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 500ms ease-out, transform 500ms ease-out;
    transition-delay: var(--tech-delay, 0ms);
}

.tech-card-animate-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-card {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 500ms ease-out, transform 500ms ease-out;
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal-card-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 767px) {
    .tech-card-animate,
    .reveal-card {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-gradient-layer {
    animation: hero-gradient-drift 18s ease-in-out infinite alternate;
}

@keyframes hero-fade-up-title {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hero-fade-up-text {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hero-gradient-drift {
    0% {
        transform: translateY(0);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-10px);
        opacity: 0.9;
    }
    100% {
        transform: translateY(8px);
        opacity: 0.7;
    }
}

/* Matrix rain effect */
@keyframes matrix-fall {
    0% { transform: translateY(-50%); }
    100% { transform: translateY(0); }
}
.matrix-rain {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.matrix-column {
    position: absolute;
    top: 0;
    width: 0.85rem;
    height: 250vh;
    font-family: ui-monospace, monospace;
    font-size: 0.65rem;
    line-height: 1.4;
    color: rgba(234, 179, 8, 0.55);
    text-shadow: 0 0 6px rgba(234, 179, 8, 0.25);
    animation: matrix-fall 14s linear infinite;
    overflow: hidden;
}
@media (min-width: 640px) {
    .matrix-column { font-size: 0.7rem; }
}
/* On small screens, less columns and lighter animation */
@media (max-width: 479px) {
    .matrix-column:nth-child(4n+2),
    .matrix-column:nth-child(4n+3),
    .matrix-column:nth-child(4n+4) { display: none; }
}
@media (min-width: 480px) and (max-width: 639px) {
    .matrix-column:nth-child(even) { display: none; }
}
.matrix-column span {
    display: block;
    white-space: pre;
    letter-spacing: 0.02em;
}
