/* AbogadosParaAccidentados.com — single stylesheet. Bump ?v=N on every edit. */

@font-face {
  font-family: 'Archivo';
  src: url('/public/fonts/archivo-latin-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/public/fonts/archivo-latin-800.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
}

:root {
  --azul: #10294a;
  --azul-2: #1b3a63;
  --fondo: #eef2f7;
  --carta: #ffffff;
  --ambar: #f59e0b;
  --ambar-claro: #fbbf24;
  --ambar-tinte: #fff7e8;
  --verde: #157f3d;
  --tinta: #22303f;
  --gris: #64748b;
  --linea: #d7dee8;
  --rojo: #b42318;
  --focus: #2563eb;
  --font-head: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 17px; line-height: 1.55;
  color: var(--tinta);
  background: var(--fondo) linear-gradient(180deg, #f5f8fc 0%, #e9eff7 55%, #e3ebf5 100%);
  min-height: 100vh;
}
img, svg { display: inline-block; vertical-align: middle; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }

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

/* ---------- header ---------- */
.site-header { background: #0c2039; color: #fff; }
.site-header .wrap {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; min-height: 56px; padding-top: 10px; padding-bottom: 10px;
}
.wordmark {
  font-family: var(--font-head); font-weight: 800; font-size: 17px;
  letter-spacing: .01em; white-space: nowrap;
  color: #fff; text-decoration: none;
}
.wordmark em { font-style: normal; color: var(--ambar-claro); }
.hero-phone {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  margin-top: 16px; padding: 12px 38px;
  color: #fff; text-decoration: none; text-align: center; line-height: 1.3;
  background: linear-gradient(180deg, #f0524f 0%, #dc2626 55%, #c81e1e 100%);
  border: 0; border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 4px 14px rgba(200, 30, 30, .4);
}
.hp-num { font-family: var(--font-head); font-weight: 800; font-size: 21px; }
.hp-sub {
  font-size: 9px; font-weight: 600; letter-spacing: .02em;
  text-transform: uppercase; opacity: .92; margin-top: 1px; white-space: nowrap;
}
.hero-phone:hover { filter: brightness(1.06); }
.hero-phone:active { transform: scale(.98); }
@media (prefers-reduced-motion: reduce) { .hero-phone:active { transform: none; } }

/* breathing glow + occasional ring shake (stills completely under reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .hero-phone { animation: heroGlow 3.2s ease-in-out infinite; }
}
@keyframes heroGlow {
  0%, 100% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 4px 14px rgba(200, 30, 30, .35);
    filter: brightness(1);
  }
  50% {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 4px 30px rgba(239, 68, 68, .8);
    filter: brightness(1.13);
  }
}

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(180deg, #0c2039 0%, var(--azul) 45%, var(--azul-2) 100%);
  color: #fff; padding: 26px 0 88px; text-align: center;
  position: relative; overflow: hidden;
}
/* animated road-lines texture, sitting under a navy scrim so copy stays readable */
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .4; z-index: 0; pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(12, 32, 57, .78) 0%, rgba(16, 41, 74, .55) 45%, rgba(27, 58, 99, .82) 100%);
}
.hero .wrap { position: relative; z-index: 2; }
@media (prefers-reduced-motion: reduce) { .hero-bg { display: none; } }
.hero h1 {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(25px, 6vw, 36px); line-height: 1.18;
  max-width: 560px; margin: 0 auto;
  background: linear-gradient(180deg, #ffffff 35%, #e7edf6 100%);
  -webkit-background-clip: text; background-clip: text;
  color: #fff; -webkit-text-fill-color: transparent;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(180deg, #fcd34d 30%, #f6a913 100%);
  -webkit-background-clip: text; background-clip: text;
  color: var(--ambar-claro); -webkit-text-fill-color: transparent;
}
.badges {
  margin-top: 14px; font-weight: 600; font-size: 15px; color: #dbe4f0;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 20px;
}
.badges span { display: inline-flex; align-items: center; gap: 6px; }
.badges .ck { width: 17px; height: 17px; color: #4ade80; flex: 0 0 17px; }
.hero .sub { margin: 12px auto 0; max-width: 520px; font-size: 16px; color: #c6d2e2; }
.hero .sub strong { color: #fff; }
/* hand-drawn "pencil" underline: two layered wavy strokes stretched under the text */
.u-amber {
  text-decoration: none;
  padding-bottom: 7px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M3 6.5 Q 20 3.5 45 6 T 88 5.5 T 117 6' fill='none' stroke='%23fbbf24' stroke-width='3.4' stroke-linecap='round' opacity='.95'/%3E%3Cpath d='M6 9.5 Q 35 7 68 8.5 T 115 8' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' opacity='.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 9px;
}
.hero .prompt { margin-top: 10px; font-weight: 600; font-size: 16px; color: #fff; }

/* ---------- quiz card ---------- */
.quiz-wrap { padding: 0 16px 48px; position: relative; z-index: 3; }
.quiz-card {
  max-width: 560px; margin: -64px auto 0; background: var(--carta);
  border-radius: 16px; box-shadow: 0 10px 40px rgba(16, 41, 74, .14);
  padding: 22px 20px 26px; position: relative;
}
@media (min-width: 600px) { .quiz-card { padding: 28px 32px 32px; } }

.progress-text {
  font-size: 13px; font-weight: 600; color: var(--gris); margin-bottom: 6px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
}
.cheer { color: var(--verde); }
.bar { height: 6px; background: #e6ebf2; border-radius: 3px; overflow: hidden; }
.bar-fill {
  height: 100%; border-radius: 3px; transition: width .25s ease;
  background: linear-gradient(180deg, #25ad5c 0%, #117a3a 100%);
}

fieldset { border: 0; }
.q {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(19px, 4.6vw, 22px); line-height: 1.3;
  color: var(--azul); padding: 18px 0 4px; display: block; width: 100%;
}
.q:focus-visible { outline: none; }
.hint { font-size: 14px; color: var(--gris); margin-bottom: 6px; }

.opts { display: grid; gap: 10px; margin-top: 12px; }
.opt {
  position: relative; display: flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 12px 14px; cursor: pointer;
  border: 1.5px solid var(--linea); border-radius: 12px;
  font-weight: 600; font-size: 15px; color: var(--tinta); background: #fff;
  transition: border-color .12s ease, background-color .12s ease;
}
.opt:hover { border-color: var(--azul-2); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
/* "click your answer" affordance: an empty circle that fills with a check when selected */
.opt::before {
  content: ''; flex: 0 0 22px; width: 22px; height: 22px;
  border: 2px solid #b6c2d2; border-radius: 50%; background: #fff;
  transition: border-color .12s ease, background-color .12s ease;
}
.opt:hover::before { border-color: var(--azul-2); }
.opt:has(input:checked)::before {
  border-color: var(--verde);
  background-color: var(--verde);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4L16 6' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #25ad5c 0%, #117a3a 100%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px, 100% 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
.opt .oi { width: 20px; height: 20px; flex: 0 0 20px; color: var(--azul-2); }
.opt strong { font-weight: 700; }
.opt:has(input:checked) { background: var(--ambar-tinte); border: 2px solid var(--azul); padding: 11.5px 13.5px; }
.opt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (hover: none) { .opt:hover { border-color: var(--linea); } }

.back {
  margin-top: 18px; background: none; border: 0; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--gris); padding: 8px 10px 8px 0;
}
.back:hover { color: var(--azul); }

/* JS-driven step visibility; without JS everything stacks as one long form */
html.js .step:not(.active) { display: none; }
html:not(.js) .step { border-top: 1px solid var(--linea); margin-top: 8px; }
html:not(.js) .back { display: none; }
html:not(.js) .success-panel { display: none; }

@media (prefers-reduced-motion: no-preference) {
  html.js .step.active { animation: stepIn .15s ease; }
  @keyframes stepIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* ---------- contact fields ---------- */
.fields { display: grid; gap: 14px; margin-top: 14px; }
.frow { display: grid; gap: 14px; }
@media (min-width: 480px) { .frow { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--azul); margin-bottom: 5px; }
.opt-tag { font-weight: 400; color: var(--gris); }
.field input {
  width: 100%; min-height: 52px; padding: 12px 14px;
  font-size: 17px; font-family: inherit; color: var(--tinta);
  border: 1.5px solid var(--linea); border-radius: 10px; background: #fff;
}
.field input:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.field input[aria-invalid="true"] { border-color: var(--rojo); }

.err { color: var(--rojo); font-size: 14px; font-weight: 600; margin-top: 6px; }
.err a { color: var(--rojo); }

.hp-wrap { position: absolute; left: -9999px; top: -9999px; }

.consent {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 16px; font-size: 13px; line-height: 1.5; color: var(--gris);
  cursor: pointer;
}
.consent input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 20px; accent-color: var(--azul); }

.cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 58px; margin-top: 18px; padding: 14px 20px;
  font-family: var(--font-head); font-weight: 800; font-size: 18px;
  color: var(--azul); text-decoration: none; cursor: pointer;
  background: linear-gradient(180deg, var(--ambar-claro), var(--ambar));
  border: 0; border-radius: 12px;
  box-shadow: 0 3px 12px rgba(245, 158, 11, .35);
}
.cta:hover { filter: brightness(1.04); }
.cta-arrow { flex: 0 0 20px; }
@media (prefers-reduced-motion: no-preference) {
  .cta-arrow { animation: ctaNudge 1.6s ease-in-out infinite; }
  @keyframes ctaNudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
}
.cta:active { transform: scale(.99); }
.cta[disabled] { opacity: .6; cursor: default; }
@media (prefers-reduced-motion: reduce) { .cta:active { transform: none; } }

.trust-line { text-align: center; font-size: 13px; font-weight: 600; color: var(--gris); margin-top: 12px; }
.trust-line .ck { width: 14px; height: 14px; color: var(--verde); vertical-align: -2px; margin: 0 2px 0 8px; }
.trust-line .ck:first-child { margin-left: 0; }

/* ---------- success panel ---------- */
.success-panel { text-align: center; padding-top: 20px; }
.success-panel .check { width: 56px; height: 56px; color: var(--verde); margin-bottom: 10px; }
.success-panel h2 { padding-top: 0; }
.success-panel p { margin-top: 10px; color: var(--tinta); }
.success-panel .want-call { font-weight: 600; color: var(--azul); }
.success-panel .cta { margin-top: 12px; }
.success-panel .hint { margin-top: 12px; }

/* ---------- footer ---------- */
.site-footer { padding: 28px 0 40px; }
/* footer column matches the 560px quiz card (600 minus the wrap's 20px side padding) */
.site-footer .wrap { max-width: 600px; }
.site-footer .fine { font-size: 13px; color: var(--gris); text-align: center; }
.copy-line { margin-top: 12px; font-size: 13px; color: var(--gris); text-align: center; }
.copy-line a { color: var(--azul-2); }

.privacy { margin-top: 16px; border-top: 1px solid var(--linea); padding-top: 12px; }
.privacy summary {
  cursor: pointer; font-size: 14px; font-weight: 600; color: var(--azul-2);
  padding: 6px 0; list-style-position: inside; text-align: center;
}
.privacy-body { padding: 6px 0 4px; }
.privacy-body h3 { font-size: 14px; color: var(--azul); margin-top: 14px; }
.privacy-body p { font-size: 13px; color: var(--gris); margin-top: 4px; }

/* placeholder phone marker — remove .todo-phone once the real number lands */
.todo-phone { outline: 2px dashed var(--rojo); outline-offset: 3px; }
