/* =====================================================================
   GSDT Design D · Strategic Procurement — 03 Sourcing Areas · "The survey" (visual concept for approval)
   Built on the approved Datum system. Photographs graded into the palette; every technical layer is a responsive
   web element (SVG line work + HTML labels), registered to the photograph by the plate engine (sa.js).
   ===================================================================== */
.sa { position: relative; }
.sa__head { row-gap: 24px; padding-top: var(--section-pad); }
.sa__eyebrow { grid-column: 1 / span 3; padding-top: 14px; }
.sa__title { grid-column: 4 / span 9; max-width: 18ch; color: var(--warm); }
.sa__lede { grid-column: 4 / span 6; color: var(--titanium); }

/* ---------------------------------------------------------------- the pinned survey (desktop) */
.sa__track { position: relative; height: 560vh; margin-top: clamp(40px, 5vw, 80px); }
.sa__stage { position: sticky; top: 0; height: 100vh; min-height: 680px; overflow: hidden;
  --gx: 38vw; --gy: 12vh; --gw: 62vw; --gh: 82vh; }
.sa__scrim { position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: var(--scrim, 0);
  background: linear-gradient(90deg, rgba(26, 27, 29, .94) 0, rgba(26, 27, 29, .82) 28%, rgba(26, 27, 29, .2) 48%, rgba(26, 27, 29, 0) 62%); }
.sa__col { position: static; height: 100%; display: flex; flex-direction: column; justify-content: center; pointer-events: none; }
.sa__list { width: min(29vw, 440px); pointer-events: auto; }
.sa:not(.sa--static) .sa__btn, .sa:not(.sa--static) .sa__p { position: relative; z-index: 7; }
.sa:not(.sa--static) .sa__btn { border-top: 1px solid var(--rule); }
.sa:not(.sa--static) .sa__item:last-child .sa__p { border-bottom: 1px solid var(--rule); }
.sa__item { color: var(--cool); transition: color var(--t-mid) var(--ease-out); }
.sa__item.is-on { color: var(--warm); }
.sa__btn { display: grid; grid-template-columns: 3.2em minmax(0, 1fr); column-gap: 8px; width: 100%; text-align: left; padding: 15px 0 13px; color: inherit; align-items: baseline; }
.sa__btn:focus-visible { outline: 1px solid var(--titanium); outline-offset: 4px; }
.sa__k { font-size: var(--t-label); letter-spacing: .15em; font-weight: 560; }
.sa__p { margin-left: calc(3.2em + 8px); max-width: 30em; color: var(--titanium); max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 520ms var(--ease-out), opacity 420ms var(--ease-out), padding 520ms var(--ease-out); }
.sa__item.is-on .sa__p { max-height: 9em; opacity: 1; padding-bottom: 16px; }
.sa__meta { position: relative; z-index: 7; width: min(29vw, 440px); margin-top: 22px; display: grid; grid-template-columns: auto minmax(60px, 1fr) auto; gap: 16px; align-items: center;
  font-size: 11px; letter-spacing: .12em; color: var(--cool); pointer-events: none; }
.sa__meta #sa-count { color: var(--warm); font-weight: 560; }
.sa__bar { height: 1px; background: rgba(196, 197, 199, .22); position: relative; overflow: hidden; }
.sa__bar i { position: absolute; inset: 0; background: var(--warm); transform-origin: left; transform: scaleX(0); }
.sa__xy { min-width: 9.5em; text-align: right; }

