/* =========================================================
   INTELIFICA — hoja de estilos única del sitio
   Sin build, sin preprocesador: edita directamente esto.
   ========================================================= */

/* ---------- 1. Variables de marca ---------- */
:root {
  /* Grafito (color principal) */
  --primary-50: #f7f7f8;
  --primary-100: #ececee;
  --primary-200: #d3d5d8;
  --primary-300: #b0b4b9;
  --primary-400: #888e95;
  --primary-500: #676d74;
  --primary-600: #4f545a;
  --primary-700: #3a3e43;
  --primary-800: #26292c;
  --primary-900: #18191b;
  --primary-950: #0e0f10;

  /* Coral (acento cálido) */
  --accent-50: #fff2ee;
  --accent-100: #ffe0d6;
  --accent-200: #ffbfa8;
  --accent-300: #ff9470;
  --accent-400: #fa6a41;
  --accent-500: #ee4d2e;
  --accent-600: #d33c1f;
  --accent-700: #ac311a;

  --ink: #1a1b1d;
  --paper: #fbfaf8;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Space Grotesk", -apple-system, sans-serif;

  --shadow-soft: 0 4px 24px rgba(24, 25, 27, 0.08);
  --radius: 0.75rem;
}

/* ---------- 2. Reset básico ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.15;
  color: var(--primary-900);
}

p {
  margin: 0;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- 3. Layout ---------- */
.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  max-width: 72rem;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

@media (min-width: 640px) {
  .section {
    padding: 5rem 2rem;
  }
}

.text-center {
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-600);
}

/* ---------- 4. Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent-500);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  background: var(--accent-600);
  box-shadow: 0 8px 28px rgba(24, 25, 27, 0.16);
}

.btn-secondary {
  background: #fff;
  color: var(--primary-800);
  border-color: var(--primary-300);
}

.btn-secondary:hover {
  background: var(--primary-50);
  box-shadow: 0 6px 20px rgba(24, 25, 27, 0.1);
}

.btn-block {
  width: 100%;
}

@media (min-width: 640px) {
  .btn-block {
    width: auto;
  }
}

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 248, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--primary-100);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.brand img {
  width: 2rem;
  height: 2rem;
  border-radius: 0.375rem;
  object-fit: cover;
  flex-shrink: 0;
}

.brand span {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-900);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--primary-800);
  text-decoration: none;
  padding-bottom: 0.25rem;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 0;
  background: var(--accent-500);
  transition: width 0.3s ease;
}

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

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

.header-cta {
  display: none;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  padding: 0.5rem;
  color: var(--primary-900);
  cursor: pointer;
}

.menu-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--primary-100);
  background: var(--paper);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav .container {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.mobile-nav a {
  padding: 0.75rem 0.5rem;
  border-radius: 0.375rem;
  font-weight: 500;
  color: var(--primary-800);
  text-decoration: none;
}

.mobile-nav a:hover {
  background: var(--primary-50);
}

.mobile-nav .btn-primary {
  margin-top: 0.5rem;
  width: 100%;
}

@media (min-width: 1024px) {
  .nav-links {
    display: flex;
  }
  .header-cta {
    display: block;
  }
  .menu-toggle {
    display: none;
  }
  .mobile-nav {
    display: none !important;
  }
}

/* ---------- 6. Hero / PageHero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--primary-50);
}

.hero-grid {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    padding: 7rem 2rem;
  }
}

.hero h1 {
  font-size: 1.875rem;
  letter-spacing: -0.01em;
}

@media (min-width: 640px) {
  .hero h1 {
    font-size: 3rem;
  }
}

.hero p.lead {
  margin-top: 1.5rem;
  max-width: 40rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--primary-700);
}

.hero-illustration {
  display: none;
}

@media (min-width: 1024px) {
  .hero-illustration {
    display: flex;
    justify-content: center;
  }
  .hero-illustration img {
    width: 100%;
    max-width: 26rem;
  }
}

.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--primary-50);
  border-bottom: 1px solid var(--primary-100);
}

.page-hero .container {
  position: relative;
  max-width: 48rem;
  padding: 4rem 1.5rem;
  text-align: center;
}

@media (min-width: 640px) {
  .page-hero .container {
    padding: 5rem 2rem;
  }
}

.page-hero h1 {
  margin-top: 0.75rem;
  font-size: 1.875rem;
  letter-spacing: -0.01em;
}

@media (min-width: 640px) {
  .page-hero h1 {
    font-size: 2.25rem;
  }
}

.page-hero p.lead {
  margin: 1rem auto 0;
  max-width: 40rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--primary-700);
}

/* ---------- 7. Decoración: formas planas y trama de puntos ---------- */
.blob {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.blob-primary {
  background: var(--primary-600);
  opacity: 0.15;
}

.blob-accent {
  background: var(--accent-400);
  opacity: 0.15;
}

.dot-grid {
  position: absolute;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='11' cy='11' r='1' fill='%23b0b4b9'/%3E%3C/svg%3E");
  background-size: 22px 22px;
  opacity: 0.4;
}

/* ---------- 8. Animación al aparecer (scroll reveal) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(1.25rem);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  }

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

  @keyframes fade-in-up {
    from {
      opacity: 0;
      transform: translateY(1rem);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .fade-in-up {
    animation: fade-in-up 0.8s ease-out both;
  }
}

/* ---------- 9. Rejillas y tarjetas ---------- */
.grid {
  display: grid;
  gap: 1.5rem;
}

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

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

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

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  height: 100%;
  background: #fff;
  border: 1px solid var(--primary-100);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(24, 25, 27, 0.12);
  border-color: var(--accent-200);
}

