:root {
  color-scheme: dark;
  --black: #020304;
  --ink: #05090d;
  --midnight: #071019;
  --panel: #0d1a23;
  --panel-2: #101f2b;
  --line: rgba(187, 156, 69, 0.42);
  --gold: #d1a43a;
  --gold-soft: #efd27d;
  --ice: #9fc8e6;
  --text: #e6eef2;
  --muted: #a8b8c2;
  --dim: #728692;
  --shadow: rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 72% 0%, rgba(44, 82, 107, 0.32), transparent 34rem),
    linear-gradient(180deg, #020304 0%, #061017 48%, #020304 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(20px, 5vw, 76px);
  background: linear-gradient(180deg, rgba(2, 3, 4, 0.86), rgba(2, 3, 4, 0));
  pointer-events: none;
  animation: headerReveal 700ms ease-out both;
}

.brand,
.site-header nav {
  pointer-events: auto;
}

.brand,
.section-kicker {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.site-header nav {
  display: flex;
  gap: clamp(18px, 3vw, 42px);
  color: #c7d6de;
  font-size: 0.84rem;
  font-weight: 600;
}

.site-header nav a {
  opacity: 0.78;
  transition: color 180ms ease, opacity 180ms ease;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--gold-soft);
  opacity: 1;
}

.hero {
  position: relative;
  min-height: 760px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 0.8fr);
  align-items: center;
  gap: clamp(34px, 6vw, 96px);
  padding: 120px clamp(22px, 6vw, 92px) 86px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  background: linear-gradient(180deg, transparent, var(--midnight));
  pointer-events: none;
}

.hero__scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(2, 3, 4, 0.95) 0%, rgba(4, 9, 14, 0.64) 42%, rgba(4, 12, 18, 0.24) 100%),
    radial-gradient(circle at 78% 34%, rgba(37, 86, 116, 0.34), transparent 30rem);
}

.spotlight {
  position: absolute;
  top: -80px;
  left: 48%;
  width: 210px;
  height: 880px;
  transform: skewX(-6deg);
  background: linear-gradient(
    180deg,
    rgba(242, 250, 255, 0.52),
    rgba(154, 204, 230, 0.19) 34%,
    rgba(56, 93, 118, 0.08) 66%,
    transparent
  );
  filter: blur(1px);
  animation: lightWake 1300ms ease-out both;
}

.window-grid {
  position: absolute;
  top: 84px;
  right: 12.5vw;
  width: 390px;
  height: 560px;
  border: 1px solid rgba(230, 196, 94, 0.48);
  background: rgba(4, 12, 18, 0.68);
  box-shadow:
    0 32px 100px rgba(0, 0, 0, 0.62),
    0 0 58px rgba(211, 164, 46, 0.18),
    inset 0 0 0 1px rgba(211, 164, 46, 0.16);
  overflow: hidden;
  animation: coverPanelReveal 900ms ease-out both;
}

.window-grid::before,
.window-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.window-grid::before {
  z-index: 1;
  background:
    radial-gradient(circle at 50% 34%, rgba(238, 199, 91, 0.18), transparent 48%),
    linear-gradient(90deg, rgba(2, 3, 4, 0.24), transparent 34%, rgba(2, 3, 4, 0.1)),
    linear-gradient(180deg, rgba(3, 8, 13, 0.12), transparent 54%, rgba(3, 8, 13, 0.38));
}

.window-grid::after {
  z-index: 2;
  background:
    repeating-linear-gradient(90deg, transparent 0 78px, rgba(207, 173, 87, 0.06) 78px 112px, transparent 112px 150px),
    repeating-linear-gradient(180deg, transparent 0 172px, rgba(207, 173, 87, 0.04) 172px 224px, transparent 224px 300px);
  mix-blend-mode: screen;
  opacity: 0.36;
}

.window-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0.9;
  filter: brightness(0.9) saturate(1.06) contrast(1.08);
  transform: scale(1.02);
}

