:root {
  --ink: #070606;
  --charcoal: #14110f;
  --paper: #f3e4bd;
  --muted: #c9b58d;
  --gold: #d9aa4e;
  --bronze: #7f542a;
  --red: #8d1f26;
  --blue: #284b64;
  --line: rgba(224, 179, 91, .28);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: #f8edd4;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: .16;
  background-image:
    radial-gradient(circle at 25% 15%, rgba(255, 255, 255, .1) 0 1px, transparent 1px),
    radial-gradient(circle at 75% 65%, rgba(255, 255, 255, .08) 0 1px, transparent 1px);
  background-size: 34px 34px, 47px 47px;
  mix-blend-mode: screen;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  width: clamp(220px, 22vw, 342px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 38px clamp(24px, 3.6vw, 58px);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .44) 56%, rgba(0, 0, 0, 0)),
    radial-gradient(circle at 48% 18%, rgba(217, 170, 78, .16), transparent 28%);
  border-right: 1px solid rgba(217, 170, 78, .08);
}

.site-header::before,
.site-header::after {
  content: "";
  width: 150px;
  height: 12px;
  max-width: 84%;
  background:
    linear-gradient(90deg, transparent, rgba(217, 170, 78, .62), transparent),
    radial-gradient(circle, rgba(243, 228, 189, .62) 0 2px, transparent 3px);
  background-position: center;
}

.brand {
  position: absolute;
  top: 44px;
  left: clamp(24px, 3.4vw, 54px);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 176px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--gold);
  font-family: Cinzel, serif;
  font-weight: 700;
}

.brand-text,
h1,
h2,
.book-cover strong {
  font-family: Cinzel, Georgia, serif;
}

.brand-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 22px;
  color: rgba(248, 237, 212, .62);
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(16px, 1.25vw, 21px);
  font-weight: 600;
  text-transform: none;
}

.top-nav a {
  position: relative;
  width: 100%;
  padding: 6px 0 6px 12px;
  border-bottom: 1px solid transparent;
  text-shadow: 0 4px 16px rgba(0, 0, 0, .8);
}

.top-nav a:hover,
.top-nav a.active {
  color: var(--paper);
  border-color: transparent;
  text-shadow: 0 0 14px rgba(217, 170, 78, .7), 0 4px 16px rgba(0, 0, 0, .86);
}

.top-nav a.active::before,
.top-nav a:hover::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -18px;
  width: 15px;
  height: 1px;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(217, 170, 78, .92);
}

.header-cta,
.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.header-cta {
  position: absolute;
  bottom: 44px;
  left: clamp(24px, 3.4vw, 54px);
  min-width: 126px;
  color: var(--gold);
  background: rgba(0, 0, 0, .28);
}

main {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--ink);
}

.panel {
  position: absolute;
  inset: 0;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  opacity: 0;
  pointer-events: none;
  transform: translateY(7vh) scale(1.02);
  transition: opacity .86s ease, transform .86s cubic-bezier(.2, .72, .15, 1);
}

.panel.is-active {
  z-index: 2;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.panel.is-before {
  z-index: 1;
  opacity: .12;
  transform: translateY(-5vh) scale(.985);
}

.panel.is-after {
  z-index: 0;
  transform: translateY(9vh) scale(1.02);
}

.hero-bg,
.world-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 52% 56%, rgba(217, 170, 78, .18), transparent 22%),
    linear-gradient(90deg, rgba(4, 3, 2, .86), rgba(4, 3, 2, .36) 52%, rgba(4, 3, 2, .8)),
    linear-gradient(180deg, rgba(0, 0, 0, .68), transparent 34%, rgba(0, 0, 0, .9));
}

.panel-shade.right {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .24) 42%, rgba(0, 0, 0, .92)),
    linear-gradient(180deg, rgba(0, 0, 0, .74), transparent 40%, rgba(0, 0, 0, .88));
}

.hero-content {
  width: min(760px, calc(100% - 40px));
  margin: auto;
  margin-left: max(360px, 24vw);
  margin-right: clamp(90px, 12vw, 210px);
  padding-top: 64px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 24px;
  color: var(--paper);
  font-size: clamp(44px, 7vw, 86px);
  line-height: .98;
  text-shadow: 0 12px 34px rgba(0, 0, 0, .7);
}

h2 {
  margin-bottom: 20px;
  color: var(--paper);
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
}

.lead,
.section-copy p {
  color: rgba(248, 237, 212, .78);
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

.primary-btn {
  border-color: rgba(217, 170, 78, .74);
  color: #160d05;
  background: linear-gradient(180deg, #f1c772, #b9792e);
  box-shadow: 0 12px 42px rgba(185, 121, 46, .28);
}

.primary-btn.small {
  min-height: 42px;
  margin-top: 18px;
  padding: 0 18px;
}

.ghost-btn {
  color: var(--paper);
  background: rgba(0, 0, 0, .28);
}

.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 10px;
  color: rgba(248, 237, 212, .64);
  font-size: 12px;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.scroll-cue span {
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--gold), transparent);
}

