/* ChilledSites Forest page. Earthy, bold, number-led. This page keeps its
   light palette in both themes on purpose: the dark green bands below are
   already dark, so there is no separate dark-mode variant (see GH#220). */

.forest-page {
  --fp-ground: #f6f5ec;
  --fp-forest: #1d4434;
  --fp-forest-deep: #143326;
  --fp-mint: #c6ecd8;
  --fp-sun: #f4e08c;
  --fp-sage: #e1efd7;
  --fp-ink: #173a2c;
  --fp-body: #3f5a4d;
  --fp-on-dark: #d8f5e4;
  --fp-on-dark-soft: #a9cdb9;
  --fp-sun-ink: #5b5320;
  --fp-card: #ffffff;

  --fp-pad-x: clamp(1.25rem, 1rem + 3vw, 2.5rem);
  --fp-pad-y: clamp(2.25rem, 2.25rem + 5.14vw, 6.875rem);
  --fp-gap: clamp(1rem, 0.8rem + 1vw, 1.375rem);

  --fp-fs-h1: clamp(2.4rem, 2.4rem + 4.6vw, 6.5rem);
  --fp-fs-hero-count: clamp(5rem, 5.2rem + 9.5vw, 13.75rem);
  --fp-fs-h2-lg: clamp(2.1rem, 2.1rem + 2.7vw, 4.5rem);
  --fp-fs-h2-md: clamp(1.8rem, 1.8rem + 1.9vw, 3.5rem);
  --fp-fs-h2-projects: clamp(2.1rem, 2.1rem + 1.5vw, 3.5rem);
  --fp-fs-cta-h2: clamp(1.8rem, 1.75rem + 4.2vw, 5.5rem);
  --fp-fs-tile-num: 4.5rem;
  --fp-fs-tile-num-big: clamp(4.5rem, 4.75rem + 5.1vw, 9.375rem);
  --fp-fs-proj-num: clamp(1.7rem, 1.7rem + 1.1vw, 2.75rem);
  --fp-fs-proj-name: clamp(0.97rem, 0.97rem + 0.4vw, 1.3125rem);
  --fp-fs-maths-num: clamp(3.5rem, 3.5rem + 1.9vw, 5.25rem);
  --fp-fs-beyond-num: clamp(3rem, 3rem + 1.9vw, 4.75rem);

  background: var(--fp-ground);
  color: var(--fp-ink);
  font-family: Archivo, system-ui, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

.forest-page * { box-sizing: border-box; }
/* :where() keeps this at element-level priority, so button, tile and
   shared-header link colours (class selectors) still win. */
:where(.forest-page) a { color: inherit; text-decoration: none; }
:where(.forest-page) :is(h1, h2, h3) {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
  margin: 0;
}

.fp-wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--fp-pad-x); }

/* Buttons */
.fp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  padding: 0 26px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 17px;
  white-space: nowrap;
}
.fp-btn-primary { background: var(--fp-sun); color: var(--fp-forest-deep); }
.fp-btn-ghost {
  border: 1px solid rgba(216, 245, 228, 0.35);
  color: #f2fbf5;
  font-weight: 500;
}
.fp-btn svg { flex-shrink: 0; }

/* Hero */
.fp-hero { background: var(--fp-forest); color: var(--fp-on-dark); padding: var(--fp-pad-y) 0; overflow: hidden; }
.fp-hero-grid { display: flex; flex-direction: column; gap: 40px; }
.fp-hero-copy { display: flex; flex-direction: column; gap: 26px; }
.fp-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fp-sun); }
.fp-hero h1 { font-size: var(--fp-fs-h1); line-height: 0.95; color: #f2fbf5; }
.fp-hero-sub { font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.25rem); line-height: 1.55; color: var(--fp-on-dark-soft); max-width: 520px; margin: 0; }
.fp-hero-ctas { display: flex; flex-direction: column; gap: 12px; }
.fp-hero-count { display: flex; flex-direction: column; align-items: flex-start; }
.fp-counter { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: var(--fp-fs-hero-count); line-height: 0.85; letter-spacing: -0.05em; color: var(--fp-mint); }
.fp-counter-label { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: clamp(1.25rem, 1.1rem + 0.7vw, 2rem); color: #f2fbf5; margin-top: 10px; }
.fp-counter-live { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--fp-on-dark-soft); }
.fp-counter-live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fp-sun); flex-shrink: 0; }

@media (min-width: 1024px) {
  .fp-hero-grid { flex-direction: row; align-items: center; gap: 64px; }
  .fp-hero-copy { flex: 1.2; }
  .fp-hero-ctas { flex-direction: row; }
  .fp-hero-count { flex: 1; align-items: flex-end; text-align: right; }
}

/* Growing every day (bento) */
.fp-bento { padding: var(--fp-pad-y) 0; }
.fp-bento-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: var(--fp-gap); }
.fp-bento-head h2 { font-size: var(--fp-fs-h2-lg); line-height: 1; color: var(--fp-ink); }
.fp-bento-head p { margin: 0; font-size: 18px; color: var(--fp-body); max-width: 420px; }

