@import url("fonts.css");

/* ==========================================================================
   The Lucky Wagon — design system
   ========================================================================== */

:root {
  /* Colour ---------------------------------------------------------------- */
  --forest:        #21351c;   /* deep green, primary dark surface           */
  --forest-soft:   #2c4525;
  --forest-line:   #3b5732;
  --ink:           #14200f;   /* near-black green, body text on cream       */
  --ink-soft:      #4a5645;

  --cream:         #f4eee1;   /* paper                                      */
  --cream-deep:    #e9dfcb;
  --cream-line:    #d9cdb4;

  --clover:        #a8cc4a;   /* the "lucky flower" green — accent          */
  --clover-deep:   #486a1c;   /* darker: passes AA as text on both creams   */
  --clover-mid:    #6f9e30;   /* the bright one, for gradients only         */
  --clover-glow:   #c3e065;

  --ochre:         #e2a03f;   /* warm accent, donation CTA                  */
  --ochre-deep:    #c9862a;

  /* Type ------------------------------------------------------------------ */
  --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --font-body:    "Manrope", -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1:  clamp(1.18rem, 1.1rem + 0.4vw, 1.42rem);
  --step-2:  clamp(1.45rem, 1.28rem + 0.85vw, 2rem);
  --step-3:  clamp(1.9rem, 1.55rem + 1.75vw, 3rem);
  --step-4:  clamp(2.4rem, 1.7rem + 3.5vw, 4.5rem);
  --step-5:  clamp(3rem, 1.7rem + 6.5vw, 7.5rem);

  /* Space ----------------------------------------------------------------- */
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section: clamp(4.5rem, 9vw, 9rem);
  --radius: 20px;
  --radius-lg: 34px;

  --shell: 1280px;
  --measure: 62ch;

  /* Header height is derived from the logo, and the hero tucks under it. */
  --logo-h: 62px;
  --header-h: calc(var(--logo-h) + 2rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

ul { margin: 0; padding: 0; list-style: none; }

button { font: inherit; color: inherit; }

::selection { background: var(--clover); color: var(--forest); }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 999;
  background: var(--forest);
  color: var(--cream);
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */

.shell {
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}
.shell--wide { width: min(100% - (var(--gutter) * 2), 1560px); }

.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(3rem, 6vw, 5.5rem); }

.section--forest { background: var(--forest); color: var(--cream); }
.section--deep   { background: var(--ink);    color: var(--cream); }
.section--paper  { background: var(--cream-deep); }

.stack > * + * { margin-top: var(--flow, 1.4rem); }

/* Small uppercase label -- used everywhere as a section eyebrow ------------ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clover-deep);
  margin: 0 0 1.4rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: currentColor;
  flex: none;
}
.section--forest .eyebrow,
.section--deep .eyebrow,
.hero .eyebrow { color: var(--clover); }

.lead {
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: var(--measure);
  color: var(--ink-soft);
}
.section--forest .lead,
.section--deep .lead { color: rgba(244, 238, 225, 0.78); }

.prose { max-width: var(--measure); }
.prose p { margin-bottom: 1.25em; }
.prose a { color: var(--clover-deep); text-decoration: underline; text-underline-offset: 3px; }
.section--forest .prose a { color: var(--clover); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  --btn-bg: var(--forest);
  --btn-fg: var(--cream);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.25s;
  will-change: transform;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 12px 28px -12px rgba(20, 32, 15, 0.55); }
.btn:active { transform: translateY(-1px); }

.btn svg { flex: none; transition: transform 0.35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn--clover { --btn-bg: var(--clover); --btn-fg: var(--forest); }
.btn--ochre  { --btn-bg: var(--ochre);  --btn-fg: #2b1d05; }
.btn--cream  { --btn-bg: var(--cream);  --btn-fg: var(--forest); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: currentColor;
  box-shadow: inset 0 0 0 2px currentColor;
}
.btn--ghost:hover { box-shadow: inset 0 0 0 2px currentColor, 0 12px 28px -14px rgba(20, 32, 15, 0.5); }

/* Inline text link with arrow --------------------------------------------- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--clover-deep);
  padding-bottom: 3px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.4s var(--ease), color 0.25s;
}
.link-arrow:hover { background-size: 0% 2px; }
.link-arrow svg { transition: transform 0.35s var(--ease); }
.link-arrow:hover svg { transform: translateX(5px); }
.section--forest .link-arrow, .section--deep .link-arrow { color: var(--clover); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cream);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.site-header.is-stuck::before { opacity: 1; }
.site-header.is-stuck { box-shadow: 0 1px 0 var(--cream-line); }

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: 1rem;
}

/* Over-image variant: header floats on a dark hero ------------------------ */
.site-header--over { color: var(--cream); }
.site-header--over.is-stuck { color: var(--ink); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  flex: none;
  margin-right: auto;
}
.brand img {
  height: var(--logo-h);
  width: auto;
  transition: height 0.35s var(--ease), filter 0.35s var(--ease);
}
/* the header tightens up once you start scrolling */
.site-header.is-stuck .brand img { height: calc(var(--logo-h) * 0.78); }

/* The logo always stays in its original colours. Over the hero photo it gets a
   soft shadow so the brown lettering keeps its edges against a busy image. */
.site-header--over:not(.is-stuck) .brand img {
  filter: drop-shadow(0 2px 10px rgba(10, 18, 8, 0.55));
}

.footer-brand .brand img { height: 104px; }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.1rem); }

