/* Propuesta: Aujournuit (Collletttivo, OFL) + composición tipo ficha de collletttivo.it:
 * tarjetas redondeadas en retícula, una amarilla con el título gigante, una gris con «Detalles»
 * en renglones con regla, y la píldora oscura abajo. Encima de base.css (el sitio actual). */
@font-face {
  font-family: "Aujournuit";
  src: url("fuentes/aujournuit.woff2") format("woff2");
  font-display: swap;
}
:root {
  --papel: #f6f5f2;     /* fondo: blanco roto */
  --gris: #efeeea;      /* tarjetas */
  --amarilla: #fde4a8;  /* la tarjeta del título; el amarillo del muro de Lili, aclarado */
  --tarjeta: #fbfaf7;
  --suave: #e7e5df;
  --tinta: #1d1b18;
  --oscura: #43413d;    /* la píldora */
  --linea: rgba(29, 27, 24, 0.85);
  --tenue: rgba(29, 27, 24, 0.55);
  --vestido: #c44f4f;
}
.app { background: var(--papel); }
body { color: var(--tinta); }

.barra {
  margin: max(12px, env(safe-area-inset-top)) 12px 0;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--gris);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
}
.barra .marca { font-weight: 600; letter-spacing: 0.04em; }
.barra a { color: var(--tinta); text-decoration: none; }

main.reticula {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px;
  align-items: start;
  justify-content: stretch;
}
.tarjeta { border-radius: 18px; padding: 20px; }
.amarilla { background: var(--amarilla); }
.gris { background: var(--gris); }

.titulo { display: flex; flex-direction: column; justify-content: space-between; min-height: 300px; }
.titulo h1 {
  margin: auto 0;
  font-family: "Aujournuit", serif;
  font-variation-settings: "wdth" 5;
  font-weight: 400;
  font-size: clamp(120px, 34vw, 300px);
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-align: center;
  padding: 24px 0 32px;
}
.titulo .sub {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--linea);
  font-size: 17px;
}

.detalles h2 { margin: 0 0 10px; font-size: 22px; font-weight: 500; }
.lineas { list-style: none; margin: 0 0 24px; padding: 0; }
.lineas li { padding: 9px 0; border-top: 1px solid var(--linea); font-size: 17px; }
.lineas li:last-child { border-bottom: 1px solid var(--linea); }
.lineas a { color: var(--tinta); }
.detalles .acciones { width: 100%; margin: 0; }
.pastilla.llena { background: var(--oscura); color: #fff; letter-spacing: 0.06em; text-transform: uppercase; font-size: 15px; }
.fila { background: var(--tarjeta); border-color: rgba(29, 27, 24, 0.2); }
button[type="submit"] { background: var(--suave); }

.portada-tarjeta { padding: 0; background: none; }
.portada-tarjeta .portada-caja { width: 100%; min-width: 0; }

.hoja, .grupo { background: var(--tarjeta); }
.grupo { background: var(--gris); }

@media (min-width: 900px) {
  main.reticula {
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr);
    grid-template-areas: "titulo detalles" "portada detalles";
  }
  .titulo { grid-area: titulo; min-height: 520px; padding: 24px; }
  .titulo h1 { font-size: clamp(160px, 17vw, 300px); }
  .detalles { grid-area: detalles; position: sticky; top: 12px; min-height: calc(100vh - 92px); display: flex; flex-direction: column; padding: 24px; }
  .detalles .acciones { margin-top: auto; }
  .portada-tarjeta { grid-area: portada; }
}
@media (max-width: 899px) {
  .titulo { order: 1; }
  .portada-tarjeta { order: 2; }
  .detalles { order: 3; }
}