.section-dots {
  position: fixed;
  top: 50%;
  right: clamp(18px, 3vw, 42px);
  z-index: 25;
  display: grid;
  gap: 16px;
  transform: translateY(-50%);
}

.section-dots a {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(217, 170, 78, .2);
  color: rgba(248, 237, 212, .5);
  font-size: 11px;
  background: rgba(0, 0, 0, .32);
}

.section-dots a.active {
  border-color: var(--gold);
  color: var(--gold);
}

.page-curl {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  width: clamp(276px, 24vw, 360px);
  height: clamp(170px, 15vw, 226px);
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 32px 26px 0;
  overflow: hidden;
  color: var(--paper);
  background:
    radial-gradient(circle at 52% 44%, rgba(237, 189, 86, .34) 0 2px, transparent 3px),
    radial-gradient(circle at 63% 30%, rgba(237, 189, 86, .28) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 56%, rgba(237, 189, 86, .22) 0 2px, transparent 3px),
    linear-gradient(115deg, rgba(8, 7, 6, 0) 0 42%, rgba(12, 10, 8, .94) 43% 100%);
  border: 1px solid rgba(217, 170, 78, .18);
  border-right: 0;
  border-bottom: 0;
  filter: drop-shadow(-24px -18px 28px rgba(0, 0, 0, .48));
}

.page-curl::before,
.page-curl::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  transition: transform .32s ease, box-shadow .32s ease;
}

