/*
  Book Artisan — marketing site stylesheet.

  No build step and no external requests: the pages link this one file and the
  `assets/js/site.js` beside it, and the type is set from the system stacks, so
  the site renders the same with the network off and loads no third-party font
  (nor sends the visitor anywhere to fetch one).

  The palette follows the application's own accent (`#2b5c94`, the colour of its
  icon and of the "accent" token in `bookartisan/services/ui_tokens.py`), so the
  site and the app read as one product. Every text/background pair used here is
  measured against WCAG AA in `website/README.md`; the dark scheme is the same
  token set, not a second design.

  Layout rule for the whole site: one `--ba-max` measure, one spacing scale
  (`--ba-s1`…`--ba-s6`) and no component that invents its own values.
*/

:root {
  color-scheme: light dark;

  /* Surfaces and ink */
  --ba-bg: #f7f5f0;
  --ba-surface: #fffdfa;
  --ba-surface-2: #f0ece3;
  --ba-ink: #221f1a;
  --ba-ink-soft: #57514a;
  --ba-ink-faint: #6f6a5f;
  --ba-line: #e2dcd0;
  --ba-line-strong: #cdc5b5;

  /* Accent — the application's own */
  --ba-accent: #2b5c94;
  --ba-accent-strong: #1e4470;
  --ba-accent-soft: #e7eef7;
  --ba-on-accent: #ffffff;

  /* Draft/provisional notices */
  --ba-note-bg: #fdf5e0;
  --ba-note-line: #e6d29a;
  --ba-note-ink: #6a5518;

  --ba-shadow: 0 1px 2px rgba(34, 31, 26, 0.06), 0 10px 30px rgba(34, 31, 26, 0.07);
  --ba-radius: 10px;
  --ba-radius-lg: 16px;
  --ba-max: 1060px;

  --ba-s1: 0.25rem;
  --ba-s2: 0.5rem;
  --ba-s3: 1rem;
  --ba-s4: 1.5rem;
  --ba-s5: 2.5rem;
  --ba-s6: 4rem;

  --ba-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ba-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --ba-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ba-bg: #14161a;
    --ba-surface: #1b1e24;
    --ba-surface-2: #23272f;
    --ba-ink: #eae7e1;
    --ba-ink-soft: #b6b1a7;
    --ba-ink-faint: #948e83;
    --ba-line: #2c313a;
    --ba-line-strong: #3d434d;

    --ba-accent: #93b9e6;
    --ba-accent-strong: #b4d1f2;
    --ba-accent-soft: #1c2634;
    --ba-on-accent: #10141a;

    --ba-note-bg: #2a2416;
    --ba-note-line: #57492a;
    --ba-note-ink: #e8d29a;

    --ba-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ba-bg);
  color: var(--ba-ink);
  font-family: var(--ba-sans);
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--ba-serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 var(--ba-s3);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.12rem; font-family: var(--ba-sans); font-weight: 650; }

p { margin: 0 0 var(--ba-s3); }
ul, ol { margin: 0 0 var(--ba-s3); padding-left: 1.3em; }
li { margin-bottom: var(--ba-s1); }

a { color: var(--ba-accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ba-accent-strong); }

code, kbd {
  font-family: var(--ba-mono);
  font-size: 0.9em;
  background: var(--ba-surface-2);
  border: 1px solid var(--ba-line);
  border-radius: 5px;
  padding: 0.1em 0.35em;
}