.nav__link {
  position: relative;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding-block: 0.4rem;
  white-space: nowrap;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 2px; width: 100%;
  background: var(--clover-deep);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.site-header--over:not(.is-stuck) .nav__link::after { background: var(--clover); }
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

/* Dropdown ---------------------------------------------------------------- */
.nav__item { position: relative; }
.nav__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 0;
  cursor: pointer;
  padding-block: 0.4rem;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: var(--font-body);
}
.nav__toggle svg { transition: transform 0.3s var(--ease); }
.nav__item.is-open .nav__toggle svg { transform: rotate(180deg); }

.nav__menu {
  position: absolute;
  top: calc(100% + 0.9rem);
  left: 50%;
  translate: -50% 0;
  min-width: 260px;
  background: var(--forest);
  color: var(--cream);
  border-radius: 18px;
  padding: 0.6rem;
  box-shadow: 0 24px 50px -20px rgba(20, 32, 15, 0.55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s;
}
.nav__item.is-open .nav__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav__menu a {
  display: block;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: background 0.25s, color 0.25s;
}
.nav__menu a:hover, .nav__menu a[aria-current="page"] { background: var(--clover); color: var(--forest); }

.header-cta { flex: none; }
.header-cta .btn { padding: 0.75rem 1.4rem; }

/* FR / EN switch --------------------------------------------------------- */
.nav__lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px currentColor;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.25s, background 0.25s, color 0.25s;
}
.nav__lang:hover { opacity: 1; background: var(--clover); color: var(--forest); box-shadow: inset 0 0 0 1.5px var(--clover); }

@media (max-width: 1000px) {
  .nav__lang {
    align-self: flex-start;
    margin-top: 1.6rem;
    min-width: 0;
    padding: 0.5rem 1.1rem;
    font-size: 0.85rem;
    opacity: 1;
  }
}

/* Burger ------------------------------------------------------------------ */
.burger {
  display: none;
  width: 46px; height: 46px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 2px currentColor;
  cursor: pointer;
  position: relative;
  flex: none;
}
.burger span {
  position: absolute;
  left: 50%; translate: -50% 0;
  width: 18px; height: 2px;
  background: currentColor;
  transition: transform 0.35s var(--ease), opacity 0.2s;
}
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 23px; }
.burger span:nth-child(3) { top: 29px; }
body.nav-open .burger span:nth-child(1) { transform: translate(-50%, 6px) rotate(45deg); }
body.nav-open .burger span:nth-child(2) { opacity: 0; }
body.nav-open .burger span:nth-child(3) { transform: translate(-50%, -6px) rotate(-45deg); }

