/* DeadCenterApps Books - "Books That Bite Back". Builds on /assets/css/dca.css. */

/* ---------- hero ---------- */
.bk-hero { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); padding: clamp(4rem, 10vw, 7rem) 0 clamp(2.5rem, 6vw, 4rem); text-align: center; }
.bk-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url(/images/web/hero-emblem.jpg) center 35%/cover no-repeat; opacity: .28; filter: saturate(.7) blur(2px); }
.bk-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(ellipse 55% 60% at 50% 40%, rgba(9, 6, 10, .2), rgba(9, 6, 10, .9) 72%),
  linear-gradient(180deg, rgba(9, 6, 10, .6), rgba(9, 6, 10, .97)); }
.bk-hero h1 { font-size: clamp(2.4rem, 7vw, 5rem); margin: 0 0 .2rem; text-shadow: 0 4px 0 #000, 0 0 30px rgba(0, 0, 0, .9); }
.bk-hero .slogan { font-size: clamp(1.3rem, 4vw, 2.6rem); margin: 0 0 1rem; }
.bk-hero .lead { margin-inline: auto; }

/* ---------- the magazine rack ---------- */
.rack-wrap { padding: clamp(2.5rem, 6vw, 4.5rem) 0 5rem; background:
  radial-gradient(ellipse 70% 40% at 50% 0%, rgba(193, 18, 31, .12), transparent 70%), #0b0709; }
.rack {
  --per: 5;
  position: relative; margin-inline: auto; max-width: 1100px;
  padding: 3.6rem clamp(.8rem, 3vw, 2.2rem) 1.6rem;
  border-radius: 14px 14px 6px 6px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #2a1a14, #1a0f0c 60%, #140b09);
  border: 3px solid #3d2a22;
  box-shadow: inset 0 0 0 6px #120a08, inset 0 0 60px rgba(0, 0, 0, .8), 0 40px 80px rgba(0, 0, 0, .7);
}
/* iron posts */
.rack::before, .rack::after { content: ""; position: absolute; top: -12px; bottom: -24px; width: 16px; border-radius: 6px;
  background: linear-gradient(90deg, #1b1b1f, #55565c 45%, #1b1b1f); box-shadow: 0 6px 18px rgba(0, 0, 0, .8); }
.rack::before { left: -10px; } .rack::after { right: -10px; }
.rack-sign {
  position: absolute; top: -26px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  padding: .55rem 1.4rem .45rem; border-radius: 10px; background: #0c0608; border: 2px solid #5a1520;
  font: 400 clamp(.95rem, 2.6vw, 1.35rem)/1 var(--scream); color: #ff4b5e; letter-spacing: .04em;
  text-shadow: 0 0 6px #ff1e3c, 0 0 18px rgba(255, 30, 60, .8), 0 0 40px rgba(255, 30, 60, .5);
  box-shadow: 0 0 24px rgba(255, 30, 60, .35), inset 0 0 12px rgba(255, 30, 60, .2);
  animation: neon 6s infinite;
}
@keyframes neon { 0%, 91%, 95%, 100% { opacity: 1; } 92%, 94% { opacity: .55; } }

.shelf { position: relative; display: grid; grid-template-columns: repeat(var(--per), 1fr); gap: clamp(.6rem, 2.2vw, 1.6rem);
  align-items: end; padding: 1.4rem clamp(.4rem, 1.5vw, 1rem) 0; min-height: 120px; }
.shelf + .shelf { margin-top: 2.4rem; }
/* slanted back board of each pocket row */
.shelf::before { content: ""; position: absolute; inset: 0 0 18px; border-radius: 4px; z-index: 0;
  background: linear-gradient(180deg, #24140f, #160c09); box-shadow: inset 0 10px 18px rgba(0, 0, 0, .7); }
/* the front wire/lip that holds the magazines */
.shelf::after { content: ""; position: absolute; left: -6px; right: -6px; bottom: 0; height: 30px; z-index: 3; border-radius: 4px;
  background:
    radial-gradient(circle at 14px 50%, #9aa0a8 0 3px, transparent 4px) 0 0/calc(100% / var(--per)) 100% repeat-x,
    linear-gradient(180deg, #6b6e75, #2b2c31 40%, #17171a);
  box-shadow: 0 10px 18px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .25); }

.mag { position: relative; z-index: 2; display: block; text-decoration: none; color: var(--bone); margin-bottom: 8px;
  transform-origin: 50% 100%; transform: perspective(900px) rotateX(9deg); transition: transform .25s, filter .25s; }
.mag .cv { aspect-ratio: 2/3; border-radius: 3px 6px 6px 3px; overflow: hidden; background: #2a1b1f; position: relative;
  box-shadow: -3px 0 0 #000 inset, 0 14px 22px rgba(0, 0, 0, .75), 0 2px 0 rgba(255, 255, 255, .08) inset; }
.mag .cv img { width: 100%; height: 100%; object-fit: cover; }
.mag .cv::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(255, 255, 255, .14), transparent 30%, transparent 75%, rgba(0, 0, 0, .25)); pointer-events: none; }
.mag .cv .noimg { position: absolute; inset: 0; display: grid; place-items: center; padding: .8rem; text-align: center; font: 400 1.2rem/1.1 var(--display); color: var(--bone);
  background: radial-gradient(circle at 50% 30%, #4a1018, #160609); }
.mag:hover, .mag:focus-visible { transform: perspective(900px) rotateX(0deg) translateY(-26px) scale(1.04); filter: drop-shadow(0 0 22px rgba(255, 40, 60, .35)); z-index: 4; }
.mag .tag { position: absolute; z-index: 5; left: 50%; bottom: -34px; transform: translateX(-50%); white-space: nowrap;
  font: 800 .72rem/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; padding: .32rem .5rem; border-radius: 4px;
  background: #f1ebe2; color: #1a0a0d; box-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.mag .tag.free { background: #8cff6a; }
.mag .tag.paid { background: var(--gold); }
.mag .tag.demo { background: #ff8a2a; }
.mag .ttl { position: absolute; left: 0; right: 0; bottom: 100%; margin-bottom: 8px; text-align: center; font: 700 .9rem/1.15 var(--ui); letter-spacing: .06em; color: var(--bone);
  opacity: 0; transition: opacity .2s; text-shadow: 0 2px 6px #000; pointer-events: none; }
.mag:hover .ttl, .mag:focus-visible .ttl { opacity: 1; }
.slot-empty { position: relative; z-index: 1; aspect-ratio: 2/3; margin-bottom: 8px; border-radius: 4px; border: 2px dashed rgba(255, 255, 255, .06); }
.rack-empty { position: relative; z-index: 2; grid-column: 1 / -1; text-align: center; color: var(--ash); padding: 3rem 1rem 3.4rem; font: 400 1.3rem/1.3 var(--display); }

@media (max-width: 560px) {
  .rack { padding-top: 3.2rem; }
  .shelf + .shelf { margin-top: 2.6rem; }
  .mag .tag { font-size: .62rem; bottom: -31px; }
}

/* ---------- book page ---------- */
.bp-hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); padding: clamp(2.5rem, 7vw, 5rem) 0; }
.bp-hero .bg { position: absolute; inset: -40px; z-index: -2; background: #0b0709 center/cover no-repeat; filter: blur(26px) saturate(1.1); opacity: .45; transform: scale(1.1); }
.bp-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(9, 6, 10, .95) 25%, rgba(9, 6, 10, .65)), linear-gradient(180deg, transparent 60%, var(--void)); }
.bp-grid { display: grid; grid-template-columns: minmax(180px, 320px) 1fr; gap: clamp(1.5rem, 5vw, 3.5rem); align-items: center; }
.bp-cover { aspect-ratio: 2/3; border-radius: 4px 10px 10px 4px; overflow: hidden; background: #2a1b1f; transform: perspective(1200px) rotateY(-12deg);
  box-shadow: -6px 0 0 #000 inset, 30px 30px 60px rgba(0, 0, 0, .8), 0 0 50px rgba(193, 18, 31, .25); }
.bp-cover img { width: 100%; height: 100%; object-fit: cover; }
.bp-hero h1 { margin: 0 0 .3rem; font-size: clamp(2.2rem, 6vw, 4.2rem); }
.bp-sub { font: 600 1.2rem/1.3 var(--body); color: var(--ash); margin: 0 0 .5rem; }
.bp-by { font: 700 1rem/1 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--ember); margin-bottom: 1.2rem; }
.bp-blurb { color: var(--bone); max-width: 62ch; white-space: pre-line; }
.bp-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.pill { font: 800 .8rem/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; padding: .5rem .75rem; border-radius: 999px; border: 1px solid var(--line); background: var(--crypt); color: var(--ash); }
.pill.free { color: var(--toxic); border-color: #3f7a25; background: #12210c; }
.pill.paid { color: var(--gold); border-color: #7a5a12; background: #2a1f05; }
.pill.demo { color: var(--ember); border-color: #7a3f12; background: #2a1405; }
.pill.owned { color: #fff; border-color: #ff4b5e; background: var(--blood); }
.bp-buy { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.bp-copy { margin-top: 1rem; font-size: .9rem; color: var(--dim); }

.fmt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; }
.fmt { position: relative; background: var(--crypt); border: 1px solid var(--line); border-radius: 16px; padding: 1.4rem; display: flex; flex-direction: column; gap: .7rem; box-shadow: var(--shadow); }
.fmt .ico { width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(180deg, #3a0d14, #1d070b); border: 1px solid #6b1a26; color: #ff6b7c; }
.fmt .ico svg { width: 30px; height: 30px; }
.fmt h3 { margin: 0; }
.fmt p { color: var(--ash); margin: 0; }
.fmt .lvl { font: 800 .78rem/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; }
.fmt .lvl.full { color: var(--toxic); } .fmt .lvl.demo { color: var(--ember); } .fmt .lvl.locked { color: var(--dim); }
.fmt .acts { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: .4rem; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; }
.gallery button { padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #000; cursor: zoom-in; aspect-ratio: 1; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery button:hover img { transform: scale(1.06); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .92); display: grid; place-items: center; padding: 1rem; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 8px; box-shadow: var(--shadow); }
.lightbox button { position: absolute; top: 14px; right: 14px; }
.protect, .protect img { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none; }

@media (max-width: 720px) {
  .bp-grid { grid-template-columns: 1fr; text-align: center; }
  .bp-cover { width: min(240px, 70vw); margin-inline: auto; transform: none; }
  .bp-badges, .bp-buy { justify-content: center; }
  .bp-blurb { margin-inline: auto; }
}
