/* ==========================================================================
   Rehoboth Trust Tanzania - site stylesheet
   Self-contained: no Bootstrap, no icon font, no webfont request.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --green-900: #0a3a1e;
  --green-800: #10492a;
  --green-700: #166534;
  --green-600: #15803d;
  --green-500: #22a355;
  --green-050: #eef6f1;

  --gold-600: #b9791b;
  --gold-500: #e0a33c;
  --gold-100: #fbf1dd;

  --ink:   #10201a;
  --body:  #4c5b54;
  --muted: #78877f;
  --line:  #e2eae5;
  --bg:    #ffffff;
  --soft:  #f5f9f6;

  --radius:   14px;
  --radius-l: 22px;

  --shadow-s: 0 1px 2px rgba(10,58,30,.06), 0 2px 8px rgba(10,58,30,.05);
  --shadow-m: 0 4px 10px rgba(10,58,30,.07), 0 14px 34px rgba(10,58,30,.09);
  --shadow-l: 0 10px 24px rgba(10,58,30,.10), 0 28px 60px rgba(10,58,30,.14);

  --wrap: 1140px;
  --gap:  clamp(18px, 3vw, 30px);

  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif;
  --serif: Iowan Old Style, Palatino Linotype, Palatino, Book Antiqua, Georgia, ui-serif, serif;

  --nav-h: 72px;
}

/* a little more room to breathe on very large displays */
@media (min-width: 1600px) { :root { --wrap: 1240px; } }

/* ---------- 2. Reset and base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(16px, .55vw + 14.6px, 17.5px);
  line-height: 1.72;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.18;
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: -.015em;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.5vw, 1.35rem); }
p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--green-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-800); }

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--green-800); color: #fff; padding: 10px 18px;
  border-radius: 0 0 10px 10px; text-decoration: none; transition: top .18s;
}
.skip:focus { top: 0; color: #fff; }

/* ---------- 3. Layout helpers ---------- */
.wrap { width: min(100% - clamp(1.6rem, 5vw, 2.5rem), var(--wrap)); margin-inline: auto; }
.section { padding: clamp(64px, 8vw, 108px) 0; }
.section--soft { background: var(--soft); }
.section--line { border-top: 1px solid var(--line); }

.grid { display: grid; gap: var(--gap); }
@media (min-width: 760px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 720px)  { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px)  { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.center   { text-align: center; }
.measure  { max-width: 62ch; }
.measure-c{ max-width: 64ch; margin-inline: auto; }

/* ---------- 4. Section headings ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--sans);
  font-size: .74rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--green-600);
  margin: 0 0 .9rem;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; border-radius: 2px;
  background: var(--gold-500);
}
.center .eyebrow { justify-content: center; }

.lede { font-size: 1.06em; color: var(--body); }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.6rem;
  font: inherit; font-weight: 650; font-family: var(--sans);
  line-height: 1.2;
  border-radius: 999px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }

.btn--primary { background: var(--green-600); color: #fff; box-shadow: var(--shadow-m); }
.btn--primary:hover { background: var(--green-700); color: #fff; }

.btn--gold { background: var(--gold-500); color: #22160a; box-shadow: var(--shadow-m); }
.btn--gold:hover { background: #edb254; color: #22160a; }

.btn--ghost { border-color: rgba(255,255,255,.55); color: #fff; background: rgba(255,255,255,.06); }
.btn--ghost:hover { background: rgba(255,255,255,.16); color: #fff; border-color: #fff; }

.btn--outline { border-color: var(--line); color: var(--green-700); background: #fff; }
.btn--outline:hover { border-color: var(--green-600); color: var(--green-800); }

/* ---------- 6. Navbar ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .3s ease, box-shadow .3s ease;
}
.nav__inner {
  display: flex; align-items: center; gap: 1rem;
  /* matches .wrap so the brand lines up with the content below it */
  width: min(100% - clamp(1.6rem, 5vw, 2.5rem), var(--wrap)); margin-inline: auto;
}

.brand {
  display: flex; align-items: center; gap: .65rem;
  text-decoration: none; color: #fff; margin-right: auto;
}
.brand__mark { width: 38px; height: 38px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--serif); font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; }
.brand__sub  { font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; opacity: .8; }

