/* Native scroll stack — each education stage remains a normal document card. */
.stages {
  overflow: visible;
}

.stages-grid {
  position: relative;
  display: block;
  max-width: 1080px;
  margin-inline: auto;
  padding-bottom: clamp(100px, 18vh, 180px);
}

.stages-grid .stage {
  --stage-index: 0;
  --stack-scale: 1;
  --holo-x: 0px;
  --holo-y: 0px;
  position: sticky;
  top: calc(28px + var(--stage-index) * 18px);
  z-index: calc(2 + var(--stage-index));
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
  grid-template-rows: auto auto 1fr auto;
  column-gap: clamp(35px, 7vw, 100px);
  min-height: 350px;
  margin-bottom: clamp(90px, 18vh, 170px);
  padding: clamp(30px, 3.5vw, 46px);
  border: 1px solid #77706c;
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 100% 0%, #da251b20 0%, transparent 55%),
    linear-gradient(135deg, #4b4846 0%, #383737 35%, #302f2f 74%, #423c3a 100%);
  box-shadow:
    inset 0 1px 0 #ffffff24,
    inset 0 -1px 0 #00000035,
    0 20px 50px #14101028;
  transform: scale(var(--stack-scale));
  transform-origin: center top;
  transition: border-color 300ms ease, box-shadow 300ms ease;
}

.stages-grid .stage:nth-child(2) { --stage-index: 1; }
.stages-grid .stage:nth-child(3) { --stage-index: 2; }
.stages-grid .stage:nth-child(4) { --stage-index: 3; }
.stages-grid .stage:last-child { margin-bottom: 0; }

/* Two metallic reflection layers, limited to the campaign's red and graphite. */
.stages-grid .stage::before,
.stages-grid .stage::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.stages-grid .stage::before {
  z-index: 0;
  inset: -55%;
  background: linear-gradient(
    118deg,
    transparent 29%,
    #da251b06 38%,
    #da251b23 43%,
    #ffc5bb12 47%,
    #ffffff21 49%,
    #e8e2de09 51%,
    #ef706125 54%,
    #da251b0a 59%,
    transparent 68%
  );
  transform: translate3d(var(--holo-x), var(--holo-y), 0);
  transition: transform 380ms cubic-bezier(.22, .61, .36, 1);
}

.stages-grid .stage::after {
  z-index: 1;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(135deg, transparent 42%, #da251b08 46%, #ffe4dc22 48%, #ffffff3a 50%, #fff3ed22 52%, #da251b08 54%, transparent 58%),
    linear-gradient(140deg, #ffffff14, transparent 35%, transparent 72%, #ff9a9112),
    repeating-linear-gradient(115deg, #ffffff03 0 1px, transparent 1px 5px);
  background-size: 300% 300%, 100% 100%, 100% 100%;
  background-position: 100% 100%, 0 0, 0 0;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px #ffffff06;
  animation: stage-shine 11s cubic-bezier(.4, 0, .2, 1) calc(var(--stage-index) * -1.2s) infinite;
  animation-play-state: paused;
}

.stages-grid[data-shine-running="true"] .stage::after { animation-play-state: running; }

/* A soft reflection crosses diagonally, then rests beyond the edge before repeating. */
@keyframes stage-shine {
  0%, 8% { background-position: 100% 100%, 0 0, 0 0; }
  76%, 100% { background-position: 0% 0%, 0 0, 0 0; }
}

.stages-grid .stage > * {
  position: relative;
  z-index: 2;
}

.stages-grid .stage:hover {
  border-color: #bb8178;
  transform: scale(var(--stack-scale));
  box-shadow: inset 0 1px 0 #ffffff2b, inset 0 -1px 0 #00000035, 0 24px 60px #14101030;
}

.stages-grid .stage:focus-within {
  z-index: 10;
  transform: none;
  border-color: #f6a399;
}

.stages-grid .stage-top {
  grid-column: 1 / -1;
  grid-row: 1;
  margin-bottom: 26px;
  align-items: center;
}

.stages-grid .stage-number {
  color: #f2c5be;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
}

.stages-grid .stage-number::after {
  content: ' / 04';
  color: #bdb4af;
  font-size: 10px;
  font-weight: 400;
}

.stages-grid .stage-top svg {
  width: 37px;
  height: 37px;
  color: #f5aaa0;
}

.stages-grid .stage-tag {
  grid-column: 1;
  grid-row: 2;
  color: #ffaaa0;
  font-size: 10px;
  letter-spacing: .2em;
}

.stages-grid .stage h3 {
  grid-column: 1;
  grid-row: 3 / 5;
  min-height: 0;
  margin-top: 13px;
  font-size: clamp(30px, 3vw, 41px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.045em;
  color: #fff;
}

.stages-grid .stage h3 span {
  display: inline-block;
  margin-top: 4px;
  color: #e2d8d4;
  font-size: clamp(23px, 2.3vw, 30px);
  line-height: 1.25;
}

.stages-grid .stage p {
  grid-column: 2;
  grid-row: 2 / 4;
  align-self: start;
  max-width: 420px;
  margin: 0;
  color: #e0d9d5;
  font-size: 14px;
  line-height: 1.8;
}

.stages-grid .stage > a {
  grid-column: 2;
  grid-row: 4;
  align-self: end;
  justify-self: start;
  gap: 35px;
  width: auto;
  min-width: 220px;
  min-height: 46px;
  margin-top: 23px;
  padding: 11px 18px;
  border: 1px solid #b3a29a7a;
  border-radius: 50px;
  background: #29272735;
  color: #fff;
  font-size: 12px;
}

.stages-grid .stage > a:hover {
  background: #da251b24;
  border-color: #e8a092;
  color: #fff;
}

.stages .stages-bottom { margin-top: 20px; }

@media (max-width: 680px) {
  .stages-grid { padding-bottom: 90px; }
  .stages-grid .stage {
    display: flex;
    flex-direction: column;
    top: calc(20px + var(--stage-index) * 14px);
    min-height: 440px;
    margin-bottom: 95px;
    padding: 25px 24px 26px;
    border-radius: 18px;
  }
  .stages-grid .stage:last-child { margin-bottom: 0; }
  .stages-grid .stage-top { margin-bottom: 20px; }
  .stages-grid .stage-top svg { width: 30px; height: 30px; }
  .stages-grid .stage-tag { font-size: 9px; }
  .stages-grid .stage h3 { margin-top: 12px; font-size: 30px; }
  .stages-grid .stage h3 span { font-size: 23px; }
  .stages-grid .stage p { margin: 18px 0 24px; font-size: 13px; line-height: 1.8; }
  .stages-grid .stage > a {
    align-self: stretch;
    min-width: 0;
    margin-top: auto;
    padding: 11px 16px;
    font-size: 11px;
  }
  .stages .stages-bottom { margin-top: 18px; }
}

/* Short landscape windows stay readable without a card taller than the viewport. */
@media (max-height: 520px) {
  .stages-grid { padding-bottom: 0; }
  .stages-grid .stage,
  .stages-grid .stage:hover {
    position: relative;
    top: auto;
    margin-bottom: 25px;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="enabled"]) .stages-grid .stage,
  html:not([data-motion="enabled"]) .stages-grid .stage:hover { transform: none; }
  html:not([data-motion="enabled"]) .stages-grid .stage::before { transform: none; }
  html[data-motion="enabled"] .stages-grid .stage::before {
    transition: transform 380ms cubic-bezier(.22, .61, .36, 1) !important;
  }
}

html[data-motion="paused"] .stages-grid .stage,
html[data-motion="paused"] .stages-grid .stage:hover,
html[data-motion="paused"] .stages-grid .stage::before { transform: none; }
