/* ===================================================================
   Castlebridge Reading Rooms — site design system
   "The cover and the pages": bottle-green book cover + parchment pages.
   Display: Libre Caslon Display · Body: Spectral · Utility: Inter
   =================================================================== */

:root {
  --ink:        #1C3327;   /* bottle/forest green — covers, nav, footer */
  --green:      #355B47;   /* mid forest */
  --brass:      #B0832F;   /* brass — rules, accents on light */
  --brass-on:   #E2BC6B;   /* bright brass — accents on dark */
  --oxblood:    #7A2E22;   /* leather-spine accent, used sparingly */
  --parchment:  #F3EEE0;   /* cards, lead boxes */
  --paper:      #FBF8F0;   /* page background */
  --text:       #26211B;   /* warm near-black ink */
  --muted:      #5C5446;   /* secondary ink */
  --rule:       #D8CDB5;   /* hairline on parchment */
  --rule-dk:    rgba(226,188,107,0.30); /* hairline on dark */
  --measure:    44rem;     /* prose measure */
  --wide:       66rem;     /* feature measure */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Spectral', Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.62;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--oxblood); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

h1, h2, h3 { font-family: 'Libre Caslon Display', Georgia, serif; font-weight: 400; color: var(--ink); letter-spacing: 0.005em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.12; margin: 0 0 0.5rem 0; }
h3 { font-family: 'Spectral', serif; font-weight: 600; font-size: 1.2rem; color: var(--green); margin: 1.6rem 0 0.4rem 0; }
p  { margin: 0 0 1rem 0; }
strong { color: var(--ink); font-weight: 600; }

/* ── Eyebrow + rule (the editorial section marker) ──────────────── */
.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--brass);
  margin: 0 0 0.6rem 0;
}
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.rule-brass { border: 0; border-top: 2px solid var(--brass); width: 56px; margin: 0 0 1.4rem 0; }

