/*
 * Crecimiento Saludable — base visual compartida (sitio, acceso y panel).
 * Identidad: cielo de papel, aviones y barquitos; verde azulado y naranja.
 * Tipografías alojadas en el sitio (licencia OFL, ver assets/fonts/LICENCIAS.txt).
 */
@font-face { font-family: "Zilla Slab"; font-weight: 600; font-display: swap; src: url("../assets/fonts/zilla-slab-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Zilla Slab"; font-weight: 700; font-display: swap; src: url("../assets/fonts/zilla-slab-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url("../assets/fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-display: swap; src: url("../assets/fonts/figtree-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url("../assets/fonts/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url("../assets/fonts/figtree-latin-700-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --teal: #007077;
  --teal-dark: #005a60;
  --teal-soft: #e3f1f2;
  --orange: #c74d0b;
  --orange-dark: #a53817;
  --orange-soft: #fbe9df;
  --rose: #d68e91;
  --sea: #5f9598;
  --sea-light: #93c3c9;
  --sky: #eef6f7;

  --bg: #f7fbfb;
  --surface: #ffffff;
  --border: #d3e4e6;
  --text: #1d3437;
  --muted: #5a7276;
  --ok: #1d7a46;
  --ok-bg: #e5f4ea;
  --warn: #8a5300;
  --warn-bg: #fff4dc;
  --danger: #b42318;
  --danger-bg: #fdecea;

  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Zilla Slab", Georgia, "Times New Roman", serif;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 60, 64, .06), 0 8px 24px rgba(16, 60, 64, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
img, svg { max-width: 100%; display: block; }
a { color: var(--teal); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .4em; color: var(--teal-dark); }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 2px solid transparent;
  font: 600 16px/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-dark); }
.btn--teal { background: var(--teal); color: #fff; }
.btn--teal:hover { background: var(--teal-dark); }
.btn--ghost { background: #fff; color: var(--teal); border-color: var(--teal); }
.btn--ghost:hover { background: var(--teal-soft); }
.btn--small { min-height: 34px; padding: 6px 14px; font-size: 14px; }
.btn--danger { background: #fff; color: var(--danger); border-color: #f0c2bd; }
.btn--danger:hover { background: var(--danger-bg); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--wa { background: #1f9e57; color: #fff; }
.btn--wa:hover { background: #17824a; }

/* Formularios */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 15px; }
.field small { color: var(--muted); font-size: 13px; }
input[type="text"], input[type="tel"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 10px;
  background: #fff; color: var(--text); font: 16px/1.4 var(--font);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(0, 112, 119, .15); }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: 14px; min-height: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--teal); flex: none; }

.alert { padding: 12px 16px; border-radius: 10px; font-size: 15px; margin: 0 0 14px; }
.alert--error { background: var(--danger-bg); color: var(--danger); }
.alert--ok { background: var(--ok-bg); color: var(--ok); }
.alert--info { background: var(--teal-soft); color: var(--teal-dark); }
.alert--warn { background: var(--warn-bg); color: var(--warn); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--teal-dark); }
.logo img { width: 38px; height: 38px; }
.logo span { font: 700 22px/1 var(--display); letter-spacing: .2px; }
.logo span b { color: var(--orange); font-weight: 700; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100;
  background: var(--text); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 15px; box-shadow: var(--shadow);
  max-width: calc(100% - 32px);
}

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