/* =========================================================
   COOAAFRO-RO — scroll-driven layer (Farm Minerals recipe)
   Everything that reacts to scrolling lives here (paired with
   assets/js/scroll.js). The site works and looks right without it:
   layout-changing rules are scoped under .sd-* classes that the script
   only adds once it knows it can run (GSAP loaded, no reduced-motion
   preference), so no-JS, reduced-motion and slow-connection visitors get
   the plain static page. Brand colours are COOAAFRO's own (green/amber/
   cream), mapped onto Farm Minerals' light/dark/accent/mid/deep roles.
   ========================================================= */

:root {
  --sd-light: var(--cream);
  --sd-dark: var(--green-900);
  --sd-accent: var(--amber-500);
  --sd-mid: var(--green-600);
  --sd-deep: var(--green-800);
  --sd-line: color-mix(in srgb, currentColor 22%, transparent);
  --sd-ease: cubic-bezier(.22, 1, .36, 1);
  --sd-hero-len: 100vh;    /* hero is type-only now, no scrub track needed */
  --sd-seq-len: 320vh;     /* height of the pinned flyover frame sequence */
}

/* ---------- Pre-init state (set by the inline <head> script) ---------- */
.sd-pre [data-sd="rise"],
.sd-pre [data-sd="cta"],
.sd-pre [data-split],
.sd-pre .sd-gw__a,
.sd-pre .sd-gw__b,
.sd-pre [data-sd-gw-note] { opacity: 0; }
.sd-pre .sd-media { clip-path: inset(10% 8% 10% 8% round 26px); }
html.sd-js [data-split],
html.sd-js .section-title { visibility: hidden; }
html.sd-js.sd-reduced [data-split],
html.sd-js.sd-reduced .section-title { visibility: visible; }
.sd-split-line { overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }

/* ---------- Preloader ----------
   Hidden by default (no-JS, or JS that never runs, must never leave a
   client-side visitor staring at four solid colour layers forever); scroll.js
   reveals it the moment it actually starts, and removes it again once the
   intro finishes (or immediately, for prefers-reduced-motion). */
.sd-preloader { display: none; position: fixed; inset: 0; z-index: 2000; pointer-events: none; }
.sd-js .sd-preloader { display: block; }
.sd-preloader__layer { position: absolute; inset: 0; }
.sd-preloader__layer:nth-child(1) { background: var(--sd-accent); }
.sd-preloader__layer:nth-child(2) { background: var(--sd-mid); }
.sd-preloader__layer:nth-child(3) { background: var(--sd-deep); }
.sd-preloader__layer:nth-child(4) { background: var(--sd-dark); display: grid; place-items: center; color: var(--sd-light); }
.sd-preloader__count { font-family: var(--font-heading); font-size: 1.1rem; letter-spacing: .08em; font-variant-numeric: tabular-nums; }

/* ---------- Header: tone flips per section via data-tone ----------
   Farm Minerals' nav never gains a solid background — it stays transparent
   the whole way down and only its text colour changes per section. That
   replaces this theme's older scrollY-threshold "solid navbar" behaviour
   (style.css's .scrolled rules), which doesn't compose with a header whose
   tone can flip more than once down the page. Same !importance as those
   rules, later in the cascade and more specific, so it wins outright. */
.sd-on .site-header .navbar-cooaafro,
.sd-on .site-header.scrolled .navbar-cooaafro {
  background-color: transparent !important;
  box-shadow: none !important;
  padding: 18px 0 !important;
  transition: color .4s var(--sd-ease);
}
.sd-on .site-header[data-tone="dark"] .nav-link,
.sd-on .site-header[data-tone="dark"] .navbar-brand,
.sd-on .site-header[data-tone="dark"] .search-toggle-btn { color: var(--sd-light) !important; }
.sd-on .site-header[data-tone="light"] .nav-link,
.sd-on .site-header[data-tone="light"] .navbar-brand,
.sd-on .site-header[data-tone="light"] .search-toggle-btn { color: var(--sd-dark) !important; }
/* The logo-cut swap itself lives in style.css, so it still works with the
   scroll layer switched off. Scroll effects only add this: while the bar is
   transparent over a dark section, keep the cream cut even once .scrolled. */
