:root {
  --bg: #f3f1ec;
  --ink: #1c1c1c;
  --muted: #6b6b6b;
  --accent: #e85d3b;
  --surface: #ebe6dc;
  --board: #2a2a2a;
  --paper: #fffcf7;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color: var(--ink);
  background: var(--bg);
  font-family: Manrope, system-ui, sans-serif;
  line-height: 1.45;
  font-weight: 450;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 90% 55% at 85% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 55%),
    radial-gradient(ellipse 70% 40% at 0% 20%, color-mix(in srgb, var(--surface) 80%, transparent), transparent 50%),
    linear-gradient(180deg, #f7f4ee 0%, var(--bg) 28%, var(--bg) 100%);
  color: var(--ink);
}

a {
  color: inherit;
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(14px + var(--safe-top)) 22px 14px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}

.top-brand {
  font-family: Literata, Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.92rem;
  font-weight: 600;
}

.top-nav a {
  text-decoration: none;
  color: var(--muted);
}

.top-nav a:hover {
  color: var(--ink);
}

.top-cta {
  color: var(--accent) !important;
}

.hero {
  min-height: calc(100dvh - 64px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 72px) 48px;
  max-width: 1180px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.brand {
  margin: 0;
  font-family: Literata, Georgia, serif;
  font-weight: 700;
  font-size: clamp(3rem, 8vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.brand em,
.brand-sm em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

.lede {
  margin: 18px 0 0;
  max-width: 28rem;
  font-size: 1.12rem;
  color: color-mix(in srgb, var(--ink) 78%, var(--muted));
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 14px;
  padding: 14px 20px;
  font-weight: 700;
  background: var(--board);
  color: #fff;
  transition: transform 0.2s ease, background 0.2s ease;
}

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

.btn.accent {
  background: var(--accent);
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
  padding-left: 8px;
  padding-right: 8px;
}

.hero-visual {
  position: relative;
  min-height: 320px;
}

.shelf {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 40px color-mix(in srgb, var(--ink) 12%, transparent));
  animation: rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.shelf-board {
  fill: #3a342c;
}

.b1 { fill: #c45a3b; }
.b2 { fill: #2f4a3c; }
.b3 { fill: #d8c4a0; }
.b4 { fill: #3d5a73; }
.b5 { fill: #8b4a5a; }

.books-top {
  animation: settle 1.2s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.books-bottom {
  animation: settle 1.2s 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-copy {
  animation: fade-up 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.section {
  max-width: 860px;
  margin: 0 auto;
  padding: 72px clamp(20px, 5vw, 40px);
}

.section h2 {
  margin: 0;
  font-family: Literata, Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-lede {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 38rem;
}

.feature-list {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.feature-list li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.feature-list li:last-child {
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}

.feat-name {
  font-family: Literata, Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
}

.feat-text {
  color: var(--muted);
  align-self: center;
}

.free {
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  max-width: none;
  padding-left: max(20px, calc((100% - 860px) / 2));
  padding-right: max(20px, calc((100% - 860px) / 2));
}

.support .fine {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.close {
  text-align: left;
  padding-bottom: 96px;
}

.brand-sm {
  margin: 0;
  font-family: Literata, Georgia, serif;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 20px clamp(20px, 5vw, 40px) calc(20px + var(--safe-bottom));
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  color: var(--muted);
  font-size: 0.9rem;
}

.foot a {
  color: inherit;
  text-decoration: none;
}

.foot a:hover {
  color: var(--ink);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 36px;
  }

  .hero-visual {
    order: -1;
    min-height: 0;
  }

  .shelf {
    max-width: 420px;
    margin: 0 auto;
    display: block;
  }

  .top-nav a:not(.top-cta) {
    display: none;
  }

  .feature-list li {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
