/* ============================================================
   Plenvio — landing informativa. Tema de marca (violeta + naranja).
   Estática, responsive y accesible. Sin dependencias.
   ============================================================ */
:root {
  --violet: #8366ff;
  --violet-bright: #a48cff;
  --violet-deep: #4a28c7;
  --orange: #fc5200;
  --orange-bright: #ff6b2c;
  --ink: #0e0c1a;
  --ink-2: #161327;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f4f2ff;
  --text-dim: #b6b0d6;
  --radius: 16px;
  --radius-sm: 12px;
  --maxw: 1120px;
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

a { color: inherit; text-decoration: none; }
img, svg { display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.4rem; }
.container--narrow { max-width: 760px; }
.center { text-align: center; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--violet); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ── Botones ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap;
  padding: 0.7rem 1.2rem; border-radius: 11px; border: 1px solid transparent;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}
.btn-lg { padding: 0.95rem 1.6rem; font-size: 1.05rem; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--orange-bright), var(--orange)); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-disabled { color: var(--text-dim); background: var(--surface); border-color: var(--border); cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--violet-bright); outline-offset: 2px; }

/* ── Marca ─────────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 800; }
.brand-mark { filter: drop-shadow(0 3px 12px rgba(131, 102, 255, 0.5)); }
.brand-name { font-size: 1.3rem; letter-spacing: -0.02em; }
.brand-accent { color: var(--orange); }

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 12, 26, 0.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s ease, background 0.2s ease;
}
.site-header.scrolled { background: rgba(14, 12, 26, 0.92); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-menu { list-style: none; display: flex; align-items: center; gap: 1.4rem; }
.nav-menu a:not(.btn) { color: var(--text-dim); font-weight: 600; font-size: 0.95rem; }
.nav-menu a:not(.btn):hover { color: var(--text); }
.nav-cta { margin-left: 0.2rem; }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.2s; }

/* ── Fondo con resplandores ────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding: clamp(2.5rem, 7vh, 5.5rem) 0 clamp(2rem, 5vh, 4rem); }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); z-index: 0; pointer-events: none;
}
.hero::before { width: 50vmax; height: 50vmax; top: -20vmax; right: -14vmax; background: radial-gradient(circle, rgba(131, 102, 255, 0.38), transparent 70%); }
.hero::after { width: 42vmax; height: 42vmax; bottom: -24vmax; left: -16vmax; background: radial-gradient(circle, rgba(252, 82, 0, 0.24), transparent 70%); }

.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--violet-bright); background: rgba(131, 102, 255, 0.12);
  border: 1px solid rgba(131, 102, 255, 0.35); padding: 0.4rem 0.9rem; border-radius: 999px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.hero-copy h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.06; font-weight: 800; letter-spacing: -0.03em;
  margin: 1rem 0 0.9rem;
}
.grad {
  background: linear-gradient(120deg, var(--violet-bright), var(--violet) 45%, var(--orange-bright));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--text-dim); max-width: 42ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.6rem 0 1.2rem; }
.hero-reassure { color: var(--text-dim); font-size: 0.88rem; margin: 0 0 1.2rem; }
.hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; color: var(--text-dim); font-size: 0.92rem; font-weight: 600; }

/* ── Mockup de teléfono ────────────────────────────────────── */
.hero-art { display: flex; justify-content: center; }
.phone {
  width: clamp(240px, 30vw, 300px); aspect-ratio: 9 / 18;
  background: linear-gradient(160deg, #1b1730, #100d20);
  border: 1px solid var(--border); border-radius: 34px; padding: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(255, 255, 255, 0.03);
}
.phone-screen {
  height: 100%; border-radius: 24px; background: radial-gradient(120% 80% at 20% 0%, rgba(131, 102, 255, 0.18), transparent), var(--ink-2);
  padding: 1rem; display: flex; flex-direction: column; gap: 0.8rem; position: relative; overflow: hidden;
}
.ps-card {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 0.8rem;
  display: flex; flex-direction: column; gap: 0.25rem;
}
.ps-card strong { font-size: 0.98rem; }
.ps-card small { color: var(--text-dim); font-size: 0.78rem; }
.ps-tag {
  align-self: flex-start; font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--violet-bright); background: rgba(131, 102, 255, 0.16); padding: 0.15rem 0.5rem; border-radius: 999px;
}
.ps-tag--green { color: #6ee7a8; background: rgba(46, 200, 120, 0.16); }
.ps-ring {
  margin-top: auto; align-self: center; width: 92px; height: 92px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: conic-gradient(var(--orange) 0 65%, rgba(255, 255, 255, 0.08) 65% 100%);
  position: relative;
}
.ps-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--ink-2); }
.ps-ring-val { position: relative; font-size: 1.6rem; font-weight: 800; }
.ps-ring-lbl { position: relative; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); }

/* ── Trust ─────────────────────────────────────────────────── */
.trust { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--ink-2); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; padding: 1.6rem 1.4rem; }
.trust-grid div { display: flex; flex-direction: column; gap: 0.2rem; }
.trust-grid strong { font-size: 1rem; }
.trust-grid span { color: var(--text-dim); font-size: 0.9rem; }

