/*
Theme Name: Penpal Promise
Theme URI: https://penpalpromise.com
Author: Penpal Promise
Author URI: https://penpalpromise.com
Description: A warm, person-to-person support community theme. One act of grace at a time.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: penpal-promise
Tags: community, nonprofit, custom-colors, custom-menu, full-width-template
*/

/* ─── TOKENS ─────────────────────────────── */
:root {
  --cream:       #FFF7EB;
  --cream-dark:  #F5EBDA;
  --teal:        #1F6D6A;
  --teal-light:  #2A8E8A;
  --teal-pale:   #E4F0EF;
  --clay:        #D9825B;
  --clay-light:  #E8A07D;
  --clay-pale:   #FAF0EA;
  --sand:        #4F4A45;
  --sand-light:  #7A736B;
  --sage:        #CFE3D4;
  --sage-dark:   #8BB899;
  --gold:        #C9A84C;
  --gold-pale:   #FDF5E0;
  --white:       #FFFFFF;
  --shadow:      rgba(31,109,106,.12);
  --r-sm:        12px;
  --r-md:        20px;
  --r-lg:        28px;
  --r-pill:      100px;
}

/* ─── RESET ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--cream);
  color: var(--sand);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  /* Push body below fixed nav */
  padding-top: 74px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); transition: color .25s; }
a:hover { color: var(--teal-light); }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ─── TYPOGRAPHY ─────────────────────────── */
h1,h2,h3,h4,h5,h6 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--teal);
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2.4rem, 4vw, 3.8rem); margin-bottom: 20px; }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); margin-bottom: 16px; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); margin-bottom: 12px; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
em { font-style: italic; color: var(--clay); }
.italic-body { font-family: 'Crimson Pro', Georgia, serif; font-style: italic; font-weight: 300; }
blockquote {
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--sand);
  line-height: 1.75;
  padding: 28px 32px;
  border-left: 3px solid var(--clay);
  background: var(--cream);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin: 24px 0;
}
blockquote cite { display: block; margin-top: 16px; font-size: .85rem; font-style: normal; color: var(--sand-light); }

/* ─── LAYOUT ─────────────────────────────── */
.container    { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 60px; }
.container-sm { width: 100%; max-width: 840px;  margin: 0 auto; padding: 0 60px; }
.section-pad    { padding: 100px 0; }
.section-pad-sm { padding: 64px 0; }
.text-center { text-align: center; }

/* ─── SECTION LABEL ──────────────────────── */
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .75rem; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; color: var(--clay); margin-bottom: 16px;
}
.section-label::before { content: ''; width: 24px; height: 2px; background: var(--clay); border-radius: 2px; flex-shrink: 0; }
.section-label.sl-teal  { color: var(--teal);     } .section-label.sl-teal::before  { background: var(--teal); }
.section-label.sl-sage  { color: var(--sage-dark);} .section-label.sl-sage::before  { background: var(--sage-dark); }
.section-label.sl-gold  { color: var(--gold);     } .section-label.sl-gold::before  { background: var(--gold); }
.section-label.sl-white { color: rgba(255,255,255,.7); } .section-label.sl-white::before { background: rgba(255,255,255,.4); }
.section-label.sl-center { justify-content: center; } .section-label.sl-center::before { display: none; }

