/* Ledger & Loaf — bookshop and café template
   Design system "Ledger 70": 1970s annual-report / ledger-book. Warm paper,
   oxblood ink, hairline rules, dotted leaders, squared corners everywhere.
   Plain CSS, no build step. Every colour is a custom property.

   Three rules the look depends on — break them and it stops being this system:
     · border-radius is 0 everywhere. No exceptions.
     · no shadows, ever. Depth comes from rules and the --bg-soft panel.
     · hairline 1px --border inside, 1px --fg around cards, 2px --fg for section rules. */

:root {
  --bg:        #F7F1E4;   /* warm paper                    */
  --bg-soft:   #EFE5D2;   /* panels, alternate sections    */
  --fg:        #211A12;   /* ink — 13.1:1 on --bg          */
  --muted:     #6B5B45;   /* secondary — 5.3:1, never <13px */
  --border:    #C9B894;   /* hairlines and dotted leaders  */
  --brand:     #A3341F;   /* oxblood — 6.4:1 on --bg       */
  --brand-fg:  #FDF8EE;   /* on brand — 6.9:1              */
  --ochre:     #8A5E12;
  --good:      #2F5D50;
  --warn:      #7A5C0F;
  --bad:       #8E2A1B;
  --good-fill: #DCE8E1;
  --warn-fill: #F5E7C4;
  --bad-fill:  #F3DED8;

  --head: Archivo, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: Karla, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1200px;
  --gutter: 24px;
}

/* Dark follows the switch in the header, which writes data-theme on <html>.
   Without JavaScript the page stays light — that is the intended fallback. */
:root[data-theme="dark"] {
  --bg: #181410; --bg-soft: #221C15; --fg: #F3EADA; --muted: #B3A287;
  --border: #3E3427; --brand: #E2673F; --brand-fg: #1A1108;
  --ochre: #E0A43A; --good: #8FCBB4; --warn: #DCB755; --bad: #F09A7C;
  --good-fill: #22332C; --warn-fill: #32280F; --bad-fill: #3A211A;
}

/* ---- base ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--fg); }
img { max-width: 100%; height: auto; display: block; }
input, button, select, textarea { font: inherit; border-radius: 0; }
summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { border-bottom: 1px solid var(--border); }
.section--soft { background: var(--bg-soft); }
.section > .wrap { padding-block: 44px 52px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- type ---------------------------------------------------------- */
.mono {
  font-family: var(--mono); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 20px; }
.tag     { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--brand); margin: 0; }

h1, h2, h3 { font-family: var(--head); text-transform: uppercase; margin: 0; }
h1 { font-weight: 800; letter-spacing: -.01em; line-height: .94; font-size: clamp(38px, 6.4vw, 74px); text-wrap: balance; }
h2 { font-weight: 800; letter-spacing: .04em; font-size: clamp(22px, 3vw, 32px); }
h3 { font-weight: 700; letter-spacing: .02em; font-size: 20px; text-transform: none; }

.lead { font-size: 18px; max-width: 44ch; margin: 0 0 28px; }
.note { font-size: 15px; color: var(--muted); margin: 0; }
.num  { font-variant-numeric: tabular-nums; }

/* Section head: mono number in brand, 2px rule under the lot */
.head {
  display: flex; align-items: baseline; gap: 16px;
  border-bottom: 2px solid var(--fg); padding-bottom: 12px;
}
.head + * { margin-top: 28px; }
.head .idx { font-family: var(--mono); font-size: 12px; letter-spacing: .2em; color: var(--brand); }
.head h2 { flex: 1; }
.head a { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }

/* ---- buttons ------------------------------------------------------- */
.btn {
  display: inline-block; font-family: var(--head); font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; font-size: 13px;
  padding: 14px 22px; border: 1px solid var(--fg); background: transparent;
  color: var(--fg); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--fg); color: var(--bg); }
.btn--brand { background: var(--brand); border-color: var(--brand); color: var(--brand-fg); }
.btn--brand:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn--sm { font-family: var(--mono); font-weight: 400; font-size: 12px; letter-spacing: .14em; padding: 7px 12px; }