/* Para comparar fuentes del título: ?fuente=vintage | nighthawk (por defecto Aujournuit). */
@font-face { font-family: "Vintage Propagandist"; src: url("fuentes/vintage-propagandist.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Nighthawk"; src: url("fuentes/nighthawk.woff2") format("woff2"); font-display: swap; } /* sin ñ, ¿¡, “” ni @: solo títulos */
html[data-fuente="vintage"] .titulo h1 { font-family: "Vintage Propagandist", serif; font-variation-settings: normal; letter-spacing: 0; }
html[data-fuente="nighthawk"] .titulo h1 { font-family: "Nighthawk", sans-serif; font-variation-settings: normal; letter-spacing: 0; font-size: clamp(110px, 28vw, 260px); }
@font-face { font-family: "Wavy"; src: url("fuentes/wavy.woff2") format("woff2"); font-display: swap; }
html[data-fuente="wavy"] .titulo h1 { font-family: "Wavy", serif; font-variation-settings: normal; letter-spacing: 0; }
/* Heal the Web (Rainbow Unicorn, MPL). Métricas corregidas (playbook 50 §2): mayúsculas 1434 de 2048,
 * alto de línea 2048 (typo 1577/−471) → d = 307 → ascent 85 %, descent 15 %. */
@font-face { font-family: "Heal the Web A"; src: url("fuentes/heal-a.woff2") format("woff2"); font-display: swap; ascent-override: 85%; descent-override: 15%; line-gap-override: 0%; }
@font-face { font-family: "Heal the Web B"; src: url("fuentes/heal-b.woff2") format("woff2"); font-display: swap; ascent-override: 85%; descent-override: 15%; line-gap-override: 0%; }
html[data-fuente="heal-a"] .titulo h1 { font-family: "Heal the Web A", serif; font-variation-settings: normal; letter-spacing: 0; }
html[data-fuente="heal-b"] .titulo h1 { font-family: "Heal the Web B", serif; font-variation-settings: normal; letter-spacing: 0; }

@font-face { font-family: "EB Garamond SC08"; src: url("fuentes/eb-sc08.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "EB Garamond 12"; src: url("fuentes/eb-12.woff2") format("woff2"); font-display: swap; }
html[data-fuente="eb-sc"] .titulo h1 { font-family: "EB Garamond SC08", serif; font-variation-settings: normal; letter-spacing: 0.02em; }
html[data-fuente="eb"] .titulo h1 { font-family: "EB Garamond 12", serif; font-variation-settings: normal; letter-spacing: 0; }

/* Elegida por Roberto: Heal the Web B en títulos, Heal the Web A en el cuerpo. Un solo grosor: sin negritas inventadas. */
body, button, input { font-family: "Heal the Web A", system-ui, sans-serif; font-synthesis: none; }
.barra .marca, .detalles h2, .pastilla, button[type="submit"], .hecho-vista, .hoja-cabeza strong, .probador button { font-weight: 400; }
.detalles h2, .hoja-cabeza strong { font-family: "Heal the Web B", serif; }
.detalles h2 { font-size: 26px; }
.hoja-cabeza strong { font-size: 24px; }

/* El título se puede escribir, como el probador de collletttivo.it */
.titulo { container-type: inline-size; }
.titulo h1.probar { outline: none; overflow-wrap: break-word; cursor: text; caret-color: var(--vestido); -webkit-user-select: text; user-select: text; }
.titulo h1.probar:empty::before { content: "Casa"; opacity: 0.3; }
@font-face { font-family: "W Droge"; src: url("fuentes/w-droge.woff2") format("woff2"); font-display: swap; } /* sin ñ, “” ni @: solo títulos */
html[data-fuente="w-droge"] .titulo h1 { font-family: "W Droge", sans-serif; font-variation-settings: normal; letter-spacing: 0; }


/* Probador dentro de la tarjeta, como collletttivo: menú, deslizadores y juegos alternativos */
.titulo h1 { font-feature-settings: var(--ss, normal); white-space: normal; }
.controles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--linea);
}
.controles select {
  appearance: none; -webkit-appearance: none;
  width: 100%; padding: 9px 36px 9px 14px;
  border: 1px solid rgba(29, 27, 24, 0.35); border-radius: 10px;
  background: rgba(255, 255, 255, 0.5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231d1b18' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") right 12px center / 12px no-repeat;
  font: inherit; font-size: 15px; color: var(--tinta);
}
.deslizadores { display: grid; gap: 8px; }
.deslizadores label { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 12px; font-size: 15px; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; touch-action: pan-y;
}
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: rgba(29, 27, 24, 0.12); }
input[type="range"]::-moz-range-track { height: 8px; border-radius: 4px; background: rgba(29, 27, 24, 0.12); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -7px; border-radius: 50%; background: var(--oscura); border: 0; }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--oscura); border: 0; }
.juegos { display: none; flex-wrap: wrap; gap: 6px; }
html[data-fuente="heal-b"] .juegos { display: flex; }
.juegos button {
  padding: 7px 12px; border: 1px solid rgba(29, 27, 24, 0.35); border-radius: 999px; background: transparent;
  color: var(--tinta); font: inherit; font-size: 13px; cursor: pointer;
}
.juegos button[aria-pressed="true"] { background: var(--oscura); border-color: var(--oscura); color: #fff; }
@media (min-width: 900px) {
  .controles { grid-template-columns: 220px 1fr; align-items: start; column-gap: 24px; }
  .juegos { grid-column: 2; }
}
