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

:root {
  --primary: #1e376f;
  --secondary: #3f74b8;
  --bg-dark: #0a0e17;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.text-gradient {
  background: linear-gradient(135deg, #93c5fd, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge {
  display: inline-block;
  background: rgba(30, 55, 111, 0.6);
  color: #93c5fd;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(63, 116, 184, 0.3);
}

.hero {
  text-align: center;
  padding-top: 10rem;
  padding-bottom: 6rem;
  background: radial-gradient(circle at top, rgba(30, 55, 111, 0.4) 0%, transparent 60%);
}

.hero-pill {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: rgba(63, 116, 184, 0.1);
  border: 1px solid rgba(63, 116, 184, 0.3);
  color: #93c5fd;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 48rem;
  margin: 0 auto 3rem;
}

.feature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5rem;
  margin-bottom: 10rem;
}

.feature-row.reverse {
  flex-direction: row-reverse;
}

@media (max-width: 900px) {
  .feature-row, .feature-row.reverse {
    flex-direction: column;
    gap: 3rem;
    margin-bottom: 6rem;
  }
}

.feature-content {
  flex: 1;
  max-width: 500px;
}

.feature-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-list li svg {
  color: #3b82f6;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.card-list li b {
  color: var(--text-main);
  font-weight: 600;
  display: block;
  margin-bottom: 0.1rem;
}

.mockup {
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 30px 60px -12px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.mockup::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="2" /></svg>') center/4px 4px;
  z-index: -1;
  opacity: 0.5;
}

.mockup-icon {
  width: 64px;
  height: 64px;
  color: rgba(255,255,255,0.15);
}

.mockup-phone {
  width: 320px;
  height: 640px;
  border-radius: 40px;
}

.mockup-phone::before {
  content: '';
  position: absolute;
  top: 15px;
  width: 120px;
  height: 25px;
  background: rgba(0,0,0,0.5);
  border-radius: 20px;
}

.mockup-tablet {
  width: 500px;
  height: 380px;
  border-radius: 20px;
}

.mockup-desktop {
  width: 100%;
  max-width: 800px;
  height: 450px;
  border-radius: 12px;
}

.mockup-desktop::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 30px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.module-star {
  background: radial-gradient(circle at center, #0d1a3a 0%, var(--bg-dark) 100%);
  border-top: 1px solid rgba(63, 116, 184, 0.2);
  border-bottom: 1px solid rgba(63, 116, 184, 0.2);
  text-align: center;
  padding: 8rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 4rem;
}

.stat-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 2.5rem;
  border-radius: 16px;
  text-align: left;
}

.stat-card h4 {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 1rem;
}

.stat-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.ecosystem-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 0;
}

.ecosystem-list li {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 1.5rem;
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.ecosystem-list li b {
  color: #fff;
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

/* ────────────────────────────────────────────────────────
   ANIMACIONES (INTERSECTION OBSERVER - .reveal)
──────────────────────────────────────────────────────── */

/* Estado inicial oculto */
.reveal .title-stagger span,
.reveal .badge,
.reveal .card-list,
.reveal .mockup,
.reveal .text-gradient,
.reveal p,
.reveal .stats-grid,
.reveal .ecosystem-list {
  opacity: 0;
  transform: translateY(20px);
}

.reveal .mockup {
  transform: translateY(40px) scale(0.95);
}

/* Titles word by word setup */
.title-stagger span {
  display: inline-block;
  margin-right: 0.25em; /* espacio entre palabras */
}

/* Estado activo (triggered by .reveal.active in Next.js JS) */
.reveal.active .badge {
  animation: fadeUp 0.65s ease forwards;
  animation-delay: 0.1s;
}

.reveal.active .title-stagger span {
  animation: fadeUpWord 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(0.15s + (var(--i) * 0.15s));
}

.reveal.active .text-gradient,
.reveal.active p {
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.5s;
}

.reveal.active .card-list {
  animation: fadeUpBlock 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  /* Entra después del título (aprox 0.2s base + palabras) */
  animation-delay: calc(0.5s + (var(--words-count, 5) * 0.15s));
}

.reveal.active .mockup {
  animation: fadeUpBlock 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.8s;
}

.reveal.active .stats-grid,
.reveal.active .ecosystem-list {
  animation: fadeUpBlock 1s ease forwards;
  animation-delay: 0.8s;
}

@keyframes fadeUpWord {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUpBlock {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
