/* Miriam's Library and Learning Center
   Warm sand and clay, carried over from the original site and tightened.
   Crimson Pro for anything that speaks, Inter for anything that informs. */

:root {
  --cream: #fbf9f6;
  --cream-2: #f6f1ea;
  --sand: #f0e8de;
  --sand-deep: #e6dbcd;
  --line: #e4dbcf;
  --clay: #8a7265;
  --clay-light: #a08676;
  --clay-deep: #6b5b4f;
  --ink: #443a32;
  --ink-soft: #6f6459;
  --leaf: #5d8b3a;
  --ember: #b5651d;
  --white: #ffffff;

  --gutter: 22px;
  --measure: 1160px;
  --radius: 18px;
  --shadow-sm: 0 2px 10px rgba(90, 70, 55, .06);
  --shadow: 0 18px 46px rgba(90, 70, 55, .13);
  --serif: "Crimson Pro", Georgia, "Times New Roman", serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (min-width: 720px) { :root { --gutter: 34px; } }

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--clay); text-decoration: none; }
a:hover { color: var(--clay-deep); }

.wrap { max-width: var(--measure); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding: 78px 0; }
.section-sand { background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 45%, var(--sand) 100%); }
.section-clay { background: linear-gradient(135deg, #b89686 0%, #a08676 50%, #8a7265 100%); color: #fff; }
.section-clay a { color: #fff; }

/* ---- Type ---- */
h1, h2, h3, h4, .display { font-family: var(--serif); font-weight: 700; color: var(--clay-deep); letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(34px, 5.4vw, 58px); line-height: 1.08; }
h2 { font-size: clamp(27px, 3.6vw, 40px); line-height: 1.15; }
h3 { font-size: clamp(19px, 2vw, 23px); line-height: 1.25; }
p { margin: 0 0 1.1em; }
.lede { font-size: clamp(17px, 1.9vw, 20px); line-height: 1.7; color: var(--ink-soft); max-width: 64ch; }
.kicker {
  font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--clay-light); margin-bottom: 14px; display: block;
}
.section-clay h1, .section-clay h2, .section-clay h3 { color: #fff; }
.section-clay .lede, .section-clay p { color: rgba(255, 255, 255, .92); }
.section-clay .kicker { color: rgba(255, 255, 255, .8); }
.serif-quote { font-family: var(--serif); font-size: clamp(21px, 2.7vw, 30px); line-height: 1.4; color: var(--clay-deep); font-style: italic; }

/* ---- Header ---- */
.head { position: sticky; top: 0; z-index: 50; background: rgba(251, 249, 246, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.head-in { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px var(--gutter); max-width: var(--measure); margin: 0 auto; }
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand b { font-family: var(--serif); font-size: 21px; color: var(--clay-deep); font-weight: 700; }
.brand span { font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--clay-light); font-weight: 600; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { font-size: 14.5px; font-weight: 500; color: var(--ink-soft); }
.nav a:hover, .nav a.on { color: var(--clay-deep); }
.burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.burger span, .burger span::before, .burger span::after { display: block; width: 20px; height: 2px; background: var(--clay-deep); border-radius: 2px; position: relative; }
.burger span::before, .burger span::after { content: ""; position: absolute; }
.burger span::before { top: -6px; } .burger span::after { top: 6px; }
.panel { display: none; flex-direction: column; border-top: 1px solid var(--line); background: var(--cream); }
.panel a { padding: 13px var(--gutter); border-bottom: 1px solid var(--line); font-size: 15px; }
.panel.on { display: flex; }
@media (max-width: 860px) {
  .nav a:not(.btn) { display: none; }
  .burger { display: block; }
}

/* ---- Buttons ---- */
.btn, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--sans); font-size: 14.5px; font-weight: 600; letter-spacing: .01em;
  padding: 13px 26px; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn { background: linear-gradient(135deg, var(--clay-light), var(--clay)); color: #fff; box-shadow: var(--shadow-sm); }
.btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(138, 114, 101, .3); }
.btn-ghost { background: transparent; color: var(--clay-deep); border-color: var(--clay-light); }
.btn-ghost:hover { background: rgba(160, 134, 118, .1); color: var(--clay-deep); }
.section-clay .btn { background: #fff; color: var(--clay); }
.section-clay .btn-ghost { border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; padding: clamp(52px, 8vw, 96px) 0 clamp(56px, 8vw, 92px); background: linear-gradient(180deg, #fbf9f6 0%, #f8f4f0 25%, #f5efe9 50%, #f2eae3 75%, #efe5dd 100%); }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(at 50% 0%, rgba(255, 255, 255, .85), transparent 62%); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; position: relative; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-art { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, .7); }
.hero-art img { width: 100%; height: clamp(260px, 38vw, 420px); object-fit: cover; }

/* ---- Cards ---- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.card-photo { padding: 0; }
.card-photo img { width: 100%; height: 220px; object-fit: cover; }
.card-photo .card-body { padding: 22px 24px 26px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 15.3px; margin-bottom: 0; }
.card ul { margin: 14px 0 0; padding: 0; list-style: none; }
.card li { position: relative; padding-left: 22px; font-size: 14.6px; color: var(--ink-soft); margin-bottom: 7px; }
.card li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); }
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--clay); background: var(--sand); padding: 6px 13px; border-radius: 999px; }

/* ---- Stats ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; }
.stat { text-align: center; padding: 24px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.stat .n { font-family: var(--serif); font-size: clamp(30px, 4vw, 42px); font-weight: 700; color: var(--clay); line-height: 1; }
.stat .l { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }
.section-clay .stat { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); }
.section-clay .stat .n, .section-clay .stat .l { color: #fff; }

/* ---- Timeline ---- */
.timeline { position: relative; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--clay-light), var(--sand-deep)); }
.tl-item { position: relative; padding-bottom: 30px; }
.tl-item::before { content: ""; position: absolute; left: -30px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--clay-light); }
.tl-item.done::before { background: var(--leaf); border-color: var(--leaf); }
.tl-year { font-family: var(--serif); font-weight: 700; color: var(--clay); font-size: 17px; }
.tl-item h3 { margin: 2px 0 6px; font-size: 19px; }
.tl-item p { color: var(--ink-soft); font-size: 15px; margin: 0; }

/* ---- Forms ---- */
.field { margin-bottom: 16px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--clay-deep); margin-bottom: 7px; }
input, select, textarea {
  width: 100%; font-family: var(--sans); font-size: 15.5px; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--clay-light); box-shadow: 0 0 0 3px rgba(160, 134, 118, .16); }
textarea { resize: vertical; min-height: 110px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .row2 { grid-template-columns: 1fr; } }
.hint { font-size: 13.2px; color: var(--ink-soft); }
.err { color: #b3261e; font-size: 14px; min-height: 20px; }
.ok { color: var(--leaf); font-size: 14.5px; font-weight: 600; }

/* ---- Amount chips ---- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips button {
  font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--clay-deep);
  background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 11px 20px; cursor: pointer;
}
.chips button:hover { border-color: var(--clay-light); }
.chips button.on { background: linear-gradient(135deg, var(--clay-light), var(--clay)); border-color: transparent; color: #fff; }

/* ---- Tier cards ---- */
.tier { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 20px 22px; cursor: pointer; text-align: left; width: 100%; font-family: var(--sans); }
.tier:hover { border-color: var(--clay-light); }
.tier.on { border-color: var(--clay); box-shadow: 0 0 0 3px rgba(160, 134, 118, .16); }
.tier .amt { font-family: var(--serif); font-size: 25px; font-weight: 700; color: var(--clay); min-width: 92px; }
.tier .t { display: block; font-weight: 600; color: var(--clay-deep); font-size: 16px; }
.tier .d { display: block; font-size: 14px; color: var(--ink-soft); margin-top: 3px; }
@media (max-width: 620px) { .tier { grid-template-columns: 1fr; gap: 6px; } }

/* ---- Footer ---- */
.foot { background: #efe9e1; border-top: 1px solid var(--line); padding: 52px 0 34px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr; } }
.foot h4 { font-family: var(--sans); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--clay-light); margin-bottom: 14px; }
.foot a, .foot p { font-size: 14.6px; color: var(--ink-soft); }
.foot a { display: block; margin-bottom: 9px; }
.foot-base { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ---- Reveal ---- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

.notice { background: var(--sand); border: 1px solid var(--line); border-left: 3px solid var(--clay-light); border-radius: 0 12px 12px 0; padding: 16px 18px; font-size: 14.6px; color: var(--ink-soft); }

/* The launch banner: one line, impossible to miss, in the library's own palette. */
.launch { background: var(--ink); color: var(--cream); }
.launch-in { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 16px 0; flex-wrap: wrap; }
.launch-in > div { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.launch-tag { font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); background: #e4c27a; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.launch-in strong { font-family: 'Crimson Pro', Georgia, serif; font-size: 20px; font-weight: 600; color: var(--cream); }
.launch-sub { font-size: 14.5px; color: #d9cfc3; }
.launch-btn { background: #e4c27a; color: var(--ink); border-color: #e4c27a; white-space: nowrap; }
.launch-btn:hover { background: #ecd091; }
@media (max-width: 720px) {
  .launch-in { padding: 14px 0; }
  .launch-in strong { font-size: 18px; }
  .launch-btn { width: 100%; text-align: center; }
}