pre {
  font-family: var(--ba-mono);
  font-size: 0.88rem;
  line-height: 1.65;
  background: var(--ba-surface-2);
  border: 1px solid var(--ba-line);
  border-radius: var(--ba-radius);
  padding: var(--ba-s3);
  /* A long path wraps instead of scrolling out of sight: a command whose tail
     is hidden is a command somebody copies wrong. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
pre code { background: none; border: 0; padding: 0; font-size: 1em; }

img { max-width: 100%; height: auto; }

:focus-visible {
  outline: 2px solid var(--ba-accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--ba-s3);
  top: var(--ba-s3);
  z-index: 20;
  background: var(--ba-surface);
  border: 1px solid var(--ba-line);
  border-radius: var(--ba-radius);
  padding: var(--ba-s2) var(--ba-s3);
}

/* ---------------------------------------------------------------- layout -- */

.wrap {
  width: 100%;
  max-width: var(--ba-max);
  margin: 0 auto;
  padding: 0 var(--ba-s3);
}

section { padding: var(--ba-s6) 0; }
section + section { border-top: 1px solid var(--ba-line); }
.lead { font-size: 1.06rem; color: var(--ba-ink-soft); max-width: 62ch; }
.section-head { max-width: 62ch; margin-bottom: var(--ba-s4); }

/* ---------------------------------------------------------------- header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--ba-bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ba-line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: var(--ba-s3);
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--ba-s2);
  font-family: var(--ba-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ba-ink);
  text-decoration: none;
  margin-right: auto;
}
.brand img { width: 30px; height: 30px; display: block; }
.brand span { white-space: nowrap; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: var(--ba-s3);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--ba-ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--ba-ink); }
.site-nav a[aria-current="page"] { font-weight: 600; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ba-line-strong);
  border-radius: var(--ba-radius);
  color: var(--ba-ink);
  font: inherit;
  font-size: 0.9rem;
  padding: var(--ba-s2) var(--ba-s3);
  cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--ba-surface);
    border-bottom: 1px solid var(--ba-line);
    box-shadow: var(--ba-shadow);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--ba-s2) var(--ba-s3) var(--ba-s3);
  }
  .site-nav li + li { border-top: 1px solid var(--ba-line); }
  .site-nav a { display: block; padding: var(--ba-s3) 0; font-size: 1rem; }
}

/* --------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--ba-s2);
  background: var(--ba-accent);
  color: var(--ba-on-accent);
  border: 1px solid var(--ba-accent);
  border-radius: var(--ba-radius);
  padding: 0.62rem 1.15rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.96rem;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--ba-accent-strong); border-color: var(--ba-accent-strong); color: var(--ba-on-accent); }
.btn-ghost {
  background: transparent;
  color: var(--ba-ink);
  border-color: var(--ba-line-strong);
}
.btn-ghost:hover { background: var(--ba-surface-2); color: var(--ba-ink); border-color: var(--ba-ink-faint); }
.btn-sm { padding: 0.42rem 0.85rem; font-size: 0.88rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--ba-s2); align-items: center; }

/* ------------------------------------------------------------------ hero -- */

.hero { padding: var(--ba-s6) 0; border-top: 0; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--ba-s5);
  align-items: center;
}
.hero h1 { margin-bottom: var(--ba-s3); }
.hero .lead { font-size: 1.15rem; }
.hero-meta {
  margin-top: var(--ba-s3);
  color: var(--ba-ink-faint);
  font-size: 0.92rem;
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: var(--ba-s4); }
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ba-accent);
  margin-bottom: var(--ba-s3);
}

/* ------------------------------------------------------------ shot slots -- */

/*
  A screenshot slot. The real images are pending (task M4 — they need the app
  running on a real desktop), so every slot is an obviously empty frame that
  names the shot it is waiting for rather than a placeholder that could be
  mistaken for the product.
*/
.shot {
  border: 1px solid var(--ba-line-strong);
  border-radius: var(--ba-radius-lg);
  background:
    repeating-linear-gradient(
      45deg,
      var(--ba-surface-2),
      var(--ba-surface-2) 12px,
      var(--ba-surface) 12px,
      var(--ba-surface) 24px
    );
  box-shadow: var(--ba-shadow);
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--ba-s2);
  text-align: center;
  padding: var(--ba-s4);
}
/* A frame that carries a real capture stops imposing a shape. The screenshots come the
   size they come — two of them are portrait pages and one is very wide — and forcing
   16:10 would crop exactly the shots that matter (a page of the book, a printed page).
   The hatch belongs to the empty frame, so it goes too; the border, the radius, the
   shadow and the centring stay, because that is what makes it read as a frame. */
.shot:has(img) {
  aspect-ratio: auto;
  background: var(--ba-surface);
}
.shot img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 520px;
  border-radius: var(--ba-radius);
}
.shot-label {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ba-ink-faint);
}
.shot-title { font-family: var(--ba-serif); font-size: 1.05rem; color: var(--ba-ink-soft); }

/* ------------------------------------------------------------------ grid -- */