.sd-on .site-header.scrolled[data-tone="dark"] .navbar-cooaafro .navbar-brand .brand-logo--on-light { display: none; }
.sd-on .site-header.scrolled[data-tone="dark"] .navbar-cooaafro .navbar-brand .brand-logo--on-dark { display: block; }

.sd-on .site-header[data-tone="dark"] .dropdown-toggle::after { border-top-color: var(--sd-light); }
.sd-on .site-header[data-tone="light"] .dropdown-toggle::after { border-top-color: var(--sd-dark); }
.sd-on .site-header[data-tone="dark"] .navbar-toggler-icon { filter: none; }

/* ---------- Poster type (hero / statement / section display headings) ---------- */
.sd-display { font-family: var(--font-heading); font-size: clamp(2.6rem, 6.4vw, 6.4rem); line-height: .95; letter-spacing: -.02em; font-weight: 700; margin: 0; }
.sd-h2 { font-family: var(--font-heading); font-size: clamp(2rem, 3.6vw, 3.4rem); line-height: 1; letter-spacing: -.015em; font-weight: 700; margin: 0; }
.sd-caps { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.sd-line { height: 1px; background: currentColor; opacity: .3; transform-origin: left; }

/* ---------- Cursor trail grid (hero, desktop, fine pointer only) ---------- */
.sd-trail-canvas { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

/* ---------- Hero: display type + cursor trail, no imagery (Farm Minerals hero) ---------- */
.sd-on .hero-static.sd-hero {
  min-height: 100svh;
  height: auto;
  background: var(--sd-dark);
  color: var(--sd-light);
  overflow: hidden;
  display: block;
}
.sd-on .hero-static.sd-hero .sd-hero__stage {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  min-height: 100svh;
  padding: 9em 0 3em;
  background-image: none;
}
.sd-on .hero-static .brand-green-overlay { display: none; }
.sd-on .hero-static .hero-eyebrow { opacity: .85; }
.sd-on .hero-static .hero-title { font-family: var(--font-heading); font-size: clamp(2.6rem, 7vw, 6.8rem); line-height: .95; letter-spacing: -.02em; }
.sd-hero__cue {
  position: absolute; left: 50%; bottom: 28px; z-index: 3; width: 26px; height: 42px;
  margin-left: -13px; border: 2px solid rgba(255,255,255,.75); border-radius: 14px;
}
.sd-on .sd-hero__cue { display: block; }
.sd-hero__cue::after {
  content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: #fff; animation: sd-cue 1.9s ease-in-out infinite;
}
@keyframes sd-cue { 0%{opacity:0;transform:translateY(0)} 30%{opacity:1} 80%{opacity:0;transform:translateY(14px)} 100%{opacity:0} }

/* ---------- Sequence: the flight, scrubbed by scroll, pinned full-bleed ---------- */
.sd-sequence { position: relative; background: var(--sd-dark); color: var(--sd-light); }
.sd-hero-on .sd-sequence { height: var(--sd-seq-len); }
.sd-sequence__sticky { position: relative; height: 100svh; overflow: hidden; }
.sd-hero-on .sd-sequence__sticky { position: sticky; top: 0; }
.sd-sequence__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background-image: var(--hero-first, var(--hero-poster)); background-size: cover; background-position: center;
}
.sd-sequence__canvas.is-ready { background-image: none; }
.sd-sequence__canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* The sequence carries no copy of its own, so it only needs enough tint to keep the
   nav legible and to tie the photography to the brand — the full hero overlay
   flattens the aerials into a single green wash. */
.sd-sequence .brand-green-overlay {
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 56, 19, 0.42) 0%, rgba(0, 56, 19, 0.10) 32%, rgba(0, 56, 19, 0.30) 100%);
}
.sd-sequence__caption {
  position: absolute; left: var(--bs-gutter-x, 2rem); right: var(--bs-gutter-x, 2rem); bottom: 3em; z-index: 2;
  max-width: 26em; opacity: 0; text-shadow: 0 1px 2px rgba(0,0,0,.3), 0 0 28px rgba(0,0,0,.4);
}
.sd-sequence__caption--right { left: auto; text-align: right; }
[dir="rtl"] .sd-sequence__caption--right { left: var(--bs-gutter-x, 2rem); right: auto; text-align: left; }

