:root {
  --ink: #1c1612;
  --paper: #f3ebe0;
  --accent: #8b4518;
  --accent-soft: #c4a484;
  --scrim: rgba(18, 12, 8, 0.62);
  --font-display: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f0e6d8;
    --paper: #1a1511;
    --accent: #d4a574;
    --accent-soft: #8a6a4a;
    --scrim: rgba(8, 6, 4, 0.75);
  }
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: #f4ebe0;
  background: #120e0a;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

.parallax-root {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.parallax-layer {
  position: absolute;
  inset: -6% -3%;
  background: url("/assets/library-hero.jpg") center / cover no-repeat;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.parallax-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--scrim) 0%, rgba(12, 8, 5, 0.5) 55%, rgba(12, 8, 5, 0.82) 100%);
}

.card-soft {
  width: min(34rem, 100%);
  padding: clamp(1.75rem, 5vw, 3rem);
  padding-bottom: clamp(2.5rem, 10vh, 4.5rem);
  animation: rise 0.85s ease-out both;
}

.brand-small {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 9vw, 3.6rem);
  font-weight: 600;
  line-height: 1;
}

.book-title {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent-soft);
}

.lede {
  margin: 0 0 1.35rem;
  max-width: 28rem;
  font-size: 1.05rem;
  line-height: 1.55;
  opacity: 0.95;
}

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

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border-radius: 2px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}

.cta.primary {
  background: #f4ebe0;
  color: #1c1612;
}

.cta.ghost {
  color: #f4ebe0;
  outline: 1px solid rgba(244, 235, 224, 0.5);
}

.cta:hover { transform: translateY(-1px); }

.cta:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
}

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

@media (prefers-reduced-motion: reduce) {
  .parallax-layer { transform: none !important; will-change: auto; }
  .card-soft { animation: none; }
  .cta:hover { transform: none; }
}