/* plates share one frame geometry (set by the engine as --gx/--gy/--gw/--gh) */
.sa:not(.sa--static) .sa__plate { position: absolute; z-index: 2; left: var(--gx); top: var(--gy); width: var(--gw); height: var(--gh); margin: 0; pointer-events: none; }
.sa:not(.sa--static) .sa__plate.is-live { pointer-events: auto; }
.sa__frame { position: absolute; inset: 0; overflow: hidden; }
.sa--static .sa__frame { background: #141517; }
.sa__media { position: absolute; left: 0; top: 0; transform-origin: 50% 50%; will-change: transform; }
.sa__img { display: block; width: 100%; height: 100%; }
.sa__ov { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.sa__tags { position: absolute; inset: 0; pointer-events: none; }
.sa__scan { position: absolute; top: 0; bottom: 0; left: 0; width: 1px; background: var(--warm); opacity: 0; z-index: 3; box-shadow: 0 0 18px rgba(246, 243, 239, .35); pointer-events: none; }
.sa__scan::after { content: "DATUM"; position: absolute; top: 14px; left: 8px; font: 560 9.5px/1 var(--font); letter-spacing: .2em; color: var(--warm); }
.sa__cap { position: absolute; left: 0; right: 0; top: calc(100% + 12px); display: flex; gap: 16px; justify-content: space-between; color: var(--cool); font-size: 10.5px; }
.sa__cap .num { color: var(--warm); white-space: nowrap; }
.sa__cap span:last-child { text-align: right; }
/* registration marks on the active frame */
.sa__frame::before, .sa__frame::after { content: ""; position: absolute; z-index: 4; width: 14px; height: 14px; pointer-events: none; }
.sa__frame::before { left: 10px; top: 10px; border-left: 1px solid var(--titanium); border-top: 1px solid var(--titanium); }
.sa__frame::after { right: 10px; bottom: 10px; border-right: 1px solid var(--titanium); border-bottom: 1px solid var(--titanium); }

/* secondary plate (B·2, C·2, D·2) */
.sa__sub { position: absolute; z-index: 5; width: var(--sw, 26%); aspect-ratio: var(--sa, 1); left: var(--sx, 0); top: var(--sy, 0);
  border: 1px solid rgba(196, 197, 199, .55); background: #141517; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); opacity: 0; }
.sa__subm { position: absolute; inset: 0; overflow: hidden; }
.sa__subm img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(var(--sz, 1.06)); }
.sa-tag.sa-subtag { position: absolute; left: 0; top: calc(100% + 34px); transform: none; opacity: 1; }
.sa__subl { position: absolute; left: 0; top: calc(100% + 8px); font-size: 10.5px; color: var(--warm); letter-spacing: .14em; }

/* ---------------------------------------------------------------- engineering layer tokens (dark plates) */
.sa__ov .g-l { fill: none; stroke: var(--warm); stroke-width: 1.15; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.sa__ov .g-f { fill: none; stroke: rgba(246, 243, 239, .55); stroke-width: .9; vector-effect: non-scaling-stroke; }
.sa__ov .g-c { fill: none; stroke: rgba(246, 243, 239, .6); stroke-width: .9; stroke-dasharray: 12 4 2 4; vector-effect: non-scaling-stroke; }
.sa__ov .g-d { fill: none; stroke: rgba(246, 243, 239, .7); stroke-width: .9; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.sa__ov .g-n { fill: var(--charcoal); stroke: var(--warm); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.sa__ov .g-w { fill: var(--warm); }
.sa__ov .g-sh { fill: rgba(26, 27, 29, .32); stroke: none; }
.sa-mark { position: absolute; transform: translate(-50%, -50%); font: 600 10.5px/1 var(--font); letter-spacing: .16em; color: var(--warm); padding: 3px 5px; background: rgba(26, 27, 29, .5); opacity: 0; white-space: nowrap; }
.sa__ov .g-tx { font: 560 11px/1 var(--font); letter-spacing: .16em; fill: var(--warm); text-transform: uppercase; }
.sa__ov .is-hot { stroke: var(--warm) !important; stroke-width: 1.8 !important; }
.sa-tag { position: absolute; transform: translate(0, -50%); display: flex; align-items: center; gap: 8px; white-space: nowrap; pointer-events: auto;
  font: 560 11px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--warm); opacity: 0; }
.sa-tag.is-left { transform: translate(-100%, -50%); flex-direction: row-reverse; }
.sa-tag i { font-style: normal; display: inline-grid; place-items: center; min-width: 22px; height: 18px; padding: 0 4px; border: 1px solid rgba(246, 243, 239, .7); font-size: 9.5px; letter-spacing: .08em; color: var(--warm); background: rgba(26, 27, 29, .55); }
.sa-tag span { padding: 5px 7px; background: rgba(26, 27, 29, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sa-tag:hover span, .sa-tag:focus-visible span { background: var(--warm); color: var(--charcoal); }
/* pointer crosshair (fine pointers) */
.sa__xh { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; z-index: 4; }
.sa__xh::before, .sa__xh::after { content: ""; position: absolute; background: rgba(246, 243, 239, .28); }
.sa__xh::before { left: var(--px, 50%); top: 0; bottom: 0; width: 1px; }
.sa__xh::after { top: var(--py, 50%); left: 0; right: 0; height: 1px; }
.sa__plate.is-live:hover .sa__xh { opacity: 1; }

/* ---------------------------------------------------------------- International Commodity Trading */
.sa-t { margin-top: clamp(80px, 10vw, 160px); padding-top: 28px; padding-bottom: var(--section-pad); border-top: 1px solid var(--rule-strong); row-gap: clamp(40px, 5vw, 72px); align-items: start; }
.sa-t__h { grid-column: 1 / span 5; display: grid; gap: 18px; align-content: start; }
.sa-t__lbl { display: flex; align-items: center; gap: 12px; color: var(--cool); }
.sa-t__lbl .num { color: var(--warm); }
.sa-t__lbl .tick { width: 28px; height: 1px; background: var(--rule-strong); }
.sa-t__title { color: var(--warm); max-width: 14ch; }
.sa-t__p { margin-top: 8px; max-width: 34em; }
.sa-t__p .t-body { color: var(--titanium); }
.sa-t__p .t-body--fg { color: var(--warm); }
.sa-t__ore { grid-column: 7 / span 6; margin: 0; position: relative; }
.sa-t__oref { position: relative; aspect-ratio: 1.209; overflow: hidden; background: #141517; }
.sa-t__oref .sa__media { position: absolute; inset: 0; width: 100%; height: 100%; }
.sa-t__ore .sa__cap { position: static; margin-top: 12px; }
.sa-t__forms { grid-column: 1 / -1; margin: 0; position: relative; }
#sa-forms { display: block; width: 100%; height: auto; overflow: visible; }
.sa-t__forms .sa__cap { position: static; margin-top: 14px; }
#sa-forms .f-l { fill: none; stroke: var(--titanium); stroke-width: 1.1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
#sa-forms .f-s { fill: none; stroke: var(--warm); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
#sa-forms .f-f { fill: none; stroke: var(--graphite); stroke-width: 1; vector-effect: non-scaling-stroke; }
#sa-forms .f-d { stroke-dasharray: 3 4; }
#sa-forms .f-c { stroke-dasharray: 12 4 2 4; }
#sa-forms .f-fill { fill: rgba(196, 197, 199, .1); }
#sa-forms .f-fill2 { fill: rgba(196, 197, 199, .2); }
#sa-forms .f-dot { fill: var(--titanium); }
#sa-forms .f-n { fill: var(--charcoal); stroke: var(--warm); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
#sa-forms .f-tx { font: 560 12px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; fill: var(--warm); }
#sa-forms .f-ts { font: 500 10.5px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; fill: var(--cool); }
#sa-forms .f-el { font: 600 22px/1 var(--font); letter-spacing: .02em; fill: var(--warm); }
#sa-forms .f-box { fill: none; stroke: rgba(246, 243, 239, .7); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* ---------------------------------------------------------------- static sequence (phones, tablets, reduced motion) */
.sa--static .sa__track { height: auto; margin-top: clamp(36px, 6vw, 64px); }
.sa--static .sa__stage { position: relative; height: auto; min-height: 0; overflow: visible; }
.sa--static .sa__scrim, .sa--static .sa__meta { display: none; }
.sa--static .sa__col { height: auto; display: block; pointer-events: auto; }
.sa--static .sa__list { width: auto; border-top: 0; }
.sa--static .sa__item { display: flex; flex-direction: column; color: var(--warm); border-bottom: 0; padding-bottom: clamp(48px, 9vw, 96px); }
.sa--static .sa__plate { order: 1; position: relative; margin: 0 calc(-1 * max(var(--gutter), env(safe-area-inset-left, 0px))) 54px; aspect-ratio: var(--ar, 4 / 5); }
.sa--static .sa__item:nth-child(even) .sa__plate { margin-left: 0; }
.sa--static .sa__item:nth-child(odd) .sa__plate { margin-right: 0; }
.sa--static .sa__btn { order: 2; pointer-events: none; padding-top: 0; border-top: 1px solid var(--rule); padding-top: 14px; }
.sa--static .sa__p { order: 3; max-height: none; opacity: 1; padding-bottom: 0; }
.sa--static .sa__cap { top: calc(100% + 10px); left: max(var(--gutter), env(safe-area-inset-left, 0px)); right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.sa--static .sa__item:nth-child(even) .sa__cap { left: 0; }
.sa--static .sa__item:nth-child(odd) .sa__cap { right: 0; }
.sa--static .sa__sub { --sw: 34%; }
.sa--static .sa__cap span:last-child { max-width: 70%; }
@media (min-width: 700px) { .sa--static .sa__plate { aspect-ratio: var(--ar, 16 / 10); } .sa--static .sa__sub { --sw: 26%; } }
@media (max-width: 1080px) {
  .sa__eyebrow, .sa__title, .sa__lede { grid-column: 1 / -1; }
  .sa-t__h, .sa-t__ore { grid-column: 1 / -1; }
}
@media (max-width: 699px) {
  .sa-tag { font-size: 10px; letter-spacing: .13em; }
  .sa-tag[data-m="0"] { display: none; }   /* sa.js also hides its leader and node */
  .sa__cap { font-size: 9.5px; flex-direction: column; gap: 4px; }
  .sa--static .sa__plate { margin-bottom: 80px; }   /* room for a three-line credit on narrow phones */
  .sa__cap span:last-child { text-align: left; max-width: none !important; }
  #sa-forms .f-tx { font-size: 14px; } #sa-forms .f-ts { font-size: 11.5px; }
}

/* ---------------------------------------------------------------- Final refinement (23 October): photographic credits on phones
   The credit is set in sentence case at reading size, one fact per line: the source (photographer / library) and the
   disclosure (illustrative, not GSDT's own). The words are unchanged; on larger screens it reads on one line as before. */
@media (max-width: 699px) {
  .sa__cap { gap: 6px; }
  .sa__cap .num { font-size: 10.5px; }
  .sa__credit { display: grid; gap: 1px; font-size: 12px; line-height: 1.45; letter-spacing: .005em; text-transform: none; font-weight: 500; color: var(--titanium); }
  .sa__credit > span { display: block; }
  .sa__credit > .sa__sep { display: none; }
  .sa__credit .sa__note { color: var(--cool); }
  .sa__credit .sa__note::first-letter, .sa__credit .sa__subj::first-letter, .sa__credit .sa__src::first-letter { text-transform: uppercase; }
  .sa--static .sa__plate { margin-bottom: 96px; }   /* room for the credit's three lines on a 320 px phone */
}
@media (max-width: 359px) { .sa__credit { font-size: 11.5px; } }

/* development aid only (?sa-grid=1): a 5 % registration grid on each plate, labelled every 10 % */
#sourcing .sa__ov .g-grid { fill: none; stroke: rgba(246, 243, 239, .28); stroke-width: 1; vector-effect: non-scaling-stroke; }
#sourcing .sa__ov .g-grid-10 { stroke: rgba(246, 243, 239, .55); }
.sa-gridl { position: absolute; font: 600 9px/1 var(--font); color: var(--warm); background: rgba(26, 27, 29, .7); padding: 1px 3px; transform: translate(-50%, 0); }
