/* Ledgerwood Press site. Brand tokens match the printed book (03_Interior/theme.typ, 04_Cover/cover.typ). */
@font-face { font-family: "EB Garamond"; src: url(fonts/EBGaramond-Regular.woff) format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url(fonts/EBGaramond-Italic.woff) format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/Inter-Regular.woff) format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/Inter-SemiBold.woff) format("woff"); font-weight: 600; font-display: swap; }

:root {
  --bg: #F7F4EE;          /* paper */
  --surface: #EFE8DA;     /* cream band */
  --ink: #2B1D1E;         /* warm near-black */
  --muted: #5E4A4B;
  --rule: #C2A06A;        /* ochre, decorative only */
  --label: #7A2A30;       /* oxblood, lightened for AA small caps on paper */
  --btn-bg: #5B1A20;      /* oxblood = cover cloth */
  --btn-ink: #F7F4EE;
  --focus: #7A2A30;
  --shadow: 0 18px 40px rgb(91 26 32 / .16);
  --radius: 2px;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #170F11;
    --surface: #42161B;
    --ink: #F4ECE0;
    --muted: #C9B8B6;
    --rule: #D2AE6E;
    --label: #D2B582;
    --btn-bg: #F4ECE0;
    --btn-ink: #5B1A20;
    --focus: #D2B582;
    --shadow: 0 18px 40px rgb(0 0 0 / .45), 0 0 0 1px rgb(242 236 223 / .10);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--serif); font-size: 1.25rem; line-height: 1.55;
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.wrap { width: min(1120px, 100% - 3rem); margin-inline: auto; }

/* header */
.site-head { border-bottom: 1px solid color-mix(in srgb, var(--rule) 45%, transparent); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.wordmark { font-variant: small-caps; letter-spacing: .1em; font-size: 1.3rem; text-decoration: none; white-space: nowrap; }
.site-head nav a { font-family: var(--sans); font-size: .85rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
.site-head nav a:hover { color: var(--ink); text-decoration: underline; }

/* hero */
.hero { padding: 4.5rem 0 5rem; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 4rem; align-items: center; }
.label { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--label); margin: 0 0 1.4rem; }
h1, h2 { font-weight: 400; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); line-height: 1.08; }
h1 em { font-style: italic; }
.lede { font-size: 1.4rem; color: var(--muted); max-width: 34ch; margin: 1.5rem 0 2.2rem; line-height: 1.45; }
.rule { width: 72px; height: 0; border-top: 1.5px solid var(--rule); margin: 1.6rem 0 0; }
.cover { box-shadow: var(--shadow); border-radius: var(--radius); width: min(100%, 380px); justify-self: end; }

.btn {
  display: inline-block; font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: .01em;
  background: var(--btn-bg); color: var(--btn-ink); text-decoration: none; white-space: nowrap;
  padding: 1rem 1.6rem; border-radius: var(--radius); border: 1px solid var(--btn-bg);
  transition: transform .15s ease, background-color .2s ease;
}
.btn:hover { background: color-mix(in srgb, var(--btn-bg) 86%, var(--rule)); }
.btn:active { transform: translateY(1px); }
.btn-quiet { background: transparent; color: var(--ink); border-color: color-mix(in srgb, var(--ink) 55%, transparent); }
.btn-quiet:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.meta { font-family: var(--sans); font-size: .85rem; color: var(--muted); margin-top: .9rem; }

/* links that still carry a placeholder are hidden; the "soon" note shows instead */
a[href*="REPLACE_"] { display: none !important; }
a:not([href*="REPLACE_"]) + .soon { display: none; }
.soon { font-family: var(--sans); font-size: .9rem; color: var(--muted); }

