/* ─── RESET & VARIÁVEIS NATIVAS ─── */
:root {
  --bg-dark: #030303;
  --card-bg: rgba(12, 12, 14, 0.6);
  --card-border: rgba(39, 39, 42, 0.4);
  --text-main: #f4f4f5;
  --text-muted: #8a8a93;
  --text-dark: #4b4b52;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

/* ─── BACKGROUND AMBIENTAL (GLOW BACKGROUND) ─── */
.space-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.15;
  mix-blend-mode: screen;
}

.orb-1 {
  top: -10%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #ffffff 0%, rgba(255,255,255,0) 70%);
}

.orb-2 {
  bottom: 10%;
  left: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #3f3f46 0%, rgba(0,0,0,0) 70%);
}

/* ─── UTILITIES & CONTAINERS ─── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-center { text-align: center; }

.mono-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-dark);
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ─── HEADER ─── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: rgba(3, 3, 3, 0.5);
  border-bottom: 1px solid rgba(24, 24, 27, 0.5);
  transition: border-color 0.3s ease;
}

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

.logo {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--text-main);
  text-decoration: none;
}

.logo-dot { color: var(--text-dark); }

.nav { display: flex; gap: 40px; }

.nav-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 500;
}

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

/* ─── BUTTONS ─── */
.btn {
  display: inline-block;
  background-color: var(--text-main);
  color: var(--bg-dark);
  text-decoration: none;
  font-weight: 600;
  border-radius: 100px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-sm { font-size: 11px; padding: 12px 24px; }
.btn-lg { font-size: 12px; padding: 20px 40px; border: 1px solid var(--text-main); }

.btn:hover {
  background-color: #ffffff;
  transform: translateY(-2px);
}

/* ─── HERO SECTION ─── */
.hero {
  padding-top: 240px;
  padding-bottom: 140px;
}

.tagline {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(36px, 7.5vw, 76px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.95;
  max-width: 950px;
  margin-bottom: 64px;
}

.hero-footer {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.hero-description {
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 520px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 15px;
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
}

.hero-cta .arrow { transition: transform 0.3s ease; }
.hero-cta:hover .arrow { transform: translateX(6px); }

@media (min-width: 768px) {
  .hero-footer { flex-direction: row; justify-content: space-between; align-items: flex-end; }
}

/* ─── BENTO GRID PORTFOLIO ─── */
.portfolio { padding: 120px 0; }

.section-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 56px;
}

.section-title { font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -0.03em; }
.section-subtitle { font-size: 14px; color: var(--text-muted); max-width: 340px; line-height: 1.5; }

@media (min-width: 768px) { .section-header { flex-direction: row; align-items: flex-end; } }

/* Configuração do Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Estrutura Base do Card Bento */
.bento-card {
  position: relative;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  overflow: hidden;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.3s ease, background-color 0.3s ease;
  backdrop-filter: blur(8px);
}

/* Efeito Glow Inteligente via Mouse */
.card-glow-element {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(
    250px circle at var(--mouse-x, 0px) var(--mouse-y, 0px),
    rgba(255, 255, 255, 0.06),
    transparent 80%
  );
  z-index: 1;
}

.bento-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background-color: rgba(16, 16, 18, 0.8);
}

.card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.flex-center {
  justify-content: center;
  align-items: center;
}

/* Conteúdo interno dos cards */
.item-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dark);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.item-title { font-size: 22px; font-weight: 600; margin-bottom: 8px; tracking: -0.01em;}
.card-desc { font-size: 14px; color: var(--text-muted); line-height: 1.5; max-width: 90%; }

.metric {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #fff 0%, #3f3f46 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

/* Elementos visuais simulando janelas de sistemas */
.card-visual {
  width: 100%;
  height: 160px;
  margin-top: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background-size: cover;
}
.visual-saas { background-color: #0d0d11; background-image: linear-gradient(45deg, #18181b, #09090b); }
.visual-fin { background-color: #121214; height: 220px; }

.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 24px; }
.tech-tags span {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 6px 12px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  color: var(--text-muted);
}

/* Layout Responsivo do Bento Grid (Desktop) */
@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 240px;
  }
  .card-large { grid-column: span 2; grid-row: span 2; }
  .card-tall { grid-row: span 2; }
  .card-medium { grid-column: span 2; }
}