/* =========================================================
   COMPOSITION BLOCKS
   These are Farm Minerals' *layout* language, not its motion: full-bleed
   split panels, hairline-ruled rows, and an editorial grid where type and
   photographs occupy grid cells. They are deliberately NOT scoped under
   .sd-on — the composition is the design, and it has to survive the
   COOAAFRO_DISABLE_SCROLL_FX kill switch, no-JS and reduced motion. Only the
   sticky/pinned behaviour below is gated on the scroll layer being live.
   ========================================================= */

/* The green pill behind a kicker is the old card-based language. Inside these
   blocks a kicker is just a small uppercase label, as on the reference. The
   class stays so the chapter rail keeps finding these sections, and so the
   pill survives everywhere else — including .sd-band, where the chip is what
   keeps the label legible over a photograph.
   Padding is deliberately left out: these are two-class selectors, so setting
   it here would outrank each block's own single-class kicker rule below. */
.sd-gridwall .section-kicker,
.sd-split .section-kicker { background: none; border-radius: 0; }

/* ---------- Statement grid: the phrase laid across ruled columns, with a
     photograph set into it between its two halves. Reference: Farm Minerals'
     "Most fertilizers [corn] never make it to your plants". ---------- */
.sd-gridwall { position: relative; background: var(--sd-light); color: var(--sd-dark); overflow: clip; }
.sd-gridwall__rules {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  /* 5 columns of hairline rule. A repeating gradient rather than 5 elements:
     the count changes at the mobile breakpoint with one line of CSS. */
  background-image: repeating-linear-gradient(to right, color-mix(in srgb, var(--sd-dark) 13%, transparent) 0 1px, transparent 1px 20%);
}
.sd-gridwall__inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: minmax(18vh, 1fr) auto minmax(22vh, 1fr);
  min-height: 100svh;
}
.sd-gridwall__kicker {
  /* justify-self, or the label stretches to fill its grid cell */
  grid-column: 1 / 2; grid-row: 1; align-self: end; justify-self: start;
  padding: 0 0 1.6rem clamp(1rem, 2.2vw, 2.2rem);
  color: var(--green-700);
}
[dir="rtl"] .sd-gridwall__kicker { padding: 0 clamp(1rem, 2.2vw, 2.2rem) 1.6rem 0; }
.sd-gridwall__band {
  grid-column: 1 / -1; grid-row: 2;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  border-top: 1px solid color-mix(in srgb, var(--sd-dark) 16%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--sd-dark) 16%, transparent);
  background: color-mix(in srgb, var(--sd-dark) 2.5%, transparent);
}
.sd-gw__a, .sd-gw__b {
  font-family: var(--font-heading); font-weight: 700;
  font-size: clamp(2rem, 5vw, 5.2rem); line-height: .98; letter-spacing: -.02em;
  margin: 0; color: var(--green-700);
}
.sd-gw__a { grid-column: 1 / 2; grid-row: 1; z-index: 2; padding: 1.2em 0 1.2em clamp(1rem, 2.2vw, 2.2rem); }
[dir="rtl"] .sd-gw__a { padding: 1.2em clamp(1rem, 2.2vw, 2.2rem) 1.2em 0; }
/* The tile fills its column and the full height of the band, and the second
   half of the phrase is pulled back over it — the overlap is the whole point. */
