/* ============================================================
  CAREMAP MORRIS — Main Stylesheet
  Warm editorial aesthetic / community newspaper
============================================================ */

/* ============================================================
  DESIGN TOKENS
============================================================ */
:root {
  --cream:      #F7F2EA;
  --paper:      #EDE7D9;
  --ink:        #1A1410;
  --bark:       #3D2B1F;
  --rust:       #C04B20;
  --rust-lt:    #E06840;
  --sage:       #4A6741;
  --sage-lt:    #6A8F66;
  --sand:       #B89A6A;
  --warm-gray:  #7A6F65;
  --border:     rgba(58,40,28,.15);
  --radius:     4px;

  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body:    'DM Sans', sans-serif;
  --ff-mono:    'DM Mono', monospace;

  --container:  1180px;
}

/* ============================================================
  RESET & BASE
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
img   { display: block; max-width: 100%; }
a     { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
ul    { list-style: none; }

body {
  font-family: var(--ff-body);
  font-size: clamp(15px, 1.1vw, 17px);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0,0,0,0); overflow: hidden; white-space: nowrap;
}

/* ============================================================
  SKIP LINK
============================================================ */
.skip-link {
  position: fixed; top: -100%; left: 1rem; z-index: 9999;
  background: var(--rust); color: #fff;
  padding: .5rem 1rem; border-radius: var(--radius);
  font-size: .875rem; font-weight: 500;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

/* ============================================================
  BUTTONS
============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .7rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--ff-body);
  font-size: .875rem; font-weight: 500;
  letter-spacing: .03em;
  border: 2px solid transparent;
  transition: all .22s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--rust); color: #fff; border-color: var(--rust);
}
.btn-primary:hover {
  background: var(--rust-lt); border-color: var(--rust-lt);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(192,75,32,.3);
}

.btn-secondary {
  background: transparent; color: var(--rust); border-color: var(--rust);
}
.btn-secondary:hover {
  background: var(--rust); color: #fff;
  transform: translateY(-1px);
}

.btn-sage {
  background: var(--sage); color: #fff; border-color: var(--sage);
}
.btn-sage:hover {
  background: var(--sage-lt); border-color: var(--sage-lt);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(74,103,65,.3);
}

.btn-outline-dark {
  background: transparent; color: var(--ink); border-color: var(--ink);
}
.btn-outline-dark:hover { background: var(--ink); color: var(--cream); }

.btn-ghost {
  background: transparent; color: var(--warm-gray); border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--warm-gray); color: var(--ink); }

/* ============================================================
  HEADER
============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--ink);
  border-bottom: 3px solid var(--rust);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: .85rem;
  gap: 1rem;
}

.brand {
  display: flex; align-items: center; gap: .6rem;
  color: var(--cream);
}
.brand-mark {
  width: 28px; height: 28px;
  background: var(--rust); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative;
}
.brand-mark::after {
  content: '';
  position: absolute; inset: 4px;
  border: 2px solid rgba(255,255,255,.5);
  border-radius: 50%;
}
.brand-text {
  font-family: var(--ff-display);
  font-size: 1.25rem; font-weight: 700;
  letter-spacing: -.01em; line-height: 1;
}

.primary-nav {
  display: flex; align-items: center; gap: .15rem;
  flex-wrap: wrap;
}
.primary-nav a {
  color: rgba(247,242,234,.75);
  font-size: .82rem; font-weight: 500;
  letter-spacing: .02em;
  padding: .4rem .75rem;
  border-radius: var(--radius);
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.primary-nav a:hover { background: rgba(255,255,255,.08); color: var(--cream); }
.primary-nav a.nav-cta {
  background: var(--rust); color: #fff; margin-left: .5rem;
}
.primary-nav a.nav-cta:hover { background: var(--rust-lt); }

/* Mobile nav button */
.mobile-nav-btn {
  display: none;
  background: none;
  border: 1.5px solid rgba(247,242,234,.25);
  color: var(--cream); border-radius: var(--radius);
  padding: .4rem .7rem;
  font-size: .8rem; letter-spacing: .04em;
  align-items: center; gap: .4rem;
}

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 300;
  background: var(--ink);
  padding: 2rem 1.5rem;
  display: flex; flex-direction: column; gap: 1.25rem;
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.mobile-menu.open { transform: none; }

.mobile-menu-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(247,242,234,.1);
}
.mobile-menu-brand {
  font-family: var(--ff-display);
  color: var(--cream); font-size: 1.1rem; font-weight: 700;
}
.mobile-menu-close {
  background: none; border: none;
  color: var(--cream); font-size: 1.4rem;
}
.mobile-menu a {
  font-size: 1.3rem;
  font-family: var(--ff-display);
  font-weight: 700;
  color: rgba(247,242,234,.75);
  padding-block: .4rem;
  display: block;
  transition: color .2s;
}
.mobile-menu a:hover { color: var(--cream); }