/* ---- dotted leader: the signature row ------------------------------ */
.leaders { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.leaders li { display: flex; align-items: baseline; gap: 8px; }
.leaders .fill { flex: 1; border-bottom: 1px dotted var(--border); min-width: 14px; }
.leaders .figure { font-variant-numeric: tabular-nums; font-weight: 700; }
.leaders .figure--muted { font-weight: 400; color: var(--muted); }

/* ---- placeholders: no image assets ship with the template ---------- */
.ph {
  background: repeating-linear-gradient(135deg, var(--bg-soft) 0 9px, var(--bg) 9px 18px);
  display: flex; align-items: flex-end; padding: 10px;
}
.ph__label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); background: var(--bg); padding: 3px 6px; border: 1px solid var(--border);
}
.ph--map {
  min-height: 280px; border: 1px solid var(--fg); position: relative;
  align-items: center; justify-content: center; padding: 0;
  background:
    repeating-linear-gradient(0deg, var(--bg-soft) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, var(--bg-soft) 0 1px, transparent 1px 28px),
    var(--bg);
}
.ph--map .pin { width: 16px; height: 16px; background: var(--brand); position: absolute; left: 38%; top: 44%; }
.ph--map .ph__label { padding: 6px 10px; letter-spacing: .12em; }

/* ---- header -------------------------------------------------------- */
.site-head { border-bottom: 2px solid var(--fg); background: var(--bg); }
.site-head .wrap {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  justify-content: space-between; padding-block: 14px;
}
.brandmark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.brandmark .mark { width: 26px; height: 26px; background: var(--brand); display: block; }
.brandmark .name { font-family: var(--head); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 17px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.site-nav a {
  font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
}
.site-nav a:hover { color: var(--fg); }
.site-nav a[aria-current="page"] { color: var(--fg); border-bottom: 2px solid var(--brand); padding-bottom: 2px; }

/* ---- hero ---------------------------------------------------------- */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: stretch; }
.hero__copy { padding: 48px 40px 48px 0; min-width: 0; }
.hero__copy h1 { margin-bottom: 20px; }
.hero__copy h1 .accent { color: var(--brand); }
.hero__panel { border-left: 1px solid var(--border); background: var(--bg-soft); padding: 32px; min-width: 0; }
.hero__panel .day {
  font-family: var(--head); font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  font-size: 22px; margin: 0 0 18px; border-bottom: 2px solid var(--fg); padding-bottom: 12px;
}
.hero__panel .eyebrow { margin-bottom: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.drawer { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 14px; }
.drawer summary { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg); }
.drawer p { font-size: 15px; color: var(--muted); margin: 10px 0 0; }