/* ─── SERVICES ─── */
.services {
  padding: 120px 0;
  border-top: 1px solid rgba(24, 24, 27, 0.5);
}

.services-container { display: grid; grid-template-columns: 1fr; gap: 64px; }
.services-list { display: flex; flex-direction: column; gap: 56px; }
.service-item { border-bottom: 1px solid rgba(24, 24, 27, 0.5); padding-bottom: 40px; }
.service-item:last-child { border-bottom: none; }
.service-num { font-family: var(--font-mono); font-size: 10px; color: var(--text-dark); display: block; margin-bottom: 12px; }
.service-title { font-size: 22px; font-weight: 600; margin-bottom: 12px; }
.service-text { color: var(--text-muted); line-height: 1.6; font-size: 15px; max-width: 90%; }

@media (min-width: 768px) {
  .services-container { grid-template-columns: repeat(12, 1fr); }
  .services-sidebar { grid-column: span 4; }
  .services-list { grid-column: span 8; }
  .text-sticky { position: sticky; top: 140px; }
}

/* ─── CTA SECTION ─── */
.cta { padding: 160px 0; }
.cta-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  max-width: 750px;
  margin: 0 auto 48px auto;
}

/* ─── FOOTER ─── */
.footer { border-top: 1px solid rgba(24, 24, 27, 0.5); padding: 40px 0; }
.footer-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dark);
}
@media (min-width: 768px) { .footer-container { flex-direction: row; } }

/* ─── ENGINE DE ANIMAÇÕES INTERNAS ─── */
/* Entrada do Hero (Fade e subida sutil) */
.animate-fade {
  opacity: 0;
  transform: translateY(20px);
  animation: enterAnim 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Scroll Reveal Util */
.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (max-width: 767px) { .nav { display: none; } }


/* ─── GRID DE FUNDO PREMIUM ─── */
.bg-grid-pattern {
  /* Cria as linhas verticais e horizontais finas */
  background-size: 5px 5px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.01) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
  
  /* Máscara para o grid sumir suavemente nas bordas (efeito fade) */
  mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 70%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 70%, transparent 100%);
}

/* ─── EXTRA HERO EFFECTS & PILLS (ATUALIZADO PARA DOURADO) ─── */

/* Glow por trás do texto principal */
.text-glow-gold {
  text-shadow: 0 0 50px rgba(245, 158, 11, 0.2), 0 0 100px rgba(217, 119, 6, 0.08);
}

/* Animações mantendo a inclinação fixa dos badges */
@keyframes float-badge-left {
  0%, 100% { transform: translateY(0px) rotate(-3deg); }
  50% { transform: translateY(-12px) rotate(-3deg); }
}

@keyframes float-badge-right {
  0%, 100% { transform: translateY(0px) rotate(3deg); }
  50% { transform: translateY(-16px) rotate(3deg); }
}

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

.animate-float-right {
  animation: float-badge-right 5s ease-in-out infinite;
}

/* Efeitos de fundo adicionais para o hero (atualizados para tons dourados) */
.backdrop {
    position: fixed;
    z-index: 1;
    pointer-events: none;
    inset: 0px;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    inset: 0px;
    /* Substituído para criar uma atmosfera dourada suave que decai nas bordas */
    background: radial-gradient(ellipse 90% 60% at 50% -10%, rgba(217, 119, 6, 0.22) 0%, rgba(245, 158, 11, 0.05) 35%, transparent 60%), 
                radial-gradient(ellipse 60% 40% at 50% 0%, rgba(251, 191, 36, 0.35) 0%, transparent 50%), 
                var(--bg);
}

.bg-glow {
    position: absolute;
    width: 800px;
    height: 600px;
    top: -300px;
    left: 50%;
    transform: translateX(-50%);
    filter: blur(80px);
    /* Um brilho central concentrado simulando uma fonte de luz âmbar pura */
    background: radial-gradient(rgba(245, 158, 11, 0.28) 0%, transparent 60%);
    animation: 12s ease-in-out 0s infinite normal none running floatGlow;
}

.grain {
    position: absolute;
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.04) 1px, transparent 0px);
    background-size: 3px 3px;
    opacity: 0.5;
    mix-blend-mode: screen;
    inset: -50%;
}