:root {
  --bg: #f6f1e7;
  --surface: #fffaf1;
  --ink: #1f2a22;
  --muted: #5b6659;
  --line: #e2d8c6;
  --clay: #b5532e;
  --clay-ink: #ffffff;
  --forest: #2f5d3a;
  --forest-soft: #e5ede3;
  --radius: 14px;
  --max: 1080px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151a16;
    --surface: #1d241f;
    --ink: #eee8dc;
    --muted: #a9b2a5;
    --line: #2f3a32;
    --clay: #d9774f;
    --clay-ink: #1a120e;
    --forest: #8cc29a;
    --forest-soft: #233127;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--clay); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand svg { width: 34px; height: 34px; }
.brand-name { font: 600 20px/1 var(--serif); letter-spacing: -0.01em; }
.brand-name span { color: var(--clay); }
.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(38px, 6vw, 64px); }
h2 { font-size: clamp(28px, 3.6vw, 40px); }
h3 { font-size: 22px; }
p { margin: 0 0 1em; }
.eyebrow { font: 600 13px/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--forest); margin-bottom: 18px; }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 40em; }

section { padding: 80px 0; }
section + section { border-top: 1px solid var(--line); }

/* Hero */
.hero { padding: 96px 0 88px; }
.hero h1 { max-width: 14em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
}
.btn-primary { background: var(--clay); color: var(--clay-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }

/* Featured book */
.feature { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: center; }
.cover {
  aspect-ratio: 2 / 3; border-radius: 6px 12px 12px 6px; padding: 28px 24px;
  background: linear-gradient(160deg, #24432c, #16291b); color: #f3ecdf;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 24px 48px -18px rgba(31,42,34,.45);
  position: relative; overflow: hidden; text-decoration: none;
}
.cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background: rgba(0,0,0,.18); }
.cover-kicker { font: 600 11px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #e2a27f; }
.cover-title { font: 600 27px/1.12 var(--serif); }
.cover-sub { font-size: 13px; line-height: 1.45; color: #cfd8cc; margin-top: 12px; }
.cover-mark { display: flex; align-items: center; gap: 8px; font: 600 12px/1 var(--serif); letter-spacing: .04em; color: #e9e1d2; }
.cover-mark svg { width: 20px; height: 20px; }
.tag { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--forest-soft); color: var(--forest); font: 600 13px/1 var(--sans); margin-bottom: 16px; }

ul.checks { list-style: none; padding: 0; margin: 0 0 24px; }
ul.checks li { padding-left: 30px; position: relative; margin-bottom: 10px; }
ul.checks li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--forest-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%232f5d3a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* Lanes */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 36px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; }
.card h3 { font-size: 20px; }
.card p { color: var(--muted); font-size: 15.5px; margin: 0; }
.card .num { font: 600 13px/1 var(--sans); color: var(--clay); margin-bottom: 14px; letter-spacing: .08em; }

/* Name story */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.devanagari { font: 500 clamp(64px, 10vw, 120px)/1.35 var(--serif); color: var(--clay); margin: 0 0 12px; }

/* Signup */
.signup { background: var(--forest); color: #f3ecdf; border-radius: 22px; padding: 56px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.signup h2 { color: #fff; }
.signup p { color: #d5e0d2; margin: 0; }
.signup form { display: flex; flex-wrap: wrap; gap: 10px; }
.signup label { width: 100%; font-size: 14px; color: #d5e0d2; }
.signup input[type="email"] {
  flex: 1 1 220px; min-height: 50px; border-radius: 999px; border: 0; padding: 0 20px;
  font: 16px var(--sans); color: #1f2a22; background: #fffaf1;
}
.signup .btn-primary { background: #e2a27f; color: #1f2a22; }
.form-note { width: 100%; font-size: 13.5px; color: #bcd0bb; min-height: 1.4em; margin-top: 4px; }

/* Book page */
.book-hero { display: grid; grid-template-columns: 320px 1fr; gap: 64px; align-items: start; padding: 72px 0; }
.toc { counter-reset: ch; list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 40px; }
.toc li { counter-increment: ch; break-inside: avoid; padding: 10px 0 10px 40px; position: relative; border-bottom: 1px solid var(--line); }
.toc li::before { content: counter(ch, decimal-leading-zero); position: absolute; left: 0; top: 11px; font: 600 14px/1.5 var(--sans); color: var(--clay); }
.meta-row { display: flex; flex-wrap: wrap; gap: 10px 26px; color: var(--muted); font-size: 15px; margin: 20px 0 30px; }
.callout { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--clay); border-radius: var(--radius); padding: 24px 26px; }
.callout p:last-child { margin: 0; }
.prose { max-width: 42em; }
.prose h2 { margin-top: 1.6em; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: 14.5px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer a { color: var(--muted); }

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .feature, .story, .signup, .book-hero { grid-template-columns: 1fr; gap: 36px; }
  .feature .cover, .book-hero .cover { max-width: 260px; }
  .signup { padding: 36px 24px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  section { padding: 56px 0; }
  .hero { padding: 64px 0 56px; }
  .grid-4 { grid-template-columns: 1fr; }
  .nav { gap: 14px; font-size: 14px; }
  .nav .hide-sm { display: none; }
  .toc { columns: 1; }
}
