/* Diccionario Constitucional Chileno — paleta tomada de la portada: tinta negra, papel antiguo, globo blanco. */
:root {
  --papel: #efece5;
  --papel-2: #e2ded4;
  --blanco: #ffffff;
  --tinta: #161616;
  --gris: #474747;       /* 8,4:1 sobre --papel */
  --linea: #cfc9bc;
  --titulo: "Avenir Next", "Montserrat", "Futura", "Helvetica Neue", Arial, sans-serif;
  --texto: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --ancho: 1100px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papel); color: var(--tinta); font: 18px/1.65 var(--texto); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tinta); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--tinta); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--titulo); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.saltar { position: absolute; left: -999px; top: 0; background: var(--tinta); color: var(--blanco); padding: .5em 1em; z-index: 20; }
.saltar:focus { left: 1rem; }
.envoltura { max-width: var(--ancho); margin: 0 auto; padding: 0 22px; }
.bloque { padding-top: 72px; padding-bottom: 72px; }
.antetitulo { font-family: var(--titulo); text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; font-weight: 600; color: var(--gris); margin-bottom: .8em; }

/* Cabecera */
.cabecera { background: var(--papel); border-bottom: 1px solid var(--linea); position: sticky; top: 0; z-index: 10; }
.cabecera-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--titulo); text-transform: uppercase; font-size: .68rem; line-height: 1.1; letter-spacing: .08em; }
.marca b { font-size: .95rem; letter-spacing: .04em; }
.globo { width: 40px; height: 37px; color: var(--tinta); flex: none; }
.menu { display: flex; gap: .2rem; flex-wrap: wrap; font-family: var(--titulo); font-size: .9rem; font-weight: 500; }
.menu a { text-decoration: none; padding: .35em .7em; border-radius: 999px; }
.menu a:hover { background: var(--blanco); }

/* Portada */
.hero { background:
    repeating-linear-gradient(0deg, rgba(22,22,22,.035) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, var(--papel-2), var(--papel));
  border-bottom: 1px solid var(--linea); }
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.entrada { font-size: 1.2rem; }
.autores-linea { font-family: var(--titulo); font-size: .9rem; color: var(--gris); letter-spacing: .02em; }
.botones { display: flex; flex-wrap: wrap; gap: .7em; margin-top: 1.6em; }
.boton { font-family: var(--titulo); font-weight: 600; font-size: .95rem; display: inline-block; padding: .75em 1.4em; border-radius: 999px; background: var(--tinta); color: var(--blanco); text-decoration: none; border: 2px solid var(--tinta); }
.boton:hover { background: #333; border-color: #333; color: var(--blanco); }
.boton-sec { background: var(--blanco); color: var(--tinta); }
.boton-sec:hover { background: var(--tinta); color: var(--blanco); }
.hero-portada { margin: 0; justify-self: center; max-width: 380px; transform: rotate(1.2deg); }
.hero-portada img { box-shadow: 0 2px 0 rgba(0,0,0,.08), 0 24px 50px rgba(22,22,22,.25); border-radius: 2px; }

/* El libro */
.dos-col { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; }
.prosa { max-width: 40em; }
.enlaces-libro { display: flex; flex-wrap: wrap; gap: .5em 1.6em; font-family: var(--titulo); font-size: .92rem; font-weight: 600; margin-top: 1.4em; }

/* Franjas alternas */
.franja { background: var(--blanco); border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); }
.entrada-sec { color: var(--gris); max-width: 40em; }

/* Infografías */
.infografias-grupo, #infografias h3 { font-family: var(--titulo); text-transform: uppercase; letter-spacing: .1em; font-size: .82rem; margin: 2.2em 0 1em; color: var(--gris); }
.infos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.info { display: flex; flex-direction: column; height: 100%; text-decoration: none; background: var(--blanco); border: 1px solid var(--linea); border-radius: 18px 18px 18px 4px; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.info:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(22,22,22,.12); }
.info-img { height: 210px; overflow: hidden; background: var(--papel-2); display: flex; align-items: flex-start; justify-content: center; }
.info-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.info-sin-imagen { font-family: var(--texto); font-size: 5rem; color: var(--gris); align-self: center; }
.info-titulo { font-family: var(--titulo); font-weight: 600; font-size: .95rem; line-height: 1.25; padding: .8em .9em .2em; }
.info-meta { font-family: var(--titulo); font-size: .75rem; color: var(--gris); padding: 0 .9em .9em; margin-top: auto; }

/* Autores */
.autores { display: grid; gap: 40px; margin-top: 1.6em; }
.autor { display: grid; grid-template-columns: 150px 1fr; gap: 28px; align-items: start; }
.autor img { width: 150px; height: 150px; object-fit: cover; object-position: top; border-radius: 50%; filter: grayscale(1); border: 4px solid var(--blanco); box-shadow: 0 0 0 1px var(--linea); }
.autor h3 { font-size: 1.3rem; margin-top: .3em; }
.autor p { max-width: 44em; }
.autor a { font-family: var(--titulo); font-weight: 600; font-size: .9rem; }

/* Prensa */
.prensas { list-style: none; padding: 0; margin: 1.6em 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.prensa { display: flex; flex-direction: column; height: 100%; text-decoration: none; background: var(--papel); border: 1px solid var(--linea); border-radius: 4px; overflow: hidden; }
a.prensa:hover .prensa-medio { text-decoration: underline; }
.prensa-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--papel-2); }
.prensa-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; filter: grayscale(1) contrast(1.05); }
.prensa-medio { font-family: var(--titulo); font-weight: 600; font-size: .95rem; padding: .8em .9em .1em; line-height: 1.3; }
.prensa-fecha { font-size: .85rem; color: var(--gris); padding: 0 .9em .9em; }

/* Descargas */
.descargas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 1.4em; }
.descarga { display: flex; flex-direction: column; gap: .3em; padding: 1.2em 1.4em; background: var(--blanco); border: 1px solid var(--linea); border-radius: 22px 22px 22px 4px; text-decoration: none; }
.descarga:hover { border-color: var(--tinta); }
.franja .descarga:not(.destacada) { background: var(--papel); }
.descarga.destacada { background: var(--tinta); color: var(--blanco); border-color: var(--tinta); }
.descarga.destacada .d-meta { color: #d6d6d6; }
.d-tit { font-family: var(--titulo); font-weight: 700; font-size: 1.05rem; }
.d-tit::before { content: "↓ "; }
.d-meta { font-size: .9rem; color: var(--gris); }

.contacto { padding-top: 0; }
.contacto h2 { font-size: 1.4rem; }

/* Pie */
.pie { background: var(--tinta); color: #d9d9d9; font-size: .88rem; }
.pie a { color: var(--blanco); }
.pie-in { padding-top: 28px; padding-bottom: 28px; }
.pie p { margin: 0 0 .4em; }

@media (max-width: 820px) {
  body { font-size: 17px; }
  .hero-in { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; padding-bottom: 48px; }
  .hero-portada { max-width: 250px; order: -1; }
  .dos-col { grid-template-columns: 1fr; gap: 8px; }
  .descargas { grid-template-columns: 1fr; }
  .cabecera { position: static; }
  .bloque { padding-top: 52px; padding-bottom: 52px; }
}
@media (max-width: 520px) {
  .autor { grid-template-columns: 1fr; gap: 12px; }
  .autor img { width: 110px; height: 110px; }
  .infos { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .info-img { height: 170px; }
  .prensas { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .menu { font-size: .85rem; }
  .menu a { padding: .3em .5em; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .info { transition: none; } }
