:root {
  --cream: #fbf6ee;
  --paper: #fffdf8;
  --ink: #3a2e28;
  --soft: #7a6a60;
  --line: #ece2d3;
  --rose: #e8798f;
  --sage: #8fb996;
  --butter: #f2c75c;
  --sky: #7fb0e0;
  --plum: #a57fc9;
  --coral: #f09a6b;
  --flame: #f4b24a;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}
a { color: var(--ink); text-decoration-color: var(--rose); text-underline-offset: 3px; }
a:hover { color: var(--rose); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }

/* header */
header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 22px; padding-bottom: 22px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 38px; height: 38px; }
.wordmark { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 26px; letter-spacing: -0.5px; color: var(--ink); }
nav { display: flex; gap: 18px; font-size: 15px; }
nav a { text-decoration: none; color: var(--soft); }
nav a:hover { color: var(--ink); }

/* hero */
.hero { text-align: center; padding: 40px 0 24px; }
.hero h1 { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: clamp(38px, 7vw, 60px); line-height: 1.08; margin: 0 0 16px; letter-spacing: -1px; }
.hero h1 em { font-style: italic; color: var(--rose); }
.hero p.lede { font-size: 19px; color: var(--soft); max-width: 560px; margin: 0 auto 28px; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--paper); text-decoration: none;
  padding: 13px 22px; border-radius: 999px; font-weight: 700; font-size: 15px;
}
.badge:hover { color: var(--paper); background: #2a201b; }
.small { font-size: 14px; color: var(--soft); margin-top: 12px; }

/* shelf */
.shelf { max-width: 560px; margin: 44px auto 0; }
.books { display: flex; align-items: flex-end; justify-content: center; gap: 5px; height: 150px; padding: 0 20px; }
.book { width: 26px; border-radius: 4px 4px 2px 2px; box-shadow: inset -4px 0 0 rgba(0,0,0,0.08); position: relative; }
.book::after { content: ""; position: absolute; left: 5px; right: 5px; top: 14px; height: 3px; background: rgba(255,255,255,0.55); border-radius: 2px; }
.book.lean { transform: rotate(8deg); transform-origin: bottom left; margin-left: 6px; }
.candle { width: 22px; height: 46px; background: var(--paper); border: 2px solid var(--line); border-radius: 6px 6px 3px 3px; position: relative; margin: 0 8px; }
.candle::before { content: ""; position: absolute; left: 50%; top: -16px; width: 10px; height: 14px; margin-left: -5px; background: var(--flame); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; box-shadow: 0 0 14px 4px rgba(244,178,74,0.45); animation: flicker 2.4s ease-in-out infinite; }
@keyframes flicker { 0%,100% { transform: scale(1); } 50% { transform: scale(0.88) translateY(1px); } }
@media (prefers-reduced-motion: reduce) { .candle::before { animation: none; } }
.plank { height: 14px; background: #e6d6bf; border-radius: 6px; box-shadow: 0 6px 0 #d8c4a6; }
.shelf .dragon { width: 74px; height: 74px; margin-bottom: -4px; }

/* features */
section.features { padding: 70px 0 30px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.card h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 20px; margin: 10px 0 6px; }
.card p { margin: 0; color: var(--soft); font-size: 15.5px; }
.dot { width: 12px; height: 34px; border-radius: 3px; display: block; }
h2.section { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: clamp(28px, 5vw, 38px); text-align: center; margin: 0 0 28px; letter-spacing: -0.5px; }

.closer { text-align: center; padding: 50px 0 70px; }
.closer p { color: var(--soft); max-width: 480px; margin: 0 auto 24px; }

/* legal + support pages */
.doc { max-width: 680px; margin: 0 auto; padding: 20px 16px 70px; }
.doc h1 { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: clamp(34px, 6vw, 46px); margin: 10px 0 4px; letter-spacing: -0.5px; }
.doc .updated { color: var(--soft); font-size: 14px; margin: 0 0 28px; }
.doc h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 21px; margin: 32px 0 8px; }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 8px; }
.doc .box { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin: 18px 0; }

/* footer */
footer { border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; padding-bottom: 36px; font-size: 14px; color: var(--soft); }
footer .links { display: flex; flex-wrap: wrap; gap: 16px; }
footer a { color: var(--soft); }

@media (max-width: 560px) {
  nav { gap: 12px; font-size: 14px; }
  nav .hide-sm { display: none; }
  .book { width: 20px; }
  .books { gap: 4px; padding: 0 6px; }
}