@media (max-width: 1000px) {
  :root { --logo-h: 50px; }
  .burger { display: block; }
  .header-cta { display: none; }
  .footer-brand .brand img { height: 88px; }
  .nav {
    position: fixed;
    inset: 0;
    background: var(--forest);
    color: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.4rem;
    padding: 5.5rem var(--gutter) 3rem;
    overflow-y: auto;
    clip-path: circle(0% at calc(100% - 44px) 44px);
    transition: clip-path 0.65s var(--ease);
  }
  body.nav-open .nav { clip-path: circle(150% at calc(100% - 44px) 44px); }
  body.nav-open { overflow: hidden; }
  .nav__link, .nav__toggle {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 7vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: none;
    padding-block: 0.35rem;
  }
  .nav__link::after { display: none; }
  .nav__item { width: 100%; }
  .nav__menu {
    position: static;
    translate: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    box-shadow: none;
    padding: 0 0 0.6rem 1rem;
    display: none;
    min-width: 0;
  }
  .nav__item.is-open .nav__menu { display: block; }
  .nav__menu a { font-size: 1rem; padding: 0.5rem 0.8rem; }
  .nav .btn { margin-top: 1.4rem; }
}

.nav__mobile-cta { display: none; }
@media (max-width: 1000px) { .nav__mobile-cta { display: inline-flex; } }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  margin-top: calc(-1 * var(--header-h));
  padding-top: var(--header-h);
  min-height: clamp(560px, 88svh, 900px);
  display: flex;
  align-items: flex-end;
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(20,32,15,0.72) 0%, rgba(20,32,15,0.25) 32%, rgba(20,32,15,0.55) 68%, rgba(20,32,15,0.9) 100%);
}
/* NB: no `width: 100%` here — it would beat .shell (same specificity, declared
   later) and slam the hero copy against the left edge of the viewport. */
.hero__inner { padding-block: clamp(3rem, 7vw, 6rem); flex: 0 1 auto; }
.hero__title { font-size: var(--step-4); max-width: 15ch; }
.hero__text { max-width: 46ch; margin-top: 1.6rem; font-size: var(--step-1); color: rgba(244,238,225,0.85); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.4rem; }

/* Compact hero used on interior pages ------------------------------------- */
.hero--page { min-height: clamp(400px, 60svh, 620px); }
.hero--page .hero__title { font-size: var(--step-4); max-width: 18ch; }

.hero__scroll {
  position: absolute;
  right: var(--gutter);
  bottom: 2.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.8;
}
.hero__scroll svg { animation: nudge 2.2s var(--ease) infinite; }
@keyframes nudge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (max-width: 720px) { .hero__scroll { display: none; } }

/* Breadcrumb -------------------------------------------------------------- */
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.8;
  margin-bottom: 1.6rem;
  transition: opacity 0.25s, transform 0.3s var(--ease);
}
.crumb:hover { opacity: 1; transform: translateX(-4px); }

/* ==========================================================================
   The statement — "make a living difference"
   ========================================================================== */

.statement {
  position: relative;
  text-align: center;
  overflow: hidden;
}
.statement__inner { position: relative; z-index: 1; }

.statement__line {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-5);
  line-height: 0.88;
  letter-spacing: -0.035em;
  display: block;
}
.statement__line--1 { color: var(--ink); }
.statement__line--2 { color: var(--clover-deep); }
.section--forest .statement__line--1 { color: var(--cream); }
.section--forest .statement__line--2 { color: var(--clover); }

/* struck-through word: the rule draws itself in ---------------------------- */
.strike {
  position: relative;
  display: inline-block;
  color: var(--ink-soft);
  opacity: 0.72;
}
.section--forest .strike { color: rgba(244, 238, 225, 0.6); opacity: 1; }
.strike::after {
  content: "";
  position: absolute;
  left: -0.06em;
  right: -0.06em;
  top: 52%;
  height: 0.07em;
  min-height: 3px;
  background: currentColor;
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1s var(--ease) 0.35s;
}
.reveal.is-visible .strike::after,
.statement.is-visible .strike::after { transform: scaleX(1); }

