/* ============================================================
   Te Whaiao o Hauora Hinengaro Charitable Trust Board
   tewhaiao.org - earthy, natural, tikanga-led design
   ============================================================ */

:root {
  --sand: #F6F1E6;
  --sand-2: #EDE3D0;
  --bone: #FCF9F2;
  --ink: #2C241A;
  --ink-soft: #5C4D3B;
  --whenua: #6B4A2F;
  --whenua-deep: #46311F;
  --kokowai: #B45A38;
  --gold: #D9A441;
  --gold-soft: #E8C57C;
  --rimu: #4E5D3A;
  --rimu-deep: #2F3A26;
  --moana: #26605B;
  --moana-deep: #17403C;
  --shadow: 0 10px 30px rgba(44, 36, 26, .12);
  --radius: 14px;
  --wrap: 1120px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; color: var(--whenua-deep); }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p + p { margin-top: 1em; }
a { color: var(--moana); }

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

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--kokowai);
  margin-bottom: .9rem;
}

.reo { font-style: italic; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 241, 230, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(107, 74, 47, .16);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 52px; height: 52px; }
.brand-name { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; color: var(--whenua-deep); line-height: 1.05; }
.brand-sub { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--moana); font-weight: 600; }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: .95rem;
  padding: 9px 14px;
  border-radius: 999px;
  transition: background .2s, color .2s;
}
.site-nav a:hover { background: var(--sand-2); color: var(--whenua-deep); }
.site-nav a.active { background: var(--whenua-deep); color: var(--bone); }
.site-nav a.cta { background: var(--kokowai); color: #fff; font-weight: 600; }
.site-nav a.cta:hover { background: var(--whenua); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--whenua-deep); margin: 5px 0; border-radius: 2px; transition: .25s; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: center;
  color: var(--bone);
  isolation: isolate;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/hero-medlands.jpg") center 62% / cover no-repeat;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(23, 64, 60, .82) 0%, rgba(23, 64, 60, .55) 42%, rgba(23, 64, 60, .12) 75%),
    linear-gradient(to top, rgba(44, 36, 26, .55) 0%, transparent 40%);
  z-index: -1;
}
.hero .wrap { padding-top: 90px; padding-bottom: 90px; max-width: var(--wrap); }
.hero-inner { max-width: 640px; }
.hero .eyebrow { color: var(--gold-soft); }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero .whakatauki-lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  color: var(--gold-soft);
  margin-bottom: 1.1rem;
  max-width: 560px;
}
.hero p.lede { font-size: clamp(1rem, 2vw, 1.18rem); color: rgba(252, 249, 242, .92); max-width: 560px; }
.hero-actions { margin-top: 2rem; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { background: var(--kokowai); color: #fff; }
.btn-primary:hover { background: #A04E2F; }
.btn-ghost { background: rgba(252, 249, 242, .14); color: #fff; border: 1.5px solid rgba(252, 249, 242, .65); }
.btn-ghost:hover { background: rgba(252, 249, 242, .24); }
.btn-dark { background: var(--moana-deep); color: var(--bone); }
.btn-dark:hover { background: var(--moana); }

.hero-credit {
  position: absolute;
  right: 14px;
  bottom: 10px;
  font-size: .66rem;
  color: rgba(252, 249, 242, .6);
}
.hero-credit a { color: inherit; }

/* ---------- sections ---------- */
section { padding: 84px 0; }
.section-sand2 { background: var(--sand-2); }
.section-dark { background: var(--moana-deep); color: var(--sand); }
.section-dark h2, .section-dark h3 { color: var(--bone); }

.section-head { max-width: 720px; margin-bottom: 3rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--ink-soft); margin-top: 1rem; }
.section-dark .section-head p { color: rgba(246, 241, 230, .85); }

/* koru divider */
.koru-divider {
  height: 26px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="26" viewBox="0 0 120 26"><path d="M0,16 C18,4 38,4 50,13 C56,18 54,24 48,24 C43,24 41,19 45,16 M60,20 C74,9 92,9 102,15 C107,19 105,24 100,24 C96,24 95,20 98,18" fill="none" stroke="%23B45A38" stroke-width="2.2" stroke-linecap="round" opacity=".55"/></svg>') repeat-x center / 120px 26px;
  margin: 0 auto;
  max-width: 360px;
}

/* ---------- outcome cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.card {
  background: var(--bone);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: 0 4px 16px rgba(44, 36, 26, .07);
  border-top: 4px solid var(--gold);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: .55rem; }
.card .reo-title { display: block; font-size: .85rem; color: var(--kokowai); font-weight: 600; letter-spacing: .06em; margin-bottom: .35rem; text-transform: uppercase; }
.card p { color: var(--ink-soft); font-size: .97rem; }
.card-koru { width: 34px; height: 34px; margin-bottom: 14px; }

/* ---------- whare tapa wha ---------- */
.tapawha-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.pou {
  background: var(--bone);
  border-radius: var(--radius);
  padding: 26px 24px;
  border-left: 5px solid var(--moana);
  box-shadow: 0 4px 14px rgba(44, 36, 26, .06);
}
.pou:nth-child(2) { border-left-color: var(--kokowai); }
.pou:nth-child(3) { border-left-color: var(--gold); }
.pou:nth-child(4) { border-left-color: var(--rimu); }
.pou h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.pou .pou-en { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--kokowai); font-weight: 600; }
.pou p { font-size: .93rem; color: var(--ink-soft); margin-top: .5rem; }

/* ---------- whakatauki band ---------- */
.whakatauki-band {
  position: relative;
  padding: 110px 0;
  color: var(--bone);
  isolation: isolate;
  text-align: center;
}
.whakatauki-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/carving.jpg") center / cover no-repeat;
  z-index: -2;
}
.whakatauki-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(23, 64, 60, .88), rgba(44, 36, 26, .84));
  z-index: -1;
}
.whakatauki-band blockquote { max-width: 780px; margin: 0 auto; }
.whakatauki-band .reo-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--gold-soft);
  line-height: 1.4;
}
.whakatauki-band .en-quote { margin-top: 1.1rem; font-size: clamp(1rem, 2vw, 1.2rem); color: rgba(252, 249, 242, .92); }
.whakatauki-band .note { margin-top: 1.4rem; font-size: .95rem; color: rgba(252, 249, 242, .75); max-width: 620px; margin-left: auto; margin-right: auto; }

