/* Leadership (leadership.html): a drawing set, one sheet per leader. Uses home.css for the tokens, header, hero and
   contact. Theme variables only; light and dark. js/leadership.js drives the stack and the wipe (transform, opacity and
   clip-path only).
   Desktop (900px+ wide, 640px+ tall, motion allowed): each sheet is about 80% of the screen tall and sticks just under
   the header; the next slides up over it while the covered sheet eases back to 94% and dims slightly; after the last
   sheet the stack releases. Phones: cards, the portrait wipe plays once in view. Reduced motion: static sheets. */

.ls { --ls-top: 96px; --ls-dim: rgba(7, 27, 83, .22); }

.ls-stack { display: grid; gap: 32px; }
.ls-item { position: relative; }

/* the sheet: a drawing sheet with a thin inner border, the portrait left (about 40%), the words right and the title
   block along the bottom */
.ls-sheet {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); grid-template-rows: minmax(0, 1fr);
  /* white sheets on the beige page (Prompt 16); in the dark theme the sheets take the dark card tone */
  color: var(--ink); background: var(--surface); border-radius: 20px;
  box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(7, 27, 83, .04), 0 24px 64px -32px rgba(7, 27, 83, .28);
  transform-origin: 50% 0;
}
.ls-sheet::after {                                  /* the sheet's inner border, like a drawing frame */
  content: ""; position: absolute; inset: 12px; border: 1px solid var(--line); border-radius: 12px; pointer-events: none;
}
.ls-photo { position: relative; margin: 12px 0 12px 12px; overflow: hidden; border-radius: 12px 0 0 12px; background: var(--bg); min-height: 320px; }
.ls-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%;
  filter: grayscale(1) contrast(.94) brightness(1.06);      /* soft greyscale (static) */
}
/* the section cut riding the wipe's edge: an empty box the photo's width with a thin ink line on its right edge */
.ls-cut { position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% + 4px); border-right: 1px solid var(--ink); pointer-events: none; transform: translateX(0); opacity: 0; }   /* the line rides 4px past the wipe, on the unrevealed side */
.ls-text { display: flex; flex-direction: column; justify-content: center; padding: 56px 64px 40px; }
.ls-name { font-size: clamp(40px, 5vw, 72px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; text-wrap: balance; }
.ls-title { margin-top: 18px; font-family: var(--f-mono); font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.ls-bio { margin-top: 24px; font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 32em; text-wrap: pretty; }
.ls-dim { position: absolute; inset: 0; z-index: 2; background: var(--ls-dim); opacity: 0; pointer-events: none; border-radius: 20px; }

/* desktop: the stack */
@media (min-width: 900px) and (min-height: 640px) and (prefers-reduced-motion: no-preference) {
  .ls-stack { gap: 0; padding-bottom: 12vh; }
  .ls-item { position: sticky; top: var(--ls-top); height: min(80vh, calc(100vh - var(--ls-top) - 24px)); margin-bottom: 22vh; }
  .ls-item:last-child { margin-bottom: 0; }
  .ls-sheet { height: 100%; }
  .ls-photo { min-height: 0; }
  .ls-stack.is-live .ls-photo img { clip-path: none; }   /* Prompt 28E: the portrait shows from the first paint (no wipe from empty) */
  .ls-stack.is-live .ls-cut { opacity: 1; transform: translateX(-100%); }
}

/* phones (and short screens): cards; the wipe plays once as each card comes into view */
@media (max-width: 899.98px), (max-height: 639.98px) {
  .ls-stack { gap: 24px; }
  .ls-sheet { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; }
  .ls-photo { margin: 12px 12px 0; border-radius: 12px 12px 0 0; min-height: 0; aspect-ratio: 4 / 3; }
  .ls-text { padding: 28px 28px 32px; }
}
@media (max-width: 899.98px) and (prefers-reduced-motion: no-preference), (max-height: 639.98px) and (prefers-reduced-motion: no-preference) {
  .ls-stack.is-live .ls-photo img { clip-path: none; }   /* Prompt 28E: no wipe from empty */
  .ls-stack.is-live .ls-cut { opacity: 1; transform: translateX(-100%); transition: transform .9s cubic-bezier(.52, 0, 0, 1), opacity .3s ease .9s; }
  .ls-stack.is-live .ls-item.is-in .ls-photo img { clip-path: inset(0 0 0 0); }
  .ls-stack.is-live .ls-item.is-in .ls-cut { transform: translateX(0); opacity: 0; }
}
@media (max-width: 599.98px) {
  .ls-name { font-size: 40px; }
  .ls-text { padding: 24px 22px 20px; }
}

/* ---------- Prompt 19 ----------
   The arrival: the compact header and Sitara's whole sheet on the first screen (1440 x 900, 1280 x 720): the nav to the
   headline 48px, the headline to the sub line 16px, the sub line to the sheet 32px; each sheet is the screen's height
   left under the header less 32px (js/leadership.js measures it: --ls-h). The portrait fills its column edge to edge
   (no inset frame, no section-cut line), rounded with the card; the name and text sit centred in their column.
   A glass cue at the bottom centre ("3 more leaders ↓") floats gently until the first scroll; a click goes to the next sheet. */
.ls.sec { padding-top: 48px; }
.ls .sec-head .sec-sub { margin-top: 16px; }
.ls .sec-head + .ls-stack { margin-top: 32px; }
.ls-sheet::after { display: none; }
.ls-photo { margin: 0; border-radius: 20px 0 0 20px; }
.ls-cut { display: none; }
.ls-text { padding: 48px 64px; }
@media (min-width: 900px) and (min-height: 640px) and (prefers-reduced-motion: no-preference) {
  .ls-item { height: var(--ls-h, min(80vh, calc(100vh - var(--ls-top) - 24px))); }
}
@media (max-width: 899.98px), (max-height: 639.98px) {
  .ls-photo { margin: 0; border-radius: 20px 20px 0 0; }
  .ls-text { padding: 28px 24px 32px; }
}
.ls-cue {
  position: fixed; z-index: 40; left: 50%; bottom: 48px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px;
  font: 500 14px/1 var(--f-sans); color: var(--ink); cursor: pointer;
  background: rgba(255, 255, 255, .9); border: 1px solid rgba(7, 27, 83, .08);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 1px 2px rgba(7, 27, 83, .06), 0 12px 32px -12px rgba(7, 27, 83, .28);
  transition: opacity .4s ease, visibility .4s;
}
[data-theme="dark"] .ls-cue { background: rgba(10, 32, 92, .72); border-color: rgba(255, 255, 255, .12); color: #FFFFFF; }
.ls-cue span { display: inline-block; }
.ls-cue.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }
.ls-cue:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
@keyframes ls-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
/* Prompt 28: the cue holds still (no idle loop) */
@media (max-width: 599.98px) { .ls-cue { bottom: 24px; } }

/* Prompt 21: a LinkedIn icon link under each bio (opens in a new tab; the URLs are [FILL] until supplied) */
.ls-in { margin-top: 20px; display: flex; align-items: center; gap: 12px; }
.ls-in-a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 12px; border: 1px solid var(--line-2); color: var(--ink-2); transition: color .2s ease, border-color .2s ease, transform .12s ease; }
.ls-in-a:hover { color: var(--ink); border-color: var(--ink); }
.ls-in-a:active { transform: scale(.96); }
.ls-in-a svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ls-in .ph { font-size: 12px; }
