/* Burning Tree Press marketing site. Palette matches the reader (app/globals.css). */
:root {
  --bg: #f4f0e7;
  --card: #fffdf7;
  --soft: #ece5d8;
  --ink: #25231f;
  --muted: #746e64;
  --border: #d9d0c2;
  --accent: #805c3b;
  --accent-ink: #fffdf7;
  --ember: #b4532a;
  --shadow: 0 1px 2px rgba(37, 35, 31, .06), 0 12px 32px rgba(37, 35, 31, .10);
  --radius: 18px;
  --serif: "Cormorant Garamond", Charter, "Iowan Old Style", Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171817; --card: #22231f; --soft: #2b2c27; --ink: #e9e4d9; --muted: #aaa398;
    --border: #3f4038; --accent: #c9976a; --accent-ink: #1b1a17; --ember: #e07a4a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #171817; --card: #22231f; --soft: #2b2c27; --ink: #e9e4d9; --muted: #aaa398;
  --border: #3f4038; --accent: #c9976a; --accent-ink: #1b1a17; --ember: #e07a4a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 var(--sans); }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--ember); }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; letter-spacing: .005em; margin: 0; }
h1 { font-size: clamp(2.6rem, 6.2vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3rem); }
h3 { font-size: 1.5rem; }
.eyebrow { font: 600 .75rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ember); margin: 0 0 14px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 40ch; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--card); padding: 8px 12px; border-radius: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.site-header.scrolled { border-bottom-color: var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 1.35rem/1 var(--serif); white-space: nowrap; }
.brand svg { width: 30px; height: 30px; color: var(--ember); flex: none; }
.site-nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.site-nav a:hover { color: var(--ink); }
.site-nav .btn { color: var(--accent-ink); }
@media (max-width: 760px) { .site-nav a:not(.btn):not(.signin) { display: none; } .site-nav { gap: 14px; } }
@media (max-width: 400px) { .site-nav .signin { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 500 1rem/1 var(--sans); text-decoration: none; border: 1px solid var(--accent); cursor: pointer; transition: transform .15s, background .15s; }
.btn:hover { background: var(--ember); border-color: var(--ember); color: var(--accent-ink); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn.ghost:hover { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn.small { padding: 9px 16px; font-size: .9rem; }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--ember) 55%, transparent); outline-offset: 3px; }

