/* RafterBooks marketing site — no external fonts/CDNs */
:root {
  --ink: #243a28;
  --muted: #5f7552;
  --line: #dfe8d4;
  --bg: #f7f9f2;
  --card: #fff;
  --accent: #3f6b35;
  --accent2: #2f5230;
  --lime: #c9e28a;
  --forest: #163e32;
  --warn-bg: #fff4d6;
  --warn-ink: #8a6d1d;
  --warn-line: #f0e0a8;
  --focus: #97bb51;
  --radius: 16px;
  --shadow: 0 12px 40px #1a332018;
  --max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent2); }
code {
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  font-size: 0.92em;
  background: #eef3e6;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--forest);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; outline: 3px solid var(--focus); }

.wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  flex-wrap: wrap;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.logo:hover { color: var(--ink); text-decoration: none; }
.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
}
.logo-text { font-weight: 700; letter-spacing: 0.2px; line-height: 1.2; }
.logo-text span {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav {
  display: flex;
  gap: 6px 18px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
}
.nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 6px 2px;
}
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 650;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 14px;
  border: 0;
  cursor: pointer;
  line-height: 1.2;
}
.btn:hover { background: var(--accent2); color: #fff !important; }
.btn:focus-visible,
.nav a:focus-visible,
.logo:focus-visible,
.footer a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.btn.ghost {
  background: transparent;
  color: var(--accent) !important;
  border: 1px solid var(--line);
}
.btn.ghost:hover { background: #eef3e6; }
.btn.large { padding: 14px 26px; font-size: 16px; }
.hero-actions, .price-actions {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin: 8px 0 12px;
}
.nav a.try-link { font-weight: 650; color: var(--accent); }

.nav .btn { padding: 10px 16px; }

.todo-badge {
  display: inline-block;
  background: var(--warn-bg);
  color: var(--warn-ink);
  border: 1px solid var(--warn-line);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

/* Hero & layout */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 42px;
  align-items: center;
  padding: 28px 0 56px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: #6d8a4f;
  text-transform: uppercase;
  margin: 0 0 10px;
}
h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.08;
  margin: 0 0 16px;
  letter-spacing: -0.03em;
}
h2 {
  font-size: clamp(24px, 3vw, 28px);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
h3 { margin: 0 0 8px; font-size: 16px; }
.lead {
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 40ch;
}
.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 18px;
  flex-wrap: wrap;
}
.price-row strong { font-size: 36px; }
.price-row span { color: var(--muted); font-size: 14px; }
.note { font-size: 13px; color: var(--muted); margin: 14px 0 0; }
.shot {
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--card);
}

.section { padding: 18px 0 50px; }
.section .sub {
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 62ch;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card p + p { margin-top: 10px; }
.card h3 { font-size: 17px; }

.shots {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}
.shots .stack { display: grid; gap: 18px; }

.checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.checklist li {
  padding: 10px 0 10px 28px;
  position: relative;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.cta {
  background: var(--ink);
  color: #e8f0df;
  border-radius: 20px;
  padding: 36px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin: 10px 0 50px;
}
.cta h2 { margin: 0 0 8px; color: #fff; }
.cta p { margin: 0; color: #b7c9a8; max-width: 48ch; }

.page-hero {
  padding: 28px 0 20px;
}
.page-hero h1 { font-size: clamp(28px, 4vw, 40px); }
.page-hero .lead { margin-bottom: 0; }

.prose { max-width: 72ch; }
.prose p, .prose li { color: var(--muted); }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; font-size: 18px; }
.prose ul { padding-left: 1.25em; }
.prose li { margin: 0.35em 0; }
.prose strong { color: var(--ink); }

.faq-list { display: grid; gap: 14px; }
.faq-list details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
}
.faq-list summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--ink);
}
.faq-list summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.faq-list details p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.license-pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  color: var(--ink);
  margin: 0 0 40px;
  overflow-x: auto;
}

.price-table {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 520px;
}
.price-table .amount {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 8px 0;
}
.price-table ul {
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
}
.price-table li {
  padding: 8px 0 8px 28px;
  position: relative;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.price-table li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.contact-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 560px;
}
.contact-box .email {
  font-size: 22px;
  font-weight: 650;
  word-break: break-all;
}

.feature-shot {
  margin-top: 16px;
}
.feature-shot img { width: 100%; }