@media (min-width: 1024px) {
  .fp-bento-head { flex-direction: row; justify-content: space-between; align-items: flex-end; }
}

.fp-bento-grid { display: flex; flex-direction: column; gap: 16px; }

.fp-tile {
  box-sizing: border-box;
  padding: 34px;
  border-radius: 22px;
  min-height: 290px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fp-tile-icon svg { display: block; }
.fp-tile-number { margin-top: auto; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: var(--fp-fs-tile-num); line-height: 1; letter-spacing: -0.03em; }
.fp-tile-label { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem); line-height: 1.35; max-width: 320px; }

.fp-tile-dark { background: var(--fp-forest); color: #f2fbf5; }
.fp-tile-dark .fp-tile-label { color: var(--fp-on-dark-soft); }
.fp-tile-mint { background: var(--fp-mint); color: var(--fp-forest-deep); }
.fp-tile-mint .fp-tile-label { color: var(--fp-body); }
.fp-tile-sun { background: var(--fp-sun); color: var(--fp-forest-deep); }
.fp-tile-sun .fp-tile-label { color: var(--fp-sun-ink); }
.fp-tile-sage { background: var(--fp-sage); color: var(--fp-forest-deep); }
.fp-tile-sage .fp-tile-label { color: var(--fp-body); }

.fp-tile-walk {
  background: var(--fp-forest-deep);
  color: #f2fbf5;
  justify-content: flex-end;
  cursor: pointer;
}
.fp-tile-walk-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.fp-tile-walk-title { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem); line-height: 1.05; }
.fp-tile-walk-sub { font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.125rem); color: var(--fp-on-dark-soft); margin-top: 6px; }
.fp-tile-walk-arrow {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--fp-sun);
  color: var(--fp-forest-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fp-tile-big { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.fp-tile-big .fp-tile-number { margin-top: 0; font-size: var(--fp-fs-tile-num-big); line-height: 0.9; letter-spacing: -0.04em; }
.fp-tile-big .fp-tile-label { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.375rem); line-height: 1.4; max-width: 380px; }

@media (min-width: 641px) {
  .fp-bento-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--fp-gap); }
  .fp-tile-walk, .fp-tile-big { grid-column: span 2; }
}
@media (min-width: 1024px) {
  .fp-bento-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fp-tile-walk, .fp-tile-big { grid-column: span 2; }
}
@media (max-width: 374px) {
  .fp-tile-number { font-size: 3rem; }
  .fp-tile-big .fp-tile-number { font-size: 3.5rem; }
}

/* Live forest */
/* The forest runs edge to edge and sits on the section's bottom edge */
.fp-forest-section { background: var(--fp-forest-deep); padding: var(--fp-pad-y) 0 0; color: #f2fbf5; overflow-x: clip; }
.fp-forest-head { display: flex; flex-direction: column; gap: 12px; max-width: 640px; margin: 0 auto 32px; text-align: center; }
.fp-forest-head h2 { font-size: var(--fp-fs-h2-md); color: #f2fbf5; }
.fp-forest-head p { margin: 0; font-size: 18px; color: var(--fp-on-dark-soft); }

.fp-ground {
  position: relative;
  width: 100%;
  margin: 0;
  height: 400px;
  background: linear-gradient(to bottom, transparent 40%, rgba(216, 245, 228, 0.08) 100%);
}
.fp-tree { position: absolute; display: block; transform: translate(-50%, -100%); transition: transform 0.15s ease; text-decoration: none; cursor: default; }
a.fp-tree { cursor: pointer; }
.fp-tree:hover, .fp-tree:focus { transform: translate(-50%, -100%) scale(1.15); z-index: 500 !important; }
.fp-tree svg { display: block; filter: drop-shadow(0 2px 2px rgba(10, 20, 14, 0.35)); }
.fp-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--fp-ground);
  color: var(--fp-ink);
  font-size: 0.78rem;
  line-height: 1.35;
  padding: 7px 10px;
  border-radius: 8px;
  white-space: nowrap;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.fp-tip span { display: block; color: var(--fp-body); font-size: 0.7rem; }
.fp-tree:hover .fp-tip, .fp-tree:focus .fp-tip { opacity: 1; }
.fp-tree.tip-left .fp-tip { left: 0; transform: none; }
.fp-tree.tip-right .fp-tip { left: auto; right: 0; transform: none; }

@media (max-width: 640px) { .fp-ground { height: 260px; } }

/* Maths */
.fp-maths { background: var(--fp-ground); padding: var(--fp-pad-y) 0; }
.fp-maths-head { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin-bottom: 32px; }
.fp-maths-head h2 { font-size: var(--fp-fs-h2-md); color: var(--fp-ink); }
.fp-maths-head p { margin: 0; font-size: 18px; color: var(--fp-body); }
.fp-maths-cards { display: flex; flex-direction: column; gap: 14px; }
.fp-maths-card { box-sizing: border-box; padding: 34px; border-radius: 22px; background: var(--fp-card); color: var(--fp-ink); display: flex; flex-direction: column; gap: 12px; }
.fp-maths-card.is-dark { background: var(--fp-forest); color: #f2fbf5; }
.fp-maths-num { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: var(--fp-fs-maths-num); line-height: 1; letter-spacing: -0.03em; }
.fp-maths-card h3 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: 22px; letter-spacing: normal; }
.fp-maths-card p { margin: 0; font-size: 16px; line-height: 1.6; opacity: 0.85; }
.fp-note { margin: 22px 0 0; font-size: 14px; color: var(--fp-body); max-width: 820px; }

@media (min-width: 1024px) { .fp-maths-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--fp-gap); } }