.sd-gw__tile { grid-column: 2 / 3; grid-row: 1; align-self: stretch; z-index: 1; overflow: clip; }
.sd-gw__tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sd-gw__b { grid-column: 3 / 6; grid-row: 1; z-index: 2; margin-inline-start: -4vw; }
.sd-gridwall__note {
  grid-column: 4 / 6; grid-row: 3; align-self: start;
  padding: 2.4rem clamp(1rem, 2.2vw, 2.2rem) 2rem 0;
  max-width: 34em; color: var(--ink-600); font-size: .98rem; line-height: 1.6;
}
[dir="rtl"] .sd-gridwall__note { padding: 2.4rem 0 2rem clamp(1rem, 2.2vw, 2.2rem); }
.sd-gridwall__note p:last-child { margin-bottom: 0; }
@media (max-width: 991.98px) {
  .sd-gridwall__rules { background-image: repeating-linear-gradient(to right, color-mix(in srgb, var(--sd-dark) 10%, transparent) 0 1px, transparent 1px 50%); }
  .sd-gridwall__inner { grid-template-columns: 1fr; grid-template-rows: auto; min-height: 0; padding: 4rem 0 3.5rem; gap: 0; }
  .sd-gridwall__kicker, .sd-gw__a, .sd-gw__b, .sd-gridwall__note, .sd-gridwall__band { grid-column: 1 / -1; grid-row: auto; }
  .sd-gridwall__band { display: block; padding: 1.6rem 0; }
  .sd-gw__a, .sd-gw__b { padding-inline: clamp(1rem, 4vw, 2rem); margin: 0; display: block; }
  .sd-gw__tile { display: block; height: 42vw; max-height: 300px; margin: 1rem 0; }
  .sd-gridwall__note { padding: 1.8rem clamp(1rem, 4vw, 2rem) 0; max-width: none; }
}

/* ---------- Split panel: a photograph held on one half while the numbers
     scroll past on the other. Reference: Farm Minerals' stat stack. ---------- */
.sd-split {
  display: grid; grid-template-columns: 1fr 1fr; align-items: start;
  background: var(--sd-light); color: var(--sd-dark);
}
.sd-split__media { position: relative; overflow: clip; min-height: 100svh; background: var(--green-900); }
.sd-split__media img { display: block; width: 100%; height: 112%; object-fit: cover; }
/* Sticky only once the scroll layer is live: with it off the photo is simply a
   tall half-column, which is the correct static equivalent. */
