/* ═══════════════════════════════════════════════════════════════
   PRAANA — TAB 3 · THE USER SIDE
   Every custom class is prefixed `u-`. Colours come from tokens only.
   The roll engine owns .roll-pin / .roll-grid / .roll-slides — this
   file only tunes what lives inside them.
   ═══════════════════════════════════════════════════════════════ */

/* screen-reader-only (roll heading + the roll's live region) */
.u-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* ── pane head ────────────────────────────────────────────── */
.u-head {
  padding: clamp(3rem, 7vh, 5.5rem) 0 clamp(2rem, 4vh, 3.2rem);
}

.u-title {
  font-size: var(--t-h1);
  margin: 1.1rem 0 1.3rem;
  max-width: 19ch;
}
.u-title .u-title-b {
  display: block;
  color: var(--ink-3);
}

.u-lede { max-width: 58ch; }

.u-chips {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-top: 1.5rem;
}
.u-chips .chip { background: var(--card-tint); }

/* ── the roll · pinned cross-fade ─────────────────────────── */
.u-rollsec {
  padding: clamp(.5rem, 2vh, 1.5rem) 0 0;
}

#peopleRoll .roll-rail i { background: var(--rule-2); }
#peopleRoll .roll-rail i.on { background: var(--accent); }

/* the copy never scrolls, so it is budgeted rather than trimmed */
#peopleRoll .rs { max-width: 44ch; }
#peopleRoll .rs p { text-wrap: pretty; }

/* short viewports: the pinned unit must never need to scroll */
@media (max-height: 780px) and (min-width: 1081px) {
  #peopleRoll .rs h3 { margin-bottom: .55rem; }
  #peopleRoll .rs-meta { margin-top: .9rem; }
  #peopleRoll .rs-stat { margin-top: .9rem; }
}

/* ── shared section furniture ─────────────────────────────── */
.u-h2 {
  font-size: var(--t-h2);
  margin: .9rem 0 1rem;
  max-width: 22ch;
}
.u-sub { max-width: 56ch; }
.u-fine { margin-top: 1.6rem; max-width: 74ch; }

/* ── capture-module catalogue ─────────────────────────────── */
.u-modgrid {
  list-style: none;
  margin: 2.4rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.8rem, 1.4vw, 1.15rem);
}

.u-mod {
  display: flex; flex-direction: column;
  gap: .55rem;
  padding: 1.15rem 1.25rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
  transition: border-color .3s var(--ease), transform .3s var(--ease-out), box-shadow .3s var(--ease);
}
.u-mod:hover {
  border-color: var(--accent-line);
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
}

.u-mod-top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: .7rem;
}
.u-mod h3 {
  font-size: 1.06rem;
  letter-spacing: -.028em;
}
.u-slot {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: var(--t-micro);
  letter-spacing: .05em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-pill);
  padding: .16rem .55rem;
  white-space: nowrap;
}
.u-mod p {
  font-size: .93rem;
  line-height: 1.55;
  color: var(--ink-3);
  margin: 0;
}

/* ── capability ladder ────────────────────────────────────── */
.u-ladder-wrap {
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.4rem;
}

.u-ladder {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .5rem;
  align-items: end;
}

.u-rung {
  appearance: none;
  cursor: pointer;
  text-align: left;
  display: flex; flex-direction: column; gap: .3rem;
  padding: .7rem .75rem .75rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
  font-family: var(--sans);
  color: var(--ink-3);
  position: relative;
  transition: border-color .3s var(--ease), transform .3s var(--ease-out),
              box-shadow .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
}
/* the ladder literally climbs */
.u-rung[data-i="1"] { margin-bottom: .32rem; }
.u-rung[data-i="2"] { margin-bottom: .64rem; }
.u-rung[data-i="3"] { margin-bottom: .96rem; }
.u-rung[data-i="4"] { margin-bottom: 1.28rem; }
.u-rung[data-i="5"] { margin-bottom: 1.6rem; }
.u-rung[data-i="6"] { margin-bottom: 1.92rem; }

.u-rung::after {
  content: '';
  position: absolute;
  left: .75rem; right: .75rem; bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease-out);
}
.u-rung:hover { border-color: var(--rule-2); transform: translateY(-2px); color: var(--ink-2); }
.u-rung[aria-checked="true"] {
  border-color: var(--accent-line);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--sh-2);
}
.u-rung[aria-checked="true"]::after { transform: scaleX(1); }

.u-rung-step {
  font-family: var(--mono);
  font-size: var(--t-micro);
  letter-spacing: .12em;
  color: var(--accent);
}
.u-rung-name {
  font-size: .84rem;
  font-weight: 560;
  line-height: 1.25;
  letter-spacing: -.015em;
  color: inherit;
}

.u-gear-panel {
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--sh-2);
  padding: clamp(1.3rem, 2.4vw, 1.9rem);
  min-height: 11rem;
}

.u-gear-detail { animation: uFade .45s var(--ease-out) both; }
.u-gear-detail[hidden] { display: none; }
@keyframes uFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.u-gear-detail h3 {
  font-size: var(--t-h3);
  margin-bottom: .6rem;
}
.u-gear-detail p {
  font-size: .97rem;
  color: var(--ink-2);
  max-width: 62ch;
}

