/* Prompt Arsenal 33 · Stacked cards scroll (homepage-rush block)
   Every card is sticky in the same window, so the next one slides up and lands exactly on
   the last, while the covered cards shrink, lift and dim into a deck behind it. */
.fx-stacked-cards-scroll {
  --sc-gutter: clamp(16px, 4vw, 28px);
  --sc-h: min(76vh, 680px);
  --sc-top: max(72px, calc((100vh - var(--sc-h)) / 2));
  --sc-radius: clamp(18px, 2vw, 26px);
  --sc-card: color-mix(in srgb, var(--fx-text, currentColor) 5%, var(--fx-bg, Canvas));
  position: relative;
  background: var(--fx-bg, transparent);
  color: var(--fx-text, currentColor);
  font-family: var(--fx-body, inherit);
  padding: clamp(64px, 10vw, 120px) 0;
}
.fx-stacked-cards-scroll .fx-sc-wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--sc-gutter); }
.fx-stacked-cards-scroll .fx-sc-head { position: relative; z-index: 1; }
/* the first card sits --sc-top down inside its sticky slot; pull the deck up so it starts close under the heading */
.fx-stacked-cards-scroll .fx-sc-stack { margin-top: calc(clamp(36px, 5vw, 64px) - var(--sc-top)); }
.fx-stacked-cards-scroll .fx-sc-kicker,
.fx-stacked-cards-scroll .fx-sc-label {
  font-family: var(--fx-mono, ui-monospace, Menlo, monospace);
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase; line-height: 1.4;
}
.fx-stacked-cards-scroll .fx-sc-kicker { display: inline-flex; align-items: center; gap: 12px; color: var(--fx-accent, #c8102e); }
.fx-stacked-cards-scroll .fx-sc-kicker::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.fx-stacked-cards-scroll .fx-sc-title {
  margin: 18px 0 0; font-family: var(--fx-display, inherit); font-weight: 600;
  font-size: clamp(36px, 5.6vw, 76px); line-height: 1; letter-spacing: -.025em; max-width: 15ch; text-wrap: balance;
}
.fx-stacked-cards-scroll .fx-sc-title em { color: var(--fx-accent, #c8102e); }
.fx-stacked-cards-scroll .fx-sc-intro {
  margin: 20px 0 0; max-width: 46ch; font-size: clamp(16px, 1.35vw, 19px); line-height: 1.55;
  color: var(--fx-dim, color-mix(in srgb, currentColor 65%, transparent));
}

/* ---- the deck ---- */
.fx-stacked-cards-scroll .fx-sc-stack { position: relative; }
.fx-stacked-cards-scroll .fx-sc-sec { position: sticky; top: 0; height: var(--sc-h); pointer-events: none; }
.fx-stacked-cards-scroll .fx-sc-card { pointer-events: auto; }
.fx-stacked-cards-scroll .fx-sc-card {
  position: relative; top: var(--sc-top); height: var(--sc-h); overflow: hidden;
  display: grid; grid-template-columns: 1fr 1.12fr;
  background: var(--sc-card); color: var(--fx-text, currentColor);
  border: 1px solid var(--fx-line, color-mix(in srgb, currentColor 18%, transparent));
  border-radius: var(--sc-radius);
  box-shadow: 0 -28px 60px -38px rgba(0,0,0,.55);
  transform-origin: 50% 0; will-change: transform;
}
.fx-stacked-cards-scroll .fx-sc-sec:nth-child(even) .fx-sc-card { grid-template-columns: 1.12fr 1fr; }
.fx-stacked-cards-scroll .fx-sc-sec:nth-child(even) .fx-sc-media { order: -1; }
.fx-stacked-cards-scroll .fx-sc-body {
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-width: 0;
  padding: clamp(28px, 3.6vw, 52px);
}
.fx-stacked-cards-scroll .fx-sc-num { display: flex; align-items: baseline; gap: 10px; font-family: var(--fx-display, inherit); line-height: 1; }
.fx-stacked-cards-scroll .fx-sc-num b {
  font-weight: 600; font-size: clamp(52px, 6vw, 92px); letter-spacing: -.04em; color: var(--fx-accent, #c8102e);
  font-variant-numeric: tabular-nums;
}
.fx-stacked-cards-scroll .fx-sc-num i {
  font-style: normal; font-family: var(--fx-mono, ui-monospace, Menlo, monospace); font-size: 12px; letter-spacing: .16em;
  color: var(--fx-dim, color-mix(in srgb, currentColor 65%, transparent));
}
.fx-stacked-cards-scroll .fx-sc-label { color: var(--fx-dim, color-mix(in srgb, currentColor 65%, transparent)); }
.fx-stacked-cards-scroll .fx-sc-copy h3 {
  margin: 12px 0 0; font-family: var(--fx-display, inherit); font-weight: 600;
  font-size: clamp(32px, 3.9vw, 58px); line-height: 1; letter-spacing: -.025em; text-wrap: balance;
}
.fx-stacked-cards-scroll .fx-sc-copy p {
  margin: 18px 0 0; max-width: 38ch; font-size: clamp(16px, 1.25vw, 18px); line-height: 1.55;
  color: var(--fx-dim, color-mix(in srgb, currentColor 65%, transparent)); text-wrap: pretty;
}
.fx-stacked-cards-scroll .fx-sc-media { position: relative; padding: 12px; min-height: 0; }
.fx-stacked-cards-scroll .fx-sc-media img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  border-radius: calc(var(--sc-radius) - 10px); background: color-mix(in srgb, currentColor 10%, transparent);
}
.fx-stacked-cards-scroll .fx-sc-shade {
  position: absolute; inset: 0; pointer-events: none; background: var(--fx-bg, #000); opacity: 0; border-radius: inherit;
}
.fx-stacked-cards-scroll .fx-sc-rest { height: calc(var(--sc-top) + 8vh); }

@media (max-width: 760px) {
  .fx-stacked-cards-scroll {
    --sc-h: min(76svh, 640px);
    --sc-top: max(64px, calc((100svh - var(--sc-h)) / 2));
  }
  .fx-stacked-cards-scroll .fx-sc-card,
  .fx-stacked-cards-scroll .fx-sc-sec:nth-child(even) .fx-sc-card { display: flex; flex-direction: column; }
  .fx-stacked-cards-scroll .fx-sc-media,
  .fx-stacked-cards-scroll .fx-sc-sec:nth-child(even) .fx-sc-media { order: -1; flex: 0 0 47%; padding: 8px 8px 0; }
  .fx-stacked-cards-scroll .fx-sc-body { flex: 1; padding: 18px 22px 24px; gap: 12px; }
  .fx-stacked-cards-scroll .fx-sc-num b { font-size: 40px; }
  .fx-stacked-cards-scroll .fx-sc-copy h3 { font-size: clamp(28px, 8.4vw, 38px); margin-top: 8px; }
  .fx-stacked-cards-scroll .fx-sc-copy p { margin-top: 10px; font-size: 16px; line-height: 1.5; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .fx-stacked-cards-scroll .fx-sc-media,
  .fx-stacked-cards-scroll .fx-sc-sec:nth-child(even) .fx-sc-media { flex-basis: 32%; }
  .fx-stacked-cards-scroll .fx-sc-num { display: none; }
}

/* reduced motion: a plain list of finished cards */
@media (prefers-reduced-motion: reduce) {
  .fx-stacked-cards-scroll .fx-sc-sec { position: relative; height: auto; margin-top: 24px; }
  .fx-stacked-cards-scroll .fx-sc-card { top: 0; height: auto; min-height: min(560px, 76vh); transform: none !important; }
  .fx-stacked-cards-scroll .fx-sc-shade { display: none; }
  .fx-stacked-cards-scroll .fx-sc-rest { display: none; }
  .fx-stacked-cards-scroll .fx-sc-stack { margin-top: clamp(12px, 3vw, 40px); }
}