/* Hero */
.hero { padding: 56px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 em { font-style: italic; color: var(--ember); }
.hero .lede { margin: 22px 0 30px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .note { margin-top: 18px; font-size: .9rem; color: var(--muted); }
.phones { position: relative; height: 560px; }
.phone { position: absolute; width: 250px; border-radius: 34px; padding: 9px; background: #1c1b19; box-shadow: var(--shadow), 0 30px 60px rgba(37, 35, 31, .18); }
.phone img { border-radius: 26px; width: 100%; height: auto; aspect-ratio: 600 / 1298; object-fit: cover; }
.phone.one { left: 4%; top: 30px; transform: rotate(-5deg); }
.phone.two { left: 40%; top: 0; transform: rotate(3deg); z-index: 1; }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .phones { height: 470px; max-width: 460px; margin: 8px auto 0; width: 100%; }
  .phone { width: 210px; }
  .phone.one { left: 2%; }
  .phone.two { left: auto; right: 2%; }
}
@media (max-width: 420px) { .phones { height: 400px; } .phone { width: 172px; padding: 7px; border-radius: 28px; } .phone img { border-radius: 22px; } }

/* Sections */
section { padding: 80px 0; }
.band { background: var(--card); border-block: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head p { color: var(--muted); margin: 14px 0 0; font-size: 1.08rem; }
.section-head .eyebrow { color: var(--ember); margin: 0 0 14px; font-size: .75rem; }
.center { text-align: center; margin-inline: auto; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.steps li::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 600 1.1rem/1 var(--serif); margin-bottom: 18px; }
.steps h3 { margin-bottom: 8px; }
.steps p { margin: 0; color: var(--muted); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px 32px; }
.feature svg { width: 26px; height: 26px; color: var(--ember); margin-bottom: 12px; }
.feature h3 { font-size: 1.3rem; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--muted); font-size: .97rem; }
.feature .tag { font: 600 .68rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--border); border-radius: 999px; padding: 4px 8px; margin-left: 6px; vertical-align: 3px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split .shot { display: flex; gap: 18px; justify-content: center; }
.split .shot .phone { position: static; transform: none; width: 230px; }
.qr-card { display: flex; gap: 20px; align-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-top: 26px; }
.qr-card img { width: 96px; height: 96px; background: #fff; border-radius: 10px; padding: 6px; flex: none; }
.qr-card p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 36px; } .split .shot .phone { width: min(230px, 70vw); } }

.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.book { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.book:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.book .cover { aspect-ratio: 4 / 3; background: #1c1b19; display: grid; place-items: center; overflow: hidden; }
.book .cover img { width: 100%; height: 100%; object-fit: cover; }
.book .cover.contain img { object-fit: contain; }
.book .meta { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.book h3 { font-size: 1.45rem; }
.book p { margin: 6px 0 0; color: var(--muted); font-size: .95rem; }
.book .read { display: inline-block; margin-top: auto; padding-top: 12px; color: var(--accent); font-size: .9rem; font-weight: 500; }
@media (max-width: 820px) { .shelf { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }

/* Pricing */
.billing-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 4px; background: var(--card); margin: 0 auto 36px; }
.billing-toggle button { border: 0; background: transparent; color: var(--muted); padding: 8px 18px; border-radius: 999px; font: 500 .95rem/1 var(--sans); cursor: pointer; }
.billing-toggle button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.billing-toggle .save { font-size: .75rem; opacity: .85; margin-left: 4px; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 24px; justify-content: center; }
.plan { background: var(--card); border: 1px solid var(--border); border-radius: 22px; padding: 32px; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--accent); box-shadow: var(--shadow); position: relative; }
.plan.featured::before { content: "Most writers"; position: absolute; top: -13px; left: 32px; background: var(--accent); color: var(--accent-ink); font: 600 .72rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; }
.plan h3 { font-size: 1.7rem; }
.plan .price { margin: 14px 0 4px; font: 600 3rem/1 var(--serif); }
.plan .price small { font: 400 1rem var(--sans); color: var(--muted); }
.plan .per { color: var(--muted); font-size: .9rem; min-height: 1.5em; margin: 0; }
.plan ul { list-style: none; padding: 0; margin: 24px 0 28px; flex: 1; }
.plan li { padding: 7px 0 7px 30px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 14px; height: 8px; border-left: 2px solid var(--ember); border-bottom: 2px solid var(--ember); transform: rotate(-45deg); }
.plan li.no { color: var(--muted); }
.plan li.no::before { border: 0; height: 2px; top: 18px; background: var(--border); transform: none; }
.plan .btn { width: 100%; }
@media (max-width: 820px) { .plans { grid-template-columns: minmax(0, 460px); } }

/* FAQ */
.faq details { border-bottom: 1px solid var(--border); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative; font: 600 1.3rem/1.3 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 300 1.6rem/1 var(--sans); color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 20px; color: var(--muted); }

.cta { text-align: center; }
.cta p { color: var(--muted); max-width: 46ch; margin: 16px auto 28px; font-size: 1.1rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 48px; font-size: .92rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; align-items: flex-start; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

/* Legal pages */
.doc { padding: 56px 0 80px; }
.doc h1 { font-size: clamp(2.3rem, 5vw, 3.2rem); margin-bottom: 8px; }
.doc .updated { color: var(--muted); margin: 0 0 36px; }
.doc h2 { font-size: 1.7rem; margin: 40px 0 10px; }
.doc p, .doc li { color: var(--ink); }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.doc .summary { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 8px; }
.doc .summary p { margin: 0; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
