/* ==========================================================================
   Winda — Scenarios overview + detail pages (Copy Deck v3).
   Overview: role roller (filters cards) + scenario cards.
   Detail: impact figures · before/after · products-used badges.
   Ported from the design export.
   ========================================================================== */

/* ---- overview ---------------------------------------------------------- */

.sc-intro {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 44px;
}

.sc-intro__prompt {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
  color: var(--w-white);
}

.sc-roll {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sc-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.sc-card {
  display: block;
  color: inherit;
  padding: 0;
}

.sc-card:hover {
  color: inherit;
}

/* Scenario visual — a self-contained 1120x480 plate (demos/scn-*.html) shown
   in an iframe scaled to the card width by js/scenarios.js. The logical size
   1200x560 includes the plate's 40px body padding so nothing is clipped. */
.sc-card__fig {
  position: relative;
  aspect-ratio: 1200 / 560;
  overflow: hidden;
  background: #05080b;            /* matches the plate's own backdrop */
  border: 0;
  border-bottom: 1px solid var(--w-line);
}
.sc-card__fig .sc-viz {
  position: absolute;
  top: 0;
  left: 0;
  width: 1200px;
  height: 560px;
  border: 0;
  transform-origin: top left;
  pointer-events: none;          /* clicks pass through to the card link */
}

/* Phone: js/scenarios.js holds the plate at a legible width and lets the card
   scroll sideways (a tap still follows the card link; a horizontal drag pans
   the plate) instead of shrinking it to an unreadable strip. */
.sc-card__fig--scroll {
  aspect-ratio: auto;
  height: auto;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  min-width: 0;                  /* never let the in-flow plate blow out the grid track */
}
/* The card is a grid item; without this its min-content grows to the plate's
   legible width and stretches the whole track past the viewport. */
.sc-card { min-width: 0; }

.sc-card__body {
  padding: 26px;
}

.sc-card__desc {
  font: 400 14.5px/1.6 var(--font-body);
  color: var(--w-grey);
  margin-bottom: 18px;
}

.sc-card__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

/* ---- detail: impact figures ------------------------------------------- */

.impact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--w-line-green);
  margin-top: 26px;
}

.impact .cell {
  padding: 52px 34px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.impact .cell + .cell {
  border-left: 1px solid var(--w-line);
}

.impact .big {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--w-green);
}

.impact .lab {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--w-grey);
  line-height: 1.75;
  margin-top: 18px;
}

/* ---- detail: before / after ------------------------------------------- */
/* Two diagnostic panels: the "before" state reads as a fault (muted, amber
   accent), the "after" state as resolved (lit green, corner brackets, soft
   glow), joined by an animated transition arrow. */

.ba-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  margin-top: 30px;
}

.ba-col {
  position: relative;
  padding: 26px 30px 30px;
  overflow: hidden;
}

.ba-col.before {
  border: 1px solid var(--w-line);
  background: linear-gradient(180deg, rgba(224, 163, 62, 0.06), rgba(255, 255, 255, 0.006));
}

.ba-col.after {
  border: 1px solid var(--w-green);
  background: linear-gradient(180deg, rgba(181, 208, 88, 0.12), rgba(181, 208, 88, 0.02));
  box-shadow: 0 24px 60px -34px rgba(181, 208, 88, 0.55);
}

/* Corner brackets on the resolved panel. */
.ba-col.after::before,
.ba-col.after::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--w-green);
  pointer-events: none;
}
.ba-col.after::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.ba-col.after::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* Status header with a state dot. */
.ba-col h4 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.ba-col h4::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ba-col.before h4 { color: var(--w-warn); }
.ba-col.before h4::before { background: var(--w-warn); }
.ba-col.after h4 { color: var(--w-green); }
.ba-col.after h4::before { background: var(--w-green); box-shadow: 0 0 9px var(--w-green); }

