:root {
  --ink: #1c1612;
  --paper: #f3ebe0;
  --paper-muted: #e4d7c6;
  --accent: #8b4518;
  --accent-soft: #c4a484;
  --scrim: rgba(18, 12, 8, 0.58);
  --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;
    --paper-muted: #2a221c;
    --accent: #d4a574;
    --accent-soft: #8a6a4a;
    --scrim: rgba(8, 6, 4, 0.72);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

a {
  color: var(--accent);
}

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

.parallax-layer {
  position: absolute;
  inset: -8% -4%;
  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.45) 42%, var(--paper) 100%);
}

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  padding-bottom: clamp(3rem, 12vh, 6rem);
  color: #f7efe4;
  max-width: 40rem;
}

.author-link {
  display: inline-block;
  width: clamp(5.5rem, 18vw, 7rem);
  height: clamp(5.5rem, 18vw, 7rem);
  margin: 0 0 1.15rem;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 2px rgba(244, 235, 224, 0.55), 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: rise 0.9s ease-out both;
}

.author-link:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 0 2px rgba(244, 235, 224, 0.85), 0 14px 32px rgba(0, 0, 0, 0.4);
}

.author-link:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 4px;
}

.author-portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.75rem, 11vw, 5.25rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
  animation: rise 0.9s ease-out 0.08s both;
}

.lede {
  margin: 0 0 1.5rem;
  font-size: clamp(1.05rem, 2.6vw, 1.25rem);
  max-width: 28rem;
  opacity: 0.95;
  animation: rise 0.9s ease-out 0.16s both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.9s ease-out 0.26s both;
}

.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;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

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

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

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

main {
  background: var(--paper);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 3rem) 1rem;
}

.section {
  max-width: 36rem;
  margin: 0 auto 3.5rem;
}

.section h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
}

.section p {
  margin: 0;
  font-size: 1.05rem;
  color: color-mix(in srgb, var(--ink) 88%, transparent);
}

.footer {
  background: var(--paper);
  border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  padding: 2rem clamp(1.25rem, 5vw, 3rem) 3rem;
  text-align: center;
  font-size: 0.95rem;
}

.footer p {
  margin: 0.25rem 0;
}

.footer a {
  text-decoration: none;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .parallax-layer {
    transform: none !important;
    will-change: auto;
  }
  .author-link, .brand, .lede, .cta-row {
    animation: none;
  }
  .author-link:hover,
  .cta:hover {
    transform: none;
  }
}