/* Projects */
.fp-projects-section { background: var(--fp-forest); padding: var(--fp-pad-y) 0; color: #f2fbf5; }
.fp-projects-layout { display: flex; flex-direction: column; gap: 32px; }
.fp-projects-intro { display: flex; flex-direction: column; gap: 16px; }
.fp-projects-intro h2 { font-size: var(--fp-fs-h2-projects); color: #f2fbf5; }
.fp-projects-intro p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--fp-on-dark-soft); }
.fp-project-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid rgba(216, 245, 228, 0.2);
}
.fp-project-row-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.fp-project-name { font-size: var(--fp-fs-proj-name); font-weight: 500; color: #f2fbf5; }
.fp-project-count { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: var(--fp-fs-proj-num); color: var(--fp-sun); }
.fp-project-bar { height: 10px; border-radius: 99px; background: rgba(216, 245, 228, 0.14); overflow: hidden; }
.fp-project-bar-fill { height: 10px; border-radius: 99px; background: var(--fp-mint); }

@media (min-width: 1024px) { .fp-projects-layout { flex-direction: row; gap: 80px; } .fp-projects-intro { flex: 0 0 340px; } .fp-projects-list { flex: 1; min-width: 0; } }

/* Beyond trees */
.fp-beyond { background: var(--fp-ground); padding: var(--fp-pad-y) 0; }
.fp-beyond-head { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin-bottom: 32px; }
.fp-beyond-head h2 { font-size: var(--fp-fs-h2-md); color: var(--fp-ink); }
.fp-beyond-head p { margin: 0; font-size: 18px; color: var(--fp-body); }
.fp-beyond-grid { display: flex; flex-direction: column; gap: 16px; }
.fp-beyond-card { box-sizing: border-box; padding: 36px; border-radius: 22px; color: var(--fp-forest-deep); display: flex; flex-direction: column; gap: 14px; }
.fp-beyond-card.is-sun { background: var(--fp-sun); }
.fp-beyond-card.is-mint { background: var(--fp-mint); }
.fp-beyond-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.fp-beyond-num { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: var(--fp-fs-beyond-num); line-height: 1; letter-spacing: -0.03em; }
.fp-beyond-label { font-size: 18px; font-weight: 600; }
.fp-beyond-card h3 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: 24px; letter-spacing: normal; margin-top: 10px; }
.fp-beyond-card p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--fp-body); }

@media (min-width: 768px) { .fp-beyond-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--fp-gap); } }

/* Principles */
.fp-principles { background: var(--fp-sage); padding: var(--fp-pad-y) 0; }
.fp-principles h2 { font-size: var(--fp-fs-h2-md); color: var(--fp-ink); margin-bottom: var(--fp-gap); }
.fp-principles-grid { display: flex; flex-direction: column; gap: 28px; }
.fp-principle { display: flex; flex-direction: column; gap: 12px; padding-top: 22px; border-top: 3px solid var(--fp-forest); }
.fp-principle-num { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 3.5rem; line-height: 1; color: var(--fp-forest); }
.fp-principle h3 { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 600; font-size: 21px; letter-spacing: normal; color: var(--fp-ink); }
.fp-principle p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--fp-body); }

@media (min-width: 641px) { .fp-principles-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; } }
@media (min-width: 1024px) { .fp-principles-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Closing CTA */
.fp-cta-section { background: var(--fp-forest-deep); padding: var(--fp-pad-y) 0; color: #f2fbf5; }
.fp-cta-inner { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 20px; }
.fp-cta-inner h2 { font-size: var(--fp-fs-cta-h2); line-height: 0.98; color: #f2fbf5; }
.fp-cta-inner p { margin: 0; font-size: 18px; color: var(--fp-on-dark-soft); max-width: 520px; }

@media (min-width: 1024px) { .fp-cta-inner { align-items: center; text-align: center; margin: 0 auto; } }

/* Decorative tree texture (drawn by the page script) */
.fp-tile-walk, .fp-cta-section { position: relative; overflow: hidden; }
.fp-deco-trees { position: absolute; inset: 0 0 110px 0; pointer-events: none; }
.fp-deco-trees span { position: absolute; }
.fp-tile-walk .fp-tile-walk-row { position: relative; z-index: 100; padding-top: 48px; background: linear-gradient(transparent, var(--fp-forest-deep) 40%); }
.fp-deco-trees--band { inset: auto 0 0 0; height: 220px; opacity: .5; }
.fp-cta-section .fp-cta-inner { position: relative; z-index: 100; }
@media (max-width: 640px) { .fp-deco-trees--band { height: 150px; } }
