/* Divorciatech — estilos de la web estática */
:root {
  --ink: #232636;        /* azul tinta del logo */
  --ink-soft: #4a4e63;
  --line: #e0e2ea;
  --paper: #ffffff;
  --mist: #f4f5f9;
  --accent: #2f6fed;     /* acción */
  --accent-ink: #ffffff;
  --ok: #1e8a5a;
  --error: #c0392b;
  --radius: 10px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Poppins", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.6; font-size: 17px; }
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h2[tabindex="-1"]:focus { outline: none; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-inline: 20px; }

/* Cabecera */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.site-header .logo img { height: 34px; width: auto; display: block; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; border: 2px solid transparent; font: 600 16px/1.2 var(--font); text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #2259c9; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-soft); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* Portada */
.hero { padding-block: 72px 56px; background: linear-gradient(180deg, var(--mist), var(--paper)); }
.hero h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.15; margin: 0 0 18px; text-wrap: balance; max-width: 18ch; }
.hero p.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 56ch; margin: 0 0 28px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .note { font-size: .95rem; color: var(--ink-soft); }

section { padding-block: 56px; }
section h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 0 0 24px; text-wrap: balance; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: paso; }
.steps li { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; counter-increment: paso; }
.steps li::before { content: counter(paso); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; margin-bottom: 10px; }
.steps h3 { margin: 0 0 6px; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.types { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.types article { background: var(--mist); border-radius: var(--radius); padding: 22px; }
.types h3 { margin: 0 0 6px; }
.types p { margin: 0; color: var(--ink-soft); }
.band { background: var(--ink); color: #fff; }
.band h2 { color: #fff; }
.band p { color: #d5d8e4; max-width: 60ch; }

/* Pie */
.site-footer { background: var(--ink); color: #c9ccd8; padding-block: 36px; font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.site-footer a { color: #fff; }
.site-footer img { height: 28px; width: auto; }

/* ---------- Trámite (asistente) ---------- */
fieldset.step { border: 0; padding: 0; margin: 0; min-width: 0; }
.header-note { color: var(--ink-soft); font-size: .9rem; text-align: right; max-width: 34ch; }
.tramite { padding-block: 32px 64px; background: var(--mist); min-height: calc(100vh - 69px); }
.tramite .panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; max-width: 760px; margin: 0 auto; padding: clamp(20px, 4vw, 40px); }
.progress { max-width: 760px; margin: 0 auto 18px; }
.progress .bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress .bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s ease; }
.progress .label { display: flex; justify-content: space-between; font-size: .9rem; color: var(--ink-soft); margin-top: 8px; gap: 12px; }
.step { display: none; }
.step.active { display: block; animation: aparecer .25s ease; }
@keyframes aparecer { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .step.active { animation: none; } .progress .bar span { transition: none; } }
.step h2 { font-family: var(--font-display); font-size: 1.6rem; margin: 0 0 6px; }
.step .intro { color: var(--ink-soft); margin: 0 0 24px; }

.field { margin-bottom: 18px; min-width: 0; }
.field label, .field .legend { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { display: block; font-size: .9rem; color: var(--ink-soft); margin-top: 4px; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=date], .field input[type=number], .field select {
  width: 100%; padding: 12px 14px; font: 16px var(--font); color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 8px;
}
.field input:focus, .field select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(47, 111, 237, .18); }
.field.invalid input, .field.invalid select { border-color: var(--error); }
.field .error { display: none; color: var(--error); font-size: .9rem; margin-top: 4px; }
.field.invalid .error { display: block; }
.grid2 { display: grid; gap: 0 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.choices { display: grid; gap: 12px; }
.choice { position: relative; display: block; border: 1.5px solid var(--line); border-radius: 10px; padding: 14px 16px 14px 48px; cursor: pointer; }
.choice input { position: absolute; left: 16px; top: 17px; width: 20px; height: 20px; accent-color: var(--accent); }
.choice strong { display: block; }
.choice span { color: var(--ink-soft); font-size: .95rem; }
.choice:has(input:checked) { border-color: var(--accent); background: #f2f6ff; }
.inline-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.inline-choices .choice { padding: 10px 16px 10px 44px; }
.inline-choices .choice input { top: 13px; }

.pj-result { margin-top: 8px; padding: 12px 14px; border-radius: 8px; background: #eef7f1; color: var(--ok); font-weight: 600; display: none; }
.pj-result.show { display: block; }
.pj-result.warn { background: #fdf3e7; color: #8a5a00; }

.hijo { border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.hijo h3 { margin: 0 0 12px; font-size: 1.05rem; }

.nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.review { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.review dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.review dt, .review dd { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.review dt { color: var(--ink-soft); background: var(--mist); font-size: .95rem; }
.review h3 { margin: 0; padding: 12px 14px; background: var(--ink); color: #fff; font-size: 1rem; }
.alert { padding: 14px 16px; border-radius: 10px; margin-bottom: 18px; }
.alert-error { background: #fdecea; color: var(--error); }
.done { text-align: center; padding-block: 24px; }
.done .check { width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 34px; margin: 0 auto 16px; }
.done ol { text-align: left; max-width: 52ch; margin: 18px auto; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .header-note { display: none; }
  .review dl { grid-template-columns: 1fr; }
  .review dt { border-bottom: 0; padding-bottom: 2px; }
  .nav .btn { flex: 1 1 auto; }
}
