/* Layout: one centered column (max 1120px), full-width tinted bands for rhythm, photo-forward cards.
   Palette comes from the FOSCAS logo: slate blue dog, sage green cat, plus a sunflower gold for "give" actions. */
:root {
  --bg: #f7f9f8;
  --surface: #ffffff;
  --band: #e9f0ec;
  --ink: #1f3446;
  --muted: #536879;
  --line: #d5e0dc;
  --blue: #497290;
  --blue-deep: #2f5370;
  --sage: #7f9f69;
  --sage-soft: #dce8d3;
  --gold: #f2b632;
  --gold-ink: #2a2105;
  --todo-bg: #fff6d9;
  --todo-line: #d9a21b;
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Helvetica Neue", Arial, system-ui, sans-serif;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111a21; --surface: #18242d; --band: #16232b; --ink: #e6eef2; --muted: #a3b5c2;
    --line: #2a3b47; --blue: #8db4d2; --blue-deep: #b5d0e4; --sage: #a9c793; --sage-soft: #24342a;
    --gold: #f5c24f; --gold-ink: #241b02; --todo-bg: #3a2f10; --todo-line: #e0b030;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111a21; --surface: #18242d; --band: #16232b; --ink: #e6eef2; --muted: #a3b5c2;
  --line: #2a3b47; --blue: #8db4d2; --blue-deep: #b5d0e4; --sage: #a9c793; --sage-soft: #24342a;
  --gold: #f5c24f; --gold-ink: #241b02; --todo-bg: #3a2f10; --todo-line: #e0b030;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-deep); text-underline-offset: 3px; }
a:hover { color: var(--blue); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; text-wrap: balance; margin: 0; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; font-weight: 650; }
p { margin: 0; }
.wrap {
  max-width: 1120px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.prose { max-width: 68ch; display: grid; gap: 1.1rem; }
.prose ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .4rem; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sage); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: .92rem; }

/* Header */
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 16px; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 1rem; padding-block: .6rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-badge { width: 52px; height: 52px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; border: 1px solid var(--line); overflow: hidden; }
.brand-badge img { width: 44px; }
.brand-text { display: grid; line-height: 1.1; min-width: 0; }
.brand-text strong { font-family: var(--font-display); font-size: 1.05rem; }
.brand-text span { font-size: .78rem; color: var(--muted); letter-spacing: .04em; }
.nav { margin-left: auto; display: flex; align-items: center; gap: .2rem; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 550; padding: .45rem .7rem; border-radius: 999px; font-size: .97rem; }
.nav a:hover { background: var(--band); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--sage-soft); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; padding: .45rem .7rem; font: inherit; color: var(--ink); cursor: pointer; }
@media (max-width: 1020px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: .8rem; }
  .nav.open { display: flex; }
  .header-row { flex-wrap: wrap; }
  .brand-text span { display: none; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.3rem; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; font-size: 1rem; cursor: pointer; font-family: inherit; }
.btn-give { background: var(--gold); color: var(--gold-ink); }
.btn-give:hover { color: var(--gold-ink); filter: brightness(1.05); }
.btn-line { border-color: var(--blue); color: var(--blue-deep); background: transparent; }
.btn-line:hover { background: var(--band); }
.nav .btn-give { padding: .5rem 1rem; margin-left: .3rem; }
.nav .btn-give:hover { background: var(--gold); }
.nav .btn-give { white-space: nowrap; }
.nav a.btn-give, .nav a.btn-give:hover { color: var(--gold-ink); background: var(--gold); }
.callout { align-content: start; }
.callout .actions { align-items: center; }
.nav a.nav-help { background: var(--sage-soft); color: var(--blue-deep); box-shadow: inset 0 0 0 2px var(--sage); font-weight: 700; }
.nav a.nav-help:hover, .nav a.nav-help[aria-current="page"] { background: var(--sage); color: #12210c; }
@media (min-width: 1021px) and (max-width: 1240px) {
  .brand-text span { display: none; }
  .nav { flex-wrap: nowrap; }
  .nav a, .nav .dd summary { padding: .45rem .45rem; font-size: .9rem; white-space: nowrap; }
  .brand-text strong { white-space: nowrap; }
  .nav .btn-give { padding: .5rem .9rem; }
}
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Sections */
section { padding-block: clamp(3rem, 6vw, 5rem); }
.band { background: var(--band); }
.section-head { display: grid; gap: .6rem; margin-bottom: 2rem; max-width: 70ch; }
.page-hero { padding-block: clamp(2.5rem, 5vw, 4rem) 1rem; }
.page-hero .wrap { display: grid; gap: 1rem; }

/* Home hero */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-copy { display: grid; gap: 1.3rem; min-width: 0; }
.hero-copy h1 em { font-style: normal; color: var(--blue); }
.mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: .8rem; aspect-ratio: 1 / 1; max-width: 100%; min-width: 0; }
.mosaic figure { margin: 0; border-radius: var(--radius); overflow: hidden; position: relative; background: var(--band); }
.mosaic figure:first-child { grid-row: span 2; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.mosaic figcaption { position: absolute; left: .6rem; bottom: .6rem; background: var(--surface); color: var(--ink); font-size: .8rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } }

