/* The PCN Foundation - memorial palette: ivory, ink, coral-gold */
:root {
  --ivory: #FAF7F0;
  --paper: #FFFFFF;
  --ink: #141210;
  --ink-soft: #4A453D;
  --gold: #C9A227;
  --gold-dark: #A5841B;
  --line: #E6E0D2;
  --ok: #2E7D32;
  --warn: #B26A00;
  --err: #B3261E;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
}
h1, h2, h3, blockquote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin-bottom: .5em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: .6em; }
h3 { font-size: 1.35rem; margin-bottom: .35em; }
p { margin-bottom: 1em; }
a { color: var(--gold-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code { background: #efe9db; padding: 2px 6px; border-radius: 4px; font-size: .85em; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 800px; }
.narrow-p { max-width: 720px; }
.center { text-align: center; }
.muted { color: var(--ink-soft); }
.small { font-size: .85rem; }
.section { padding: 56px 0; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .78rem;
  font-weight: 600; color: var(--gold-dark); margin-bottom: 10px;
}
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.link-more { font-weight: 600; white-space: nowrap; }

/* Header */
.site-header {
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 54px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.site-nav a { color: var(--ink); font-weight: 500; font-size: .95rem; }
.site-nav a.active { color: var(--gold-dark); }
.admin-badge {
  background: var(--ink); color: var(--ivory); font-size: .7rem; font-weight: 600;
  padding: 3px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: .08em;
}

/* Buttons */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 8px; border: 0;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: .95rem;
  cursor: pointer; text-decoration: none !important; transition: all .15s ease;
}
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--ivory); }
.btn-nav { padding: 9px 20px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; cursor: pointer; font: inherit; color: var(--gold-dark); padding: 0; }
.btn-link.danger { color: var(--err); font-size: .85rem; }
.pill {
  display: inline-block; padding: 5px 14px; border-radius: 20px; border: 1px solid var(--line);
  font-size: .85rem; color: var(--ink-soft); margin-right: 6px;
}
.pill-active { background: var(--ink); color: var(--ivory); border-color: var(--ink); }

/* Hero */
.hero { background: linear-gradient(180deg, #FFFEFB 0%, var(--ivory) 100%); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.hero h1 em { color: var(--gold-dark); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.hero-portrait img {
  border-radius: 14px; box-shadow: 0 24px 60px -20px rgba(20, 18, 16, .35);
  border: 6px solid #fff;
}

/* Project cards */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; margin-top: 26px; }
.project-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  color: var(--ink); text-decoration: none !important; overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease; display: block;
}
.project-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px -18px rgba(20, 18, 16, .3); }
.project-card-body { padding: 24px; }
.project-card p { color: var(--ink-soft); font-size: .95rem; }
.project-status {
  display: inline-block; font-size: .72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; padding: 3px 10px; border-radius: 20px; margin-bottom: 12px;
}
.status-active { background: #E7F0E7; color: var(--ok); }
.status-completed { background: #EFE9DB; color: var(--gold-dark); }
.status-archived, .status-draft { background: #ECEAE6; color: var(--ink-soft); }
.status-don-paid { background: #E7F0E7; color: var(--ok); }
.status-don-pending { background: #FBF3E2; color: var(--warn); }
.status-don-failed { background: #F9E5E4; color: var(--err); }

/* Progress bars */
.progress { height: 8px; background: #EDE8DC; border-radius: 6px; overflow: hidden; margin: 14px 0 8px; }
.progress.big { height: 12px; margin-top: 24px; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-dark)); border-radius: 6px; }
.progress-meta { display: flex; justify-content: space-between; font-size: .88rem; color: var(--ink-soft); }

/* Band sections */
.band { background: var(--ink); color: var(--ivory); }
.band a { color: var(--gold); }
.band h2 { color: var(--ivory); }
.band-inner blockquote { font-size: clamp(1.3rem, 3vw, 1.8rem); font-style: italic; max-width: 760px; margin-bottom: 18px; }
.band-inner cite { display: block; font-size: 1rem; font-style: normal; margin-top: 14px; color: #B8B2A6; }
.band-stats { display: flex; gap: 48px; flex-wrap: wrap; margin: 30px 0 10px; }
.band-note { color: #B8B2A6; font-size: .9rem; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 2rem; font-weight: 700; color: var(--gold); }
.stat-label { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: inherit; opacity: .75; }

/* About */
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; margin-top: 10px; }
.about-portrait img { border-radius: 12px; border: 5px solid #fff; box-shadow: 0 18px 44px -18px rgba(20, 18, 16, .35); }
.caption { font-size: .85rem; color: var(--ink-soft); margin-top: 10px; text-align: center; }
.family-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; margin-top: 26px; }
.family-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 26px 22px; }
.family-initial {
  width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.5rem; font-weight: 700; margin-bottom: 16px;
}
.family-role { color: var(--gold-dark); font-weight: 600; font-size: .88rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.family-blurb { color: var(--ink-soft); font-size: .92rem; margin: 0; }

/* Before/after images */
.project-card-img { width: 100%; height: 170px; object-fit: cover; }
.ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 10px; }
.ba-figure { margin: 0; }
.ba-figure img { width: 100%; border-radius: 12px; border: 5px solid #fff; box-shadow: 0 14px 34px -16px rgba(20, 18, 16, .3); }
.ba-label {
  display: inline-block; margin-top: 10px; font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em; padding: 3px 12px; border-radius: 20px;
}
.ba-before { background: #ECEAE6; color: var(--ink-soft); }
.ba-after { background: var(--gold); color: var(--ink); }
.admin-thumb { max-width: 180px; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 8px; }
@media (max-width: 640px) { .ba-grid { grid-template-columns: 1fr; } }

/* Progress update media */
.update-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.update-media img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; border: 3px solid #fff; box-shadow: 0 8px 20px -10px rgba(20, 18, 16, .3); }
.update-video { position: relative; aspect-ratio: 16 / 9; margin: 14px 0; border-radius: 12px; overflow: hidden; box-shadow: 0 14px 34px -16px rgba(20, 18, 16, .3); }
.update-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Timeline (progress updates) */
.timeline { border-left: 2px solid var(--line); padding-left: 28px; margin-top: 20px; }
.timeline-item { position: relative; padding-bottom: 34px; }
.timeline-item::before {
  content: ''; position: absolute; left: -35px; top: 7px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--gold); border: 2.5px solid var(--ivory);
}
.timeline-date { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); margin-bottom: 4px; }
.prose { white-space: normal; }

/* Supporters */
.supporter-list { list-style: none; }
.supporter-list li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }

/* Forms */
.donate-form { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 30px; margin-top: 24px; }
.field { display: block; margin-bottom: 18px; }
.field > span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field small { font-weight: 400; color: var(--ink-soft); }
.field input:not([type=radio]):not([type=checkbox]), .field select, .field textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 8px;
  font: inherit; background: var(--ivory); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gateway-choice { display: grid; gap: 10px; }
.gateway-choice label {
  border: 1.5px solid var(--line); border-radius: 8px; padding: 12px 14px; cursor: pointer; background: var(--ivory);
  display: flex; align-items: center; gap: 10px;
}
.gateway-choice input { flex: 0 0 auto; }
.gateway-choice label:has(input:checked) { border-color: var(--gold); background: #FBF6E7; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 22px; font-size: .92rem; color: var(--ink-soft); }
.check input { margin-top: 4px; }

/* Flash + status */
.flash { padding: 14px 18px; border-radius: 10px; margin: 18px 0; font-size: .95rem; }
.flash-error { background: #F9E5E4; color: var(--err); }
.flash-success { background: #E7F0E7; color: var(--ok); }
.flash-info { background: #EFE9DB; color: var(--ink-soft); }
.status-icon {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 22px;
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
}
.status-icon.ok { background: #E7F0E7; color: var(--ok); }
.status-icon.pending { background: #FBF3E2; color: var(--warn); }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; margin-top: 20px; }
.ledger-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ledger-table th, .ledger-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ledger-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); background: #FCFAF5; }
.ledger-table tr:last-child td { border-bottom: 0; }
.ledger-table .num { text-align: right; }
.ledger-totals { display: flex; gap: 44px; flex-wrap: wrap; margin: 26px 0 8px; }
.ledger-totals .stat-num { color: var(--gold-dark); }
.ledger-totals .stat-label { color: var(--ink-soft); }

/* Footer */
.site-footer { background: var(--ink); color: #B8B2A6; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding: 52px 22px 30px; }
.footer-logo { height: 64px; width: auto; margin-bottom: 14px; }
.footer-tag { font-size: .9rem; margin-bottom: 4px; }
.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-links a { color: var(--ivory); font-size: .92rem; }
.footer-links a:hover { color: var(--gold); }
.footer-legal {
  padding-bottom: 28px; font-size: .82rem; border-top: 1px solid #2A2722; margin-top: 8px; padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.footer-legal a { color: var(--gold); }
.footer-admin { display: inline-flex; align-items: center; gap: 6px; color: #B8B2A6 !important; white-space: nowrap; }
.footer-admin:hover { color: var(--gold) !important; text-decoration: none; }

/* Responsive */
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-portrait { order: -1; max-width: 340px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-portrait { max-width: 300px; }
  .field-row { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; align-items: flex-start; }
}