/* ============================================================
   MODAL — First-time popup
============================================================ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(26,20,16,.65);
  backdrop-filter: blur(4px);
  animation: fadein .3s ease;
}
.modal-backdrop[hidden] { display: none; }

.modal-wrap {
  position: fixed; inset: 0; z-index: 201;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  animation: slideup .35s cubic-bezier(.22,.68,0,1.2);
}
.modal-wrap[hidden] { display: none; }

.modal-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 680px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 64px rgba(26,20,16,.28);
}

.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 1.75rem 1.75rem 0;
  gap: 1rem;
}
.modal-head h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 900; line-height: 1.2;
  color: var(--bark);
}
.modal-dismiss {
  background: none; border: none;
  color: var(--warm-gray);
  font-size: 1.3rem; line-height: 1;
  padding: .25rem; margin-top: .1rem;
  flex-shrink: 0; transition: color .2s;
}
.modal-dismiss:hover { color: var(--ink); }

.modal-body { padding: 1.25rem 1.75rem 1.75rem; }

.modal-lead {
  font-size: 1.05rem; color: var(--bark);
  margin-bottom: 1.5rem; line-height: 1.5;
}

.modal-blocks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}
.modal-block {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}
.modal-block h3 {
  font-family: var(--ff-mono);
  font-size: .72rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--rust); margin-bottom: .6rem;
}
.modal-block ul { padding-left: 1rem; list-style: disc; }
.modal-block li {
  font-size: .875rem; color: var(--bark);
  margin-bottom: .35rem; line-height: 1.45;
}

.modal-actions {
  display: flex; gap: .75rem; flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.modal-urgent {
  font-size: .82rem; color: var(--warm-gray);
  background: var(--paper);
  border-left: 3px solid var(--rust);
  padding: .6rem .9rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.modal-urgent strong { color: var(--rust); }

/* ============================================================
   HERO
============================================================ */
.hero {
  background: var(--ink);
  position: relative; overflow: hidden;
  padding-block: clamp(4rem, 8vw, 7rem);
}
.hero::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 55%; height: 100%;
  background: repeating-linear-gradient(
    -60deg, transparent, transparent 38px,
    rgba(255,255,255,.025) 38px, rgba(255,255,255,.025) 39px
  );
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-eyebrow {
  font-family: var(--ff-mono);
  font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--rust);
  margin-bottom: 1.1rem;
  display: flex; align-items: center; gap: .5rem;
}
.hero-eyebrow::before {
  content: '';
  display: block; width: 28px; height: 2px;
  background: var(--rust);
}

.hero h1 {
  font-family: var(--ff-display);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 900; line-height: 1.1;
  color: var(--cream); letter-spacing: -.02em;
  margin-bottom: 1.2rem;
}
.hero h1 em { font-style: italic; color: var(--rust); }

