:root {
  --bg: #fbf8f3; --paper: #ffffff; --ink: #24201c; --muted: #6b635a; --line: #e8e0d4;
  --accent: #c2502b; --accent-ink: #ffffff; --accent-soft: #fbe9e1; --green: #2f5d46;
  --radius: 16px; --shadow: 0 10px 30px rgba(60, 40, 20, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15.5px/1.6 Inter, system-ui, sans-serif; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
h1 em { font-style: italic; color: var(--accent); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); }
h3 { font-size: 1.1rem; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
section { padding: 72px 0; }
.sub { color: var(--muted); margin: -4px 0 32px; }
.fine { color: var(--muted); font-size: .9rem; }
.center { text-align: center; }

.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px;
  padding: 14px 26px; font: 600 1rem Inter, sans-serif; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.07); }
.btn.small { padding: 9px 18px; font-size: .92rem; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.wide { width: 100%; margin-top: 16px; }
.linkish { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

.top { position: sticky; top: 0; z-index: 10; background: rgba(251, 248, 243, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .row { height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; font: 700 1.25rem Fraunces, serif; color: var(--ink); text-decoration: none; }
.mark { display: block; width: 32px; height: 32px; }
.top nav { display: flex; gap: 22px; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }

.hero { padding-top: 56px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .85rem; padding: 4px 12px; border-radius: 999px; margin: 0 0 16px; }
.lede { font-size: 1.05rem; color: var(--muted); max-width: 36em; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 8px; }
.hero-books { position: relative; width: 100%; max-width: 460px; aspect-ratio: 1 / 1; margin: 0 auto; }
.hero-books img { position: absolute; width: 56%; border-radius: 6px; box-shadow: var(--shadow); aspect-ratio: 2 / 3; object-fit: cover; background: var(--line); }
.hero-books .b1 { left: 0; top: 8%; transform: rotate(-6deg); }
.hero-books .b2 { left: 22%; top: 0; z-index: 2; }
.hero-books .b3 { right: 0; top: 12%; transform: rotate(6deg); }

.steps { background: var(--paper); border-block: 1px solid var(--line); }
.step-grid { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-grid span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 600; margin-bottom: 12px; }
.step-grid p { color: var(--muted); margin: 0; }

.format-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.format { text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, transform .15s; }
.format:hover, .format.on { border-color: var(--accent); transform: translateY(-2px); }
.format b { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.format span { color: var(--muted); font-size: .95rem; }

.samples { background: var(--paper); border-block: 1px solid var(--line); }
.sample-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.sample { color: var(--ink); text-decoration: none; background: none; border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; }
.sample img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; box-shadow: var(--shadow); margin-bottom: 14px; background: var(--line); transition: transform .15s; }
.sample:hover img { transform: translateY(-4px); }
.sample b { display: block; }
.sample span { color: var(--muted); font-size: .95rem; }


.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.price { position: relative; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 30px 16px; cursor: pointer; font: inherit; color: inherit; text-align: center; transition: border-color .15s, transform .15s; }
.price:hover { border-color: var(--accent); transform: translateY(-2px); }
.price.popular { border-color: var(--accent); background: #fffaf7; }
.price em { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-style: normal; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.price b { display: block; font: 700 1.9rem Fraunces, serif; }
.price small { font: 400 1rem Inter, sans-serif; color: var(--muted); }
.price span { color: var(--accent); font-weight: 600; }

.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; }
.faq details p { color: var(--muted); margin: 10px 0 0; }

.foot { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .92rem; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { color: var(--muted); }

dialog { border: 0; border-radius: 20px; padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0, 0, 0, .25); background: var(--paper); color: var(--ink); }
dialog::backdrop { background: rgba(36, 32, 28, .5); }
dialog form { padding: 32px 28px 24px; position: relative; }
dialog h2 { font-size: 1.7rem; }
dialog label { display: block; font-weight: 600; font-size: .9rem; margin: 16px 0 6px; }
dialog input, dialog select { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: #fff; color: var(--ink); }
dialog input:focus, dialog select:focus { outline: none; border-color: var(--accent); }
.x { position: absolute; right: 14px; top: 10px; background: none; border: 0; font-size: 1.8rem; color: var(--muted); cursor: pointer; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.msg { font-weight: 600; margin: 8px 0 0; }
.msg.ok { color: var(--green); } .msg.err { color: #b42318; }
.cf-turnstile { margin-top: 14px; }
.early-done { padding: 40px 28px 28px; text-align: center; }
.early-done[hidden], dialog form[hidden] { display: none; }
.done-tick { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--green); color: #fff; font-size: 2rem; font-weight: 700; }
.early-done p { color: var(--muted); margin: 0 0 8px; }
.fmt-body { padding: 32px 28px 26px; position: relative; }
.fmt-lead { color: var(--muted); margin: 0 0 14px; }
.fmt-points { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.fmt-points li { position: relative; padding-left: 30px; }
.fmt-points li::before { content: "✓"; position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: .75rem; font-weight: 700; }
.fmt-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 20; max-width: 560px; margin: 0 auto; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 14px 18px; display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.consent[hidden] { display: none; }
.consent p { margin: 0; font-size: .92rem; }
.consent div { display: flex; gap: 8px; flex-shrink: 0; }

.legal { padding: 48px 0 72px; }
.legal h1 { font-size: 2rem; }
.legal h2 { font-size: 1.35rem; margin-top: 1.6em; }
.legal p, .legal li { color: #3d3730; }

#reader { width: min(1180px, calc(100vw - 16px)); height: min(920px, calc(100dvh - 16px)); max-height: none; max-width: none; background: #2b2622; color: #fff; display: none; flex-direction: column; overflow: hidden; }
#reader[open] { display: flex; }
.reader-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px 6px 18px; }
.reader-bar b { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-bar span { color: #d8cfc6; font-size: .9rem; }
.reader-x { background: none; border: 0; color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.reader-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 8px; background: radial-gradient(ellipse at center, #4a3f37 0%, #2b2622 70%); }
.book-holder { position: relative; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .45)); }
.bpage { background: #fff; overflow: hidden; }
/* centre fold: shading on each page's inner edge + a thin crease, so the spread reads as a bound book */
.bpage::after { content: ""; position: absolute; top: 0; bottom: 0; width: 14%; pointer-events: none; z-index: 1; }
.bpage.--right::after { left: 0; background: linear-gradient(to right, rgba(60, 40, 20, .30) 0%, rgba(60, 40, 20, .10) 3%, rgba(60, 40, 20, .04) 35%, rgba(60, 40, 20, 0) 100%); box-shadow: inset 1px 0 0 rgba(60, 40, 20, .25); }
.bpage.--left::after { right: 0; background: linear-gradient(to left, rgba(60, 40, 20, .30) 0%, rgba(60, 40, 20, .10) 3%, rgba(60, 40, 20, .04) 35%, rgba(60, 40, 20, 0) 100%); box-shadow: inset -1px 0 0 rgba(60, 40, 20, .25); }
.bpage.--hard::after { display: none; }
.bpage img { width: 100%; height: 100%; display: block; object-fit: cover; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.reader-foot { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 10px 12px 14px; }
.reader-nav { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.reader-nav:hover { background: rgba(255, 255, 255, .26); }
.reader-nav:disabled { opacity: .25; cursor: default; }

/* ---- hero tag + features ---- */
.pill-dot { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--accent); font-weight: 600; font-size: .88rem; padding: 6px 14px; border-radius: 999px; margin: 0 0 18px; }
.pill-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(194, 80, 43, .35); } 50% { box-shadow: 0 0 0 6px rgba(194, 80, 43, 0); } }
h1 .hl { color: var(--accent); }

.sec-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.sec-head .sub { margin: 0; }
.tag { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: .92rem; margin: 0 0 14px; }
.tag span { background: var(--accent); color: var(--accent-ink); font-weight: 600; padding: 3px 12px; border-radius: 999px; }

.feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.feat { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 26px; display: flex; flex-direction: column; gap: 20px; box-shadow: 0 2px 12px rgba(60, 40, 20, .04); }
.feat-head { display: flex; gap: 16px; align-items: flex-start; }
.feat-head h3 { margin: 4px 0 6px; font: 600 1.08rem/1.3 Inter, sans-serif; }
.feat-head p { margin: 0; color: var(--muted); }
.ico { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: var(--accent-soft); }
.ico svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.panel { flex: 1; min-height: 300px; border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: linear-gradient(180deg, var(--accent-soft) 0%, var(--paper) 45%); position: relative; overflow: hidden; }
.kicker { margin: 0 0 8px; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }

/* idea -> book demo */
.demo-input { display: flex; align-items: center; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--accent); border-radius: 10px; background: #fff; font-size: .95rem; box-shadow: 0 0 0 4px rgba(194, 80, 43, .08); }
.caret { width: 1.5px; height: 1.1em; background: var(--accent); margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.demo-plan { list-style: none; counter-reset: ch; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.demo-plan li { counter-increment: ch; display: flex; align-items: center; gap: 10px; font-size: .9rem; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
.demo-plan li::before { content: counter(ch); display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--muted); font-size: .75rem; font-weight: 600; transition: background .3s, color .3s; }
.demo-plan li.in { opacity: 1; transform: none; }
.demo-plan li.ok::before { content: "✓"; background: var(--green); color: #fff; }
.demo-done { margin-top: 14px; display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); opacity: 0; transform: translateY(14px); transition: opacity .45s, transform .45s; }
.demo-done.in { opacity: 1; transform: none; }
.demo-done img { width: 52px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; }
.demo-done b { display: block; }
.demo-done span { display: block; color: var(--muted); font-size: .85rem; }
.demo-done em { font-style: normal; color: var(--accent); font-weight: 600; font-size: .85rem; }

/* cover demo */
.cover-demo { display: flex; flex-direction: column; align-items: center; }
.cover-swap { position: relative; width: 150px; aspect-ratio: 2 / 3; margin: 6px 0 16px; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow); transform: rotate(-2deg); }
.cover-swap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-swap .titled { animation: titleIn 6s ease-in-out infinite; }
@keyframes titleIn { 0%, 30% { opacity: 0; } 45%, 90% { opacity: 1; } 100% { opacity: 0; } }
.cover-steps { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; font-size: .82rem; font-weight: 600; }
.cover-steps span { padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.cover-steps .s1 { animation: stepA 6s infinite; } .cover-steps .s2 { animation: stepB 6s infinite; }
@keyframes stepA { 0%, 30% { color: var(--accent); border-color: var(--accent); } 45%, 100% { color: var(--muted); border-color: var(--line); } }
@keyframes stepB { 0%, 30% { color: var(--muted); border-color: var(--line); } 45%, 90% { color: var(--accent); border-color: var(--accent); } 100% { color: var(--muted); border-color: var(--line); } }

/* format chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; align-content: center; justify-content: center; }
.chips span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-weight: 500; font-size: .92rem; animation: chip 9s infinite; }
.chips span:nth-child(2) { animation-delay: 1s; } .chips span:nth-child(3) { animation-delay: 2s; } .chips span:nth-child(4) { animation-delay: 3s; }
.chips span:nth-child(5) { animation-delay: 4s; } .chips span:nth-child(6) { animation-delay: 5s; } .chips span:nth-child(7) { animation-delay: 6s; }
.chips span:nth-child(8) { animation-delay: 7s; } .chips span:nth-child(9) { animation-delay: 8s; }
@keyframes chip { 0%, 11% { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); } 12%, 100% { border-color: var(--line); color: var(--ink); background: #fff; } }

/* files */
.files { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.file-row { display: flex; gap: 16px; }
.file { position: relative; display: grid; place-items: end center; width: 76px; height: 96px; padding-bottom: 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px 22px 8px 8px; box-shadow: var(--shadow); font-weight: 700; font-size: .85rem; letter-spacing: .04em; animation: bob 3s ease-in-out infinite; }
.file::before { content: ""; position: absolute; left: 14px; right: 14px; top: 18px; height: 34px; background: repeating-linear-gradient(var(--line) 0 3px, transparent 3px 9px); }
.file.pdf { color: #b42318; } .file.epub { color: var(--green); animation-delay: .4s; } .file.doc { color: var(--accent); animation-delay: .8s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.stores { margin: 0; text-align: center; color: var(--muted); font-size: .9rem; max-width: 340px; }

@media (prefers-reduced-motion: reduce) {
  .pill-dot::before, .caret, .chips span, .file, .cover-swap .titled, .cover-steps span { animation: none; }
  .cover-swap .titled { opacity: 1; }
}
@media (max-width: 860px) { .feat-grid { grid-template-columns: 1fr; } }
@media (max-width: 540px) { .feat { padding: 20px; } .panel { min-height: 280px; padding: 18px; } .feat-head { flex-direction: column; gap: 12px; } }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-books { max-width: 380px; }
  .format-grid, .sample-grid, .step-grid { grid-template-columns: 1fr 1fr; }
  .price-grid { grid-template-columns: 1fr 1fr; }
  .top nav { display: none; }
}
@media (max-width: 540px) {
  section { padding: 52px 0; }
  .format-grid, .sample-grid, .step-grid { grid-template-columns: 1fr; }
  .sample-grid { max-width: 320px; }
  .consent { flex-direction: column; align-items: stretch; }
}
