/*
 * FRUITCODE Professional Motion Preview
 * Non-authoritative overlay. This file does not replace the website stylesheet.
 */

:root {
  --fc-motion-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fc-motion-spring: cubic-bezier(0.2, 0.9, 0.25, 1.18);
  --fc-motion-pink: var(--fc-pink, #ff69b4);
  --fc-motion-cyan: var(--fc-cyan, #00ced1);
  --fc-motion-yellow: var(--fc-yellow, #ffe135);
  --fc-motion-ink: var(--text-primary, #2a0c38);
}

html.fc-preview-motion {
  scroll-padding-top: 92px;
}

.fc-preview-motion body {
  isolation: isolate;
}

.fc-motion-progress {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  z-index: 100002;
  pointer-events: none;
  transform: scaleX(var(--fc-scroll-progress, 0));
  transform-origin: left center;
  background: linear-gradient(
    90deg,
    var(--fc-motion-pink),
    var(--fc-motion-yellow),
    var(--fc-motion-cyan),
    var(--fc-purple, #9b59b6)
  );
  box-shadow: 0 2px 15px color-mix(in srgb, var(--fc-motion-pink) 45%, transparent);
  transition: transform 80ms linear;
}

.fc-motion-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.fc-motion-orb {
  position: absolute;
  width: clamp(280px, 38vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.11;
  transform: translate3d(var(--fc-orb-x, 0), var(--fc-orb-y, 0), 0);
  animation: fc-orb-drift 18s var(--fc-motion-ease) infinite alternate;
  will-change: transform;
}

.fc-motion-orb:nth-child(1) {
  top: -18%;
  left: -12%;
  background: var(--fc-motion-pink);
}

.fc-motion-orb:nth-child(2) {
  top: 34%;
  right: -18%;
  background: var(--fc-motion-cyan);
  animation-delay: -7s;
  animation-duration: 23s;
}

.fc-motion-orb:nth-child(3) {
  bottom: -25%;
  left: 28%;
  background: var(--fc-motion-yellow);
  animation-delay: -12s;
  animation-duration: 27s;
}

@keyframes fc-orb-drift {
  0% { transform: translate3d(-3%, -2%, 0) scale(0.92); }
  55% { transform: translate3d(6%, 5%, 0) scale(1.04); }
  100% { transform: translate3d(-1%, 9%, 0) scale(1.12); }
}

.fc-preview-motion .main-nav {
  will-change: transform, box-shadow, background-color;
}

.fc-preview-motion .main-nav.fc-nav-elevated {
  box-shadow:
    0 12px 38px rgba(42, 12, 56, 0.12),
    inset 0 -1px rgba(255, 255, 255, 0.72);
}

.fc-preview-motion .main-nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  pointer-events: none;
  transform: scaleX(var(--fc-scroll-progress, 0));
  transform-origin: left center;
  background: linear-gradient(90deg, transparent, var(--fc-motion-pink), var(--fc-motion-cyan), transparent);
  opacity: 0.72;
}

.fc-preview-motion .nav-links a,
.fc-preview-motion .mobile-dropdown a {
  text-underline-offset: 0.25em;
}

.fc-preview-motion .fc-motion-reveal {
  opacity: 0;
  filter: blur(8px);
  transform: translate3d(0, 34px, 0) scale(0.985);
  transition:
    opacity 800ms var(--fc-motion-ease),
    filter 900ms var(--fc-motion-ease),
    transform 900ms var(--fc-motion-ease);
  transition-delay: calc(var(--fc-motion-order, 0) * 70ms);
  will-change: opacity, filter, transform;
}

.fc-preview-motion .fc-motion-reveal[data-fc-motion="left"] {
  transform: translate3d(-38px, 16px, 0) scale(0.99);
}

.fc-preview-motion .fc-motion-reveal[data-fc-motion="right"] {
  transform: translate3d(38px, 16px, 0) scale(0.99);
}

.fc-preview-motion .fc-motion-reveal[data-fc-motion="scale"] {
  transform: translate3d(0, 22px, 0) scale(0.94);
}

.fc-preview-motion .fc-motion-reveal.fc-motion-in {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0) scale(1);
}

.fc-preview-motion .fc-parallax {
  transform: translate3d(var(--fc-parallax-x, 0), var(--fc-parallax-y, 0), 0);
  transition: transform 700ms var(--fc-motion-ease);
  will-change: transform;
}

.fc-preview-motion .fc-motion-card {
  --fc-card-rx: 0deg;
  --fc-card-ry: 0deg;
  --fc-card-lift: 0px;
  --fc-card-glow-x: 50%;
  --fc-card-glow-y: 50%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.fc-preview-motion .fc-motion-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(
      360px circle at var(--fc-card-glow-x) var(--fc-card-glow-y),
      rgba(255, 255, 255, 0.4),
      transparent 58%
    );
  transition: opacity 350ms ease;
}

.fc-preview-motion .fc-motion-card.fc-is-tilting {
  transform:
    perspective(1100px)
    translateY(var(--fc-card-lift))
    rotateX(var(--fc-card-rx))
    rotateY(var(--fc-card-ry));
  box-shadow:
    0 28px 60px rgba(42, 12, 56, 0.18),
    0 10px 24px color-mix(in srgb, var(--fc-motion-pink) 15%, transparent);
  transition: transform 120ms ease-out, box-shadow 280ms ease;
}

.fc-preview-motion .fc-motion-card.fc-is-tilting::before {
  opacity: 1;
}

.fc-preview-motion img.fc-motion-image {
  opacity: 0;
  filter: saturate(0.84) blur(10px);
  transform: scale(1.025);
  transition:
    opacity 700ms var(--fc-motion-ease),
    filter 1100ms var(--fc-motion-ease),
    transform 1100ms var(--fc-motion-ease);
}

.fc-preview-motion img.fc-motion-image.fc-image-ready {
  opacity: 1;
  filter: saturate(1) blur(0);
  transform: scale(1);
}

.fc-preview-motion .section-title {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}

.fc-preview-motion .section-title::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.38em;
  width: min(84px, 45%);
  height: 4px;
  border-radius: 999px;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  background: linear-gradient(90deg, var(--fc-motion-pink), var(--fc-motion-cyan));
  box-shadow: 0 4px 16px color-mix(in srgb, var(--fc-motion-pink) 32%, transparent);
  transition: transform 900ms var(--fc-motion-ease) 160ms;
}

.fc-preview-motion .section-title.fc-motion-in::before,
.fc-preview-motion .fc-motion-in .section-title::before {
  transform: translateX(-50%) scaleX(1);
}

.fc-preview-motion .btn,
.fc-preview-motion button,
.fc-preview-motion [role="button"] {
  -webkit-tap-highlight-color: transparent;
}

.fc-preview-motion .btn:focus-visible,
.fc-preview-motion button:focus-visible,
.fc-preview-motion a:focus-visible,
.fc-preview-motion input:focus-visible,
.fc-preview-motion textarea:focus-visible,
.fc-preview-motion select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--fc-motion-cyan) 75%, white);
  outline-offset: 4px;
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--fc-motion-pink) 20%, transparent);
}