/* ---- event rows ---------------------------------------------------- */
.events { list-style: none; margin: 0; padding: 0; }
.events li {
  display: grid; grid-template-columns: minmax(76px, auto) 1fr auto; gap: 20px;
  align-items: center; padding: 18px 0; border-bottom: 1px solid var(--border);
}
.chip { border: 1px solid var(--fg); padding: 6px 8px; text-align: center; min-width: 76px; }
.chip .m { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.chip .d { display: block; font-family: var(--head); font-weight: 800; font-size: 24px; line-height: 1.1; }
.chip .t { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.chip--brand { border-color: var(--brand); color: var(--brand); }
.chip--brand .m, .chip--brand .t { color: var(--brand); }
.events .title { font-family: var(--head); font-weight: 700; font-size: 19px; text-transform: none; margin: 0 0 4px; }
.events .price { font-family: var(--head); font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- cards --------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card { border: 1px solid var(--fg); background: var(--bg); display: flex; flex-direction: column; }
.card .ph { height: 150px; border-bottom: 1px solid var(--fg); }
.card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card__body .note { flex: 1; }
.card .figure { font-family: var(--head); font-weight: 800; font-size: 18px; margin: 0; font-variant-numeric: tabular-nums; }
.card .figure .unit { font-family: var(--body); font-weight: 400; font-size: 14px; color: var(--muted); }

/* ---- two columns --------------------------------------------------- */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.split > * { min-width: 0; }
address { font-style: normal; font-size: 16px; line-height: 1.6; border-top: 1px solid var(--border); padding-top: 16px; }

/* ---- newsletter band ----------------------------------------------- */
.band { background: var(--brand); color: var(--brand-fg); border-bottom: 2px solid var(--fg); }
.band .wrap {
  padding-block: 40px 44px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; align-items: center;
}
.band .eyebrow { color: inherit; opacity: .85; margin-bottom: 10px; }
.band p { max-width: 40ch; }
.band form { display: flex; flex-wrap: wrap; gap: 10px; min-width: 0; }
.band input {
  flex: 1; min-width: 180px; padding: 14px; font-size: 16px;
  border: 1px solid var(--brand-fg); background: var(--brand-fg); color: var(--fg);
}
.band .btn { background: var(--fg); border-color: var(--fg); color: var(--brand-fg); }
.band .btn:hover { background: var(--brand-fg); color: var(--fg); }

/* ---- footer -------------------------------------------------------- */
.site-foot { background: var(--bg); }
.site-foot .wrap {
  padding-block: 40px 48px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px;
}
.site-foot .col { display: grid; gap: 8px; align-content: start; min-width: 0; }
.site-foot .col > p:first-child { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.site-foot a { font-size: 15px; }
.site-foot .legal { font-size: 14px; color: var(--muted); margin: 0; align-self: end; }
.site-foot .credit { margin-top: 4px; }
.site-foot .brandmark { margin-bottom: 12px; }
.site-foot .brandmark .mark { width: 22px; height: 22px; }
.site-foot .brandmark .name { font-size: 15px; }

/* ---- page title block (inner pages) -------------------------------- */
.page-head { border-bottom: 1px solid var(--border); }
.page-head .wrap { padding-block: 44px 36px; }
.page-head h1 { font-size: clamp(34px, 5.4vw, 60px); margin-bottom: 16px; }
.page-head .intro { font-size: 17px; color: var(--muted); max-width: 56ch; margin: 0; }

/* ---- featured event ------------------------------------------------ */
.featured { border: 2px solid var(--fg); display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.featured .ph { min-height: 300px; border-right: 1px solid var(--fg); }
.featured__body { padding: 28px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.featured h2 { font-size: clamp(24px, 3.4vw, 34px); }

/* ---- event list, long form (events page) --------------------------- */
.events--full li { align-items: start; padding: 22px 0; grid-template-columns: minmax(88px, auto) 1fr auto; }
.events--full .chip { min-width: 88px; padding: 8px; }
.events--full .chip .d { font-size: 28px; line-height: 1.05; }
.events--full .right { text-align: right; white-space: nowrap; }
.events--full .price { display: block; font-size: 19px; }
.events--full .state { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.reveal summary { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); margin-top: 10px; }
.reveal p { font-size: 15px; margin: 10px 0 0; max-width: 60ch; }

/* Featured event: brand date stamp beside a mono time */
.meta-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; }
.stamp { background: var(--brand); color: var(--brand-fg); font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; padding: 5px 9px; }
.muted { color: var(--muted); }

/* ---- 404 ----------------------------------------------------------- */
.lost-wrap { padding-block: 56px 64px; }
.lost { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 36px; align-items: start; }
.lost > div { min-width: 0; }
.lost .numeral { font-family: var(--head); font-weight: 800; font-size: clamp(90px, 18vw, 180px); line-height: .82; letter-spacing: -.03em; color: var(--brand); margin: 0 0 20px; }
.lost h1 { font-size: clamp(24px, 3.4vw, 36px); line-height: 1.05; letter-spacing: .02em; border-top: 2px solid var(--fg); padding-top: 18px; margin-bottom: 16px; }

/* The shelf: two rows of books drawn as stripes, third row empty — that is the joke */
.shelf { border: 1px solid var(--fg); background: var(--bg-soft); padding: 18px; display: grid; gap: 14px; }
.shelf .bar { height: 56px; border-bottom: 2px solid var(--fg); }
.shelf .bar--wide   { background: repeating-linear-gradient(90deg, var(--bg) 0 14px, var(--border) 14px 16px); }
.shelf .bar--narrow { background: repeating-linear-gradient(90deg, var(--bg) 0 22px, var(--border) 22px 24px); }
.shelf .bar--empty  { background: var(--bg); display: flex; align-items: center; justify-content: center; }
.shelf .gap { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.golist { margin: 24px 0 0; border-top: 2px solid var(--fg); padding-top: 16px; display: grid; gap: 0; }
.golist a { display: flex; align-items: baseline; gap: 8px; text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--fg); }
.golist a:hover .go { color: var(--fg); }
.golist .fill { flex: 1; border-bottom: 1px dotted var(--border); min-width: 14px; }
.golist .go { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }

/* ---- narrow -------------------------------------------------------- */
@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .section > .wrap, .page-head .wrap { padding-block: 32px 36px; }
  .hero__copy { padding: 32px 0 28px; }
  .hero__panel { border-left: 0; border-top: 1px solid var(--border); }
  .events li { grid-template-columns: minmax(70px, auto) 1fr; row-gap: 10px; }
  .events .price, .events .right { grid-column: 2; justify-items: start; }
  .featured .ph { border-right: 0; border-bottom: 1px solid var(--fg); min-height: 200px; }
}

/* ---- print --------------------------------------------------------- */
@media print {
  .site-head, .band, .site-foot, .btn { display: none; }
  body { background: #fff; color: #000; }
}
