:root {
  --ink: #1b1f2a;
  --muted: #5b6272;
  --paper: #faf8f4;
  --card: #ffffff;
  --line: #e6e1d8;
  --accent: #c2572b;
  --accent-dark: #9a4120;
  --deep: #1f2d3d;
  --radius: 14px;
  --max: 1100px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
}
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
a { color: var(--accent-dark); }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.25rem; }
.brand svg { width: 34px; height: 34px; }
.nav { display: flex; gap: 26px; }
.nav a { color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav a:hover, .nav a.active { color: var(--accent); }
.menu-toggle { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--ink); }

/* Hero */
.hero { padding: 90px 0 70px; background:
  radial-gradient(circle at 85% 20%, rgba(194,87,43,.12), transparent 45%),
  radial-gradient(circle at 10% 90%, rgba(31,45,61,.08), transparent 40%); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 640px; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; border: 2px solid var(--accent); }
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* Sections */
section { padding: 70px 0; }
.section-head { margin-bottom: 36px; max-width: 680px; }
.section-head p { color: var(--muted); }
.alt { background: #f2eee6; }
.dark { background: var(--deep); color: #eef1f5; }
.dark p { color: #c7cfda; }
.dark a { color: #f2a37f; }

/* Cards */
.grid { display: grid; gap: 24px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; }
.card p { color: var(--muted); }
.card .btn-row { margin-top: auto; padding-top: 10px; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #f6e3d9; color: var(--accent-dark); margin-bottom: 12px; align-self: flex-start; }
.tag.soon { background: #e3e8ef; color: var(--deep); }

/* Book covers (CSS-drawn placeholders, swap for real cover images) */
.cover-img { width: 140px; height: auto; border-radius: 4px; box-shadow: 0 12px 24px rgba(0,0,0,.18); }
.book { display: grid; grid-template-columns: 170px 1fr; gap: 28px; align-items: start; }
.cover { width: 140px; aspect-ratio: 2/3; border-radius: 6px; padding: 18px 14px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 12px 24px rgba(0,0,0,.18); font-family: "Fraunces", Georgia, serif; }
.cover .t { font-size: 1.15rem; line-height: 1.15; font-weight: 600; }
.cover .a { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.cover.c1 { background: linear-gradient(160deg, #1f2d3d, #3d5a78); }
.cover.c2 { background: linear-gradient(160deg, #7a2f17, #c2572b); }
.cover.c3 { background: linear-gradient(160deg, #3b3b3b, #8a8a8a); }
.cover.c4 { background: linear-gradient(160deg, #3d4a2f, #8a9a6a); }
.cover.c5 { background: linear-gradient(160deg, #3a2d4d, #8b7aa8); }
.meta { font-size: .9rem; color: var(--muted); margin-bottom: 12px; }

/* App icon */
.app-icon { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 1.6rem; margin-bottom: 16px; font-family: "Fraunces", Georgia, serif; }
.app-icon.hw { background: linear-gradient(135deg, #c2572b, #e8955f); }
.app-icon.sw { background: linear-gradient(135deg, #1f2d3d, #4f7aa3); }
ul.features { padding-left: 1.1em; color: var(--muted); margin: 0 0 1em; }
ul.features li { margin-bottom: 4px; }

/* Prose pages */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose ul { padding-left: 1.2em; }

/* Contact */
.contact-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
form label { display: block; font-weight: 600; font-size: .9rem; margin: 14px 0 6px; }
form input, form select, form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
form textarea { min-height: 140px; resize: vertical; }
form button { margin-top: 18px; cursor: pointer; }
.note { font-size: .88rem; color: var(--muted); }

/* Footer */
.site-footer { background: var(--deep); color: #c7cfda; padding: 50px 0 30px; font-size: .92rem; }
.site-footer a { color: #eef1f5; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.foot-grid h4 { color: #fff; margin: 0 0 10px; font-size: .95rem; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 6px; }
.copyright { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 20px; font-size: .85rem; }

@media (max-width: 860px) {
  .grid.two, .grid.three, .foot-grid { grid-template-columns: 1fr; }
  .book { grid-template-columns: 120px 1fr; gap: 18px; }
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: 70px; left: 0; right: 0; background: var(--paper); flex-direction: column; padding: 18px 24px; border-bottom: 1px solid var(--line); gap: 14px; }
  .nav.open { display: flex; }
}

.appstore { display: inline-flex; align-items: center; line-height: 0; }
.appstore img { height: 46px; width: auto; display: block; }
.card .appstore img { height: 42px; }
.btn-row + .note { margin-top: 12px; }
