/* ============================================================
   The Public Timber Project — design system
   Faithful refresh: earthy, flooded-timber palette
   ============================================================ */

:root {
  /* Official brand palette (from logo guide) */
  --forest:      #2a2a22;  /* charcoal / Black C — dark base */
  --forest-2:    #3a3a30;  /* charcoal hover */
  --moss:        #6b6b4f;
  --sage:        #c0c098;  /* Pantone 5797 */
  --blush:       #f0c8b8;  /* Pantone 4032 */
  --tan:         #e87030;  /* Pantone 1645 orange — primary accent */
  --tan-dark:    #cf5f22;  /* darker orange (hover) */
  --cream:       #f7f1ea;  /* warm off-white page background */
  --paper:       #ffffff;
  --ink:         #23231d;  /* near-black text */
  --ink-soft:    #55524a;
  --line:        #e7ddd2;

  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 6px 24px rgba(40, 40, 32, 0.10);
  --shadow-lg:   0 18px 50px rgba(40, 40, 32, 0.18);
  --maxw:        1140px;
  --font-head:   "Oswald", "Arial Narrow", "Helvetica Neue", sans-serif;
  --font-body:   -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--forest-2); text-decoration: none; }
a:hover { color: var(--tan-dark); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

section { padding: 84px 0; }

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.12; letter-spacing: .03em; text-transform: uppercase; color: var(--forest); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.7rem); }
h3 { font-size: 1.35rem; }
.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .8rem;
  font-weight: 700;
  color: var(--tan-dark);
  margin-bottom: 14px;
}
.lead { font-size: 1.2rem; color: var(--ink-soft); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--tan); color: var(--forest); }
.btn-primary:hover { background: var(--tan-dark); color: #fff; box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: #fff; color: var(--forest); }
.btn-dark { background: var(--forest); color: #fff; }
.btn-dark:hover { background: var(--forest-2); color: #fff; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(192, 192, 152, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(42,42,34,.12);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 74px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 58px; width: auto; }
.brand .brand-text {
  color: var(--forest); font-family: var(--font-head); font-weight: 700;
  font-size: 1.12rem; line-height: 1.1; letter-spacing: .05em; text-transform: uppercase;
}
.brand .brand-text span { display: block; font-size: .72rem; color: var(--tan-dark); letter-spacing: .12em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { color: var(--forest); font-weight: 600; font-size: .96rem; }
.nav-links a:hover, .nav-links a.active { color: var(--tan-dark); }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--forest); margin: 5px 0; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 60vh; display: flex; align-items: center; overflow: hidden; }
.hero video, .hero .hero-fallback {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2;
}
.hero .hero-fallback {
  background: linear-gradient(160deg, #2e3320, #171a0e);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(28,32,18,.35), rgba(24,27,15,.62));
}
.hero-inner { color: #fff; max-width: 720px; padding: 24px 0; text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.hero h1 { color: #fff; }
.hero p { font-size: 1.25rem; margin: 20px 0 32px; color: #f0ede2; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Impact counters ---------- */
.impact { background: var(--sage); color: var(--ink); }
.impact h2 { color: var(--forest); }
.impact .eyebrow { color: var(--tan-dark); }
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 48px;
}
.stat {
  text-align: center; padding: 28px 16px;
  border: 1px solid rgba(42,42,34,.14); border-radius: var(--radius);
  background: rgba(255,255,255,.45);
}
.stat .num { font-family: var(--font-head); font-size: 3rem; color: var(--tan-dark); font-weight: 700; }
.stat .label { text-transform: uppercase; letter-spacing: .1em; font-size: .82rem; color: var(--ink-soft); margin-top: 6px; }

/* ---------- Value cards (goals / rules / promise) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 30px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 14px; }
.card p, .card li { color: var(--ink-soft); }
.card ul { list-style: none; }
.card ul li { padding-left: 26px; position: relative; margin-bottom: 12px; }
.card ul li::before { content: "›"; position: absolute; left: 6px; color: var(--tan-dark); font-weight: 700; }

/* ---------- Content blocks ---------- */
.prose { max-width: 780px; margin: 0 auto; }
.prose p { margin-bottom: 20px; font-size: 1.08rem; color: var(--ink-soft); }
.alt { background: #eef0e1; }

/* ---------- Commandments (education) ---------- */
.commandments { counter-reset: cmd; display: grid; gap: 18px; max-width: 900px; margin: 40px auto 0; }
.cmd {
  display: flex; gap: 20px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow);
}
.cmd .n {
  counter-increment: cmd; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%;
  background: var(--forest); color: var(--tan); font-family: var(--font-head);
  font-weight: 700; font-size: 1.2rem; display: grid; place-items: center;
}
.cmd .n::before { content: counter(cmd); }
.cmd h3 { font-size: 1.1rem; margin-bottom: 4px; }

/* ---------- Events ---------- */
.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.event-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.event-date {
  background: var(--forest); color: #fff; text-align: center; padding: 16px;
}
.event-date .mo { text-transform: uppercase; letter-spacing: .12em; color: var(--tan); font-size: .8rem; }
.event-date .day { font-family: var(--font-head); font-size: 2.2rem; line-height: 1; }
.event-body { padding: 22px 24px; flex: 1; display: flex; flex-direction: column; }
.event-body h3 { margin-bottom: 8px; }
.event-meta { font-size: .9rem; color: var(--ink-soft); margin-bottom: 12px; }
.event-body .btn { margin-top: auto; align-self: flex-start; }
.events-empty { text-align: center; padding: 60px 0; color: var(--ink-soft); }

/* ---------- Contact form ---------- */
.form-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem; background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--tan); border-color: var(--tan); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-note { font-size: .88rem; color: var(--ink-soft); margin-top: 10px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--tan); color: var(--forest); text-align: center; }
.cta-band h2 { color: var(--forest); }
.cta-band p { font-size: 1.15rem; margin: 14px 0 28px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--sage); color: var(--ink-soft); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer-brand .brand-text { color: var(--forest); }
.footer-brand p { color: var(--ink-soft); }
.site-footer h4 { color: var(--forest); font-family: var(--font-head); margin-bottom: 16px; font-size: 1.05rem; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--tan-dark); }
.socials { display: flex; gap: 14px; margin-top: 18px; }
.socials a {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(42,42,34,.10); color: var(--forest); transition: background .2s ease, color .2s ease;
}
.socials a:hover { background: var(--tan); color: #fff; }
.socials svg { width: 20px; height: 20px; fill: currentColor; }
.footer-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(42,42,34,.15);
  display: flex; justify-content: space-between; gap: 16px; font-size: .88rem; flex-wrap: wrap;
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero { background: linear-gradient(160deg, #2e3320, #232815); color: #fff; padding: 72px 0 60px; text-align: center; }
.page-hero h1 { color: #fff; }
.page-hero p { color: #e6e8d5; max-width: 640px; margin: 14px auto 0; font-size: 1.12rem; }

/* ---------- Media gallery (masonry) ---------- */
.gallery { column-count: 3; column-gap: 14px; }
.gallery img {
  width: 100%; margin: 0 0 14px; border-radius: 10px; display: block; cursor: zoom-in;
  box-shadow: var(--shadow); break-inside: avoid; transition: transform .2s ease, box-shadow .2s ease;
}
.gallery img:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
@media (max-width: 900px) { .gallery { column-count: 2; } }
@media (max-width: 560px) { .gallery { column-count: 1; } }

/* ---------- Gallery carousel ---------- */
.carousel-wrap { position: relative; }
.carousel {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; padding: 4px 2px 16px;
}
.carousel::-webkit-scrollbar { height: 8px; }
.carousel::-webkit-scrollbar-thumb { background: rgba(42,42,34,.25); border-radius: 4px; }
.carousel img {
  height: 400px; width: auto; flex: 0 0 auto; scroll-snap-align: center;
  border-radius: 10px; box-shadow: var(--shadow); cursor: zoom-in; display: block;
}
.car-btn {
  position: absolute; top: calc(50% - 8px); transform: translateY(-50%); z-index: 3;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--forest); color: #fff; font-size: 1.6rem; line-height: 1;
  box-shadow: var(--shadow); transition: background .2s ease;
}
.car-btn:hover { background: var(--tan); }
.car-btn.prev { left: -10px; }
.car-btn.next { right: -10px; }
@media (max-width: 640px) { .carousel img { height: 300px; } .car-btn { display: none; } }

#lightbox { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(20,19,14,.92);
  align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
#lightbox.open { display: flex; }
#lightbox img { max-width: 92vw; max-height: 90vh; border-radius: 10px; box-shadow: var(--shadow-lg); }

/* ---------- Press & podcasts ---------- */
.embed { position: relative; padding-bottom: 56.25%; height: 0; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-lg); max-width: 900px; margin: 0 auto; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-facade { background-size: cover; background-position: center; cursor: pointer; }
.video-facade .play-btn { position: absolute; inset: 0; margin: auto; width: 84px; height: 58px; border: 0; border-radius: 14px; background: rgba(20,20,16,.78); cursor: pointer; transition: background .2s ease; }
.video-facade .play-btn::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-38%,-50%); border-style: solid; border-width: 12px 0 12px 21px; border-color: transparent transparent transparent #fff; }
.video-facade:hover .play-btn { background: var(--tan); }
.feature { display: grid; grid-template-columns: 1.15fr 1fr; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); margin-bottom: 40px; }
.feature > img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; display: block; }
.feature .feature-body { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.feature .tag { align-self: flex-start; background: var(--tan); color: #fff; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; padding: 5px 12px; border-radius: 20px; margin-bottom: 14px; }
.feature blockquote { border-left: 3px solid var(--tan); padding-left: 14px; margin: 4px 0 18px; font-style: italic; color: var(--ink-soft); }
.vid-caption { text-align: center; color: var(--ink-soft); font-size: .92rem; margin: 12px 0 40px; }
@media (max-width: 800px) { .feature { grid-template-columns: 1fr; } .feature > img { min-height: 220px; } .feature .feature-body { padding: 28px; } }

.press { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 40px; }
.press-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.press-card img, .press-card .ph { width: 100%; height: 190px; object-fit: cover; display: block; }
.press-card .ph { background: var(--sage); color: var(--forest); display: grid; place-items: center; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em; font-size: 1.1rem; text-align: center; padding: 0 20px; }
.press-card .body { padding: 22px 24px; display: flex; flex-direction: column; flex: 1; }
.press-card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.press-card p { color: var(--ink-soft); font-size: .94rem; flex: 1; }
.press-card .btn { margin-top: 16px; align-self: flex-start; }
@media (max-width: 700px) { .press { grid-template-columns: 1fr; } }

/* ---------- Friends / partners ---------- */
.partners { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.partner {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); min-height: 160px; display: grid; place-items: center; padding: 24px;
  transition: transform .15s ease, box-shadow .2s ease;
}
.partner:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.partner img { max-width: 100%; max-height: 92px; width: auto; object-fit: contain; }
.partner-name { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .04em; color: var(--forest); font-size: 1.15rem; text-align: center; line-height: 1.2; }
@media (max-width: 800px) { .partners { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .partners { grid-template-columns: 1fr; } }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links {
    position: absolute; top: 74px; left: 0; right: 0;
    background: var(--sage); flex-direction: column; align-items: flex-start;
    gap: 0; padding: 10px 24px; display: none; border-bottom: 1px solid rgba(42,42,34,.12);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; padding: 10px 0; }
  .nav-toggle { display: block; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; }
  .form-wrap { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
}

/* Events: grouped sections (volunteer vs meet-the-team) */
.events-group + .events-group { margin-top: 54px; }
.event-tag { display:inline-block; font-weight:700; font-size:.9rem; color:var(--forest); background:#e7ecdd; border-radius:20px; padding:7px 15px; }
