/* ==========================================================================
   Alachua County Library District Foundation — site styles
   Recreates the Squarespace design: Poppins type, navy/peach palette,
   and the 24-column (desktop) / 8-column (mobile) block grid.
   ========================================================================== */

:root {
  --navy: #1a1341;
  --peach: #fdf0e6;
  --mint: #d3ece9;
  --rust: #bc5733;
  --black: #000;
  --white: #fff;

  --max-width: 1200px;
  --header-h: 106px;
  --gap: 11px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Type scale (same formula Squarespace uses): size = (V - 1) * F + 1rem,
     where F follows viewport height on phones and viewport width on larger screens. */
  --F: min(1.2vh, 10.8px);
  --fs-h1: calc(3 * var(--F) + 1rem);
  --fs-h2: calc(1.8 * var(--F) + 1rem);
  --fs-h3: calc(1.2 * var(--F) + 1rem);
  --fs-h4: calc(.2 * var(--F) + 1rem);
  --fs-p: 1rem;
  --fs-lg: calc(.4 * var(--F) + 1rem);
  --fs-sm: calc(.3 * var(--F) + 1rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  font-size: var(--fs-p);
  line-height: 1.8;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

h1, h2, h3, h4 { font-weight: 500; margin: 2rem 0; }
strong, b { font-weight: 700; }
h1 { font-size: var(--fs-h1); line-height: 1.232; }
h2 { font-size: var(--fs-h2); line-height: 1.3; }
h3 { font-size: var(--fs-h3); line-height: 1.333; }
h4 { font-size: var(--fs-h4); line-height: 1.389; }
p { margin: 1rem 0; }
p.lg { font-size: var(--fs-lg); }
p.sm { font-size: var(--fs-sm); }
ul, ol { padding-left: 1.6em; }
li > p { margin: .3rem 0; }

.c-navy { color: var(--navy); }
.c-black { color: var(--black); }
.hl {
  background-image: linear-gradient(var(--navy), var(--navy));
  background-repeat: no-repeat;
  background-size: 100% .05em;
  background-position: 0 100%;
  padding: 0 .08em .04em;
}

a { color: inherit; }
.rte a, .list-item-body a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}
.rte a:hover, .list-item-body a:hover { opacity: .7; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--navy); color: #fff; padding: .6rem 1rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.6rem;
  padding: 1.1rem 2.2rem;
  border: 0;
  border-radius: 300px;
  background: var(--btn-bg, var(--navy));
  color: var(--btn-fg, #fff);
  font: 600 1rem/1.2 var(--font);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: opacity .15s ease;
}
.btn:hover { opacity: .8; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
}

/* ---------- Themes (match Squarespace section themes) ---------- */
.theme-default, .theme-white { --bg: #fff; --fg: #000; --link: var(--navy); --btn-bg: var(--navy); --btn-fg: #fff; --overlay: #fff; }
.theme-light { --bg: var(--peach); --fg: #000; --link: var(--navy); --btn-bg: var(--navy); --btn-fg: #fff; --overlay: #fff; }
.theme-black, .theme-black-bold { --bg: #000; --fg: #fff; --link: #fff; --btn-bg: #fff; --btn-fg: #000; --overlay: #000; }
.theme-bright { --bg: var(--navy); --fg: #fff; --link: #fff; --btn-bg: #fff; --btn-fg: var(--navy); --overlay: var(--navy); }
.theme-white strong { color: var(--rust); }

/* ---------- Sections ---------- */
.section {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--minh, 0);
  padding: var(--mpt, var(--pt, 0)) 0 var(--mpb, var(--pb, 0));
  background: var(--bg);
  color: var(--fg);
  isolation: isolate;
}
.section.valign-bottom { justify-content: flex-end; }
@media (min-width: 768px) {
  .section { padding: var(--pt, 0) 0 var(--pb, 0); }
}

/* The header floats over the first section, which is padded to make room for it */
main > .section:first-child { padding-top: calc(var(--header-h) + var(--mpt, var(--pt, 0px))); }
@media (min-width: 768px) {
  main > .section:first-child { padding-top: calc(var(--header-h) + var(--pt, 0px)); }
}
@media (min-width: 768px) { :root { --F: min(1.2vw, 16px); } }
@media (min-width: 1024px) { :root { --header-h: 154px; } }

.section.inset .section-bg { background: var(--bg); }
/* "Inset" sections: background sits inside a 3vw frame on desktop */
@media (min-width: 768px) {
  .section.inset { background: transparent; padding: calc(var(--pt, 0px) + 3vw) 3vw calc(var(--pb, 0px) + 3vw); }
  .section.inset .section-bg { inset: 3vw; }
}

.section-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.section-bg img { width: 100%; height: 100%; object-fit: cover; }
.section-bg .overlay { position: absolute; inset: 0; background: var(--overlay); }

/* Jagged section dividers: the section's bottom edge is clipped (inline clip-path)
   and the next section slides up underneath it. */
.section.has-divider {
  padding-bottom: calc(var(--mpb, var(--pb, 0px)) + var(--divh));
  margin-bottom: calc(-1 * var(--divh));
}
@media (min-width: 768px) {
  .section.has-divider { padding-bottom: calc(var(--pb, 0px) + var(--divh)); }
}
.divider-stroke {
  position: absolute; left: 0; right: 0; bottom: 0;
  width: 100%; height: var(--divh);
  overflow: visible; pointer-events: none;
}
.divider-stroke polyline { fill: none; stroke: var(--navy); stroke-width: 12px; }

/* ---------- Block grid (Squarespace "fluid engine") ---------- */
.fe {
  --gutter: calc(6vw - var(--gap));
  --cell: calc((var(--max-width) - var(--gap) * 7) / 8);
  display: grid;
  width: 100%;
  column-gap: var(--gap);
  row-gap: var(--rg, var(--gap));
  grid-template-columns: minmax(var(--gutter), 1fr) repeat(8, minmax(0, var(--cell))) minmax(var(--gutter), 1fr);
  grid-template-rows: repeat(var(--mr), minmax(24px, auto));
}
@media (min-width: 768px) {
  .fe {
    --gutter: calc(3vw - var(--gap));
    --cell: calc((var(--max-width) - var(--gap) * 23) / 24);
    --cw: min(var(--max-width), 94vw);
    grid-template-columns: minmax(var(--gutter), 1fr) repeat(24, minmax(0, var(--cell))) minmax(var(--gutter), 1fr);
    grid-template-rows: repeat(var(--dr), minmax(calc(var(--cw) * var(--rs, 0.0215)), auto));
  }
}

.blk {
  grid-area: var(--m);
  z-index: var(--z, 0);
  display: flex;
  flex-direction: column;
  justify-content: var(--mv, flex-start);
  min-width: 0;
}
@media (min-width: 768px) {
  .blk { grid-area: var(--d); justify-content: var(--dv, flex-start); }
}
.rte > :first-child { margin-top: 0; }
.rte > :last-child { margin-bottom: 0; }

.blk-button { align-items: flex-start; }
.blk-button.btn-center { align-items: center; }
.blk-button.btn-right { align-items: flex-end; }
.btn-stretch { width: 100%; }

.blk-image figure { margin: 0; flex: 1; position: relative; min-height: 100%; }
.blk-image figure img, .blk-image figure a { position: absolute; inset: 0; width: 100%; height: 100%; }
.blk-image figure.fit-contain img { object-fit: contain; }
.blk-image figcaption { font-size: .9rem; margin-top: .5rem; }
.shape-eight-sided-shield {
  clip-path: polygon(50% 0, 95.7% 6.5%, 100% 50%, 95.7% 93.5%, 50% 100%, 4.3% 93.5%, 0 50%, 4.3% 6.5%);
}
.shape-wide-eight-sided-shield {
  clip-path: polygon(50% 0, 93.5% 6.5%, 100% 50%, 93.5% 93.5%, 50% 100%, 6.5% 93.5%, 0 50%, 6.5% 6.5%);
}

/* ---------- List sections (cards / image grids) ---------- */
.list-title, .list, .list-button {
  width: min(var(--max-width), 100% - 12vw);
  margin-left: auto; margin-right: auto;
}
.list-title h2 { margin: 0 0 40px; }
.list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  list-style: none;
  padding: 0;
  margin-top: 0; margin-bottom: 0;
}
.list.list-full { width: calc(100% - 12vw); }
@media (min-width: 768px) {
  .list-title, .list, .list-button { width: min(var(--max-width), 100% - 6vw); }
  .list.list-full { width: calc(100% - 6vw); }
  .list { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 60px; }
}
.list-item { display: flex; flex-direction: column; }
.list-media { aspect-ratio: var(--ar); overflow: hidden; margin-bottom: 4%; }
.list-media img { width: 100%; height: 100%; object-fit: cover; }
.list-item-title { font-size: calc((var(--tfs) - 1) * var(--F) + 1rem); line-height: 1.3; margin: 0 0 1%; }
.list-item-body { font-size: 1rem; line-height: 1.8; margin-bottom: 4%; }
@media (min-width: 768px) { .list-item-body { font-size: calc(var(--bfs) * .9944); } }
.list-item-body p { margin: 1rem 0; }
.list-item-body p:first-child { margin-top: 0; }
.list-item-body p:last-child { margin-bottom: 0; }
.list-item .btn { align-self: flex-start; font-size: .8rem; min-height: 0; padding: 1.2rem 2rem; margin-top: auto; }
.list-cards .list-item { background: var(--peach); padding: 20px; }
.list-cards .list-item > * { width: 75%; margin-left: auto; margin-right: auto; }
.list-cards .list-item-title { margin-bottom: 4%; }
.list-cards .list-item-body { margin-bottom: 8%; }
.list-button { text-align: center; margin-top: 40px; }
@media (min-width: 768px) { .list-button { margin-top: 70px; } }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; color: #000;
  transition: background-color .25s ease, box-shadow .25s ease, color .25s ease;
}
.site-header.is-overlay { color: #fff; }
/* Sticky header: once the page scrolls, give it a solid background */
.site-header.is-scrolled { background: #fff; color: #000; box-shadow: 0 2px 12px rgba(0, 0, 0, .08); }
.site-header.is-scrolled .header-inner { height: calc(var(--header-h) * .7); }
.site-header.is-scrolled .header-logo img { height: 48px; }
.site-header.is-scrolled .header-btn { --btn-bg: var(--navy); --btn-fg: #fff; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.site-header.is-scrolled .nav-dropdown { background: #fff; padding: .5rem 1rem; box-shadow: 0 6px 12px rgba(0, 0, 0, .08); }
@media (min-width: 1024px) { .site-header.is-scrolled .header-logo img { height: 64px; } }
.header-inner, .header-logo img { transition: height .25s ease; }
html { scroll-padding-top: 110px; }
.header-inner {
  display: flex; align-items: center; gap: 2rem;
  width: min(var(--max-width), 100% - 12vw);
  margin: 0 auto;
  height: var(--header-h);
}
@media (min-width: 768px) {
  .header-inner { width: min(var(--max-width), 100% - 6vw); }
}
.header-logo img { height: 62px; width: auto; }
@media (min-width: 1024px) { .header-logo img { height: 90px; } }
.header-nav { margin-left: auto; display: none; }
.header-nav > ul { display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-item > a {
  display: block; font-weight: 600; font-size: 1rem; line-height: 1.3;
  text-decoration: none; padding: .2rem 0; border-bottom: 1px solid transparent;
}
.nav-item.is-active > a, .nav-item > a:hover { border-bottom-color: currentColor; }
.nav-dropdown {
  position: absolute; right: 0; top: 100%;
  min-width: 200px; margin: 0; padding: .5rem 0;
  list-style: none; text-align: right;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.nav-item.has-children:hover .nav-dropdown,
.nav-item.has-children:focus-within .nav-dropdown { opacity: 1; visibility: visible; transform: none; }
.nav-dropdown a {
  display: inline-block; font-weight: 600; font-size: 1rem; line-height: 1.3;
  padding: .1rem 0; text-decoration: none; white-space: nowrap;
}
.nav-dropdown a:hover, .nav-dropdown a[aria-current] { text-decoration: underline; }
.header-btn { display: none; font-size: .895rem; font-weight: 500; letter-spacing: .02em; text-transform: none; padding: 1.5rem 2.2rem; }
.is-overlay .header-btn { --btn-bg: #fff; --btn-fg: #000; }

@media (min-width: 1024px) {
  .header-nav, .header-btn { display: block; }
  .header-btn { display: inline-flex; }
  .burger { display: none !important; }
}

.burger {
  margin-left: auto; width: 44px; height: 44px;
  display: flex; flex-direction: column; justify-content: center; gap: 9px;
  background: none; border: 0; padding: 6px; cursor: pointer; color: inherit;
}
.burger span { display: block; height: 1px; background: currentColor; }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 100; background: #fff; color: #000;
  display: flex; flex-direction: column;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu-top {
  display: flex; align-items: center; justify-content: space-between;
  width: calc(100% - 12vw); margin: 0 auto; height: var(--header-h);
}
.mobile-close { background: none; border: 0; font-size: 2.6rem; line-height: 1; font-weight: 200; cursor: pointer; padding: 0 .4rem; }
.mobile-panels { flex: 1; position: relative; overflow: hidden; }
.mobile-panel {
  position: absolute; inset: 0; list-style: none; margin: 0; padding: 0;
  display: none; flex-direction: column; justify-content: center; align-items: center; gap: .5rem;
}
.mobile-panel.is-current { display: flex; }
.mobile-panel a, .mobile-panel button {
  font: 600 1.9rem/1.5 var(--font); color: #000; text-decoration: none;
  background: none; border: 0; cursor: pointer; padding: 0;
}
.mobile-panel .chev { font-weight: 300; margin-left: .3rem; }
.mobile-panel .mobile-back .chev { margin: 0 .3rem 0 0; }
.mobile-menu-cta { text-align: center; padding: 2rem 6vw 2.5rem; }
.mobile-menu-cta .btn { font-size: 1rem; font-weight: 500; letter-spacing: .02em; text-transform: none; padding: 1.4rem 2.2rem; }
body.menu-open { overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer .section { min-height: 0; }

/* ---------- Forms ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.contact-form { display: grid; gap: 1.4rem; width: 100%; }
.contact-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.contact-form legend { font-size: 1rem; padding: 0; margin-bottom: .5rem; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-form label { display: flex; flex-direction: column; gap: .3rem; }
.contact-form .lbl { font-size: 1rem; line-height: 1.3; }
.contact-form .lbl-lg { font-size: 1.3rem; }
.contact-form .req { color: #5e5e5e; font-size: 1.3rem; margin-left: .3rem; }
.contact-form input, .contact-form textarea, .donate-select select {
  font: 300 1rem/1.8 var(--font); color: #000; background: var(--peach);
  border: 2px solid #706a64; border-radius: 29px; padding: 10px 20px; width: 100%;
}
.contact-form textarea { resize: vertical; min-height: 100px; }
.contact-form .btn { padding: 1.5rem 2.2rem; }
.form-note { margin: 0; font-size: .9rem; }

/* ---------- Donation box ---------- */
.donate-box { display: grid; gap: 1.1rem; width: 100%; font-size: 1.3rem; }
.donate-options { border: 0; margin: 0; padding: 0; display: grid; gap: 1.1rem; min-width: 0; }
.donate-option { display: flex; align-items: center; gap: .8rem; cursor: pointer; line-height: 1.8; }
.donate-option input, .donate-fee input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.donate-option .radio {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid #706a64; background: var(--peach); display: grid; place-items: center;
}
.donate-option input:checked + .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #000; }
.donate-option input:focus-visible + .radio, .donate-fee input:focus-visible + .check { outline: 2px solid var(--rust); outline-offset: 2px; }
.donate-custom { display: flex; flex-direction: column; font-size: 1rem; gap: .3rem; }
.donate-custom input { font: 300 1rem var(--font); background: var(--peach); border: 2px solid #706a64; border-radius: 29px; padding: 10px 20px; }
.donate-select { position: relative; }
.donate-select select { appearance: none; -webkit-appearance: none; font-size: 1.3rem; padding: 14px 56px 14px 20px; cursor: pointer; }
.donate-select::after {
  content: ""; position: absolute; right: 26px; top: 50%; width: 11px; height: 11px;
  border: solid #000; border-width: 0 2px 2px 0; transform: translateY(-75%) rotate(45deg); pointer-events: none;
}
.donate-fee { display: flex; align-items: center; gap: .8rem; cursor: pointer; }
.donate-fee .check { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #706a64; background: var(--peach); display: grid; place-items: center; }
.donate-fee input:checked + .check::after { content: ""; width: 10px; height: 6px; border: solid #000; border-width: 0 0 2px 2px; transform: translateY(-2px) rotate(-45deg); }
.donate-line { display: flex; justify-content: space-between; font-size: .9rem; line-height: 1.4; }
.donate-fee-line { margin-bottom: -1rem; }
.donate-total { font-weight: 600; font-size: 1rem; }
.donate-box .btn { justify-self: start; padding: 1.5rem 2.2rem; }
.donate-card { background: #fff; border: 6px solid var(--navy); border-radius: 20px; padding: 2.5rem 1.6rem; font-size: 1rem; color: #000; }
.donate-card .donate-select select { font-size: 1rem; }

/* ---------- Standard page title band ---------- */
.section.page-title { --pt: 3.3vmax; --pb: 1.5vmax; min-height: 0; }
.page-title-inner { width: min(var(--max-width), 100% - 12vw); margin: 0 auto; }
@media (min-width: 768px) { .page-title-inner { width: min(var(--max-width), 100% - 6vw); } }
.page-title h1 { margin: 0; }
.page-title-intro { margin: .75rem 0 0; max-width: 46rem; }

/* ---------- Simple content layouts (for text-led pages) ---------- */
.container { width: min(var(--max-width), 100% - 12vw); margin: 0 auto; }
@media (min-width: 768px) { .container { width: min(var(--max-width), 100% - 6vw); } }
.prose { max-width: 46rem; }
.prose.center { margin-left: auto; margin-right: auto; }
.split { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 900px) {
  .split { grid-template-columns: 5fr 6fr; gap: 6%; }
}
.split-photo { margin: 0; }
.split-photo img { width: 100%; max-height: 640px; object-fit: cover; }
.donate-col { max-width: 30rem; }
.donate-col > p { margin-top: 0; }
.donate-col a:not(.btn) { color: var(--navy); text-underline-offset: .2em; }
@media (min-width: 900px) { .split-donate { grid-template-columns: 5fr 6fr; } }
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 1.8rem; margin: .5rem 0; }
.checklist li::before {
  content: ""; position: absolute; left: .2rem; top: .45em; width: .45rem; height: .8rem;
  border: solid var(--navy); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* Option cards (Support Your Library) */
.option-grid { list-style: none; padding: 0; margin-top: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.option-card { background: var(--peach); padding: 2rem 1.75rem; display: flex; flex-direction: column; align-items: flex-start; }
.option-card h3 { margin: 0 0 .5rem; font-size: var(--fs-h4); }
.option-card p { margin: 0 0 1.5rem; }
.option-card .btn { margin-top: auto; font-size: .8rem; min-height: 0; padding: 1rem 1.6rem; }

/* Newsletter */
.news-story + .news-story { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid #e3ddd6; }
.news-story h2 { font-size: var(--fs-h3); }
.news-photo { margin: 2rem 0 0; }
.news-photo img { width: 100%; height: auto; }
.news-photos { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.news-photos .news-photo { margin-top: 2rem; }
.news-photos .news-photo img { aspect-ratio: 4 / 3; object-fit: cover; }

/* Our Team */
.letter h2 { text-align: center; }
.chair-card { display: flex; align-items: center; gap: 1.25rem; margin: 0 0 2rem; }
.chair-card img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex: none; }
.chair-card p { margin: 0; line-height: 1.6; }
.muted { color: #5c5c5c; font-size: .9rem; }
.signature { line-height: 1.6; }
.board { position: relative; }
.board h2 { text-align: center; }
.board-cols { display: grid; gap: 2rem 4rem; max-width: 52rem; margin: 2rem auto 0; }
@media (min-width: 700px) { .board-cols { grid-template-columns: 1fr 1fr; } }
.board-cols h3 { margin-top: 0; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { margin: 0 0 .65rem; line-height: 1.5; }
.officers .role { display: block; font-weight: 600; font-size: .85rem; letter-spacing: .02em; }
.board-cta { text-align: center; margin: 3rem 0 0; }
.split-photo-right { align-items: center; }
@media (min-width: 900px) { .split-photo-right { grid-template-columns: 6fr 5fr; } }
.shape-photo { margin: 0; aspect-ratio: 1 / 1; }
.shape-photo img { width: 100%; height: 100%; object-fit: cover; }
.small-print h2 { font-size: var(--fs-h4); }
.small-print p { font-size: .9rem; margin: .6rem 0; }
.small-print a { overflow-wrap: anywhere; }
.dues { list-style: none; padding: 0; margin: 0 0 1.5rem; max-width: 26rem; }
.dues li { display: flex; justify-content: space-between; padding: .6rem 0; border-bottom: 1px solid #e3ddd6; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.rte .btn { color: var(--btn-fg, #fff); text-decoration: none; }

/* Heading scale on text-led pages: one step down so headings sit comfortably with body copy */
.container h2 { font-size: var(--fs-h3); line-height: 1.3; margin: 2.5rem 0 1rem; }
.container h3 { font-size: calc(.5 * var(--F) + 1rem); line-height: 1.35; margin: 2rem 0 .75rem; }
.container .rte > :first-child, .container > h2:first-child { margin-top: 0; }
.option-card h3 { font-size: var(--fs-h4); margin: 0 0 .5rem; }
.board-cols h3 { margin-top: 0; }
.page-title h1 { font-size: var(--fs-h1); }
/* When the last section has an angled bottom edge, give the footer room for it */
main:has(> .section.has-divider:last-child) + .site-footer { padding-top: calc(3.3vmax + 6vw); }

/* ---------- Accessibility helpers & heading-style utilities ---------- */
.as-h1 { font-size: var(--fs-h1); line-height: 1.232; }
.as-h3 { font-size: var(--fs-h3); line-height: 1.333; }
.container h2.h-sm { font-size: calc(.5 * var(--F) + 1rem); line-height: 1.35; margin: 2rem 0 .75rem; }
.stat-number { font-size: var(--fs-h1); font-weight: 500; line-height: 1.232; margin: 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #fff; padding: 3.3vmax 0 2rem; --link: #fff; }
.site-footer a { color: #fff; text-decoration: underline; text-underline-offset: .2em; }
.site-footer a:hover { opacity: .8; }
.site-footer p { margin: 0 0 1rem; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr; } }
.footer-title { font-weight: 500; text-transform: uppercase; letter-spacing: .02em; font-size: var(--fs-h4); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin: 0 0 .35rem; }
.footer-gap { margin-top: 1.25rem !important; }
.footer-legal { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .25); }
.footer-legal p { font-size: .8rem; line-height: 1.6; margin: 0; max-width: 60rem; }

/* ---------- Welcome "Support your library" pop-up ---------- */
.support-popup {
  width: min(640px, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  border: 0; border-radius: 20px; padding: 2.5rem 2rem 1.5rem;
  background: #fff; color: #000;
  box-shadow: 0 20px 60px rgba(26, 19, 65, .35);
  overflow: auto;
}
.support-popup::backdrop { background: rgba(26, 19, 65, .55); }
.support-popup[open] { animation: popup-in .25s ease-out; }
@keyframes popup-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.support-popup-close-form { position: absolute; top: .75rem; right: .75rem; margin: 0; }
.support-popup-close {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent;
  font-size: 2rem; line-height: 1; cursor: pointer; color: #000;
}
.support-popup-close:hover { background: var(--peach); }
.support-popup-eyebrow { margin: 0 0 .25rem; font-size: .85rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--rust); }
.support-popup h2 { font-size: var(--fs-h2); margin: 0 0 .5rem; }
.support-popup-intro { margin: 0 0 1.5rem; }
.support-popup-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.support-popup-list a {
  display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; align-items: center;
  padding: 1rem 1.25rem; background: var(--peach); color: #000; text-decoration: none;
  border-radius: 12px; transition: background-color .15s ease;
}
.support-popup-list a:hover { background: #f8e2d1; }
.sp-title { font-weight: 600; grid-column: 1; }
.sp-text { font-size: .9rem; line-height: 1.5; grid-column: 1; }
.sp-arrow { grid-column: 2; grid-row: 1 / span 2; font-size: 2rem; line-height: 1; color: var(--navy); }
.support-popup-footer { margin: 1.25rem 0 0; text-align: center; }
.support-popup-later { background: none; border: 0; font: 400 .95rem var(--font); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; padding: .5rem; color: #000; }
@media (max-width: 520px) {
  .support-popup { padding: 2.25rem 1.25rem 1rem; }
  .sp-text { display: none; }
}
.support-popup h2:focus { outline: none; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form { position: relative; }
.form-note { padding: .9rem 1.1rem; background: var(--peach); border-left: 4px solid var(--navy); font-size: 1rem; }
.form-note.is-error { border-left-color: var(--rust); }
.form-note:focus { outline: none; }

/* Newsletter sign-up */
.newsletter-jump { margin-top: .5rem; }
.newsletter-jump .btn { font-size: .85rem; min-height: 0; padding: 1rem 1.6rem; }
.newsletter-signup { display: grid; gap: 1.5rem; }
.newsletter-signup h2 { margin-top: 0; }
.newsletter-signup .rte p { margin-bottom: 0; }
.newsletter-fields { display: grid; gap: 1rem; align-items: end; }
.newsletter-fields .lbl { font-size: 1rem; }
.newsletter-form input { background: #fff; }
@media (min-width: 700px) { .newsletter-fields { grid-template-columns: 1fr 1fr; } .nl-email { grid-column: 1 / -1; } }
@media (min-width: 1024px) {
  .newsletter-fields { grid-template-columns: 1fr 1fr 1.5fr auto; }
  .nl-email { grid-column: auto; }
}
.nl-submit .btn { width: 100%; }
html { scroll-behavior: smooth; }
.newsletter-form .req { font-size: 1rem; }
