/*
Theme Name: The Billy Martin Foundation
Description: Custom theme that carries the original billymartinfoundation.org design into WordPress.
Version: 1.0
Text Domain: bmf-theme
*/

/* Layout: a pinstripe front office. Navy pinstripe hero, then the foundation's work laid out like an annual report: mission, what we fund, programs, people, contact. */
:root {
  --bg: #f4f5f2;
  --surface: #ffffff;
  --ink: #142033;
  --muted: #56627a;
  --line: #d6dbd7;
  --navy: #0f1d2e;
  --navy-ink: #e8eef6;
  --navy-soft: #b9c6d6;
  --green: #1d6a40;
  --signal: #32c26a;
  --clay: #b5653a;
  --display: "Zilla Slab", "Rockwell", Georgia, serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b131d; --surface: #121c29; --ink: #e5ebf2; --muted: #9eabbd; --line: #26344a;
    --navy: #070e17; --green: #6fd29a; --signal: #3ddc78; --clay: #e3946a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b131d; --surface: #121c29; --ink: #e5ebf2; --muted: #9eabbd; --line: #26344a;
  --navy: #070e17; --green: #6fd29a; --signal: #3ddc78; --clay: #e3946a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; }
.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 20px; }
h1, h2, h3 { margin: 0; line-height: 1.12; text-wrap: balance; }
h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 4.2vw, 2.6rem); color: var(--ink); }
h3 { font-size: 1.12rem; font-weight: 700; line-height: 1.25; }
p { margin: 0; max-width: 65ch; }
a { color: var(--green); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
.eyebrow { font-family: var(--mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--clay); }
section { padding-block: 64px; border-top: 1px solid var(--line); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.muted { color: var(--muted); }
.notice { background: var(--surface); border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: .76rem; color: var(--muted); padding-block: 9px; }

.topnav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--navy); border-bottom: 1px solid #22344b; padding-block: 10px; }
.topnav .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; }
.topnav a { color: var(--navy-ink); text-decoration: none; font-family: var(--mono); font-size: .78rem; }
.topnav a:hover { color: var(--signal); }
.topnav .brand { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.topnav .links { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* Hero with pinstripes */
.hero { background-color: var(--navy); background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 1px, transparent 1px 22px); color: var(--navy-ink); padding-block: 56px 64px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 44px; align-items: center; }
.hero .eyebrow { color: #9fd8b0; }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 7.5vw, 4.6rem); line-height: 1; }
.hero h1 span { color: var(--signal); display: block; }
.hero .lede { font-size: 1.2rem; color: var(--navy-soft); margin-top: 18px; }
.countdown { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-top: 20px; font-family: var(--mono); font-size: .85rem; color: var(--navy-soft); }
.countdown b { font-family: var(--display); font-size: 1.7rem; color: var(--signal); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn { display: inline-block; background: var(--signal); color: #0b1a12; text-decoration: none; padding: 12px 20px; border-radius: 4px; font: 700 1rem var(--body); border: 0; cursor: pointer; }
.btn:hover { background: #e9f3ea; }
.btn.ghost { background: transparent; color: var(--navy-ink); border: 2px solid #3b5272; }
.btn.dark { background: var(--green); color: #fff; }
.btn.dark:hover { background: var(--clay); }
.portrait { margin: 0; display: grid; gap: 8px; }
.portrait img { width: 100%; max-width: 380px; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: 4px; border: 1px solid #22344b; filter: grayscale(.2); justify-self: center; display: block; }
.portrait figcaption { font-family: var(--mono); font-size: .68rem; color: var(--navy-soft); text-align: center; }

/* Mission statement */
.mission { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: start; }
.mission blockquote { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.3; color: var(--ink); border-left: 4px solid var(--signal); padding-left: 20px; }

/* Funding areas */
.areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.area { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.area .tag { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
.area p { color: var(--muted); font-size: .97rem; }
.area ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .94rem; }

/* Process */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: 24px; list-style: none; padding: 0; }
.steps li { counter-increment: s; display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 3px solid var(--green); min-width: 0; }
.steps li::before { content: "Step " counter(s); font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--clay); }
.steps p { font-size: .95rem; color: var(--muted); }

/* Programs */
.programs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.prog { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.prog .num { font-family: var(--display); font-weight: 700; font-size: 2rem; color: var(--clay); line-height: 1; }
.prog p { color: var(--muted); font-size: .97rem; flex: 1; }
.prog a { font-weight: 700; }

/* Billy strip */
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.strip figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.strip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: 4px; border: 1px solid var(--line); filter: grayscale(.15); }
.strip b { font-family: var(--mono); font-size: .74rem; color: var(--clay); }
.strip figcaption { font-size: .9rem; color: var(--muted); line-height: 1.4; }
.honest { margin-top: 20px; padding: 18px 20px; border: 1px dashed var(--clay); border-radius: 4px; max-width: 820px; }

/* Founders */
.founders { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.founders img { width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--line); display: block; }
.founders figure { margin: 0; display: grid; gap: 8px; }
.founders figcaption { font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.people { display: grid; gap: 14px; margin-top: 8px; }
.person { border-left: 3px solid var(--signal); padding-left: 14px; display: grid; gap: 4px; }
.person p { color: var(--muted); font-size: .96rem; }

/* Impact goals */
.goals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.goals div { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 3px solid var(--navy); min-width: 0; }
.goals .num { font-family: var(--display); font-weight: 700; font-size: 2.4rem; line-height: 1; color: var(--green); }
.goals p { color: var(--muted); font-size: .95rem; }

/* Status band */
.status { background: var(--navy); color: var(--navy-ink); }
.status h2 { color: var(--navy-ink); }
.status p { color: var(--navy-soft); }
.status .eyebrow { color: #9fd8b0; }
.status-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.ways { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ways li { border: 1px solid #2a3f5c; border-radius: 4px; padding: 14px 16px; display: grid; gap: 4px; }
.ways b { color: var(--navy-ink); }
.ways span { color: var(--navy-soft); font-size: .95rem; }

/* News */
.feed { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.post .meta { display: flex; flex-wrap: wrap; gap: 10px; font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.post .meta b { color: var(--clay); font-weight: 600; }
.post p { color: var(--muted); font-size: .97rem; }
.post a { font-weight: 700; }
.feed-empty { color: var(--muted); }

/* Forms */
.two { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.cform { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 24px; display: grid; gap: 14px; min-width: 0; }
.cform .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cform label { display: grid; gap: 6px; font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-width: 0; }
.cform input, .cform select, .cform textarea, .nrow input { font: 1rem var(--body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; width: 100%; }
.cform button { justify-self: start; }
.cf-status { font-family: var(--mono); font-size: .85rem; color: var(--green); min-height: 1.2em; }
.cf-status.err { color: var(--clay); }
.privacy { font-size: .85rem; color: var(--muted); }
.nform { display: grid; gap: 8px; max-width: 560px; margin-top: 20px; }
.nform label { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nrow { display: flex; flex-wrap: wrap; gap: 10px; }
.nrow input { flex: 1 1 220px; min-width: 0; width: auto; }
.leaders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.leader { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.leader img, .mono-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; object-position: top; border: 3px solid var(--signal); }
.mono-photo { display: grid; place-items: center; background: var(--navy); color: var(--signal); font-family: var(--display); font-weight: 700; font-size: 2.2rem; }
.leader p { color: var(--muted); font-size: .96rem; }
@media (max-width: 900px) { .leaders { grid-template-columns: 1fr; } }
footer { padding-block: 36px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: .76rem; color: var(--muted); display: block; }
footer p { max-width: none; }

@media (max-width: 900px) {
  .hero-grid, .mission, .founders, .status-grid, .two { grid-template-columns: 1fr; }
  .programs { grid-template-columns: 1fr; }
  .steps, .goals, .strip { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .areas, .steps, .goals, .cform .row, .feed { grid-template-columns: 1fr; }
}


html{color-scheme:light dark} body{margin:0} img{max-width:100%} [hidden]{display:none!important}

/* WordPress block compatibility */
.wp-block-group{box-sizing:border-box}