/* Base: reinicio, tipografía, botones, formularios y piezas chicas reutilizables. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  transition: background-color .7s ease, color .7s ease;
}
h1, h2, h3, h4, p { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
a:hover { opacity: .92; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.grow { flex: 1; }
.block { display: block; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.row--wrap { flex-wrap: wrap; }
.icon { flex: none; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: 32px; }
@media (max-width: 859px) { .container { padding-inline: 16px; } }

.section { position: relative; padding-block: 96px; scroll-margin-top: var(--header-h); }
.section--surface { background: var(--surface); border-block: 1px solid var(--divider); transition: background-color .7s; }
@media (max-width: 859px) { .section { padding-block: 56px; } }
.section-title {
  margin-top: 10px; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(34px, 5vw, 48px); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance;
}
.section-lead { margin-top: 14px; max-width: 640px; font-size: 17px; line-height: 1.55; color: var(--muted); }
.section-head--center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.section-head--center .section-title { margin-top: 16px; max-width: 760px; }
.section-head--center .section-lead { max-width: 600px; }
.subsection-title { margin-top: 44px; font-family: var(--font-display); font-size: 22px; font-weight: 800; }

.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.eyebrow.accent { color: var(--accent-text); }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; border-radius: 999px;
  background: var(--surface-2); color: var(--accent-text); font-size: 12px; font-weight: 700;
}
.pill--surface { padding: 7px 14px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot--pink { background: var(--pink); }

/* ── Botones ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid transparent;
  background: transparent; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .3s, border-color .3s, color .3s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) { .btn:hover:not(:disabled) { transform: translateY(-2px); opacity: 1; } }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { cursor: default; opacity: .45; }
.btn--ink { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.btn--outline { border-color: var(--border); color: var(--text); font-weight: 600; }
.btn--outline.is-active { border-color: var(--pink); background: var(--pink-soft); }
.btn--surface { background: var(--surface); border-color: var(--border); color: var(--text); font-weight: 600; }
.btn--ghost { color: var(--muted); font-weight: 600; padding-inline: 12px; }
.btn--lg { min-height: 50px; padding-inline: 24px; font-size: 15px; }
.btn--xl { min-height: 56px; padding-inline: 28px; font-size: 17px; box-shadow: var(--shadow); }
.btn--xl.btn--surface { box-shadow: none; font-size: 16px; }
.btn--block { width: 100%; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; padding: 0; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--accent); cursor: pointer;
  transition: transform .15s ease, background-color .3s;
}
@media (hover: hover) { .icon-btn:hover { transform: translateY(-2px); } }

:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }

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

/* ── Formularios ─────────────────────────────────────────────────────────────── */
input, textarea, select {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--bg); font-size: 15px;
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
.field-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field-label--lg { font-size: 17px; font-weight: 700; color: var(--text); }
.form-error { color: var(--warn-text); font-size: 14px; font-weight: 600; min-height: 0; }
.form-error:empty { display: none; }
/* Campo trampa: fuera de la vista y del lector de pantalla, pero NO display:none (algunos robots
   ignoran los campos ocultos así). */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ── Piezas ──────────────────────────────────────────────────────────────────── */
.card {
  padding: 26px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border);
  transition: background-color .7s, border-color .7s;
}
.chip { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.chip--soft { background: var(--surface-2); color: var(--accent-text); }
.chip--pink { background: var(--pink-soft); color: var(--tag-text); }
.chip--accent { background: var(--surface-2); color: var(--accent-text); }
.chip--warn { background: var(--warn-bg); color: var(--warn-text); }
.chip--dashed { border: 1px dashed var(--accent); color: var(--accent-text); }

.brand-badge {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: var(--ink-text);
}
.brand-badge--lg { width: 52px; height: 52px; border-radius: 16px; }
/* El logo monocromo (el de las notificaciones), coloreado con el color del texto. */
.icon-brand {
  display: inline-block; flex: none; background: currentColor;
  -webkit-mask: url('../img/logo-mono.png') center / contain no-repeat;
  mask: url('../img/logo-mono.png') center / contain no-repeat;
}

/* ── Avisos (core/toast.js) ──────────────────────────────────────────────────── */
.toast-region {
  position: fixed; left: 50%; bottom: 20px; z-index: 60; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; width: min(520px, calc(100vw - 32px));
}
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px;
  background: var(--ink); color: var(--ink-text); font-size: 14px; font-weight: 600; box-shadow: var(--shadow);
  animation: enter .4s var(--ease-out) both;
}
.toast--error { background: var(--warn-bg); color: var(--warn-text); }
.toast__icon { display: flex; }
.toast--leaving { animation: leave .3s ease both; }

/* ── Animaciones ─────────────────────────────────────────────────────────────── */
@keyframes enter { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes leave { to { opacity: 0; transform: translateY(8px); } }
@keyframes pop { 0% { opacity: 0; transform: scale(.6); } 70% { transform: scale(1.06); } 100% { opacity: 1; transform: scale(1); } }
@keyframes glow { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }
@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(203, 79, 132, .6); }
  12% { transform: scale(1.03); }
  24% { transform: scale(1); }
  36% { transform: scale(1.03); }
  60% { transform: scale(1); box-shadow: 0 0 0 18px rgba(203, 79, 132, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(203, 79, 132, 0); }
}
.enter { animation: enter .6s var(--ease-out) both; }
.pop { animation: pop .5s var(--ease-out) both; }

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