.rain {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: linear-gradient(105deg, transparent 0 48%, rgba(190, 224, 240, 0.36) 49%, transparent 50%);
  background-size: 15px 58px;
  animation: rainDrift 22s linear infinite;
}

.hero__content,
.hero__covers {
  position: relative;
  z-index: 2;
}

.hero__content > * {
  opacity: 0;
  transform: translateY(16px);
  animation: textRise 760ms ease-out forwards;
}

.hero__content > *:nth-child(1) {
  animation-delay: 120ms;
}

.hero__content > *:nth-child(2) {
  animation-delay: 220ms;
}

.hero__content > *:nth-child(3) {
  animation-delay: 330ms;
}

.hero__content > *:nth-child(4) {
  animation-delay: 430ms;
}

.hero__content > *:nth-child(5) {
  animation-delay: 540ms;
}

.series-label {
  margin: 0 0 18px;
  color: #c2a85f;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

h1,
h2,
h3,
.author-name {
  font-family: Cinzel, Georgia, serif;
}

h1 {
  max-width: 760px;
  margin: 0;
  color: var(--gold);
  font-size: clamp(4.1rem, 8vw, 8.4rem);
  font-weight: 700;
  line-height: 0.88;
  text-shadow: 0 0 24px rgba(211, 164, 46, 0.28);
}

.author-name {
  margin: 22px 0 18px;
  color: var(--ice);
  font-size: clamp(1.8rem, 3vw, 3rem);
  letter-spacing: 0.18em;
}

.hero__copy {
  max-width: 610px;
  margin: 0;
  color: #d5e1e8;
  font-size: clamp(1.08rem, 1.7vw, 1.35rem);
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button--primary {
  background: var(--gold);
  color: #071018;
}

.button--ghost {
  border-color: rgba(154, 186, 204, 0.62);
  color: #e0edf3;
  background: rgba(8, 18, 25, 0.42);
}

.hero__covers {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 168px));
  align-items: end;
  justify-content: center;
  min-height: 460px;
  perspective: 1000px;
}

.hero__covers a {
  display: block;
  width: min(18vw, 188px);
  min-width: 126px;
  opacity: 0;
  transform: var(--cover-start-transform);
  animation: coverSettle 950ms cubic-bezier(0.2, 0.82, 0.2, 1) forwards;
  transition: filter 220ms ease;
}

.hero__covers img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(167, 209, 230, 0.28);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.72);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.hero__covers a:hover img,
.hero__covers a:focus-visible img {
  transform: translateY(-8px) scale(1.015);
  border-color: rgba(230, 196, 94, 0.72);
  box-shadow: 0 38px 96px rgba(0, 0, 0, 0.82), 0 0 38px rgba(211, 164, 46, 0.18);
}

.hero__covers a:focus-visible,
.book-card__cover-link:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 7px;
}

.hero__covers a:nth-child(1) {
  --cover-transform: rotateY(12deg) translateX(56px) translateY(74px);
  --cover-start-transform: rotateY(12deg) translateX(34px) translateY(112px) scale(0.96);
  animation-delay: 520ms;
}

.hero__covers a:nth-child(2) {
  z-index: 2;
  --cover-transform: rotateY(6deg) translateX(24px) translateY(24px);
  --cover-start-transform: rotateY(6deg) translateX(10px) translateY(72px) scale(0.96);
  animation-delay: 660ms;
}

.hero__covers a:nth-child(3) {
  z-index: 3;
  --cover-transform: translateY(-8px);
  --cover-start-transform: translateY(42px) scale(0.97);
  animation-delay: 800ms;
}

.hero__covers a:nth-child(4) {
  --cover-transform: rotateY(-11deg) translateX(-48px) translateY(62px);
  --cover-start-transform: rotateY(-11deg) translateX(-26px) translateY(104px) scale(0.96);
  animation-delay: 940ms;
}

.books-section,
.latest-section,
.profile-section,
.author-section,
footer {
  position: relative;
  z-index: 3;
}

