/* Mismos colores y letras que la landing (guaumi.cl) y la app. Baloo 2 para títulos, números y botones;
   Atkinson Hyperlegible Next para el texto. Autoalojadas en /assets/fonts/ (licencias OFL al lado). */
@font-face {
  font-family: "Baloo 2";
  src: url("/assets/fonts/baloo2-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/assets/fonts/atkinson-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --titulo: "Baloo 2", system-ui, sans-serif;
  --bg: #f3f5f1;
  --surface: #ffffff;
  --text: #1b2621;
  --muted: #4e5b54;
  --primary: #1f6f54;
  --on-primary: #ffffff;
  --border: #cbd5ce;
  --alert-bg: #fde8e4;
  --alert-text: #8a1c0c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e2a21;
    --surface: #143a2e;
    --text: #eef3ef;
    --muted: #a9c2b6;
    --primary: #e0a526;
    --on-primary: #1b2621;
    --border: #2b5546;
    --alert-bg: #4a1a13;
    --alert-text: #ffd9d2;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
}

main {
  max-width: 32rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.photo {
  display: block;
  width: 10rem;
  height: 10rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border);
  border: 4px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border);
}

h1 { font-family: var(--titulo); font-weight: 800; font-size: 2.125rem; line-height: 1.05; margin: 0.5rem 0; }
h2 { font-family: var(--titulo); font-weight: 700; font-size: 1.375rem; line-height: 1.15; margin: 0 0 0.75rem; }

/* Atkinson dibuja el 0 con raya; en fechas y plazos se ve como Ø. Esos números van en Baloo 2. El microchip
   y el teléfono siguen con el 0 cruzado, que ayuda a dictarlos sin confundirlo con la O. */
.fecha { font-family: var(--titulo); font-weight: 600; }

.lead { margin: 0 0 1.25rem; color: var(--muted); }
.muted { color: var(--muted); margin: 0; }

.alert {
  margin: 0 0 1rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  background: var(--alert-bg);
  color: var(--alert-text);
}

.call, .secondary {
  display: block;
  width: 100%;
  min-height: 3.5rem;
  padding: 0.875rem 1rem 0.75rem;
  border-radius: 0.875rem;
  font: inherit;
  font-family: var(--titulo);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.call { background: var(--primary); color: var(--on-primary); border: 2px solid var(--primary); }
.secondary { margin-top: 0.75rem; background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.secondary:disabled { opacity: 0.6; cursor: default; }
.secondary[hidden] { display: none; }

.call:focus-visible, .secondary:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }

.status { min-height: 1.5rem; margin: 0.5rem 0 0; color: var(--muted); font-size: 0.9375rem; }

section {
  margin-top: 1.25rem;
  padding: 1.125rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
}

dl { margin: 0; }
dl div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.375rem 0; }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; }

.vaccines { list-style: none; margin: 0; padding: 0; }
.vaccines li { padding: 0.5rem 0; border-top: 1.5px dashed var(--border); }
.vaccines li:first-child { border-top: 0; padding-top: 0; }
/* Solo el nombre de la vacuna va en su línea; las fechas (span.fecha) siguen en el texto. */
.vaccines li > span { display: block; font-weight: 700; }
.vaccines small { color: var(--muted); font-size: 0.875rem; }

/* Páginas legales (/legal/terminos y /legal/privacidad): texto largo, mismo estilo que la ficha. */
.legal { max-width: 46rem; }
.legal-nav { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.legal-nav .brand { font-family: var(--titulo); font-weight: 800; font-size: 1.5rem; line-height: 1; color: var(--primary); margin-right: auto; }
.legal h3 { font-family: var(--titulo); font-weight: 700; font-size: 1.25rem; line-height: 1.2; margin: 1.75rem 0 0.5rem; }
.legal p, .legal li { line-height: 1.6; }
.legal ul { padding-left: 1.25rem; }
.legal a { color: var(--primary); }
.legal a:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.table-scroll { overflow-x: auto; margin: 0.75rem 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; background: var(--surface); }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 0.625rem 0.75rem; border: 1px solid var(--border); }
.legal th { color: var(--muted); font-weight: 600; }

/* Crear una nueva contraseña (/recuperar) */
.campos { display: grid; gap: 0.5rem; margin-top: 1.5rem; }
.campos label { font-weight: 700; margin-top: 0.5rem; }
.campos input {
  font: inherit; min-height: 3.25rem; padding: 0.75rem 1rem;
  border: 1.5px solid var(--muted); border-radius: 0.875rem; background: var(--surface); color: var(--text);
}
.campos input:focus-visible { outline: 3px solid var(--primary); outline-offset: 1px; }
.campos .call { margin-top: 1rem; }
