/* Motion and launch effects */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  width: calc(var(--scroll-progress, 0) * 100%);
  height: 3px;
  background: linear-gradient(90deg, var(--lime), var(--orange), #8a89e8);
  box-shadow: 0 0 20px rgba(214, 255, 63, .75);
  transform-origin: left center;
}

.hero-copy,
.hero-visual,
.work-card,
.path-card,
.service-row,
.project-form {
  backface-visibility: hidden;
}

.hero {
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.hero::before {
  width: clamp(260px, 36vw, 650px);
  aspect-ratio: 1;
  top: 9%;
  right: -12%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(230, 103, 64, .22), transparent 58%),
    radial-gradient(circle at 30% 30%, rgba(214, 255, 63, .24), transparent 45%);
  filter: blur(18px);
  animation: ambient-drift 16s ease-in-out infinite;
}

.hero::after {
  inset: 0;
  opacity: .32;
  background:
    linear-gradient(115deg, transparent 0 28%, rgba(21, 21, 21, .12) 28.1% 28.35%, transparent 28.45% 100%),
    linear-gradient(115deg, transparent 0 49%, rgba(21, 21, 21, .08) 49.1% 49.3%, transparent 49.4% 100%),
    linear-gradient(115deg, transparent 0 73%, rgba(21, 21, 21, .1) 73.1% 73.32%, transparent 73.42% 100%);
  transform: translate3d(calc(var(--scroll-progress, 0) * -90px), 0, 0);
}

.hero-grid,
.hero-meta {
  position: relative;
  z-index: 1;
}

.hero-copy .eyebrow {
  animation: soft-drop .7s .05s cubic-bezier(.16, 1, .3, 1) both;
}

.hero-copy h1 {
  overflow: hidden;
}

.hero-copy h1 span {
  opacity: 0;
  transform: translateY(105%) rotate(1.6deg);
  animation: headline-in .9s cubic-bezier(.16, 1, .3, 1) forwards;
}

.hero-copy h1 span:nth-child(1) {
  animation-delay: .12s;
}

.hero-copy h1 span:nth-child(2) {
  animation-delay: .25s;
}

.hero-copy h1 span:nth-child(3) {
  animation-delay: .38s;
}

.hero-actions {
  animation: soft-drop .85s .58s cubic-bezier(.16, 1, .3, 1) both;
}

.hero-meta {
  animation: meta-in .9s .7s cubic-bezier(.16, 1, .3, 1) both;
}

.button,
.contact-links a,
.statement-links a {
  position: relative;
  overflow: hidden;
}

.button::before,
.contact-links a::before,
.statement-links a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 25%, rgba(255, 255, 255, .42), transparent 75%);
  transform: translateX(-115%);
  transition: transform .55s cubic-bezier(.16, 1, .3, 1);
}

.button:hover::before,
.contact-links a:hover::before,
.statement-links a:hover::before {
  transform: translateX(115%);
}

.button {
  transition:
    transform .3s cubic-bezier(.16, 1, .3, 1),
    background .3s,
    color .3s,
    box-shadow .3s;
}

.button:hover {
  box-shadow: 0 18px 36px rgba(21, 21, 21, .14);
}

.hero-visual {
  isolation: isolate;
  overflow: visible;
  --pointer-x: 0px;
  --pointer-y: 0px;
  transform:
    translate3d(calc(var(--pointer-x) * .16), calc(var(--pointer-y) * .16), 0)
    rotateX(calc(var(--pointer-y) * -.08deg))
    rotateY(calc(var(--pointer-x) * .08deg));
  transform-style: preserve-3d;
  transition: transform .8s cubic-bezier(.16, 1, .3, 1);
}

.hero-visual:before {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .22),
    0 18px 70px rgba(145, 173, 40, .18),
    0 0 110px rgba(214, 255, 63, .36);
  transform: translate3d(calc(var(--pointer-x) * -.12), calc(var(--pointer-y) * -.12), -20px);
  animation: morph 11s ease-in-out infinite, launch-pulse 3.8s ease-in-out infinite;
}

.hero-visual:after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 116%;
  height: 1px;
  top: 50%;
  left: -8%;
  background: rgba(21, 21, 21, .45);
  transform: rotate(-32deg);
  transform-origin: center;
  animation: scan 5.8s cubic-bezier(.6, 0, .25, 1) infinite;
}

.launch-trail {
  position: absolute;
  z-index: 1;
  width: 72%;
  height: 28%;
  left: 2%;
  bottom: 14%;
  pointer-events: none;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 74% 52%, rgba(255, 255, 255, .86), transparent 14%),
    radial-gradient(ellipse at 60% 50%, rgba(214, 255, 63, .72), transparent 30%),
    radial-gradient(ellipse at 34% 54%, rgba(230, 103, 64, .5), transparent 48%),
    linear-gradient(90deg, transparent, rgba(230, 103, 64, .38), rgba(214, 255, 63, .72), transparent);
  filter: blur(10px);
  mix-blend-mode: multiply;
  transform: rotate(-31deg) translateX(-7%);
  animation: trail-breathe 1.55s ease-in-out infinite;
}

.launch-flare {
  position: absolute;
  z-index: 4;
  width: 24%;
  aspect-ratio: 1;
  right: 23%;
  bottom: 24%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .95), rgba(214, 255, 63, .72) 30%, transparent 67%);
  filter: blur(8px);
  mix-blend-mode: screen;
  opacity: .72;
  animation: flare-pop 1.45s ease-in-out infinite;
}