.u-gear-detail .u-unlocks {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .3rem .55rem;
  max-width: 80ch;
  font-family: var(--mono);
  font-size: var(--t-fine);
  line-height: 1.5;
  color: var(--ink-3);
  margin: 1.1rem 0 .95rem !important;
  padding-top: 1rem;
  border-top: 1px dashed var(--rule);
}
.u-unlocks span {
  flex: none;
  padding: .1rem .45rem;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: var(--t-micro);
}

.u-band {
  height: 6px;
  max-width: 460px;
  border-radius: var(--r-pill);
  background: var(--paper-3);
  overflow: hidden;
}
.u-band > i {
  display: block;
  height: 100%;
  width: calc(var(--f, 0) * 100%);
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent-line), var(--accent));
  transition: width .6s var(--ease-out);
}

/* ── what we will never do ────────────────────────────────── */
.u-never-grid {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(1.6rem, 4vw, 4rem);
  align-items: start;
}
.u-never-l { position: sticky; top: 96px; }

.u-never-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
}
.u-never-list li {
  padding: 1.05rem 0 1.1rem 1.6rem;
  border-top: 1px solid var(--rule);
  position: relative;
}
.u-never-list li:last-child { border-bottom: 1px solid var(--rule); }
.u-never-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 1.45rem;
  width: 7px; height: 7px;
  border-radius: 2px;
  border: 1.5px solid var(--accent);
}
.u-never-list h3 {
  font-size: 1.02rem;
  letter-spacing: -.025em;
  margin-bottom: .3rem;
}
.u-never-list p {
  font-size: .93rem;
  line-height: 1.55;
  color: var(--ink-3);
  margin: 0;
  max-width: 58ch;
}

/* ── publishers + CTA ─────────────────────────────────────── */
.u-pub {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(1.4rem, 3vw, 3rem);
  align-items: start;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--sh-2);
}
.u-pub-h { font-size: var(--t-h3); max-width: 20ch; margin: .7rem 0 .8rem; }
.u-pub-l p { font-size: .97rem; color: var(--ink-2); max-width: 56ch; }

.u-pub-list {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
  display: flex; flex-direction: column; gap: .55rem;
}
.u-pub-list li {
  display: flex; flex-direction: column; gap: .1rem;
  font-size: var(--t-fine);
  font-family: var(--mono);
  color: var(--ink-3);
  padding: .55rem .7rem;
  border-radius: var(--r-sm);
  background: var(--paper-2);
  border: 1px solid var(--rule);
}
.u-pub-list b {
  font-family: var(--sans);
  font-size: .88rem;
  color: var(--ink);
}

.u-cta {
  margin-top: clamp(2.4rem, 5vw, 3.6rem);
  padding-top: clamp(1.6rem, 3vw, 2.2rem);
  border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1.2rem;
}
.u-cta-line {
  font-family: var(--display);
  font-size: clamp(1.1rem, 1.9vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -.035em;
  color: var(--ink);
  margin: 0;
}
.u-cta-btns { display: flex; flex-wrap: wrap; gap: .6rem; }

/* ── responsive ───────────────────────────────────────────── */
@media (max-width: 1080px) {
  /* the engine stacks the stage over the copy and keeps both pinned;
     all this tab has to do is keep the copy short enough to fit */
  #peopleRoll .rs { max-width: none; }
  #peopleRoll .rs-meta { margin-top: .8rem; }
  #peopleRoll .rs-stat { margin-top: .8rem; }

  .u-modgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .u-never-grid { grid-template-columns: 1fr; }
  .u-never-l { position: static; }
  .u-pub { grid-template-columns: 1fr; }
  .u-ladder { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .u-rung { margin-bottom: 0 !important; }
}

@media (max-width: 720px) {
  /* keep the stage caption on one line so it never eats the canvas */
  #peopleRoll .roll-stage-head {
    font-size: .62rem;
    letter-spacing: .08em;
    padding: .55rem .7rem;
  }
  #peopleRoll .rs-meta span { font-size: .62rem; padding: .22rem .5rem; }

  .u-modgrid { grid-template-columns: 1fr; }
  .u-ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .u-title { max-width: none; }
  .u-cta { flex-direction: column; align-items: flex-start; }
}

/* very small phones — the copy has to survive with the stage above it */
@media (max-width: 400px) {
  #peopleRoll .rs h3 { font-size: 1.14rem; }
  #peopleRoll .rs p { font-size: .92rem; line-height: 1.48; }
  #peopleRoll .rs-n { margin-bottom: .55rem; }
  #peopleRoll .rs-meta { gap: .3rem; margin-top: .7rem; }
}

/* short phones. The engine floors the pinned unit at 460px, so on a
   568-tall screen the stage has to give way or the copy is pushed out of
   the pin. Trim the figure, not the sentence. */
@media (max-width: 1080px) and (max-height: 700px) {
  #peopleRoll .roll-stage { height: min(38svh, 225px); }
  #peopleRoll .rs h3 { font-size: 1.08rem; }
  #peopleRoll .rs p { font-size: .88rem; line-height: 1.45; }
  #peopleRoll .rs-n { margin-bottom: .5rem; }
  #peopleRoll .rs-meta,
  #peopleRoll .rs-stat { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .u-gear-detail { animation: none; }
  .u-band > i { transition: none; }
  .u-mod:hover, .u-rung:hover { transform: none; }
}
