/* ===========================================================================
   Inference Publishing — site styles.

   The palette is sampled from the wordmark itself (build/make-images.py works
   from the same masters): a near-black navy ground, the gold of the lettering
   at three lightnesses, and the silver-blue of "Inference".
   =========================================================================== */
:root {
  --ground:      #05090f;
  --ground-lift: #0b1420;
  --panel:       #101b2a;
  --rule:        rgba(180, 211, 246, .16);
  --ink:         #eaf1fa;
  --ink-mute:    #9fb3ca;
  --gold-deep:   #9a5e1f;
  --gold:        #c5843c;
  --gold-warm:   #e7aa59;
  --gold-light:  #fbd480;
  --blue:        #6d8fbe;
  --blue-light:  #b4d3f6;
  --max:         74rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans:  ui-sans-serif, -apple-system, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--gold-light); }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: 24px; }

/* ------------------------------------------------------------------ masthead */
.masthead {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.masthead .wrap {
  display: flex; align-items: center; gap: 20px;
  padding-block: 14px;
}
.masthead img { width: clamp(200px, 30vw, 290px); height: auto; }
.masthead nav { margin-left: auto; display: flex; gap: 26px; flex-wrap: wrap; }
.masthead nav a {
  color: var(--ink-mute); text-decoration: none;
  font-size: 14px; font-weight: 600; letter-spacing: .04em;
}
.masthead nav a:hover { color: var(--gold-light); }

/* ---------------------------------------------------------------------- hero
   The hero artwork already carries the wordmark, the tagline and the
   Foundation line, so the page does not repeat any of them underneath it. */
.hero { position: relative; }
/* The artwork is a designed banner with the wordmark inside it, so it is never
   cropped — any fixed height plus object-fit:cover cuts the top of the logo.
   It is shown whole, at its own 2:1 proportion. */
.hero__img { width: 100%; height: auto; display: block; }

.intro { padding-block: clamp(34px, 4.5vw, 54px); }
.intro h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  line-height: 1.14; margin: 0 0 14px;
}
.intro .lede { font-size: clamp(1rem, 1.4vw, 1.14rem); max-width: 62ch; }

/* ------------------------------------------------------------------ sections */
section { padding-block: clamp(48px, 7vw, 84px); }
section + section { border-top: 1px solid var(--rule); }

.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 12px;
}
h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.2; margin: 0 0 18px;
}
.lede { max-width: 66ch; color: var(--ink-mute); font-size: 1.06rem; margin: 0 0 8px; }

/* ------------------------------------------------------------- book placards
   The cards themselves come from /v1/books.js, which ships neutral, inheriting
   styles so it looks right on any host. Here the house dresses them. */
.shelf { margin-top: 34px; }

[data-ip-books] .ip-book {
  background: linear-gradient(160deg, var(--panel) 0%, var(--ground-lift) 100%);
  border-color: var(--rule);
}
[data-ip-books] .ip-book__art {
  box-shadow: 0 14px 34px rgba(0,0,0,.55), 0 0 0 1px rgba(251,212,128,.18);
}
[data-ip-books] .ip-billing { color: var(--gold); opacity: 1; }
[data-ip-books] .ip-book h3 { font-family: var(--serif); font-weight: 600; }
[data-ip-books] .ip-by { color: var(--gold-warm); opacity: 1; }
[data-ip-books] .ip-book p { color: var(--ink-mute); opacity: 1; }
[data-ip-books] .ip-meta { color: var(--ink-mute); opacity: .75; }

[data-ip-books] .ip-acts a { border-color: var(--rule); color: var(--ink); transition: transform .12s ease, filter .12s ease; }
[data-ip-books] .ip-acts a:hover { transform: translateY(-1px); filter: brightness(1.08); }
[data-ip-books] .ip-acts a.ip-primary {
  background: linear-gradient(140deg, var(--gold-warm) 0%, var(--gold-deep) 100%);
  border-color: transparent; color: #1a1206;
}
[data-ip-books] .ip-acts a.ip-primary span { filter: none; }

/* -------------------------------------------------------------------- pillars */
.pillars { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-top: 30px; }
.pillar { border-top: 2px solid var(--gold-deep); padding-top: 16px; }
.pillar h3 { font-family: var(--sans); font-size: 1rem; font-weight: 700; margin: 0 0 8px; letter-spacing: .01em; }
.pillar p { color: var(--ink-mute); font-size: 15px; margin: 0; }

/* --------------------------------------------------------------------- footer */
.ws-footer {
  --ws-footer-ink: var(--ink); --ws-footer-muted: var(--ink-mute); --ws-footer-rule: var(--blue-light);
  margin-top: 0;            /* the sections already carry their own bottom padding */
}
.colophon {
  border-top: 1px solid var(--rule);
  padding-block: 26px; color: var(--ink-mute); font-size: 13px;
}
.colophon .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.colophon a { color: var(--ink-mute); }