/* ── Top navigation ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: var(--ink);
  border-bottom: 1px solid var(--rule-dk);
}
.nav-inner {
  max-width: var(--wide); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 1.4rem; gap: 1rem;
}
.brand {
  font-family: 'Libre Caslon Display', serif;
  color: #fff; font-size: 1.05rem; text-decoration: none; white-space: nowrap;
}
.brand span { color: var(--brass-on); }
.nav-links { display: flex; flex-wrap: wrap; gap: 0.1rem 0.2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-family: 'Inter', sans-serif; font-size: 0.82rem; font-weight: 500;
  color: rgba(255,255,255,0.82); text-decoration: none;
  padding: 0.35rem 0.6rem; border-radius: 2px; border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: #fff; border-bottom-color: var(--rule-dk); }
.nav-links a[aria-current="page"] { color: var(--brass-on); border-bottom-color: var(--brass); }
.nav-toggle { display: none; }

/* ── Hero — the "book cover" ────────────────────────────────────── */
.cover {
  background:
    radial-gradient(120% 90% at 50% -10%, #24412F 0%, var(--ink) 55%, #142519 100%);
  color: #F4EEDC;
  border-bottom: 3px solid var(--brass);
  text-align: center;
  padding: clamp(3rem, 8vw, 6rem) 1.4rem clamp(2.6rem, 6vw, 4.4rem);
}
.cover-inner { max-width: 50rem; margin: 0 auto; }
.cover-plaque {
  font-family: 'Inter', sans-serif; font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.28em; color: var(--brass-on);
  margin-bottom: 1.5rem;
}
.cover h1 {
  color: #FBF6E8;
  font-size: clamp(2.4rem, 7vw, 4.6rem); line-height: 1.02; margin: 0;
}
.cover-dbl { width: 120px; height: 0; margin: 1.5rem auto;
  border-top: 1px solid var(--brass); border-bottom: 1px solid var(--brass);
  padding-top: 3px; }
.cover-sub {
  font-size: clamp(1.05rem, 2.2vw, 1.32rem); font-style: italic;
  color: rgba(244,238,220,0.9); max-width: 38rem; margin: 0 auto 2rem;
}
.cover-ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  font-family: 'Inter', sans-serif; font-size: 0.9rem; font-weight: 600;
  letter-spacing: 0.02em; text-decoration: none; cursor: pointer;
  padding: 0.7rem 1.4rem; border-radius: 2px; border: 1.5px solid transparent;
  display: inline-block; transition: background .15s, color .15s, border-color .15s;
}
.btn-brass { background: var(--brass); color: #20160a; }
.btn-brass:hover { background: var(--brass-on); color: #20160a; }
.btn-ghost { border-color: rgba(226,188,107,0.6); color: #F4EEDC; }
.btn-ghost:hover { border-color: var(--brass-on); background: rgba(226,188,107,0.12); color:#fff; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--green); color:#fff; }

/* ── Fact ledger (the "records" catalogue strip) ────────────────── */
.ledger {
  background: var(--ink); color: #EBE3CF;
  border-bottom: 1px solid var(--rule-dk);
}
.ledger-inner {
  max-width: var(--wide); margin: 0 auto; padding: 0.9rem 1.4rem;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.8rem; justify-content: center;
  font-family: 'Inter', sans-serif; font-size: 0.76rem; letter-spacing: 0.06em;
}
.ledger-inner span { display: inline-flex; align-items: baseline; gap: 0.5rem; }
.ledger-inner b { color: var(--brass-on); font-weight: 600; }

/* ── Sections / bands ───────────────────────────────────────────── */
.band { padding: clamp(2.6rem, 6vw, 4.2rem) 1.4rem; }
.band-parchment { background: var(--parchment); }
.band-ink { background: var(--ink); color: #EFE8D6; }
.band-ink h2, .band-ink h3 { color: #FBF6E8; }
.band-ink .eyebrow { color: var(--brass-on); }
.band-ink a { color: var(--brass-on); }
.prose { max-width: var(--measure); margin: 0 auto; }
.prose.wide { max-width: var(--wide); }
.prose > p:first-of-type { font-size: 1.06rem; }

/* lead paragraph callout */
.lead {
  font-size: 1.12rem; line-height: 1.55;
  border-left: 3px solid var(--brass); padding: 0.2rem 0 0.2rem 1.2rem;
  margin: 0 0 1.6rem 0; color: var(--text);
}

/* ── Cards & grids ──────────────────────────────────────────────── */
.grid { display: grid; gap: 1.2rem; max-width: var(--wide); margin: 0 auto; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 3px;
  padding: 1.4rem 1.4rem 1.5rem;
}
.card .eyebrow { color: var(--oxblood); }
.card h3 { margin-top: 0.2rem; }
.card p:last-child { margin-bottom: 0; }
.card-link { font-family:'Inter',sans-serif; font-size:0.82rem; font-weight:600; text-decoration:none; color: var(--oxblood); }
.card-link:hover { color: var(--ink); }

/* giving tiers / list rows */
.rows { max-width: var(--measure); margin: 0 auto; list-style: none; padding: 0; }
.rows li { display:flex; gap: 1rem; align-items: baseline; padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
.rows li:last-child { border-bottom: 0; }
.rows .amt { font-family:'Libre Caslon Display',serif; font-size: 1.4rem; color: var(--oxblood); min-width: 4.5rem; }

/* numbered steps — only used where order is real */
ol.steps { counter-reset: s; list-style: none; padding: 0; max-width: var(--measure); margin: 0 auto; }
ol.steps li { counter-increment: s; position: relative; padding-left: 3rem; margin-bottom: 1rem; }
ol.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -0.1rem;
  width: 2rem; height: 2rem; border: 1.5px solid var(--brass); color: var(--brass);
  border-radius: 50%; text-align: center; line-height: 1.9rem;
  font-family:'Inter',sans-serif; font-size: 0.85rem; font-weight: 600;
}

ul.ticks { list-style: none; padding: 0; max-width: var(--measure); margin: 0 auto; }
ul.ticks li { padding: 0.45rem 0 0.45rem 1.6rem; position: relative; }
ul.ticks li::before { content: "—"; position: absolute; left: 0; color: var(--brass); }

/* image with caption */
figure { margin: 1.6rem 0; max-width: var(--wide); margin-left:auto; margin-right:auto; }
figure img { border: 1px solid var(--rule); border-radius: 3px; }
figcaption { font-family:'Inter',sans-serif; font-size: 0.78rem; color: var(--muted); font-style: italic; margin-top: 0.5rem; text-align: center; }

/* callout note */
.note {
  background: var(--paper); border: 1px solid var(--rule); border-left: 3px solid var(--green);
  border-radius: 3px; padding: 1rem 1.2rem; margin: 1.4rem auto; max-width: var(--measure);
}
.note .eyebrow { color: var(--green); }

/* embedded form */
.form-embed { max-width: var(--wide); margin: 0 auto; }
.form-embed iframe { width: 100%; border: 1px solid var(--rule); border-radius: 3px; background:#fff; }

/* ── Timeline (the building's record) ───────────────────────────── */
.timeline { list-style: none; max-width: var(--measure); margin: 0 auto; padding: 0.4rem 0 0 0; border-left: 2px solid #cdbf9f; }
.timeline li { position: relative; padding: 0 0 1.5rem 1.7rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: -8px; top: 0.4rem; width: 13px; height: 13px; background: var(--brass); border: 2px solid var(--parchment); border-radius: 50%; }
.timeline .yr { font-family: 'Libre Caslon Display', serif; color: var(--oxblood); font-size: 1.15rem; display: block; margin-bottom: 0.1rem; }

/* ── Footer ─────────────────────────────────────────────────────── */
.footer { background: var(--ink); color: rgba(244,238,220,0.78); border-top: 3px solid var(--brass); }
.footer-inner { max-width: var(--wide); margin: 0 auto; padding: 2.4rem 1.4rem; }
.footer .plaque-line {
  font-family:'Libre Caslon Display',serif; color:#FBF6E8; font-size: 1.15rem; margin-bottom: 1.2rem;
}
.footer-cols { display:flex; flex-wrap:wrap; gap: 2rem; justify-content: space-between; }
.footer h4 { font-family:'Inter',sans-serif; font-size:0.72rem; text-transform:uppercase; letter-spacing:0.2em; color: var(--brass-on); margin:0 0 0.6rem; }
.footer ul { list-style:none; padding:0; margin:0; }
.footer li { margin-bottom: 0.3rem; }
.footer a { color: rgba(244,238,220,0.8); text-decoration: none; font-family:'Inter',sans-serif; font-size:0.86rem; }
.footer a:hover { color:#fff; }
.footer .legal {
  border-top: 1px solid var(--rule-dk); margin-top: 1.8rem; padding-top: 1.2rem;
  font-family:'Inter',sans-serif; font-size: 0.76rem; line-height: 1.7; color: rgba(244,238,220,0.6);
}
.footer .legal strong { color: rgba(244,238,220,0.85); font-weight: 600; }

/* ── Motion ─────────────────────────────────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.cover-plaque { animation: rise .6s ease both; }
.cover h1     { animation: rise .6s ease .12s both; }
.cover-sub    { animation: rise .6s ease .24s both; }
.cover-ctas   { animation: rise .6s ease .36s both; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cover-plaque,.cover h1,.cover-sub,.cover-ctas { animation: none; }
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 760px) {
  body { font-size: 17px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .nav-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 0.3rem 0.5rem 0.3rem 0; }
  .footer-cols { gap: 1.4rem; }
}

:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
