/* ==============================
   GAX.LAT - Estilos principales
   ============================== */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a25;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #6b6b7b;
  --accent: #00ff88;
  --accent-2: #00d4ff;
  --accent-3: #7c3aed;
  --gradient: linear-gradient(135deg, #00ff88 0%, #00d4ff 50%, #7c3aed 100%);
  --gradient-soft: linear-gradient(135deg, rgba(0,255,136,0.1) 0%, rgba(0,212,255,0.1) 50%, rgba(124,58,237,0.1) 100%);
  --border: rgba(255,255,255,0.08);
  --shadow-glow: 0 0 40px rgba(0,255,136,0.15);
  --radius: 12px;
  --radius-lg: 20px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Fondo animado con grid */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,255,136,0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
  animation: floatGlow 20s ease-in-out infinite;
}

@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-100px, 50px); }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ============= HEADER / NAV ============= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10,10,15,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.header.scrolled {
  background: rgba(10,10,15,0.95);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.logo .logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #0a0a0f;
  font-size: 18px;
  box-shadow: var(--shadow-glow);
}

.logo .logo-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient);
  color: #0a0a0f;
  box-shadow: 0 4px 20px rgba(0,255,136,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,255,136,0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 24px;
}

/* ============= HERO ============= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  position: relative;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 24px;
  font-weight: 500;
}

.hero-badge .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(0,255,136,0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0,255,136,0.7); }
  70% { box-shadow: 0 0 0 12px rgba(0,255,136,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,255,136,0); }
}

.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 24px;
}

.hero h1 .gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero p.lead {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 540px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.stat .num {
  font-size: 32px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.stat .label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Visual del hero (panel de c\u00f3digo) */
.hero-visual {
  position: relative;
}

.code-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 60px rgba(0,212,255,0.1);
  position: relative;
  overflow: hidden;
}

.code-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
}

.code-header {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green { background: #28c840; }

.code-line {
  display: block;
  line-height: 1.7;
  white-space: pre;
}

.code-line .line-num {
  color: var(--text-muted);
  margin-right: 16px;
  user-select: none;
}

.code-keyword { color: #c678dd; }
.code-fn { color: #61afef; }
.code-str { color: #98c379; }
.code-var { color: #e5c07b; }
.code-comment { color: var(--text-muted); font-style: italic; }

/* ============= SECCIONES GENERALES ============= */
.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 64px;
}

.section-tag {
  display: inline-block;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.section h2 {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
  line-height: 1.1;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
}

/* ============= SERVICIOS ============= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0,255,136,0.3);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(0,255,136,0.05);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--gradient-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
}

.service-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.service-card .service-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* ============= PROYECTOS ============= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.4s;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0,212,255,0.3);
}

.project-thumb {
  height: 200px;
  background: var(--gradient);
  position: relative;
  overflow: hidden;
}

.project-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10,10,15,0.8) 100%);
}

.project-info {
  padding: 24px;
}

.project-info .tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.project-info .tag {
  font-size: 11px;
  padding: 4px 10px;
  background: var(--bg-tertiary);
  border-radius: 100px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.project-info h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.project-info p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ============= STATS / PROCESO ============= */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  position: relative;
}

.process-step {
  text-align: left;
  padding: 28px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
}

.process-step .step-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 14px;
  display: block;
  font-family: 'JetBrains Mono', monospace;
}

.process-step h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.process-step p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ============= CTA ============= */
.cta {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0,255,136,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.cta h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
}

.cta p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* ============= FOOTER ============= */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: var(--text-secondary);
  margin-top: 16px;
  font-size: 14px;
  max-width: 320px;
}

.footer h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 18px;
  color: var(--text-primary);
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 10px;
}

.footer ul a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer ul a:hover {
  color: var(--accent);
}

.socials {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.socials a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.3s;
  text-decoration: none;
}

.socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* ============= REVEAL ANIMATION ============= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ============= RESPONSIVE ============= */
@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 24px;
    border-bottom: 1px solid var(--border);
    gap: 18px;
  }
  .mobile-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .stat .num { font-size: 24px; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 70px 0; }
  .cta { padding: 40px 24px; }
}