.grid { display: grid; gap: var(--ba-s3); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ card -- */

.card {
  background: var(--ba-surface);
  border: 1px solid var(--ba-line);
  border-radius: var(--ba-radius);
  padding: var(--ba-s4);
}
.card h3 { margin-bottom: var(--ba-s2); }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 34px;
  height: 34px;
  margin-bottom: var(--ba-s3);
  color: var(--ba-accent);
}
.card .muted { color: var(--ba-ink-soft); font-size: 0.95rem; }

.muted { color: var(--ba-ink-soft); }
.small { font-size: 0.9rem; }

/* --------------------------------------------------------------- steps -- */

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3.1rem;
  margin-bottom: var(--ba-s4);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ba-accent-soft);
  color: var(--ba-accent);
  font-weight: 700;
  font-size: 0.95rem;
}
.steps strong { display: block; font-family: var(--ba-serif); font-size: 1.08rem; }

/* ----------------------------------------------------------------- table -- */

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--ba-line);
}
thead th {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ba-ink-faint);
  border-bottom-color: var(--ba-line-strong);
}
tbody tr:last-child td { border-bottom: 0; }
td.yes, th.yes { color: var(--ba-accent); font-weight: 700; text-align: center; }
td.no, th.no { color: var(--ba-ink-faint); text-align: center; }
.table-caption { font-size: 0.88rem; color: var(--ba-ink-faint); margin-top: var(--ba-s2); }

/* ---------------------------------------------------------------- notice -- */

.notice {
  background: var(--ba-note-bg);
  border: 1px solid var(--ba-note-line);
  border-radius: var(--ba-radius);
  padding: var(--ba-s3) var(--ba-s4);
  color: var(--ba-note-ink);
  font-size: 0.94rem;
}
.notice strong { color: var(--ba-note-ink); }
.notice p:last-child { margin-bottom: 0; }
/* Links inside a notice take its ink — but not buttons: `.notice a` (0,1,1) beats
   `.btn` (0,1,0), so a button in here would inherit the notice's dark text over
   the accent fill and lose its own colour. Measured on the pricing page on
   2026-09-29: the label came out at about 1.2:1. */
.notice a:not(.btn) { color: inherit; }

/* --------------------------------------------------------------- pricing -- */

.price-cards { align-items: start; }
.price {
  font-family: var(--ba-serif);
  font-size: 2.2rem;
  line-height: 1;
  margin: var(--ba-s3) 0 var(--ba-s2);
}
.price small { font-size: 0.9rem; font-family: var(--ba-sans); color: var(--ba-ink-soft); font-weight: 400; }
.card.is-featured { border-color: var(--ba-accent); box-shadow: var(--ba-shadow); }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--ba-accent-soft);
  color: var(--ba-accent);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  margin-bottom: var(--ba-s2);
}
.check-list { list-style: none; padding: 0; }
.check-list li { padding-left: 1.6rem; position: relative; }
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--ba-accent);
  font-weight: 700;
}

/* ------------------------------------------------------------------- dl -- */

.dl-meta { display: grid; grid-template-columns: max-content 1fr; gap: var(--ba-s2) var(--ba-s3); font-size: 0.95rem; }
.dl-meta dt { color: var(--ba-ink-faint); }
.dl-meta dd { margin: 0; }

/* --------------------------------------------------------------- footer -- */

.site-footer {
  border-top: 1px solid var(--ba-line);
  padding: var(--ba-s5) 0 var(--ba-s4);
  font-size: 0.92rem;
  color: var(--ba-ink-soft);
  background: var(--ba-surface);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--ba-s4);
  margin-bottom: var(--ba-s4);
}
.site-footer h2 { font-size: 0.82rem; font-family: var(--ba-sans); text-transform: uppercase; letter-spacing: 0.05em; color: var(--ba-ink-faint); margin-bottom: var(--ba-s2); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: var(--ba-s1); }
.footer-bottom {
  border-top: 1px solid var(--ba-line);
  padding-top: var(--ba-s3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--ba-s3);
  justify-content: space-between;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--ba-s3); }
}

@media print {
  .site-header, .site-footer, .nav-toggle { display: none; }
  body { background: #fff; color: #000; }
}