.fc-preview-motion .footer {
  position: relative;
  overflow: hidden;
}

.fc-preview-motion .footer::after {
  content: "";
  position: absolute;
  inset: auto -10% -140px;
  height: 180px;
  pointer-events: none;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--fc-motion-pink) 22%, transparent), transparent 68%);
  animation: fc-footer-breathe 5s ease-in-out infinite alternate;
}

@keyframes fc-footer-breathe {
  from { transform: scaleX(0.88); opacity: 0.55; }
  to { transform: scaleX(1.08); opacity: 1; }
}

@media (max-width: 820px), (pointer: coarse) {
  .fc-motion-orb {
    filter: blur(120px);
    opacity: 0.075;
  }

  .fc-preview-motion .fc-motion-reveal,
  .fc-preview-motion .fc-motion-reveal[data-fc-motion] {
    transform: translate3d(0, 22px, 0) scale(0.99);
  }

  .fc-preview-motion .fc-motion-reveal.fc-motion-in {
    transform: translate3d(0, 0, 0) scale(1);
  }

  .fc-preview-motion .fc-motion-card.fc-is-tilting {
    transform: translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fc-motion-progress,
  .fc-motion-ambient {
    display: none !important;
  }

  .fc-preview-motion *,
  .fc-preview-motion *::before,
  .fc-preview-motion *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }

  .fc-preview-motion .fc-motion-reveal,
  .fc-preview-motion .fc-motion-reveal[data-fc-motion],
  .fc-preview-motion img.fc-motion-image {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}

/* Homepage hero logo: professional reveal plus subtle living motion. */
html.fc-preview-motion .hero-logo-image {
  transform-origin: 50% 52%;
  will-change: transform, opacity, filter;
  animation:
    fc-hero-logo-arrive 1.15s cubic-bezier(0.16, 1, 0.3, 1) both,
    fc-hero-logo-breathe 5.8s ease-in-out 1.15s infinite;
}

@keyframes fc-hero-logo-arrive {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.84) rotate(-2deg);
    filter: blur(9px) saturate(0.75) drop-shadow(0 0 0 rgba(255, 255, 255, 0));
  }
  62% {
    opacity: 1;
    transform: translateY(-4px) scale(1.035) rotate(0.4deg);
    filter: blur(0) saturate(1.16) drop-shadow(0 14px 22px rgba(48, 29, 94, 0.22));
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
    filter: blur(0) saturate(1.04) drop-shadow(0 9px 16px rgba(48, 29, 94, 0.16));
  }
}

@keyframes fc-hero-logo-breathe {
  0%, 100% {
    transform: translateY(0) scale(1);
    filter: saturate(1.04) brightness(1) drop-shadow(0 9px 16px rgba(48, 29, 94, 0.16));
  }
  50% {
    transform: translateY(-7px) scale(1.018);
    filter: saturate(1.12) brightness(1.035) drop-shadow(0 15px 24px rgba(48, 29, 94, 0.24));
  }
}

@media (prefers-reduced-motion: reduce) {
  html.fc-preview-motion .hero-logo-image {
    animation: none;
    opacity: 1;
    transform: none;
    filter: saturate(1.04) drop-shadow(0 9px 16px rgba(48, 29, 94, 0.16));
  }
}
