/* ============================================================
   Tercer Turno — Landing
   Paleta: blanco / azul (#2563EB) / tinta (#0F172A)
   Motion: sobrio y con propósito. Todo se desactiva con
   prefers-reduced-motion y los hovers solo aplican con puntero fino.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f9fc;
  --ink: #0f172a;
  --ink-soft: #1e293b;
  --muted: #5b6b81;
  --line: #e6ebf2;
  --line-input: #8494a7;
  --blue: #2563eb;
  --blue-light: #3b82f6;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 30px -12px rgba(15, 23, 42, 0.16);
  --shadow-lg: 0 30px 60px -22px rgba(15, 23, 42, 0.26);
  --shadow-glow: 0 18px 40px -14px rgba(37, 99, 235, 0.42);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.5, 1);
  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

.container-narrow { max-width: 720px; }

/* Foco de teclado visible y consistente */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.check:focus-within {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ===== Barra de progreso de scroll ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--blue-light), var(--blue-dark));
  z-index: 60;
  pointer-events: none;
  will-change: transform;
}

/* ===== Tipografía ===== */
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; }

.text-blue { color: var(--blue); }

.eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

/* Líneas guía a ambos lados del kicker/eyebrow */
.eyebrow::before, .eyebrow::after,
.kicker::before, .kicker::after {
  content: "";
  width: 26px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--blue-light));
}
.eyebrow::after, .kicker::after { transform: scaleX(-1); }

/* ===== Botones ===== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out),
    background-color 0.25s ease, border-color 0.25s ease, background-position 0.5s var(--ease-out);
}

.btn .arrow {
  transition: transform 0.3s var(--ease-spring);
}

.btn-primary {
  background-image: linear-gradient(120deg, var(--blue-light), var(--blue-dark), var(--blue-light));
  background-size: 220% auto;
  background-position: left center;
  border-color: transparent;
  color: #fff;
}

.btn-small { padding: 0.55rem 1.1rem; font-size: 0.88rem; }
.btn-block { width: 100%; justify-content: center; padding: 1rem; font-size: 1rem; }

/* Spinner del botón al enviar */
.btn-spinner {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Nav ===== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.88);
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px -12px rgba(15, 23, 42, 0.12);
}

.nav-inner {
  width: min(1100px, 92%);
  margin-inline: auto;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: height 0.35s var(--ease-out);
}

.nav.scrolled .nav-inner { height: 56px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 30px;
  height: 30px;
  transition: transform 0.4s var(--ease-spring);
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: clamp(9rem, 16vh, 12rem) 0 clamp(7rem, 14vh, 11rem);
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 8%;
  left: 50%;
  width: min(900px, 120vw);
  aspect-ratio: 1.4;
  transform: translate(-50%, 0);
  background: radial-gradient(closest-side, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05) 55%, transparent 75%);
  pointer-events: none;
  transition: transform 0.5s var(--ease-out);
  will-change: transform;
}

/* Nube de puntos dinámica del hero (canvas pintado por script.js).
   La máscara deja limpio el centro, donde está el titular. */
.hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 70% 58% at 50% 42%, transparent 20%, rgba(0, 0, 0, 0.85) 62%, #000 85%);
  mask-image: radial-gradient(ellipse 70% 58% at 50% 42%, transparent 20%, rgba(0, 0, 0, 0.85) 62%, #000 85%);
}

.hero-content { position: relative; z-index: 1; }