.statement__note {
  margin-top: 2.4rem;
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 52ch;
  margin-inline: auto;
}
.section--forest .statement__note { color: rgba(244,238,225,0.75); }

/* the logo, ghosted in behind the motto */
.statement__mark {
  position: absolute;
  top: 50%; left: 50%;
  translate: -50% -50%;
  width: min(70vw, 560px);
  opacity: 0.07;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

/* ==========================================================================
   Marquee ribbon
   ========================================================================== */

.ribbon {
  background: var(--clover);
  color: var(--forest);
  padding-block: 1.1rem;
  overflow: hidden;
  white-space: nowrap;
  border-block: 2px solid var(--forest);
}
.ribbon__track {
  display: inline-flex;
  align-items: center;
  gap: 2.5rem;
  /* the trailing gap is what makes translateX(-50%) land seamlessly once
     site.js has duplicated the items */
  padding-right: 2.5rem;
  animation: marquee 24s linear infinite;
  will-change: transform;
}
.ribbon:hover .ribbon__track,
.ribbon:focus-within .ribbon__track { animation-play-state: paused; }
.ribbon__item {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 2.5rem;
}
.ribbon__item::after { content: "✦"; font-size: 0.7em; opacity: 0.55; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   Pillars (mission / valeurs / vision)
   ========================================================================== */

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(1.2rem, 2.5vw, 2rem);
  margin-top: 3.5rem;
}
.pillar {
  background: var(--cream);
  color: var(--ink);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 3vw, 2.6rem);
  position: relative;
  overflow: hidden;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.section--forest .pillar { background: var(--forest-soft); color: var(--cream); box-shadow: inset 0 0 0 1px var(--forest-line); }
.pillar:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -26px rgba(20,32,15,0.5); }
.pillar__num {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--clover-deep);
}
.section--forest .pillar__num { color: var(--clover); }
.pillar h3 { font-size: var(--step-2); margin: 0.8rem 0 1rem; }
.pillar p { font-size: 1rem; line-height: 1.65; color: var(--ink-soft); }
.section--forest .pillar p { color: rgba(244,238,225,0.75); }

.value-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.value-list li {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  background: var(--clover);
  color: var(--forest);
}

/* ==========================================================================
   Split section (image + text)
   ========================================================================== */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}
.split--reverse .split__media { order: 2; }
@media (max-width: 780px) { .split--reverse .split__media { order: 0; } }

.split__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3.2;
  background: var(--cream-deep);
}
.split__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.split:hover .split__media img { transform: scale(1.04); }
.split__body h2 { font-size: var(--step-3); margin-bottom: 1.4rem; }

/* floating stat badge on media */
.badge {
  position: absolute;
  right: clamp(0.9rem, 2vw, 1.6rem);
  bottom: clamp(0.9rem, 2vw, 1.6rem);
  background: var(--clover);
  color: var(--forest);
  border-radius: 18px;
  padding: 1rem 1.3rem;
  text-align: center;
  box-shadow: 0 18px 40px -18px rgba(20,32,15,0.6);
}
.badge strong { display: block; font-family: var(--font-display); font-size: 1.9rem; line-height: 1; }
.badge span { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }

/* ==========================================================================
   Cards
   ========================================================================== */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(1.2rem, 2.5vw, 2rem);
}
.cards--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
  height: 100%;
}
.section--forest .card { background: var(--forest-soft); color: var(--cream); }
.card:hover { transform: translateY(-8px); box-shadow: 0 30px 55px -28px rgba(20,32,15,0.55); }

.card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--cream-deep); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.card:hover .card__media img { transform: scale(1.07); }