.site-footer {
  padding: 28px 0 48px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 12px;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer p { margin: 0 0 8px; }

.not-found {
  text-align: center;
  padding: 80px 0 100px;
}
.not-found h1 { font-size: 56px; margin-bottom: 8px; }
.not-found p { color: var(--muted); margin: 0 0 24px; }

@media (max-width: 860px) {
  .hero, .shots, .cta, .grid-3, .grid-2, .checklist { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: flex-start; }
  .nav a:not(.btn) { font-size: 13px; }
  .site-header { padding: 16px 0; }
}

@media (max-width: 600px) {
  .nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 10px 8px;
  }
  .nav .btn {
    min-height: 44px;
    padding: 12px 16px;
  }
  .site-footer a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 10px 4px;
  }
  .site-footer nav { gap: 4px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Utility replacements for former inline styles */
.section-tight-top { padding-top: 0; }
.muted-sm { margin: 0; color: var(--muted); font-size: 14px; }
.muted-sm-top { color: var(--muted); font-size: 14px; margin: 12px 0 0; }
.muted-sm-gap { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.ink-strong { color: var(--ink); }
.btn-spaced { margin-left: 10px; }
.cta .btn.ghost-on-dark {
  border-color: #6d8a4f;
  color: #fff !important;
}
.cta .btn.ghost-on-dark:hover { background: #2f5230; color: #fff !important; }

/* Waitlist */
.waitlist {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin: 18px 0 0;
  max-width: 520px;
}
.waitlist h2, .waitlist h3 { margin: 0 0 8px; }
.waitlist .sub { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.waitlist-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}
.waitlist-form label.email-label {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
}
.waitlist-form input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.waitlist-form input[type="email"]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--accent);
}
.waitlist-form .btn { flex: 0 0 auto; align-self: flex-end; }
/* Honeypot — visually hidden, not display:none (bots often skip display:none) */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.waitlist-msg {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.waitlist-msg.ok { color: var(--accent2); font-weight: 650; }
.waitlist-msg.err { color: #8a3b32; }
.waitlist-fallback {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.cta .waitlist {
  background: #2a442e;
  border-color: #3a5540;
  color: #e8f0df;
  max-width: none;
  flex: 1;
}
.cta .waitlist h2, .cta .waitlist h3 { color: #fff; }
.cta .waitlist .sub, .cta .waitlist .waitlist-msg, .cta .waitlist .waitlist-fallback { color: #c5d6b6; }
.cta .waitlist-form label.email-label { color: #e8f0df; }
.cta .waitlist a { color: #d9ef89; text-decoration: underline; }
.cta .waitlist a:hover { color: #fff; }
.cta .waitlist strong { color: #fff; }
.cta .waitlist-form input[type="email"] { background: #f7f9f2; }
.cta .waitlist-msg.ok { color: var(--lime); }
.cta .waitlist-msg.err { color: #f0c4bc; }

/* SmartScreen callout */
.callout {
  background: #f3f6eb;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.callout strong { color: var(--ink); }
.callout ol { margin: 8px 0 0; padding-left: 1.25em; }
.callout li { margin: 4px 0; }

.waitlist-wide { max-width: 640px; }


/* Founding / sale price */
.amount-founding {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
}
.amount-founding .price-was {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--muted);
}
.amount-founding .price-was s {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}
.amount-founding .price-now {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--forest);
  line-height: 1;
}
.amount-founding .price-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent2);
  background: var(--lime);
  padding: 4px 10px;
  border-radius: 999px;
}
.price-row.founding-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}
.price-row.founding-row .price-was {
  color: var(--muted);
  font-weight: 600;
  font-size: 1.1rem;
}
.price-row.founding-row .price-was s { text-decoration: line-through; }
.price-row.founding-row strong.price-now {
  font-size: 1.65rem;
}
.price-row.founding-row .price-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent2);
}
.founding-note {
  margin: 12px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 42em;
}
.founding-code-note {
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 42em;
}
.cta .founding-code-note { color: #b7c9a8; }

/* Compare table */
.compare-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: 14px;
}
.compare-table th,
.compare-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.45;
}
.compare-table thead th {
  background: #eef3e6;
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  position: sticky;
  top: 0;
}
.compare-table thead th .th-sub {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.compare-table tbody th[scope="row"] {
  color: var(--ink);
  font-weight: 650;
  background: #f7f9f2;
  white-space: nowrap;
  width: 9.5rem;
}
.compare-table tbody td strong { color: var(--ink); }
.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
  max-width: 72ch;
}
.compare-note a { word-break: break-word; }
.cta .price-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Compare stacked cards (phone) */
.compare-cards { display: none; }
.compare-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 8px;
  margin: 0 0 14px;
}
.compare-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--ink);
}
.compare-card .th-sub {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 11px;
  margin: 0 0 12px;
}
.compare-card dl {
  margin: 0;
  display: grid;
  gap: 0;
}
.compare-card dt {
  margin: 0;
  padding: 10px 0 2px;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink);
  border-top: 1px solid var(--line);
}
.compare-card dt:first-child { border-top: none; padding-top: 0; }
.compare-card dd {
  margin: 0 0 8px;
  padding: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}
.compare-card dd strong { color: var(--ink); }

@media (max-width: 600px) {
  .compare-scroll { display: none; }
  .compare-cards { display: block; }
}


/* B10: without JS, hide store-open copy (data-open); show closed/waitlist copy */
[data-rb-store] [data-open] { display: none !important; }
html.rb-store-open [data-rb-store] [data-open] { display: revert !important; }
html.rb-store-open [data-rb-store] [data-closed] { display: none !important; }
/* Pricing intro was too narrow (40ch on stacked leads) */
.page-hero .lead { max-width: 62ch; margin-bottom: 12px; }
.page-hero .lead + .lead { margin-top: 0; }
/* Home hero font consistency with rest of site */
.hero h1, .hero .lead, .hero .note { font-family: inherit; }
.hero .price-row, .hero .founding-code-note { font-family: inherit; }