.nav__links { display: none; align-items: center; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  display: block; padding: .5rem .78rem; border-radius: 999px;
  color: rgba(255,255,255,.9); text-decoration: none;
  font-size: .85rem; font-weight: 600; letter-spacing: .02em;
  transition: background .18s, color .18s;
}
.nav__links a:hover { background: rgba(255,255,255,.14); color: #fff; }
.nav__links .is-cta { background: var(--gold-500); color: #22160a; margin-left: .5rem; }
.nav__links .is-cta:hover { background: #edb254; color: #22160a; }

/* solid state after scroll */
.nav.is-stuck {
  background: rgba(255,255,255,.94);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  backdrop-filter: saturate(1.6) blur(12px);
  box-shadow: 0 1px 0 var(--line), 0 6px 22px rgba(10,58,30,.07);
}
.nav.is-stuck .brand { color: var(--ink); }
.nav.is-stuck .brand__sub { color: var(--muted); opacity: 1; }
.nav.is-stuck .nav__links a { color: var(--body); }
.nav.is-stuck .nav__links a:hover { background: var(--green-050); color: var(--green-800); }
.nav.is-stuck .nav__links .is-cta { color: #22160a; }
.nav.is-stuck .burger span { background: var(--ink); }

/* burger */
.burger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0 10px;
  background: none; border: 0; cursor: pointer; border-radius: 10px;
}
.burger span {
  display: block; height: 2px; border-radius: 2px; background: #fff;
  transition: transform .25s ease, opacity .2s ease, background .3s;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile drawer */
.drawer {
  position: fixed; inset: var(--nav-h) 0 auto; z-index: 99;
  background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-l);
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .3s ease;
}
.drawer[data-open="true"] { grid-template-rows: 1fr; }
.drawer__in { overflow: hidden; }
.drawer ul { list-style: none; margin: 0; padding: .5rem 0 1.1rem; }
.drawer a {
  display: block; padding: .8rem 1.35rem; color: var(--ink);
  text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line);
}
.drawer a:hover { background: var(--green-050); color: var(--green-800); }
.drawer li:last-child a { border-bottom: 0; }

@media (min-width: 1000px) {
  .nav__links { display: flex; }
  .burger, .drawer { display: none; }
}

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;                 /* fallback: older iOS has no svh unit */
  min-height: min(92svh, 820px);
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 48px) 0 72px;
  isolation: isolate;
  color: #fff;
  background: var(--green-900);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: center 42%;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(100% 78% at 14% 16%, rgba(6,38,20,.55), transparent 66%),
    linear-gradient(178deg, rgba(6,38,20,.72) 0%, rgba(8,48,26,.46) 44%, rgba(6,34,18,.9) 100%);
}
.hero__content { max-width: 780px; }
.hero h1 { color: #fff; margin-bottom: .55rem; text-wrap: balance; }
.hero__tag {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .42rem 1rem .42rem .6rem;
  border: 1px solid rgba(255,255,255,.28); border-radius: 999px;
  background: rgba(255,255,255,.09);
  font-size: .76rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 1.5rem;
  flex-wrap: wrap; max-width: 100%;
}
@media (max-width: 430px) {
  .hero__tag { font-size: .64rem; letter-spacing: .05em; padding: .4rem .8rem .4rem .55rem; }
}
.hero__tag svg { width: 1.05rem; height: 1.05rem; color: var(--gold-500); }
.hero__rule { width: 74px; height: 3px; border-radius: 3px; background: var(--gold-500); margin: 1.5rem 0; }
.hero__lede { font-size: clamp(1.02rem, 1.35vw, 1.2rem); color: rgba(255,255,255,.9); max-width: 60ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 22px; translate: -50% 0;
  color: rgba(255,255,255,.75); display: grid; place-items: center;
  width: 40px; height: 40px; text-decoration: none;
  animation: bob 2.4s ease-in-out infinite;
}
.hero__scroll svg { width: 26px; height: 26px; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

/* a phone in landscape has very little height to give the hero */
@media (max-height: 560px) and (orientation: landscape) {
  .hero { min-height: auto; padding: calc(var(--nav-h) + 26px) 0 46px; }
  .hero__scroll { display: none; }
}

/* ---------- 8. Stats band ---------- */
.stats { background: var(--green-800); color: #fff; padding: clamp(34px, 4.5vw, 52px) 0; }
.stats .grid { gap: clamp(20px, 3vw, 34px); }
.stat { text-align: center; }
.stat__n {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  color: var(--gold-500); line-height: 1.1; display: block;
}
.stat__l {
  font-size: .82rem; letter-spacing: .05em; color: rgba(255,255,255,.82);
  margin-top: .35rem; display: block; line-height: 1.5;
}
/* one column */
@media (max-width: 639px) {
  .stat + .stat { border-top: 1px solid rgba(255,255,255,.16); padding-top: 20px; }
}
/* two columns: divide within each pair, and between the rows */
@media (min-width: 640px) and (max-width: 999px) {
  .stats .stat:nth-child(2n)  { border-left: 1px solid rgba(255,255,255,.16); }
  .stats .stat:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.16); padding-top: 22px; }
}
/* four columns */
@media (min-width: 1000px) {
  .stats .stat + .stat { border-left: 1px solid rgba(255,255,255,.16); }
}

/* ---------- 9. Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(24px, 2.6vw, 32px);
  box-shadow: var(--shadow-s);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  height: 100%;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-m); border-color: #cfe0d6; }
.card h3 { margin-bottom: .5rem; }
.card p { font-size: .96rem; color: var(--body); }

.card__icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 1.1rem;
  background: var(--green-050); color: var(--green-600);
}
.card__icon svg { width: 26px; height: 26px; }
.card:nth-child(2n) .card__icon { background: var(--gold-100); color: var(--gold-600); }

/* highlighted panels */
.panel {
  border-radius: var(--radius-l);
  padding: clamp(28px, 3.4vw, 44px);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-m);
  height: 100%;
}
.panel--green {
  background: linear-gradient(160deg, var(--green-800), var(--green-900));
  border-color: transparent; color: rgba(255,255,255,.88);
}
.panel--green h3, .panel--green h2 { color: #fff; }
.panel--fit { height: auto; align-self: start; }
.panel--gold { background: linear-gradient(160deg, #fff9ee, var(--gold-100)); border-color: #f0e0c1; }
.panel__mark { width: 44px; height: 44px; margin-bottom: 1rem; color: var(--gold-500); }
.panel--gold .panel__mark { color: var(--gold-600); }

/* ---------- 10. Numbered action areas ---------- */
.steps {
  display: grid; gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.step { background: #fff; padding: clamp(22px, 2.6vw, 30px); display: flex; gap: 1.1rem; }
.step__n {
  font-family: var(--serif); font-weight: 700; font-size: 1.9rem; line-height: 1;
  color: var(--green-500); opacity: .45; flex: none; width: 2.2ch;
}
.step h3 { font-size: 1.06rem; margin-bottom: .3rem; }
.step p { font-size: .93rem; margin: 0; }

/* ---------- 11. Figure and lightbox ---------- */
.figure {
  margin: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; padding: clamp(14px, 1.8vw, 22px); box-shadow: var(--shadow-m);
}
.figure__btn {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: 8px; overflow: hidden;
}
.figure img { border-radius: 8px; width: 100%; }
.figure figcaption {
  font-size: .82rem; color: var(--muted); margin-top: .9rem; text-align: center; letter-spacing: .02em;
}

.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 4vmin;
  background: rgba(6,26,15,.9);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.lightbox[data-open="true"] { display: flex; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 10px; box-shadow: var(--shadow-l); }
.lightbox__close {
  position: absolute; top: 16px; right: 18px; width: 46px; height: 46px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.3); cursor: pointer;
  background: rgba(255,255,255,.1); color: #fff; font-size: 1.4rem; line-height: 1;
}
.lightbox__close:hover { background: rgba(255,255,255,.22); }

/* ---------- 12. Team ---------- */
.person {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-s); height: 100%;
  display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
}
.person:hover { transform: translateY(-4px); box-shadow: var(--shadow-m); }
.person__photo { position: relative; aspect-ratio: 4 / 4.3; background: var(--green-050); overflow: hidden; }
.person__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; transition: transform .5s ease; }
.person:hover .person__photo img { transform: scale(1.045); }
.person__body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.person__role {
  font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-600); margin: 0 0 .4rem;
}
.person__name { font-size: 1.08rem; margin: 0 0 .55rem; }
.person__bio { font-size: .89rem; color: var(--muted); margin: 0; line-height: 1.62; }

.advisor {
  display: flex; align-items: center; gap: 1rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; box-shadow: var(--shadow-s);
}
.advisor__ini {
  width: 48px; height: 48px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green-050); color: var(--green-700);
  font-family: var(--serif); font-weight: 700; font-size: 1.02rem;
}
.advisor h3 { font-size: 1rem; margin: 0 0 .1rem; }
.advisor p {
  font-size: .78rem; margin: 0; color: var(--gold-600); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
}