/* ── Secciones ─────────────────────────────────────────────── */
.section { padding: clamp(3rem, 7vh, 5rem) 0; }
.section--alt { background: var(--ink-2); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(1.8rem, 4vh, 2.8rem); }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; }
.section-head p { color: var(--text-dim); margin-top: 0.6rem; font-size: 1.05rem; }

/* ── Tarjetas de funciones ─────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(131, 102, 255, 0.5); }
.card-ico { font-size: 1.8rem; }
.card h3 { font-size: 1.12rem; margin: 0.7rem 0 0.4rem; }
.card p { color: var(--text-dim); font-size: 0.95rem; }

/* ── Deportes ──────────────────────────────────────────────── */
.sports { list-style: none; display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }
.sports li {
  font-weight: 700; font-size: 1.02rem; background: var(--surface-2); border: 1px solid var(--border);
  padding: 0.7rem 1.2rem; border-radius: 999px;
}

/* ── Pasos ─────────────────────────────────────────────────── */
.steps { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; margin-bottom: 2.2rem; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.step-n {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%;
  font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--violet-bright), var(--violet-deep)); margin-bottom: 0.7rem;
}
.steps h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.steps p { color: var(--text-dim); font-size: 0.95rem; }

/* Tabla comparativa "¿por qué Plenvio y no un chat genérico?" */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare { width: 100%; border-collapse: collapse; min-width: 560px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.compare th, .compare td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.95rem; vertical-align: top; line-height: 1.45; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare thead th { font-weight: 800; font-size: 1rem; }
.compare th[scope="row"] { color: var(--text-dim); font-weight: 700; width: 22%; }
.compare .col-us, .compare .col-them { width: 39%; }
.compare thead .col-us, .compare td.col-us { background: rgba(131, 102, 255, 0.08); }
.compare td.col-us { color: var(--text); }
.compare td.col-them { color: var(--text-dim); }
.compare td.col-us::before { content: "✓"; color: #51cf66; font-weight: 800; margin-right: 0.5rem; }
.compare td.col-them::before { content: "✕"; color: var(--text-dim); opacity: 0.7; margin-right: 0.5rem; }

/* ── Planes ────────────────────────────────────────────────── */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; align-items: stretch; }
.plan {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; display: flex; flex-direction: column; gap: 0.6rem;
}
.plan--featured { border-color: rgba(131, 102, 255, 0.6); box-shadow: 0 0 0 1px rgba(131, 102, 255, 0.3), 0 20px 50px rgba(74, 40, 199, 0.25); }
.plan-badge {
  position: absolute; top: -12px; left: 1.6rem; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
  color: #fff; background: linear-gradient(135deg, var(--orange-bright), var(--orange)); padding: 0.25rem 0.7rem; border-radius: 999px;
}
.plan h3 { font-size: 1.2rem; }
.plan-price { font-size: 2rem; font-weight: 800; }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; margin: 0.4rem 0 1rem; color: var(--text-dim); font-size: 0.94rem; }
.plan ul li::before { content: "✓ "; color: var(--violet-bright); font-weight: 800; }
.plan .btn { margin-top: auto; }

/* ── FAQ ───────────────────────────────────────────────────── */
.faq { display: flex; flex-direction: column; gap: 0.7rem; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.4rem 1rem;
}
.faq summary { cursor: pointer; font-weight: 700; padding: 0.7rem 0; list-style: none; position: relative; padding-right: 1.6rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.2rem; top: 0.55rem; font-size: 1.3rem; color: var(--violet-bright); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--text-dim); padding: 0 0 0.8rem; }

/* ── CTA final ─────────────────────────────────────────────── */
.cta-final { padding: clamp(3rem, 7vh, 5rem) 0; background: radial-gradient(110% 140% at 50% 0%, rgba(131, 102, 255, 0.22), transparent), var(--ink-2); }
.cta-final h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
.cta-final p { color: var(--text-dim); margin: 0.6rem 0 1.4rem; font-size: 1.1rem; }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); padding: 2.4rem 0 1.6rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 1.6rem; }
.footer-tag { color: var(--text-dim); font-size: 0.9rem; margin-top: 0.5rem; max-width: 32ch; }
.footer-col h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin-bottom: 0.7rem; }
.footer-col a { display: block; color: var(--text); font-size: 0.92rem; padding: 0.22rem 0; }
.footer-col a:hover { color: var(--violet-bright); }
.footer-bottom { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 0.85rem; }

/* ── Reveal al hacer scroll (SOLO con JS y sin reduced-motion) ─ */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  /* Al apilar, el TEXTO y el CTA van primero (enganchan e invitan a seguir);
     el mockup del móvil queda debajo como apoyo visual y algo más pequeño. */
  .hero-art { order: 1; margin-top: 0.4rem; }
  .phone { width: clamp(210px, 56vw, 260px); }
  .trust-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 64px; right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 0.4rem;
    background: var(--ink-2); border-bottom: 1px solid var(--border);
    padding: 1rem 1.4rem; transform: translateY(-130%); transition: transform 0.25s ease; z-index: 40;
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-cta .btn { width: 100%; }
}
@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
}
