/* ==========================================================================
   Momentia — base compartida
   Tipografías locales, tokens, reset, botones, campos.
   ========================================================================== */

@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Onest"; src: url("../fonts/onest.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../fonts/cormorant-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../fonts/cormorant-400-italic.woff2") format("woff2"); font-weight: 400 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../fonts/cormorant-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../fonts/cormorant-600.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Great Vibes"; src: url("../fonts/great-vibes.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("../fonts/fredoka.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  /* Paleta: noche de fiesta + luz de flash + confeti */
  --night: #140e26;
  --night-2: #1f1638;
  --ink: #221a3d;
  --ink-soft: #5d5578;
  --ink-faint: #8e87a6;
  --flash: #fff7ea;
  --paper: #f5f4f9;
  --white: #ffffff;
  --line: #e4e1ee;
  --fucsia: #ff3e8a;
  --fucsia-deep: #e0206c;
  --marigold: #ffc23d;
  --lilac: #a894ff;
  --ok: #1f9d63;
  --ok-bg: #e3f6ec;
  --warn: #b46a00;
  --warn-bg: #fff3dc;
  --bad: #c3284b;
  --bad-bg: #fde8ed;

  --font-display: "Bricolage", "Onest", system-ui, sans-serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-garamond: "Cormorant", "Cormorant Garamond", Garamond, Georgia, serif;
  --font-script: "Great Vibes", "Snell Roundhand", "Segoe Script", cursive;
  --font-round: "Fredoka", "Nunito", "Varela Round", system-ui, sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;

  --shadow-print: 0 1px 2px rgb(20 14 38 / .12), 0 12px 28px -8px rgb(20 14 38 / .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shell: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.05; letter-spacing: -.02em; margin: 0; font-weight: 750; }
p { margin: 0; }
::selection { background: var(--marigold); color: var(--night); }

:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; border-radius: 4px; }

.i { width: 1.15em; height: 1.15em; flex: none; }
.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; }
.shell { width: min(100% - 40px, var(--shell)); margin-inline: auto; }
[hidden] { display: none !important; }

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-family: var(--font-display); font-weight: 750; font-size: 1.3rem; letter-spacing: -.03em; }
.brand .mark { width: 32px; height: 32px; color: var(--fucsia); }

/* ---------- Botones ---------- */
.btn {
  --btn-bg: var(--white);
  --btn-fg: var(--ink);
  --btn-bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: .7rem 1.25rem;
  border: 1.5px solid var(--btn-bd); border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 650; font-size: .98rem; line-height: 1.1; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: transform .15s var(--ease), background-color .15s, box-shadow .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn--primary { --btn-bg: var(--fucsia); --btn-fg: #fff; --btn-bd: var(--fucsia); box-shadow: 0 8px 22px -8px rgb(255 62 138 / .7); }
.btn--primary:hover { --btn-bg: var(--fucsia-deep); --btn-bd: var(--fucsia-deep); }
.btn--dark { --btn-bg: var(--night); --btn-fg: var(--flash); --btn-bd: var(--night); }
.btn--ghost { --btn-bg: transparent; --btn-fg: currentColor; --btn-bd: currentColor; }
.btn--quiet { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--ink-soft); padding-inline: .6rem; }
.btn--danger { --btn-bg: var(--bad-bg); --btn-fg: var(--bad); --btn-bd: transparent; }
.btn--sm { min-height: 38px; padding: .5rem 1rem; font-size: .9rem; }
.btn--lg { min-height: 56px; padding: .9rem 1.7rem; font-size: 1.06rem; }
.btn--block { width: 100%; }

/* ---------- Campos ---------- */
.field { display: grid; gap: .4rem; }
.field > span, .field__label { font-weight: 600; font-size: .92rem; }
.field small, .hint { color: var(--ink-soft); font-size: .85rem; }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=color]), .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .7rem .95rem;
  background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-md);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--fucsia); box-shadow: 0 0 0 4px rgb(255 62 138 / .15); }
.field.is-invalid input { border-color: var(--bad); }
.field input[type=color] { width: 56px; height: 44px; padding: 3px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--white); cursor: pointer; }

/* ---------- Avisos ---------- */
.alert { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--r-md); font-size: .95rem; }
.alert .i { margin-top: .15rem; }
.alert--bad { background: var(--bad-bg); color: var(--bad); }
.alert--ok { background: var(--ok-bg); color: var(--ok); }
.alert--warn { background: var(--warn-bg); color: var(--warn); }
.alert--info { background: #eeeafd; color: #4a3aa5; }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-radius: var(--r-md); background: var(--night); color: var(--flash); box-shadow: 0 14px 40px -10px rgb(0 0 0 / .5); font-size: .95rem; animation: toast-in .3s var(--ease); pointer-events: auto; }
.toast .i { color: var(--marigold); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

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