/* Shared base for the 4 proposals. Each version sets its own tokens. */
:root {
  --cyan: #2fd3f5;
  --blue: #4f7dff;
  --violet: #8a3dff;
  --magenta: #d41cff;
  --lime: #b8ff2e;
  --ok: #16c96b;
  --warn: #ffb020;
  --bad: #ff4d6d;
  --ink: #0e0a1c;
  --grad: linear-gradient(120deg, var(--cyan), var(--blue) 35%, var(--violet) 65%, var(--magenta));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 24px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: "Inter Tight", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; background: var(--bg); color: var(--fg); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
section { scroll-margin-top: 0; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.serif { font-family: "Instrument Serif", serif; font-style: italic; font-weight: 400; }

/* Reveal */
.rv { opacity: 0; transform: translateY(36px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 24px; border-radius: 999px; font: 600 15px "Inter Tight", sans-serif; border: 0; cursor: pointer; transition: transform .4s var(--ease), box-shadow .4s, background .3s, color .3s; }
.btn:hover { transform: translateY(-2px); }
.btn-grad { background: var(--grad); background-size: 180% 100%; color: #fff; }
.btn-grad:hover { background-position: 100% 0; box-shadow: 0 14px 34px rgba(138,61,255,.4); }

/* ===== Gafete digital (shared component) ===== */
:root { --silhouette: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='40' r='19' fill='%23fff' fill-opacity='.92'/%3E%3Cpath d='M12 104c0-24 17-39 38-39s38 15 38 39z' fill='%23fff' fill-opacity='.92'/%3E%3C/svg%3E"); }
.badge-card {
  --w: 340px;
  position: relative; width: var(--w); max-width: 100%; aspect-ratio: 0.76; border-radius: 26px; padding: calc(var(--w) * .062);
  background: radial-gradient(120% 80% at 0% 0%, #2a1a52 0%, #120c24 55%, #0a0716 100%);
  color: #fff; overflow: hidden; display: flex; flex-direction: column; gap: calc(var(--w) * .045);
  box-shadow: 0 40px 90px rgba(14,10,28,.45), inset 0 0 0 1px rgba(255,255,255,.08);
  transform-style: preserve-3d; transition: transform .5s var(--ease); font-size: calc(var(--w) * .04);
}
.badge-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.badge-card .shine { position: absolute; inset: -50%; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.16) 48%, rgba(47,211,245,.14) 52%, transparent 60%); animation: shine 4.5s ease-in-out infinite; pointer-events: none; }
@keyframes shine { 0% { transform: translateX(-40%); } 60%, 100% { transform: translateX(40%); } }
.bc-top { display: flex; justify-content: space-between; align-items: center; }
.bc-top img { height: calc(var(--w) * .062); width: auto; }
.bc-status { font-size: .78em; font-weight: 700; letter-spacing: .08em; padding: .5em .8em; border-radius: 999px; background: rgba(22,201,107,.16); color: #4bf09a; display: inline-flex; gap: .45em; align-items: center; }
.bc-status::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.bc-body { display: flex; gap: calc(var(--w) * .045); align-items: center; }
.bc-photo { width: calc(var(--w) * .27); aspect-ratio: .82; border-radius: calc(var(--w) * .05); flex: none; font-size: 0; background: var(--silhouette) center bottom / 88% no-repeat, var(--grad); box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.bc-body strong { font-size: 1.45em; letter-spacing: -.02em; display: block; line-height: 1.1; }
.bc-body small { display: block; opacity: .65; font-size: .92em; margin-top: .3em; }
.bc-co { display: inline-block; margin-top: .6em; padding: .35em .7em; border-radius: .6em; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); font-weight: 700; font-size: .95em; }
.bc-foot { margin-top: auto; display: grid; grid-template-columns: 44% 1fr; gap: calc(var(--w) * .05); align-items: center; padding-top: calc(var(--w) * .045); border-top: 1px dashed rgba(255,255,255,.18); }
.bc-foot .qr { width: 100%; height: auto; aspect-ratio: 1; padding: 6%; border-radius: 12px; }
.bc-meta { display: grid; gap: .7em; }
.bc-meta small { display: block; font-size: .7em; letter-spacing: .08em; text-transform: uppercase; opacity: .55; }
.bc-meta b { font-size: 1em; }
.bc-meta em { font-style: normal; font-size: .78em; color: var(--cyan); font-weight: 600; }
.qr { width: 64px; height: 64px; background: #fff; border-radius: 10px; padding: 5px; }
.qr svg { width: 100%; height: 100%; display: block; }
.float { animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 0%,100% { translate: 0 0; } 50% { translate: 0 -14px; } }

/* ===== Trazo de polígrafo (hero) ===== */
canvas.trace { position: absolute; left: 0; width: 100%; pointer-events: none; z-index: 0; }

/* ===== Verificador (shared component) ===== */
.verify { display: flex; gap: 10px; flex-wrap: wrap; }
.verify input { flex: 1; min-width: 180px; font: 500 17px "Inter Tight", sans-serif; padding: 16px 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); text-transform: uppercase; letter-spacing: .04em; }
.verify input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(138,61,255,.18); }
.verify-hint { font-size: 13px; color: var(--muted); margin-top: 12px; }
.verify-hint button { font: inherit; background: none; border: 0; color: var(--violet); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.vr { margin-top: 20px; min-height: 96px; }
.vr-card { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); animation: pop .5s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.vr-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; font-weight: 800; color: #fff; flex: none; }
.vr-card strong { display: block; font-size: 17px; }
.vr-card small { color: var(--muted); font-size: 14px; }
.vr-ok .vr-icon { background: var(--ok); } .vr-warn .vr-icon { background: var(--warn); } .vr-bad .vr-icon { background: var(--bad); }
.vr-loading { display: flex; gap: 8px; padding: 30px 20px; }
.vr-loading i { width: 10px; height: 10px; border-radius: 50%; background: var(--violet); animation: dots .9s infinite; }
.vr-loading i:nth-child(2) { animation-delay: .15s; } .vr-loading i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 50% { transform: translateY(-8px); opacity: .4; } }

/* Demo tag */
.demo-flag { position: fixed; left: 16px; bottom: 16px; z-index: 90; font: 600 12px "Inter Tight", sans-serif; padding: 8px 12px; border-radius: 999px; background: #0e0a1c; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.demo-flag b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.embed .demo-flag { display: none; }

@media (max-width: 700px) {
  .wrap { padding: 0 16px; }
  .badge-card { --w: 290px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .rv { opacity: 1; transform: none; }
}

/* ===== Pasos apilados (sticky stacking cards) ===== */
.stack { display: grid; gap: 28px; padding-bottom: 40px; }
.scard {
  position: sticky; top: var(--stack-top, 100px);
  border-radius: 32px; padding: 30px; background: var(--sc-bg, #fff); color: var(--sc-fg, var(--fg));
  border: 1px solid var(--sc-line, transparent);
  box-shadow: 0 -12px 60px rgba(14,10,28,.1);
  transform-origin: top center; will-change: transform;
}
.scard:nth-child(2) { top: calc(var(--stack-top, 100px) + 20px); }
.scard:nth-child(3) { top: calc(var(--stack-top, 100px) + 40px); }
.scard:nth-child(4) { top: calc(var(--stack-top, 100px) + 60px); }
.sc-info { display: flex; gap: 32px; align-items: flex-start; margin-bottom: 26px; }
.sc-n { font-size: 88px; font-weight: 800; font-style: italic; line-height: .85; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1.5px var(--g1); flex: none; }
.sc-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.sc-chips span { padding: 6px 12px; border-radius: 999px; font-size: 13px; background: var(--chip-bg, rgba(14,10,28,.06)); }
.scard h3 { font-size: clamp(26px, 3vw, 40px); letter-spacing: -.035em; margin: 12px 0 8px; font-weight: 700; }
.scard p { color: var(--sc-muted, var(--muted)); max-width: 560px; line-height: 1.5; }
.sc-art {
  position: relative; height: clamp(280px, 40vw, 480px); border-radius: 24px; overflow: hidden;
  background: linear-gradient(135deg, var(--g1), var(--g2)); display: grid; place-items: center;
}
.sc-art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 25% 15%, rgba(255,255,255,.35), transparent 50%); pointer-events: none; }
.sc-art > * { position: relative; z-index: 1; }

/* Art 1: carga de candidatos */
.a-win { width: min(560px, 82%); border-radius: 18px; background: rgba(255,255,255,.92); box-shadow: 0 40px 80px rgba(14,10,28,.3); padding: 18px; color: #0e0a1c; display: grid; gap: 10px; animation: floaty 6s ease-in-out infinite; }
.a-win-top { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 15px; }
.a-win-top em { font-style: normal; font-size: 12px; padding: 6px 10px; border-radius: 8px; background: #0e0a1c; color: #fff; }
.a-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: #f4f2fa; font-size: 14px; opacity: 0; transform: translateX(-24px); transition: all .6s var(--ease); }
.a-row i { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); flex: none; }
.a-row span { flex: 1; } .a-row small { color: #6b6679; }
.scard.seen .a-row { opacity: 1; transform: none; }
.scard.seen .a-row:nth-child(3) { transition-delay: .25s; } .scard.seen .a-row:nth-child(4) { transition-delay: .5s; } .scard.seen .a-row:nth-child(5) { transition-delay: .75s; }
.a-prog { height: 8px; border-radius: 4px; background: #ebe8f5; overflow: hidden; }
.a-prog b { display: block; height: 100%; width: 0; background: var(--grad); transition: width 2s var(--ease) .3s; }
.scard.seen .a-prog b { width: 100%; }

/* Art 2: calendario */
.a-cal { width: min(420px, 70%); background: #fff; color: #0e0a1c; border-radius: 20px; padding: 20px; box-shadow: 0 40px 80px rgba(14,10,28,.3); transform: rotate(-4deg); }
.a-cal-h { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 14px; }
.a-cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.a-cal-g i { aspect-ratio: 1; border-radius: 8px; background: #f4f2fa; font-style: normal; font-size: 12px; display: grid; place-items: center; color: #6b6679; }
.a-cal-g i.on { background: var(--grad); color: #fff; font-weight: 700; animation: pulse 1.6s infinite; }
.a-cal-g i.bk { background: #e2ddf3; }
.a-appt { position: absolute !important; right: 8%; bottom: 12%; background: #0e0a1c; color: #fff; padding: 14px 18px; border-radius: 16px; font-size: 14px; box-shadow: 0 20px 40px rgba(14,10,28,.35); opacity: 0; transform: translateY(20px); transition: all .7s var(--ease) .6s; }
.a-appt b { display: block; font-size: 16px; } .a-appt small { opacity: .7; }
.scard.seen .a-appt { opacity: 1; transform: none; }

/* Art 3: evaluación psicológica */
.a-eval { width: min(440px, 76%); background: #fff; color: #0e0a1c; border-radius: 20px; padding: 22px; box-shadow: 0 40px 80px rgba(14,10,28,.3); display: grid; gap: 12px; }
.a-eval-h { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #ebe8f5; }
.a-eval-h i { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); }
.a-eval-h b { display: block; } .a-eval-h small { color: #6b6679; font-size: 13px; }
.a-chk { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.a-chk::before { content: ""; width: 22px; height: 22px; border-radius: 7px; border: 2px solid #d8d3ea; flex: none; transition: all .4s; }
.scard.seen .a-chk::before { content: "✓"; background: var(--ok); border-color: var(--ok); color: #fff; font-size: 13px; display: grid; place-items: center; }
.scard.seen .a-chk:nth-of-type(2)::before { transition-delay: .4s; } .scard.seen .a-chk:nth-of-type(3)::before { transition-delay: .8s; } .scard.seen .a-chk:nth-of-type(4)::before { transition-delay: 1.2s; }
.a-verdict { margin-top: 4px; padding: 12px; border-radius: 12px; text-align: center; font-weight: 800; letter-spacing: .08em; background: rgba(22,201,107,.12); color: #0f9d55; opacity: 0; transform: scale(1.4); transition: all .5s cubic-bezier(.5,1.8,.5,1) 1.7s; }
.scard.seen .a-verdict { opacity: 1; transform: none; }

/* Art 4: gafete emitido */
.sc-art .badge-card { --w: 270px; animation: floaty 6s ease-in-out infinite; }
.a-stamp { position: absolute !important; right: 14%; top: 14%; padding: 10px 16px; border: 3px solid #fff; color: #fff; border-radius: 12px; font-weight: 800; letter-spacing: .08em; transform: rotate(-12deg) scale(2); opacity: 0; }
.scard.seen .a-stamp { animation: stampIn .6s cubic-bezier(.5,1.8,.5,1) .5s forwards; }
@keyframes stampIn { to { transform: rotate(-12deg) scale(1); opacity: 1; } }

@media (max-width: 700px) {
  .scard { padding: 18px; border-radius: 24px; }
  .sc-info { flex-direction: column; gap: 6px; }
  .sc-n { font-size: 56px; }
  .a-appt, .a-stamp { display: none; }
}

/* ===== Tipos de evaluación ===== */
.ev-head { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.ev-k { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--violet); }
.ev-head p { color: var(--muted); font-size: 18px; line-height: 1.5; margin-top: 16px; }
.ev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ev-card { position: relative; border-radius: 28px; padding: 32px; background: var(--surface); border: 1px solid var(--line); color: var(--fg); }
.ev-card h3 { font-size: 30px; letter-spacing: -.035em; margin: 14px 0 8px; }
.ev-card > p { color: var(--muted); line-height: 1.5; margin-bottom: 22px; }
.ev-tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: rgba(138,61,255,.12); color: var(--violet); }
.ev-int { background: radial-gradient(120% 90% at 100% 0%, #2a1a52, #120c24 60%); color: #fff; border-color: transparent; --muted: rgba(255,255,255,.68); }
.ev-int::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.ev-int .ev-tag { background: var(--lime); color: var(--ink); }
.ev-list { list-style: none; display: grid; gap: 10px; }
.ev-list li { display: flex; gap: 12px; align-items: center; font-size: 16px; }
.ev-list li::before { content: "✓"; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--ok); color: #fff; }
.ev-list li.no { opacity: .4; text-decoration: line-through; }
.ev-list li.no::before { content: "–"; background: rgba(128,128,128,.25); color: inherit; }
.ev-levels { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.ev-levels div { padding: 22px 24px 22px 28px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; color: var(--fg); }
.ev-levels div::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--grad); }
.ev-levels b { display: block; font-size: 19px; margin-bottom: 4px; }
.ev-levels span { color: var(--muted); }
.ev-note { text-align: center; color: var(--muted); font-size: 14px; margin-top: 26px; }
@media (max-width: 760px) { .ev-grid, .ev-levels { grid-template-columns: 1fr; } .ev-card { padding: 24px; } }
