/* =========================================================================
   Coastal Wildlife Alliance — shared stylesheet
   Palette: sampled directly from the logo (dark teal ring, coastal teal
   water/land, cream lettering, fox rust accent)
   Type:    Newsreader (serif, headings + articles) / Work Sans (sans, UI)
   ========================================================================= */

:root {
  --bg:        #eceee1;   /* light sage-cream (logo's light background wash) */
  --panel:     #e3dcc5;   /* warm sand — panels & callouts                   */
  --ink:       #12262a;   /* near-black teal — primary text                  */
  --ink-soft:  #46585b;   /* muted teal-grey text                            */
  --marsh:     #2c6b60;   /* coastal teal-green (logo water/land)            */
  --deep:      #06343a;   /* the logo's ring color — dark bands, buttons     */
  --accent:      #9c4a22; /* fox rust — links, hover, focus (on light bg)    */
  --accent-light: #f0d9a8;/* cream — links on dark bands (logo's lettering)  */
  --link:      #1f5c55;   /* teal — inline links                             */
  --line:      rgba(18, 38, 42, 0.14);
  --line-soft: rgba(18, 38, 42, 0.08);

  --wrap: 68rem;
  --read: 40rem;          /* reading measure for articles     */

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- shared layout ---------------------------------------------------- */

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--marsh);
  margin: 0 0 0.6rem;
}

h1, h2, h3 { font-weight: 500; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); letter-spacing: -0.01em; }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1.1rem; }

