:root {
  color-scheme: dark;
  --background: #121210;
  --surface: #1a1916;
  --ivory: #f0e9dd;
  --muted: #a39b8f;
  --gold: #b99969;
  --line: rgba(240, 233, 221, 0.14);
  --sans: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ivory);
  background:
    radial-gradient(circle at 76% 48%, rgba(185, 153, 105, 0.07), transparent 34rem),
    radial-gradient(circle at 12% 12%, rgba(240, 233, 221, 0.035), transparent 28rem),
    var(--background);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  content: "";
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

::selection {
  color: var(--background);
  background: var(--gold);
}

.page-shell {
  display: flex;
  flex-direction: column;
  width: min(100%, 1600px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.75rem) clamp(1.5rem, 5.5vw, 5.5rem) 1.75rem;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-header {
  position: relative;
  z-index: 2;
  animation: reveal 900ms 80ms both;
}

.wordmark {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.055em;
}

.wordmark__number {
  margin-left: 0.08em;
  color: var(--gold);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.header-note {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.header-note span {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0.25rem rgba(185, 153, 105, 0.09);
}

.hero {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1.08fr) minmax(22rem, 0.92fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 7rem);
  padding: clamp(4.5rem, 9vh, 8rem) 0;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding-bottom: 0.5rem;
  animation: reveal 1000ms 180ms both;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 clamp(1.5rem, 3vw, 2.5rem);
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 2.75rem;
  height: 1px;
  background: var(--gold);
}

h1 {
  margin: 0;
  font-size: clamp(4.1rem, 8.5vw, 9.25rem);
  font-weight: 550;
  letter-spacing: -0.075em;
  line-height: 0.86;
}

.hero-title__number {
  margin-left: 0.035em;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 0.89em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.08em;
}

.tagline {
  margin: clamp(1.75rem, 3.2vw, 2.75rem) 0 0 0.18rem;
  color: #c9c0b2;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-style: italic;
  letter-spacing: -0.02em;
}

.book-scene {
  position: relative;
  width: 100%;
  height: clamp(25rem, 42vw, 34rem);
  isolation: isolate;
  animation: scene-reveal 1200ms 260ms both;
}

.scene-glow {
  position: absolute;
  top: 12%;
  left: 5%;
  width: 90%;
  aspect-ratio: 1;
  border: 1px solid rgba(185, 153, 105, 0.08);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(185, 153, 105, 0.075), transparent 65%);
}

.scene-glow::before,
.scene-glow::after {
  position: absolute;
  border: 1px solid rgba(185, 153, 105, 0.045);
  border-radius: inherit;
  content: "";
}

.scene-glow::before {
  inset: 9%;
}

.scene-glow::after {
  inset: 20%;
}

.book {
  position: absolute;
  z-index: 2;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.18rem 0.32rem 0.32rem 0.18rem;
  box-shadow:
    0 2.5rem 3rem -1.5rem rgba(0, 0, 0, 0.82),
    inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  transform-origin: center;
}

.book::after {
  position: absolute;
  content: "";
  background: repeating-linear-gradient(
    to bottom,
    #d8cfbd 0,
    #d8cfbd 1px,
    #bcb19f 1px,
    #bcb19f 2px
  );
  box-shadow: inset -0.2rem 0 0.4rem rgba(0, 0, 0, 0.13);
}

.book__spine {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  width: 0.85rem;
  border-right: 1px solid rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.15);
  box-shadow: inset -1px 0 rgba(255, 255, 255, 0.06);
}

.book__frame {
  position: absolute;
  inset: 1.3rem 1.15rem 1.3rem 1.75rem;
  border: 1px solid currentColor;
  opacity: 0.38;
}

.book__monogram {
  position: absolute;
  z-index: 1;
  color: currentColor;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-style: italic;
  letter-spacing: -0.04em;
  opacity: 0.78;
}

.book__rule {
  position: absolute;
  width: 2.5rem;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.book--back {
  top: 19%;
  left: 9%;
  width: 35%;
  height: 56%;
  color: #aa9878;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025), transparent 20%),
    #343830;
  transform: rotate(-13deg);
}

.book--back::after {
  top: 0.22rem;
  right: -0.3rem;
  bottom: 0.22rem;
  width: 0.48rem;
  border-radius: 0 0.18rem 0.18rem 0;
}

.book--back .book__monogram {
  right: 1.5rem;
  bottom: 2.2rem;
  font-size: 1.1rem;
}

.book--upright {
  top: 10%;
  left: 39%;
  width: 37%;
  height: 66%;
  color: #c4a36d;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.055), transparent 22%),
    linear-gradient(90deg, transparent 70%, rgba(0, 0, 0, 0.12)),
    #61372f;
  transform: rotate(7deg);
}

.book--upright::after {
  top: 0.25rem;
  right: -0.34rem;
  bottom: 0.25rem;
  width: 0.55rem;
  border-radius: 0 0.2rem 0.2rem 0;
}

.book--upright .book__monogram {
  top: 44%;
  left: 50%;
  font-size: 2.1rem;
  transform: translate(-50%, -50%);
}

.book--upright .book__rule {
  top: 54%;
  left: 50%;
  transform: translateX(-50%);
}

.book--horizontal {
  right: 2%;
  bottom: 13%;
  width: 58%;
  height: 15%;
  color: #4f4332;
  background: #b19569;
  transform: rotate(-10deg);
}

.book--horizontal::after {
  right: 0.22rem;
  bottom: -0.28rem;
  left: 0.22rem;
  height: 0.48rem;
  border-radius: 0 0 0.2rem 0.2rem;
  background: repeating-linear-gradient(
    to right,
    #d8cfbd 0,
    #d8cfbd 1px,
    #bcb19f 1px,
    #bcb19f 2px
  );
}

.book--horizontal .book__frame {
  inset: 0.8rem 1rem 1.1rem 1.55rem;
}

.book--horizontal .book__monogram {
  top: 50%;
  right: 1.4rem;
  font-family: var(--sans);
  font-size: 0.57rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.2em;
  transform: translateY(-50%);
}

.book--foreground {
  bottom: 4%;
  left: 10%;
  z-index: 4;
  width: 52%;
  height: 11%;
  color: #96988d;
  background: #292e2c;
  transform: rotate(5deg);
}

.book--foreground::after {
  right: 0.18rem;
  bottom: -0.25rem;
  left: 0.18rem;
  height: 0.44rem;
  border-radius: 0 0 0.18rem 0.18rem;
  background: repeating-linear-gradient(
    to right,
    #cfc6b5 0,
    #cfc6b5 1px,
    #afa493 1px,
    #afa493 2px
  );
}

.book--foreground .book__frame {
  inset: 0.65rem 0.9rem 1rem 1.5rem;
}

.scene-shadow {
  position: absolute;
  right: 4%;
  bottom: 0;
  left: 4%;
  z-index: 1;
  height: 11%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.46);
  filter: blur(1.4rem);
}

.scene-line {
  position: absolute;
  right: 0;
  bottom: 9%;
  left: 0;
  z-index: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(185, 153, 105, 0.24), transparent);
}

.site-footer {
  position: relative;
  z-index: 2;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: #807a70;
  font-size: 0.61rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: reveal 900ms 360ms both;
}

.site-footer p {
  margin: 0;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scene-reveal {
  from {
    opacity: 0;
    transform: translateY(1.5rem) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.78fr);
    gap: 1rem;
  }

  .book-scene {
    height: 27rem;
  }

  .book--horizontal .book__monogram {
    display: none;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding-bottom: 1.25rem;
  }

  .header-note {
    font-size: 0.58rem;
    letter-spacing: 0.12em;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 2.75rem;
    padding: 4.5rem 0 3rem;
  }

  .hero-copy {
    padding-top: 1rem;
  }

  h1 {
    font-size: clamp(4rem, 18vw, 7rem);
  }

  .eyebrow {
    margin-bottom: 1.75rem;
    font-size: 0.61rem;
    letter-spacing: 0.15em;
  }

  .eyebrow span {
    width: 2rem;
  }

  .tagline {
    margin-top: 1.5rem;
  }

  .book-scene {
    width: min(100%, 29rem);
    height: 25rem;
    margin: 0 auto;
  }

  .site-footer {
    font-size: 0.54rem;
    letter-spacing: 0.08em;
  }
}

@media (max-width: 420px) {
  .header-note {
    max-width: 8.5rem;
    line-height: 1.5;
  }

  .book-scene {
    height: 22rem;
  }

  .book__frame {
    inset: 1rem 0.85rem 1rem 1.45rem;
  }

  .book--horizontal .book__frame,
  .book--foreground .book__frame {
    inset: 0.65rem 0.75rem 0.95rem 1.35rem;
  }

  .site-footer p:first-child {
    max-width: 10rem;
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
  }
}