/* inside: pages + grouped list */
.inside { padding: 5rem 0; border-top: 1px solid color-mix(in srgb, var(--rule) 45%, transparent); }
.inside .wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: 4.5rem; align-items: center; }
.pages { position: relative; min-height: 520px; }
.pages img { position: absolute; width: 74%; box-shadow: var(--shadow); border-radius: var(--radius); background: #fff; }
.pages img:first-child { top: 0; left: 0; }
.pages img:last-child { bottom: 0; right: 0; }
h2 { font-size: clamp(2rem, 3.4vw, 2.6rem); line-height: 1.12; }
.groups { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 2.5rem; margin-top: 2.2rem; }
.groups h3 { font-family: var(--sans); font-size: .95rem; font-weight: 600; margin: 0 0 .5rem; }
.groups p { margin: 0; color: var(--muted); font-size: 1.15rem; line-height: 1.45; }
.note { margin-top: 2.2rem; font-size: 1.15rem; color: var(--muted); max-width: 52ch; }

/* email band */
.band { background: var(--surface); padding: 4.5rem 0; }
.band .wrap { max-width: 720px; text-align: center; }
.band p { color: var(--muted); margin: 1rem auto 2rem; max-width: 46ch; }
.band .fine { font-family: var(--sans); font-size: .82rem; margin: 1.4rem auto 0; }

/* signup form (posts to /api/subscribe, handled by worker/index.js) */
.signup { display: grid; grid-template-columns: 1fr 1.35fr auto; gap: .9rem; align-items: end; max-width: 680px; margin: 0 auto; text-align: left; }
.signup label { display: grid; gap: .4rem; font-family: var(--sans); font-size: .8rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.signup input {
  font: 1rem/1.25 var(--sans); color: var(--ink); background: var(--bg); min-width: 0; width: 100%;
  border: 1px solid color-mix(in srgb, var(--ink) 38%, transparent); border-radius: var(--radius); padding: .95rem .9rem;
}
.signup input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.signup .btn { cursor: pointer; font-family: var(--sans); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.msg { max-width: 40rem; }
.msg p { color: var(--muted); }
.msg form { margin: 2rem 0 0; }
.msg .btn { cursor: pointer; }
.prose { padding: 4rem 0 5rem; }
.prose .wrap > * { max-width: 42rem; }
.prose h2 { font-size: 1.6rem; margin: 2.4rem 0 .6rem; }
.prose p, .prose li { color: var(--muted); }

/* updates */
.updates { padding: 5rem 0; }
.updates .wrap > * { max-width: 760px; }
.entry { margin-top: 2rem; padding-top: 1.4rem; border-top: 1.5px solid var(--rule); }
.entry h3 { font-family: var(--sans); font-size: 1rem; font-weight: 600; margin: 0 0 .4rem; }
.entry p { margin: 0; color: var(--muted); }

/* home: book + pros + contact */
.book { padding: 5rem 0; border-top: 1px solid color-mix(in srgb, var(--rule) 45%, transparent); }
.book .wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4.5rem; align-items: center; }
.book .pages img { background: #fff; }
.book p { color: var(--muted); max-width: 54ch; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 2rem; }
.pros { background: var(--surface); padding: 4.5rem 0; }
.pros .wrap > * { max-width: 760px; }
.pros p { color: var(--muted); }

/* footer */
.site-foot { padding: 3rem 0 3.5rem; border-top: 1px solid color-mix(in srgb, var(--rule) 45%, transparent); font-family: var(--sans); font-size: .85rem; color: var(--muted); }
.site-foot .wrap { display: grid; grid-template-columns: 1fr auto; gap: 1rem 2rem; }
.site-foot p { margin: 0; max-width: 62ch; }

/* mobile: everything collapses to one column */
@media (max-width: 767px) {
  body { font-size: 1.15rem; }
  .hero { padding: 2.5rem 0 3.5rem; }
  .hero .wrap, .inside .wrap, .book .wrap, .site-foot .wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  .cover { justify-self: start; width: min(78%, 320px); }
  .pages { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .pages img { position: static; width: 100%; }
  .groups { grid-template-columns: 1fr; gap: 1.4rem; }
  .signup { grid-template-columns: 1fr; }
  .signup .btn { width: 100%; }
  .inside, .updates, .book { padding: 3.5rem 0; }
  .band, .pros { padding: 3.5rem 0; }
  .site-head nav a { font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