.latest-section {
  display: grid;
  grid-template-columns: minmax(300px, clamp(390px, 28vw, 520px)) minmax(320px, 680px);
  gap: clamp(38px, 6vw, 104px);
  align-items: center;
  justify-content: center;
  padding: 104px clamp(22px, 6vw, 92px);
  background:
    radial-gradient(circle at calc(50% - 320px) 46%, rgba(211, 164, 46, 0.14), transparent 19rem),
    linear-gradient(180deg, #050a0e 0%, #08131b 100%);
}

.latest-cover {
  position: relative;
  width: 100%;
  margin: 0;
}

.latest-cover img {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(230, 196, 94, 0.58);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.62), 0 0 42px rgba(211, 164, 46, 0.14);
}

.latest-copy {
  max-width: 680px;
}

.latest-copy p + p {
  margin-top: 18px;
}

.books-section {
  padding: 86px clamp(22px, 6vw, 92px) 108px;
  background: linear-gradient(180deg, var(--midnight), #08131b 62%, #030507);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(280px, 0.72fr);
  gap: clamp(28px, 7vw, 120px);
  align-items: end;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2,
.latest-section h2,
.profile-section h2,
.author-section h2 {
  margin: 10px 0 0;
  color: var(--text);
  font-size: clamp(2.35rem, 5vw, 4.2rem);
  line-height: 1;
}

.latest-copy h2 {
  margin-bottom: 24px;
}

.section-heading p,
.latest-copy p,
.profile-section p,
.author-section p,
.buy-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.book-shelf {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 34px);
  margin-top: 44px;
}

.book-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 20px;
  min-width: 0;
  padding-bottom: 8px;
  outline: none;
}

.book-card::after {
  content: "";
  display: block;
  width: 100%;
  height: 12px;
  margin-top: -12px;
  background: #0d2431;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
}

.book-card__cover-link {
  display: block;
  border-radius: 3px;
}

.book-card__cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(142, 178, 198, 0.32);
  border-radius: 3px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.48);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.book-card:hover .book-card__cover,
.book-card:focus-visible .book-card__cover,
.book-card:focus-within .book-card__cover,
.book-card.is-active .book-card__cover {
  transform: translateY(-10px);
  border-color: rgba(230, 196, 94, 0.62);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7), 0 0 36px rgba(211, 164, 46, 0.16);
}

.book-card__cover--placeholder {
  display: grid;
  align-content: space-between;
  padding: 24px 18px;
  background:
    linear-gradient(92deg, rgba(120, 222, 185, 0.24), transparent 25%),
    radial-gradient(circle at 50% 72%, rgba(64, 185, 135, 0.24), transparent 8rem),
    linear-gradient(180deg, #05221d, #050b0e 72%);
}

.book-card__cover--placeholder span {
  color: #71d6b1;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1.1rem, 1.8vw, 1.7rem);
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

.book-card__cover--placeholder small {
  color: #cab16d;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.4;
  text-align: center;
  text-transform: uppercase;
}

.book-card__body h3 {
  margin: 0 0 10px;
  color: #f1f5f6;
  font-size: clamp(1.1rem, 1.5vw, 1.45rem);
  line-height: 1.16;
}

.book-card__body p {
  min-height: 126px;
  margin: 0;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.62;
}

.book-card__body a {
  display: inline-flex;
  margin-top: 14px;
  color: var(--gold-soft);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(360px, 0.82fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: center;
  padding: 112px clamp(22px, 6vw, 92px);
  background: var(--black);
}

.profile-section__copy {
  max-width: 660px;
}

.profile-section__copy p {
  margin-top: 26px;
  color: #c7d4dc;
  font-size: 1.12rem;
}

blockquote {
  margin: 34px 0 0;
  color: var(--gold);
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1.35rem, 2.6vw, 2.2rem);
  line-height: 1.35;
}

.character-portrait {
  position: relative;
  margin: 0;
  border: 1px solid rgba(99, 137, 160, 0.34);
  border-radius: 4px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.46);
  overflow: hidden;
}

.character-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 3, 4, 0.16), transparent 45%),
    linear-gradient(180deg, transparent 68%, rgba(2, 3, 4, 0.22));
  pointer-events: none;
}

