/* ---------------------------------------------------------------------------
   Alisios — Consentimiento RGPD, Asunción 2026

   Tipografía de marca: Poppins (cuerpo) + Vodan (título principal).
   Vodan NO se sirve como fichero de fuente: el título se incrusta como
   trazados SVG (templates/_titulo_vodan.svg), de modo que no se distribuye
   públicamente ningún fichero con licencia.

   Sin CDN: Poppins se sirve desde este mismo contenedor. La wifi de un hotel
   no es fiable y una dependencia externa caída dejaría el formulario sin
   estilos ni tipografía.
--------------------------------------------------------------------------- */

@font-face { font-family:'Poppins'; font-weight:400; font-style:normal; font-display:swap;
  src:url('/static/fonts/poppins-400.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Poppins'; font-weight:400; font-style:normal; font-display:swap;
  src:url('/static/fonts/poppins-ext-400.woff2') format('woff2');
  unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:'Poppins'; font-weight:500; font-style:normal; font-display:swap;
  src:url('/static/fonts/poppins-500.woff2') format('woff2'); }
@font-face { font-family:'Poppins'; font-weight:600; font-style:normal; font-display:swap;
  src:url('/static/fonts/poppins-600.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:'Poppins'; font-weight:600; font-style:normal; font-display:swap;
  src:url('/static/fonts/poppins-ext-600.woff2') format('woff2');
  unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  /* --- Paleta corporativa Alisios (valores documentados) ---------------- */
  --titulo:   #17365D;   /* Title  — plantilla Word */
  --encab:    #365F91;   /* H1     — plantilla Word */
  --acento:   #4F81BD;   /* H2/pie — plantilla Word */
  --primario: #0070C0;   /* Azul primario — guía de marca */
  --teal:     #1ABC9C;   /* Teal          — guía de marca */
  --coral:    #C0392B;   /* Rojo/coral    — guía de marca */
  --gris:     #F2F4F7;   /* Gris claro    — guía de marca */

  /* Neutros de lectura. NO son colores de marca: un texto legal largo
     necesita un gris de lectura, no un azul saturado. */
  --texto: #33414E;
  --suave: #6B7A88;
  --linea: #DCE2E9;
  --card:  #FFFFFF;

  --ui:   'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  --wrap: 47rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0; background: var(--gris); color: var(--texto);
  font-family: var(--ui); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

/* --- Cabecera ----------------------------------------------------------- */

.masthead { background: var(--card); border-bottom: 1px solid var(--linea); padding: 1.5rem 0 1.25rem; }
.masthead img.marca { display: block; width: 200px; max-width: 60%; height: auto; }
.masthead .evento {
  margin-top: 1.1rem; border-top: 1px solid var(--linea); padding-top: 1rem;
  display: grid; gap: .3rem .5rem; grid-template-columns: 1fr;
}
.evento .k { font-size: .66rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--acento); }
.evento .v { font-size: .88rem; color: var(--suave); margin-bottom: .35rem; }

/* --- Documento ---------------------------------------------------------- */

main { padding: 2rem 0 4rem; }
.doc { background: var(--card); border: 1px solid var(--linea); padding: 2rem 1.5rem; }

/* Título principal en Vodan, incrustado como trazados SVG. */
.titulo-vodan { display: block; width: 100%; height: auto; color: var(--titulo); margin: 0 0 1.1rem; }

h1 { /* respaldo textual en páginas secundarias */
  font-family: var(--ui); font-weight: 600; font-size: 1.5rem; line-height: 1.25;
  color: var(--titulo); margin: 0 0 1rem; letter-spacing: -.01em;
}

.intro { font-size: 1rem; color: var(--suave); border-left: 2px solid var(--acento); padding-left: 1rem; margin: 0 0 2.25rem; }

/* Raíl numerado: los apartados de un instrumento jurídico van numerados,
   así que el número es información, no adorno. */
.sec { margin: 0 0 2rem; scroll-margin-top: 1.5rem; }
.sec > .num { font-size: .67rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--acento); display: block; margin-bottom: .25rem; }
.sec > h2 { font-size: .95rem; font-weight: 600; color: var(--encab); margin: 0 0 .6rem; }
.sec p, .sec li { font-size: .93rem; margin: 0 0 .7rem; }
.sec ul { margin: 0 0 .7rem; padding-left: 1.1rem; }
.sec li { margin-bottom: .45rem; }
.sec li::marker { color: var(--acento); }
.sec strong { color: var(--titulo); }

.nota { background: var(--gris); border-left: 2px solid var(--encab); padding: .85rem 1rem; margin: 0 0 .8rem; }
.nota p { margin: 0; font-size: .9rem; }

/* --- Formulario --------------------------------------------------------- */

.campo { margin-bottom: 1.25rem; }
label.lbl { display: block; font-size: .8rem; font-weight: 600; color: var(--titulo); margin-bottom: .35rem; }
.hint { font-size: .78rem; color: var(--suave); margin: .3rem 0 0; }

input[type=text], input[type=email] {
  width: 100%; font-family: var(--ui); font-size: 1rem; padding: .7rem .8rem;
  border: 1px solid var(--linea); border-radius: 3px; background: var(--card); color: var(--texto);
}
input[type=text]:focus, input[type=email]:focus { outline: 2px solid var(--primario); outline-offset: 1px; border-color: var(--primario); }

.ledger { border: 1px solid var(--encab); background: var(--card); margin: 0 0 1.25rem; border-radius: 3px; }
.opt { display: flex; gap: .85rem; align-items: flex-start; padding: .95rem 1rem; border-bottom: 1px solid var(--linea); cursor: pointer; }
.opt:last-child { border-bottom: 0; }
.opt:hover { background: var(--gris); }
.opt input { margin: .25rem 0 0; width: 1.15rem; height: 1.15rem; accent-color: var(--primario); flex: 0 0 auto; }
.opt span { font-size: .92rem; }
.opt.deny { background: var(--gris); border-top: 1px solid var(--encab); }
.opt.deny span { font-weight: 600; }
.opt input:focus-visible { outline: 2px solid var(--primario); outline-offset: 2px; }

.declara {
  font-size: .93rem; font-weight: 600; color: var(--titulo);
  border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea);
  padding: 1rem 0; margin: 0 0 1.75rem;
}