/* Facts strip */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fact { background: var(--surface); padding: 1.3rem 1.2rem; display: grid; gap: .2rem; align-content: start; }
.fact b { font-family: var(--font-display); font-size: 1.7rem; color: var(--blue-deep); font-variant-numeric: tabular-nums; line-height: 1.1; }
.fact span { color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr 1fr; } }

/* Cards */
.grid { display: grid; gap: 1.2rem; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.card-body { padding: 1.2rem 1.3rem 1.4rem; display: grid; gap: .6rem; flex: 1; align-content: start; }
.card-img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; object-position: 50% 25%; }
.card .more { margin-top: auto; font-weight: 700; text-decoration: none; }
.card .more::after { content: " →"; }
a.card { text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(31, 52, 70, .45); color: inherit; }
.tag { justify-self: start; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sage); }

/* Donation ladder */
.ladder { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem; }
.ladder li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; display: grid; gap: .15rem; }
.ladder .amt { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--blue-deep); font-variant-numeric: tabular-nums; }
.ladder li.big { background: var(--sage-soft); border-color: transparent; }

/* Split feature */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.split > * { min-width: 0; }
.split img { border-radius: var(--radius); width: 100%; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* Stories gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.gallery figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery img { aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 22%; width: 100%; }
.gallery figcaption { padding: .6rem .9rem; font-family: var(--font-display); font-weight: 650; }
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; min-width: 0; }
.scroller > * { scroll-snap-align: start; }

/* Quotes */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
blockquote { margin: 0; background: var(--surface); border-left: 4px solid var(--sage); padding: 1.2rem 1.4rem; border-radius: 0 var(--radius) var(--radius) 0; display: grid; gap: .5rem; }
blockquote p { font-size: 1.1rem; }
blockquote cite { font-style: normal; color: var(--muted); font-size: .9rem; }

/* Board */
.people { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; display: grid; gap: .5rem; align-content: start; }
.person .role { color: var(--sage); font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 560px; }
th, td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-display); font-size: .9rem; letter-spacing: .04em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }

/* News */
.post { display: grid; grid-template-columns: 260px 1fr; gap: 1.5rem; padding-block: 2rem; border-top: 1px solid var(--line); }
.post:first-of-type { border-top: 0; }
.post img { border-radius: var(--radius); width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 30%; }
.post > * { min-width: 0; }
.post time { color: var(--muted); font-size: .9rem; }
@media (max-width: 700px) { .post { grid-template-columns: 1fr; } .post img { max-width: 320px; } }

/* Notes and placeholders */
.callout { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; display: grid; gap: .5rem; }
.todo { background: var(--todo-bg); border: 2px dashed var(--todo-line); border-radius: 10px; padding: .8rem 1rem; font-size: .95rem; }
.todo::before { content: "Placeholder · "; font-weight: 800; }

