/* DTL 2.0 — premium editorial pass */
:root {
  --paper: #f3efe7;
  --gold: #b89a5c;
  --gold-light: #ddc78f;
  --line: rgba(191, 160, 94, .22);
}

body {
  background: #070707;
}

body::before {
  position: fixed;
  z-index: 200;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: .045;
  background-image:
    repeating-radial-gradient(circle at 18% 27%, rgba(255,255,255,.7) 0 1px, transparent 1px 4px),
    repeating-radial-gradient(circle at 76% 61%, rgba(255,255,255,.45) 0 1px, transparent 1px 5px);
  background-size: 31px 29px, 37px 41px;
  mix-blend-mode: soft-light;
}

.reading-progress {
  position: fixed;
  z-index: 300;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,.03);
  pointer-events: none;
}

.reading-progress i {
  width: 0;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, #755f36, var(--gold-light));
  box-shadow: 0 0 14px rgba(221,199,143,.35);
  transition: width .08s linear;
}

.site-header {
  box-shadow: inset 0 1px rgba(255,255,255,.018);
}

.desktop-nav a:not(.nav-authors) {
  position: relative;
  padding-block: 8px;
}

.desktop-nav a:not(.nav-authors)::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  content: "";
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}

.desktop-nav a:not(.nav-authors):hover::after,
.desktop-nav a:not(.nav-authors)[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(115deg, transparent 32%, rgba(222,199,143,.035) 48%, transparent 64%);
  pointer-events: none;
}

.hero-lead {
  max-width: 680px;
  line-height: 1.65;
}

.button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.button::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.23) 48%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .75s cubic-bezier(.2,.7,.2,1);
}

.button:hover::before { transform: translateX(120%); }

.catalogue-priority {
  padding-top: clamp(118px, 12vw, 168px);
  border-bottom: 1px solid rgba(191,160,94,.1);
  background:
    radial-gradient(ellipse at 50% -15%, rgba(126,101,54,.1), transparent 44%),
    #0a0a09;
}

.catalogue-priority::before { content: "BIBLIOTECA · 01"; }

.catalogue-priority .section-heading {
  max-width: 820px;
}

.catalogue-priority .section-heading h2 {
  max-width: 720px;
}

.manifesto::before { content: "MANIFIESTO · 02"; }
.archive-preview::before { content: "ARCHIVO · 03"; }
.worlds::before { content: "UNIVERSOS · 04"; }
.entre-preview::before { content: "ENTRE PÁGINAS · 05"; }
.authors-preview::before { content: "AUTORES · 06"; }

.books-grid {
  counter-reset: dtl-book;
}

.book {
  position: relative;
  counter-increment: dtl-book;
}

.book::before {
  position: absolute;
  z-index: 4;
  top: 12px;
  left: 12px;
  content: counter(dtl-book, decimal-leading-zero);
  color: rgba(243,239,231,.72);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .18em;
  text-shadow: 0 1px 8px rgba(0,0,0,.8);
  transition: color .3s ease;
}

.book-cover {
  border: 1px solid rgba(225,200,143,.12);
  background: #171714;
  box-shadow: 0 26px 60px rgba(0,0,0,.28);
  transition: transform .55s cubic-bezier(.18,.72,.2,1), border-color .35s ease, box-shadow .55s ease;
}

.book-cover::before {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 38%;
  display: flex;
  align-items: flex-end;
  padding: 18px 15px;
  content: attr(data-whisper);
  color: rgba(243,239,231,.9);
  background: linear-gradient(0deg, rgba(5,5,5,.94), rgba(5,5,5,.68) 58%, transparent);
  font: italic 18px/1.12 var(--serif);
  letter-spacing: .01em;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .38s ease, transform .48s cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
}

