:root {
  --paper: #f5f0e6;
  --paper-deep: #ebe2d2;
  --ink: #17241f;
  --forest: #173f36;
  --forest-light: #285f52;
  --copper: #ad5f3b;
  --copper-light: #d99870;
  --cream: #fffaf0;
  --line: rgba(23, 36, 31, 0.18);
  --muted: #5c655f;
  --shadow: 0 24px 70px rgba(23, 36, 31, 0.13);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: radial-gradient(rgba(23, 36, 31, 0.12) 0.55px, transparent 0.55px);
  background-size: 5px 5px;
  z-index: -1;
}
a { color: inherit; }
img, iframe { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: 0.8rem 1rem;
  background: var(--cream);
  border: 2px solid var(--forest);
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 3px solid var(--copper); outline-offset: 4px; }
:where(.dark, .site-footer, .book-card:nth-child(1), .book-card:nth-child(2)) :focus-visible { outline-color: var(--cream); }
.dark .form-card :focus-visible { outline-color: var(--copper); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(16px);
}
.header-inner, .shell { width: min(1180px, calc(100% - 3rem)); margin-inline: auto; }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { text-decoration: none; display: flex; align-items: baseline; gap: 0.7rem; }
.brand strong { font-family: var(--serif); font-size: 1.55rem; letter-spacing: 0.02em; }
.brand span { color: var(--ink); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.nav-list { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav-list a { padding: 0.65rem 0.8rem; text-decoration: none; border-radius: 999px; font-size: 0.9rem; }
.nav-list a:hover, .nav-list a[aria-current="page"] { background: var(--forest); color: var(--cream); }
.menu-toggle { display: none; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 0.6rem 0.9rem; color: var(--ink); }

main { overflow: hidden; }
.hero { min-height: calc(100vh - 82px); display: grid; align-items: center; padding: 5.5rem 0; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(3rem, 8vw, 8rem); align-items: center; }
.eyebrow { margin: 0 0 1.25rem; color: var(--ink); font-size: 0.75rem; font-weight: 850; letter-spacing: 0.18em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 0.98; margin-top: 0; }
h1 { max-width: 850px; margin-bottom: 1.5rem; font-size: clamp(3.8rem, 8vw, 7.6rem); letter-spacing: -0.055em; }
h2 { margin-bottom: 1rem; font-size: clamp(2.4rem, 5vw, 4.5rem); letter-spacing: -0.035em; }
h3 { margin-bottom: 0.7rem; font-size: 1.65rem; line-height: 1.12; }
.lede { max-width: 650px; color: var(--muted); font-family: var(--serif); font-size: clamp(1.18rem, 2vw, 1.5rem); line-height: 1.55; }
.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--forest);
  border-radius: 999px;
  background: var(--forest);
  color: var(--cream);
  font-weight: 750;
  text-decoration: none;
}
.button:hover { background: var(--forest-light); }
.button.secondary { background: transparent; color: var(--forest); }
.button.secondary:hover { background: var(--paper-deep); }
.dark .button.secondary { color: var(--cream); border-color: currentColor; }
.dark .button.secondary:hover { color: var(--forest); }
.retailer-placeholder { margin-top: 0.75rem; }
button:disabled { cursor: default; }
fieldset[data-form-controls] { min-width: 0; margin: 0; padding: 0; border: 0; }

.book-object { position: relative; min-height: 520px; display: grid; place-items: center; }
.book-object::before { content: ""; position: absolute; width: 380px; height: 380px; border: 1px solid var(--copper-light); border-radius: 50%; }
.book-cover {
  position: relative;
  width: min(320px, 78vw);
  aspect-ratio: 0.66;
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: var(--cream);
  background: var(--forest);
  box-shadow: var(--shadow);
  transform: rotate(2.2deg);
}
.book-cover::after { content: ""; position: absolute; inset: 32% -20% auto; height: 46%; border-radius: 50%; background: var(--copper); transform: rotate(-13deg); opacity: 0.82; }
.book-cover > * { position: relative; z-index: 1; }
.book-cover small { letter-spacing: 0.16em; text-transform: uppercase; }
.book-cover strong { font-family: var(--serif); font-size: 3.2rem; line-height: 0.9; font-weight: 500; }

.section { padding: clamp(5rem, 10vw, 9rem) 0; }
.section.dark { color: var(--cream); background: var(--forest); }
.section.copper { background: var(--copper); color: var(--cream); }
.dark .lede, .dark .resource p, .dark .resource a { color: var(--cream); }
.copper .lede { color: var(--cream); }
.section-heading { max-width: 760px; margin-bottom: 3rem; }
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 7vw, 7rem); align-items: start; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card { padding: 1.5rem; border: 1px solid var(--line); background: rgba(255, 250, 240, 0.52); }
.card p { color: var(--muted); line-height: 1.65; }
.dark .card { border-color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.06); }
.dark .card p { color: rgba(255,255,255,0.72); }
.card-index { display: block; margin-bottom: 2rem; color: var(--ink); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.15em; }

