/* ───────────── Dibujando una sonrisa en Navidad — estilos compartidos ───────────── */
:root {
  --red: #c4162a;
  --red-deep: #9b0f20;
  --red-soft: #fde8ea;
  --green: #17603a;
  --green-deep: #0e4428;
  --green-soft: #e4f2ea;
  --gold: #d9a521;
  --gold-soft: #fbf1d6;
  --ink: #23201d;
  --ink-2: #5d5750;
  --ink-3: #8f877e;
  --line: #ece5da;
  --bg: #fffaf3;
  --card: #ffffff;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(60, 40, 20, .06), 0 2px 8px rgba(60, 40, 20, .05);
  --shadow: 0 2px 6px rgba(60, 40, 20, .06), 0 12px 32px rgba(60, 40, 20, .09);
  --shadow-lg: 0 24px 64px rgba(40, 20, 10, .18);
  --font-display: "Fraunces", Georgia, serif;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--green); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: -0.01em; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* ───── botones ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  border: 0; border-radius: 999px; padding: .8em 1.4em;
  font-weight: 800; font-size: .98rem; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:focus-visible, .chip:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--gold) 70%, transparent); outline-offset: 2px;
}
.btn-red { background: var(--red); color: #fff; box-shadow: 0 6px 18px rgba(196, 22, 42, .28); }
.btn-red:hover { background: var(--red-deep); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 6px 18px rgba(23, 96, 58, .25); }
.btn-green:hover { background: var(--green-deep); }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.btn-soft { background: var(--green-soft); color: var(--green-deep); }
.btn-soft:hover { background: #d3eadc; }
.btn-danger-soft { background: var(--red-soft); color: var(--red-deep); }
.btn-danger-soft:hover { background: #fbd5da; }
.btn-sm { padding: .5em 1em; font-size: .88rem; }
.btn-lg { padding: 1em 1.7em; font-size: 1.05rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* ───── chips / filtros ───── */
.chip {
  border: 0; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line);
  padding: .5em 1em; border-radius: 999px; font-weight: 700; font-size: .9rem; cursor: pointer;
  color: var(--ink-2); transition: all .15s;
}
.chip:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.chip[aria-pressed="true"] { background: var(--green); color: #fff; box-shadow: none; }

.badge {
  display: inline-flex; align-items: center; gap: .35em;
  font-size: .76rem; font-weight: 800; padding: .3em .7em; border-radius: 999px; letter-spacing: .01em; white-space: nowrap;
}
.badge-green { background: var(--green-soft); color: var(--green-deep); }
.badge-red { background: var(--red-soft); color: var(--red-deep); }
.badge-gold { background: var(--gold-soft); color: #8a6407; }
.badge-gray { background: #f1ede7; color: var(--ink-2); }

/* ───── formularios ───── */
.field { display: grid; gap: 6px; }
.field > span { font-weight: 800; font-size: .88rem; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: 12px;
  padding: .75em .9em; font-size: 1rem; transition: border-color .15s;
}
.input:hover, .select:hover, .textarea:hover { border-color: #d9d0c2; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 14%, transparent); }
.textarea { min-height: 80px; resize: vertical; }
.phone-row { display: grid; grid-template-columns: minmax(0, 132px) 1fr; gap: 8px; }
.hint { font-size: .82rem; color: var(--ink-3); }
.form-error { background: var(--red-soft); color: var(--red-deep); padding: .7em 1em; border-radius: 12px; font-weight: 700; font-size: .92rem; }

/* ───── modal ───── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(30, 20, 12, .45); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 16px; z-index: 100;
  animation: fade .18s ease;
}
.modal {
  background: var(--card); border-radius: 24px; box-shadow: var(--shadow-lg);
  width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
  animation: pop .22s cubic-bezier(.2, .9, .3, 1.2);
  position: relative;
}
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-sm); display: grid; place-items: center;
}
.modal-close:hover { background: #fff; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } }

/* ───── toast ───── */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: .8em 1.3em; border-radius: 999px; font-weight: 700;
  box-shadow: var(--shadow-lg); z-index: 200; animation: pop .2s ease; max-width: calc(100% - 32px); text-align: center;
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

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