/* Home-only project links. Kept separate from the shared footer styles. */
.home-page .hero-orbit a.hero-orbit__label {
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  z-index: 2;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    scale 180ms ease;
}

.home-page .hero-orbit a.hero-orbit__label:hover,
.home-page .hero-orbit a.hero-orbit__label:focus-visible {
  color: var(--panel-strong);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(201, 94, 24, 0.24);
  scale: 1.045;
  z-index: 3;
}

.home-page .hero-orbit a.hero-orbit__label:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.home-page .hero-orbit a.hero-orbit__label:active {
  scale: 0.98;
}

.home-page .hero-orbit[data-orbit-ready] .hero-orbit__label {
  inset: 50% auto auto 50%;
  width: max-content;
  max-width: none;
  min-height: 2.8rem;
  padding: 0.62rem 0.88rem;
  font-size: 0.82rem;
  line-height: 1.35;
  white-space: nowrap;
  transform:
    translate3d(var(--orbit-x, 0px), var(--orbit-y, 0px), 0)
    translate(-50%, -50%);
}

.hero-orbit__about {
  display: none;
}

/* A small impact creates the orbit. All effects are decorative and local. */
.hero-orbit__impact {
  display: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 4;
}

.hero-orbit[data-orbit-intro="playing"] .hero-orbit__impact {
  display: block;
}

.hero-orbit__spark,
.hero-orbit__wave {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
}

.hero-orbit__spark {
  width: 12px;
  height: 12px;
  margin: -6px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(201, 94, 24, 0.09), 0 0 24px rgba(201, 94, 24, 0.35);
  animation: hero-spark-fall 760ms 180ms cubic-bezier(0.55, 0.02, 0.88, 0.62) both;
}

.hero-orbit__spark::before {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 4px;
  width: 4px;
  height: 58px;
  border-radius: 999px;
  background: linear-gradient(transparent, rgba(201, 94, 24, 0.48));
}

.hero-orbit__wave {
  width: var(--impact-size);
  height: var(--impact-size);
  border: 2px solid rgba(201, 94, 24, 0.55);
  background: radial-gradient(circle, transparent 55%, rgba(201, 94, 24, 0.07) 70%, transparent 72%);
  animation: hero-impact-wave 850ms 880ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-orbit__wave--echo {
  border-width: 1px;
  animation-delay: 990ms;
}

.hero-orbit[data-orbit-intro="playing"] .hero-orbit__photo {
  animation: hero-photo-impact 600ms 870ms ease-out both;
}

.hero-orbit[data-orbit-intro="playing"] .hero-orbit__ring {
  animation: hero-ring-arrive 900ms 880ms ease-out both;
}

.home-page .hero-orbit[data-orbit-intro="playing"] .hero-orbit__label {
  pointer-events: none;
  animation: hero-tag-burst 930ms 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.home-page .hero-orbit[data-orbit-intro="playing"] .hero-orbit__label--b { animation-delay: 925ms; }
.home-page .hero-orbit[data-orbit-intro="playing"] .hero-orbit__label--c { animation-delay: 950ms; }
.home-page .hero-orbit[data-orbit-intro="playing"] .hero-orbit__label--f { animation-delay: 975ms; }
.home-page .hero-orbit[data-orbit-intro="playing"] .hero-orbit__label--d { animation-delay: 1000ms; }
.home-page .hero-orbit[data-orbit-intro="playing"] .hero-orbit__label--e { animation-delay: 1025ms; }

@keyframes hero-spark-fall {
  0% { opacity: 0; transform: translateY(var(--impact-start-y)) scale(0.4); }
  12% { opacity: 1; }
  90% { opacity: 1; transform: translateY(var(--impact-end-y)) scale(1); }
  100% { opacity: 0; transform: translateY(var(--impact-end-y)) scale(1.8, 0.35); }
}

@keyframes hero-photo-impact {
  0%, 100% { transform: translateY(0) scale(1); }
  22% { transform: translateY(4px) scale(1.025, 0.95); }
  55% { transform: translateY(-2px) scale(0.985, 1.015); }
}

@keyframes hero-impact-wave {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.65); }
  5% { opacity: 0.7; }
  to { opacity: 0; transform: translate(-50%, -50%) scale(2.65); }
}

@keyframes hero-ring-arrive {
  from { opacity: 0; transform: scale(0.72); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes hero-tag-burst {
  0% { opacity: 0; transform: translate3d(0, 0, 0) translate(-50%, -50%) scale(0.2); }
  18% { opacity: 1; }
  70% { transform: translate3d(calc(var(--orbit-x) * 1.025), calc(var(--orbit-y) * 1.025), 0) translate(-50%, -50%) scale(1.025); }
  100% { opacity: 1; transform: translate3d(var(--orbit-x), var(--orbit-y), 0) translate(-50%, -50%) scale(1); }
}

@media (max-width: 860px) {
  /* Keep a full first screen, but let short phones grow instead of overlapping. */
  .home-page main .hero {
    height: auto;
    min-height: 100svh;
  }

  .home-page .hero .hero__grid {
    height: auto;
    min-height: calc(100svh - 5.25rem);
    grid-template-rows: auto minmax(18rem, 1fr);
    gap: 0.85rem;
  }

  .home-page .hero .hero-visual {
    grid-template-rows: minmax(18rem, 1fr);
  }

  .home-page .hero .hero-cta--desktop {
    display: none;
  }

  .home-page .hero-visual .hero-orbit {
    min-height: 18rem;
  }

  .home-page .hero-orbit .hero-orbit__photo {
    width: clamp(5.25rem, calc(100vw - 260px), 7.5rem);
  }

  .home-page .hero-orbit[data-project-orbit] .hero-orbit__label {
    width: clamp(5.5rem, calc(30vw - 8px), 6.25rem);
    min-height: 44px;
    height: 44px;
    padding: 0.38rem 0.42rem;
    font-size: 0.72rem;
    line-height: 1.15;
    white-space: normal;
  }

  .hero-orbit__photo .hero-orbit__about {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(201, 94, 24, 0.18);
  }

  .hero-orbit__about:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: -4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-orbit__impact {
    display: none !important;
  }

  .home-page .hero-orbit a.hero-orbit__label {
    transition: none;
    scale: 1;
  }
}