/* ---------- split feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: center; }
.split.reverse > .split-media { order: 2; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: 100%; object-fit: cover; }
.split-media { position: relative; }
.split-media .media-credit { position: absolute; bottom: 8px; right: 12px; font-size: .64rem; color: rgba(255, 255, 255, .75); text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.split-body h2 { margin-bottom: 1rem; }
.split-body p { color: var(--ink-soft); }
.split-body ul { margin: 1.1rem 0 0 1.2rem; color: var(--ink-soft); }
.split-body li { margin-bottom: .5rem; }
.split-body li::marker { color: var(--kokowai); }

/* ---------- scripture ---------- */
.scripture {
  border-left: 4px solid var(--gold);
  background: var(--sand-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin-top: 1.4rem;
  font-size: .96rem;
}
.scripture .verse { font-style: italic; color: var(--ink); }
.scripture .ref { display: block; margin-top: .4rem; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--kokowai); }
.section-dark .scripture { background: rgba(246, 241, 230, .08); border-left-color: var(--gold); }
.section-dark .scripture .verse { color: var(--sand); }

/* ---------- services ---------- */
.page-hero {
  position: relative;
  padding: 110px 0 90px;
  color: var(--bone);
  isolation: isolate;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/hirakimata.jpg") center 40% / cover no-repeat;
  z-index: -2;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(23, 64, 60, .9), rgba(47, 58, 38, .68));
  z-index: -1;
}
.page-hero h1 { color: #fff; }
.page-hero p { max-width: 640px; margin-top: 1rem; color: rgba(252, 249, 242, .92); font-size: 1.08rem; }
.page-hero .eyebrow { color: var(--gold-soft); }

.service-block { display: grid; grid-template-columns: 88px 1fr; gap: 26px; background: var(--bone); border-radius: var(--radius); padding: 34px 34px; box-shadow: 0 4px 16px rgba(44,36,26,.07); margin-bottom: 26px; }
.service-num {
  font-family: var(--serif);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  padding-top: 4px;
}
.service-block h3 { font-size: 1.45rem; }
.service-block .reo-title { color: var(--kokowai); font-size: .88rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.service-block p { color: var(--ink-soft); margin-top: .7rem; }
.service-block ul { margin: .9rem 0 0 1.2rem; color: var(--ink-soft); font-size: .95rem; }
.service-block li { margin-bottom: .4rem; }
.service-block li::marker { color: var(--kokowai); }

/* ---------- crisis strip ---------- */
.crisis {
  background: var(--whenua-deep);
  color: var(--sand);
  padding: 22px 0;
  font-size: .95rem;
}
.crisis .wrap { display: flex; gap: 14px; align-items: flex-start; }
.crisis strong { color: var(--gold-soft); }
.crisis a { color: var(--gold-soft); }
.crisis-icon { flex: 0 0 auto; width: 26px; height: 26px; margin-top: 2px; }

/* ---------- board ---------- */
.board-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; }
.person { background: var(--bone); border-radius: var(--radius); overflow: hidden; box-shadow: 0 4px 16px rgba(44,36,26,.08); }
.person .photo { aspect-ratio: 3 / 3.4; overflow: hidden; position: relative; }
.person .photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.person.photo-david .photo img { position: absolute; width: 238%; height: auto; max-width: none; left: -114%; top: -5%; object-fit: unset; }
.person-body { padding: 20px 22px 24px; }
.person h3 { font-size: 1.18rem; }
.person .role { color: var(--kokowai); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .07em; margin-top: .2rem; }
.person p { font-size: .92rem; color: var(--ink-soft); margin-top: .6rem; }

/* ---------- heritage / Raihi ---------- */
.heritage { background: var(--sand-2); }
.heritage-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 44px;
  align-items: center;
  background: var(--bone);
  border-radius: var(--radius);
  padding: 44px;
  box-shadow: var(--shadow);
  border-top: 5px solid var(--gold);
}
.heritage-card img { border-radius: var(--radius); filter: sepia(.12); }
.heritage-card h2 { margin-bottom: .4rem; }
.heritage-card .reo { color: var(--kokowai); font-weight: 600; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; }
.heritage-card p { color: var(--ink-soft); margin-top: .8rem; }