.page-curl::before {
  width: 84%;
  height: 92%;
  background:
    linear-gradient(104deg, rgba(255, 224, 145, .22), transparent 18%),
    repeating-linear-gradient(7deg, rgba(255, 237, 184, .08) 0 1px, transparent 1px 6px),
    linear-gradient(122deg, #17130e 0%, #2f281c 38%, #655338 58%, #19120b 82%);
  clip-path: polygon(100% 0, 100% 100%, 0 100%, 20% 84%, 34% 70%, 46% 55%, 57% 38%, 67% 18%);
  box-shadow:
    inset 26px 10px 40px rgba(255, 226, 151, .14),
    inset -30px -24px 38px rgba(0, 0, 0, .54),
    -28px -20px 36px rgba(0, 0, 0, .5);
}

.page-curl::after {
  width: 52%;
  height: 104%;
  border-left: 1px solid rgba(217, 170, 78, .28);
  background:
    linear-gradient(90deg, rgba(255, 223, 138, .16), rgba(0, 0, 0, .24) 28%, rgba(255, 221, 139, .08) 54%, rgba(0, 0, 0, .66)),
    linear-gradient(180deg, #332819, #19120c);
  clip-path: polygon(76% 0, 100% 0, 100% 100%, 0 100%, 28% 76%, 48% 48%);
  box-shadow:
    inset 11px 0 20px rgba(255, 231, 166, .1),
    inset -16px 0 26px rgba(0, 0, 0, .62);
}

.page-curl span {
  position: relative;
  z-index: 1;
  display: inline-block;
  width: 180px;
  color: #f5dd9f;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(18px, 1.45vw, 25px);
  font-weight: 700;
  line-height: 1.08;
  text-align: center;
  text-shadow:
    0 2px 0 rgba(48, 28, 7, .86),
    0 0 13px rgba(226, 169, 68, .54),
    0 8px 18px rgba(0, 0, 0, .76);
  text-transform: uppercase;
}

.page-curl:hover::after,
.page-curl:focus-visible::after {
  transform: translateX(-6px);
}

.page-curl:hover::before,
.page-curl:focus-visible::before {
  transform: translate(-10px, -8px);
  box-shadow:
    inset 26px 10px 40px rgba(255, 226, 151, .18),
    inset -30px -24px 38px rgba(0, 0, 0, .56),
    -36px -28px 44px rgba(0, 0, 0, .58);
}

.worlds-panel {
  align-items: center;
  padding: 120px clamp(20px, 6vw, 86px) 64px max(290px, 24vw);
}

.section-copy {
  max-width: 620px;
}

.section-copy.narrow {
  margin-left: auto;
  margin-right: min(9vw, 120px);
}

.section-copy.centered {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.feature-strip {
  position: absolute;
  right: clamp(20px, 6vw, 86px);
  bottom: 54px;
  display: grid;
  width: min(820px, calc(100% - 40px));
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  background: rgba(7, 6, 6, .64);
  backdrop-filter: blur(12px);
}

.feature-strip article {
  min-height: 164px;
  padding: 24px;
  border-right: 1px solid var(--line);
}

.feature-strip article:last-child {
  border-right: 0;
}

.feature-strip span,
.meta,
.quote-panel span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.feature-strip h3 {
  margin: 14px 0 8px;
  color: var(--paper);
}

.feature-strip p,
.book-info p {
  color: rgba(248, 237, 212, .68);
  line-height: 1.65;
}

.library-panel {
  padding: 92px clamp(20px, 5vw, 72px) 72px max(290px, 24vw);
  background:
    radial-gradient(circle at 20% 24%, rgba(141, 31, 38, .28), transparent 28%),
    radial-gradient(circle at 82% 48%, rgba(217, 170, 78, .16), transparent 24%),
    linear-gradient(180deg, #090807, #17110d 52%, #070606);
}

.library-panel::before,
.excerpt-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(217, 170, 78, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 170, 78, .08) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 70%);
}

.book-grid {
  display: grid;
  width: min(var(--max), 100%);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin: 34px auto 0;
}

.book-card {
  min-height: min(48vh, 470px);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .34);
  scroll-margin-top: 118px;
  transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}

.book-card:target,
.book-card.is-focused {
  border-color: rgba(217, 170, 78, .78);
  box-shadow: 0 0 0 1px rgba(217, 170, 78, .18), 0 28px 80px rgba(217, 170, 78, .18);
  transform: translateY(-6px);
}

.book-cover {
  display: flex;
  min-height: clamp(210px, 25vh, 280px);
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.book-cover::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(243, 228, 189, .26);
}

.book-cover span {
  position: relative;
  z-index: 1;
  color: rgba(248, 237, 212, .72);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.book-cover strong {
  position: relative;
  z-index: 1;
  max-width: 260px;
  color: var(--paper);
  font-size: 28px;
  line-height: 1.12;
}

.cover-amber {
  background:
    radial-gradient(circle at 55% 24%, rgba(255, 226, 151, .5), transparent 22%),
    linear-gradient(145deg, #2f1809, #7d4b21 48%, #120c08);
}

.cover-blue {
  background:
    radial-gradient(circle at 48% 30%, rgba(122, 196, 230, .42), transparent 24%),
    linear-gradient(145deg, #09141d, #274b63 50%, #080809);
}

.cover-red {
  background:
    radial-gradient(circle at 48% 30%, rgba(216, 91, 77, .46), transparent 24%),
    linear-gradient(145deg, #190708, #7b1e24 50%, #090606);
}

.book-info {
  padding: 24px;
}

.book-info h3 {
  margin-bottom: 12px;
  color: var(--paper);
  font-size: clamp(18px, 1.25vw, 21px);
  line-height: 1.35;
}

.excerpt-panel {
  align-items: center;
  padding: 112px clamp(20px, 6vw, 86px) 112px max(290px, 24vw);
  background:
    radial-gradient(circle at 72% 40%, rgba(217, 170, 78, .18), transparent 28%),
    linear-gradient(135deg, #0b0807, #1c1510 54%, #050404);
}

.excerpt-layout {
  display: grid;
  width: min(var(--max), 100%);
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: clamp(28px, 6vw, 86px);
  margin: 0 auto;
  align-items: center;
}

.quote-panel {
  padding: clamp(30px, 5vw, 58px);
  border: 1px solid rgba(217, 170, 78, .42);
  background:
    linear-gradient(180deg, rgba(12, 8, 6, .88), rgba(52, 32, 18, .56)),
    linear-gradient(90deg, transparent, rgba(217, 170, 78, .1), transparent);
  box-shadow: 0 32px 92px rgba(0, 0, 0, .42);
}

.quote-panel p {
  color: var(--paper);
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.36;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .9s ease, transform .9s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  body {
    overflow: auto;
  }

  main {
    position: relative;
    overflow: visible;
  }

  .site-header {
    position: fixed;
    top: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    min-height: 76px;
    flex-direction: row;
    justify-content: space-between;
    padding: 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, .86), rgba(0, 0, 0, 0));
    border-right: 0;
  }

  .site-header::before,
  .site-header::after {
    display: none;
  }

  .top-nav {
    display: none;
  }

  .brand {
    position: static;
    min-width: auto;
  }

  .header-cta {
    position: static;
  }

  .panel,
  .panel.is-active,
  .panel.is-before,
  .panel.is-after {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .hero-content {
    margin-left: auto;
    margin-right: auto;
  }

  .section-dots {
    right: 12px;
  }

  .feature-strip,
  .book-grid,
  .excerpt-layout {
    grid-template-columns: 1fr;
  }

  .feature-strip {
    position: relative;
    right: auto;
    bottom: auto;
    margin: 34px auto 0;
  }

  .feature-strip article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .feature-strip article:last-child {
    border-bottom: 0;
  }

  .section-copy.narrow {
    margin-right: 42px;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 16px;
  }

  .brand-text {
    display: none;
  }

  .header-cta {
    min-width: 104px;
    padding: 0 14px;
  }

  .hero-content {
    text-align: left;
    margin-left: 20px;
    margin-right: 56px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .section-dots a {
    width: 32px;
    height: 32px;
  }

  .page-curl {
    width: 196px;
    height: 128px;
    padding: 0 28px 20px 0;
  }

  .page-curl span {
    width: 126px;
    font-size: 15px;
  }

  .library-panel,
  .excerpt-panel,
  .worlds-panel {
    padding-top: 96px;
    padding-bottom: 56px;
    padding-left: 20px;
  }

  .book-card {
    min-height: auto;
  }

  .book-cover {
    min-height: 240px;
  }
}