.video-frame { aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; background: #0d201b; border: 1px solid rgba(255,255,255,0.18); }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video-poster { width: 100%; height: 100%; padding: 2rem; border: 0; color: var(--cream); background: radial-gradient(circle at 30% 30%, var(--forest-light), #0d201b 65%); }
.video-poster:focus-visible { outline-color: var(--cream); outline-offset: -6px; }
.play-mark { width: 72px; height: 72px; margin: 0 auto 1rem; display: grid; place-items: center; border: 1px solid rgba(255,255,255,0.75); border-radius: 50%; font-size: 1.2rem; }
.status-copy { min-height: 1.5rem; color: inherit; font-size: 0.9rem; line-height: 1.5; }

.form-card { padding: clamp(1.5rem, 4vw, 3rem); background: var(--cream); color: var(--ink); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1rem; }
.field.full { grid-column: 1 / -1; }
label { display: block; margin-bottom: 0.45rem; font-weight: 750; }
input, select, textarea { width: 100%; min-height: 48px; padding: 0.8rem 0.9rem; border: 1px solid #8d938d; border-radius: 0; background: #fffdf8; color: var(--ink); }
textarea { min-height: 140px; resize: vertical; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
[data-form-status] { min-height: 2rem; margin-top: 1rem; color: var(--muted); }
[data-form-status][data-kind="success"] { color: var(--forest); font-weight: 700; }
.demo-badge { display: inline-flex; padding: 0.35rem 0.55rem; border: 1px solid currentColor; font-size: 0.68rem; font-weight: 850; letter-spacing: 0.13em; text-transform: uppercase; }

.page-hero { padding: clamp(5rem, 10vw, 8.5rem) 0 4rem; }
.page-hero h1 { font-size: clamp(3.8rem, 8vw, 7rem); }
.book-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.book-card { min-height: 440px; padding: 1.8rem; display: flex; flex-direction: column; justify-content: flex-end; color: var(--cream); background: var(--forest); }
.book-card:nth-child(2) { background: var(--copper); }
.book-card:nth-child(1) .eyebrow,
.book-card:nth-child(1) .card-index,
.book-card:nth-child(2) .eyebrow,
.book-card:nth-child(2) .card-index { color: var(--cream); }
.book-card:nth-child(3) { color: var(--ink); background: var(--paper-deep); }
.book-card p { line-height: 1.6; }
.book-card .button.secondary { background: var(--cream); color: var(--forest); }
.book-card .button.secondary:hover { background: var(--paper-deep); }
.bio-dropcap::first-letter { float: left; margin: 0.1rem 0.55rem 0 0; color: var(--copper); font-family: var(--serif); font-size: 5.6rem; line-height: 0.72; }
.prose { max-width: 760px; font-family: var(--serif); font-size: 1.2rem; line-height: 1.75; }
.timeline { border-top: 1px solid var(--line); }
.timeline-row { display: grid; grid-template-columns: 140px 1fr; gap: 2rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.timeline-row strong { color: var(--ink); }

.gate-panel { max-width: 720px; padding: clamp(1.5rem, 5vw, 3.5rem); border: 1px solid var(--line); background: var(--cream); box-shadow: var(--shadow); }
.notice { padding: 1rem 1.1rem; border-left: 4px solid var(--copper); background: var(--paper-deep); line-height: 1.55; }
.resource-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.resource { display: grid; grid-template-columns: 52px 1fr auto; gap: 1rem; align-items: center; padding: 1.35rem 0; border-bottom: 1px solid var(--line); }
.resource-number { color: var(--ink); font-family: var(--serif); font-size: 1.4rem; }
.dark .eyebrow,
.dark .card-index,
.dark .resource-number { color: var(--cream); }
.resource h3 { margin: 0 0 0.3rem; font-family: var(--sans); font-size: 1rem; font-weight: 800; }
.resource p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.resource a { color: var(--forest); font-weight: 750; }

.social-list { display: flex; flex-wrap: wrap; gap: 0.65rem; list-style: none; margin: 1.5rem 0 0; padding: 0; }
.social-list a { display: inline-flex; padding: 0.55rem 0.75rem; border: 1px solid currentColor; text-decoration: none; }
.social-list a[data-placeholder="true"] { opacity: 0.72; }
.integration-note { max-width: 720px; padding: 1rem; border: 1px solid currentColor; }

.site-footer { padding: 3rem 0; color: rgba(255,255,255,0.76); background: #0d201b; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: end; }
.footer-grid p { margin: 0.4rem 0; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 1rem; }
.footer-nav a { text-underline-offset: 4px; }

@media (max-width: 800px) {
  .header-inner, .shell { width: min(100% - 2rem, 1180px); }
  .menu-toggle { display: inline-flex; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; display: none; padding: 0.75rem 1rem 1rem; border-bottom: 1px solid var(--line); background: var(--paper); }
  .site-nav[data-open] { display: block; }
  .nav-list { align-items: stretch; flex-direction: column; }
  .nav-list a { display: block; }
  .hero { min-height: auto; padding-top: 4rem; }
  .hero-grid, .split { grid-template-columns: 1fr; }
  .book-object { min-height: 460px; }
  .cards, .book-grid { grid-template-columns: 1fr; }
  .book-card { min-height: 360px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; }
}

@media (max-width: 520px) {
  h1, .page-hero h1 { font-size: clamp(3rem, 16vw, 4.5rem); }
  .brand span { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .resource { grid-template-columns: 38px 1fr; }
  .resource a { grid-column: 2; }
  .timeline-row { grid-template-columns: 1fr; gap: 0.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
