@font-face {
  font-family: "Editor's Note";
  src: url("./fonts/editors-note-regular.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Manrope Variable";
  src: url("./fonts/manrope-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --navy: #102c43;
  --deep: #071522;
  --paper: #f6f4ef;
  --gold: #cba36a;
  --gold-light: #e2c38f;
  --line: rgba(255, 255, 255, 0.15);
  font-family: "Manrope Variable", Manrope, Arial, sans-serif;
  background: var(--deep);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--deep);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: #fff;
  background: var(--deep);
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 10000;
  top: 10px;
  left: 10px;
  padding: 10px 16px;
  color: var(--deep);
  background: #fff;
  border-radius: 999px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: relative;
  z-index: 20;
  min-height: 72px;
  padding: 14px clamp(20px, 3.3vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  backdrop-filter: none;
}

.site-header__logo {
  width: 96px;
  height: auto;
  display: block;
}

.site-header__label {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.site-header__brand,
.site-header__actions {
  display: flex;
  align-items: center;
}

.site-header__brand {
  min-width: 0;
  gap: 18px;
}

.site-header__title {
  max-width: 150px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  font-weight: 680;
  line-height: 1.35;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-header__actions {
  flex: 0 0 auto;
  gap: 8px;
}

.site-header__actions .action {
  min-height: 36px;
  padding: 7px 15px 8px;
  font-size: 12px;
}

.catalog-hero {
  position: relative;
  min-height: calc(100svh - 72px);
  overflow: clip;
  background:
    radial-gradient(circle at 76% 23%, rgba(203, 163, 106, 0.18), transparent 30rem),
    linear-gradient(145deg, var(--deep), var(--navy) 70%, #0a2031);
}

.catalog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.26;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, #000, transparent 90%);
}

.catalog-hero__grid {
  position: relative;
  z-index: 1;
  width: min(1440px, 100%);
  min-height: inherit;
  margin-inline: auto;
  padding: clamp(70px, 9vw, 132px) clamp(24px, 4vw, 56px) clamp(82px, 8vw, 116px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: clamp(52px, 8vw, 128px);
}

.eyebrow {
  margin: 0 0 24px;
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: "Editor's Note", Georgia, serif;
  font-weight: 400;
}

.catalog-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(58px, 7.1vw, 108px);
  line-height: 0.92;
  letter-spacing: -0.043em;
  text-wrap: balance;
}

.catalog-hero__lead {
  max-width: 620px;
  margin: 34px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.68;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 42px;
}

.action {
  min-height: 48px;
  padding: 11px 22px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 690;
  text-decoration: none;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.action--primary {
  color: var(--deep);
  border-color: var(--gold);
  background: var(--gold);
}

.action:hover {
  transform: translateY(-2px);
  border-color: var(--gold-light);
}

.action--primary:hover {
  background: var(--gold-light);
}

.action:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.cover-variants {
  width: min(100%, 540px);
  justify-self: center;
}

.catalog-cover {
  position: relative;
  isolation: isolate;
  width: 100%;
  margin: 0;
  perspective: 1200px;
}

.catalog-cover::before,
.catalog-cover::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.catalog-cover img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.catalog-cover--quiet {
  padding: 26px;
}

.catalog-cover--quiet::before {
  z-index: -1;
  inset: 2px 40px 42px 0;
  border: 1px solid rgba(226, 195, 143, 0.52);
  transform: translate(-18px, -14px);
}

.catalog-cover--quiet::after {
  z-index: -2;
  inset: 14% 5% 2% 12%;
  background: rgba(0, 0, 0, 0.42);
  filter: blur(42px);
}

.catalog-cover--quiet img {
  box-shadow: -16px 26px 70px rgba(0, 0, 0, 0.34);
  transform: rotateZ(-1.4deg);
}

.reader-main {
  min-height: calc(100svh - 72px);
  background:
    radial-gradient(circle at 50% 40%, rgba(203, 163, 106, 0.11), transparent 34rem),
    var(--deep);
}

.reader-stage {
  padding: 30px 24px 48px;
}

.reader-book {
  width: min(1380px, 100%);
  height: min(76svh, 860px);
  min-height: 520px;
  margin-inline: auto;
  border: 0;
  background: rgba(7, 21, 34, 0.46);
  --fb-bg: transparent;
  --fb-paper: #fff;
  --fb-control-bg: rgba(7, 21, 34, 0.84);
  --fb-control-fg: #fff;
  --fb-counter-fg: rgba(255, 255, 255, 0.9);
  --fb-shadow: 0 34px 90px rgba(0, 0, 0, 0.48), 0 12px 30px rgba(0, 0, 0, 0.32);
}

.reader-book.fb-root {
  height: min(76svh, 860px);
  min-height: 520px;
  font-family: "Manrope Variable", Manrope, Arial, sans-serif;
}

.reader-book .fb-tool,
.reader-book .fb-nav,
.reader-book .fb-counter {
  backdrop-filter: blur(16px);
}

.reader-help {
  width: min(1380px, 100%);
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.reader-fallback {
  padding: 32px;
  text-align: center;
}

.site-footer {
  padding: 22px clamp(24px, 4vw, 56px);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: rgba(255, 255, 255, 0.52);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

@media (max-width: 900px) {
  .catalog-hero__grid {
    grid-template-columns: 1fr;
  }

  .cover-variants {
    width: min(82vw, 480px);
  }

  .reader-book.fb-root {
    height: min(72svh, 720px);
    min-height: 480px;
  }
}

@media (max-width: 560px) {
  .site-header__label {
    display: none;
  }

  .site-header {
    min-height: 64px;
    padding-inline: 16px;
    gap: 12px;
  }

  .site-header__logo {
    width: 74px;
  }

  .site-header__brand {
    gap: 10px;
  }

  .site-header__title {
    max-width: 96px;
    padding-left: 10px;
    font-size: 8px;
  }

  .site-header__actions .action {
    width: auto;
    min-height: 32px;
    padding: 6px 10px 7px;
    font-size: 11px;
  }

  .catalog-hero h1 {
    font-size: clamp(49px, 15vw, 68px);
  }

  .actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .action {
    width: 100%;
  }

  .reader-stage {
    padding-inline: 0;
  }

  .reader-book.fb-root {
    height: 70svh;
    min-height: 430px;
    border-inline: 0;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .action,
  .catalog-cover img {
    transition: none;
    transform: none;
  }
}
