:root {
  --ink: #0c0813;
  --ink-2: #150e20;
  --wood: #241830;
  --text: #ece4f4;
  --muted: #a99dba;
  --paper: #efe4c9;
  --paper-ink: #2a2118;
  --pink: #ff2fd0;
  --lime: #b8ff35;
  --cyan: #2be9ff;
  --orange: #ff8a1f;
  --yellow: #ffe14a;
  --purple: #9b4dff;
  --blue: #3a6bff;
  --heading: "Rock Salt", "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  --body: "Alegreya", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(60rem 36rem at 8% -6%, rgba(255, 47, 208, .22), transparent 60%),
    radial-gradient(52rem 34rem at 100% 12%, rgba(43, 233, 255, .14), transparent 62%),
    var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.1875rem;
  line-height: 1.55;
  position: relative;
}
/* film grain over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: .16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
a { color: var(--cyan); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--lime); text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 3px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* ---------- top bar ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--heading); font-size: 1rem; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand:hover { color: #fff; }
.bar nav { display: flex; gap: 20px; font-size: 1.05rem; }
.bar nav a { color: var(--muted); text-decoration: none; }
.bar nav a:hover, .bar nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 28px 0 0; overflow: hidden; }
.hero-copy { position: relative; z-index: 3; padding-bottom: 36px; }
.title {
  margin: 0;
  font-family: var(--heading);
  font-weight: 400;
  font-size: clamp(2.5rem, 10.2vw, 6.4rem);
  line-height: 1.12;
  color: #fff;
  transform: rotate(-2deg);
  transform-origin: left bottom;
  text-shadow: 0 0 28px rgba(255, 47, 208, .6), 0 0 2px rgba(255, 255, 255, .6);
}
.tagline { margin: 20px 0 0; max-width: 24ch; font-size: clamp(1.4rem, 4vw, 1.9rem); font-style: italic; line-height: 1.25; color: #fff; }
.lede { margin: 14px 0 0; max-width: 46ch; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.badge {
  display: inline-block;
  padding: 9px 16px;
  border: 2px solid var(--lime);
  border-radius: 999px;
  color: var(--lime);
  font-weight: 600;
  font-size: 1rem;
}
.age-note { margin: 16px 0 0; font-size: 1rem; color: var(--muted); }

.stage { position: relative; z-index: 2; margin-top: 8px; }
.neon { height: 3px; background: linear-gradient(90deg, var(--pink), var(--cyan), var(--lime)); box-shadow: 0 0 16px var(--pink), 0 0 42px var(--cyan); }
.shelf {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 214px;
  padding: 0 8px;
  overflow: hidden;
  background: linear-gradient(#0a0610, #120a1a);
}
.book {
  flex: none;
  width: var(--w);
  height: var(--h);
  position: relative;
  background:
    linear-gradient(90deg, rgba(0,0,0,.42), rgba(255,255,255,.14) 16%, rgba(0,0,0,.04) 52%, rgba(0,0,0,.46)),
    var(--c);
  border-radius: 2px 2px 0 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}
.book::before, .book::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 5px;
  background: rgba(0, 0, 0, .28);
  box-shadow: 0 7px 0 rgba(255, 255, 255, .1);
}
.book::before { top: 14px; }
.book::after { bottom: 18px; }
.book.pulled {
  z-index: 2;
  animation: pull 1.1s .8s cubic-bezier(.2, .9, .2, 1) both;
}
@keyframes pull {
  from { transform: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
  to   { transform: translateY(-30px) scale(1.07); box-shadow: 0 0 26px 4px rgba(255, 47, 208, .75), inset 0 0 0 1px rgba(0,0,0,.25); }
}
.plank { height: 20px; background: linear-gradient(#3d2a4b, #1a1124); box-shadow: 0 20px 44px rgba(255, 47, 208, .22); }
.mark {
  position: absolute;
  z-index: 4;
  right: 6%;
  bottom: 6px;
  width: clamp(120px, 24vw, 230px);
  color: #fff;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, .55)) drop-shadow(0 0 34px rgba(184, 255, 53, .45));
}

/* ---------- inside the library ---------- */
.section { padding: 64px 0 0; }
h2 { margin: 0 0 20px; font-family: var(--heading); font-weight: 400; font-size: clamp(1.5rem, 4.6vw, 2.2rem); line-height: 1.3; color: #fff; }
.spines { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.spines li {
  padding: 16px 20px 16px 22px;
  border-left: 12px solid var(--c);
  background: linear-gradient(90deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
  border-radius: 2px 8px 8px 2px;
}
.spines h3 { margin: 0 0 2px; font-family: var(--heading); font-weight: 400; font-size: 1.1rem; line-height: 1.5; color: var(--c); }
.spines p { margin: 0; color: var(--text); max-width: 60ch; }
@media (min-width: 760px) { .spines { grid-template-columns: 1fr 1fr; } }

/* ---------- paper panel ---------- */
.paper {
  background: var(--paper);
  color: var(--paper-ink);
  padding: 28px 24px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.3), 0 18px 50px rgba(0,0,0,.55), inset 0 0 60px rgba(120, 85, 30, .18);
}
.paper h2 { color: var(--paper-ink); }
.paper h3 { margin: 28px 0 6px; font-family: var(--heading); font-weight: 400; font-size: 1.1rem; line-height: 1.5; color: #5b1f6e; }
.paper p, .paper li { max-width: 66ch; }
.paper p { margin: 0 0 14px; }
.paper ul { margin: 0 0 14px; padding-left: 1.2em; }
.paper li { margin-bottom: 6px; }
.paper a { color: #5b1f6e; }
.paper a:hover { color: #a1139a; }
.paper a:focus-visible { outline-color: #5b1f6e; }
.paper .updated { font-size: 1rem; font-style: italic; opacity: .75; }
.doc { padding: 20px 0 0; }
@media (min-width: 760px) { .paper { padding: 44px 52px; } }

/* ---------- footer ---------- */
footer { margin-top: 72px; padding: 26px 0 44px; border-top: 1px solid rgba(255,255,255,.12); color: var(--muted); font-size: 1rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

@media (max-width: 560px) {
  .shelf { height: 170px; }
  .book { width: calc(var(--w) * .8); height: calc(var(--h) * .8); }
  .mark { right: 50%; transform: translateX(50%); bottom: 2px; width: 120px; }
  .bar nav { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .book.pulled { animation: none; transform: translateY(-30px) scale(1.07); box-shadow: 0 0 26px 4px rgba(255, 47, 208, .75), inset 0 0 0 1px rgba(0,0,0,.25); }
}

/* ---------- logo in hero ---------- */
.logo {
  display: block;
  width: 168px;
  height: 168px;
  margin-top: 26px;
  border-radius: 22px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.14), 0 0 36px rgba(255, 47, 208, .45), 0 0 80px rgba(43, 233, 255, .25);
}
@media (min-width: 900px) {
  .hero-copy { padding-right: 400px; }
  .logo {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 340px;
    height: 340px;
    margin: 0;
    border-radius: 28px;
    transform: rotate(3deg);
  }
}
