/* ==========================================================================
   FishCloud Flow — Purposeful Motion & SVG Ocean Animations
   Zero hidden content when JS is disabled; full prefers-reduced-motion support
   ========================================================================== */

@property --border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes fc-border-spin {
  to {
    --border-angle: 360deg;
  }
}

@keyframes fc-logo-breathe {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.03);
  }
}

@keyframes fc-float-slow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes fc-dash-flow {
  from {
    stroke-dashoffset: 64;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fc-pulse-ring {
  0% {
    transform: scale(0.95);
    opacity: 0.85;
  }
  70% {
    transform: scale(1.45);
    opacity: 0;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

@keyframes fc-ripple {
  from {
    transform: scale(0);
    opacity: 0.45;
  }
  to {
    transform: scale(3.2);
    opacity: 0;
  }
}

.brand-logo-svg {
  animation: fc-logo-breathe 5.5s ease-in-out infinite;
}

.svg-flow-dash {
  stroke-dasharray: 8 8;
  animation: fc-dash-flow 2.4s linear infinite;
}

.svg-float-a {
  animation: fc-float-slow 6.2s ease-in-out infinite;
}

.svg-float-b {
  animation: fc-float-slow 7.8s ease-in-out infinite 1.1s;
}

/* Heading animated aqua-ocean underline */
.heading-flow {
  position: relative;
  display: inline-block;
}

.heading-flow::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-top: 0.45rem;
  border-radius: 999px;
  background: var(--fc-grad-brand);
  transform-origin: left center;
  transition: width 550ms var(--fc-ease);
}

.is-visible .heading-flow::after {
  width: 96px;
}

/* Stepped scroll reveal — ONLY hides elements once JS adds .js-motion-ready on <html> */
.js-motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 560ms var(--fc-ease), transform 620ms var(--fc-ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.js-motion-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Click water ripple span */
.btn-ripple {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.42);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  animation: fc-ripple 580ms var(--fc-ease) forwards;
}

/* Micro tilt smooth transition */
[data-tilt] {
  will-change: transform;
  transform-style: preserve-3d;
}

/* Reduced motion & mobile performance fallback */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js-motion-ready [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
