/* ===================== TOKENS ===================== */
:root {
  --bg: #0b1020;
  --bg-soft: #0f152b;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --ink: #0b1020;
  --ink-soft: #475069;
  --line: #e6eaf2;
  --brand: #4f46e5;
  --brand-2: #38bdf8;
  --brand-ink: #2440d6;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 40px rgba(15, 23, 42, .12);
  --shadow-sm: 0 4px 16px rgba(15, 23, 42, .08);
  --container: 1120px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

/* El atributo hidden debe ganar siempre, aunque la clase fije display */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.15; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: 760px; }

.grad {
  background: linear-gradient(100deg, var(--brand-2), var(--brand));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  border-radius: 999px;
  padding: 12px 22px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(120deg, var(--brand), var(--brand-ink));
  color: #fff;
  box-shadow: 0 8px 22px rgba(79, 70, 229, .35);
}
.btn--primary:hover { box-shadow: 0 10px 28px rgba(79, 70, 229, .45); }
.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover { background: var(--surface-2); }
.btn--lg { padding: 15px 28px; font-size: 16px; }
.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ===================== NAV ===================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .8);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.02em;
}
.brand strong { color: var(--brand); font-weight: 800; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--bg);
}
.nav__links { display: flex; gap: 26px; }
.nav__links a {
  font-size: 15px;
  color: var(--ink-soft);
  font-weight: 500;
  transition: color .15s ease;
}
.nav__links a:hover { color: var(--ink); }

/* ===================== HERO ===================== */
.hero {
  position: relative;
  background: radial-gradient(1200px 500px at 70% -10%, #1b2550 0%, var(--bg) 55%);
  color: #eaf0ff;
  overflow: hidden;
  padding: 84px 0 96px;
}
.hero__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 15% 10%, rgba(56, 189, 248, .18), transparent 60%),
    radial-gradient(500px 280px at 90% 80%, rgba(99, 102, 241, .22), transparent 60%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}
.badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #cdd8ff;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 900;
  margin-bottom: 18px;
}
.hero__sub {
  font-size: clamp(16px, 2vw, 19px);
  color: #b9c2e0;
  max-width: 560px;
  margin-bottom: 30px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__cta .btn--ghost { color: #eaf0ff; border-color: rgba(255, 255, 255, .22); }
.hero__cta .btn--ghost:hover { background: rgba(255, 255, 255, .08); }
.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  font-size: 14px;
  color: #9fb0dc;
}

/* Hero art: tarjeta DNI con marca de agua */
.hero__art { display: grid; place-items: center; }
.doc-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1.58 / 1;
  background: linear-gradient(135deg, #fdfdff, #eef2fb);
  border-radius: 16px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
  padding: 18px;
  overflow: hidden;
  transform: rotate(-4deg);
  color: #1b2550;
}
.doc-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.doc-card__chip {
  width: 34px; height: 26px; border-radius: 5px;
  background: linear-gradient(135deg, #d4af37, #f4e29b);
}
.doc-card__title { font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.doc-card__body { display: flex; gap: 14px; }
.doc-card__photo {
  width: 74px; height: 92px; border-radius: 8px; flex: none;
  background: linear-gradient(160deg, #c7d0e8, #9aa8cf);
}
.doc-card__lines { display: flex; flex-direction: column; gap: 9px; flex: 1; padding-top: 6px; }
.doc-card__lines span { height: 9px; border-radius: 5px; background: #c2cbe4; }
.doc-card__lines span:nth-child(1) { width: 80%; }
.doc-card__lines span:nth-child(2) { width: 60%; }
.doc-card__lines span:nth-child(4) { width: 70%; }
.doc-card__lines .redacted { background: #0b1020; width: 50%; }
.doc-card__wm {
  position: absolute;
  inset: -40% -20%;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
  color: rgba(37, 64, 214, .22);
  letter-spacing: .08em;
  transform: rotate(-28deg);
  line-height: 2.6;
  word-spacing: 6px;
  pointer-events: none;
}

/* ===================== STRIP ===================== */
.strip {
  background: var(--bg-soft);
  color: #8e9bbd;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.strip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px 24px;
  font-size: 14px;
  font-weight: 500;
}
.strip .dot { opacity: .4; }

/* ===================== SECTIONS ===================== */
.section { padding: 84px 0; }
.section--alt { background: var(--surface-2); }
.section__head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--brand);
  margin-bottom: 12px;
}
.section__head h2 { font-size: clamp(26px, 3.5vw, 38px); font-weight: 800; margin-bottom: 14px; }
.section__head p { color: var(--ink-soft); font-size: 17px; }
.privacy-note {
  display: inline-block;
  background: #e8f0ff;
  color: var(--brand-ink);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 999px;
}

/* ===================== GRID & CARDS ===================== */
.grid { display: grid; gap: 22px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.feature__icon {
  width: 50px; height: 50px;
  display: grid; place-items: center;
  font-size: 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef1ff, #e2f3ff);
  margin-bottom: 16px;
}
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--ink-soft); font-size: 15px; }

/* ===================== STEPS ===================== */
.steps .step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  position: relative;
}
.step__num {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  margin-bottom: 16px;
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 15px; }

/* ===================== APP / HERRAMIENTA ===================== */
.app {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: stretch;
}
.app__stage {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 460px;
  display: grid;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.dropzone {
  border: 2px dashed #c6cfe6;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  padding: 40px;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--brand); background: #f5f8ff; outline: none; }
.dropzone.is-drag { border-color: var(--brand); background: #eef3ff; }
.dropzone__icon { font-size: 46px; }
.dropzone__title { font-size: 18px; font-weight: 700; }
.dropzone__hint { color: var(--ink-soft); font-size: 14px; }

.canvas-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}
#canvas {
  max-width: 100%;
  max-height: 540px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  touch-action: none;
}
#canvas.is-redact { cursor: crosshair; }
.canvas-hint {
  font-size: 13px;
  color: var(--brand-ink);
  background: #e8f0ff;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
}

/* Panel */
.app__panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-sm);
}
.panel__group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.panel__group:last-of-type { border-bottom: none; padding-bottom: 0; }
.panel__row { display: flex; flex-direction: column; gap: 6px; }
.panel__row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel__row output { font-weight: 700; color: var(--brand-ink); }
.panel__row--inline { flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; }
.panel__row--inline label { flex-direction: row; }

input[type="text"], select {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
input[type="text"]:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
}
input[type="range"] { width: 100%; accent-color: var(--brand); }
input[type="color"] {
  width: 46px; height: 32px; padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px; background: none; cursor: pointer;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  color: var(--ink);
}
.toggle__dot {
  width: 38px; height: 22px; border-radius: 999px; flex: none;
  background: #cdd5e6; position: relative; transition: background .15s ease;
}
.toggle__dot::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform .15s ease;
}
.toggle[aria-pressed="true"] { border-color: var(--brand); color: var(--brand-ink); }
.toggle[aria-pressed="true"] .toggle__dot { background: var(--brand); }
.toggle[aria-pressed="true"] .toggle__dot::after { transform: translateX(16px); }
.radio { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 500; cursor: pointer; }
.muted { color: var(--ink-soft); font-size: 13px; }