.ba-col .csub {
  font: 500 14px/1.5 var(--font-body);
  color: var(--w-grey);
  margin-bottom: 22px;
}
.ba-col.after .csub { color: var(--w-white); }

/* Items with a circular status marker. */
.ba-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--w-line);
}
.ba-col.after .ba-item { border-top-color: rgba(181, 208, 88, 0.16); }
.ba-item:first-of-type { border-top: 0; }

.ba-item .mk {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid;
  margin-top: 1px;
}
.ba-col.before .mk { color: var(--w-warn); border-color: rgba(224, 163, 62, 0.42); background: rgba(224, 163, 62, 0.08); }
.ba-col.after .mk { color: var(--w-green); border-color: var(--w-line-green); background: rgba(181, 208, 88, 0.12); }

.ba-item div { flex: 1; }
.ba-item p {
  font: 400 14px/1.6 var(--font-body);
  color: var(--w-grey);
}

/* Transition arrow — flows from the fault state to the resolved one. */
.ba-mid {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
}
.ba-mid span {
  color: var(--w-green);
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(181, 208, 88, 0.6));
  animation: ba-arrow 1.8s ease-in-out infinite;
}
@keyframes ba-arrow {
  0%, 100% { transform: translateX(-3px); opacity: 0.55; }
  50% { transform: translateX(4px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .ba-mid span { animation: none; }
}

/* ---- detail: products used -------------------------------------------- */

.prodbadges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.prodbadge {
  border: 1px solid var(--w-line-green);
  background: var(--w-surface);
  padding: 18px 22px;
  min-width: 172px;
  transition: all var(--dur-base) var(--ease-engage);
}

.prodbadge:hover {
  background: var(--w-green-dim);
  transform: translateY(-4px);
}

.prodbadge .n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--w-white);
}

.prodbadge .r {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--w-green);
  margin-top: 7px;
}

/* ---- narrow viewports -------------------------------------------------- */

@media (max-width: 820px) {
  .impact,
  .ba-grid {
    grid-template-columns: 1fr;
  }

  .impact .cell + .cell {
    border-left: 0;
    border-top: 1px solid var(--w-line);
  }

  .ba-mid span {
    transform: rotate(90deg);
    display: block;
    padding: 12px 0;
    animation: none;   /* the slide animation would override the 90deg rotate */
  }

  .sc-intro {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ==========================================================================
   Scenario detail — hero photo BEHIND the title. Full-bleed background image
   with a dark left/bottom scrim so the crumb, tags, headline and lede read on
   top of it (reuses the shared .hero-photo scaffolding).
   ========================================================================== */
/* Content flows top-aligned with the base .hero padding (130px 0 90px), the
   same as every other hero — no vertical centering. */
.sc-dhero .hero-photo__img {
  width: 100%;            /* full-bleed background, not the 78% side image */
}
.sc-dhero__scrim {
  background:
    linear-gradient(90deg, rgba(4,6,8,.93) 0%, rgba(4,6,8,.74) 40%, rgba(4,6,8,.36) 72%, rgba(4,6,8,.52) 100%),
    linear-gradient(0deg, rgba(4,6,8,.82) 0%, transparent 44%);
}

@media (max-width: 640px) {
  .sc-dhero__scrim {
    background:
      linear-gradient(0deg, rgba(4,6,8,.9) 0%, rgba(4,6,8,.55) 45%, rgba(4,6,8,.4) 100%);
  }
}

/* ==========================================================================
   Scenario Proof beat — a single representative quote.
   ========================================================================== */
.sc-proof {
  border-left: 2px solid var(--w-green);
  padding: 4px 0 4px 30px;
  margin-top: 22px;
  max-width: 72ch;
}
.sc-proof__q {
  font: 500 clamp(20px, 1.9vw, 27px)/1.4 var(--font-body);
  color: var(--w-white);
}
.sc-proof__a {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--w-green);
  margin-top: 16px;
}
.sc-proof__note {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--w-grey-2);
  margin-top: 7px;
}