.book-cover::after {
  z-index: 3;
  background: linear-gradient(125deg, transparent 22%, rgba(255,255,255,.08) 43%, transparent 61%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  opacity: .45;
  transition: opacity .35s ease;
}

.book:hover .book-cover,
.book:focus-visible .book-cover {
  border-color: rgba(225,200,143,.35);
  box-shadow: 0 34px 78px rgba(0,0,0,.48), 0 0 0 1px rgba(191,160,94,.06);
  transform: translateY(-9px);
}

.book:hover .book-cover::before,
.book:focus-visible .book-cover::before {
  opacity: 1;
  transform: none;
}

.book:hover::before,
.book:focus-visible::before { color: var(--gold-light); }

.book h3 {
  transition: color .25s ease;
}

.book:hover h3,
.book:focus-visible h3 { color: var(--gold-light); }

.world-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.world-card,
.world-card:first-child,
.world-card:nth-child(2) {
  min-height: 500px;
  grid-column: auto;
  border: 1px solid rgba(54,45,33,.12);
}

.world-card img,
.world-card:first-child img,
.world-card:not(:first-child) img {
  object-fit: contain;
  object-position: center;
  padding: 42px 26px 122px;
  background: radial-gradient(circle at 50% 38%, #2a2721, #0a0a09 72%);
}

.world-card::before {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(221,199,143,.28);
  border-radius: 50%;
  content: "↗";
  color: rgba(221,199,143,.68);
  font-size: 10px;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity .3s ease, transform .35s ease;
}

.world-card:hover::before,
.world-card:focus-visible::before {
  opacity: 1;
  transform: none;
}

.world-card::after {
  background: linear-gradient(0deg, rgba(0,0,0,.97) 0%, rgba(0,0,0,.74) 28%, transparent 65%);
}

.world-info { padding: 28px 24px; }
.world-info h3 { font-size: clamp(30px, 2.7vw, 42px); }
.world-info span { line-height: 1.5; }

.dossier {
  border-color: rgba(191,160,94,.16);
  box-shadow: 0 24px 55px rgba(0,0,0,.16);
}

.dossier.is-locked::before {
  position: absolute;
  z-index: 3;
  top: 20px;
  right: 20px;
  content: "SELLADO";
  color: rgba(221,199,143,.65);
  font-size: 8px;
  letter-spacing: .22em;
}

.secret-trigger {
  margin: 0 0 0 5px;
  padding: 4px;
  border: 0;
  color: rgba(221,199,143,.24);
  background: transparent;
  font-size: 10px;
  cursor: pointer;
  transition: color .3s ease, transform .3s ease;
}

.secret-trigger:hover,
.secret-trigger:focus-visible {
  color: var(--gold-light);
  transform: rotate(45deg);
}

.dtl-secret {
  width: min(620px, calc(100vw - 36px));
  padding: clamp(36px, 6vw, 66px);
  border: 1px solid rgba(221,199,143,.3);
  color: var(--paper);
  background:
    radial-gradient(circle at 50% 0%, rgba(151,119,58,.12), transparent 48%),
    #0a0a09;
  box-shadow: 0 45px 130px rgba(0,0,0,.8);
  text-align: center;
}

.dtl-secret::backdrop {
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(8px);
}

.dtl-secret .eyebrow { margin-bottom: 25px; }

.dtl-secret h2 {
  margin: 0;
  font: 400 clamp(34px, 5vw, 52px)/.98 var(--serif);
  letter-spacing: -.025em;
  text-wrap: balance;
}

.dtl-secret > p:last-child {
  max-width: 430px;
  margin: 24px auto 0;
  color: #8f887d;
  font-size: 12px;
  letter-spacing: .06em;
}

.secret-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 35px;
  height: 35px;
  border: 0;
  color: #80786c;
  background: transparent;
  font: 300 25px/1 var(--sans);
  cursor: pointer;
}

@media (max-width: 1060px) {
  .world-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .hero-lead { max-width: 520px; }
  .world-card,
  .world-card:first-child,
  .world-card:nth-child(2) { min-height: 470px; grid-column: auto; }
  .book-cover::before { font-size: 17px; }
}

@media (max-width: 560px) {
  body::before { opacity: .025; }
  .hero-lead { max-width: 390px; font-size: 9px; line-height: 1.8; }
  .catalogue-priority { padding-top: 110px; }
  .book::before { top: 9px; left: 9px; font-size: 7px; }
  .book-cover::before { min-height: 44%; padding: 13px 11px; font-size: 15px; }
  .world-grid { display: grid; grid-template-columns: 1fr; }
  .world-card,
  .world-card:first-child,
  .world-card:nth-child(2) { min-height: 500px; margin: 0; }
  .world-card img,
  .world-card:first-child img,
  .world-card:not(:first-child) img { padding: 34px 34px 120px; }
  .dtl-secret { padding: 48px 24px 40px; }
}

@media (hover: none) {
  .book-cover::before { display: none; }
  .book:hover .book-cover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reading-progress i { transition: none; }
  .button::before { display: none; }
}
