/* BHS Academy — site styles
   Brand: navy #13334D, gold #FFBC00, slate blue #4B7E9D
   Headings: Oswald (self-hosted). Body: Calibri with close fallbacks. */

@font-face {
  font-family: "Oswald";
  src: url("../fonts/Oswald-Variable.woff2") format("woff2");
  font-weight: 200 700;
  font-display: swap;
}

:root {
  --navy: #13334D;
  --navy-deep: #0E2739;
  --gold: #FFBC00;
  --slate: #4B7E9D;
  --mist: #EEF3F6;
  --line: #D6E0E7;
  --text: #22313E;
  --white: #FFFFFF;
  --heading: "Oswald", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: Calibri, Carlito, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1160px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--slate); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--heading);
  color: var(--navy);
  line-height: 1.12;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 5.6vw, 4.25rem); font-weight: 600; text-transform: uppercase; letter-spacing: .005em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 500; }
h3 { font-size: 1.4rem; font-weight: 500; }
p { margin: 0 0 1em; max-width: 68ch; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--gold); color: var(--navy); padding: .5rem 1rem; }

/* The brand moment: a short gold rule under the main headline */
.rule::after {
  content: "";
  display: block;
  width: 88px;
  height: 5px;
  background: var(--gold);
  margin-top: .45em;
}