@media (min-width: 992px) {
  .sd-on .sd-split__media { position: sticky; top: 0; height: 100svh; }
}
.sd-split__panel { padding: clamp(3.5rem, 7vw, 8rem) clamp(1.5rem, 4vw, 5rem); }
.sd-split__kicker { display: block; padding: 0; color: var(--green-700); margin-bottom: 1rem; }
.sd-split__title {
  font-family: var(--font-heading); font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 3.4rem); line-height: 1.02; letter-spacing: -.02em;
  margin: 0 0 2.4rem; max-width: 12em; color: var(--green-800);
}
.sd-stat-rows { margin: 0; }
.sd-stat-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: clamp(1rem, 3vw, 3rem);
  padding: 1.1em 0 .9em;
  border-top: 1px solid color-mix(in srgb, var(--sd-dark) 18%, transparent);
}
.sd-stat-row:last-of-type { border-bottom: 1px solid color-mix(in srgb, var(--sd-dark) 18%, transparent); }
.sd-stat-row__num {
  font-family: var(--font-heading); font-weight: 700;
  font-size: clamp(2.2rem, 4.2vw, 4.4rem); line-height: 1; letter-spacing: -.025em;
  color: var(--green-700); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.sd-stat-row__label {
  /* <dd> carries a 40px inline-start margin from the UA stylesheet */
  margin: 0; text-align: end; max-width: 11em; color: var(--ink-600);
  text-transform: uppercase; letter-spacing: .07em; font-size: .78rem; font-weight: 600; line-height: 1.4;
}
.sd-split__note {
  margin: 2.2rem 0 0; max-width: 32em; color: var(--ink-600);
  text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; line-height: 1.7; opacity: .8;
}
@media (max-width: 991.98px) {
  .sd-split { grid-template-columns: 1fr; }
  .sd-split__media { min-height: 52svh; }
  .sd-split__media img { height: 100%; }
}

/* ---------- Duo: half type, half full-bleed photograph, edge to edge ---------- */
.sd-duo { display: grid; grid-template-columns: 1fr 1fr; background: var(--sd-light); color: var(--sd-dark); }
.sd-duo__body {
  display: flex; flex-direction: column; justify-content: center; gap: 1.5rem;
  padding: clamp(3.5rem, 8vw, 9rem) clamp(1.5rem, 4vw, 5rem);
}
.sd-duo__title {
  font-family: var(--font-heading); font-weight: 700;
  font-size: clamp(2rem, 4vw, 4rem); line-height: 1; letter-spacing: -.02em;
  margin: 0; max-width: 11em; color: var(--green-800);
}
.sd-duo__body .section-lead { max-width: 34em; margin: 0; }
.sd-duo__media { position: relative; overflow: clip; min-height: 64svh; background: var(--green-900); }
.sd-duo__media img { position: absolute; inset: 0; width: 100%; height: 112%; object-fit: cover; }
.sd-duo--flip .sd-duo__media { grid-column: 1; grid-row: 1; }
.sd-duo--flip .sd-duo__body { grid-column: 2; grid-row: 1; }
@media (max-width: 991.98px) {
  .sd-duo { grid-template-columns: 1fr; }
  .sd-duo__media, .sd-duo--flip .sd-duo__media { min-height: 48svh; grid-column: 1; grid-row: 1; }
  .sd-duo--flip .sd-duo__body { grid-column: 1; grid-row: 2; }
}

/* ---------- Hairline rows: cards with the card chrome taken off ---------- */
.sd-rows {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid color-mix(in srgb, var(--sd-dark) 18%, transparent);
}
.sd-rows__item {
  padding: 2.6rem clamp(1.2rem, 2.4vw, 2.6rem) 3rem;
  border-inline-end: 1px solid color-mix(in srgb, var(--sd-dark) 18%, transparent);
}
.sd-rows__item:last-child { border-inline-end: 0; }
.sd-rows__idx {
  display: block; font-family: var(--font-heading); font-weight: 600;
  font-size: .78rem; letter-spacing: .12em; color: var(--amber-500); margin-bottom: 1.6rem;
}
.sd-rows__title {
  font-family: var(--font-heading); font-weight: 700;
  font-size: clamp(1.3rem, 1.9vw, 1.9rem); line-height: 1.05; letter-spacing: -.01em;
  margin: 0 0 .9rem; color: var(--green-800);
}
.sd-rows__desc { color: var(--ink-600); line-height: 1.65; }
.sd-rows__desc p:last-child { margin-bottom: 0; }
@media (max-width: 767.98px) {
  .sd-rows { grid-template-columns: 1fr; }
  .sd-rows__item { border-inline-end: 0; border-bottom: 1px solid color-mix(in srgb, var(--sd-dark) 18%, transparent); padding: 2rem 0 2.2rem; }
  .sd-rows__item:last-child { border-bottom: 0; }
}

/* ---------- CTA: a full-bleed band, not a rounded box in a container ---------- */
.sd-cta { background: var(--sd-dark); color: var(--sd-light); padding: clamp(4.5rem, 11vw, 10rem) 0; }
.sd-cta__inner { width: min(1180px, 92vw); margin: 0 auto; }
.sd-cta__rule { height: 1px; background: currentColor; opacity: .22; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.sd-cta__grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: end; }
.sd-cta__title {
  font-family: var(--font-heading); font-weight: 700;
  font-size: clamp(2.2rem, 5.4vw, 5rem); line-height: .98; letter-spacing: -.025em;
  /* style.css colours every h1–h5 green-900 outright, which beats the cream this
     dark band passes down by inheritance — hence dark green on dark green. */
  margin: 0; max-width: 11em; color: inherit;
}
.sd-cta__text { margin: 0 0 1.8rem; color: rgba(255, 255, 255, .72); max-width: 26em; }
.sd-cta__link {
  display: inline-flex; align-items: center; gap: .6em; text-decoration: none;
  font-family: var(--font-heading); font-weight: 600; font-size: 1.05rem;
  color: var(--amber-500); border-bottom: 1px solid currentColor; padding-bottom: .35em;
  transition: gap .3s var(--sd-ease), color .3s ease;
}
.sd-cta__link:hover, .sd-cta__link:focus-visible { gap: 1.1em; color: var(--sd-light); }
@media (max-width: 767.98px) {
  .sd-cta__grid { grid-template-columns: 1fr; align-items: start; }
}

/* ---------- Statement: scrubbed word brightening (kept for inner pages) ---------- */
.sd-statement { background: var(--sd-light); }
.sd-statement .sd-lead,
.sd-statement .sd-lead p { font-family: var(--font-heading); font-size: clamp(1.6rem, 3.2vw, 2.6rem); line-height: 1.15; letter-spacing: -.01em; max-width: 22em; margin: 0; }
.sd-on .sd-statement .sd-word { opacity: .16; }

/* ---------- Horizontal: pinned sideways scroll (services / range) ---------- */
.sd-horizontal { overflow: hidden; }
.sd-horizontal__track { display: flex; gap: 1.5rem; width: max-content; }
.sd-on .sd-horizontal__track > * { width: min(26em, 82vw); flex: none; }
/* The cards in this track lose their chrome too, or the one dark section in the
   middle of the page is still speaking the old floating-card language. Scoped
   to the track, so the card grids on the inner pages keep their own styling. */
.sd-horizontal .section-kicker { background: rgba(255, 255, 255, .1); color: var(--amber-500); }
.sd-horizontal__track .card-cooaafro {
  background: none; border-radius: 0; box-shadow: none; padding: 2.2rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, .28);
  transition: border-color .3s var(--sd-ease);
}
.sd-horizontal__track .card-cooaafro:hover { transform: none; box-shadow: none; border-top-color: var(--amber-500); }
.sd-horizontal__track .card-icon {
  width: auto; height: auto; background: none; border-radius: 0;
  color: var(--amber-500); font-size: 1.5rem; margin-bottom: 1.4rem; justify-content: flex-start;
}
.sd-horizontal__track .card-cooaafro h4 { color: var(--sd-light); font-size: 1.35rem; line-height: 1.15; margin-bottom: .8rem; }
.sd-horizontal__track .card-desc { color: rgba(255, 255, 255, .72) !important; }
@media (max-width: 767px) {
  .sd-horizontal__track { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; }
  .sd-horizontal__track > * { scroll-snap-align: start; }
}