.card__body { padding: clamp(1.4rem, 2.6vw, 2rem); display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.card__title { font-size: var(--step-2); }
.card__text { font-size: 0.98rem; color: var(--ink-soft); line-height: 1.6; flex: 1; }
.section--forest .card__text { color: rgba(244,238,225,0.75); }
.card .link-arrow { margin-top: 0.4rem; align-self: flex-start; }

.card__tag {
  position: absolute;
  top: 1rem; left: 1rem;
  background: var(--forest);
  color: var(--cream);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  z-index: 2;
}
.card__tag--soon { background: var(--ochre); color: #2b1d05; }

.card--soon { pointer-events: none; }
.card--soon .card__media img { filter: grayscale(0.75); opacity: 0.75; }

/* ==========================================================================
   Stats
   ========================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}
.stat__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-4);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--clover);
}
.section--paper .stat__value, body:not(.dark) .section:not(.section--forest):not(.section--deep) .stat__value { color: var(--clover-deep); }
.stat__label {
  margin-top: 0.7rem;
  font-size: var(--step--1);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* ==========================================================================
   Gallery / mosaic
   ========================================================================== */

.mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: 0.75rem;
}
.mosaic__item {
  position: relative;
  border: 0;
  padding: 0;
  background: var(--cream-deep);
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: zoom-in;
  display: block;
}
.mosaic__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease), filter 0.5s; }
.mosaic__item:hover img { transform: scale(1.08); }
.mosaic__item--tall { grid-row: span 2; aspect-ratio: 1 / 2.06; }
.mosaic__item--wide { grid-column: span 2; aspect-ratio: 2.06 / 1; }
@media (max-width: 620px) {
  .mosaic__item--tall, .mosaic__item--wide { grid-row: auto; grid-column: auto; aspect-ratio: 1; }
}

/* Lightbox ---------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: rgba(20, 32, 15, 0.94);
  padding: clamp(1rem, 4vw, 3rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 100%;
  max-height: 84svh;
  border-radius: 12px;
  object-fit: contain;
  transform: scale(0.96);
  transition: transform 0.4s var(--ease);
}
.lightbox.is-open img { transform: scale(1); }
.lightbox__btn {
  position: absolute;
  border: 0;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(244, 238, 225, 0.12);
  color: var(--cream);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.25s;
}
.lightbox__btn:hover { background: var(--clover); color: var(--forest); }
.lightbox__close { top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); }
.lightbox__prev { left: clamp(0.5rem, 3vw, 2rem); top: 50%; translate: 0 -50%; }
.lightbox__next { right: clamp(0.5rem, 3vw, 2rem); top: 50%; translate: 0 -50%; }
.lightbox__count {
  position: absolute;
  bottom: clamp(1rem, 3vw, 2rem);
  left: 50%; translate: -50% 0;
  color: rgba(244,238,225,0.7);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

/* ==========================================================================
   Team
   ========================================================================== */

.team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: clamp(1.2rem, 2.5vw, 2rem);
}
.member { text-align: center; }
.member__photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 3.6;
  background: var(--cream-deep);
  margin-bottom: 1.1rem;
}
.member__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.member:hover .member__photo img { transform: scale(1.05); }
.member__socials {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(20,32,15,0.8));
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.member:hover .member__socials, .member:focus-within .member__socials { opacity: 1; transform: translateY(0); }
.member__socials a {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cream);
  color: var(--forest);
  transition: background 0.25s, color 0.25s, transform 0.25s;
}
.member__socials a:hover { background: var(--clover); transform: translateY(-3px); }
.member__name { font-family: var(--font-display); font-weight: 800; font-size: 1.22rem; letter-spacing: -0.015em; }
.member__role { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.45; margin-top: 0.3rem; }
.section--forest .member__role { color: rgba(244,238,225,0.7); }

/* ==========================================================================
   Timeline (Notre histoire)
   ========================================================================== */

.timeline { position: relative; padding-left: 2.2rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 6px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--clover), var(--clover-mid), transparent);
}
.timeline__item { position: relative; padding-bottom: 2.4rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -2.2rem; top: 8px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--clover);
  box-shadow: 0 0 0 4px var(--cream);
}
.section--forest .timeline__item::before { box-shadow: 0 0 0 4px var(--forest); }
.timeline__year {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.16em;
  color: var(--clover-deep);
  text-transform: uppercase;
}
.section--forest .timeline__year { color: var(--clover); }
.timeline__item h3 { font-size: var(--step-1); margin: 0.4rem 0 0.6rem; }
.timeline__item p { color: var(--ink-soft); font-size: 1rem; }
.section--forest .timeline__item p { color: rgba(244,238,225,0.75); }