.panel__actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.format-row { justify-content: space-between; gap: 10px; }
.format-row label { flex: none; }
.format-row select { flex: 1; min-width: 0; }

/* ===================== GRATIS ===================== */
.free-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 32px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}
.free-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(100deg, var(--brand-2), var(--brand));
}
.free-card__price {
  font-size: 64px;
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1;
  background: linear-gradient(120deg, var(--brand-2), var(--brand));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.free-card__tag { color: var(--ink-soft); font-size: 14px; margin: 8px 0 24px; }
.free-card__features {
  list-style: none;
  padding: 0;
  margin: 0 auto 28px;
  display: inline-flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}
.free-card__features li { font-size: 15px; }

/* ===================== FAQ ===================== */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq__item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 20px;
}
.faq__item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 16px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; font-size: 22px; color: var(--brand); font-weight: 400; }
.faq__item[open] summary::after { content: "−"; }
.faq__item p { color: var(--ink-soft); padding-bottom: 18px; font-size: 15px; }

/* ===================== CTA FINAL ===================== */
.cta-final {
  background: radial-gradient(800px 300px at 50% 0%, #1b2550, var(--bg));
  color: #eaf0ff;
  text-align: center;
  padding: 80px 0;
}
.cta-final h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 900; margin-bottom: 12px; }
.cta-final p { color: #b9c2e0; font-size: 18px; margin-bottom: 28px; }

/* ===================== FOOTER ===================== */
.footer { background: var(--bg); color: #9fb0dc; padding: 56px 0 28px; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 2fr; gap: 40px; }
.footer__brand .brand { color: #eaf0ff; margin-bottom: 12px; }
.footer__brand .brand strong { color: var(--brand-2); }
.footer__brand p { font-size: 14px; max-width: 280px; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__cols h4 { color: #eaf0ff; font-size: 14px; margin-bottom: 12px; }
.footer__cols a { display: block; font-size: 14px; padding: 4px 0; transition: color .15s ease; }
.footer__cols a:hover { color: #eaf0ff; }
.footer__bottom {
  margin-top: 40px; padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 13px; color: #6b7aa3;
}

/* ===================== BLOG ===================== */
.blog-head { padding-bottom: 32px; text-align: center; }
.blog-head h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 900; margin: 6px 0 14px; }
.blog-head p { color: var(--ink-soft); font-size: 18px; }

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  color: inherit;
  transition: transform .15s ease, box-shadow .2s ease;
}
a.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card__body { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.post-card__cat {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--brand);
  background: #eef1ff;
  padding: 4px 10px;
  border-radius: 999px;
}
.post-card h2 { font-size: 24px; font-weight: 800; }
.post-card h3 { font-size: 18px; font-weight: 700; }
.post-card p { color: var(--ink-soft); font-size: 15px; }
.post-card__meta { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }

.post-card--featured { flex-direction: row; margin-bottom: 48px; }
.post-card--featured .post-card__art { flex: 0 0 42%; }
.post-card--featured .post-card__body { justify-content: center; padding: 36px; }

.post-card__art {
  background: radial-gradient(120% 120% at 30% 20%, #1b2550, var(--bg));
  display: grid;
  place-items: center;
  padding: 28px;
  min-height: 220px;
  overflow: hidden;
}
.post-card__doc, .article__hero-doc {
  position: relative;
  width: 86%;
  max-width: 320px;
  aspect-ratio: 1.58 / 1;
  background: linear-gradient(135deg, #fdfdff, #e7ecf8);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,.4);
  transform: rotate(-4deg);
  overflow: hidden;
}
.post-card__doc small, .article__hero-doc small {
  position: absolute; top: 14px; left: 16px;
  font-size: 9px; font-weight: 800; letter-spacing: .04em; color: #1b2550;
}
.post-card__doc em, .article__hero-doc em {
  position: absolute; inset: -30% -10%;
  display: flex; align-items: center;
  font-style: normal; font-weight: 800; font-size: 12px;
  color: rgba(37,64,214,.22); letter-spacing: .06em; line-height: 2.4;
  transform: rotate(-26deg); word-spacing: 5px;
}

.post-card--soon { opacity: .92; padding: 24px; gap: 10px; }
.post-card--soon .post-card__cat { color: var(--ink-soft); background: var(--surface-2); }
.blog-soon-title { font-size: 18px; color: var(--ink-soft); margin: 8px 0 18px; font-weight: 700; }

/* ===================== ARTÍCULO ===================== */
.article { padding: 40px 0 80px; }
.breadcrumb { font-size: 13px; color: var(--ink-soft); margin-bottom: 24px; }
.breadcrumb a { color: var(--brand); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 4px; }

.article__head h1 { font-size: clamp(28px, 4.4vw, 44px); font-weight: 900; margin: 12px 0 14px; line-height: 1.12; }
.article__meta { color: var(--ink-soft); font-size: 14px; }

.article__hero {
  margin: 28px 0 8px;
  border-radius: var(--radius);
  background: radial-gradient(120% 140% at 70% 0%, #1b2550, var(--bg));
  display: grid; place-items: center;
  padding: 40px; min-height: 220px;
}
.article__hero-doc { transform: rotate(-3deg); }
.article__cover {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 28px 0 8px;
  box-shadow: var(--shadow);
  display: block;
}
.post-card__art--photo { padding: 0; min-height: 0; }
.post-card__art--photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card--featured .post-card__art--photo { aspect-ratio: auto; }

.article-body { font-size: 17.5px; line-height: 1.75; color: #2b3550; }
.article-body > p { margin: 18px 0; }
.article__lead { font-size: 20px; color: var(--ink); }
.article-body h2 { font-size: 26px; font-weight: 800; margin: 40px 0 12px; letter-spacing: -.02em; }
.article-body h3 { font-size: 19px; font-weight: 700; margin: 26px 0 8px; }
.article-body ul, .article-body ol { margin: 14px 0; padding-left: 22px; }
.article-body li { margin: 8px 0; }
.article-body a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--brand); }

.callout {
  background: #eef3ff;
  border-left: 4px solid var(--brand);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 28px 0;
  font-size: 16px;
}
.callout--cta {
  text-align: center;
  border-left: none;
  background: linear-gradient(135deg, #eef1ff, #e2f3ff);
  padding: 28px 24px;
}
.callout--cta p { margin-bottom: 16px; }

.article__rule { border: none; border-top: 1px solid var(--line); margin: 36px 0 20px; }
.article__note { font-size: 14px; color: var(--ink-soft); }
.article-body .faq__item { margin: 10px 0; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 940px) {
  .nav__links { display: none; }
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__art { order: -1; }
  .doc-card { max-width: 320px; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .app { grid-template-columns: 1fr; }
  .app__panel { order: 2; }
}
@media (max-width: 720px) {
  .section { padding: 60px 0; }
  .grid--3 { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .post-card--featured { flex-direction: column; }
  .post-card--featured .post-card__art { flex-basis: auto; min-height: 180px; }
  .post-card--featured .post-card__body { padding: 24px; }
  .article-body { font-size: 17px; }
}
@media (max-width: 480px) {
  .grid--4 { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
}