/* --- Firma -------------------------------------------------------------- */

.firma-panel { background: var(--gris); border: 1px solid var(--linea); padding: 1rem; border-radius: 3px; }
.tabs { display: flex; gap: .4rem; margin-bottom: .75rem; }
.tab {
  font-family: var(--ui); font-size: .78rem; font-weight: 600; padding: .45rem .85rem;
  border: 1px solid var(--linea); background: var(--card); color: var(--suave);
  cursor: pointer; border-radius: 3px;
}
.tab[aria-selected=true] { background: var(--encab); color: #fff; border-color: var(--encab); }
.tab:focus-visible { outline: 2px solid var(--primario); outline-offset: 2px; }

.pad-holder { position: relative; background: var(--card); border: 1px solid var(--linea); border-radius: 3px; }
#pad { display: block; width: 100%; height: 190px; touch-action: none; cursor: crosshair; }
.pad-holder::after { content: ''; position: absolute; left: 8%; right: 8%; bottom: 44px; border-bottom: 1px solid var(--linea); pointer-events: none; }
.pad-holder .ph { position: absolute; left: 8%; bottom: 20px; font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--suave); pointer-events: none; }
.pad-holder.drawn .ph, .pad-holder.drawn::after { display: none; }

.firma-acciones { display: flex; justify-content: space-between; align-items: center; margin-top: .6rem; gap: 1rem; }
.linkbtn { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--ui); font-size: .78rem; color: var(--suave); text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--coral); }

.firma-escrita input { font-family: var(--ui); font-style: italic; font-weight: 500; font-size: 1.4rem; text-align: center; padding: 1.1rem .8rem; color: var(--titulo); }

/* --- Botones ------------------------------------------------------------ */