/* ---- buttons --------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.85rem 1.4rem;
  border-radius: 2px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
/* Both classes + element (0,2,1) so these beat ".nav a" (0,1,1) regardless of order */
a.btn.btn-solid { background: var(--deep); color: #f4f3ea; }
a.btn.btn-solid:hover { background: var(--ink); color: #fff; }
a.btn.btn-line { border-color: var(--deep); color: var(--deep); }
a.btn.btn-line:hover { background: var(--deep); color: #f4f3ea; border-color: var(--deep); }

/* ---- site header ----------------------------------------------------- */

.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 6.25rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}
.brand svg, .brand .brand-mark { width: 76px; height: 76px; flex: none; }
.brand .brand-mark { object-fit: contain; }
.brand b {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.brand span {
  display: block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--marsh);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-family: var(--sans);
  font-size: 0.96rem;
  font-weight: 500;
}
.nav a { color: var(--ink-soft); text-decoration: none; }
.nav a:hover { color: var(--accent); }
.nav .ext::after { content: " \2197"; color: var(--accent); font-size: 0.85em; }
.nav .btn { padding: 0.6rem 1rem; }

/* ---- hero ------------------------------------------------------------ */

.hero { position: relative; overflow: hidden; }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-art svg { width: 100%; height: 100%; object-fit: cover; }
.hero .wrap {
  position: relative;
  z-index: 1;
  padding-top: clamp(3.5rem, 9vw, 7rem);
  padding-bottom: clamp(9rem, 22vw, 15rem);
}
.hero-copy { max-width: 34rem; }
.hero h1 { color: var(--ink); }
.hero .lede {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  color: var(--ink-soft);
  margin-top: 1.1rem;
  max-width: 30rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

/* ---- generic section spacing ----------------------------------------- */

.band { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.band-sand { background: var(--panel); }
.band-deep { background: var(--deep); color: #e9ece2; }
.band-deep h2, .band-deep h3, .band-deep .eyebrow { color: #f4f3ea; }
.band-deep .eyebrow { color: #b7cabf; }
.band-deep a { color: var(--accent-light); }
.band-deep a:hover { color: #fff; }

.section-head { max-width: 34rem; margin-bottom: 2.6rem; }
.section-head p { color: var(--ink-soft); margin-top: 0.6rem; }
h1.section-head-title { font-size: clamp(1.7rem, 3.5vw, 2.4rem); letter-spacing: -0.01em; }
.band-deep .section-head p { color: #c3d0c7; }

/* ---- programs (editorial rows, not identical cards) ------------------ */

.program {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.4rem;
  padding: 2.2rem 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.program:last-child { border-bottom: 1px solid var(--line); }
.program-icon { color: var(--marsh); }
.program-icon svg { width: 3.4rem; height: 3.4rem; }
.program h3 { margin-bottom: 0.5rem; }
.program p { color: var(--ink-soft); margin-bottom: 0; max-width: 44rem; }

.together-note { max-width: 40rem; margin-top: 2.6rem; }
.together-note p:last-child { color: var(--ink-soft); margin-bottom: 0; }

/* ---- animals-in-care callout ----------------------------------------- */

.care {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.care .btn { margin-top: 0.4rem; }
.care-visual {
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 3px;
  overflow: hidden;
  background: rgba(0,0,0,0.12);
}

/* ---- newsletter preview + index -------------------------------------- */

.posts { border-top: 1px solid var(--line); }
.posts-empty { padding: 1.8rem 0; color: var(--ink-soft); font-style: italic; }
.post-row {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1.5rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}
.post-row:hover { background: rgba(23,39,36,0.03); }
.post-row:hover h3 { color: var(--accent); }
.post-date {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--marsh);
  padding-top: 0.35rem;
}
.post-row h3 { margin-bottom: 0.4rem; transition: color 0.15s ease; }
.post-row p { color: var(--ink-soft); margin: 0; }

.more-link {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
}

/* ---- get involved ---------------------------------------------------- */

.involve {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.2rem;
}
.involve div { padding-right: 1rem; }
.involve h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.involve p { color: #c3d0c7; font-size: 1.02rem; }
.involve a { font-family: var(--sans); font-weight: 600; font-size: 0.95rem; }

/* ---- article (individual newsletter post) ---------------------------- */

.article { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem); }
.article-head { max-width: var(--read); margin: 0 auto 2.4rem; }
.article-head .post-date { padding: 0; margin-bottom: 0.8rem; }
.article-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.article-body { max-width: var(--read); margin: 0 auto; }
.article-body p,
.article-body ul,
.article-body ol { font-size: 1.18rem; line-height: 1.72; }
.article-body h2 { font-size: 1.6rem; margin: 2.4rem 0 0.9rem; }
.article-body img { border-radius: 3px; margin: 1.8rem 0; width: 100%; }
.article-body figcaption {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: -1rem;
}
.article-body blockquote {
  margin: 1.8rem 0;
  padding-left: 1.2rem;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: var(--ink-soft);
}
.back-link {
  display: inline-block;
  max-width: var(--read);
  margin: 0 auto 1.6rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
}
.back-link-wrap { width: 100%; padding: 0 1.5rem; }

/* ---- footer ---------------------------------------------------------- */

.site-foot {
  background: var(--ink);
  color: #b9c6bf;
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 3rem 0 2.2rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.2rem;
}
.site-foot h4 {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  font-weight: 600;
  color: #e9ece2;
  margin: 0 0 0.8rem;
}
.site-foot a { color: #d9e0da; text-decoration: none; }
.site-foot a:hover { color: var(--accent-light); }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 0.5rem; }
.foot-brand b {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: #f4f3ea;
  font-weight: 600;
}
.foot-brand p { max-width: 22rem; margin-top: 0.6rem; color: #a7b6ae; }
.foot-legal {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.3rem;
  font-size: 0.85rem;
  color: #8ea198;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---- responsive ------------------------------------------------------ */

@media (max-width: 760px) {
  .site-head .wrap { min-height: 0; padding-top: 0.9rem; padding-bottom: 0.9rem; }
  .nav { gap: 1rem; row-gap: 0.4rem; flex-wrap: wrap; }
  .care { grid-template-columns: 1fr; }
  .care-visual { order: -1; }
  .involve { grid-template-columns: 1fr; gap: 1.8rem; }
  .foot-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .post-row { grid-template-columns: 1fr; gap: 0.4rem; }
  .post-date { padding-top: 0; }
  .program { grid-template-columns: 1fr; gap: 0.8rem; }
  .program-icon svg { width: 2.6rem; height: 2.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
