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

:root {
  --bg: #0a0a0f;
  --bg-card: #111118;
  --bg-card-hover: #16161f;
  --text: #e4e4e7;
  --text-muted: #71717a;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --green: #22c55e;
  --border: #1e1e2a;
  --radius: 12px;
  --radius-sm: 8px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ========== NAV ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.accent {
  color: var(--accent);
}

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

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

.btn-nav {
  background: var(--accent);
  color: white !important;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}

.btn-nav:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

/* ========== MAIN CONTENT ========== */
.main-content {
  position: relative;
  z-index: 1;
}

/* ========== HERO ========== */
.hero {
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 60px;
  max-width: 1100px;
  margin: 0 auto;
  gap: 40px;
}

.hero-content {
  flex: 1;
}

.hero-tag {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 11px 26px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 11px 26px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  transition: border-color 0.2s, transform 0.2s;
}

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

.hero-visual {
  flex: 0 0 auto;
}

.code-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  min-width: 280px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.code-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.code-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
}

.code-dots span:first-child { background: #ef4444; }
.code-dots span:nth-child(2) { background: #eab308; }
.code-dots span:last-child { background: #22c55e; }

.code-key { color: #c084fc; }
.code-str { color: #34d399; }
.code-bool { color: #f97316; }

/* ========== SECTIONS COMMON ========== */
.section-title {
  font-size: clamp(1.5rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 32px;
}

/* ========== SERVICIOS ========== */
.servicios {
  padding: 60px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.servicio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.servicio-card:hover {
  border-color: var(--border);
}

.servicio-icon {
  color: var(--accent);
  margin-bottom: 10px;
}

.servicio-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.servicio-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ========== PROYECTOS ========== */
.proyectos {
  padding: 60px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.proyectos-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ========== FEATURED PROJECT (DMPANEL) ========== */
.proyecto-featured {
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.08);
}

.proyecto-featured-header {
  padding: 32px 32px 0;
}

.featured-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.proyecto-featured-header h3 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.proyecto-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Featured Mockup */
.proyecto-featured-mockup {
  margin: 24px 32px;
  background: #1a1a24;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.mockup-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.mockup-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.mockup-url {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-left: 8px;
  font-family: 'SF Mono', monospace;
}

.mockup-body {
  display: flex;
  min-height: 130px;
}

.mockup-body.featured {
  min-height: 200px;
}

.mockup-sidebar {
  width: 48px;
  padding: 12px 8px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mockup-sidebar.dark {
  border-color: #1a1a24;
}

.mockup-nav-item {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
}

.mockup-nav-item.active {
  background: var(--accent);
}

.mockup-nav-item.green {
  background: rgba(0, 255, 136, 0.1);
}

.mockup-nav-item.active.green {
  background: #00ff88;
}

.mockup-content {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mockup-content.dark {
  background: #0a0a0f;
}

/* Featured KPIs with text */
.mockup-kpi-row {
  display: flex;
  gap: 8px;
}

.mockup-kpi {
  flex: 1;
  height: 36px;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 6px;
  border: 1px solid rgba(99, 102, 241, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 10px;
}

.kpi-label {
  font-size: 0.5rem;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  line-height: 1;
}

.kpi-value {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.3;
}

.kpi-value.accent-text {
  color: var(--green);
}

.mockup-kpi.green {
  background: rgba(0, 255, 136, 0.06);
  border-color: rgba(0, 255, 136, 0.1);
}

/* Chart with bars */
.mockup-chart {
  height: 60px;
  background: rgba(99, 102, 241, 0.05);
  border-radius: 6px;
  border: 1px solid rgba(99, 102, 241, 0.08);
  overflow: hidden;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 100%;
  padding: 8px 12px 6px;
}

.chart-bar {
  flex: 1;
  background: linear-gradient(to top, var(--accent), var(--accent-light));
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  opacity: 0.7;
}

.mockup-chart.green {
  background: rgba(0, 255, 136, 0.04);
  border-color: rgba(0, 255, 136, 0.08);
}

/* Table with text */
.mockup-table {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mockup-row {
  height: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 3px;
}

.mockup-row.header {
  display: flex;
  justify-content: space-between;
  background: rgba(99, 102, 241, 0.06);
  padding: 2px 10px;
  height: auto;
}

.mockup-row.header span {
  font-size: 0.5rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
}

.mockup-row:not(.header) {
  display: flex;
  justify-content: space-between;
  padding: 3px 10px;
  height: auto;
}

.mockup-row:not(.header) span {
  font-size: 0.5rem;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  opacity: 0.7;
}

.mockup-row.green {
  background: rgba(0, 255, 136, 0.04);
}

/* Featured Details */
.proyecto-featured-details {
  padding: 0 32px 32px;
}

.featured-desc {
  margin-bottom: 24px;
}

.featured-desc p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.featured-modules {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.module-group h4 {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent-light);
}

.module-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.module-group li {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}

.module-group li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}

.proyecto-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 16px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

/* ========== STANDARD PROJECT CARD ========== */
.proyecto-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transition: border-color 0.3s;
}

.proyecto-card:hover {
  border-color: var(--border);
}

.proyecto-img {
  position: relative;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.03);
}

.proyecto-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--green);
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.proyecto-badge.dev {
  background: #eab308;
}

.proyecto-mockup {
  width: 100%;
  background: #1a1a24;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.proyecto-mockup.dark {
  background: #0a0a0f;
}

.proyecto-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.proyecto-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.proyecto-desc {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.proyecto-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.proyecto-tags span {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--accent-glow);
  color: var(--accent-light);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.proyecto-features {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feature {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
}

.feature::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ========== PLAN DE MEJORA ========== */
.mejora {
  padding: 80px 24px;
  background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.03), transparent);
}

.mejora-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.mejora-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.mejora-content h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.mejora-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

.mejora-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.mejora-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent-light);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mejora-step strong {
  font-size: 0.85rem;
  display: block;
  margin-bottom: 2px;
}

.mejora-step p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.mejora-visual {
  display: flex;
  justify-content: center;
}

.mejora-card-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 360px;
}

.mejora-mini-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: border-color 0.3s, transform 0.3s;
}

.mejora-mini-card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.mini-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
}

.mejora-mini-card strong {
  font-size: 0.85rem;
  display: block;
}

.mejora-mini-card small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ========== PROCESO ========== */
.proceso {
  padding: 50px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.proceso-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.proceso-step {
  text-align: center;
  padding: 20px 16px;
}

.paso-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.3;
  margin-bottom: 8px;
}

.proceso-step h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.proceso-step p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ========== CONTACTO ========== */
.contacto {
  padding: 60px 24px;
}

.contacto-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contacto-inner h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.contacto-inner > p {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.contacto-methods {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.contacto-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.contacto-btn:hover {
  transform: translateY(-2px);
}

.contacto-btn.whatsapp {
  background: #25d366;
  color: white;
}

.contacto-btn.whatsapp:hover {
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.3);
}

.contacto-btn.email {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
}

.contacto-btn.email:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 30px var(--accent-glow);
}

/* ========== FOOTER ========== */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-inner p {
  font-size: 0.825rem;
  color: var(--text-muted);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 100px;
    gap: 40px;
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    width: 100%;
  }

  .code-block {
    min-width: auto;
  }

  .servicios-grid {
    grid-template-columns: 1fr 1fr;
  }

  .proyecto-card {
    grid-template-columns: 1fr;
  }

  .proyecto-featured-header {
    padding: 24px 20px 0;
  }

  .proyecto-featured-mockup {
    margin: 20px;
  }

  .proyecto-featured-details {
    padding: 0 20px 24px;
  }

  .featured-modules {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .mejora-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .proceso-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contacto-methods {
    flex-direction: column;
    align-items: center;
  }

  .contacto-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .servicios-grid {
    grid-template-columns: 1fr;
  }

  .featured-modules {
    grid-template-columns: 1fr;
  }

  .proceso-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn-primary, .btn-secondary {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .proyecto-featured-header h3 {
    font-size: 1.4rem;
  }

  .mockup-body.featured {
    min-height: 160px;
  }

  .kpi-label {
    font-size: 0.4rem;
  }

  .kpi-value {
    font-size: 0.6rem;
  }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content, .hero-visual {
  animation: fadeInUp 0.6s ease-out;
}

.hero-visual {
  animation-delay: 0.2s;
  animation-fill-mode: both;
}