.btn {
  display: inline-block; width: 100%; font-family: var(--ui); font-size: 1rem; font-weight: 600;
  padding: .95rem 1.5rem; background: var(--primario); color: #fff;
  border: 1px solid var(--primario); border-radius: 3px; cursor: pointer; transition: background .15s ease;
}
.btn:hover { background: var(--encab); border-color: var(--encab); }
.btn:focus-visible { outline: 2px solid var(--titulo); outline-offset: 2px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.danger { background: var(--coral); border-color: var(--coral); }
.btn.ghost { background: transparent; color: var(--primario); }

.err { background: #FBF0EF; border-left: 3px solid var(--coral); color: var(--coral); padding: .8rem 1rem; margin: 0 0 1.5rem; font-size: .89rem; }
.err ul { margin: .4rem 0 0; padding-left: 1.1rem; }

/* --- Navegación flotante ------------------------------------------------ */
/* Un documento legal largo tiene exactamente dos destinos útiles: el
   principio (releer) y el final (firmar). Nada más merece un botón. */

.navflot { position: fixed; right: 1rem; bottom: 1.25rem; z-index: 40; display: flex; flex-direction: column; gap: .5rem; }
.navflot a {
  display: flex; align-items: center; gap: .5rem; height: 2.9rem; padding: 0 1rem;
  background: var(--card); color: var(--encab); border: 1px solid var(--linea);
  border-radius: 999px; box-shadow: 0 2px 10px rgba(23,54,93,.13);
  font-size: .8rem; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: opacity .25s ease, transform .25s ease, background .15s ease, color .15s ease;
}
.navflot a:hover { background: var(--encab); color: #fff; border-color: var(--encab); }
.navflot a:focus-visible { outline: 2px solid var(--primario); outline-offset: 2px; }
.navflot a svg { width: .95rem; height: .95rem; flex: 0 0 auto; }
.navflot a.oculto { opacity: 0; transform: translateY(.4rem); pointer-events: none; }

@media (max-width: 26rem) {
  .navflot a .etq { display: none; }
  .navflot a { padding: 0; width: 2.9rem; justify-content: center; }
}

/* --- Confirmación ------------------------------------------------------- */

.mark { width: 44px; height: 44px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-size: 1.35rem; margin-bottom: 1.1rem; }
.resumen { border: 1px solid var(--linea); margin: 1.5rem 0; border-radius: 3px; }
.resumen .row { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border-bottom: 1px solid var(--linea); font-size: .89rem; }
.resumen .row:last-child { border-bottom: 0; }
.resumen .row .st { font-weight: 600; white-space: nowrap; }
.si { color: #14856E; }   /* teal oscurecido: contraste AA sobre blanco */
.no { color: var(--suave); }
.ref { font-family: var(--mono); font-size: .72rem; color: var(--suave); word-break: break-all; background: var(--gris); padding: .6rem .8rem; border-radius: 3px; }

/* --- Administración ----------------------------------------------------- */

.tabla { width: 100%; border-collapse: collapse; font-size: .8rem; background: var(--card); }
.tabla th, .tabla td { padding: .5rem .6rem; border-bottom: 1px solid var(--linea); text-align: left; }
.tabla th { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--acento); font-weight: 600; border-bottom: 1px solid var(--encab); }
.tabla td.c { text-align: center; }
.chip { display: inline-block; font-family: var(--mono); font-size: .69rem; padding: .15rem .45rem; border-radius: 3px; }
.chip.good { background: #E4F6F1; color: #14856E; }
.chip.bad  { background: #FBF0EF; color: var(--coral); }
.scroll { overflow-x: auto; border: 1px solid var(--linea); }

/* --- Pie ---------------------------------------------------------------- */

footer { font-size: .77rem; color: var(--suave); border-top: 1px solid var(--linea); margin-top: 2.5rem; padding: 1.25rem 0 2.5rem; }
footer p { margin: 0 0 .4rem; }

.powered { display: flex; align-items: center; gap: .55rem; margin-top: 1.1rem; }
.powered span { font-size: .72rem; letter-spacing: .04em; color: var(--suave); }
.powered a { display: inline-flex; align-items: center; opacity: .85; transition: opacity .15s ease; }
.powered a:hover { opacity: 1; }
.powered img { height: 34px; width: auto; display: block; }
.powered a:focus-visible { outline: 2px solid var(--primario); outline-offset: 3px; border-radius: 2px; }

/* --- Escalado ----------------------------------------------------------- */

@media (min-width: 40rem) {
  .doc { padding: 2.75rem 3rem; }
  #pad { height: 210px; }
  .masthead .evento { grid-template-columns: repeat(2, 1fr); }
  .navflot { right: 1.75rem; bottom: 1.75rem; }
}

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

@media print {
  .masthead, .navflot, .btn, .firma-acciones { display: none; }
  body { background: #fff; }
  .doc { border: 0; padding: 0; }
}
