:root {
  --motion-duration: 720ms;
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --floating-label-bg: rgba(255, 255, 255, 0.9);
  --floating-label-copy: #07174a;
  --floating-label-border: rgba(7, 23, 74, 0.12);
}

body {
  overflow-x: hidden;
}

body.motion-gsap [data-reveal] {
  opacity: 1;
  transform: none;
  filter: none;
  transition: none;
}

body.motion-gsap :where(.hero-text, .hero-actions, .about-photo-frame) {
  will-change: transform;
}

[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 32px, 0) scale(0.985);
  filter: blur(12px);
  transition:
    opacity var(--motion-duration) var(--motion-ease),
    transform var(--motion-duration) var(--motion-ease),
    filter var(--motion-duration) ease;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform, filter;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

.motion-panel {
  position: relative;
  isolation: isolate;
}

.motion-panel::before {
  content: none;
}

.motion-panel > * {
  position: relative;
  z-index: 1;
}

:where(
  .service-card,
  .details-card,
  .stat-card,
  .projects-stat-card,
  .project-card,
  .contact-form-wrap,
  .thank-you-box,
  .hero-button,
  .hero-secondary-link,
  .section-link,
  .topbar-link,
  .back-link,
  .back-home,
  .projects-filter-chip,
  .projects-language-button,
  .submit-btn
) {
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    background-color 0.25s ease,
    border-color 0.25s ease,
    opacity 0.25s ease;
}

:where(
  .details-card,
  .stat-card,
  .projects-stat-card,
  .project-card,
  .contact-form-wrap,
  .thank-you-box
):hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.floating-label {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 3000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: min(260px, calc(100vw - 32px));
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--floating-label-border);
  background: var(--floating-label-bg);
  color: var(--floating-label-copy);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 18px 34px rgba(7, 23, 74, 0.18);
  backdrop-filter: blur(10px);
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-50%, 0, 0) scale(0.86);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-label.is-live {
  animation: floating-label-rise 1400ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.floating-label-soft {
  background: rgba(255, 255, 255, 0.72);
}

@keyframes floating-label-rise {
  0% {
    opacity: 0;
    transform: translate3d(-50%, 10px, 0) scale(0.86);
  }

  16% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate3d(-50%, -78px, 0) scale(1.02);
  }
}

@keyframes motion-orb-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(24px, -18px, 0) scale(1.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }

  .motion-panel::before {
    opacity: 0.18;
    transform: none;
    transition: none;
    animation: none;
  }

  .floating-label {
    display: none;
  }

  :where(
    .service-card,
    .details-card,
    .stat-card,
    .projects-stat-card,
    .project-card,
    .contact-form-wrap,
    .thank-you-box,
    .hero-button,
    .hero-secondary-link,
    .section-link,
    .topbar-link,
    .back-link,
    .back-home,
    .projects-filter-chip,
    .projects-language-button,
    .submit-btn
  ) {
    transition: none !important;
  }
}
