/* =========================================================================
   DEEP DEV - ASSETS CORE CSS
   Motor unificado de Design Tokens + Layout Mobile-First
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Lato:wght@300;400;700;900&display=swap');

:root {
  /* Cores - Deep Dev Vibe */
  --color-base: #0B1120;
  --color-surface: #1E293B;
  --color-surface-hover: #334155;
  --color-primary: #38BDF8;
  --color-primary-hover: #0EA5E9;
  --color-primary-glow: rgba(56, 189, 248, 0.4);
  --color-text: #F8FAFC;
  --color-text-muted: #94A3B8;
  --color-border: #334155;

  /* Fontes */
  --font-main: 'Lato', sans-serif;
  --font-mono: 'Fira Code', monospace;

  /* Tipografia Fluida (Clamp) */
  --text-xs: clamp(0.75rem, 1vw, 0.875rem);
  --text-sm: clamp(0.875rem, 1.2vw, 1rem);
  --text-base: clamp(1rem, 1.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 2vw, 1.25rem);
  --text-xl: clamp(1.25rem, 2.5vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 3vw, 2rem);
  --text-3xl: clamp(2rem, 5vw, 2.5rem);
  --text-4xl: clamp(2.5rem, 6vw, 3.5rem);
  
  /* Espaçamentos e Layout */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; 
  --space-4: 1rem; --space-6: 1.5rem; --space-8: 2rem; 
  --space-12: 3rem; --space-16: 4rem;
  
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-full: 9999px;
  --min-touch: 48px;

  /* Transições suaves */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* =========================================================================
   2. RESETS E BASE
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background-color: var(--color-base);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { color: var(--color-text); line-height: 1.2; font-weight: 700; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-primary-hover); }

/* =========================================================================
   3. TIPOGRAFIA UTILITÁRIA
   ========================================================================= */
.text-4xl { font-size: var(--text-4xl); font-weight: 900; letter-spacing: -1px; }
.text-3xl { font-size: var(--text-3xl); font-weight: 700; }
.text-2xl { font-size: var(--text-2xl); font-weight: 700; }
.text-xl  { font-size: var(--text-xl); font-weight: 600; }
.text-lg  { font-size: var(--text-lg); font-weight: 300; }
.text-base{ font-size: var(--text-base); font-weight: 400; }
.text-sm  { font-size: var(--text-sm); font-weight: 400; }
.text-xs  { font-size: var(--text-xs); font-weight: 400; }
.font-mono { font-family: var(--font-mono); }
.text-primary { color: var(--color-primary); }
.text-muted { color: var(--color-text-muted); }

.tech-label {
  display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3); background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-full); color: var(--color-primary);
}

/* =========================================================================
   4. LAYOUT E GRIDS (Mobile First)
   ========================================================================= */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-4); }
.section { padding: var(--space-12) 0; }
.flex { display: flex; } .flex-col { flex-direction: column; } .items-center { align-items: center; }
.justify-center { justify-content: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); } .gap-4 { gap: var(--space-4); } .gap-6 { gap: var(--space-6); } .gap-8 { gap: var(--space-8); }

.grid { display: grid; gap: var(--space-6); grid-template-columns: 1fr; }
@media (max-width: 640px) { .hidden-mobile { display: none !important; } }
@media (min-width: 640px) { .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); } .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); } }

/* =========================================================================
   5. BACKGROUNDS E GLASSMORPHISM
   ========================================================================= */
.surface { background-color: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }

.glass-panel {
  background: rgba(30, 41, 59, 0.4); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); border-radius: var(--radius-lg);
  padding: var(--space-6); transition: transform var(--transition-bounce), box-shadow var(--transition-normal);
}
.glass-panel:hover {
  transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 20px var(--color-primary-glow);
  border-color: rgba(56, 189, 248, 0.1);
}

.mesh-bg-wrapper { position: fixed; top:0; left:0; width:100vw; height:100vh; z-index: -1; pointer-events: none; overflow: hidden; }
.mesh-bg-wrapper::before {
  content: ''; position: absolute; top: -20%; right: -10%; width: 50vw; height: 50vw;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.1) 0%, transparent 60%); filter: blur(80px);
  animation: pulse-bg 8s infinite alternate ease-in-out;
}

/* =========================================================================
   6. COMPONENTES DE UI
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--min-touch); padding: 0 var(--space-6); font-family: var(--font-main);
  font-weight: 700; font-size: var(--text-base); border-radius: var(--radius-md);
  border: none; cursor: pointer; transition: all var(--transition-bounce);
}
.btn:active { transform: scale(0.96); }
.btn-primary { background-color: var(--color-primary); color: var(--color-base); box-shadow: 0 4px 14px 0 rgba(56, 189, 248, 0.39); }
.btn-primary:hover { background-color: var(--color-primary-hover); box-shadow: 0 6px 20px rgba(56, 189, 248, 0.6); transform: translateY(-2px); }
.btn-outline { background-color: transparent; color: var(--color-text); border: 1px solid var(--color-border); }
.btn-outline:hover { background-color: var(--color-surface); border-color: var(--color-primary); transform: translateY(-2px); }
.btn-ghost { background-color: transparent; color: var(--color-text); }
.btn-ghost:hover { background-color: var(--color-surface); color: var(--color-primary); }

/* =========================================================================
   7. ANIMAÇÕES (Motion Design)
   ========================================================================= */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUpFade { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-bg { 0% { transform: scale(1) translate(0, 0); } 100% { transform: scale(1.1) translate(-20px, 20px); } }

.animate-fade-in { animation: fadeIn 0.8s ease-out forwards; opacity: 0; }
.animate-slide-up { animation: slideUpFade 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; opacity: 0; }
.animate-delay-1 { animation-delay: 150ms; }
.animate-delay-2 { animation-delay: 300ms; }
.animate-delay-3 { animation-delay: 450ms; }

/* =========================================================================
   8. TICKER — Faixa de Rolagem Infinita (Hero Footer)
   ========================================================================= */

/* @keyframes da rolagem: move -50% porque temos 16 itens (8 originais × 2) */
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.ticker-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  overflow: hidden;
  border-top:    1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background:    var(--color-surface);
  padding: var(--space-3) 0;
  /* Máscara de fade nas bordas */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

.ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  /* 35s = velocidade confortável; ajuste conforme necessário */
  animation: ticker-scroll 35s linear infinite;
  will-change: transform;
}

/* Pausa ao passar o mouse */
.ticker-wrap:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-block;
  font-family: var(--font-mono);
  font-size:   var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 0 var(--space-6);
  transition: color var(--transition-fast);
  cursor: default;
}

/* Separador // entre itens */
.ticker-item::after {
  content: '//';
  margin-left: var(--space-6);
  color: var(--color-primary);
  opacity: 0.45;
  font-weight: 600;
}

/* Último item de cada metade sem separador duplicado (opcional visual) */
.ticker-item:nth-child(8)::after,
.ticker-item:last-child::after {
  opacity: 0;
}

/* Destaque ao hover no item */
.ticker-item:hover {
  color: var(--color-primary);
}
