/*
Theme Name: ReGreen Springfield Custom
Theme URI: https://regreenspringfield.org
Author: ReGreen Springfield
Author URI: https://regreenspringfield.org
Description: A custom one-page style theme for ReGreen Springfield built around a tree-ring growth motif, with a "From the Field" section that pulls in your latest blog posts automatically.
Version: 3.7
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: regreen-springfield
*/

:root{
  --canopy:#16261C;
  --canopy-light:#23362A;
  --mist:#E5E8E0;
  --paper:#EFEDE3;
  --moss:#5F7A4A;
  --moss-light:#7C9866;
  --bark:#7C5C3D;
  --gold:#C9A227;
  --ash:#34392F;
  --line:rgba(22,38,28,0.14);
  --max:1180px;
}
*{box-sizing:border-box;}
@media (prefers-reduced-motion: no-preference){html{scroll-behavior:smooth;}}
body{
  margin:0;
  background:var(--mist);
  color:var(--ash);
  font-family:'Inter',system-ui,sans-serif;
  font-size:16px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3{
  font-family:'Fraunces',serif;
  font-weight:500;
  margin:0;
  color:var(--canopy);
}
a{color:inherit;text-decoration:none;}
.eyebrow{
  font-family:'IBM Plex Mono',monospace;
  font-size:12.5px;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:var(--moss);
  font-weight:500;
}
.wrap{max-width:var(--max);margin:0 auto;padding:0 32px;}
img,svg{display:block;max-width:100%;}
:focus-visible{outline:2px solid var(--gold);outline-offset:3px;}

/* ---------- NAV ---------- */
header.nav{
  position:sticky;top:0;z-index:50;
  background:rgba(229,232,224,0.92);
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
}
.nav-inner{
  max-width:var(--max);margin:0 auto;padding:18px 32px;
  display:flex;align-items:center;justify-content:space-between;
}
.logo{display:flex;align-items:center;gap:10px;font-family:'Fraunces',serif;font-weight:600;font-size:19px;color:var(--canopy);}
.logo .ring-mark{width:26px;height:26px;flex-shrink:0;}
.nav-links{display:flex;align-items:center;gap:34px;}
.nav-links a{font-size:14.5px;font-weight:500;color:var(--canopy);position:relative;padding:4px 0;}
.nav-links a::after{content:"";position:absolute;left:0;bottom:0;width:0;height:1.5px;background:var(--moss);transition:width .25s ease;}
.nav-links a:hover::after{width:100%;}
.btn{
  display:inline-flex;align-items:center;gap:8px;
  font-family:'Inter',sans-serif;font-weight:600;font-size:14px;
  padding:11px 22px;border-radius:3px;cursor:pointer;border:1px solid transparent;
  transition:transform .2s ease, background .2s ease;
}
.btn-primary{background:var(--moss);color:#fff;}
.btn-primary:hover{background:var(--canopy);transform:translateY(-1px);}
.btn-ghost{border-color:var(--canopy);color:var(--canopy);background:transparent;}
.btn-ghost:hover{background:var(--canopy);color:#fff;}
.menu-toggle{display:none;background:none;border:none;cursor:pointer;padding:6px;}
.menu-toggle span{display:block;width:22px;height:2px;background:var(--canopy);margin:5px 0;}

/* ---------- HERO LANDING ---------- */
.hero-landing{
  background:var(--canopy);
  padding:96px 0 108px;
  position:relative;
  overflow:hidden;
  text-align:center;
}
/* Three growth rings as absolute background layer */
.hero-rings{
  position:absolute;inset:0;
  display:flex;align-items:center;justify-content:center;
  pointer-events:none;z-index:0;
}
.hero-rings svg{
  width:min(700px,130vw);
  height:min(700px,130vw);
}
/* Draw animation: each ring's --c var is its circumference set inline */
@keyframes drawRingHero{to{stroke-dashoffset:0;}}
.hring{
  stroke-dashoffset:var(--c,1960);
  animation:drawRingHero 2.2s ease forwards;
}
/* Logo badge: white circle keeps the PNG background from clashing */
.hero-landing-inner{
  position:relative;z-index:1;
  display:flex;flex-direction:column;align-items:center;
}
.hero-logo-badge{
  width:clamp(180px,26vw,240px);
  height:clamp(180px,26vw,240px);
  background:#fff;
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  padding:20px;
  box-shadow:0 0 0 1.5px rgba(201,162,39,.35), 0 10px 56px rgba(0,0,0,.45);
  margin-bottom:34px;
  overflow:hidden;
}
.hero-logo-badge img{
  width:100%;height:100%;
  object-fit:contain;display:block;
}
.hero-eyebrow{color:var(--gold);margin-bottom:20px;}
.hero-tagline{
  font-size:clamp(34px,5.2vw,64px);
  line-height:1.08;letter-spacing:-0.015em;
  color:#fff;margin:0 0 26px;
}
.hero-tagline em{font-style:italic;color:var(--gold);}
.hero-lede{
  font-size:18px;line-height:1.65;
  color:rgba(229,232,224,.78);
  max-width:520px;margin:0 auto 38px;
}
.hero-ctas{
  display:flex;gap:14px;flex-wrap:wrap;
  justify-content:center;margin-bottom:40px;
}
/* Ghost button for use on dark backgrounds */
.btn-ghost-light{
  display:inline-flex;align-items:center;
  font-family:'Inter',sans-serif;font-weight:600;font-size:14px;
  padding:11px 22px;border-radius:3px;cursor:pointer;
  border:1px solid rgba(229,232,224,.42);
  color:var(--mist);background:transparent;
  transition:background .2s ease, border-color .2s ease;
}
.btn-ghost-light:hover{
  background:rgba(229,232,224,.09);
  border-color:rgba(229,232,224,.75);
}
.hero-ring-note{
  font-family:'IBM Plex Mono',monospace;font-size:11px;
  letter-spacing:.14em;text-transform:uppercase;
  color:rgba(229,232,224,.28);margin:0;
}

/* ---------- NEWS / BLOG ---------- */
.news{padding-top:72px;}
.news-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;}
.post-card{
  background:var(--paper);border:1px solid var(--line);border-radius:5px;overflow:hidden;
  display:flex;flex-direction:column;transition:transform .3s ease, box-shadow .3s ease;
}
.post-card:hover{transform:translateY(-6px);box-shadow:0 18px 32px rgba(22,38,28,0.14);}
.post-card:hover .post-img svg{transform:scale(1.14) rotate(5deg);}
.post-img{
  height:160px;position:relative;overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  background-color:var(--bark);
}
.post-img::before{
  content:"";position:absolute;inset:0;
  background-image:repeating-radial-gradient(circle at 22% 78%, rgba(255,255,255,0.18) 0 2px, transparent 2px 22px);
}
.post-img svg{width:42px;height:42px;position:relative;z-index:1;transition:transform .35s ease;}
.post-body{padding:22px 24px 24px;flex:1;display:flex;flex-direction:column;}
.post-body h3 a{color:inherit;}
.post-tag{
  align-self:flex-start;font-family:'IBM Plex Mono',monospace;font-size:11px;letter-spacing:.07em;
  text-transform:uppercase;color:#fff;padding:5px 11px;border-radius:999px;margin-bottom:14px;
  background:var(--moss);
}
.post-card h3{font-size:18px;line-height:1.32;margin-bottom:10px;}
.post-card p{font-size:14px;color:var(--ash);margin:0 0 14px;}
.post-meta{font-family:'IBM Plex Mono',monospace;font-size:12px;color:var(--bark);margin-top:auto;margin-bottom:10px;}
.post-link{font-size:13.5px;font-weight:600;color:var(--canopy);display:inline-flex;align-items:center;gap:4px;transition:gap .2s ease;}
.post-link:hover{gap:8px;}
.post-card.featured{grid-column:1 / -1;display:grid;grid-template-columns:1fr 1fr;}
.post-card.featured .post-img{height:auto;min-height:260px;}
.post-card.featured .post-body{padding:36px 40px;justify-content:center;}
.post-card.featured h3{font-size:27px;margin-bottom:14px;}
.news-empty{font-size:15px;color:var(--ash);padding:18px 0;}

/* ---------- IMPACT BAND ---------- */
.impact{background:#2B4C34;color:var(--mist);padding:56px 0;}
.impact .eyebrow{color:var(--gold);}
.impact-grid{margin-top:30px;display:grid;grid-template-columns:repeat(5,1fr);gap:0;}
.impact-item{padding:0 22px;border-left:1px solid rgba(229,232,224,0.18);}
.impact-item:first-child{border-left:none;padding-left:0;}
.impact-num{font-family:'Fraunces',serif;font-weight:500;font-size:clamp(26px,3.4vw,38px);color:#fff;}
.impact-label{font-size:13.5px;color:rgba(229,232,224,0.75);margin-top:6px;line-height:1.4;}

/* ---------- SECTION SHARED ---------- */
section{padding:96px 0;}
.section-head{max-width:620px;margin-bottom:52px;}
.section-head h2{font-size:clamp(30px,3.6vw,42px);margin-top:14px;}

/* ---------- PROGRAMS ---------- */
.programs-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:28px;}
.program-card{
  background:var(--paper);border:1px solid var(--line);border-radius:4px;
  padding:30px 26px;transition:transform .25s ease, box-shadow .25s ease;
}
.program-card:hover{transform:translateY(-4px);box-shadow:0 14px 28px rgba(22,38,28,0.1);}
.program-icon{width:38px;height:38px;margin-bottom:18px;color:var(--moss);}
.program-card h3{font-size:19px;margin-bottom:10px;}
.program-card p{font-size:14.5px;color:var(--ash);margin:0;}

/* ---------- STORY / RING TIMELINE ---------- */
.story{background:var(--paper);}
.timeline{position:relative;margin-top:10px;}
.timeline::before{
  content:"";position:absolute;left:23px;top:6px;bottom:6px;width:1.5px;background:var(--line);
}
.tl-item{display:flex;gap:26px;padding-bottom:46px;position:relative;}
.tl-item > div:not(.tl-photo){flex:1;}
/* Small photo beside each milestone — placeholder until the file exists */
.tl-photo{flex:0 0 150px;display:flex;align-items:flex-start;}
.tl-photo .tl-photo-img{min-height:110px;max-height:110px;height:110px;border-radius:8px;font-size:10.5px;padding:10px;gap:4px;}
.tl-photo .tl-photo-img svg{width:22px;height:22px;}
@media (max-width:640px){.tl-photo{display:none;}}
.tl-item:last-child{padding-bottom:0;}
.tl-ring{flex-shrink:0;width:48px;height:48px;}
.tl-year{font-family:'IBM Plex Mono',monospace;font-size:13px;color:var(--bark);letter-spacing:.05em;margin-bottom:6px;display:block;}
.tl-item h3{font-size:18.5px;margin-bottom:6px;}
.tl-item p{margin:0;font-size:14.5px;max-width:560px;}

/* ---------- GET INVOLVED ---------- */
.involved-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;}
.involved-card{
  border:1px solid var(--line);border-radius:4px;padding:34px 28px;
  background:var(--mist);position:relative;
}
.involved-card h3{font-size:21px;margin-bottom:10px;}
.involved-card p{font-size:14.5px;margin-bottom:20px;}
.involved-card .num{
  font-family:'IBM Plex Mono',monospace;font-size:12px;color:var(--moss);
  display:block;margin-bottom:14px;letter-spacing:.08em;
}

/* ---------- PARTNERS ---------- */
.partners{padding:64px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);}
.partners-row{
  display:flex;flex-wrap:wrap;gap:14px 36px;justify-content:space-between;margin-top:26px;
  font-family:'IBM Plex Mono',monospace;font-size:13px;color:var(--ash);opacity:.8;
}

/* ---------- SINGLE POST / PAGE ---------- */
.post-hero{padding:64px 0 40px;border-bottom:1px solid var(--line);}
.post-hero .post-tag{margin-bottom:18px;}
.post-hero h1{font-size:clamp(32px,4.6vw,52px);line-height:1.08;margin-bottom:18px;}
.post-hero .post-meta{font-size:13px;}
.post-hero p{font-size:18px;max-width:640px;color:var(--ash);margin-top:10px;}
.post-featured-img{margin:40px 0;border-radius:5px;overflow:hidden;}
.post-featured-img img{width:100%;height:auto;}
.entry-content{max-width:720px;margin:0 auto;padding:56px 0;font-size:17px;line-height:1.75;}
.entry-content h2{font-size:28px;margin:40px 0 16px;}
.entry-content h3{font-size:22px;margin:32px 0 14px;}
.entry-content p{margin:0 0 20px;}
.entry-content img{border-radius:5px;margin:24px 0;}
.entry-content a{color:var(--moss);text-decoration:underline;text-decoration-color:var(--line);}
.entry-content blockquote{
  border-left:3px solid var(--moss);margin:28px 0;padding:4px 0 4px 22px;
  font-family:'Fraunces',serif;font-style:italic;font-size:19px;color:var(--canopy);
}
.entry-content ul,.entry-content ol{padding-left:22px;margin:0 0 20px;}
.more-stories{background:var(--paper);}
.page-content{max-width:760px;margin:0 auto;padding:64px 32px 96px;}
.page-content h1{font-size:clamp(32px,4.6vw,46px);margin-bottom:28px;}

/* ---------- ARCHIVE / BLOG INDEX ---------- */
.archive-head{padding:64px 0 12px;}
.archive-head h1{font-size:clamp(32px,4.6vw,46px);}
.pagination{display:flex;gap:10px;justify-content:center;margin-top:48px;font-family:'IBM Plex Mono',monospace;font-size:13px;}
.pagination .page-numbers{padding:9px 14px;border:1px solid var(--line);border-radius:3px;color:var(--canopy);}
.pagination .page-numbers.current{background:var(--canopy);color:#fff;border-color:var(--canopy);}
.pagination a.page-numbers:hover{border-color:var(--moss);color:var(--moss);}

/* ---------- CONTACT ---------- */
.contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:48px;align-items:start;}
.contact-info h3{font-size:18px;margin:26px 0 6px;}
.contact-info h3:first-child{margin-top:0;}
.contact-info p{margin:0 0 4px;font-size:15px;}
.contact-form{display:flex;flex-direction:column;gap:18px;}
.contact-form label{font-family:'IBM Plex Mono',monospace;font-size:11.5px;letter-spacing:.07em;text-transform:uppercase;color:var(--bark);margin-bottom:7px;display:block;}
.contact-form input,.contact-form textarea{
  width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:3px;
  background:var(--paper);font-family:'Inter',sans-serif;font-size:15px;color:var(--ash);
}
.contact-form input:focus,.contact-form textarea:focus{outline:2px solid var(--gold);outline-offset:1px;border-color:var(--moss);}
.form-note{font-size:13px;color:var(--bark);margin-top:-6px;}
.contact-info .partners-row{justify-content:flex-start;margin-top:14px;}
@media (max-width:768px){.contact-grid{grid-template-columns:1fr;}}

/* ---------- GIVING LEVELS (donate page) ---------- */
.giving-card .give-amount{font-family:'Fraunces',serif;font-size:26px;color:var(--moss);margin-bottom:8px;}

/* ---------- INFO BOXES (resources / contacts callouts) ---------- */
.info-box{background:var(--paper);border-left:4px solid var(--moss);padding:26px 30px;border-radius:4px;margin:36px 0;}
.info-box h3{font-size:18px;margin-bottom:12px;}
.info-box p{margin:0 0 10px;font-size:14.5px;}
.info-box ul{margin:0;padding-left:20px;}
.info-box li{margin-bottom:8px;font-size:14.5px;}
.info-box.flag{border-left-color:var(--gold);}
.content-block{padding:64px 0 8px;}
.content-block .lede{font-size:18px;max-width:680px;color:var(--ash);}
.content-block h2{font-size:clamp(26px,3.2vw,34px);margin:48px 0 20px;}
.resource-card p{min-height:0;}

/* ---------- FOOTER ---------- */
footer{background:var(--canopy);color:var(--mist);padding:64px 0 36px;}
.footer-grid{display:grid;grid-template-columns:1.3fr 0.8fr 0.9fr 0.9fr;gap:36px;}
footer .logo{color:#fff;margin-bottom:14px;}
footer p{font-size:14px;color:rgba(229,232,224,0.7);max-width:300px;}
footer h4{font-family:'IBM Plex Mono',monospace;font-size:12.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--gold);margin-bottom:16px;font-weight:500;}
footer ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:10px;}
footer a{font-size:14.5px;color:rgba(229,232,224,0.85);}
footer a:hover{color:#fff;}
.foot-bottom{
  max-width:var(--max);margin:48px auto 0;padding:24px 32px 0;border-top:1px solid rgba(229,232,224,0.15);
  display:flex;justify-content:space-between;font-size:12.5px;color:rgba(229,232,224,0.55);flex-wrap:wrap;gap:10px;
}

/* ---------- REVEAL ---------- */
.reveal{opacity:0;transform:translateY(18px);transition:opacity .6s ease, transform .6s ease;}
.reveal.is-visible{opacity:1;transform:translateY(0);}

@media (prefers-reduced-motion: reduce){
  .reveal{opacity:1;transform:none;transition:none;}
  .hring{animation:none;stroke-dashoffset:0;}
  html{scroll-behavior:auto;}
}

/* ---------- RESPONSIVE ---------- */
@media (max-width:1180px){
  .nav-links{gap:20px;}
  .nav-links a{font-size:13.5px;}
}
@media (max-width:920px){
  .news-grid{grid-template-columns:1fr 1fr;}
  .post-card.featured{grid-column:1 / -1;grid-template-columns:1fr;}
  .post-card.featured .post-img{min-height:180px;}
  .impact-grid{grid-template-columns:repeat(2,1fr);row-gap:28px;}
  .impact-item{border-left:none;padding-left:0;}
  .programs-grid,.involved-grid{grid-template-columns:1fr 1fr;}
  .footer-grid{grid-template-columns:1fr 1fr;}
  .hero-landing{padding:72px 0 80px;}
}
@media (max-width:680px){
  .nav-links{position:fixed;top:68px;left:0;right:0;background:var(--mist);flex-direction:column;align-items:flex-start;padding:24px 32px;gap:20px;border-bottom:1px solid var(--line);transform:translateY(-110%);transition:transform .25s ease;}
  .nav-links.open{transform:translateY(0);}
  .menu-toggle{display:block;}
  .nav-links .btn{margin-top:6px;}
  .programs-grid,.involved-grid{grid-template-columns:1fr;}
  .news-grid{grid-template-columns:1fr;}
  .footer-grid{grid-template-columns:1fr;}
  .impact-grid{grid-template-columns:1fr 1fr;}
  section{padding:64px 0;}
}


/* ---------- FOOTER (updated) ---------- */
.site-footer { background: #2B4C34; color: var(--mist); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.footer-logo { width: 76px; height: 76px; object-fit: contain; }
/* Light bubble behind the logo so its greens stay visible on the green footer */
.footer-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 104px;
  height: 104px;
  border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%;
  background: rgba(250, 250, 247, 0.92);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
}
.footer-about { font-size: 13px; line-height: 1.65; color: rgba(229,232,224,0.7); margin: 0; max-width: 220px; }
.site-footer h4 { font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; }
.site-footer ul.leaf-list a { color: rgba(229,232,224,0.8); font-size: 13px; }
.site-footer ul.leaf-list a:hover { color: #fff; }
.site-footer ul.leaf-list li { color: rgba(229,232,224,0.8); font-size: 13px; }
.foot-bottom { border-top: 1px solid rgba(229,232,224,0.1); padding: 18px 32px; max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: rgba(229,232,224,0.45); }

/* ---------- POST CARD IMAGE (ensure images always show) ---------- */
.post-card .post-img{height:200px;overflow:hidden;background-size:cover;background-position:center;}
.post-card.featured .post-img{height:260px;}
.post-card .post-img img{width:100%;height:100%;object-fit:cover;display:block;}
.post-card .post-img-fallback{width:100%;height:100%;display:flex;align-items:center;justify-content:center;}

/* ── Skip link (keyboard accessibility) ─────────────────────
   Invisible until focused with Tab, then appears top-left. */
.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 999;
  padding: 10px 18px;
  background: var(--rg-green-dark, #1a3d1a);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }
