/* The AI Shopkeeper — sales page
   Colors and type match the book cover: navy, cream, terracotta;
   Playfair Display, Montserrat, Lora. */

:root {
  --bg: #1c2830;
  --bg-soft: #24323b;
  --ink: #1f2a33;
  --ink-soft: #3c4a54;
  --cream: #f3e9da;
  --cream-2: #f7f1e8;
  --paper: #fbf8f3;
  --terra: #c8643b;
  --terra-dark: #8a4a2b;
  --tan: #d6aa78;
  --muted: #aab4ba;
  --line: #3c4a54;
  --line-light: #e4d9c8;
  --white: #fffdf9;
  --focus: #c8643b;
  --max: 70rem;
  --narrow: 42rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 4.25rem;
  --font-serif: "Playfair Display", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Lora", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-sans: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --shadow-cover: 0 1.5rem 3rem rgba(0, 0, 0, 0.35), 0 0.4rem 1rem rgba(0, 0, 0, 0.25);
  --radius: 0.4rem;
}

@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/playfair-display.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/playfair-display-italic.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/montserrat.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("assets/fonts/lora.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("assets/fonts/lora-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--terra-dark); }
a:hover { color: var(--terra); }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--cream);
  color: var(--ink);
  padding: 0.5rem 0.8rem;
  z-index: 100;
}
.skip:focus { top: 0.75rem; }

.wrap {
  width: min(var(--max), 100% - 2 * var(--pad));
  margin-inline: auto;
}
.wrap-narrow { width: min(var(--narrow), 100% - 2 * var(--pad)); margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { color: inherit; transform: translateY(-1px); }
.btn-primary {
  background: var(--terra);
  color: var(--white);
  border-color: var(--terra);
}
.btn-primary:hover { background: #b55730; color: var(--white); border-color: #b55730; }
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(243, 233, 218, 0.4);
}
.btn-ghost:hover { border-color: var(--cream); color: var(--cream); background: rgba(243, 233, 218, 0.06); }
.btn-dark {
  background: var(--bg);
  color: var(--cream);
  border-color: var(--bg);
}
.btn-dark:hover { background: #152026; color: var(--cream); }
.btn-outline-dark {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline-dark:hover { background: var(--ink); color: var(--cream); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
/* Non-clickable pre-launch state for store buttons */
.btn-coming-soon {
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.72;
}
.btn-coming-soon:hover {
  transform: none;
}
.btn-primary.btn-coming-soon:hover {
  background: var(--terra);
  border-color: var(--terra);
  color: var(--white);
}
.btn-ghost.btn-coming-soon:hover {
  background: transparent;
  border-color: rgba(243, 233, 218, 0.4);
  color: var(--cream);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(28, 40, 48, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(60, 74, 84, 0.8);
  color: var(--cream);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--cream);
  min-width: 0;
}
.brand:hover { color: var(--cream); }
.brand svg { width: 2rem; height: 2rem; flex-shrink: 0; border-radius: 4px; }
.brand-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}
.nav a {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}
.nav a:hover, .nav a:focus-visible { color: var(--cream); }
.nav .btn { text-transform: none; letter-spacing: 0.02em; font-size: 0.8rem; padding: 0.6rem 1rem; color: var(--white); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(243, 233, 218, 0.25);
  color: var(--cream);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.3rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 1.05rem;
  height: 1.5px;
  background: var(--cream);
  position: relative;
}
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-icon::before { top: -5px; }
.nav-toggle-icon::after { top: 5px; }

/* Hero */
.hero {
  background: var(--bg);
  color: var(--cream);
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 5.5rem);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 1.5rem;
  border: 1px solid rgba(60, 74, 84, 0.7);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  position: relative;
  z-index: 1;
}
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tan);
  margin: 0 0 1rem;
}
.eyebrow::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 2px;
  background: var(--terra);
  margin-top: 0.75rem;
}
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin: 0 0 1.25rem;
}
.hero h1 em {
  font-style: italic;
  font-weight: 700;
  display: block;
}
.subtitle {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.5;
  color: #c8d0d4;
  margin: 0 0 1.25rem;
  max-width: 34rem;
}
.lede {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #d9d0c3;
  max-width: 36rem;
  margin: 0 0 1.75rem;
}
.hero .btn-row { margin-bottom: 1.75rem; }
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0;
  padding: 0;
  margin: 0;
  list-style: none;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tan);
}
.meta-row li:not(:last-child)::after {
  content: "·";
  margin: 0 0.5rem;
  color: var(--terra);
}
.cover-wrap {
  justify-self: center;
  width: min(100%, 22rem);
  position: relative;
}
.cover-wrap img {
  width: 100%;
  border-radius: 2px;
  box-shadow: var(--shadow-cover);
  background: var(--bg-soft);
}
.cover-wrap figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Shared section chrome */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-kicker {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terra-dark);
  margin: 0 0 0.6rem;
}
.section h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 1rem;
}
.section-intro {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 40rem;
  margin: 0 0 2.25rem;
}
.rule {
  width: 3.25rem;
  height: 2px;
  background: var(--terra);
  border: 0;
  margin: 0 0 1.25rem;
}