.lede { font-size: 1.3rem; color: var(--slate); max-width: 56ch; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 78px; }
.brand img { width: 150px; }
.nav-list { display: flex; align-items: center; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block; padding: .5rem .7rem;
  font-family: var(--heading); font-weight: 400; font-size: 1.02rem; letter-spacing: .02em;
  text-decoration: none; color: var(--navy);
  border-bottom: 3px solid transparent;
}
.nav-list a:hover { color: var(--slate); }
.nav-list a[aria-current="page"] { border-bottom-color: var(--gold); }
.nav-list .nav-donate { margin-left: .6rem; }
.nav-list .nav-donate a { background: var(--gold); border-radius: var(--radius); border-bottom: 0; padding: .55rem 1.1rem; font-weight: 500; }
.nav-list .nav-donate a:hover { background: #FFCB33; color: var(--navy); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius);
  padding: .45rem .8rem; font-family: var(--heading); font-size: 1rem; color: var(--navy); cursor: pointer;
}

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); display: none; }
  .site-nav.open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; padding: .5rem 1.25rem 1.25rem; gap: 0; }
  .nav-list a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .nav-list a[aria-current="page"] { border-bottom-color: var(--gold); }
  .nav-list .nav-donate { margin: 1rem 0 0; }
  .nav-list .nav-donate a { text-align: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--heading); font-weight: 500; font-size: 1.05rem; letter-spacing: .02em;
  padding: .8rem 1.5rem; border-radius: var(--radius); text-decoration: none; border: 2px solid transparent;
  transition: background-color .15s, color .15s;
}
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #FFCB33; color: var(--navy); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-deep); color: var(--white); }
.btn-line { border-color: var(--navy); color: var(--navy); }
.btn-line:hover { background: var(--navy); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* ---------- Hero (echoes the rising gold path in the logo) ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-photo { position: relative; z-index: 1; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.hero-path { position: absolute; z-index: 0; right: 0; bottom: 0; width: 58%; height: 100%; pointer-events: none; }
.hero-path::before, .hero-path::after { content: ""; position: absolute; inset: 0; }
.hero-path::before { background: var(--gold); clip-path: polygon(100% 0, 100% 24%, 22% 100%, 0 100%); }
.hero-path::after { background: var(--navy); clip-path: polygon(100% 30%, 100% 46%, 40% 100%, 27% 100%); }
.hero h1 { max-width: 15ch; }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-photo { max-width: 440px; }
  .hero-path { width: 100%; height: 45%; }
}

/* Page heads (interior pages) */
.page-head { padding: clamp(2.8rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.5rem); position: relative; overflow: hidden; }
.page-head::before {
  content: ""; position: absolute; right: 0; top: 0; width: 220px; height: 100%;
  background: var(--gold); clip-path: polygon(100% 0, 100% 30%, 40% 100%, 15% 100%);
}
.page-head::after {
  content: ""; position: absolute; right: 0; top: 0; width: 220px; height: 100%;
  background: var(--navy); clip-path: polygon(100% 30%, 100% 55%, 62% 100%, 40% 100%);
}
.page-head .wrap { position: relative; z-index: 1; }
@media (max-width: 700px) { .page-head::before, .page-head::after { width: 90px; } }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-mist { background: var(--mist); }
.section-navy { background: var(--navy); color: #E6EDF2; }
.section-navy h2, .section-navy h3 { color: var(--white); }
.section-navy a:not(.btn) { color: var(--gold); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split.flip > :first-child { order: 2; }
.split img { width: 100%; border-radius: var(--radius); aspect-ratio: 3 / 2; object-fit: cover; }
.split img.portrait { aspect-ratio: 4 / 5; object-position: center 20%; max-width: 460px; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }

.section-intro { max-width: 60ch; margin-bottom: 2.5rem; }

/* Offer list: three things BHS does, separated by rules rather than cards */
.offers { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 3px solid var(--navy); }
.offer { padding: 1.6rem 1.6rem 1.4rem 0; }
.offer + .offer { padding-left: 1.6rem; border-left: 1px solid var(--line); }
.offer p { font-size: 1.05rem; }
@media (max-width: 820px) {
  .offers { grid-template-columns: 1fr; }
  .offer, .offer + .offer { padding: 1.4rem 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

/* Get involved: three roles */
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.role { background: var(--white); border: 1px solid var(--line); border-top: 5px solid var(--navy); border-radius: var(--radius); padding: 1.8rem 1.6rem; display: flex; flex-direction: column; }
.role p { flex: 1; }
.role .btn { align-self: flex-start; }
.section-navy .role { color: var(--text); }
@media (max-width: 820px) { .roles { grid-template-columns: 1fr; } }

/* Progress figures */
.figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin: 0; }
.figures div { border-left: 5px solid var(--gold); padding-left: 1.1rem; }
.figures dt { font-family: var(--heading); font-size: clamp(2.8rem, 6vw, 4rem); font-weight: 600; color: var(--white); line-height: 1; }
.figures dd { margin: .4rem 0 0; color: #C9D7E1; }
@media (max-width: 700px) { .figures { grid-template-columns: 1fr; } }

/* Quote */
.quote { margin: 0 0 2.5rem; padding-left: 1.2rem; border-left: 5px solid var(--gold); }
.quote p { font-family: var(--heading); font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 400; color: var(--navy); line-height: 1.3; margin-bottom: .3em; }
.quote cite { font-style: italic; color: var(--slate); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 820px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* Team */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem 2rem; }
.member img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; object-position: center 25%; border-radius: var(--radius); margin-bottom: 1rem; }
.member .role-title { font-style: italic; color: var(--slate); margin: 0 0 .2rem; }
.member h3 { margin-bottom: .5rem; }
.member p { font-size: 1.02rem; }
.member .links { display: flex; gap: 1rem; font-size: .98rem; }
@media (max-width: 980px) { .team { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .team { grid-template-columns: 1fr; } }

/* Programs list */
.program { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding: clamp(2rem, 4vw, 3rem) 0; border-top: 1px solid var(--line); }
.program:first-child { border-top: 0; }
.program img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.program .tag { display: inline-block; font-size: .95rem; color: var(--navy); background: rgba(255,188,0,.25); padding: .15rem .6rem; border-radius: 3px; margin-bottom: .7rem; }
@media (max-width: 820px) { .program { grid-template-columns: 1fr; } }

/* Resources */
.resource { padding: 1.6rem 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 2fr; gap: 1.5rem; }
.resource:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 700px) { .resource { grid-template-columns: 1fr; gap: .3rem; } }

/* Blog */
.post-list { display: grid; gap: 2rem; }
.post-card { display: grid; grid-template-columns: 300px 1fr; gap: 1.8rem; align-items: start; }
.post-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); }
.post-card time, .article time { color: var(--slate); font-style: italic; font-size: 1rem; }
@media (max-width: 700px) { .post-card { grid-template-columns: 1fr; } }
.article { max-width: 720px; margin-inline: auto; padding: 2.5rem 0; border-top: 3px solid var(--navy); }
.article + .article { margin-top: 2rem; }
.article img { width: 100%; border-radius: var(--radius); margin: 1.2rem 0 1.6rem; }

/* Contact / donate */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.contact-grid dl { margin: 0; }
.contact-grid dt { font-family: var(--heading); color: var(--navy); font-size: 1.15rem; margin-top: 1.2rem; }
.contact-grid dd { margin: .2rem 0 0; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

.callout { background: var(--mist); border-left: 5px solid var(--gold); padding: 1.6rem 1.8rem; border-radius: 0 var(--radius) var(--radius) 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #C9D7E1; padding: 3.5rem 0 2rem; font-size: 1rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-grid img { width: 170px; margin-bottom: 1rem; }
.footer-grid h4 { color: var(--white); font-weight: 400; font-size: 1.15rem; margin-bottom: .7rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: .4rem; }
.footer-base { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.15); font-size: .92rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* Applications announcement */
.apply-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.apply .rule::after { margin-top: .35em; }
.apply-links { display: grid; gap: .8rem; }
.apply-links .btn { display: flex; flex-direction: column; padding: 1rem 1.3rem; font-size: 1.2rem; }
.apply-links small { font-family: var(--body); font-weight: 400; font-size: .98rem; letter-spacing: 0; margin-top: .15rem; }
@media (max-width: 820px) { .apply-grid { grid-template-columns: 1fr; } }
.apply-btn { background: var(--white); color: var(--navy); border: 0; border-left: 6px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; }
.apply-btn:hover { background: var(--mist); color: var(--navy); }
.apply-btn small { color: var(--slate); }
.is-pending { cursor: default; opacity: .75; }
.btn-navy.is-pending { background: transparent; color: var(--slate); border-color: var(--line); }
.btn-gold.is-pending { background: transparent; color: var(--navy); border-color: var(--slate); }
.apply-btn.is-pending:hover { background: var(--white); }
