@font-face {
  font-family: "RB Serif";
  src: url("/fonts/noto-serif-latin.78543b39d9.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "RB Serif";
  src: url("/fonts/noto-serif-italic-latin.13c3bbb26c.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #000007;
  --night: #070b18;
  --text: #f1eadb;
  --muted: rgba(241, 234, 219, 0.6);
  --gold-hi: #fbe8b4;
  --gold: #e2bc6c;
  --gold-lo: #a9772f;
  --serif: "RB Serif", "Noto Serif", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  background: var(--ink);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  background:
    radial-gradient(ellipse 46% 60% at 30% 46%, rgba(34, 46, 84, 0.55) 0%, rgba(12, 17, 36, 0.35) 45%, transparent 75%),
    radial-gradient(ellipse 50% 40% at 72% 50%, rgba(120, 86, 30, 0.10) 0%, transparent 70%),
    var(--ink);
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Layout: the book and the words side by side on wide screens, stacked on narrow ones. */
.stage {
  flex: 1;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  column-gap: clamp(1rem, 4vw, 5rem);
  padding: clamp(1rem, 2.5vw, 2.5rem) clamp(1.25rem, 5vw, 6rem) clamp(1.5rem, 3vw, 2.5rem);
}

.book {
  margin: 0;
  display: flex;
  justify-content: center;
}

.book img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100svh - 4.5rem);
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 4%, #000 78%, transparent 99%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 4%, #000 78%, transparent 99%);
  mask-composite: intersect;
}

.pitch {
  container-type: inline-size;
  width: 100%;
  max-width: 34rem;
  padding-bottom: 2rem;
}

/* Title: gold, like the lettering on the cover. */
.title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.012em;
  color: var(--gold);
  background: linear-gradient(176deg, var(--gold-hi) 8%, var(--gold) 52%, var(--gold-lo) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  padding-bottom: 0.08em;
}
.title .small {
  display: block;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 2.4vw, 2.3rem);
  letter-spacing: 0.01em;
  margin: 0 0 0.12em 0.08em;
}
.title .main {
  display: block;
  font-size: clamp(3.1rem, 6.4vw, 6.4rem);
  text-wrap: balance;
}
.title.short .main {
  white-space: nowrap;
  font-size: min(6.4rem, 14.2cqi);
}

.subtitle {
  margin: 1.1rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.12rem, 1.55vw, 1.45rem);
  line-height: 1.35;
  color: var(--text);
  max-width: 26em;
  text-wrap: balance;
}

.rule {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 2rem 0 1.9rem;
}
.rule::before,
.rule::after {
  content: "";
  height: 1px;
  flex: 0 0 4.5rem;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.rule::after { background: linear-gradient(90deg, var(--gold), transparent); }
.rule span {
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: var(--gold);
  box-shadow: 0 0 12px rgba(226, 188, 108, 0.55);
}

.buy-heading {
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.formats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.25rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--gold-hi);
  border: 1px solid rgba(226, 188, 108, 0.65);
  background: rgba(226, 188, 108, 0.06);
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.btn::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 0.1rem;
  opacity: 0.85;
}
.btn:hover {
  background: rgba(226, 188, 108, 0.16);
  border-color: var(--gold);
}
.btn.primary {
  color: #1a1206;
  border-color: transparent;
  background: linear-gradient(180deg, #f6dc98 0%, #dfb35f 100%);
  box-shadow: 0 6px 24px rgba(226, 178, 90, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn.primary:hover {
  background: linear-gradient(180deg, #fbe6b0 0%, #e8c071 100%);
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible,
.store select:focus-visible,
.langs a:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 3px;
}
.btn[hidden] { display: none; }

.store {
  display: inline-block;
  position: relative;
  margin-top: 1.1rem;
}
.store select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(241, 234, 219, 0.22);
  border-radius: 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.92rem;
  padding: 0.45rem 1.5rem 0.4rem 0.1rem;
  cursor: pointer;
}
.store select:hover { color: var(--text); border-bottom-color: rgba(241, 234, 219, 0.45); }
.store::after {
  content: "";
  position: absolute;
  right: 0.3rem;
  top: 50%;
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.store option { color: #111; background: #f4f1ea; }

.langs {
  position: absolute;
  top: 0.9rem;
  right: clamp(1rem, 3vw, 2.5rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.2rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  z-index: 2;
}
.langs a { color: var(--muted); text-decoration: none; }
.langs a:hover { color: var(--text); }
.langs a[aria-current="page"] { color: var(--gold-hi); }

/* Arrival: the book rises into the light, then the words. */
@media (prefers-reduced-motion: no-preference) {
  .book img { animation: rise 1100ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .pitch > * { animation: fade 900ms ease both; }
  .pitch > :nth-child(1) { animation-delay: 220ms; }
  .pitch > :nth-child(2) { animation-delay: 330ms; }
  .pitch > :nth-child(3) { animation-delay: 430ms; }
  .pitch > :nth-child(n+4) { animation-delay: 520ms; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Narrow screens: book first, words under it, buttons full width. */
@media (max-width: 899px) {
  .stage {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding-top: 1.4rem;
  }
  .book img { max-height: 47svh; }
  .pitch { padding-bottom: 1rem; display: flex; flex-direction: column; align-items: center; margin-top: -0.4rem; }
  .title .small { margin-left: 0; font-size: 1.35rem; }
  .title.short .main { font-size: min(3.4rem, 15cqi); }
  .subtitle { margin: 0.7rem auto 0; font-size: 1.08rem; }
  .rule { justify-content: center; margin: 1.15rem 0 1.05rem; }
  .buy-heading { margin-bottom: 0.8rem; }
  .formats { flex-direction: column; width: min(100%, 22rem); }
  .btn { width: 100%; }
}

@media (max-width: 899px) and (max-height: 700px) {
  .book img { max-height: 40svh; }
  .rule { margin: 0.9rem 0 0.8rem; }
}

@media (min-width: 900px) and (max-height: 760px) {
  .title.short .main { font-size: min(5.4rem, 14.2cqi); }
  .rule { margin: 1.5rem 0 1.4rem; }
}