/* Audience */
.audience { background: var(--cream-2); }
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}
.card {
  background: var(--white);
  border: 1px solid var(--line-light);
  border-top: 3px solid var(--terra);
  padding: 1.4rem 1.35rem 1.3rem;
}
.card h3 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0 0 0.45rem;
  color: var(--ink);
}
.card p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.note {
  margin: 2rem 0 0;
  font-size: 1.05rem;
  color: var(--ink);
  font-style: italic;
}

/* Problems */
.problems { background: var(--paper); }
.problem-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: problem;
}
.problem-list li {
  background: var(--white);
  border: 1px solid var(--line-light);
  padding: 1.35rem 1.35rem 1.25rem;
}
.problem-list h3 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--ink);
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
}
.problem-list h3::before {
  counter-increment: problem;
  content: counter(problem, decimal-leading-zero);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--terra);
  font-weight: 700;
}
.problem-list p { margin: 0; color: var(--ink-soft); }
.pull {
  margin: 2.25rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--line-light);
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-style: italic;
  line-height: 1.4;
  color: var(--ink);
  max-width: 38rem;
}

/* Inside */
.inside { background: var(--bg); color: var(--cream); }
.inside .section-kicker { color: var(--tan); }
.inside h2, .inside .section-intro { color: var(--cream); }
.inside .section-intro { color: #d9d0c3; }
.includes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0 0 3rem;
  padding: 0;
  list-style: none;
}
.includes li {
  border: 1px solid var(--line);
  padding: 1.15rem 1.15rem 1.05rem;
  background: var(--bg-soft);
}
.includes strong {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tan);
  margin: 0 0 0.4rem;
}
.includes p { margin: 0; color: #d9d0c3; font-size: 0.98rem; }
.chapters { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); }
.chapters li {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 0.85rem;
  padding: 1.15rem 1rem 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.chapters li:nth-child(odd) { padding-right: 1.75rem; }
.chapters li:nth-child(even) { padding-left: 1.75rem; border-left: 1px solid var(--line); }
.ch-num {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--tan);
  padding-top: 0.3rem;
}
.chapters h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.3;
  margin: 0 0 0.3rem;
  color: var(--cream);
}
.chapters p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.inside-footnote {
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Prompts */
.prompts { background: var(--cream-2); }
.prompt {
  background: var(--white);
  border: 1px solid var(--line-light);
  margin: 0 0 1.15rem;
  overflow: hidden;
}
.prompt-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  background: var(--bg);
  color: var(--cream);
}
.prompt-head h3 {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.01em;
}
.prompt-id {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tan);
  white-space: nowrap;
}
.prompt pre {
  margin: 0;
  padding: 1.15rem 1.2rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
  background: var(--paper);
}
.prompt-note {
  margin: 1.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Author */
.author { background: var(--paper); }
.author-grid {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 2.25rem;
  align-items: start;
}
.author-mark {
  width: 10rem;
  height: 10rem;
  background: var(--bg);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.author-mark svg { width: 100%; height: auto; }
.author-body h2 { margin-bottom: 0.35rem; }
.author-role {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terra-dark);
  margin: 0 0 1rem;
}
.author-body p { margin: 0 0 1rem; color: var(--ink-soft); max-width: 42rem; }
.author-body p:last-child { margin-bottom: 0; }
/* Pricing */
.pricing { background: var(--bg); color: var(--cream); }
.pricing .section-kicker { color: var(--tan); }
.pricing h2, .pricing .section-intro { color: var(--cream); }
.pricing .section-intro { color: #d9d0c3; }
.price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
}
.price-card {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 1.85rem 1.6rem 1.7rem;
  display: flex;
  flex-direction: column;
}
.price-card.featured { border-color: var(--terra); }
.price-label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tan);
  margin: 0 0 0.7rem;
}
.price-card h3 {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--cream);
}
.price-amount {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0.4rem 0 0.9rem;
  color: var(--cream);
  line-height: 1;
}
.price-amount span {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-left: 0.25rem;
}
.price-card ul {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  color: #d9d0c3;
  flex: 1;
}
.price-card li {
  padding: 0.35rem 0 0.35rem 1.15rem;
  position: relative;
}
.price-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 0.5rem;
  height: 1.5px;
  background: var(--terra);
}
.price-card .btn { width: 100%; }
.price-note {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* FAQ */
.faq { background: var(--cream-2); }
.faq-list { display: grid; gap: 0.65rem; }
.faq-list details {
  background: var(--white);
  border: 1px solid var(--line-light);
  padding: 0;
}
.faq-list summary {
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 1rem 2.5rem 1rem 1.2rem;
  list-style: none;
  position: relative;
  color: var(--ink);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 500;
  color: var(--terra);
  font-size: 1.2rem;
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p {
  margin: 0;
  padding: 0 1.2rem 1.15rem;
  color: var(--ink-soft);
}
.faq-list details p + p { padding-top: 0; margin-top: -0.5rem; padding-bottom: 1.15rem; }

/* Footer */
.site-footer {
  background: var(--bg);
  color: var(--muted);
  padding: 2.75rem 0 2.5rem;
  font-size: 0.88rem;
  border-top: 1px solid var(--line);
}
.site-footer p { margin: 0 0 0.7rem; max-width: 48rem; }
.site-footer p:last-child { margin-bottom: 0; }
.legal-title {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tan);
  margin: 1.25rem 0 0.4rem !important;
}
.site-footer a { color: var(--tan); }
.copyright { color: #c5bbb0; }

/* Responsive */
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem var(--pad) 1.1rem;
    gap: 0;
  }
  .nav a, .nav .btn {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .nav .btn {
    margin-top: 0.75rem;
    border-bottom: 0;
    border-radius: 999px;
    text-align: center;
  }
  .site-header { position: sticky; }
  .site-header:has(.nav-toggle[aria-expanded="true"]) .nav,
  #nav-toggle:checked ~ .header-inner .nav,
  .site-header.open .nav { display: flex; }

  .hero::after { inset: 0.75rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .card-grid, .problem-list, .includes, .chapters, .price-grid, .author-grid {
    grid-template-columns: 1fr;
  }
  .chapters li:nth-child(odd),
  .chapters li:nth-child(even) {
    padding-left: 0;
    padding-right: 0;
    border-left: 0;
  }
  .author-mark { width: 6.5rem; height: 6.5rem; }
}

@media (max-width: 560px) {
  .hero h1 { font-size: 2.45rem; }
  .includes { grid-template-columns: 1fr; }
  .brand-name { font-size: 0.95rem; }
  .btn { width: 100%; }
  .hero .btn-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.price-amount-text {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin: 0.5rem 0 1rem;
  line-height: 1.2;
}

@media (max-width: 860px) {
  .hero-copy { display: contents; }
  .hero .eyebrow { order: 1; }
  .hero h1 { order: 2; }
  .cover-wrap {
    order: 3;
    width: min(16.5rem, 70%);
    justify-self: start;
    margin: 0.15rem 0 0.5rem;
  }
  .hero-rest { order: 4; }
}

.price-note code, .prompt-note code { font-family: var(--font-mono); font-size: 0.86em; color: var(--tan); }
