/* =============================================================
   diagnostico-pla.css
   Briasco Legal — Diagnóstico gratuito de cumplimiento PLA/FT
   Se usa tanto en diagnostico-pla.html como en gracias-diagnostico.html
   ============================================================= */

/* -------------------------------------------------------------
   1) TOKENS DE MARCA — extraídos de briascolegal.html (sitio real)
   Esta landing hereda la identidad visual existente. Si la marca
   cambia en el futuro, este es el único bloque a tocar.
   ------------------------------------------------------------- */
:root {
  /* Color — nombres genéricos (--color-ink/--color-seal) mapeados
     1:1 a la paleta real del sitio, para que el resto del archivo
     no necesite volver a tocarse si la marca cambia de nuevo. */
  --color-ink: #0d1b2a;          /* = --navy del sitio real */
  --color-ink-soft: #1a2b3c;     /* = --navy-mid */
  --color-seal: #ae0033;         /* = --crimson (acento/CTA principal) */
  --color-seal-soft: #9a0932;    /* = --crimson-d (hover) */
  --color-seal-light: #d4617a;   /* acento claro sobre fondos oscuros (logo, íconos) */
  --color-paper: #efebec;        /* = --cream-lt (fondo general del body) */
  --color-paper-alt: #f5f0ee;    /* = --cream (fondo alterno de secciones) */
  --color-line: #e2dddb;         /* = --line */
  --color-text: #4d4543;         /* = --body */
  --color-text-muted: #7a706e;   /* = --gray */
  --color-alert: #a9662c;        /* aspectos a revisar (no es "error", es neutro) */
  --color-error: #dc2626;        /* mismo rojo de error que ya usa el sitio (bdel) */
  --color-focus: #1d5fae;

  /* Tipografía — igual que el sitio real (Google Fonts, con swap) */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  /* Escala tipográfica */
  --fs-h1: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  --fs-h2: clamp(1.4rem, 1.15rem + 1vw, 1.9rem);
  --fs-h3: 1.15rem;
  --fs-body: 1.0625rem;
  --fs-small: 0.9rem;

  /* Layout */
  --radius: 4px;               /* mismo radio de 4px que .btn/.nav-cta del sitio real */
  --max-width: 760px;
  --gap-section: clamp(3rem, 2rem + 4vw, 6rem);
  --shadow-none: none;
}

/* -------------------------------------------------------------
   2) RESET MÍNIMO
   ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-paper);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-seal); }
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--color-ink);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 1em; max-width: 65ch; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container--wide { max-width: 1040px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

/* -------------------------------------------------------------
   3) HEADER / FOOTER
   Replica el nav/footer oscuro del sitio real (mismo logo,
   mismo tono navy con blur). Si el header/footor del sitio
   cambia de estructura, ajustar acá.
   ------------------------------------------------------------- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 27, 42, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(174, 0, 51, 0.3);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  max-width: 1040px;
  margin: 0 auto;
}
.site-header__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  text-decoration: none;
}
.site-header__logo span { color: #c94060; }
.site-header__contact {
  font-size: var(--fs-small);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.site-header__contact:hover { color: #fff; }

#site-footer {
  background: var(--color-ink);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 2rem 1.25rem;
  color: rgba(255, 255, 255, 0.38);
  font-size: var(--fs-small);
}
.site-footer__inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}
.site-footer__inner a { color: rgba(255, 255, 255, 0.38); text-decoration: none; }
.site-footer__inner a:hover { color: var(--color-seal-light); }

/* -------------------------------------------------------------
   4) HERO
   ------------------------------------------------------------- */
