/* Sherilyn White Charitable Trust — styled to the St Cuthbert's College brand
   Brand tokens taken from stcuthberts.school.nz (WordPress theme presets).
   Headings: Larken (College) -> Fraunces fallback. Body: Aktiv Grotesk (College) -> Inter fallback.
   If the College's Adobe Fonts kit is extended to this domain, add the kit <link> in each page head
   and the real faces will be used automatically. */

:root {
  --green: #006655;        /* primary */
  --navy: #003955;         /* primary-accent */
  --sage: #586b59;         /* primary-alt */
  --sky: #94c6d4;          /* primary-alt-accent */
  --cream: #eee8da;        /* main-accent */
  --mist: #d0d9cb;         /* tertiary */
  --blush: #f2eff4;
  --border: #d7d5dc;
  --ink: #000;
  --white: #fff;

  --serif: larken, "Fraunces", Georgia, "Times New Roman", serif;
  --sans: aktiv-grotesk, "Inter", Helvetica, Arial, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;

  --content: 1000px;
  --wide: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 16px; top: 16px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(40px, 7vw, 88px); color: var(--green); letter-spacing: -.01em; }
h2 { font-size: clamp(30px, 4vw, 44px); color: var(--navy); }
h3 { font-size: clamp(22px, 2.4vw, 28px); color: var(--green); }
p { margin: 0 0 1.1em; }
.eyebrow { font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--sage); margin-bottom: 12px; display: block; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: var(--content); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--border); backdrop-filter: saturate(1.2) blur(6px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 78px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink); }
.brand img { width: 190px; height: auto; }
.brand-trust { font-family: var(--serif); font-size: 17px; line-height: 1.15; color: var(--navy); border-left: 1px solid var(--border); padding-left: 16px; }
.nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-size: 16px; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--green); color: var(--ink); }
.nav .btn { border-bottom: 0; padding: 9px 22px; font-size: 15px; }
.nav .btn:hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; color: var(--navy); }
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 1080px) {
  .brand-trust { display: none; }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; }
  .nav li a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav li:last-child a { margin-top: 14px; text-align: center; }
  .brand img { width: 160px; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-block; background: var(--navy); color: #fff !important; text-decoration: none; padding: 11px 28px; border-radius: 99px; font-size: 16px; line-height: 1.3; border: 1px solid var(--navy); transition: background .15s, color .15s; }
.btn:hover { background: var(--green); border-color: var(--green); }
.btn--ghost { background: transparent; color: var(--navy) !important; }
.btn--ghost:hover { background: var(--navy); color: #fff !important; }
.btn--light { background: #fff; color: var(--navy) !important; border-color: #fff; }
.btn--light:hover { background: var(--cream); border-color: var(--cream); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(78vh, 760px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--navy); }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,57,85,.05) 20%, rgba(0,57,85,.6) 60%, rgba(0,40,60,.9) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-bottom: clamp(40px, 7vw, 88px); width: 100%; }
.hero h1 { color: #fff; max-width: 14ch; margin-bottom: 16px; }
.hero p { font-size: clamp(18px, 2.2vw, 24px); max-width: 40ch; color: var(--cream); font-weight: 500; }
.hero .eyebrow { color: var(--sky); }

/* Page header (sub-pages) */
.page-head { background: var(--green); color: #fff; padding: clamp(56px, 9vw, 110px) 0 clamp(40px, 6vw, 72px); position: relative; overflow: hidden; }
.page-head.has-image { background: var(--navy); }
.page-head.has-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; opacity: .45; }
.page-head .wrap { position: relative; }
.page-head h1 { color: #fff; margin-bottom: 8px; }
.page-head p { color: var(--cream); font-size: clamp(18px, 2vw, 22px); max-width: 52ch; margin: 0; }
.page-head .eyebrow { color: var(--mist); }
.breadcrumb { font-size: 14px; margin-bottom: 20px; }
.breadcrumb a { color: var(--cream); }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--cream { background: var(--cream); }
.section--mist { background: var(--mist); }
.section--navy { background: var(--navy); color: #fff; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy .eyebrow { color: var(--sky); }
.section--green { background: var(--green); color: #fff; }
.section--green h2 { color: #fff; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split--40-60 { grid-template-columns: 2fr 3fr; }
@media (max-width: 820px) { .split, .split--40-60 { grid-template-columns: 1fr; } }

.lede { font-size: clamp(19px, 2.2vw, 23px); line-height: 1.5; color: var(--navy); }
.photo-frame img { border-radius: var(--radius); box-shadow: 0 20px 40px -20px rgba(0,57,85,.45); }
figure { margin: 0; }
figcaption { font-size: 15px; color: var(--sage); margin-top: 10px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.card { background: #fff; border-top: 4px solid var(--green); padding: 28px; border-radius: var(--radius); }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }

.objectives { list-style: none; padding: 0; margin: 24px 0 0; counter-reset: obj; display: grid; gap: 16px; }
.objectives li { background: #fff; border-radius: var(--radius); padding: 22px 24px 22px 76px; position: relative; counter-increment: obj; }
.objectives li::before { content: "(" counter(obj, lower-alpha) ")"; position: absolute; left: 24px; top: 18px; font-family: var(--serif); font-size: 26px; color: var(--green); }

.stat-row { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 32px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.25); }
.stat b { display: block; font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1; color: #fff; }
.stat span { font-size: 15px; color: var(--sky); }

.donate-box { background: #fff; color: var(--ink); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); }
.donate-box dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; }
.donate-box dt { color: var(--sage); font-size: 15px; }
.donate-box dd { margin: 0; font-weight: 500; }
.acct { font-family: var(--sans); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
@media (max-width: 520px) { .donate-box dl { grid-template-columns: 1fr; gap: 2px; } .donate-box dd { margin-bottom: 12px; } }

.honours img { border-radius: var(--radius); border: 1px solid var(--border); margin: 0 auto; }

/* Prose (sub-pages) */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .35em; }
.prose blockquote { margin: 2em 0; padding: 8px 0 8px 28px; border-left: 4px solid var(--green); font-family: var(--serif); font-size: clamp(21px, 2.4vw, 26px); line-height: 1.4; color: var(--navy); }
.prose blockquote cite { display: block; font-family: var(--sans); font-style: normal; font-size: 15px; color: var(--sage); margin-top: 12px; }
.note { background: var(--blush); border-left: 4px solid var(--sage); padding: 14px 18px; border-radius: var(--radius); font-size: 16px; }

.ranked { counter-reset: r; list-style: none; padding: 0 !important; }
.ranked li { counter-increment: r; display: flex; gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--border); margin: 0 !important; }
.ranked li::before { content: counter(r); font-family: var(--serif); color: var(--green); font-size: 24px; min-width: 28px; }
.ranked-group { font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--sage); margin: 24px 0 4px; }

.category { background: var(--cream); padding: 24px 28px; border-radius: var(--radius); margin: 0 0 20px; }
.category h3 { margin-top: 0; }
.category .comment { font-size: 16px; color: var(--sage); margin: 12px 0 0; font-style: italic; }

.checklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 20px 0 28px; }
.checklist > div { background: var(--cream); padding: 20px 22px; border-radius: var(--radius); }
.checklist h3 { font-size: 20px; margin-bottom: 8px; }
.checklist ul { margin: 0; padding-left: 1.1em; font-size: 16px; }

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 32px 0; }
.gallery a { display: block; }
@media (max-width: 600px) { .gallery { grid-template-columns: 1fr; } }

.dates { font-family: var(--serif); font-size: clamp(20px, 2.4vw, 26px); color: var(--cream); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #fff; padding: 64px 0 28px; font-size: 16px; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--sky); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-grid h2 { font-size: 22px; color: #fff; margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-logo { width: 200px; margin-bottom: 18px; }
.footer-base { margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.2); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 14px; color: var(--mist); }

:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .site-header, .site-footer, .nav-toggle { display: none; } .hero, .page-head { color: #000; background: none; } }
