/* Full-screen photo sections, matching the homepage: each .scene fills the
   window over its own photo with the dark green fade, and scrolling snaps
   from one to the next. A scene can grow past one screen when its content
   needs it (a form, a chart, a map), so nothing is ever cut off.

   Markup:
     <section class="scene">
       <img class="scene__photo" src="..." alt="">
       <div class="scene__inner"> ... </div>
     </section>
   .scene-head   eyebrow + heading + lede in white on the photo
   .scene-panel  a cream card for dense content (cards, forms, charts) */
html.has-scenes { scroll-snap-type: y proximity; scroll-padding-top: 0; }
body.has-scenes { background: #0f2b1a; }
/* Paint the dark green from the first frame, before the script runs, so a
   page never flashes cream while it loads. */
html:has(main[data-scene-deck]),
html:has(main[data-scene-deck]) body { background: #0f2b1a; }
body.has-scenes main { display: block; }

.scene {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(140px, 25vh, 228px) clamp(2rem, 5vw, 5rem) 3rem;
  overflow: hidden;
  scroll-snap-align: start;
  color: #ffffff;
  background: #0f2b1a;
}
.scene__photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 1.6s ease;
}
.scene.is-in .scene__photo { transform: scale(1); }
.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(15, 43, 26, 0.2) 0%, rgba(15, 43, 26, 0.45) 55%, rgba(15, 43, 26, 0.78) 100%),
    linear-gradient(90deg, rgba(15, 43, 26, 0.88) 0%, rgba(15, 43, 26, 0.64) 36%, rgba(15, 43, 26, 0.24) 66%, rgba(15, 43, 26, 0.08) 86%);
}
.scene--deep::before {
  background:
    linear-gradient(180deg, rgba(15, 43, 26, 0.55) 0%, rgba(15, 43, 26, 0.7) 100%),
    linear-gradient(90deg, rgba(15, 43, 26, 0.6) 0%, rgba(15, 43, 26, 0.35) 100%);
}
.scene__inner {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.no-scene-motion .scene__inner,
.scene.is-in .scene__inner { opacity: 1; transform: none; }

.scene-head { max-width: min(900px, 62vw); }
.scene-head + * { margin-top: clamp(1.75rem, 4vh, 2.75rem); }
.scene-head__eyebrow {
  margin: 0 0 1rem;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #b8d98a;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}
.scene-head__title {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: clamp(3.12rem, 6.24vw, 5.04rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: #ffffff;
  text-wrap: balance;
}
.scene-head__title em { font-style: italic; color: #b8d98a; padding-right: 0.06em; }
.scene-head__link { color: inherit; text-decoration: underline; text-decoration-color: rgba(184, 217, 138, 0.6); text-decoration-thickness: 2px; text-underline-offset: 0.18em; transition: text-decoration-color 0.15s ease; }
.scene-head__link:hover { text-decoration-color: #b8d98a; }
.scene-head__link:focus-visible { outline: 2px solid #b8d98a; outline-offset: 4px; border-radius: 6px; }
.scene-head__rule { width: 40px; height: 2px; margin: 1.1rem 0 1.25rem; background: #85bb44; }
.scene-head__lede {
  margin: 0;
  max-width: 36ch;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: clamp(1.26rem, 1.8vw, 1.8rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  text-wrap: balance;
}
.scene-head__lede + .scene-head__lede { margin-top: 0.8rem; }
.scene-head a:not([class]) { color: #b8d98a; }

.scene-btns { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.scene-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 13px 26px;
  border: 0;
  border-radius: 999px;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s ease;
}
.scene-btn--lime { background: #a8d86a; color: #1e3a2b; }
.scene-btn--lime:hover { background: #b7e27f; }
.scene-btn--ghost { background: transparent; color: #ffffff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.85); }
.scene-btn--ghost:hover { background: rgba(255, 255, 255, 0.12); }
.scene-btn:focus-visible { outline: 2px solid #b8d98a; outline-offset: 3px; }

.scene-panel {
  margin-top: clamp(1.5rem, 3vh, 2.5rem);
  padding: clamp(20px, 3vw, 40px);
  border-radius: 18px;
  background: rgba(246, 243, 234, 0.97);
  color: #4a524b;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}
.scene-panel:first-child { margin-top: 0; }
.scene-panel--clear { padding: 0; background: none; box-shadow: none; }

.scene-split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
@media (max-width: 900px) {
  .scene-split { grid-template-columns: minmax(0, 1fr); }
}

.scene-dots {
  position: fixed;
  left: clamp(1.25rem, 4vw, 4rem);
  bottom: clamp(1rem, 2.4vh, 1.6rem);
  z-index: 60;
  display: flex;
  gap: 0.55rem;
  pointer-events: none;
}
.scene-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s ease, transform 0.3s ease;
}
.scene-dots span.is-active { background: rgba(184, 217, 138, 0.85); transform: scale(1.35); }
.scene-cue {
  position: fixed;
  left: 50%;
  bottom: clamp(1rem, 2.4vh, 1.6rem);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font: 700 0.66rem/1 "Plus Jakarta Sans", system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
  transform: translateX(-50%);
  cursor: pointer;
  transition: opacity 0.3s ease, color 0.2s ease;
}
.scene-cue:hover { color: #ffffff; }
.scene-cue:focus-visible { outline: 2px solid #b8d98a; outline-offset: 3px; }
.scene-cue[hidden] { display: none; }
.scene-cue svg { width: 12px; height: 12px; }

/* Footer: no band. Like the homepage, the social icons and the language
   pill float in the bottom-right corner over the photos. */
body.has-scenes .site-foot {
  position: fixed;
  right: clamp(1.25rem, 4vw, 4rem);
  bottom: clamp(0.6rem, 1.8vh, 1.2rem);
  z-index: 60;
  margin: 0;
  border: 0;
  background: none;
}
body.has-scenes .site-foot__bar { width: auto; max-width: none; margin: 0; padding: 0; gap: 0.5rem; flex-wrap: nowrap; }
body.has-scenes .site-foot .social { gap: 0; }
body.has-scenes .site-foot .social a {
  width: 34px;
  height: 34px;
  color: rgba(255, 255, 255, 0.85);
  filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.5));
}
body.has-scenes .site-foot .social a:hover { color: #ffffff; }
body.has-scenes .site-foot .social svg { width: 15px; height: 15px; }
body.has-scenes .site-foot .lang__btn {
  min-height: 34px;
  padding: 0 10px 0 12px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #1e3a2b;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
body.has-scenes .site-foot .lang__btn:hover { background: #f6f3ea; }
body.has-scenes .site-foot .lang__menu { border-radius: 12px; overflow: hidden; }

/* In-place mode (main[data-scene-deck]): like the homepage, the page holds
   still and each scene fades in over the last. Turned on by photo-scenes.js
   only where every scene fits the window; elsewhere the page scrolls. */
html.scene-deck-on,
html.scene-deck-on body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.scene-deck-on { scroll-snap-type: none; }
.scene-deck-on .scene {
  position: fixed;
  inset: 0;
  min-height: 0;
  height: 100vh;
  height: 100svh;
  padding-top: clamp(112px, 20vh, 196px);
  padding-bottom: 2.5rem;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.75s ease, visibility 0s linear 0.75s;
}
.scene-deck-on .scene.is-current {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.75s ease, visibility 0s;
}
.scene-deck-on .scene:not(.is-current) .scene__inner { opacity: 0; transform: translateY(28px); }
/* Pin the photo and its fade to the window, so the photo's settle-in zoom
   never makes the scene scrollable and no unfaded edge can show. */
.scene-deck-on .scene__photo,
.scene-deck-on .scene::before { position: fixed; inset: 0; }
@media (prefers-reduced-motion: reduce) {
  .scene-deck-on .scene,
  .scene-deck-on .scene.is-current { transition: none; }
}

@media (max-width: 600px) {
  .scene { padding: 96px 1.5rem 76px; align-items: flex-start; }
  .scene::before {
    background: linear-gradient(180deg, rgba(15, 43, 26, 0.82) 0%, rgba(15, 43, 26, 0.62) 45%, rgba(15, 43, 26, 0.86) 100%);
  }
  .scene-head { max-width: 100%; }
  .scene-head__title { font-size: clamp(2.4rem, 10.2vw, 3.6rem); }
  .scene-head__lede { font-size: clamp(1.1rem, 4.6vw, 1.4rem); }
  .scene-btn { min-height: 46px; padding: 12px 18px; font-size: 15px; }
  .scene-cue { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html.has-scenes { scroll-snap-type: none; }
  .scene__photo, .scene__inner { transition: none; transform: none; }
  .scene__inner { opacity: 1; }
}

/* main[data-scene-top]: content starts near the top of each scene, just
   under the top bar, instead of being centred in the window. */
main[data-scene-top] .scene { align-items: flex-start; padding-top: clamp(112px, 15vh, 150px); }
.scene-deck-on main[data-scene-top] .scene { padding-top: clamp(112px, 15vh, 150px); }
@media (max-width: 600px) {
  main[data-scene-top] .scene { padding-top: 96px; }
}
@media (max-height: 720px) and (min-width: 761px) {
  .scene-deck-on main[data-scene-top] .scene { padding-top: 92px; padding-bottom: 1.25rem; }
}
/* Short laptop screens: less padding so centred scenes still fit. */
@media (max-height: 720px) and (min-width: 761px) {
  .scene-deck-on .scene { padding-top: 96px; padding-bottom: 1.25rem; }
}

/* .scene--dense: a scene that carries cards or a panel beside its headline.
   It sits a little higher, and on short laptop screens its headline and
   paragraph step down so everything still fits on one screen. */
.scene-deck-on .scene--dense { padding-top: clamp(104px, 14vh, 140px); }
@media (max-height: 760px) and (min-width: 761px) {
  .scene--dense .scene-head__title { font-size: clamp(2.3rem, 4.2vw, 3.2rem); }
  .scene--dense .scene-head__lede { font-size: clamp(1.05rem, 1.35vw, 1.25rem); max-width: 48ch; }
  .scene--dense .scene-head__rule { margin: 0.8rem 0 0.9rem; }
  .scene-deck-on .scene--dense { padding-top: 92px; }
}

/* Phones: every scene clears the top bar (people.css trims the first
   section's padding on small screens, which pulled headlines under the
   logo). Without swipe mode the social icons and language pill sit at the
   end of the page instead of floating over the content. */
@media (max-width: 760px) {
  body.has-scenes main > section.scene,
  body.has-scenes main > section.scene:first-child { padding: 96px 1.25rem 92px; }
  html:not(.scene-swipe-on) body.has-scenes .site-foot {
    position: static;
    padding: 1.25rem 1.25rem 1.5rem;
    background: #0f2b1a;
    border-top: 1px solid rgba(246, 243, 234, 0.12);
  }
  html:not(.scene-swipe-on) body.has-scenes .site-foot__bar { justify-content: space-between; }
  html:not(.scene-swipe-on) .scene-dots { display: none; }
  body.has-scenes .site-foot .social a { width: 40px; height: 40px; }
  body.has-scenes .site-foot .lang__btn { min-height: 40px; padding: 0 12px 0 14px; }
  .scene-panel { padding: 22px 18px; }
}

/* Swipe mode, the phone version of in-place mode: the page holds still and
   each scene fades in over the last, as on desktop. A scene taller than the
   phone scrolls on its own first; a swipe at its end moves to the next. */
html.scene-swipe-on,
html.scene-swipe-on body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.scene-swipe-on { scroll-snap-type: none; }
.scene-swipe-on .scene {
  position: fixed;
  inset: 0;
  min-height: 0;
  height: 100vh;
  height: 100svh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}
.scene-swipe-on .scene.is-current {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.6s ease, visibility 0s;
}
.scene-swipe-on .scene:not(.is-current) .scene__inner { opacity: 0; transform: translateY(24px); }
.scene-swipe-on .scene__photo,
.scene-swipe-on .scene::before { position: fixed; inset: 0; pointer-events: none; }
.scene-swipe-on .scene-dots { left: 1.25rem; bottom: 1.6rem; }
.scene-swipe-on .site-foot { right: 1rem; bottom: 0.9rem; }
html.fonts-pending main > .scene .scene__inner { opacity: 0 !important; }
html.scene-swipe-on:not(.scene-hash) main:not(:has(> .scene.is-current)) > .scene:first-of-type,
html.scene-deck-on:not(.scene-hash) main:not(:has(> .scene.is-current)) > .scene:first-of-type {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  transition: none;
}
html.scene-swipe-on:not(.scene-hash) main:not(:has(> .scene.is-current)) > .scene:first-of-type .scene__inner,
html.scene-deck-on:not(.scene-hash) main:not(:has(> .scene.is-current)) > .scene:first-of-type .scene__inner {
  opacity: 1;
  transform: none;
  transition: none;
}
.scene-swipe-on body.has-scenes .site-foot::before {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  height: 96px;
  background: linear-gradient(180deg, rgba(11, 30, 18, 0) 0%, rgba(11, 30, 18, 0.72) 55%, rgba(11, 30, 18, 0.9) 100%);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .scene-swipe-on .scene,
  .scene-swipe-on .scene.is-current { transition: none; }
}
/* Swipe mode: a scene shorter than the phone sits in the middle of the
   screen, as on the homepage; a taller one starts under the top bar. */
.scene-swipe-on .scene__inner { margin-block: auto; }

/* The first screen of a page is shown as it loads, without the slide-in or
   the photo zoom, so arriving on a page is calm. Later screens keep their
   fade as you move to them. */
main > .scene:first-of-type .scene__inner { opacity: 1; transform: none; }
main > .scene:first-of-type .scene__photo { transform: none; }
