* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.5;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.container { width: min(calc(100% - 32px), var(--max-width)); margin: 0 auto; }
.section { padding: 78px 0; }
.section.soft { background: var(--surface-soft); }
.section-heading { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 28px; }
.section-heading h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.05; }
.section-heading p { margin: 8px 0 0; color: var(--muted); max-width: 720px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--secondary); }
.button { border: 0; border-radius: 999px; padding: 11px 18px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: .2s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.button.secondary { background: var(--secondary); color: #fff; }
.button.ghost { background: #fff; color: var(--primary); border: 1px solid var(--border); }
.button.danger { background: var(--danger); color: #fff; }
.button.small { padding: 8px 12px; font-size: .85rem; }
.button.full { width: 100%; }
.icon-button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border); background: #fff; display: inline-grid; place-items: center; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.input, input, select, textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--text); padding: 11px 13px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(131,197,190,.22); }
label { display: block; font-size: .84rem; font-weight: 800; margin: 0 0 6px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-group { margin-bottom: 14px; }
.check { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.check input { width: 18px; height: 18px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.empty-state { padding: 36px; border: 1px dashed var(--border); border-radius: var(--radius-md); text-align: center; color: var(--muted); background: rgba(255,255,255,.6); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: .75rem; font-weight: 800; background: var(--surface-soft); color: var(--primary); }
.badge.success { background: #e7f7ee; color: var(--success); }
.badge.warning { background: #fff3df; color: var(--warning); }
.badge.danger { background: #fdeceb; color: var(--danger); }
.alert { padding: 12px 14px; border-radius: 12px; margin: 0 0 14px; font-weight: 700; }
.alert-error { background: #fdeceb; color: var(--danger); }
.alert-success { background: #e8f7ef; color: var(--success); }
.toast-container { position: fixed; right: 20px; bottom: 20px; z-index: 5000; display: grid; gap: 10px; }
.toast { min-width: 280px; max-width: 420px; padding: 13px 16px; border-radius: 14px; color: #fff; box-shadow: var(--shadow-md); animation: toastIn .22s ease; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }
.modal-backdrop { position: fixed; inset: 0; background: rgba(10,35,37,.65); z-index: 4000; display: grid; place-items: center; padding: 18px; }
.modal { width: min(720px, 100%); max-height: calc(100vh - 36px); overflow: auto; background: #fff; border-radius: 24px; box-shadow: var(--shadow-md); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--border); }
.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; }

/* ============================================================
   CARGA INICIAL Y BLOQUES INFORMATIVOS
============================================================ */
.app-loader {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: radial-gradient(circle at top left, #dcefeb, transparent 42%), linear-gradient(135deg, #fffaf6, #edf7f5);
  color: var(--primary);
  text-align: center;
}

.app-loader-mark {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--mint));
  color: #fff;
  font-size: 1.35rem;
  font-weight: 900;
  box-shadow: var(--shadow-md);
}

.app-loader p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.compact-section { padding-top: 26px; padding-bottom: 26px; }
.family-values-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.value-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
}
.value-card > span { font-size: 2rem; }
.value-card h3 { margin: 0 0 4px; font-size: 1rem; }
.value-card p { margin: 0; color: var(--muted); font-size: .9rem; }

@media (max-width: 860px) {
  .family-values-grid { grid-template-columns: 1fr; }
}