.service-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.service-card .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: var(--primary-800);
  color: var(--primary-50);
  transition: background 0.3s ease, transform 0.3s ease;
}

.service-card .icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.service-card:hover .icon {
  background: var(--accent-500);
  transform: scale(1.1);
}

.service-card h3 {
  margin-top: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.service-card p {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--primary-700);
}

.service-card .link {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-600);
}

.service-card .link svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.25s ease;
}

.service-card:hover .link svg {
  transform: translateX(0.25rem);
}

/* ---------- 10. Sección "por qué" / CTA ---------- */
.section-tint {
  position: relative;
  overflow: hidden;
  background: var(--primary-50);
}

.cta-section {
  position: relative;
  overflow: hidden;
  background: var(--primary-700);
}

.cta-section .container {
  position: relative;
  max-width: 48rem;
  padding: 4rem 1.5rem;
  text-align: center;
}

@media (min-width: 640px) {
  .cta-section .container {
    padding: 5rem 2rem;
  }
}

.cta-section h2 {
  color: #fff;
  font-size: 1.5rem;
}

@media (min-width: 640px) {
  .cta-section h2 {
    font-size: 1.875rem;
  }
}

.cta-section p {
  margin: 1rem auto 0;
  max-width: 40rem;
  color: var(--primary-200);
  line-height: 1.7;
}

.cta-section .btn-primary {
  margin-top: 2rem;
}

/* ---------- 11. Cómo funciona (3 pasos) ---------- */
.steps {
  position: relative;
  margin-top: 3rem;
  display: grid;
  gap: 2rem;
}

@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
  .steps::before {
    content: "";
    position: absolute;
    top: 1.25rem;
    left: 0;
    right: 0;
    border-top: 1px dashed var(--primary-200);
  }
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--primary-800);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
}

.step h3 {
  margin-top: 1rem;
  font-size: 1.125rem;
}

.step p {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--primary-700);
}

/* ---------- 12. Footer ---------- */
.site-footer {
  background: var(--primary-900);
  color: var(--primary-100);
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding: 3.5rem 0;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-grid h3 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary-300);
}

.footer-grid ul {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-grid a {
  font-size: 0.875rem;
  color: var(--primary-100);
  text-decoration: none;
}

.footer-grid a:hover {
  color: #fff;
}

.footer-brand span {
  color: #fff;
}

.footer-brand p {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--primary-200);
}

.footer-bottom {
  border-top: 1px solid var(--primary-700);
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-bottom p {
  font-size: 0.875rem;
  color: var(--primary-300);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer-legal a {
  font-size: 0.875rem;
  color: var(--primary-300);
  text-decoration: none;
}

.footer-legal a:hover {
  color: #fff;
}

/* ---------- 13. Formulario de contacto ---------- */
.form-card {
  border: 1px solid var(--primary-100);
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
}

.form-row {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .form-row.two-cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-900);
  margin-bottom: 0.375rem;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--primary-200);
  border-radius: 0.375rem;
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  color: var(--ink);
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 1px;
  border-color: var(--primary-500);
}

.field-error {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: #dc2626;
}

.form-note {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--primary-500);
}

.form-success {
  border: 1px solid var(--primary-200);
  background: var(--primary-50);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.contact-layout {
  display: grid;
  gap: 3rem;
  max-width: 64rem;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .contact-layout {
    grid-template-columns: 3fr 2fr;
  }
}

.contact-side ul {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--primary-700);
}

.contact-side a {
  color: var(--accent-600);
  text-decoration: none;
}

.contact-side a:hover {
  text-decoration: underline;
}

/* ---------- 14. Precios ---------- */
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--primary-100);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.plan:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(24, 25, 27, 0.12);
}

.plan.highlighted {
  border-color: var(--accent-300);
  outline: 2px solid var(--accent-300);
}

@media (min-width: 640px) {
  .plan.highlighted {
    transform: scale(1.05);
  }
}

.plan-badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-500);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.plan .price {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--primary-900);
}

.plan ul {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.plan li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--primary-700);
}

.plan li svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--accent-500);
  margin-top: 0.125rem;
}

/* ---------- 15. Casos de uso ---------- */
.usecase {
  height: 100%;
  border-top: 4px solid var(--accent-400);
}

/* ---------- 16. FAQ ---------- */
.faq-list {
  max-width: 48rem;
  margin: 0 auto;
}

.faq-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--primary-100);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: var(--primary-900);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--primary-500);
  transition: transform 0.2s ease;
}

.faq-item[open] summary svg {
  transform: rotate(45deg);
}

.faq-item p {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--primary-700);
}

/* ---------- 17. Bloque de texto simple (legal, blog vacío…) ---------- */
.prose {
  max-width: 48rem;
  margin: 0 auto;
  color: var(--primary-700);
  line-height: 1.7;
}

.empty-state {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
  border: 1px dashed var(--primary-200);
  border-radius: var(--radius);
  background: #fff;
  padding: 2.5rem;
}

.empty-state h2 {
  font-size: 1.125rem;
}

.empty-state p {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  color: var(--primary-700);
}

/* ---------- 18. Utilidades varias ---------- */
.mt-lead {
  margin-top: 1.5rem;
}

.center-col {
  max-width: 48rem;
  margin: 0 auto;
}