.hero-title {
  margin-top: 1.1rem;
  font-size: clamp(2.1rem, 9.5vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(100deg, #3b82f6 0%, #1d4ed8 45%, #3b82f6 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: title-sheen 9s linear infinite;
}

@keyframes title-sheen {
  to { background-position: 200% center; }
}

.hero-subtitle {
  margin-top: 0.4rem;
  font-family: var(--font-head);
  line-height: 1.15;
  font-size: clamp(1.55rem, 6.5vw, 3.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 580px;
  margin: 1.6rem auto 0;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  color: var(--muted);
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.6rem, 5vw, 3rem);
  margin-top: 3rem;
}

.stat { display: flex; flex-direction: column; gap: 0.15rem; }

.stat-num {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  font-weight: 700;
}

.stat-label { font-size: 0.85rem; color: var(--muted); }

.stat-divider { width: 1px; height: 44px; background: var(--line); }

.hero-cta { margin-top: 2.8rem; }

/* ===== Secciones ===== */
.section { padding: clamp(4.5rem, 10vw, 7rem) 0; }

.section-soft { background: var(--bg-soft); }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto clamp(2.5rem, 6vw, 4rem);
}

.section-title {
  margin-top: 0.7rem;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-sub { margin-top: 1rem; color: var(--muted); }

.section-cta {
  text-align: center;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.section-cta p { color: var(--muted); margin-bottom: 1.2rem; }

/* ===== Cards ===== */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s ease;
}

/* Foco luminoso que sigue al cursor (--mx/--my los fija script.js) */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(37, 99, 235, 0.1), transparent 62%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.card > * { position: relative; z-index: 1; }

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}

.icon-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--blue-light);
  color: var(--blue);
  background: #fff;
  transition: transform 0.4s var(--ease-spring), background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

.icon-ring svg { width: 22px; height: 22px; }

.step-chip {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue);
  border: 1px solid #d3e2fd;
  background: var(--blue-soft);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
}

.process-card h3 { font-size: 1.22rem; letter-spacing: -0.01em; }

.card-tagline {
  margin-top: 0.45rem;
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 500;
}

.bullets {
  list-style: none;
  margin-top: 1.1rem;
  display: grid;
  gap: 0.75rem;
}

.bullets li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-light);
}

/* ===== Testimonios ===== */
.quote-card { display: flex; flex-direction: column; }

.quote-mark { width: 34px; height: 34px; color: #bfdbfe; margin-bottom: 1rem; transition: color 0.35s ease, transform 0.4s var(--ease-spring); }

.quote-card blockquote {
  font-size: 0.96rem;
  color: #334155;
  flex-grow: 1;
}

.quote-card figcaption {
  margin-top: 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.quote-name { font-weight: 600; font-size: 0.95rem; }

.quote-role { font-size: 0.85rem; color: var(--muted); }

/* ===== Fundador ===== */
.founder {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  max-width: 880px;
  margin-inline: auto;
}

.founder-photo {
  position: relative;
  z-index: 1;
  width: 220px;
  height: 220px;
  margin-inline: auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #60a5fa, #1e40af);
  color: #fff;
  font-family: var(--font-head);
  font-size: 3.4rem;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
  border: 4px solid #fff;
  animation: float 7s ease-in-out infinite;
}

/* Foto real: rellena el círculo (recorte propio, sin overflow en el padre
   para no cortar el aro). Si falla la carga, onerror la quita y se ven las iniciales. */
.founder-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%; /* recorte hacia arriba: deja sitio al pelo */
  border-radius: 50%;
  z-index: 1;
}

/* Aro de gradiente, gira muy despacio (presencia sutil, sin "avatar gamer") */
.founder-photo::before {
  content: "";
  position: absolute;
  inset: -8px;
  z-index: -1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--blue), #60a5fa, #1e40af, var(--blue));
  filter: blur(4px);
  opacity: 0.3;
  animation: spin 24s linear infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.founder-bio h3 {
  font-size: clamp(1.6rem, 4vw, 2rem);
  margin-bottom: 1.1rem;
  letter-spacing: -0.02em;
}

.founder-bio p { color: var(--muted); margin-bottom: 1rem; font-size: 0.97rem; }

.founder-bio .btn { margin-top: 0.6rem; }

/* ===== Formulario ===== */
.notice {
  background: var(--blue-soft);
  border: 1px solid #d3e2fd;
  border-radius: 12px;
  padding: 0.9rem 1.2rem;
  text-align: center;
  font-size: 0.9rem;
  color: #1e40af;
  margin-bottom: 1.4rem;
}

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 4vw, 2.2rem);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.field { display: grid; gap: 0.45rem; }

