/* ==========================================================================
   sales-motion.css — Apple-grade interaction layer for sales pages
   Progressive enhancement: pages are fully functional without it.
   Restraint rules: one easing, short distances, once-only reveals,
   full respect for prefers-reduced-motion.
   ========================================================================== */

html {
  scroll-behavior: smooth;
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.reveal-in {
  opacity: 1;
  transform: none;
}

/* ---------- Buttons: weight + response ---------- */

.btn {
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.25s ease,
    color 0.25s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.975);
  transition-duration: 0.12s;
}

/* ---------- Sticky buy bar ---------- */

.buybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  padding: 0.65rem 1.2rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  background: rgba(250, 246, 240, 0.82);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid rgba(42, 31, 26, 0.1);
  transform: translateY(110%);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.buybar-visible {
  transform: translateY(0);
  pointer-events: auto;
}

.buybar-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 1.02rem;
  color: #2a1f1a;
  max-width: 34ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.buybar-price {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  color: #2a1f1a;
  white-space: nowrap;
}

.buybar-price small {
  font-weight: 400;
  color: #6a5a4e;
}

.buybar .btn {
  padding: 0.5rem 1.15rem;
  font-size: 0.86rem;
}

.buybar-sample {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.84rem;
  color: #934332;
  text-decoration: none;
  border-bottom: 1px solid rgba(147, 67, 50, 0.35);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .buybar-title { display: none; }
  .buybar { gap: 0.8rem; }
}

/* ---------- Reduced motion: everything instant ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn, .buybar { transition: none; }
}