.hero-sweep {
  position: absolute;
  z-index: 5;
  inset: 5%;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
}

.hero-sweep:after {
  content: "";
  position: absolute;
  width: 30%;
  height: 165%;
  top: -35%;
  left: -75%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent);
  transform: rotate(21deg);
  animation: sweep 5s ease-in-out infinite;
}

.hero-ring {
  will-change: transform;
}

.ring-one {
  animation-duration: 22s;
}

.ring-two {
  animation-duration: 13s;
}

.orbit-label {
  position: absolute;
  will-change: transform;
  box-shadow: 0 10px 25px rgba(21, 21, 21, .08);
  animation: float 4s ease-in-out infinite;
}

.label-two {
  animation-delay: -1.5s;
}

.label-three {
  animation-delay: -2.6s;
}

.hero-visual img {
  animation: logo-breathe 4.6s ease-in-out infinite;
  box-shadow: 0 28px 58px rgba(21, 21, 21, .16);
  transform: translate3d(calc(var(--pointer-x) * -.26), calc(var(--pointer-y) * -.26), 26px);
}

.spark {
  position: absolute;
  z-index: 1;
  width: var(--spark-size, 5px);
  height: var(--spark-size, 5px);
  left: var(--spark-left, 50%);
  top: var(--spark-top, 50%);
  border-radius: 50%;
  pointer-events: none;
  background: var(--spark-color, var(--orange));
  box-shadow: 0 0 18px currentColor;
  opacity: 0;
  animation: spark-flight var(--spark-speed, 3.5s) linear infinite;
  animation-delay: var(--spark-delay, 0s);
}

.reveal {
  opacity: 0;
  transform: translateY(44px) scale(.985);
  transition:
    opacity .8s ease,
    transform .9s cubic-bezier(.16, 1, .3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.work-card,
.path-card {
  transform-style: preserve-3d;
}

.work-card.is-tilting,
.path-card.is-tilting {
  will-change: transform;
  transform:
    perspective(900px)
    rotateX(var(--tilt-y, 0deg))
    rotateY(var(--tilt-x, 0deg))
    translateY(-8px);
}

.work-card:hover,
.path-card:hover {
  box-shadow: 0 24px 65px rgba(15, 15, 15, .13);
}

.screen-lines {
  position: absolute;
  width: 34%;
  height: 24%;
  border: 1px solid rgba(21, 21, 21, .32);
  overflow: hidden;
}

.screen-lines::before,
.screen-lines::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  height: 1px;
  background: rgba(21, 21, 21, .45);
  animation: line-scan 1.9s ease-in-out infinite;
}

.screen-lines::before {
  top: 34%;
}

.screen-lines::after {
  top: 62%;
  animation-delay: -.7s;
}

.service-row:hover {
  background: rgba(250, 249, 245, .28);
}

.metrics strong {
  animation: metric-glow 5s ease-in-out infinite;
}

@keyframes ambient-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-10%, 8%, 0) scale(1.12);
  }
}

@keyframes sweep {
  0%,
  18% {
    left: -70%;
    opacity: 0;
  }
  38%,
  62% {
    opacity: 1;
  }
  82%,
  100% {
    left: 145%;
    opacity: 0;
  }
}

@keyframes scan {
  0%,
  100% {
    transform: rotate(-32deg) translateX(-3%);
    opacity: .15;
  }
  50% {
    transform: rotate(-32deg) translateX(9%);
    opacity: .7;
  }
}

@keyframes float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -12px;
  }
}

@keyframes logo-breathe {
  0%,
  100% {
    scale: 1;
  }
  50% {
    scale: 1.055;
  }
}

@keyframes headline-in {
  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

@keyframes soft-drop {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes meta-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes launch-pulse {
  0%,
  100% {
    scale: 1;
  }
  50% {
    scale: 1.035;
  }
}

@keyframes trail-breathe {
  0%,
  100% {
    opacity: .36;
    transform: rotate(-31deg) translateX(-8%) scaleX(.82);
  }
  50% {
    opacity: .82;
    transform: rotate(-31deg) translateX(-14%) scaleX(1.08);
  }
}

@keyframes flare-pop {
  0%,
  100% {
    opacity: .36;
    scale: .82;
  }
  50% {
    opacity: .88;
    scale: 1.08;
  }
}

@keyframes spark-flight {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(.4);
  }
  12% {
    opacity: .85;
  }
  100% {
    opacity: 0;
    transform: translate3d(-190px, 84px, 0) scale(.08);
  }
}

@keyframes line-scan {
  0%,
  100% {
    transform: translateX(-18%);
    opacity: .25;
  }
  50% {
    transform: translateX(18%);
    opacity: .85;
  }
}

@keyframes metric-glow {
  0%,
  100% {
    text-shadow: none;
  }
  50% {
    text-shadow: 0 0 22px rgba(214, 255, 63, .44);
  }
}

@media (max-width: 640px) {
  .hero::before {
    right: -45%;
  }

  .launch-trail {
    width: 80%;
    left: -4%;
    bottom: 10%;
  }

  .spark {
    display: none;
  }

  .hero-visual {
    transform: translate3d(calc(var(--pointer-x) * .06), calc(var(--pointer-y) * .06), 0);
  }
}

@media (hover: none) {
  .work-card,
  .path-card {
    transform-style: flat;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

  .cursor-glow,
  .spark,
  .launch-trail,
  .launch-flare {
    display: none;
  }

  .hero-visual,
  .work-card,
  .path-card {
    transform: none !important;
  }
}