.hero-sub {
  color: rgba(247,242,234,.6);
  font-size: clamp(.9rem, 1.3vw, 1.05rem);
  line-height: 1.65; max-width: 460px;
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex; gap: .75rem; flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

/* Search */
.hero-search { position: relative; max-width: 500px; }
.hero-search label {
  display: block;
  font-family: var(--ff-mono);
  font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(247,242,234,.5);
  margin-bottom: .5rem;
}
.hero-search-row {
  display: flex;
  background: rgba(247,242,234,.08);
  border: 1.5px solid rgba(247,242,234,.2);
  border-radius: var(--radius);
  overflow: hidden; transition: border-color .2s;
}
.hero-search-row:focus-within {
  border-color: var(--rust);
  background: rgba(247,242,234,.1);
}
.hero-search input {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  padding: .85rem 1rem;
  color: var(--cream);
  font-family: var(--ff-body); font-size: .95rem;
}
.hero-search input::placeholder { color: rgba(247,242,234,.35); }
.hero-search button {
  background: var(--rust); border: none; color: #fff;
  padding: .85rem 1.25rem;
  font-family: var(--ff-body); font-size: .875rem; font-weight: 500;
  letter-spacing: .04em; transition: background .2s;
}
.hero-search button:hover { background: var(--rust-lt); }
.hero-search-hint {
  font-size: .75rem;
  color: rgba(247,242,234,.35);
  margin-top: .5rem;
}

/* Hero panel — right side cards */
.hero-panel { display: flex; flex-direction: column; gap: 1rem; }

.hp-card {
  background: rgba(247,242,234,.05);
  border: 1px solid rgba(247,242,234,.1);
  border-radius: 8px; padding: 1.25rem 1.4rem;
  transition: background .25s, border-color .25s;
}
.hp-card:hover {
  background: rgba(247,242,234,.08);
  border-color: rgba(247,242,234,.2);
}
.hp-card-kicker {
  font-family: var(--ff-mono);
  font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: .4rem;
}
.hp-card-kicker.food   { color: #E8974E; }
.hp-card-kicker.home   { color: #7CB5B0; }
.hp-card-kicker.safety { color: var(--rust); }

.hp-card-name {
  font-family: var(--ff-display);
  font-size: 1rem; font-weight: 700;
  color: var(--cream); margin-bottom: .35rem; line-height: 1.3;
}
.hp-card-desc {
  font-size: .82rem;
  color: rgba(247,242,234,.55); line-height: 1.5;
}
.hp-card-tags {
  display: flex; gap: .4rem; flex-wrap: wrap;
  margin-top: .75rem;
}
.hp-tag {
  font-size: .7rem; padding: .2rem .55rem;
  border-radius: 2rem; font-weight: 500; letter-spacing: .03em;
}
.hp-tag.rust { background: rgba(192,75,32,.25);  color: #E87B56; }
.hp-tag.sage { background: rgba(74,103,65,.25);   color: #8DB888; }
.hp-tag.sand { background: rgba(184,154,106,.2);  color: #D4B98C; }

/* ============================================================
   STATS
============================================================ */
.stats-section {
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  padding-block: clamp(2.5rem, 4vw, 3.5rem);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0; text-align: center;
}

.stat-item {
  padding: 1.5rem 1rem;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }

.stat-number {
  font-family: var(--ff-display);
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 900; color: var(--rust);
  line-height: 1; margin-bottom: .35rem;
  display: flex; align-items: flex-end;
  justify-content: center; gap: .1em;
}
.stat-suffix { font-size: 55%; color: var(--sand); margin-bottom: .15em; }

.stat-label {
  font-size: .875rem; color: var(--warm-gray);
  max-width: 200px; margin-inline: auto; line-height: 1.4;
}

.stats-note {
  margin-top: 1.25rem; text-align: center;
  font-size: .78rem; color: var(--warm-gray);
}
.stats-note a { color: var(--rust); text-decoration: underline; }

/* ============================================================
   SECTION COMMON
============================================================ */
.section { padding-block: clamp(3.5rem, 6vw, 5.5rem); }

.section-label {
  font-family: var(--ff-mono);
  font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--rust);
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: .75rem;
}
.section-label::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border); max-width: 80px;
}

.section-title {
  font-family: var(--ff-display);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 900; line-height: 1.15;
  color: var(--bark); margin-bottom: .75rem;
  letter-spacing: -.01em;
}

.section-sub {
  font-size: 1rem; color: var(--warm-gray);
  max-width: 520px; line-height: 1.6;
  margin-bottom: 2.5rem;
}

/* ============================================================
   FEATURED RESOURCES
============================================================ */
.featured-section { background: var(--cream); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem; margin-bottom: 2.5rem;
}

.resource-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .25s, transform .25s;
}
.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(26,20,16,.1);
}

.card-top {
  background: var(--ink);
  padding: 1.25rem 1.4rem 1rem;
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: .75rem;
}

.card-category {
  font-family: var(--ff-mono);
  font-size: .65rem; letter-spacing: .1em;
  text-transform: uppercase; padding: .25rem .55rem;
  border-radius: 2rem; font-weight: 500;
}
.cat-food    { background: rgba(232,151,78,.2);  color: #E8974E; }
.cat-shelter { background: rgba(124,181,176,.2); color: #7CB5B0; }
.cat-housing { background: rgba(74,103,65,.25);  color: #8DB888; }

.card-bookmark {
  background: none; border: none;
  color: rgba(247,242,234,.3);
  font-size: 1.1rem; line-height: 1;
  padding: .15rem; transition: color .2s;
}
.card-bookmark:hover  { color: var(--rust); }
.card-bookmark.saved  { color: var(--rust); }

.card-body {
  padding: 1.25rem 1.4rem;
  flex: 1; display: flex; flex-direction: column;
}

.card-title {
  font-family: var(--ff-display);
  font-size: 1.15rem; font-weight: 700;
  color: var(--bark); margin-bottom: .25rem; line-height: 1.3;
}
.card-meta {
  font-size: .78rem; color: var(--warm-gray);
  margin-bottom: .75rem;
  display: flex; align-items: center; gap: .35rem;
}
.card-meta::before { content: '●'; color: var(--sage); font-size: .5rem; }

.card-text {
  font-size: .9rem; color: #5A4F45;
  line-height: 1.6; flex: 1; margin-bottom: 1rem;
}

.pill-row {
  display: flex; gap: .4rem; flex-wrap: wrap;
  margin-bottom: 1.1rem;
}
.pill {
  font-size: .7rem;
  background: rgba(58,40,28,.08);
  color: var(--bark);
  border: 1px solid var(--border);
  padding: .2rem .55rem;
  border-radius: 2rem; font-weight: 500;
}

.card-actions {
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--border);
  display: flex; gap: .5rem; flex-wrap: wrap;
}
.card-actions .btn {
  flex: 1; min-width: 0;
  justify-content: center;
  padding-block: .55rem; font-size: .8rem;
}

.section-foot { text-align: center; }

/* ============================================================
   GIVE BACK STRIP
============================================================ */
.give-back {
  background: var(--bark);
  padding-block: clamp(3rem, 5vw, 4.5rem);
  position: relative; overflow: hidden;
}
.give-back::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 28px,
    rgba(255,255,255,.02) 28px, rgba(255,255,255,.02) 29px
  );
  pointer-events: none;
}

.give-back-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  position: relative; z-index: 1;
}