/* ─── BUTTONS ────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 28px; border-radius: var(--r-pill);
  font-family: 'DM Sans', sans-serif; font-size: .9rem; font-weight: 500;
  text-decoration: none; border: 2px solid transparent;
  cursor: pointer; transition: all .25s; white-space: nowrap; line-height: 1;
}
.btn-lg  { padding: 18px 40px; font-size: 1rem; }
.btn-sm  { padding: 9px 20px; font-size: .8rem; }
.btn-teal        { background: var(--teal); color: #fff !important; border-color: var(--teal); box-shadow: 0 4px 16px rgba(31,109,106,.25); }
.btn-teal:hover  { background: var(--teal-light); border-color: var(--teal-light); transform: translateY(-2px); }
.btn-clay        { background: var(--clay); color: #fff !important; border-color: var(--clay); box-shadow: 0 4px 16px rgba(217,130,91,.25); }
.btn-clay:hover  { background: var(--clay-light); border-color: var(--clay-light); transform: translateY(-2px); }
.btn-sage        { background: var(--sage-dark); color: #fff !important; border-color: var(--sage-dark); }
.btn-sage:hover  { filter: brightness(1.1); transform: translateY(-2px); }
.btn-gold        { background: var(--gold); color: #fff !important; border-color: var(--gold); }
.btn-gold:hover  { filter: brightness(1.1); transform: translateY(-2px); }
.btn-white       { background: #fff; color: var(--teal) !important; border-color: #fff; font-weight: 500; box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.btn-white:hover { background: var(--cream); transform: translateY(-2px); }
.btn-outline-teal       { background: transparent; color: var(--teal) !important; border-color: var(--teal); }
.btn-outline-teal:hover { background: var(--teal-pale); }
.btn-outline-white       { background: transparent; color: #fff !important; border-color: rgba(255,255,255,.5); }
.btn-outline-white:hover { background: rgba(255,255,255,.1); }
.btn-group { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

/* ─── SKIP LINK ──────────────────────────── */
.skip-link {
  position: absolute; top: -100px; left: 0;
  background: var(--teal); color: #fff; padding: 12px 24px; font-weight: 500; z-index: 9999;
  transition: top .25s; text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ══════════════════════════════════════════
   NAVIGATION — FIXED, ALWAYS VISIBLE
══════════════════════════════════════════ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  /* Solid background — no transparency issues */
  background: #FFF7EB;
  border-bottom: 2px solid var(--teal);
  box-shadow: 0 2px 20px rgba(31,109,106,.15);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 48px;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Logo */
.site-logo {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.site-logo:hover { color: var(--teal-light); }
.logo-mark {
  width: 36px; height: 36px;
  background: var(--teal);
  border-radius: 50% 50% 50% 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1rem; flex-shrink: 0;
}
.logo-text { color: var(--teal); }

/* Primary menu */
#site-navigation #primary-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}
#site-navigation #primary-menu li { list-style: none; }
#site-navigation #primary-menu a {
  display: block;
  font-size: .875rem;
  font-weight: 400;
  color: var(--sand);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  transition: background .2s, color .2s;
  white-space: nowrap;
}
#site-navigation #primary-menu a:hover { background: var(--teal-pale); color: var(--teal); }
#site-navigation #primary-menu .current-menu-item > a,
#site-navigation #primary-menu .current_page_item > a { color: var(--teal); font-weight: 500; }

/* Nav CTAs */
.nav-ctas { display: flex; gap: 10px; flex-shrink: 0; }
.nav-ctas .btn { padding: 10px 20px; font-size: .82rem; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--sand); border-radius: 2px; transition: all .25s;
}

/* ─── MOBILE MENU ────────────────────────── */
#mobile-menu {
  display: none;
  position: fixed; inset: 0; z-index: 999;
  background: var(--cream);
  padding: 90px 32px 40px;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
#mobile-menu.open { display: flex; }
#mobile-menu ul   { display: flex; flex-direction: column; gap: 4px; list-style: none; }
#mobile-menu a {
  font-family: 'Lora', serif;
  font-size: 1.5rem; font-weight: 600;
  color: var(--teal); text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid rgba(209,171,130,.2);
  display: block;
}
.mobile-close-btn {
  position: absolute; top: 24px; right: 24px;
  background: none; border: none;
  font-size: 1.5rem; color: var(--sand);
}
.mobile-ctas { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }

/* ─── PAGE HERO ──────────────────────────── */
.page-hero {
  padding: 80px 60px 80px;
  text-align: center;
  background: var(--white);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(209,171,130,.15);
}
.page-hero::before {
  content: '✉  ✉  ✉';
  position: absolute; top: 20px; left: 0; right: 0;
  font-size: 8rem; letter-spacing: 5rem;
  color: rgba(207,227,212,.15);
  pointer-events: none; user-select: none;
  white-space: nowrap; overflow: hidden; text-align: center;
}
.page-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .75rem; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; color: var(--clay);
  padding: 7px 16px; background: var(--clay-pale);
  border-radius: var(--r-pill); border: 1px solid rgba(217,130,91,.2);
  margin-bottom: 24px; position: relative; z-index: 1;
}
.page-hero h1 { position: relative; z-index: 1; font-size: clamp(2.4rem,5vw,4.2rem); }
.page-hero p.hero-sub {
  font-family: 'Crimson Pro', serif; font-style: italic;
  font-size: 1.2rem; color: var(--sand-light);
  max-width: 560px; margin: 0 auto 36px; line-height: 1.7;
  position: relative; z-index: 1;
}

/* ─── CARDS ──────────────────────────────── */
.card {
  background: var(--white); border-radius: var(--r-md);
  border: 1px solid rgba(209,171,130,.15); padding: 32px;
  transition: transform .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px var(--shadow); }
.card-teal { border-left: 4px solid var(--teal); }
.card-clay { border-left: 4px solid var(--clay); }
.card-sage { border-left: 4px solid var(--sage-dark); }

/* ─── BADGES ─────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--r-pill); font-size: .72rem; font-weight: 500; }
.badge-teal { background: var(--teal-pale); color: var(--teal); }
.badge-clay { background: var(--clay-pale); color: var(--clay); }
.badge-sage { background: var(--sage);      color: var(--teal); }
.badge-gold { background: var(--gold-pale); color: var(--gold); }

/* ─── FORMS ──────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .82rem; font-weight: 500; color: var(--teal); margin-bottom: 7px; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: 13px 18px;
  border: 1.5px solid rgba(209,171,130,.3);
  border-radius: var(--r-sm);
  font-family: 'DM Sans', sans-serif; font-size: .9rem; color: var(--sand);
  background: var(--cream); outline: none; transition: border-color .25s; resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--teal); }
.form-group textarea { min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-feedback { padding: 12px 16px; border-radius: var(--r-sm); font-size: .875rem; margin-top: 12px; }
.form-feedback.success { background: var(--sage); color: var(--teal); }
.form-feedback.error   { background: var(--clay-pale); color: var(--clay); }

/* ─── MODAL ──────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(79,74,69,.55);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: #fff; border-radius: var(--r-lg); padding: 48px;
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  transform: translateY(24px); transition: transform .3s; position: relative;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal h3 { font-size: 1.6rem; color: var(--teal); margin-bottom: 8px; }
.modal > p { font-size: .9rem; color: var(--sand-light); margin-bottom: 28px; }
.modal-close { position: absolute; top: 20px; right: 24px; background: none; border: none; font-size: 1.4rem; color: var(--sand-light); }
.modal-close:hover { color: var(--teal); }

/* ─── STAT BOX ───────────────────────────── */
.stat-box { background: var(--white); border-radius: var(--r-md); padding: 28px; text-align: center; border: 1px solid rgba(207,227,212,.5); }
.stat-num { font-family: 'Lora', serif; font-size: 2.6rem; font-weight: 600; color: var(--teal); line-height: 1; margin-bottom: 8px; }
.stat-label { font-size: .82rem; color: var(--sand-light); }

/* ─── CTA STRIP ──────────────────────────── */
.pp-cta-strip { background: var(--cream-dark); padding: 100px 60px; text-align: center; border-top: 1px solid rgba(209,171,130,.2); }
.pp-cta-strip h2 { margin-bottom: 16px; }
.pp-cta-strip p  { font-size: 1rem; color: var(--sand-light); max-width: 500px; margin: 0 auto 40px; }