.field label,
.field legend {
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.field:focus-within > label { color: var(--blue); }

.req { color: var(--blue); }

.opt { color: var(--muted); font-weight: 400; font-size: 0.82rem; }

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem; /* >=16px: evita el zoom automático de iOS Safari al enfocar */
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-input);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea { resize: vertical; min-height: 90px; }

.field input::placeholder,
.field textarea::placeholder { color: #64748b; }

.field select:invalid { color: #64748b; }

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235b6b81' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.4rem;
  cursor: pointer;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: #ef4444;
}

fieldset.checks { border: none; }

/* El fieldset no pinta borde propio: el error se marca en los chips */
fieldset.checks.invalid .check { border-color: #ef4444; }

.check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 0.3rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--line-input);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 400;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s var(--ease-out);
  user-select: none;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  flex-shrink: 0;
}

.check:has(input:checked) {
  border-color: var(--blue-light);
  background: var(--blue-soft);
}

.check:active { transform: scale(0.98); }

.form-error {
  color: #dc2626;
  font-size: 0.88rem;
  text-align: center;
}

.success-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 3rem 2rem;
  text-align: center;
}

.success-card:focus { outline: none; }

.success-card svg {
  width: 52px;
  height: 52px;
  color: var(--blue);
  margin-bottom: 1rem;
}

/* El check de éxito se dibuja con un trazo animado */
.success-card svg circle,
.success-card svg path {
  stroke-dasharray: 64;
  stroke-dashoffset: 64;
  animation: draw 0.7s var(--ease-out) forwards;
}
.success-card svg path { animation-delay: 0.35s; }

@keyframes draw { to { stroke-dashoffset: 0; } }

.success-card h3 { font-size: 1.4rem; margin-bottom: 0.6rem; }

.success-card p { color: var(--muted); max-width: 420px; margin-inline: auto; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ===== Animaciones de scroll =====
   Solo se ocultan los elementos si JS está activo (html.js la pone un
   script inline en <head>): sin JS, la página se ve completa. */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(3px);
  transition: opacity 0.55s var(--ease-out), transform 0.65s var(--ease-out), filter 0.55s var(--ease-out);
}

.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.4s; }

.reveal.visible {
  opacity: 1;
  transform: none;
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .btn, .card, .icon-ring { transition: none; }
  .hero-title { animation: none; }
  .founder-photo, .founder-photo::before { animation: none; }
  .success-card svg circle, .success-card svg path { animation: none; stroke-dashoffset: 0; }
  .btn-spinner { animation: none; border-top-color: rgba(255, 255, 255, 0.45); }
  .scroll-progress { display: none; }
}

/* ===== Hover solo con puntero real (evita estados pegajosos en táctil) ===== */
@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #d7dfe9;
  }

  .btn-primary:hover {
    background-position: right center;
    box-shadow: var(--shadow-glow);
  }

  .btn:hover .arrow { transform: translateX(4px); }

  .brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }

  .card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: #d7e3f6;
  }

  .card:hover::before { opacity: 1; }

  .process-card:hover .icon-ring {
    background: var(--blue);
    color: #fff;
    transform: scale(1.06) rotate(-4deg);
    box-shadow: 0 8px 18px -6px rgba(37, 99, 235, 0.55);
  }

  .quote-card:hover .quote-mark { color: var(--blue-light); transform: scale(1.08); }

  .check:hover { border-color: var(--blue-light); }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .cards-3 { grid-template-columns: 1fr; max-width: 540px; margin-inline: auto; }

  .founder {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .founder-photo { width: 180px; height: 180px; font-size: 2.8rem; }

  .founder-bio .btn { margin-inline: auto; }
}

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: 1fr; }

  .hero { padding-top: 7.5rem; }

  .hero-stats { gap: 1.3rem; }

  .stat-num { font-size: 1.3rem; white-space: nowrap; }

  .stat-label { font-size: 0.78rem; }

  .stat-divider { height: 38px; }

  /* En móvil las guías del kicker estorban; fuera */
  .eyebrow::before, .eyebrow::after,
  .kicker::before, .kicker::after { display: none; }
}
