<template>
  <div class="page">
    <Header />
    <main class="container">
      <section class="hero">
        <div class="hero-text">
          <p class="kicker">Radar automático</p>
          <h1>Convierte datos públicos en señales accionables</h1>
          <p class="lead">gob-alert detecta cambios en datos.gob.es, normaliza formatos y alerta a tu equipo en minutos.</p>
          <div class="hero-actions">
            <NuxtLink to="/plans" class="btn primary">Ver planes</NuxtLink>
            <NuxtLink to="/discover" class="btn ghost">Explorar cambios</NuxtLink>
          </div>
        </div>
        <div class="hero-card">
          <div class="metric">
            <span class="metric-label">Detección</span>
            <span class="metric-value">< 1h</span>
          </div>
          <div class="metric">
            <span class="metric-label">Formatos</span>
            <span class="metric-value">CSV · JSON</span>
          </div>
          <div class="metric">
            <span class="metric-label">Alertas</span>
            <span class="metric-value">Email · Telegram</span>
          </div>
        </div>
      </section>

      <section class="features">
        <article>
          <h3>Ingesta automatizada</h3>
          <p>Agenda ingestas periódicas y guarda histórico de cambios por dataset.</p>
        </article>
        <article>
          <h3>Clasificación inteligente</h3>
          <p>Detecta organismos, territorios y temas para segmentar alertas.</p>
        </article>
        <article>
          <h3>Panel de control</h3>
          <p>Visualiza novedades, tendencias y métricas clave en tiempo real.</p>
        </article>
      </section>

      <section class="cta">
        <div>
          <h2>Listo para tu piloto en 30 días</h2>
          <p>Integra alertas personalizadas para consultoras, pymes y universidades.</p>
        </div>
        <NuxtLink to="/admin" class="btn primary">Ver demo</NuxtLink>
      </section>
    </main>
  </div>
</template>

<script setup>
import Header from '~/components/Header.vue'
</script>

<style scoped>
.page {
  min-height: 100vh;
  background: radial-gradient(circle at top left, #f4f7ff 0%, #eef2f9 40%, #e2e8f0 100%);
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  align-items: center;
}
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: #475569;
}
.hero h1 {
  font-size: clamp(2.4rem, 3vw, 3.2rem);
  margin: 0.6rem 0 1rem;
}
.lead {
  color: #334155;
  font-size: 1.1rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.6rem;
}
.btn {
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn.primary {
  background: #0f172a;
  color: #fff;
}
.btn.ghost {
  border: 1px solid #0f172a;
  color: #0f172a;
}
.hero-card {
  background: #0f172a;
  color: #fff;
  padding: 1.8rem;
  border-radius: 24px;
  display: grid;
  gap: 1rem;
}
.metric {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}
.metric-label {
  color: rgba(255, 255, 255, 0.7);
}
.features {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.features article {
  background: #fff;
  padding: 1.4rem;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.cta {
  margin-top: 3rem;
  background: #38bdf8;
  padding: 2rem;
  border-radius: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: #0f172a;
}

@media (max-width: 720px) {
  .hero-actions {
    flex-direction: column;
  }
  .cta {
    flex-direction: column;
    align-items: flex-start;
  }
}
</style>
