/*
  base.css · Lo que comparten el sitio y el panel: colores, tipografía, botones, formularios y avisos.
  Orden: 1 tokens · 2 reinicio · 3 tipografía · 4 utilidades · 5 botones · 6 formularios · 7 etiquetas · 8 avisos · 9 diálogos
  Regla: ningún color suelto en los demás archivos; todo sale de estas variables.
*/

/* ---------- 1. Tokens (rojo y vino del logotipo) ---------- */
:root {
  --rojo: #b20310;
  --rojo-osc: #8e020c;
  --vino: #540e0c;
  --vino-osc: #3a0908;
  --rojo-suave: #fbeceb;

  --fondo: #fff;
  --fondo-2: #faf6f5;
  --linea: #eaddda;
  --texto: #2a1615;
  --mut: #6b5351;       /* 6.6:1 sobre blanco */
  --ok: #17703c;
  --ok-suave: #e7f4ec;
  --aviso: #8a5200;
  --aviso-suave: #fdf1dc;

  --display: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --cuerpo: 'Figtree', 'Segoe UI', system-ui, sans-serif;

  --r: 12px;
  --r-sm: 8px;
  --sombra: 0 1px 2px rgb(84 14 12 / .06), 0 8px 24px rgb(84 14 12 / .08);
  --ancho: 1180px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- 2. Reinicio ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; font: 400 1rem/1.6 var(--cuerpo); color: var(--texto); background: var(--fondo); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
fieldset { min-width: 0; padding: 0; border: 0; }
legend { padding: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--rojo); outline-offset: 2px; border-radius: 4px; }

/* ---------- 3. Tipografía ---------- */
h1, h2, h3, .h1, .h2, .h3 { font-family: var(--display); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; color: var(--vino); text-wrap: balance; }
h1, .h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); }
h2, .h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3, .h3 { font-size: 1.15rem; font-weight: 700; }
.sobre { font: 700 .78rem/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--rojo); }
.intro { font-size: 1.1rem; color: var(--mut); max-width: 62ch; }
.mut { color: var(--mut); }
.chico { font-size: .9rem; }
.enlace { color: var(--rojo); font-weight: 600; text-underline-offset: 3px; }
.enlace:hover { color: var(--rojo-osc); }

/* ---------- 4. Utilidades ---------- */
.ancho { width: min(100% - 32px, var(--ancho)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pila { display: grid; gap: 16px; align-content: start; }
.fila { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.entre { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Color oficial de cada red social (los iconos del pie y de Contacto, y la vista previa del panel). */
.red-facebook { --red: #0866ff; } .red-instagram { --red: #e4405f; } .red-tiktok { --red: #000; } .red-youtube { --red: #f00; }
.red-x { --red: #000; } .red-linkedin { --red: #0a66c2; } .red-threads { --red: #000; } .red-pinterest { --red: #bd081c; } .red-whatsapp { --red: #1fa855; }
.vacio { padding: 40px 20px; text-align: center; color: var(--mut); border: 1px dashed var(--linea); border-radius: var(--r); background: var(--fondo-2); }

/* ---------- 5. Botones (mínimo 44 px de alto para el dedo) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 22px; border-radius: 999px; font: 700 .95rem/1.2 var(--display); text-decoration: none; text-align: center; border: 2px solid transparent; transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease); }
.btn:active { transform: scale(.97); }
.btn-1 { background: var(--rojo); color: #fff; }
.btn-1:hover { background: var(--rojo-osc); }
.btn-2 { border-color: var(--vino); color: var(--vino); background: transparent; }
.btn-2:hover { background: var(--vino); color: #fff; }
.btn-3 { background: var(--rojo-suave); color: var(--rojo-osc); }
.btn-3:hover { background: #f5d9d7; }
.btn-claro { background: #fff; color: var(--vino); }
.btn-claro:hover { background: var(--rojo-suave); }
.btn-sm { min-height: 44px; padding: 8px 16px; font-size: .88rem; }
.btn-bloque { width: 100%; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .55; cursor: not-allowed; }
.iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--vino); transition: background-color .2s; }
.iconbtn:hover { background: var(--rojo-suave); }

/* ---------- 6. Formularios ---------- */
.form { display: grid; gap: 16px; }
.campo { display: grid; gap: 6px; }
.campo > label, .campo > .lbl { font-weight: 600; font-size: .95rem; }
.campo .ayuda { font-size: .88rem; color: var(--mut); }
.entrada { width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid #cdbab7; border-radius: var(--r-sm); background: #fff; transition: border-color .2s, box-shadow .2s; }
.entrada:hover { border-color: var(--vino); }
.entrada:focus { outline: none; border-color: var(--rojo); box-shadow: 0 0 0 3px rgb(178 3 16 / .18); }
textarea.entrada { min-height: 110px; resize: vertical; }
select.entrada { appearance: none; padding-right: 40px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23540e0c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px; }
.dos { display: grid; gap: 16px; align-items: start; }
@media (min-width: 640px) { .dos { grid-template-columns: 1fr 1fr; } }
.marca-opcion { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding-block: 8px; cursor: pointer; }
.marca-opcion input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--rojo); }
.error { color: var(--rojo); font-weight: 600; font-size: .92rem; }
.error:empty { display: none; }
/* Campo trampa para bots: fuera de la vista y del teclado. */
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 7. Etiquetas de estado (siempre con texto, nunca solo color) ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; background: var(--fondo-2); color: var(--mut); border: 1px solid var(--linea); }
.pill.ok { background: var(--ok-suave); color: var(--ok); border-color: transparent; }
.pill.aviso { background: var(--aviso-suave); color: var(--aviso); border-color: transparent; }
.pill.rojo { background: var(--rojo-suave); color: var(--rojo-osc); border-color: transparent; }
.pill.vino { background: var(--vino); color: #fff; border-color: transparent; }

/* ---------- 8. Avisos temporales ---------- */
.avisos { position: fixed; inset: auto 16px 16px; z-index: 60; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.aviso-t { pointer-events: auto; display: flex; gap: 14px; align-items: center; max-width: 480px; padding: 12px 18px; border-radius: var(--r); background: var(--vino-osc); color: #fff; box-shadow: var(--sombra); animation: sube .3s var(--ease); }
.aviso-t a { color: #fff; font-weight: 700; white-space: nowrap; }
@keyframes sube { from { opacity: 0; transform: translateY(12px); } }

/* ---------- 9. Diálogos ---------- */
dialog.hoja { width: min(100% - 32px, 640px); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 16px; box-shadow: var(--sombra); color: var(--texto); overflow: auto; }
dialog.hoja::backdrop { background: rgb(42 22 21 / .55); }
.hoja-in { display: grid; gap: 18px; padding: 24px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.acciones-c { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acciones-c.centro { justify-content: center; }
.captcha { min-height: 65px; }