/* ─── FILTER BAR ─────────────────────────── */
.pp-filter-bar { padding: 28px 60px 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--white); }
.filter-label  { font-size: .8rem; color: var(--sand-light); margin-right: 4px; }
.filter-chip   { padding: 8px 18px; border-radius: var(--r-pill); border: 1.5px solid rgba(209,171,130,.3); background: #fff; font-size: .82rem; color: var(--sand); cursor: pointer; transition: all .2s; font-family: 'DM Sans', sans-serif; }
.filter-chip:hover  { border-color: var(--teal); color: var(--teal); }
.filter-chip.active { background: var(--teal); color: #fff; border-color: var(--teal); }

/* ─── FOOTER ─────────────────────────────── */
#site-footer { background: var(--sand); color: rgba(255,255,255,.7); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 60px; padding: 64px 60px; }
.footer-brand .site-logo { color: #fff; margin-bottom: 16px; }
.footer-brand .logo-mark { background: rgba(255,255,255,.2); }
.footer-brand .logo-text { color: #fff; }
.footer-brand p { font-size: .88rem; line-height: 1.75; max-width: 260px; color: rgba(255,255,255,.65); }
.footer-col h4 { font-size: .78rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 20px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a  { color: rgba(255,255,255,.65); text-decoration: none; font-size: .9rem; transition: color .25s; }
.footer-col a:hover { color: var(--sage); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 28px 60px; display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: rgba(255,255,255,.45); }
.footer-bottom a { color: var(--sage); text-decoration: none; }

/* ─── ANIMATIONS ─────────────────────────── */
@keyframes fadeUp        { from { opacity:0; transform:translateY(28px); } to { opacity:1; transform:translateY(0); } }
@keyframes gentleFloat   { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-8px); } }
@keyframes livePulse     { 0%,100% { box-shadow:0 0 0 0 rgba(232,160,125,.4); } 50% { box-shadow:0 0 0 6px rgba(232,160,125,0); } }
@keyframes rippleExpand  { 0% { opacity:0; transform:translate(-50%,-50%) scale(.7); } 20% { opacity:1; } 100% { opacity:0; transform:translate(-50%,-50%) scale(1.1); } }
@keyframes twinkle       { 0%,100% { opacity:0; transform:scale(.8); } 50% { opacity:var(--op,.6); transform:scale(1); } }
.anim-fadeup  { animation: fadeUp .8s ease both; }
.anim-float   { animation: gentleFloat 4s ease-in-out infinite; }

/* ─── WP CORE ────────────────────────────── */
.aligncenter { display: block; margin: 0 auto 24px; }
.alignright  { float: right; margin: 8px 0 24px 24px; }
.alignleft   { float: left; margin: 8px 24px 24px 0; }
.entry-content h1,.entry-content h2,.entry-content h3,.entry-content h4 { margin-top: 2rem; margin-bottom: 1rem; }
.entry-content ul,.entry-content ol { margin-left: 1.5rem; margin-bottom: 1rem; list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: .4rem; }
.entry-content a  { text-decoration: underline; }
.wp-block-image   { margin: 2rem 0; }

/* ─── RESPONSIVE ─────────────────────────── */
@media (max-width: 1100px) {
  body { padding-top: 68px; }
  .nav-inner { padding: 14px 32px; }
  .container,.container-sm { padding: 0 32px; }
  #site-navigation { display: none; }
  .nav-ctas { display: none; }
  .nav-toggle { display: flex; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; padding: 48px 32px; }
  .footer-bottom { padding: 24px 32px; }
  .page-hero { padding: 60px 32px; }
  .pp-cta-strip { padding: 72px 32px; }
  .pp-filter-bar { padding: 20px 32px 10px; }
}
@media (max-width: 680px) {
  body { padding-top: 64px; }
  .nav-inner { padding: 12px 20px; }
  .container,.container-sm { padding: 0 20px; }
  h1 { font-size: 2.2rem; } h2 { font-size: 1.8rem; }
  .btn-group { flex-direction: column; align-items: stretch; }
  .form-row { grid-template-columns: 1fr; }
  .modal { padding: 32px 24px; }
  .footer-inner { grid-template-columns: 1fr; padding: 36px 20px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; padding: 20px; }
  .section-pad { padding: 60px 0; }
  .page-hero { padding: 48px 20px; }
  .pp-cta-strip { padding: 60px 20px; }
  .pp-filter-bar { padding: 16px 20px 8px; }
}