/* ---------- Realizações: sticky photo + list that checks itself off ---------- */
@media (min-width: 992px) {
  .sd-on .sd-sticky-col { position: sticky; top: 112px; align-self: flex-start; }
}
.check-list { position: relative; }
.sd-check::before, .sd-check::after {
  content: ""; position: absolute; inset-inline-start: 13px; top: 14px; bottom: 14px; width: 2px; border-radius: 1px;
}
.sd-check::before { background: rgba(46,125,70,.16); }
.sd-check::after { background: var(--green-600); transform: scaleY(var(--p, 0)); transform-origin: 50% 0; }
.sd-check .check-item { position: relative; z-index: 1; opacity: .5; transition: opacity .35s ease; }
.sd-check .check-item .check-icon {
  background: var(--cream); color: transparent; box-shadow: inset 0 0 0 2px rgba(46,125,70,.45);
  transition: background-color .3s ease, color .3s ease, box-shadow .3s ease, transform .3s ease;
}
.sd-check .check-item.is-done { opacity: 1; }
.sd-check .check-item.is-done .check-icon { background: var(--green-600); color: var(--white); box-shadow: none; transform: scale(1.06); }

/* ---------- Full-bleed photo band (one picture, few words) ---------- */
.sd-band {
  position: relative;
  min-height: 78svh;
  display: flex;
  align-items: flex-end;
  overflow: clip;                    /* clip, not hidden — hidden would break sticky ancestors */
  background: var(--sd-dark);
  padding: 8rem 0 5rem;
}
.sd-band__media { position: absolute; inset: 0; }
.sd-band__media img { width: 100%; height: 118%; object-fit: cover; display: block; }
.sd-band__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18, 52, 32, 0.55) 0%, rgba(18, 52, 32, 0.15) 45%, rgba(18, 52, 32, 0.88) 100%);
}
.sd-band__body { position: relative; z-index: 2; }
.sd-band__kicker { background: rgba(255, 255, 255, 0.12); color: var(--amber-500); }
.sd-band .section-title { max-width: 14em; }

/* ---------- Media reveal + parallax (any .sd-media figure) ---------- */
.sd-media { margin: 0; height: var(--sd-h, 320px); border-radius: 1rem; overflow: hidden; box-shadow: 0 .125rem .25rem rgba(0,0,0,.075); background: var(--green-100); }
.sd-media img { display: block; width: 100%; height: 120%; object-fit: cover; }
.sd-on .sd-media img { transform: translateY(0); }

