/* The Five Roots Foundation — Design System */
:root {
  --forest-deep: #0c2418;
  --forest: #143528;
  --leaf: #1e5c3a;
  --canopy: #2f7a4f;
  --moss: #4a9b6e;
  --mist: #e6efe8;
  --fog: #f4f7f4;
  --sand: #d9cbb5;
  --amber: #b8893a;
  --amber-soft: #d4a84b;
  --soil: #2a1f14;
  --ink: #152018;
  --ink-muted: #4a5a4e;
  --white: #ffffff;
  --line: rgba(20, 53, 40, 0.12);
  --shadow: 0 24px 60px rgba(12, 36, 24, 0.18);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 7rem;

  --radius: 2px;
  --nav-h: 4.5rem;
  --max: 72rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--fog);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 2.5rem, 44rem);
}

/* Typography */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--canopy);
}

h1,
h2,
h3,
.display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--forest-deep);
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.75rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
}

.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--ink-muted);
  max-width: 38rem;
}

.text-balance {
  text-wrap: balance;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.55rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), background 0.25s ease, color 0.25s ease,
    border-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--amber);
  color: var(--soil);
}

.btn--primary:hover {
  background: var(--amber-soft);
}

.btn--secondary {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.8);
}

.btn--dark {
  background: var(--forest);
  color: var(--white);
}

.btn--dark:hover {
  background: var(--leaf);
}

.btn--ghost {
  color: var(--leaf);
  padding-inline: 0;
  gap: 0.4rem;
}

.btn--ghost:hover {
  color: var(--forest-deep);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: var(--space-md);
}

/* Navigation */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}

.site-header.is-scrolled {
  background: rgba(244, 247, 244, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.site-header.is-scrolled .brand-name,
.site-header.is-scrolled .nav-link {
  color: var(--forest-deep);
}

.site-header.is-scrolled .nav-toggle span {
  background: var(--forest-deep);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 2;
}

.brand-mark {
  width: 2.4rem;
  height: 2.4rem;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 550;
  color: var(--white);
  line-height: 1.2;
  transition: color 0.3s ease;
}

.brand-name span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.25s ease, opacity 0.25s ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--amber-soft);
}

.site-header.is-scrolled .nav-link:hover,
.site-header.is-scrolled .nav-link[aria-current="page"] {
  color: var(--canopy);
}

.nav-cta {
  padding: 0.55rem 1rem;
  background: var(--amber);
  color: var(--soil) !important;
  border-radius: var(--radius);
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--amber-soft);
  color: var(--soil) !important;
}

.site-header.is-scrolled .nav-cta {
  color: var(--soil) !important;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  position: relative;
  z-index: 2;
}

.nav-toggle span {
  display: block;
  width: 1.35rem;
  height: 2px;
  margin: 0.3rem auto;
  background: var(--white);
  transition: transform 0.3s var(--ease), opacity 0.3s ease, background 0.3s ease;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: hero-ken 18s var(--ease) forwards;
}

@keyframes hero-ken {
  to {
    transform: scale(1);
  }
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 36, 24, 0.35) 0%, rgba(12, 36, 24, 0.2) 35%, rgba(12, 36, 24, 0.78) 100%),
    linear-gradient(90deg, rgba(12, 36, 24, 0.55) 0%, transparent 55%);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: calc(var(--nav-h) + 3rem) 0 4.5rem;
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.15s forwards;
}

.hero h1 {
  color: var(--white);
  max-width: 14ch;
  margin-bottom: 1.15rem;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.3s forwards;
}

.hero .lede {
  color: rgba(255, 255, 255, 0.88);
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.45s forwards;
}

.hero .btn-group {
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.6s forwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.4rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.hero__scroll::after {
  content: "";
  width: 1px;
  height: 2rem;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), transparent);
  animation: pulse-line 2s ease infinite;
}

@keyframes pulse-line {
  0%,
  100% {
    opacity: 0.35;
    transform: scaleY(0.7);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* Page hero (interior) */
.page-hero {
  position: relative;
  padding: calc(var(--nav-h) + 4.5rem) 0 4rem;
  background: var(--forest-deep);
  color: var(--white);
  overflow: hidden;
}

body.has-page-hero .site-header:not(.is-scrolled) {
  background: transparent;
}

body.has-page-hero .site-header:not(.is-scrolled) .brand-name,
body.has-page-hero .site-header:not(.is-scrolled) .nav-link {
  color: var(--white);
}

body.has-page-hero .site-header:not(.is-scrolled) .nav-toggle span {
  background: var(--white);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 85% 20%, rgba(47, 122, 79, 0.35), transparent),
    radial-gradient(ellipse 40% 50% at 10% 90%, rgba(184, 137, 58, 0.15), transparent);
  pointer-events: none;
}

.page-hero .container {
  position: relative;
}

.page-hero h1 {
  color: var(--white);
  max-width: 16ch;
  margin: 0.75rem 0 1rem;
}

.page-hero .lede {
  color: rgba(255, 255, 255, 0.8);
}

/* Sections */
.section {
  padding: var(--space-2xl) 0;
}

.section--mist {
  background: var(--mist);
}

.section--forest {
  background: var(--forest);
  color: var(--white);
}

.section--forest h2,
.section--forest h3 {
  color: var(--white);
}

.section--forest .lede,
.section--forest p {
  color: rgba(255, 255, 255, 0.82);
}

.section__head {
  margin-bottom: var(--space-xl);
  max-width: 38rem;
}

.section__head .eyebrow {
  margin-bottom: 0.75rem;
  display: block;
}

.section__head h2 {
  margin-bottom: 0.85rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.split--reverse > :first-child {
  order: 2;
}

.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--forest);
}