.give-back .section-label          { color: #D4B98C; }
.give-back .section-label::after   { background: rgba(255,255,255,.12); }
.give-back .section-title          { color: var(--cream); }
.give-back .section-sub            { color: rgba(247,242,234,.65); max-width: 420px; }

.gb-ways { display: flex; flex-direction: column; gap: .75rem; }

.gb-way {
  display: flex; gap: 1rem; align-items: flex-start;
  background: rgba(247,242,234,.05);
  border: 1px solid rgba(247,242,234,.1);
  border-radius: 8px; padding: 1.1rem 1.25rem;
  transition: background .25s, border-color .25s;
}
.gb-way:hover {
  background: rgba(247,242,234,.08);
  border-color: rgba(247,242,234,.2);
}
.gb-icon { font-size: 1.4rem; line-height: 1; flex-shrink: 0; margin-top: .1rem; }

.gb-way-title {
  font-family: var(--ff-display);
  font-size: .95rem; font-weight: 700;
  color: var(--cream); margin-bottom: .2rem;
}
.gb-way-desc { font-size: .82rem; color: rgba(247,242,234,.55); line-height: 1.5; }

.gb-cta { margin-top: 1.5rem; display: flex; gap: .75rem; flex-wrap: wrap; }
.gb-cta .btn-ghost-light {
  background: transparent;
  border: 2px solid rgba(247,242,234,.25);
  color: rgba(247,242,234,.7);
  border-radius: var(--radius);
  padding: .7rem 1.4rem;
  font-size: .875rem; font-weight: 500;
  letter-spacing: .03em;
  display: inline-flex; align-items: center; gap: .4rem;
  transition: all .22s;
}
.gb-cta .btn-ghost-light:hover {
  border-color: rgba(247,242,234,.5); color: var(--cream);
}

/* ============================================================
   FOOTER
============================================================ */
.site-footer {
  background: #0F0C09;
  padding-top: clamp(3rem, 5vw, 4.5rem);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(247,242,234,.08);
}

.footer-brand {
  font-family: var(--ff-display);
  font-size: 1.5rem; font-weight: 900;
  color: var(--cream);
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: .75rem;
}
.footer-brand-dot {
  width: 10px; height: 10px;
  background: var(--rust); border-radius: 50%;
  display: inline-block;
}

.footer-mission {
  font-size: .875rem;
  color: rgba(247,242,234,.45);
  line-height: 1.65; max-width: 340px;
}

.footer-col-title {
  font-family: var(--ff-mono);
  font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(247,242,234,.4); margin-bottom: .85rem;
}

.footer-links li + li { margin-top: .4rem; }
.footer-links a {
  font-size: .875rem;
  color: rgba(247,242,234,.6);
  transition: color .2s;
}
.footer-links a:hover { color: var(--cream); }

.footer-bottom {
  padding-block: 1.25rem;
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: .75rem;
}

.footer-disclaimer {
  font-size: .75rem;
  color: rgba(247,242,234,.3);
  line-height: 1.5; max-width: 620px;
}
.footer-disclaimer strong { color: rgba(247,242,234,.5); }

.footer-date {
  font-family: var(--ff-mono);
  font-size: .7rem;
  color: rgba(247,242,234,.2);
  white-space: nowrap;
}

/* ============================================================
   ANIMATIONS
============================================================ */
@keyframes fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideup {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
  RESPONSIVE
============================================================ */
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-panel { display: none; }
  .hero h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .give-back-inner { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border); }
  .stat-item:last-child { border-bottom: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .primary-nav   { display: none; }
  .mobile-nav-btn { display: flex; }
  .footer-grid   { grid-template-columns: 1fr; }

}
}

}

}