/* ---------- 13. CTA band ---------- */
.cta {
  position: relative; isolation: isolate; overflow: hidden;
  background: linear-gradient(140deg, var(--green-700), var(--green-900) 70%);
  color: rgba(255,255,255,.9);
  padding: clamp(56px, 7vw, 88px) 0;
}
.cta::before {
  content: ""; position: absolute; z-index: -1;
  right: -8%; bottom: -50%; width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224,163,60,.24), transparent 66%);
}
.cta h2 { color: #fff; }
.cta .btn { margin-top: .6rem; }

/* ---------- 14. Contact ---------- */
.contact-card {
  display: flex; gap: 1.05rem; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-s); height: 100%;
  transition: transform .22s ease, box-shadow .22s ease;
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); }
.contact-card__icon {
  width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center;
  background: var(--green-050); color: var(--green-600);
}
.contact-card__icon svg { width: 22px; height: 22px; }
.contact-card h3 {
  font-size: .78rem; letter-spacing: .13em; text-transform: uppercase;
  font-family: var(--sans); color: var(--muted); margin: 0 0 .4rem; font-weight: 700;
}
.contact-card p, .contact-card a {
  font-size: .96rem; margin: 0; color: var(--ink); text-decoration: none; font-weight: 500;
}
.contact-card a:hover { color: var(--green-600); text-decoration: underline; }

