/* ATS — Diagnóstico web. Fuentes locales (sin terceros). */
@font-face { font-family: "Open Sans"; font-weight: 300; font-display: swap; src: url("/assets/fonts/open-sans-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 400; font-display: swap; src: url("/assets/fonts/open-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 600; font-display: swap; src: url("/assets/fonts/open-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 700; font-display: swap; src: url("/assets/fonts/open-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  --ink: #111111;
  --text: #2b2b2b;
  --muted: #666a70;
  --line: #dcdfe3;
  --bg: #ffffff;
  --bg-alt: #f2f3f5;
  --brand-gray: #e6e6e6;
  --blue: #1e78e6;
  --blue-dark: #155fbd;
  --blue-soft: #e8f1fd;
  --good: #0a8f4f;
  --mid: #b86e00;
  --bad: #c62828;
  --radius: 10px;
  --shadow: 0 20px 50px -24px rgba(17, 17, 17, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Open Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---------- Topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 68px; }
.brand { display: block; width: 190px; flex-shrink: 1; min-width: 130px; }
.logo { width: 100%; height: auto; }
.logo__dark { stroke: var(--ink); }
.logo__blue { stroke: var(--blue); }
.logo__ats { font: 300 24px "Open Sans", sans-serif; fill: var(--ink); letter-spacing: 1px; }
.logo__sep { stroke: #c8c8c8; stroke-width: 1.5; }
.logo__word { font: 300 50px "Open Sans", sans-serif; fill: var(--ink); letter-spacing: 3px; }
.logo__tag { font: 400 13.4px "Open Sans", sans-serif; fill: var(--blue); letter-spacing: 6.1px; }
.topbar__nav { display: flex; align-items: center; gap: 16px; }
.topbar__link { color: var(--ink); text-decoration: none; font-size: 14px; display: none; }
.topbar__link:hover { color: var(--blue); }
@media (min-width: 600px) { .topbar__link { display: inline; } }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--bg-alt); }
.lang__btn { border: 0; background: transparent; font: 600 13px "Open Sans", sans-serif; color: var(--muted); padding: 6px 12px; border-radius: 999px; cursor: pointer; min-width: 44px; min-height: 32px; }
.lang__btn[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--bg-alt) 0%, #fff 100%); padding: 40px 0 56px; }
.hero__grid { display: grid; gap: 40px; align-items: start; }
@media (min-width: 980px) { .hero__grid { grid-template-columns: 1.05fr .95fr; gap: 56px; padding-top: 24px; } }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--blue); margin-bottom: 14px; }
.eyebrow--light { color: #5aa2f5; }
h1 { font-weight: 300; font-size: clamp(32px, 5.2vw, 52px); letter-spacing: -.01em; margin-bottom: 18px; }
.lead { font-size: 18px; color: var(--muted); max-width: 560px; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; color: var(--ink); }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--blue-soft); }
.checks li::after { content: ""; position: absolute; left: 6px; top: 8px; width: 6px; height: 9px; border: solid var(--blue); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* Vista previa del informe */
.preview { margin: 32px 0 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); max-width: 520px; }
.preview__head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; font-size: 12px; }
.preview__label { color: var(--blue); font-weight: 600; letter-spacing: .18em; }
.preview__url { color: var(--muted); }
.preview__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gauge { text-align: center; }
.gauge span { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 6px; border-radius: 50%; border: 4px solid currentColor; font-weight: 700; font-size: 16px; }
.gauge small { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; }
.gauge--good { color: var(--good); }
.gauge--mid { color: var(--mid); }
.gauge--bad { color: var(--bad); }
.preview__finding { margin-top: 16px; display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--ink); background: var(--bg-alt); border-radius: 8px; padding: 10px 12px; }
.preview__cap { margin-top: 10px; font-size: 11px; color: var(--muted); text-align: right; }
.tag { font-size: 10px; font-weight: 700; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px; flex-shrink: 0; }
.tag--bad { background: #fde7e7; color: var(--bad); }
@media (max-width: 979px) { .preview { display: none; } }

/* ---------- Tarjeta del formulario ---------- */
.card { position: relative; background: #fff; border-radius: var(--radius); padding: 30px 22px; box-shadow: var(--shadow); border: 1px solid var(--line); }
@media (min-width: 720px) { .card { padding: 38px 36px; } }
.corner { position: absolute; width: 26px; height: 26px; border: 0 solid var(--ink); }
.corner--tl { top: -1px; left: -1px; border-top-width: 4px; border-left-width: 4px; border-top-left-radius: var(--radius); }
.corner--tr { top: -1px; right: -1px; border-top-width: 4px; border-right-width: 4px; border-top-right-radius: var(--radius); }
.corner--bl { bottom: -1px; left: -1px; border-bottom-width: 4px; border-left-width: 4px; border-color: var(--blue); border-bottom-left-radius: var(--radius); }
.corner--br { bottom: -1px; right: -1px; border-bottom-width: 4px; border-right-width: 4px; border-color: var(--blue); border-bottom-right-radius: var(--radius); }
.card__title { font-weight: 300; font-size: 28px; }
.card__sub { color: var(--muted); font-size: 14px; margin: 6px 0 22px; }

.row2 { display: grid; gap: 0 14px; }
@media (min-width: 520px) { .row2 { grid-template-columns: 1fr 1fr; } }
.field { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; padding: 0; }
.field input[type="text"], .field input[type="email"], .field select {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  border: 1px solid #c9cdd2; border-radius: 8px; padding: 11px 12px; background: #fff; min-height: 46px;
  transition: border-color .15s, box-shadow .15s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,120,230,.18); }
.field.is-invalid input, .field.is-invalid select { border-color: var(--bad); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.err { font-size: 13px; color: var(--bad); margin-top: 5px; min-height: 0; }
.err:empty { display: none; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg__opt { position: relative; margin: 0 !important; }
.seg__opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg__opt span { display: block; text-align: center; border: 1px solid #c9cdd2; border-radius: 8px; padding: 10px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.seg__opt input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.seg__opt input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }

.field--check { margin-top: 4px; }
.check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: 13.5px !important; color: var(--text) !important; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--blue); }

.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile { min-height: 65px; margin: 6px 0 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; font: 600 16px "Open Sans", sans-serif; border: 0; border-radius: 8px; padding: 15px 20px; cursor: pointer; text-decoration: none; transition: background .15s, transform .05s; min-height: 50px; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); }
.btn--primary[disabled] { opacity: .7; cursor: progress; }
.btn--dark { background: var(--ink); color: #fff; margin-top: 18px; }
.btn--dark:hover { background: #333; }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; display: none; animation: spin .8s linear infinite; }
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.fine { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 12px; }

.state { text-align: center; padding: 20px 4px; outline: none; }
.state h2 { font-weight: 300; font-size: 26px; margin: 14px 0 10px; }
.state p { color: var(--muted); }
.state__icon { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; position: relative; }
.state__icon--ok { background: #e3f5ec; }
.state__icon--ok::after { content: ""; position: absolute; left: 24px; top: 15px; width: 14px; height: 26px; border: solid var(--good); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.state__icon--info { background: var(--blue-soft); }
.state__icon--info::after { content: "i"; position: absolute; inset: 0; display: grid; place-items: center; font: 700 28px Georgia, serif; color: var(--blue); }
.contact-mini { display: grid; gap: 10px; margin-top: 18px; }
@media (min-width: 480px) { .contact-mini { grid-template-columns: 1fr 1fr; } }
.contact-mini__item { display: block; border: 1px solid var(--line); border-radius: 8px; padding: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
.contact-mini__item small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }

/* ---------- Secciones ---------- */
.section { padding: 64px 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--ink); color: #d6d6d6; }
.h2 { font-weight: 300; font-size: clamp(26px, 3.6vw, 36px); margin-bottom: 32px; max-width: 720px; }
.h2--light { color: #fff; margin-bottom: 12px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.step { border-top: 3px solid var(--ink); padding-top: 18px; }
.step:last-child { border-top-color: var(--blue); }
.step__n { font-weight: 300; font-size: 34px; color: var(--blue); }
.step h3 { font-weight: 600; font-size: 18px; margin: 6px 0 8px; }
.step p { color: var(--muted); }

.pillars { display: grid; gap: 16px; }
@media (min-width: 640px) { .pillars { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .pillars { grid-template-columns: repeat(4, 1fr); } }
.pillar { background: #fff; border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); position: relative; }
.pillar::before { content: ""; position: absolute; left: 24px; top: 0; width: 34px; height: 3px; background: var(--blue); }
.pillar h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.pillar p { color: var(--muted); font-size: 15px; }

.contact { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .contact { grid-template-columns: 1fr 1.1fr; } }
.contact__text { color: #bdbdbd; }
.contact__grid { display: grid; gap: 12px; }
@media (min-width: 520px) { .contact__grid { grid-template-columns: 1fr 1fr; } }
.contact__item { display: block; border: 1px solid #333; border-radius: 8px; padding: 16px 18px; color: #fff; text-decoration: none; transition: border-color .15s; }
a.contact__item:hover { border-color: var(--blue); }
.contact__item small { display: block; color: #5aa2f5; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 2px; }
.contact__item strong { font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }

.footer { background: #0a0a0a; color: #8a8a8a; font-size: 13px; padding: 20px 0; }
.footer__in { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.footer a { color: #bdbdbd; }


/* Aviso legal bajo el formulario */
.legal { font-size: 11.5px; line-height: 1.5; color: var(--muted); margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.legal strong { color: var(--ink); font-weight: 600; }

/* Progreso del diagnóstico */
.loader { width: 64px; height: 64px; margin: 0 auto; position: relative; }
.loader::before, .loader::after { content: ""; position: absolute; width: 22px; height: 22px; border: 0 solid var(--ink); animation: pulse 1.6s ease-in-out infinite; }
.loader::before { top: 0; left: 0; border-top-width: 4px; border-left-width: 4px; }
.loader::after { bottom: 0; right: 0; border-bottom-width: 4px; border-right-width: 4px; border-color: var(--blue); animation-delay: .8s; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.85); } }
.progress { list-style: none; padding: 0; margin: 22px auto 0; text-align: left; display: grid; gap: 10px; max-width: 380px; }
.progress li { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 14.5px; }
.progress li::before { content: ""; flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); box-sizing: border-box; }
.progress li.is-active { color: var(--ink); font-weight: 600; }
.progress li.is-active::before { border-color: var(--blue); border-top-color: transparent; animation: spin .9s linear infinite; }
.progress li.is-done { color: var(--ink); }
.progress li.is-done::before { background: var(--blue); border-color: var(--blue); box-shadow: inset 0 0 0 3px #fff; }
.note { margin-top: 18px; font-size: 13.5px; color: var(--mid) !important; background: #fff3dc; border-radius: 8px; padding: 10px 12px; }

/* Informe listo */
.actions { display: grid; gap: 10px; margin-top: 20px; }
@media (min-width: 480px) { .actions { grid-template-columns: 1fr 1fr; } }
.btn--outline { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.btn--outline:hover { background: var(--bg-alt); }
.cta-box { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.cta-box > p { color: var(--ink) !important; font-size: 15px; }

/* Página de privacidad */
.doc { padding: 48px 0 64px; }
.doc h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 20px; }
.doc h2 { font-size: 20px; font-weight: 600; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--text); max-width: 760px; }
.doc ul { padding-left: 20px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
#btn-retry { margin-top: 18px; }