/* ---------- CTA banner ---------- */
.sd-on .cta-banner { transform-origin: 50% 60%; }

/* ---------- Timeline: the line draws itself, dots light up ---------- */
.timeline::after {
  content: ""; position: absolute; left: 12px; top: 6px; bottom: 6px; width: 3px;
  background: var(--green-600); transform: scaleY(var(--p, 0)); transform-origin: 50% 0; border-radius: 2px;
}
[dir="rtl"] .timeline::after { left: auto; right: 12px; }
.sd-on .timeline-item { opacity: .55; transition: opacity .35s ease; }
.sd-on .timeline-item.is-active { opacity: 1; }
.sd-on .timeline-dot { transition: background-color .3s ease, transform .3s ease, border-color .3s ease; }
.sd-on .timeline-item.is-active .timeline-dot { background: var(--amber-500); border-color: var(--green-100); transform: scale(1.12); }

/* ---------- Page headers (inner pages): parallax layers ---------- */
.page-header__bg {
  position: absolute; inset: 0; background-color: var(--green-800); background-image: var(--page-header-img, none);
  background-size: cover; background-position: center;
}
.sd-on .page-header__bg, .sd-on .page-header-video { inset: auto; top: -14%; height: 128%; left: 0; width: 100%; }
.page-header .brand-green-overlay { z-index: 1; }
/* Explicitly white, not currentColor: this block sits over a dark photograph but
   inherits the body's dark ink, which would make the rule invisible. */
.page-header__rule { height: 1px; background: rgba(255, 255, 255, .38); margin: 1.1rem 0 1.6rem; transform-origin: left; }
[dir="rtl"] .page-header__rule { transform-origin: right; }
/* Colour is left to style.css's `.page-header h1`, which is more specific anyway. */
.page-header__title {
  font-family: var(--font-heading); font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 4.6rem); line-height: .98; letter-spacing: -.025em;
  margin: 0; max-width: 14em;
}

/* ---------- Chapter rail (long pages, desktop) ---------- */
.sd-rail { position: fixed; top: 50%; inset-inline-end: 16px; z-index: 1040; transform: translateY(-50%); opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s ease; }
.sd-rail.is-visible { opacity: 1; visibility: visible; }
.sd-rail ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sd-rail a { position: relative; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; }
.sd-rail__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cream); box-shadow: 0 0 0 2px var(--green-700), 0 1px 4px rgba(0,0,0,.25); transition: transform .25s ease, background-color .25s ease; }
.sd-rail a:hover .sd-rail__dot, .sd-rail a:focus-visible .sd-rail__dot { transform: scale(1.3); }
.sd-rail a.is-active .sd-rail__dot { background: var(--amber-500); transform: scale(1.35); }
.sd-rail__label {
  position: absolute; inset-inline-end: 34px; top: 50%; transform: translateY(-50%) translateX(6px); white-space: nowrap;
  padding: 5px 12px; border-radius: 999px; background: var(--green-900); color: var(--white); font-family: var(--font-heading);
  font-weight: 600; font-size: .78rem; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
[dir="rtl"] .sd-rail__label { transform: translateY(-50%) translateX(-6px); }
.sd-rail a:hover .sd-rail__label, .sd-rail a:focus-visible .sd-rail__label { opacity: 1; transform: translateY(-50%); }
.sd-rail a:focus-visible { outline: 2px solid var(--amber-500); outline-offset: 2px; border-radius: 50%; }
@media (max-width: 1199.98px) { .sd-rail { display: none; } }

/* ---------- RTL: a "forward" arrow points the other way in Arabic ---------- */
[dir="rtl"] .btn .fa-arrow-right,
[dir="rtl"] .sd-cta__link .fa-arrow-right { transform: scaleX(-1); }

/* ---------- Reduced motion: static-equivalent layout ---------- */
@media (prefers-reduced-motion: reduce) {
  .sd-hero__cue::after { animation: none; }
  .sd-sequence { height: auto !important; }
  .sd-sequence__sticky { position: relative !important; height: auto; min-height: 60svh; }
  /* No pin, so the statement grid must not rely on being held to be readable. */
  .sd-gridwall__inner { min-height: 0; padding-block: 6vh; }
  .sd-split__media { min-height: 62svh; }
}