/* ---------- 15. Footer ---------- */
.footer { background: var(--green-900); color: rgba(255,255,255,.7); padding: clamp(48px, 6vw, 70px) 0 0; }
.footer h4 {
  color: #fff; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  font-family: var(--sans); margin: 0 0 1rem;
}
.footer a { color: rgba(255,255,255,.72); text-decoration: none; }
.footer a:hover { color: var(--gold-500); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: .5rem; font-size: .92rem; }
.footer .brand { color: #fff; margin-bottom: 1rem; }
.footer p { font-size: .92rem; }
.footer__grid { display: grid; gap: var(--gap); }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1.2fr; } }
.footer__bar {
  margin-top: clamp(36px, 5vw, 56px); padding: 22px 0;
  border-top: 1px solid rgba(255,255,255,.14);
  display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: space-between;
  font-size: .84rem;
}

/* ---------- 16. Reveal on scroll ----------
   Hidden only when JS is available (html.js), so the page is never
   blank for no-JS users or if site.js fails to load. */
.js .reveal { opacity: 0; transform: translateY(22px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .7s ease, transform .7s cubic-bezier(.22,.68,.36,1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- 17. Print ---------- */
@media print {
  .nav, .drawer, .hero__scroll, .cta .btn, .lightbox { display: none !important; }
  .hero { min-height: auto; color: #000; background: none; }
  .hero::after, .hero__bg { display: none; }
  body { color: #000; }
}

/* ---------- 18. Contact layout ---------- */
.contact-layout { display: grid; gap: var(--gap); align-items: start; }
@media (min-width: 940px) {
  .contact-layout { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); }
}
.contact-details { display: grid; gap: 14px; }
.contact-details .contact-card { height: auto; }

/* ---------- 19. Form ---------- */
.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: clamp(24px, 3vw, 40px);
  box-shadow: var(--shadow-l);
}

.form { display: grid; gap: 18px; }
.form__row { display: grid; gap: 18px; }
@media (min-width: 600px) { .form__row { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: .45rem; min-width: 0; }
.field label {
  font-family: var(--sans);
  font-size: .84rem; font-weight: 700; color: var(--ink);
  letter-spacing: .01em;
}
.req { color: #c0392b; }
.field__hint {
  font-weight: 500; color: var(--muted); font-size: .78rem;
  text-transform: none; letter-spacing: 0;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--soft);
  border: 1.5px solid var(--line);
  border-radius: 11px;
  padding: .78rem .95rem;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.6; }

.field input::placeholder,
.field textarea::placeholder { color: #9aa8a0; }

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: #cfe0d6; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(34,163,85,.14);
}

/* custom select arrow (appearance:none removes the native one) */
.field select {
  -webkit-appearance: none; appearance: none;
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378877f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  background-size: 1.05rem;
  cursor: pointer;
}

/* invalid only after we mark it, never on first paint */
.field input.is-invalid,
.field textarea.is-invalid {
  border-color: #d3695c;
  background: #fdf6f5;
}
.field .field__error {
  font-size: .8rem; color: #b42318; font-weight: 600;
}

/* !important throughout: ".field input { width:100% }" is more specific and
   would otherwise stretch the hidden file input, widening the whole page. */
.visually-hidden {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  margin: -1px !important; padding: 0 !important; border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- 20. Attachments ---------- */
.dropzone {
  display: grid; place-items: center; gap: .35rem;
  padding: clamp(20px, 3vw, 30px);
  text-align: center; cursor: pointer;
  border: 1.5px dashed #cbdcd2;
  border-radius: 13px;
  background: var(--soft);
  color: var(--muted);
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--green-500);
  background: var(--green-050);
  color: var(--green-700);
}
.dropzone svg { width: 26px; height: 26px; }
.dropzone__text { font-size: .92rem; color: var(--body); }
.dropzone__text strong { color: var(--green-700); }
.dropzone__meta { font-size: .78rem; color: var(--muted); }
/* The real file input is visually hidden, so JS mirrors its focus here
   (a :has() rule would be dropped wholesale by older browsers). */
.dropzone.is-focused {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
  border-color: var(--green-500);
}

.filelist { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .5rem; }
.filelist:empty { display: none; }
.filelist li {
  display: flex; align-items: center; gap: .7rem;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: .55rem .65rem .55rem .8rem;
  font-size: .87rem; color: var(--ink);
}
.filelist li.is-bad { border-color: #e8bdb6; background: #fdf6f5; }
.filelist__icon { width: 18px; height: 18px; flex: none; color: var(--green-600); }
.filelist li.is-bad .filelist__icon { color: #b42318; }
.filelist__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist__size { color: var(--muted); font-size: .8rem; flex: none; }
.filelist__remove {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  border: 0; cursor: pointer; background: var(--green-050); color: var(--green-700);
  font-size: 1rem; line-height: 1; display: grid; place-items: center;
  transition: background .18s, color .18s;
}
.filelist__remove:hover { background: #d9ebe0; color: var(--green-800); }

/* ---------- 21. Submit + status ---------- */
.form__submit { width: 100%; margin-top: .2rem; }
.form__submit[disabled] { opacity: .72; cursor: progress; transform: none; }
.form__submit.is-sending .form__submit-label::after {
  content: ""; display: inline-block; width: 1em; height: 1em;
  margin-left: .6em; vertical-align: -.15em;
  border: 2px solid rgba(255,255,255,.45); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form__status { margin: 0; font-size: .92rem; font-weight: 600; border-radius: 11px; }
.form__status:empty { display: none; }
.form__status.is-ok  { background: var(--green-050); color: var(--green-800); padding: .85rem 1.05rem; }
.form__status.is-err { background: #fdf1ef; color: #b42318; padding: .85rem 1.05rem; }

.form__privacy {
  display: flex; gap: .7rem; align-items: flex-start;
  margin: 0; padding: .85rem 1rem;
  border: 1px dashed var(--line); border-radius: 11px;
  font-size: .82rem; line-height: 1.6; color: var(--muted);
}
.form__privacy svg { width: 18px; height: 18px; flex: none; color: var(--green-600); margin-top: .15rem; }

.form__fallback { margin: 0; font-size: .82rem; color: var(--muted); }

/* ---------- 22. Back to top ---------- */
.totop {
  position: fixed; right: clamp(16px, 3vw, 28px); bottom: clamp(16px, 3vw, 28px);
  z-index: 90; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green-700); color: #fff; border: 0; cursor: pointer;
  box-shadow: var(--shadow-m);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, background .18s;
}
.totop.is-shown { opacity: 1; visibility: visible; transform: none; }
.totop:hover { background: var(--green-800); }
.totop svg { width: 20px; height: 20px; }

/* ---------- 23. Polish ---------- */
::selection { background: var(--gold-500); color: #22160a; }

/* active nav link while scrolling */
.nav__links a.is-active { background: rgba(255,255,255,.16); color: #fff; }
.nav.is-stuck .nav__links a.is-active { background: var(--green-050); color: var(--green-800); }
.nav__links .is-cta.is-active { background: var(--gold-500); }

/* soft decorative wash behind light sections */
.section { position: relative; isolation: isolate; }
.section--wash { overflow: hidden; }
.section--wash::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: -8%; right: -12%; width: min(620px, 68vw); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,163,85,.09), transparent 68%);
}
.section--wash-left::before { right: auto; left: -14%; top: auto; bottom: -10%;
  background: radial-gradient(circle, rgba(224,163,60,.12), transparent 68%); }

/* accent line that grows on card hover */
.card { position: relative; overflow: hidden; }
.card::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
  background: linear-gradient(90deg, var(--green-500), var(--gold-500));
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s cubic-bezier(.22,.68,.36,1);
}
.card:hover::after { transform: scaleX(1); }

/* legibility scrim under team portraits */
.person__photo::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 38%;
  background: linear-gradient(to top, rgba(10,58,30,.22), transparent);
  pointer-events: none;
}

/* slow drift on the hero photo */
.hero__bg { animation: drift 26s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.07); } }

@media (prefers-reduced-motion: reduce) {
  .hero__bg { animation: none; }
  .form__submit.is-sending .form__submit-label::after { animation: none; }
}

@media print {
  .totop, .form-card, .dropzone { display: none !important; }
}