/* ==========================================================================
   Bullet list with clover markers
   ========================================================================== */

.checklist { display: grid; gap: 0.9rem; }
.checklist li {
  position: relative;
  padding-left: 2.2rem;
  font-size: var(--step-0);
  line-height: 1.55;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.35em;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--clover) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2321351c' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ==========================================================================
   Contact / form
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.45rem; }
.field label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.7;
}
.field input, .field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 2px solid rgba(244, 238, 225, 0.28);
  padding: 0.85rem 0.2rem;
  border-radius: 0;
  transition: border-color 0.3s;
}
.section--paper .field input, .section--paper .field textarea,
.section:not(.section--forest):not(.section--deep) .field input,
.section:not(.section--forest):not(.section--deep) .field textarea { border-bottom-color: var(--cream-line); }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--clover); }
.field textarea { resize: vertical; min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: currentColor; opacity: 0.4; }

.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1.1rem; }
.form__consent { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.86rem; opacity: 0.8; line-height: 1.5; }
.form__consent input { margin-top: 0.25rem; accent-color: var(--clover); width: 18px; height: 18px; flex: none; }
.form__status { font-size: 0.92rem; font-weight: 700; min-height: 1.4em; }
.form__status[data-state="ok"] { color: var(--clover); }
.form__status[data-state="err"] { color: #ff9b8a; }
.hp { position: absolute; left: -9999px; opacity: 0; }

.contact-list { display: grid; gap: 1.6rem; }
.contact-list dt {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clover);
  margin-bottom: 0.3rem;
}
.section:not(.section--forest):not(.section--deep) .contact-list dt { color: var(--clover-deep); }
.contact-list dd { margin: 0; font-size: var(--step-1); font-family: var(--font-display); font-weight: 700; letter-spacing: -0.015em; }
.contact-list dd a { text-decoration: none; background-image: linear-gradient(var(--clover), var(--clover)); background-size: 100% 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 0.4s var(--ease); }
.contact-list dd a:hover { background-size: 0% 2px; }

/* ==========================================================================
   Donation
   ========================================================================== */

.donate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.donate-card {
  background: var(--cream);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 3.5vw, 2.8rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.donate-card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -30px rgba(20,32,15,0.55); }
.donate-card__step {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--clover);
  color: var(--forest);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
}
.donate-card h3 { font-size: var(--step-2); }
.donate-card p { color: var(--ink-soft); font-size: 0.98rem; }
.donate-card__qr {
  width: min(100%, 300px);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  padding: 0.6rem;
  box-shadow: 0 10px 30px -18px rgba(20,32,15,0.5);
}

/* ==========================================================================
   Fundraising progress (Madagascar 2026)
   ========================================================================== */

.fund {
  background: var(--forest-soft);
  border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 3.5vw, 3rem);
  box-shadow: inset 0 0 0 1px var(--forest-line);
}
.fund__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.fund__head .eyebrow { margin-bottom: 0.7rem; }

.progress {
  height: 16px;
  border-radius: 999px;
  background: rgba(244, 238, 225, 0.14);
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  width: var(--pct, 0%);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--clover-mid), var(--clover), var(--clover-glow));
  transform-origin: left center;
  animation: grow 1.6s var(--ease) both;
}
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.fund__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2.2rem;
  margin-top: 1.4rem;
  font-size: 0.98rem;
  color: rgba(244, 238, 225, 0.8);
}
.fund__legend li { display: inline-flex; align-items: center; gap: 0.6rem; }
.fund__legend strong { color: var(--cream); }
.fund__dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: rgba(244, 238, 225, 0.3);
  flex: none;
}
.fund__dot--done { background: var(--clover); }

/* ==========================================================================
   Previous / next project
   ========================================================================== */

.project-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--cream-line);
}
.link-arrow--back:hover svg { transform: translateX(-5px); }

/* ==========================================================================
   Instagram / news strip
   ========================================================================== */

