/* =============================================================
   Ordora landing page — motion & polish
   -------------------------------------------------------------
   Small, tasteful animations. All respect prefers-reduced-motion.
   ============================================================= */

/* ---- Scroll reveal ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal][data-delay="1"] { transition-delay: 80ms; }
[data-reveal][data-delay="2"] { transition-delay: 160ms; }
[data-reveal][data-delay="3"] { transition-delay: 240ms; }
[data-reveal][data-delay="4"] { transition-delay: 320ms; }
[data-reveal][data-delay="5"] { transition-delay: 400ms; }
[data-reveal][data-delay="6"] { transition-delay: 480ms; }

/* ---- Headings slide in from the left ---- */
[data-reveal="left"] {
  opacity: 0;
  transform: translateX(-44px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
[data-reveal="left"].revealed {
  opacity: 1;
  transform: translateX(0);
}

/* ---- Hero float ---- */
@keyframes ordora-float {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}
.float-slow  { animation: ordora-float 6s ease-in-out infinite; }
.float-slower { animation: ordora-float 9s ease-in-out infinite; }

/* ---- Pulse dot ---- */
@keyframes ordora-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.85); }
}
.pulse-dot {
  animation: ordora-pulse 1.8s ease-in-out infinite;
}

/* ---- Gradient drift (for hero background) ---- */
@keyframes ordora-drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(20px, -30px) scale(1.05); }
  100% { transform: translate(0, 0) scale(1); }
}
.drift {
  animation: ordora-drift 18s ease-in-out infinite;
}

/* ---- Hover lift for cards ---- */
.card-lift {
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 300ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 300ms ease;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(15, 23, 42, 0.12),
              0 4px 8px -4px rgba(15, 23, 42, 0.06);
}

/* ---- Button hover polish ---- */
.btn-pop {
  transition: transform 150ms ease, box-shadow 200ms ease, background-color 200ms ease;
}
.btn-pop:hover  { transform: translateY(-1px) scale(1.02); }
.btn-pop:active { transform: translateY(0) scale(0.99); }

/* ---- Nav link underline sweep ---- */
.nav-link {
  position: relative;
  transition: color 200ms ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -4px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover::after {
  transform: scaleX(1);
}

/* ---- FAQ accordion smooth ---- */
details.faq-item > summary {
  list-style: none;
  cursor: pointer;
}
details.faq-item > summary::-webkit-details-marker { display: none; }
details.faq-item > summary .chev {
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
details.faq-item[open] > summary .chev {
  transform: rotate(180deg);
}
details.faq-item[open] {
  animation: ordora-fade-in 250ms ease;
}
@keyframes ordora-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---- Price crossfade ---- */
.price-value {
  display: inline-block;
  transition: opacity 200ms ease, transform 200ms ease;
}
.price-value.changing {
  opacity: 0;
  transform: translateY(-4px);
}

/* ---- Hero floating toast cards (payment / reminder loop) ---- */
@keyframes ordora-toast {
  0%   { opacity: 0; transform: translateY(14px) scale(0.96); }
  12%, 78% { opacity: 1; transform: translateY(0) scale(1); }
  90%, 100% { opacity: 0; transform: translateY(-10px) scale(0.98); }
}
.toast-loop { animation: ordora-toast 9s ease-in-out infinite; }
.toast-loop-delay { animation-delay: -4.5s; }

/* ---- Progress shimmer (hero stepper bar) ---- */
.progress-shimmer { position: relative; overflow: hidden; }
.progress-shimmer::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  animation: ordora-shimmer-x 2.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes ordora-shimmer-x {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* ---- Scroll cue ---- */
@keyframes ordora-cue {
  0%, 100% { transform: translateY(0); opacity: 0.65; }
  50%      { transform: translateY(8px); opacity: 1; }
}
.scroll-cue { animation: ordora-cue 2.2s ease-in-out infinite; }

/* ---- How-it-works timeline rail + traveling pulse ---- */
.how-timeline { position: relative; }
.how-rail {
  position: absolute;
  z-index: 0;
  border-radius: 999px;
  background: #c3cfd1;
  opacity: 0.7;
}
/* Mobile: vertical line through the numbered dots (dots are w-12). */
.how-rail {
  left: 1.5rem; top: 1.5rem; bottom: 1.5rem;
  width: 2px;
  transform: translateX(-50%);
}
.how-runner {
  position: absolute;
  left: 50%;
  width: 10px; height: 10px;
  border-radius: 999px;
  background: #005f6b;
  box-shadow: 0 0 0 4px rgba(0, 95, 107, 0.18);
  transform: translate(-50%, 0);
  animation: how-run-v 4.5s ease-in-out infinite;
}
@keyframes how-run-v {
  0%   { top: 0; opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { top: calc(100% - 10px); opacity: 0; }
}
/* Desktop: horizontal connector with flowing dashes + traveling pulse. */
@media (min-width: 768px) {
  .how-rail {
    left: 3rem; right: 3rem;
    top: 1.5rem; bottom: auto;
    width: auto; height: 2px;
    transform: translateY(-50%);
    background-color: transparent;
    background-image: linear-gradient(90deg, #005f6b 55%, transparent 45%);
    background-size: 14px 2px;
    background-repeat: repeat-x;
    opacity: 0.55;
    animation: how-dash 1.1s linear infinite;
  }
  .how-runner {
    top: 50%;
    animation-name: how-run-h;
    animation-duration: 5s;
  }
}
@keyframes how-dash {
  to { background-position-x: 14px; }
}
@keyframes how-run-h {
  0%   { left: 0; opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { left: calc(100% - 10px); opacity: 0; }
}
.how-dot {
  position: relative;
  z-index: 1;
  transition: box-shadow 500ms ease;
}
.how-step.revealed .how-dot {
  box-shadow: 0 0 0 6px rgba(0, 95, 107, 0.14);
}

/* ---- Marquee for trust badges (optional) ---- */
@keyframes ordora-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee {
  display: flex;
  gap: 2rem;
  animation: ordora-marquee 30s linear infinite;
  width: max-content;
}
.marquee:hover { animation-play-state: paused; }

/* ---- Reduced motion: disable everything ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---- Focus ring polish ---- */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid #005f6b;
  outline-offset: 2px;
  border-radius: 6px;
}
