/* Reilum · página de lista de espera
   Contrastes comprobados (WCAG 2.2 AA): texto ≥ 4,5:1, componentes ≥ 3:1. */

:root {
  --ink: #16191d;
  --muted: #4f5663;
  --line: #dfe2e6;
  --bg: #fbfaf7;
  --card: #ffffff;
  --accent: #1d5c47;
  --accent-strong: #154535;
  --accent-soft: #e4efe9;
  --warn: #7d430f;
  --warn-soft: #fbf0e3;
  --error: #a3261b;
  --focus: #1d5c47;
  --radius: 12px;
  --wrap: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }

body {
  margin: 0;
  font: 1.0625rem/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-strong); }

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

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  z-index: 10;
  text-decoration: none;
  font-weight: 600;
}
.skip:focus { top: 16px; color: #fff; }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* Cabecera */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; min-height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.375rem; letter-spacing: -0.03em;
  color: var(--ink); text-decoration: none;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--ink); text-decoration: none; font-weight: 500; border-radius: 8px;
}
.site-nav a:hover { background: var(--accent-soft); color: var(--accent-strong); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  background: var(--accent); color: #fff;
  font: inherit; font-weight: 650; text-decoration: none;
  border: 2px solid var(--accent); border-radius: 10px; cursor: pointer;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-strong); }
.btn[disabled] { opacity: 0.7; cursor: progress; }

/* Portada */
.hero { padding: 72px 0 64px; }
.hero .wrap { display: grid; gap: 48px; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; }
.eyebrow {
  display: inline-block; margin: 0 0 16px; padding: 6px 12px;
  background: var(--accent-soft); color: var(--accent-strong);
  border-radius: 999px; font-size: 0.875rem; font-weight: 650;
}
.hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.08; letter-spacing: -0.03em;
  margin: 0 0 20px; text-wrap: balance;
}
.hero .lead { font-size: 1.1875rem; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.note { font-size: 0.9375rem; color: var(--muted); margin: 16px 0 0; }

/* Vista previa del documento (decorativa, con texto alternativo en el HTML) */
.doc {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(22,25,29,.04), 0 18px 40px -18px rgba(22,25,29,.22);
  padding: 22px; font-size: 0.875rem;
}
.doc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.doc-title { font-weight: 750; font-size: 1rem; }
.doc-tag { color: var(--accent-strong); background: var(--accent-soft); border-radius: 999px; padding: 2px 10px; font-weight: 650; font-size: 0.8125rem; }
.doc-sub { color: var(--muted); margin: 0 0 14px; }
.doc { overflow-x: auto; }
.doc table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.doc th, .doc td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--muted); font-weight: 600; font-size: 0.8125rem; }
.doc td:not(:first-child), .doc th:not(:first-child) { text-align: right; }
.doc .ok { color: var(--accent-strong); font-weight: 650; }
.doc-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; color: var(--muted); font-size: 0.8125rem; }

/* Secciones */
section { padding: 64px 0; border-top: 1px solid var(--line); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 12px; text-wrap: balance; }
h3 { font-size: 1.125rem; margin: 0 0 6px; line-height: 1.3; }
.section-lead { color: var(--muted); margin: 0 0 32px; max-width: 40em; font-size: 1.125rem; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card p { margin: 0; color: var(--muted); }

.warning {
  margin-top: 20px; padding: 16px 20px;
  background: var(--warn-soft); color: var(--warn);
  border: 1px solid #ecd3b4; border-radius: var(--radius);
}

ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
ol.steps li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 22px 70px; position: relative; }
ol.steps li::before {
  content: counter(s); position: absolute; left: 22px; top: 20px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-strong); font-weight: 750;
  display: grid; place-items: center;
}
ol.steps p { margin: 0; color: var(--muted); }

.official { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; background: var(--accent-soft); border-radius: 16px; padding: 28px; }
.official svg { width: 40px; height: 40px; color: var(--accent-strong); }
.official p { margin: 0; }
.official .small { color: var(--muted); font-size: 0.9375rem; margin-top: 8px; }

.compare { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.compare caption { text-align: left; font-weight: 650; padding: 0 0 12px; }
.compare th, .compare td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare thead th { background: #f4f3ee; font-size: 0.9375rem; }
.compare tbody th { font-weight: 600; }
.table-scroll { overflow-x: auto; }

.prices { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.price { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.price .amount { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin: 4px 0; }
.price .amount span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.price p { margin: 0; color: var(--muted); }

.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 18px 22px; font-weight: 650; min-height: 44px; list-style-position: inside; }
.faq details > div { padding: 0 22px 18px; color: var(--muted); }
.faq details p { margin: 0 0 10px; }

/* Formularios */
.forms { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.form-card h3 { font-size: 1.3rem; }
.form-card > p { color: var(--muted); margin: 0 0 20px; }
form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
label, legend { font-weight: 650; font-size: 0.9875rem; }
.req, .opt { font-weight: 400; color: var(--muted); }
.hint { font-size: 0.9rem; color: var(--muted); margin: 0; }
input[type="text"], input[type="email"], input[type="tel"], select {
  font: inherit; font-size: 1rem; color: var(--ink);
  min-height: 48px; padding: 10px 12px;
  border: 1.5px solid #8a909b; border-radius: 10px; background: #fff; width: 100%;
}
input:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
[aria-invalid="true"] { border-color: var(--error) !important; }
.error { color: var(--error); font-size: 0.9375rem; font-weight: 600; margin: 0; }
.error:empty { display: none; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-weight: 400; font-size: 0.9375rem; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--accent); }
.legal-basic { font-size: 0.875rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; margin: 0; }
.legal-basic dt { font-weight: 650; color: var(--ink); display: inline; }
.legal-basic dd { display: inline; margin: 0; }
.legal-basic div { margin-bottom: 4px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { padding: 16px 18px; border-radius: 10px; font-weight: 600; }
.status:empty { display: none; }
.status.is-ok { background: var(--accent-soft); color: var(--accent-strong); }
.status.is-error { background: #fbe9e7; color: var(--error); }
.summary-errors { background: #fbe9e7; color: var(--error); border-radius: 10px; padding: 14px 18px; }
.summary-errors:empty { display: none; }
.summary-errors ul { margin: 6px 0 0; padding-left: 20px; }
.summary-errors a { color: var(--error); }

/* Pie */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 0.9375rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 12px; display: flex; gap: 8px 20px; flex-wrap: wrap; }
.site-footer a { display: inline-flex; min-height: 44px; align-items: center; }

/* Páginas legales */
.legal { padding: 48px 0 64px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); letter-spacing: -0.02em; margin: 0 0 8px; }
.legal h2 { font-size: 1.35rem; margin: 36px 0 10px; }
.legal p, .legal li { color: #2b3038; }
.legal table { border-collapse: collapse; width: 100%; margin: 12px 0; }
.legal .table-scroll { overflow-x: auto; }
@media (max-width: 480px) { .doc { padding: 16px; } .doc th, .doc td { padding: 6px 3px; } }
.legal th, .legal td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.placeholder { background: #fff3c4; color: #5c4400; padding: 0 4px; border-radius: 4px; }

@media (max-width: 860px) {
  .hero { padding: 48px 0; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
  .btn, .card, .form-card, .price { border: 1px solid CanvasText; }
}

.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
@media (max-width: 480px) { .form-card { padding: 20px; } section { padding: 48px 0; } .wrap { padding: 0 20px; } }