/* Forms */
form { display: grid; gap: 1rem; }
label { font-weight: 650; display: grid; gap: .35rem; }
input, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: .75rem .9rem; width: 100%; }
input:focus, textarea:focus { border-color: var(--blue); outline: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-status { font-weight: 650; }

/* Footer */
.site-footer { background: #1d3142; color: #dbe6ee; padding-block: 3rem 2rem; margin-top: 0; }
.site-footer a { color: #ffffff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid > * { min-width: 0; display: grid; gap: .4rem; align-content: start; }
.footer-grid h4 { color: #ffffff; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .3rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.footer-base { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.15); font-size: .88rem; color: #a9bccb; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* Success story pop-up */
.story-open { all: unset; display: block; cursor: pointer; width: 100%; }
.story-open:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: var(--radius); }
.gallery figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.story-hint { font-family: var(--font-body); font-weight: 600; font-size: .8rem; color: var(--muted); }
.story-open:hover img { filter: brightness(1.05); }
.story-dialog { border: 0; padding: 0; border-radius: var(--radius); background: var(--surface); color: var(--ink); width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.story-dialog::backdrop { background: rgba(10, 20, 28, .7); }
.story-dialog img { width: 100%; height: auto; max-height: 58vh; object-fit: contain; background: #000; }
.story-text { padding: 1.1rem 1.4rem 1.5rem; display: grid; gap: .5rem; }
.story-close-row { position: sticky; top: 0; display: flex; justify-content: flex-end; height: 0; z-index: 1; }
.story-close { margin: .6rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.25); }

/* Clickable donation levels */
.ladder li:has(.level) { padding: 0; }
.ladder .level { display: grid; gap: .15rem; padding: 1rem 1.1rem; color: inherit; text-decoration: none; border-radius: var(--radius); height: 100%; }
.ladder .level:hover { background: var(--band); color: inherit; }
.ladder li.big .level:hover { background: transparent; }
.level-cta { font-weight: 700; font-size: .85rem; color: var(--blue-deep); margin-top: .35rem; }
.level-cta::after { content: " →"; }

/* Dropdown menus */
.dd { position: relative; }
.dd summary { list-style: none; cursor: pointer; font-weight: 550; padding: .45rem .7rem; border-radius: 999px; font-size: .97rem; color: var(--ink); }
.dd summary::-webkit-details-marker { display: none; }
.dd summary::after { content: ""; display: inline-block; width: .4em; height: .4em; margin-left: .45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-.2em) rotate(45deg); }
.dd[open] summary::after { transform: translateY(.05em) rotate(-135deg); }
.dd summary:hover, .dd summary.active { background: var(--band); }
.dd-give summary { background: var(--gold); color: var(--gold-ink); font-weight: 700; margin-left: .3rem; padding: .5rem 1rem; }
.dd-give summary:hover, .dd-give summary.active { background: var(--gold); filter: brightness(1.05); }
.dd-menu { position: absolute; right: 0; top: calc(100% + .4rem); min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px -12px rgba(0,0,0,.35); padding: .4rem; display: grid; z-index: 30; }
.dd-menu a { padding: .55rem .8rem; border-radius: 8px; }
@media (max-width: 900px) {
  .dd-menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 1rem; min-width: 0; background: transparent; }
  .dd-give summary { margin: .3rem 0 0; display: inline-block; }
}

.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }

/* "We are not the shelter" banner */
.notice { background: var(--blue-deep); color: #fff; padding-block: 1.25rem; }
.notice a { color: #fff; font-weight: 700; }
.notice a:hover { color: var(--gold); }
.notice h2 { font-size: clamp(1.15rem, 2.2vw, 1.45rem); margin: 0 0 .4rem; color: #fff; line-height: 1.25; }
.notice p { margin: 0; opacity: .95; }
.notice-grid { display: grid; gap: 1rem 2rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .notice-grid { grid-template-columns: 1.6fr 1fr; } }
.notice-contact { list-style: none; margin: 0; padding: 1rem 1.1rem; background: rgba(255,255,255,.1); border-radius: 12px; display: grid; gap: .45rem; overflow-wrap: anywhere; }
.notice-contact span { display: inline-block; min-width: 3.4rem; font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .notice { background: #23465f; } }
:root[data-theme="dark"] .notice { background: #23465f; }

/* Giving Tuesday strip on Home */
.gt-strip { display: block; background: var(--gold); color: var(--gold-ink); text-decoration: none; }
.gt-strip:hover { color: var(--gold-ink); filter: brightness(1.04); }
.gt-strip-row { display: flex; align-items: center; gap: .9rem; padding-block: .7rem; flex-wrap: wrap; }
.gt-strip img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; border: 2px solid #fff; }
.gt-strip span { flex: 1 1 260px; }
.gt-strip .gt-cta { flex: 0 0 auto; font-weight: 800; background: var(--gold-ink); color: var(--gold); padding: .5rem 1rem; border-radius: 999px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Clickable success-story cards */
.story-card { font: inherit; text-align: left; color: inherit; cursor: pointer; padding: 0; width: 100%; display: flex; flex-direction: column; }
.story-card .card-img { aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 30%; width: 100%; }
.story-card .card-body { display: grid; gap: .4rem; }

/* In loving memory */
.memorial { background: var(--sage-soft); }
.memorial-list { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.memorial-item { margin: 0; display: grid; grid-template-columns: 96px 1fr; gap: 1rem; align-items: start; }
.memorial-item img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; filter: saturate(.85); }
.memorial-item h3 { margin: .25rem 0 .35rem; }
.memorial-item p { margin: 0; font-size: .95rem; color: var(--muted, inherit); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .memorial { background: rgba(255,255,255,.04); } }

/* Story photo thumbnails (multi-photo stories) */
.story-thumbs { display: flex; gap: .5rem; padding: .75rem 1.25rem 0; flex-wrap: wrap; }
.story-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 8px; background: none; cursor: pointer; overflow: hidden; }
.story-thumbs button[aria-current="true"] { border-color: var(--sage); }
.story-dialog .story-thumbs img { width: 64px; height: 64px; max-height: none; object-fit: cover; display: block; background: none; }

/* Petfinder pet list widget */
.pet-widget { width: 100%; justify-self: stretch; min-height: 200px; }
.seniors { background: var(--sage-soft); }
/* Petfinder's widget assumes a light page: keep its text dark and its inputs light, even in dark mode */
.pet-widget { color: #1f2a33; color-scheme: light; }
