/* ==========================================================================
   Base: reset, tipografía, iconos, botones y formularios
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
ul { list-style: none; padding: 0; }

.hidden { display: none !important; }
.no-scroll { overflow: hidden; }
.muted { color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -64px; z-index: 500;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-sm);
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.on-dark :focus-visible { outline-color: #fff; }

.ico { display: inline-flex; flex: none; line-height: 0; }
.icon { width: 1.25em; height: 1.25em; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 42px; padding: 0 18px; border-radius: var(--r-md);
  font-weight: 600; font-size: 14.5px; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color .12s, border-color .12s, color .12s;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--brand-700); }
.btn--ghost { border-color: #c9ccd2; color: var(--brand); background: #fff; }
.btn--ghost:hover { border-color: var(--brand); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover:not(:disabled) { background: #11763c; }
.btn--soft { background: #fff; color: var(--ink); border-color: #c5c7cf; }
.btn--soft:hover { border-color: var(--ink); }
.btn--danger { background: #fff; color: var(--danger); border-color: #e5b9b5; }
.btn--danger:hover { background: #fdf1f0; }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
.btn--block { width: 100%; }
.btn--google { background: #fff; color: var(--ink); border-color: #c5c7cf; }
.btn--google:hover:not(:disabled) { border-color: var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center;
  border-radius: var(--r-md); font-size: 20px; color: inherit;
}
.icon-btn:hover { background: var(--soft); }
.icon-btn--sm { width: 34px; height: 34px; font-size: 17px; border: 1px solid var(--line); background: #fff; }
.icon-btn--sm:hover { border-color: var(--ink); background: #fff; }
.icon-btn--danger { color: var(--danger); }

.link { color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--ink); }

/* ---------- Formularios ---------- */
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.input {
  width: 100%; min-height: 42px; padding: 9px 12px;
  border: 1px solid #c5c7cf; border-radius: var(--r-md); background: #fff;
}
.input:hover { border-color: #9a9ea9; }
.input:focus { border-color: var(--brand); outline: 1px solid var(--brand); outline-offset: 0; }
textarea.input { min-height: 120px; resize: vertical; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.input-icon { position: relative; }
.input-icon > .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon .input { padding-left: 40px; }
.input-icon--end .input { padding-right: 46px; }
.reveal { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; color: var(--muted); border-radius: var(--r-sm); }
.reveal:hover { color: var(--ink); }
.form-error { color: var(--danger); font-size: 13.5px; min-height: 20px; margin-bottom: 8px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

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