/* Zantry — estilos compartidos de las landing pages estáticas (public/<slug>/index.html).
   Sin dependencias: pila de fuentes del sistema, mobile-first. */
:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --text: #1e293b;
  --muted: #475569;
  --line: #e2e8f0;
  --bg-light: #f8fafc;
  --ok: #047857;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: #fff;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; }

/* La cabecera es sticky: que los anclas (#iz860, #comparativa) no queden tapados. */
[id] { scroll-margin-top: 170px; }

a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
a:focus-visible, summary:focus-visible { outline: 3px solid #a5b4fc; outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--dark); color: #fff; padding: 10px 16px; z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; color: #fff; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 780px; }

/* --- Cabecera --- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.header-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 8px; padding-bottom: 8px;
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { display: block; width: 132px; height: 47px; }
.header-actions { display: flex; align-items: center; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 18px;
  border-radius: 8px; font-weight: 600; text-decoration: none; line-height: 1.2;
  border: 1px solid transparent; transition: background-color .15s, transform .15s;
  text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 6px -1px rgba(79, 70, 229, .3); }
.btn-primary:hover { background: var(--primary-hover); color: #fff; transform: translateY(-1px); }
.btn-ghost { color: var(--text); border-color: var(--line); background: #fff; }
.btn-ghost:hover { background: #f1f5f9; color: var(--text); }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { background: var(--primary-soft); color: var(--primary-hover); }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); color: #fff; }

.header-actions .btn { padding: 8px 12px; font-size: .9rem; }
.header-actions .btn-ghost { display: none; }

.site-nav { border-top: 1px solid var(--line); }
.site-nav ul {
  list-style: none; margin: 0; padding: 4px 0;
  display: flex; flex-wrap: wrap; gap: 0 4px; margin-left: -8px;
}
.site-nav a {
  display: inline-block; padding: 8px 8px; min-height: 40px;
  font-size: .9rem; font-weight: 600; color: var(--muted); text-decoration: none;
}
.site-nav a:hover { color: var(--primary); }
.site-nav a[aria-current="page"] { color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); }

/* --- Migas --- */
.breadcrumb { font-size: .875rem; color: var(--muted); padding-top: 14px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: #94a3b8; }

/* --- Hero --- */
.hero {
  background: radial-gradient(circle at top right, #ede9fe, #fff 60%);
  padding: 28px 0 44px;
}
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--primary); background: var(--primary-soft); padding: 4px 10px; border-radius: 999px; margin: 0 0 14px;
}
.hero h1 {
  font-size: 2rem; line-height: 1.15; letter-spacing: -.02em; color: var(--dark); margin: 0 0 16px;
}
.hero .lead { font-size: 1.1rem; color: var(--muted); margin: 0 0 24px; max-width: 760px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { font-size: .9rem; color: var(--muted); margin: 14px 0 0; }

/* --- Secciones --- */
.section { padding: 44px 0; }
.section-alt { background: var(--bg-light); }
.section h2 { font-size: 1.6rem; line-height: 1.25; color: var(--dark); margin: 0 0 14px; letter-spacing: -.01em; }
.section h3 { font-size: 1.15rem; line-height: 1.3; color: var(--dark); margin: 0 0 8px; }
.section p { margin: 0 0 14px; }
.section-intro { color: var(--muted); font-size: 1.05rem; max-width: 760px; }

.grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 22px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.card p:last-child { margin-bottom: 0; }

.checklist { list-style: none; padding: 0; margin: 0 0 14px; }
.checklist li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.checklist li::before {
  content: ""; position: absolute; left: 4px; top: .45em;
  width: 12px; height: 7px; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok);
  transform: rotate(-45deg);
}

.steps { counter-reset: paso; list-style: none; padding: 0; margin: 20px 0 0; }
.steps > li {
  counter-increment: paso; position: relative; padding: 0 0 18px 52px; min-height: 40px;
}
.steps > li::before {
  content: counter(paso); position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.steps strong { color: var(--dark); }

.note {
  border-left: 4px solid var(--primary); background: var(--primary-soft);
  padding: 14px 16px; border-radius: 0 8px 8px 0; margin: 18px 0;
}
.note p:last-child { margin-bottom: 0; }

/* --- Tablas --- */
.table-scroll:focus-visible { outline: 3px solid #a5b4fc; outline-offset: 2px; }
.table-scroll { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; background: #fff; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--dark-2); color: #fff; font-weight: 600; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; color: var(--dark); }

/* --- Precios --- */
.plans { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 24px; }
.plan { position: relative; display: flex; flex-direction: column; }
.plan-popular { border: 2px solid var(--primary); }
.plan-badge {
  position: absolute; top: -12px; left: 20px; background: var(--primary); color: #fff;
  font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.plan h3 { font-size: 1.3rem; margin-bottom: 4px; }
.plan-for { color: var(--muted); font-size: .95rem; margin-bottom: 12px; }
.price { font-size: 2.1rem; font-weight: 800; color: var(--dark); line-height: 1.1; margin: 0; }
.price small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.price-alt { color: var(--muted); font-size: .95rem; margin: 4px 0 14px; }
.plan .checklist { flex: 1; }
.plan .btn { width: 100%; margin-top: 8px; }
.limits { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.limits li { background: var(--bg-light); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: .85rem; }

/* --- FAQ --- */
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  margin-bottom: 10px; padding: 0 16px;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 14px 28px 14px 0; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 10px; font-size: 1.4rem; color: var(--primary); font-weight: 700;
}
.faq details[open] summary::after { content: "−"; }
.faq summary h3 { display: inline; font-size: 1.05rem; margin: 0; }
.faq details > div { padding: 0 0 14px; color: var(--text); }
.faq details > div p:last-child { margin-bottom: 0; }

/* --- Enlaces relacionados --- */
.related { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
.related a {
  display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--text); background: #fff;
}
.related a:hover { border-color: var(--primary); }
.related strong { display: block; color: var(--primary); margin-bottom: 4px; }
.related span { font-size: .95rem; color: var(--muted); }

/* --- CTA final --- */
.cta-band { background: linear-gradient(135deg, var(--dark), var(--dark-2)); color: #e2e8f0; padding: 48px 0; text-align: center; }
.cta-band h2 { color: #fff; font-size: 1.6rem; margin: 0 0 10px; }
.cta-band p { margin: 0 auto 22px; max-width: 620px; }
.cta-band .cta-row { justify-content: center; }
.cta-band a:not(.btn) { color: #c7d2fe; }

/* --- Pie --- */
.site-footer { background: var(--dark); color: #cbd5e1; padding: 36px 0 28px; font-size: .9rem; }
.site-footer a { color: #e2e8f0; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
.site-footer h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: #fff; margin: 0 0 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer li a { display: inline-block; padding: 3px 0; }
.footer-legal { border-top: 1px solid #334155; margin-top: 26px; padding-top: 18px; color: #94a3b8; }
.footer-legal p { margin: 0 0 6px; }

/* --- Escritorio --- */
@media (min-width: 640px) {
  .header-actions .btn-ghost { display: inline-flex; }
  .grid-2, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .related { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .plans { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .brand img { width: 150px; height: 53px; }
  .header-actions .btn { padding: 10px 18px; font-size: .95rem; }
  .hero { padding: 56px 0 72px; }
  .hero h1 { font-size: 3rem; }
  .hero .lead { font-size: 1.25rem; }
  .section { padding: 64px 0; }
  .section h2 { font-size: 2rem; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .plans { grid-template-columns: repeat(4, 1fr); }
  .related { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn-primary:hover { transform: none; }
}

.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;
}
