/* The moving light uses Lupa's mint and copper on the existing navy surface. */
.project-launch {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  min-height: 3.15rem;
  max-width: 100%;
  box-sizing: border-box;
  padding: .75rem 1.45rem;
  border: 1px solid #77c8bd;
  border-radius: .38rem;
  background: #072e39;
  box-shadow: 0 0 1.2rem #5ce5cf32, inset 0 0 .9rem #70e6d51a;
  color: #edfdf9;
  font: 650 1rem/1.25 Inter, system-ui, sans-serif;
  text-decoration: none;
  touch-action: manipulation;
  transition: box-shadow .2s, background-color .2s, transform .16s;
}

/* A broad light scans behind the label while a bright point traces the actual perimeter. */
.project-launch::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 1px;
  border-radius: inherit;
  background-image: linear-gradient(112deg, transparent 18%, #2bd9d01a 32%,
    #67eee236 42%, #a0ffef49 46%, #52e4dd22 52%, transparent 68%);
  background-size: 144px 100%;
  background-repeat: repeat-x;
  pointer-events: none;
}
.project-launch-track {
  position: absolute;
  inset: 1px;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  overflow: visible;
  fill: none;
  pointer-events: none;
  filter: drop-shadow(0 0 2px #4fffe5);
}
.project-launch-track rect {
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.project-launch-track .trace-tail { stroke: #36edd8; stroke-width: 2; stroke-dasharray: 23 77; }
.project-launch-track .trace-tip { stroke: #efffff; stroke-width: 2.6; stroke-dasharray: 5 95; stroke-dashoffset: -18; }
.project-launch-mark {
  width: .75rem;
  height: .75rem;
  box-sizing: border-box;
  border: 1px solid #9df8e8;
  background: #69d4c833;
  transform: rotate(45deg);
  box-shadow: 0 0 .5rem #69d4c880;
}
.project-launch:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 5px;
}
.project-launch:is(:hover, :focus-visible) {
  color: #fff;
  background: #0c4147;
  box-shadow: 0 0 1.55rem #6bd8c75e, inset 0 0 1.1rem #75e4d52b;
}
.project-launch:active { transform: scale(.975); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.5rem; margin: 1.8rem 0 0; }
.hero-actions .hero-tags { margin: 0; }
@keyframes project-sheen { to { background-position: 144px 0; } }
@keyframes project-trace-tail { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -100; } }
@keyframes project-trace-tip { from { stroke-dashoffset: -18; } to { stroke-dashoffset: -118; } }
@media (prefers-reduced-motion: no-preference) {
  .project-launch::before { animation: project-sheen 1.9s linear infinite; }
  .project-launch-track .trace-tail { animation: project-trace-tail 2.15s linear infinite; }
  .project-launch-track .trace-tip { animation: project-trace-tip 2.15s linear infinite; }
  body[data-motion="off"] .project-launch::before,
  body[data-motion="off"] .project-launch-track rect { animation-play-state: paused; }
  .project-enter .hero-copy { animation: project-entry .4s cubic-bezier(.16,.84,.28,1) both; }
  @keyframes project-entry {
    from { transform: translateY(.75rem); opacity: .55; }
    to { transform: translateY(0); opacity: 1; }
  }
  @view-transition { navigation: auto; }
  html.project-enter::view-transition-old(root) { animation: project-dim .24s ease-out both; }
  html.project-enter::view-transition-new(root) { animation: project-scan .38s cubic-bezier(.2,.72,.22,1) both; }
  @keyframes project-dim { to { opacity: .35; } }
  @keyframes project-scan {
    from { clip-path: polygon(0 0, 3% 0, 0 100%, 0 100%); }
    to { clip-path: polygon(0 0, 110% 0, 100% 100%, 0 100%); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .project-launch { transition: none; }
  .project-launch:active { transform: none; }
}
@media (forced-colors: active) {
  .project-launch { border-color: LinkText; color: LinkText; }
  .project-launch::before, .project-launch-track { display: none; }
}