.media-frame--wide {
  aspect-ratio: 16 / 10;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.media-frame:hover img {
  transform: scale(1.04);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(12, 36, 24, 0.15), transparent 50%);
  pointer-events: none;
}

/* Story */
.story-quote {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 450;
  line-height: 1.35;
  color: var(--forest);
  margin: var(--space-lg) 0 var(--space-md);
  max-width: 28ch;
}

.story-meta {
  font-size: 0.9rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-top: 1.5rem;
}

/* Vision / Mission */
.vm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.vm-block {
  background: var(--fog);
  padding: clamp(1.75rem, 3vw, 2.75rem);
}

.vm-block h3 {
  margin: 0.5rem 0 1rem;
}

.vm-block p {
  color: var(--ink-muted);
}

/* Five Roots */
.roots-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.root-item {
  background: var(--forest);
  padding: 1.75rem 1.35rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 100%;
  transition: background 0.35s ease;
}

.root-item:hover {
  background: var(--leaf);
}

.root-num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--amber);
  line-height: 1;
}

.root-item h3 {
  font-size: 1.15rem;
  color: var(--white);
}

.root-item p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.75);
  flex: 1;
}

.root-item a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--amber-soft);
  margin-top: 0.5rem;
}

/* Values */
.values-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
}

.value {
  text-align: center;
  padding: 1.5rem 0.75rem;
  border-top: 2px solid var(--canopy);
}

.value h3 {
  font-size: 1.25rem;
  margin-bottom: 0.65rem;
}

.value p {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* Impact stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.stat {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.25rem);
  color: var(--leaf);
  line-height: 1;
  margin-bottom: 0.65rem;
}

.stat__label {
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.section--forest .stat {
  border-top-color: rgba(255, 255, 255, 0.18);
}

.section--forest .stat__num {
  color: var(--amber-soft);
}

.section--forest .stat__label {
  color: rgba(255, 255, 255, 0.75);
}

/* Geography */
.geo-list {
  display: grid;
  gap: 0;
}

.geo-item {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1.5rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.geo-item:first-child {
  border-top: 1px solid var(--line);
}

.geo-year {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--canopy);
  font-weight: 550;
}

.geo-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.geo-item p {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

/* Programme detail */
.programme {
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--line);
}

.programme:last-child {
  border-bottom: none;
}

.programme__num {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--moss);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.activity-list {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.65rem;
}

.activity-list li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--ink-muted);
}

.activity-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 0.45rem;
  height: 0.45rem;
  background: var(--canopy);
  border-radius: 50%;
}

/* CTA band */
.cta-band {
  padding: var(--space-2xl) 0;
  background:
    linear-gradient(135deg, rgba(12, 36, 24, 0.88), rgba(20, 53, 40, 0.82)),
    url("https://images.unsplash.com/photo-1542601906990-b4d3fb778b09?auto=format&fit=crop&w=1600&q=80")
      center / cover;
  color: var(--white);
  text-align: center;
}

.cta-band h2 {
  color: var(--white);
  margin: 0.75rem auto 1rem;
  max-width: 18ch;
}

.cta-band .lede {
  margin-inline: auto;
  color: rgba(255, 255, 255, 0.85);
}

.cta-band .btn-group {
  justify-content: center;
}

/* Forms */
.form {
  display: grid;
  gap: 1.15rem;
  max-width: 36rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--forest);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: var(--white);
  font: inherit;
  color: var(--ink);
  border-radius: var(--radius);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--canopy);
  box-shadow: 0 0 0 3px rgba(47, 122, 79, 0.15);
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.partner-paths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: var(--space-lg);
}

.partner-path h3 {
  margin-bottom: 0.65rem;
  padding-top: 1rem;
  border-top: 2px solid var(--canopy);
}

.partner-path p {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  background: var(--forest-deep);
  color: rgba(255, 255, 255, 0.75);
  padding: var(--space-xl) 0 var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: var(--space-xl);
}

.footer-brand .brand-name {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.92rem;
  max-width: 24rem;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-soft);
  margin-bottom: 1rem;
}

.footer-col a {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.55rem;
  transition: color 0.25s ease;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
}

.tagline {
  font-family: var(--font-display);
  font-style: italic;
  color: rgba(255, 255, 255, 0.55);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(1.75rem);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}
.reveal-delay-4 {
  transition-delay: 0.4s;
}

/* Principles list */
.principles {
  display: grid;
  gap: 0;
}

.principle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.principle:first-child {
  border-top: 1px solid var(--line);
}

.principle__icon {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  background: var(--mist);
  color: var(--leaf);
  font-family: var(--font-display);
  font-size: 1rem;
}

.principle h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.principle p {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

/* Targets table-like */
.targets {
  display: grid;
  gap: 0;
}

.target {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.target:first-child {
  border-top: 1px solid var(--line);
}

.target h3 {
  font-size: 1.05rem;
}

.target p {
  color: var(--ink-muted);
}

/* Mobile */
@media (max-width: 960px) {
  .roots-grid {
    grid-template-columns: 1fr 1fr;
  }

  .values-row {
    grid-template-columns: 1fr 1fr;
  }

  .value:last-child {
    grid-column: 1 / -1;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .partner-paths {
    grid-template-columns: 1fr;
  }

  .split,
  .vm-grid,
  .form-row,
  .target {
    grid-template-columns: 1fr;
  }

  .split--reverse > :first-child {
    order: 0;
  }

  .media-frame {
    aspect-ratio: 16 / 11;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    background: var(--forest-deep);
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
  }

  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    font-size: 1.35rem;
    color: var(--white);
  }

  .nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .roots-grid,
  .values-row,
  .stats,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .geo-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .hero__content {
    padding-bottom: 5.5rem;
  }

  .section {
    padding: 4.5rem 0;
  }
}