.hero {
  background: var(--color-ink);
  padding: clamp(2.5rem, 2rem + 3vw, 5rem) 1.25rem clamp(2rem, 1.5rem + 2vw, 3.5rem);
}
.hero__inner { max-width: 760px; margin: 0 auto; text-align: left; }
.hero__eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-seal-light);
  background: rgba(174, 0, 51, 0.15);
  border: 1px solid rgba(174, 0, 51, 0.38);
  border-radius: 20px;
  padding: 0.35rem 1rem;
  margin-bottom: 1.5rem;
}
.hero h1 { color: #fff; }
.hero__subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.6);
  max-width: 56ch;
}
.hero__scope {
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  margin-top: 1.5rem;
  max-width: 60ch;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  padding: 0.95rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 48px; /* objetivo táctil cómodo */
}
.btn-primary {
  background: var(--color-seal);
  color: #fff;
}
.btn-primary:hover { background: var(--color-seal-soft); }
.btn-secondary {
  background: transparent;
  border-color: var(--color-ink);
  color: var(--color-ink);
}
.btn-secondary:hover { background: var(--color-paper-alt); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.hero__cta-row { margin: 1.75rem 0 1.25rem; }

.hero__benefits {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 0;
  margin: 0 0 1.5rem;
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}
.hero__benefits li::before { content: '✓'; color: var(--color-seal-light); margin-right: 0.4em; }

/* -------------------------------------------------------------
   5) SECCIÓN "QUÉ ANALIZA"
   ------------------------------------------------------------- */
.section {
  padding: var(--gap-section) 1.25rem;
  border-top: 1px solid var(--color-line);
}
.section--alt { background: var(--color-paper-alt); }
.section__intro { max-width: 620px; }
.section__disclaimer {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  font-style: italic;
}

.checklist {
  list-style: none;
  margin: 2rem auto 0;
  padding: 0;
  max-width: 1040px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  border-top: 1px solid var(--color-line);
  border-left: 1px solid var(--color-line);
}
.checklist li {
  padding: 1rem 1.25rem;
  border-right: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  font-size: 0.98rem;
}
.checklist li::before { content: '— '; color: var(--color-seal); }

/* -------------------------------------------------------------
   6) CÓMO FUNCIONA (secuencia real → numeración justificada)
   ------------------------------------------------------------- */
.steps-list {
  list-style: none;
  margin: 2rem auto 0;
  padding: 0;
  max-width: 1040px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.steps-list__number {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--color-seal);
  display: block;
  margin-bottom: 0.4rem;
}
.steps-list h3 { margin-bottom: 0.4rem; }
.steps-list p { font-size: var(--fs-small); color: var(--color-text-muted); }

/* -------------------------------------------------------------
   7) FORMULARIO MULTIPASO
   ------------------------------------------------------------- */
.form-shell {
  max-width: 620px;
  margin: 2rem auto 0;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem);
}

.progress-track {
  height: 6px;
  background: var(--color-paper-alt);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.6rem;
}
.progress-track__fill {
  height: 100%;
  width: 0%;
  background: var(--color-seal);
  transition: width 0.25s ease;
}
.progress-label {
  display: block;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.step-title { margin-bottom: 0.5rem; }
.question-help {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  margin-top: -0.4rem;
}

.question-block {
  border: none;
  padding: 0;
  margin: 0 0 1.75rem;
}
.question-block legend,
.question-block > label:first-child {
  font-weight: 600;
  margin-bottom: 0.6rem;
  display: block;
  color: var(--color-text);
}

.options-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.option-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  cursor: pointer;
  min-height: 48px;
}
.option-card:has(input:checked),
.option-card.is-checked {
  border-color: var(--color-seal);
  background: color-mix(in srgb, var(--color-seal) 6%, #fff);
}
.option-card input { margin-top: 0.2rem; width: 18px; height: 18px; flex-shrink: 0; }
.option-card--checkbox { align-items: flex-start; }

.text-input {
  width: 100%;
  font: inherit;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  min-height: 48px;
}
.text-input:invalid:not(:placeholder-shown) { border-color: var(--color-error); }

.field-error {
  color: var(--color-error);
  font-size: var(--fs-small);
  margin-top: 0.4rem;
}

/* Honeypot anti-spam: oculto de forma accesible (no display:none) */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--color-line);
  padding-top: 1.5rem;
}
.form-nav .btn { flex: 1; }
.form-nav .btn:only-child { flex: 0 0 auto; margin-left: auto; }

.form-footnote {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  margin-top: 1rem;
}

/* -------------------------------------------------------------
   8) PÁGINA DE AGRADECIMIENTO / RESULTADO
   ------------------------------------------------------------- */
.result-card {
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 2rem;
  background: #fff;
  max-width: 620px;
  margin: 2rem auto 0;
}
.result-card__level {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--color-seal);
  margin-bottom: 0.25rem;
}
.result-card__disclaimer {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-line);
  padding-top: 1rem;
  margin-top: 1.25rem;
}
.result-cta {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* -------------------------------------------------------------
   9) RESPONSIVE — mobile-first ya cubierto arriba con clamp()/grid.
   Ajustes puntuales para pantallas grandes.
   ------------------------------------------------------------- */
@media (min-width: 720px) {
  .form-nav .btn { flex: 0 0 auto; min-width: 160px; }
}
