@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Montserrat:wght@400;500;600;700;800&display=swap');

/* =========================================
   DESIGN SYSTEM & VARIABLES (LUXURY DARK - VERDE PROFUNDO & AZUL IMPERIAL)
   ========================================= */
:root {
  /* Cores - Tema Escuro de Luxo (Sem Branco residual) */
  --c-bg: #040907;             /* Fundo Verde Floresta Ultra-Escuro */
  --c-bg-gradient: linear-gradient(135deg, #040907 0%, #02060c 100%); /* Transição de profundidade */
  --c-primary: #FFFFFF;        /* Branco Puro para títulos de destaque */
  --c-primary-light: #E4ECE7;  /* Soft Off-White para subtítulos e contraste */
  --c-accent: #0D5F3A;         /* Verde Esmeralda Nobre */
  --c-accent-light: #10B981;   /* Verde Menta Vibrante Premium para destaque */
  --c-bg-card: rgba(8, 18, 13, 0.65); /* Vidro fumê escuro sofisticado */
  --c-border: rgba(24, 206, 124, 0.15); /* Borda fina esmeralda translúcida */
  --c-text: #C3D3C9;           /* Cinza Menta Muted para corpo do texto - Ótima legibilidade */
  --c-text-muted: #8EA497;     /* Texto secundário/mutado */
  --c-white: #07100B;          /* Substituto para contêineres e cartões internos */
  
  /* Tipografia Premium de Alta Legibilidade */
  --font-sans: 'Inter', sans-serif;         /* Corpo do texto */
  --font-serif: 'Montserrat', sans-serif;   /* Títulos e botões */

  /* Transições Otimizadas (Mais leves para Alto Frame-Rate) */
  --transition-transform: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fade: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-color: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  --transition-smooth: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Sombras Tridimensionais com base escura */
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.7);
  --shadow-accent: 0 8px 24px rgba(16, 185, 129, 0.2);
  --shadow-inset: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

/* =========================================
   RESET & BASE
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--c-bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(24, 206, 124, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(3, 10, 20, 0.95) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--c-text);
  line-height: 1.65;
  font-size: 16.5px;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--c-primary);
  font-weight: 700;
  letter-spacing: -0.01em;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* =========================================
   TYPOGRAPHY
   ========================================= */
.text-xs { font-size: 0.78rem; }
.text-sm { font-size: 0.9rem; }
.text-base { font-size: 1.05rem; }
.text-lg { font-size: 1.18rem; }
.text-xl { font-size: 1.3rem; }
.text-2xl { font-size: 1.6rem; }
.text-3xl { font-size: clamp(1.85rem, 4.5vw, 2.4rem); }
.text-4xl { font-size: clamp(2.2rem, 5.5vw, 3.2rem); }
.text-5xl { font-size: clamp(2.6rem, 6.5vw, 4.6rem); }
.text-6xl { font-size: clamp(3.2rem, 7.5vw, 5.8rem); }

.tracking-widest { letter-spacing: 0.08em; }
.tracking-ultra { letter-spacing: 0.16em; }
.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }
.font-light { font-weight: 400; } /* Substituído peso 300 por 400 para melhor legibilidade */
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }

.text-accent { color: var(--c-accent-light); }
.text-primary { color: var(--c-primary); }
.text-white { color: #FFFFFF; }
.text-body { color: var(--c-text); }
.text-muted { color: var(--c-text-muted); }

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

/* =========================================
   LAYOUT UTILITIES (FLUID SPACING & GRIDS)
   ========================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
}

.flex { display: flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.gap-16 { gap: 4rem; }

/* Espaçamentos Fluidos Dinâmicos baseados no viewport */
.section-padding {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.mb-12 { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.mb-16 { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.mt-auto { margin-top: auto; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.relative { position: relative; }
.absolute { position: absolute; }
.overflow-hidden { overflow: hidden; }

/* Grid columns responsivos super rápidos */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* =========================================
   COMPONENTS & EFFECTS
   ========================================= */

/* Glassmorphism Refinado - Dark Theme & High Performance */
.glass-header {
  background: rgba(4, 9, 7, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(24, 206, 124, 0.12);
  transition: padding 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-header.scrolled {
  padding-top: 8px;
  padding-bottom: 8px;
  background: rgba(4, 9, 7, 0.95);
  box-shadow: var(--shadow-sm);
  border-bottom-color: rgba(24, 206, 124, 0.2);
}

@media (max-width: 767px) {
  .glass-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #040907;
  }
}

.glass-card {
  background: var(--c-bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm), var(--shadow-inset);
  border-radius: 0.75rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c-accent-light);
  background: rgba(8, 18, 13, 0.85);
}

@media (max-width: 767px) {
  .glass-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(8, 18, 13, 0.9);
    padding: 1.25rem;
  }
  .glass-card:hover {
    transform: none;
  }
}

/* Botões Modernizados (Bordas Sofisticadas) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.7rem;
  font-family: var(--font-serif);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-color), var(--transition-transform);
}

.btn-primary {
  background-color: var(--c-accent-light);
  color: #FFFFFF;
  border: 1px solid var(--c-accent-light);
}

.btn-primary:hover {
  background-color: #0d9488;
  border-color: #0d9488;
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

.btn-outline {
  background: transparent;
  color: var(--c-accent-light);
  border: 2px solid var(--c-accent-light);
}

.btn-outline:hover {
  background-color: var(--c-accent-light);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

/* Link Arrow Hover */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-accent-light);
  transition: var(--transition-color), var(--transition-transform);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}
.link-arrow:hover {
  gap: 0.8rem;
  color: #FFFFFF;
  border-color: var(--c-accent-light);
}

/* Image Hover Zoom Otimizada */
.image-zoom-container {
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-lg);
  position: relative;
  will-change: transform;
}

.image-zoom-container img {
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-zoom-container:hover img {
  transform: scale(1.04);
}

/* Liquid Blob - Otimizado para Mobile e Alto Frame-Rate */
.liquid-blob {
  position: absolute;
  background: radial-gradient(circle, rgba(24, 206, 124, 0.06) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
  width: 450px;
  height: 450px;
}

@media (min-width: 1024px) {
  .liquid-blob {
    background: linear-gradient(135deg, rgba(24, 206, 124, 0.1) 0%, rgba(3, 10, 20, 0.05) 100%);
    animation: morph 12s ease-in-out infinite;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    filter: blur(25px);
    will-change: border-radius;
  }
}

@keyframes morph {
  0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  50% { border-radius: 35% 60% 65% 40% / 45% 60% 35% 55%; }
  100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* Native CSS Scroll-Snap Slider (Alta Performance 60 FPS) */
.card-slider-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1.05;
  border-bottom: 1px solid var(--c-border);
  overflow: hidden;
}

.card-slider {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.card-slider::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.card-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  position: relative;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Slider Controls HUD overlays */
.slider-hud {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  background: rgba(4, 9, 7, 0.65);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 1px solid rgba(24, 206, 124, 0.15);
  pointer-events: none;
  z-index: 10;
}

.slider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.slider-dot.active {
  background: var(--c-accent-light);
  transform: scale(1.3);
}

.slider-hint {
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  background: rgba(4, 9, 7, 0.7);
  color: var(--c-accent-light);
  border: 1px solid rgba(24, 206, 124, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  pointer-events: none;
  z-index: 10;
}

/* Scroll Reveal Animations (Aceleradas de 1s para 0.45s) */
.reveal {
  opacity: 0;
  transform: translateY(20px); /* Menos deslocamento para rolagem mais limpa */
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
.delay-100 { transition-delay: 0.08s; }
.delay-200 { transition-delay: 0.15s; }
.delay-300 { transition-delay: 0.22s; }

/* =========================================
   SPA PAGE VIEW TRANSITIONS
   ========================================= */
.page-view {
  display: none;
  opacity: 0;
}
.page-view.active {
  display: block;
  animation: fadeUpPage 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUpPage {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   NAVIGATION & HEADER
   ========================================= */
.header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  padding: 1rem 0; /* Espaçamento ligeiramente reduzido para elegância */
}

.nav-links {
  display: none;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .nav-links { display: flex; }
}

.nav-link {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-text-muted);
  position: relative;
  transition: var(--transition-color);
}

.nav-link:hover, .nav-link.active {
  color: #FFFFFF;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--c-accent-light);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: block;
  z-index: 60;
  color: var(--c-accent-light);
}
@media (min-width: 1024px) {
  .mobile-menu-btn { display: none; }
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #040907;
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 7rem 2rem 2rem;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.open {
  transform: translateY(0);
}

.mobile-nav-link {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: #FFFFFF;
  padding: 1rem 0;
  border-bottom: 1px solid var(--c-border);
  transition: var(--transition-color);
}

.mobile-nav-link.active {
  color: var(--c-accent-light);
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--c-bg); }
::-webkit-scrollbar-thumb { background: #1F362A; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-accent-light); }

/* Alternância de Fundos Estilizada (Sem Brancos Gritantes - Totalmente Escuros) */
.bg-primary { background-color: #06110c; }
.bg-white { 
  background-color: #07120d;
  background-image: linear-gradient(180deg, #050c08 0%, #091711 100%);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}
.bg-bg { background-color: var(--c-bg); }
.border-b { border-bottom: 1px solid var(--c-border); }
.border-t { border-top: 1px solid var(--c-border); }

/* Gradientes Escuros Profundos */
.bg-deep-gradient {
  background: linear-gradient(135deg, #02060c 0%, #040907 100%);
  color: #EDF1EE;
  border-top: 1px solid rgba(24, 206, 124, 0.15);
  border-bottom: 1px solid rgba(24, 206, 124, 0.15);
  box-shadow: inset 0 10px 25px rgba(0,0,0,0.5);
}

.decor-line {
  height: 3px;
  width: 40px;
  background-color: var(--c-accent-light);
  border-radius: 2px;
  margin-bottom: 1rem;
}

.pill {
  padding: 0.5rem 1.4rem;
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: 4px;
  font-family: var(--font-serif);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--c-accent-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: var(--transition-color), var(--transition-transform);
  box-shadow: var(--shadow-sm);
}
.pill:hover {
  border-color: var(--c-accent-light);
  color: #FFFFFF;
  background-color: var(--c-accent-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

/* Cartões do Portfólio */
.portfolio-card {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
  border: 1px solid var(--c-border);
}
.portfolio-card:hover {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
}