.ig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 0.75rem;
}
.ig-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  display: block;
  background: var(--cream-deep);
}
.ig-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.ig-tile:hover img { transform: scale(1.07); }
.ig-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20,32,15,0.5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f4eee1' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='2' width='20' height='20' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.5' cy='6.5' r='1.2' fill='%23f4eee1' stroke='none'/%3E%3C/svg%3E") center / 34px no-repeat;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.ig-tile:hover::after { opacity: 1; }

/* ==========================================================================
   CTA band
   ========================================================================== */

.cta-band {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
  color: var(--cream);
  text-align: center;
  padding: clamp(3rem, 7vw, 6rem) clamp(1.5rem, 5vw, 4rem);
}
.cta-band__media { position: absolute; inset: 0; z-index: -2; }
.cta-band__media img { width: 100%; height: 100%; object-fit: cover; }
.cta-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(20,32,15,0.76); }
.cta-band h2 { font-size: var(--step-3); max-width: 20ch; margin-inline: auto; }
.cta-band p { max-width: 50ch; margin: 1.3rem auto 0; color: rgba(244,238,225,0.82); }
.cta-band .hero__actions { justify-content: center; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding-top: clamp(3.5rem, 7vw, 6rem);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .footer-grid { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: auto; }
}
.footer-brand p { color: rgba(244,238,225,0.62); font-size: 0.95rem; margin-top: 1.2rem; max-width: 34ch; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clover);
  margin-bottom: 1.1rem;
}
.footer-col li + li { margin-top: 0.55rem; }
.footer-col a {
  text-decoration: none;
  font-size: 0.95rem;
  color: rgba(244,238,225,0.72);
  transition: color 0.25s, padding-left 0.3s var(--ease);
}
.footer-col a:hover { color: var(--clover); padding-left: 4px; }

.socials { display: flex; gap: 0.6rem; margin-top: 1.6rem; }
.socials a {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px rgba(244,238,225,0.25);
  color: var(--cream);
  transition: background 0.25s, color 0.25s, transform 0.3s var(--ease), box-shadow 0.25s;
}
.socials a:hover { background: var(--clover); color: var(--forest); transform: translateY(-3px); box-shadow: inset 0 0 0 1.5px var(--clover); }

.footer-bottom {
  border-top: 1px solid rgba(244,238,225,0.12);
  padding-block: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(244,238,225,0.55);
}
.footer-bottom a { text-decoration: none; transition: color 0.25s; }
.footer-bottom a:hover { color: var(--clover); }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }

/* Giant footer wordmark --------------------------------------------------- */
.footer-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 13vw, 12rem);
  line-height: 0.85;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  color: rgba(244, 238, 225, 0.07);
  text-align: center;
  padding-bottom: 0.1em;
  user-select: none;
  overflow: hidden;
  white-space: nowrap;
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.09s; }
.reveal[data-delay="2"] { transition-delay: 0.18s; }
.reveal[data-delay="3"] { transition-delay: 0.27s; }
.reveal[data-delay="4"] { transition-delay: 0.36s; }
.reveal[data-delay="5"] { transition-delay: 0.45s; }

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

  /* The ribbon is a deliberate, continuous brand element rather than an
     entrance effect, so it keeps running here — just slower. It still pauses
     on hover, which is the "stop it" mechanism WCAG 2.2.2 asks for. */
  .ribbon__track {
    animation-duration: 60s !important;
    animation-iteration-count: infinite !important;
  }
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.center { text-align: center; }
.center .eyebrow { justify-content: center; }
.center .lead { margin-inline: auto; }
.mt-xl { margin-top: clamp(2.5rem, 5vw, 4rem); }
.mt-l  { margin-top: clamp(1.8rem, 3.5vw, 2.8rem); }
.mt-m  { margin-top: 1.4rem; }

.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head.center { margin-inline: auto; }
.section-head h2 { font-size: var(--step-3); }
.section-head .lead { margin-top: 1.3rem; }

.divider { height: 1px; background: var(--cream-line); border: 0; margin: 0; }
.section--forest .divider, .section--deep .divider { background: var(--forest-line); }
