/* Animated project slider: diagonal reveal stays inside the visual area. */
.project-stage {
  grid-template-columns: minmax(0, 1.6fr) minmax(410px, .8fr);
  overflow: hidden;
}

.project-copy {
  margin-left: 0;
  padding: 50px 46px 42px;
  clip-path: none;
  overflow: visible;
  min-width: 0;
}

.project-copy h3,
.project-copy p,
.project-copy span {
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.project-copy h3 {
  font-size: clamp(34px, 3.3vw, 56px);
  line-height: 1.02;
}

.project-visual {
  isolation: isolate;
}

.project-visual > img {
  animation: projectDiagonalReveal 1.05s cubic-bezier(.16,1,.3,1) both;
  transform-origin: center;
}

.project-visual::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 44%, rgba(69,214,255,.9) 49%, #fff 50%, transparent 55%);
  transform: translateX(-130%);
  animation: projectLightSweep 1.05s cubic-bezier(.16,1,.3,1) both;
}

.project-caption {
  z-index: 2;
  right: auto;
  max-width: min(460px, calc(100% - 48px));
}

@keyframes projectDiagonalReveal {
  0% {
    opacity: .25;
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    transform: scale(1.06);
  }
  100% {
    opacity: 1;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    transform: scale(1);
  }
}

@keyframes projectLightSweep {
  0% { transform: translateX(-130%); opacity: 0; }
  35% { opacity: .7; }
  100% { transform: translateX(130%); opacity: 0; }
}

@media (max-width: 1050px) {
  .project-stage { grid-template-columns: minmax(0, 1.35fr) minmax(380px, .9fr); }
  .project-copy { margin-left: 0; padding: 44px 34px 38px; clip-path: none; }
  .project-copy h3 { font-size: clamp(32px, 4vw, 48px); }
}

@media (max-width: 820px) {
  .project-stage { display: block; }
  .project-copy { margin: 0; padding: 34px 24px; clip-path: none; }
}

@media (prefers-reduced-motion: reduce) {
  .project-visual > img,
  .project-visual::after { animation: none; }
}