/* ---------- charity details ---------- */
.charity-box {
  background: var(--bone);
  border: 1.5px solid rgba(107, 74, 47, .2);
  border-radius: var(--radius);
  padding: 30px 34px;
  font-size: .95rem;
  color: var(--ink-soft);
}
.charity-box h3 { margin-bottom: .8rem; }
.charity-box dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; }
.charity-box dt { font-weight: 600; color: var(--whenua-deep); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 44px; align-items: start; }
.form-card { background: var(--bone); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); }
.form-card label { display: block; font-weight: 600; font-size: .9rem; margin: 18px 0 6px; color: var(--whenua-deep); }
.form-card label:first-of-type { margin-top: 0; }
.form-card input, .form-card textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid rgba(107, 74, 47, .25);
  border-radius: 10px;
  font: inherit;
  background: var(--sand);
  color: var(--ink);
}
.form-card input:focus, .form-card textarea:focus { outline: 2.5px solid var(--moana); border-color: transparent; background: #fff; }
.form-card button { margin-top: 24px; border: 0; cursor: pointer; width: 100%; }
.form-note { font-size: .82rem; color: var(--ink-soft); margin-top: 14px; }

.contact-aside .info-block { background: var(--bone); border-radius: var(--radius); padding: 26px 28px; margin-bottom: 20px; box-shadow: 0 4px 14px rgba(44,36,26,.06); }
.contact-aside h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.contact-aside p { font-size: .93rem; color: var(--ink-soft); }

/* ---------- footer ---------- */
.site-footer { background: var(--moana-deep); color: rgba(246, 241, 230, .85); padding: 64px 0 34px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 44px; margin-bottom: 44px; }
.site-footer h4 { color: var(--bone); font-size: 1rem; margin-bottom: .9rem; }
.site-footer a { color: var(--gold-soft); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 1rem; }
.footer-brand img { width: 46px; height: 46px; }
.footer-brand .brand-name { color: var(--bone); font-size: 1.2rem; }
.footer-links li { list-style: none; margin-bottom: .5rem; }
.footer-meta {
  border-top: 1px solid rgba(246, 241, 230, .18);
  padding-top: 22px;
  font-size: .8rem;
  color: rgba(246, 241, 230, .6);
}
.footer-meta p + p { margin-top: .4rem; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .split, .contact-grid { grid-template-columns: 1fr; gap: 34px; }
  .split.reverse > .split-media { order: 0; }
  .heritage-card { grid-template-columns: 1fr; padding: 32px; }
  .heritage-card img { max-width: 320px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero { min-height: 74vh; }
}
@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--sand);
    border-bottom: 1px solid rgba(107, 74, 47, .16);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 13px 16px; border-radius: 10px; }
  .service-block { grid-template-columns: 1fr; padding: 28px; }
  .service-num { display: none; }
  section { padding: 60px 0; }
}