.character-portrait img {
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
}

.author-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(280px, 0.55fr);
  gap: clamp(34px, 7vw, 110px);
  align-items: start;
  padding: 96px clamp(22px, 6vw, 92px) 108px;
  background: linear-gradient(180deg, #08121a, #071019);
}

.author-section > div {
  max-width: 620px;
}

.author-section h2 {
  color: var(--ice);
  letter-spacing: 0.08em;
}

.author-section p {
  margin-top: 24px;
}

.buy-panel {
  padding: 34px;
  border: 1px solid rgba(88, 126, 149, 0.38);
  border-radius: 4px;
  background: #0e1b24;
}

.buy-panel h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.buy-panel .button {
  margin-top: 22px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(22px, 6vw, 92px);
  border-top: 1px solid var(--line);
  background: #04090d;
  color: var(--dim);
  font-size: 0.82rem;
}

footer a {
  color: var(--gold-soft);
}

@keyframes headerReveal {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes textRise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes coverSettle {
  0% {
    opacity: 0;
    transform: var(--cover-start-transform);
    filter: brightness(0.76) saturate(0.88);
  }
  100% {
    opacity: 1;
    transform: var(--cover-transform);
    filter: brightness(1) saturate(1);
  }
}

@keyframes lightWake {
  from {
    opacity: 0;
    transform: skewX(-6deg) translateY(-40px);
  }
  to {
    opacity: 1;
    transform: skewX(-6deg) translateY(0);
  }
}

@keyframes rainDrift {
  to {
    background-position: 180px 580px;
  }
}

@keyframes coverPanelReveal {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 980px) {
  .site-header {
    position: absolute;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 112px;
  }

  .hero__covers {
    min-height: 330px;
    justify-content: start;
  }

  .window-grid {
    top: 430px;
    right: 7vw;
    width: min(58vw, 360px);
    height: min(78vw, 520px);
    opacity: 0.88;
  }

  .hero__covers a {
    width: min(28vw, 170px);
  }

  .section-heading,
  .latest-section,
  .profile-section,
  .author-section {
    grid-template-columns: 1fr;
  }

  .latest-cover {
    width: min(64vw, 360px);
  }

  .book-shelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 650px) {
  .site-header {
    align-items: flex-start;
    gap: 16px;
  }

  .site-header nav {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 10px 18px;
    justify-content: end;
  }

  .hero {
    min-height: auto;
    padding-bottom: 58px;
  }

  .series-label {
    max-width: 260px;
    line-height: 1.7;
  }

  h1 {
    font-size: clamp(2.9rem, 14vw, 4.35rem);
  }

  .hero__copy {
    font-size: 1rem;
  }

  .hero__covers {
    grid-template-columns: repeat(4, minmax(68px, 1fr));
    min-height: 220px;
  }

  .window-grid {
    top: 530px;
    right: -36px;
    width: 240px;
    height: 360px;
    opacity: 0.82;
  }

  .book-shelf {
    grid-template-columns: 1fr;
  }

  .latest-section {
    padding-top: 76px;
    padding-bottom: 82px;
  }

  .latest-cover {
    width: min(76vw, 300px);
  }

  .book-card {
    grid-template-columns: 118px 1fr;
    gap: 18px;
  }

  .book-card::after {
    display: none;
  }

  .book-card__body p {
    min-height: 0;
  }

  .profile-section,
  .latest-section,
  .books-section,
  .author-section {
    padding-top: 72px;
    padding-bottom: 76px;
  }

  .character-portrait img {
    aspect-ratio: 4 / 3;
  }

  footer {
    flex-direction: column;
  }
}
