/* ════════════════════════════════════════════════════
   base.css — variables globales, reset, layout base
   Rediseño (sesión 2) a partir de assets/tps_logo.png: paleta cálida/terrosa
   (dorado + terracota sobre marrón casi negro), tipografía Fraunces/Nunito.
   El bisel (chaflán) en la esquina superior derecha del scaffold original SÍ
   se mantuvo — se probó reemplazarlo por esquinas redondeadas y el usuario
   prefirió el corte anguloso original, ver CLAUDE.md §9.
════════════════════════════════════════════════════ */
:root {
  --bg:          #110c07;
  --bg2:         #1a130b;
  --bg3:         #251b10;
  --borde:       #3a2a18;
  --texto:       #d9c7ac;
  --texto-tenue: #8c795f;
  --texto-brillante: #f5ead4;

  --acento:       #e0a63a; /* dorado — el sol al centro del logo */
  --acento-2:     #b5602e; /* terracota — corteza/tierra del logo */
  --acento-tenue: rgba(224, 166, 58, 0.12);
  --acento-texto: #241505;
  --glow:         0 0 14px rgba(224, 166, 58, 0.35);
  --glow-2:       0 0 14px rgba(181, 96, 46, 0.35);

  --fuente-display: 'Fraunces', ui-serif, Georgia, serif;
  --fuente: 'Nunito', ui-sans-serif, system-ui, sans-serif;

  /* Esquina en bisel (bevel), solo la superior derecha — se mantuvo del
     scaffold original a pedido del usuario tras probar el redondeo completo
     y preferir el corte anguloso. Un solo tamaño: botones, chips, campos,
     toast. */
  --cut: 7px;
  --chaflan: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);

  --gap-s: clamp(8px, 2vw, 12px);
  --gap-m: clamp(14px, 3vw, 22px);
  --gap-l: clamp(24px, 5vw, 44px);

  color-scheme: only dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--texto);
  font-family: var(--fuente);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select { font-family: inherit; }

/* ── Botones ──────────────────────────────── */
.tp-boton {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--texto);
  background: var(--bg3);
  border: 1px solid var(--borde);
  clip-path: var(--chaflan);
  padding: 10px 16px;
  cursor: pointer;
  transition: border-color .15s, color .15s, filter .15s, box-shadow .15s;
  white-space: nowrap;
}
.tp-boton:hover { border-color: var(--acento); color: var(--acento); box-shadow: var(--glow); }
.tp-boton--primario { background: var(--acento); border-color: var(--acento); color: var(--acento-texto); }
.tp-boton--primario:hover { filter: brightness(1.08); color: var(--acento-texto); }
.tp-boton--fantasma { background: transparent; border-color: transparent; color: var(--texto-tenue); }
.tp-boton--fantasma:hover { color: var(--texto); border-color: var(--borde); box-shadow: none; }
.tp-boton--bloqueado { opacity: .5; cursor: not-allowed; }
.tp-boton--bloqueado:hover { border-color: var(--borde); color: var(--texto); box-shadow: none; }
.tp-boton:disabled { opacity: .6; cursor: wait; }

/* ── Interruptor de píldora ──
   Usado por el toggle de grilla. Pastilla + perilla; brillo dorado al activar. */
.tp-sw {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 0;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--texto-tenue);
  transition: color .18s;
}
.tp-sw__track {
  position: relative;
  width: 30px; height: 15px;
  border-radius: 999px;
  background: var(--bg3);
  border: 1px solid var(--borde);
  transition: background .2s ease, border-color .2s ease;
  flex-shrink: 0;
}
.tp-sw__knob {
  position: absolute;
  top: 1px; left: 1px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--texto-tenue);
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), background .2s ease;
}
.tp-sw.is-on { color: var(--texto-brillante); }
.tp-sw.is-on .tp-sw__track { background: color-mix(in srgb, var(--acento) 25%, var(--bg3)); border-color: var(--acento); }
.tp-sw.is-on .tp-sw__knob { transform: translateX(15px); background: var(--acento); box-shadow: 0 0 6px var(--acento); }
.tp-sw:focus-visible { outline: 2px solid var(--acento); outline-offset: 3px; }
