/* ============================================================
   AI MAKER FABLAB — Landing de prueba gratuita
   Paleta: Delft Blue (marca AI Maker)
   Mobile-first · sin dependencias externas
   ============================================================ */

:root {
  /* Paleta de marca AI Maker — Delft Blue */
  --color-primary:        #4a6fa5;
  --color-primary-dark:   #2a3f5f;
  --color-primary-soft:   #d6e3f0;
  --color-accent:         #8ba8c4;

  /* Texto */
  --color-text:           #2a3f5f;
  --color-text-muted:     #6b8299;
  --color-text-light:     #8ba8c4;

  /* Superficies */
  --color-bg:             #f4f6f8;
  --color-bg-alt:         #ffffff;
  --color-surface:        #ffffff;
  --color-border:         #e8ecf0;
  --color-border-strong:  #cbd5e0;

  /* Éxito y estado */
  --color-success:        #10b981;
  --color-success-soft:   #d1fae5;
  --color-danger:         #dc2626;

  /* Tipografía */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Espaciado y formas */
  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   16px;
  --radius-xl:   24px;

  /* Sombras sutiles, inspiradas en AI Maker */
  --shadow-sm:   0 1px 2px rgba(42, 63, 95, 0.04);
  --shadow:      0 2px 8px rgba(42, 63, 95, 0.06);
  --shadow-lg:   0 10px 30px rgba(42, 63, 95, 0.08);
  --shadow-xl:   0 20px 50px rgba(42, 63, 95, 0.12);

  /* Layout */
  --container: 1140px;
  --header-h:  72px;
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--color-primary); text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0 0 0.5em; color: var(--color-text); line-height: 1.2; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

/* ============ UTILIDADES ============ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding: 6px 14px;
  background: var(--color-primary-soft);
  border-radius: 999px;
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}
.section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
}

/* ============ BOTONES ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
}
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 16px 30px; font-size: 16px; }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(74, 111, 165, 0.25);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(74, 111, 165, 0.35);
}
.btn-primary:active { transform: translateY(0); }

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-weight: 700;
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(42, 63, 95, 0.2);
}
.logo-text { font-size: 16px; }
.logo-text em { font-style: normal; color: var(--color-text-muted); font-weight: 500; }

.site-nav {
  display: none;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 14px;
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--color-text); }
.site-nav .btn { color: #fff; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 60px 0 80px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, var(--color-bg) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.hero-badge svg { color: var(--color-primary); }
.hero-badge strong { color: var(--color-text); font-weight: 600; }

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.highlight {
  background: linear-gradient(120deg, var(--color-primary), var(--color-primary-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
}
.hero-sub strong { color: var(--color-text); font-weight: 600; }

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
}
.hero-cta-meta {
  font-size: 13px;
  color: var(--color-text-muted);
}

.hero-proof {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 640px;
  margin: 0 auto;
  padding: 24px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.proof-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}
.proof-item strong {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 18px;
}
.proof-item span {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* Decoración de fondo del hero */
.hero-deco {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(74, 111, 165, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 10%, rgba(139, 168, 196, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ============ FEATURES ============ */
.features {
  padding: 80px 0;
  background: var(--color-bg-alt);
}
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.feature {
  padding: 28px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
}
.feature:hover {
  border-color: var(--color-primary-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  margin-bottom: 16px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.feature p {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0;
}

/* ============ INCLUDES ============ */
.includes {
  padding: 80px 0;
  background: var(--color-bg);
}
.includes-list {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.includes-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.check-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-success-soft);
  color: var(--color-success);
}
.check-icon svg { width: 18px; height: 18px; }
.includes-list strong {
  display: block;
  color: var(--color-text);
  margin-bottom: 2px;
}
.includes-list span {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ============ FORMULARIO ============ */
.form-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  position: relative;
  overflow: hidden;
}
.form-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.04) 0%, transparent 40%);
  pointer-events: none;
}
.form-wrapper {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  background: var(--color-bg-alt);
  border-radius: var(--radius-xl);
  padding: 40px 28px;
  box-shadow: var(--shadow-xl);
}
.form-head {
  text-align: center;
  margin-bottom: 32px;
}
.form-head h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.form-head p {
  color: var(--color-text-muted);
  margin: 0;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field-full { width: 100%; }
.form-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}
.form-field .req { color: var(--color-primary); }
.form-field input,
.form-field textarea {
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: all 0.15s ease;
  width: 100%;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-bg-alt);
  box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.12);
}
.form-field input:read-only {
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-weight: 500;
  cursor: default;
}
.form-field input:read-only:focus {
  box-shadow: none;
  border-color: var(--color-border);
}
.form-field input.has-error,
.form-field textarea.has-error {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
.form-field textarea { resize: vertical; min-height: 80px; }

.form-submit {
  margin-top: 8px;
  text-align: center;
}
.form-submit .btn { width: 100%; }
.form-note {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 12px 0 0;
}

.form-success {
  text-align: center;
  padding: 24px;
  background: var(--color-success-soft);
  border-radius: var(--radius);
}
.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-success);
  color: #fff;
  margin-bottom: 12px;
}
.success-icon svg { width: 28px; height: 28px; }
.form-success h3 {
  color: var(--color-text);
  margin-bottom: 8px;
}
.form-success p {
  color: var(--color-text-muted);
  margin: 0;
}

/* ============ FAQ ============ */
.faq {
  padding: 80px 0;
  background: var(--color-bg-alt);
}
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-list details {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.faq-list details[open] {
  border-color: var(--color-primary-soft);
  background: var(--color-bg-alt);
}
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text);
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary span:first-child { flex: 1; padding-right: 16px; }
.faq-icon {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--color-primary);
  transition: transform 0.2s ease;
}
.faq-icon::before {
  width: 14px;
  height: 2px;
  transform: translate(-50%, -50%);
}
.faq-icon::after {
  width: 2px;
  height: 14px;
  transform: translate(-50%, -50%);
}
.faq-list details[open] .faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}
.faq-list details p {
  padding: 0 22px 20px;
  color: var(--color-text-muted);
  margin: 0;
}

/* ============ FOOTER ============ */
.site-footer {
  padding: 40px 0;
  background: var(--color-primary-dark);
  color: #fff;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-brand-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.footer-brand-text strong { font-size: 16px; }
.footer-brand-text span {
  font-size: 12px;
  color: rgba(214, 227, 240, 0.7);
}
.footer-meta {
  font-size: 13px;
  color: rgba(214, 227, 240, 0.7);
  margin: 0;
}

/* ============================================================
   RESPONSIVE — Tablets (≥ 640px)
   ============================================================ */
@media (min-width: 640px) {
  .hero-proof {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
  .hero-cta {
    flex-direction: row;
    justify-content: center;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
  .form-wrapper { padding: 48px 40px; }
  .form-submit .btn { width: auto; min-width: 280px; }
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ============================================================
   RESPONSIVE — Desktop (≥ 960px)
   ============================================================ */
@media (min-width: 960px) {
  .site-nav { display: flex; }
  .nav-toggle { display: none; }

  .hero { padding: 100px 0 120px; }

  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .feature { padding: 32px 28px; }

  .form-section { padding: 100px 0; }
  .form-wrapper { padding: 56px 56px; }
}

/* ============================================================
   RESPONSIVE — Menú móvil abierto
   ============================================================ */
@media (max-width: 959px) {
  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px 20px 24px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
  }
  .site-nav.is-open {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .site-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 15px;
  }
  .site-nav a:last-child {
    border-bottom: none;
    margin-top: 12px;
    text-align: center;
    color: #fff;
  }
}
