/* Base de la demo de Lote 14 (plantilla de demos de Cortex). Tokens en :root; decisiones en docs/decisiones-visuales.md */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("fonts/archivo-latin.woff2") format("woff2");
}

:root {
  /* — Lote 14: mostrador de barrio — */
  --ink: oklch(0.24 0.02 60);
  --paper: oklch(0.93 0.017 80);
  --surface: oklch(0.99 0.006 85);
  --accent: oklch(0.47 0.08 125); /* oliva de la etiqueta de Lote 14 */
  --accent-soft: oklch(0.92 0.045 120);
  --accent-texto: oklch(0.42 0.08 125); /* oliva para texto chico: AA sobre el peor píxel del fondo de mensajes */
  --muted: oklch(0.45 0.02 60);
  --line: oklch(0.86 0.015 75);
  --font-display: "Archivo", system-ui, sans-serif;
  --font-text: "Archivo", system-ui, sans-serif;
  --texture: url("fondo-mensajes.svg"); /* burbujas de chat tono sobre tono: scripts/fondo-mensajes.mjs */
  --veil: transparent;
  --glass-blur: 2px;
  /* — fijos — */
  --radius: 14px;
  --glass-bg: color-mix(in oklch, var(--surface) 72%, transparent);
  --glass-border: color-mix(in oklch, white 38%, transparent);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 400 1rem/1.55 var(--font-text);
  text-rendering: optimizeLegibility;
}
/* Fondo en una capa fija: background-attachment: fixed no anda en iOS */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgb(60 45 30 / 0.12)),
    linear-gradient(var(--veil), var(--veil)),
    var(--texture) 0 0 / 960px repeat,
    var(--paper);
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
a {
  color: inherit;
}
button,
input {
  font: inherit;
  color: inherit;
}
/* Foco visible con contraste también sobre el vidrio claro; respeta el radio del elemento (píldoras). */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Vidrio sólo en la capa que flota (liquid-glass-bien-hecho.md) */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1px 0 color-mix(in oklch, white 50%, transparent),
    0 10px 28px -14px rgb(0 0 0 / 0.35);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: color-mix(in oklch, var(--surface) 95%, transparent);
  }
}
/* Windows con "efectos de transparencia" apagados da reduce: tinte denso, nunca una caja sólida que tape el fondo */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .glass {
    background: color-mix(in oklch, var(--surface) 88%, transparent);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-color: var(--line);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0 1.1em;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s var(--ease);
}
.btn:active {
  transform: scale(0.97);
}
@media (hover: hover) {
  .btn:hover {
    background: color-mix(in oklch, var(--ink) 86%, var(--accent));
  }
  .btn.quiet:hover {
    background: color-mix(in oklch, var(--surface) 70%, transparent);
    border-color: var(--ink);
  }
}
.btn.quiet {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

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