/* ================================================
   MAMA'S THREAD — ANIMATIONS
   Scroll reveals, hover effects, loading, floats
   ================================================ */

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Staggered delays for grid children */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Hero Fade-Up Animations ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fade-up {
  animation: fadeUp 0.9s ease forwards;
  opacity: 0;
}

.fade-up-d1 { animation-delay: 0.3s; }
.fade-up-d2 { animation-delay: 0.5s; }
.fade-up-d3 { animation-delay: 0.7s; }
.fade-up-d4 { animation-delay: 0.9s; }

/* ── Floating Circles (Hero Background) ── */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33%       { transform: translateY(-20px) rotate(5deg); }
  66%       { transform: translateY(10px) rotate(-3deg); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-30px) scale(1.05); }
}

.float-circle {
  position: absolute;
  border-radius: 50%;
  animation: floatSlow 6s ease-in-out infinite;
  pointer-events: none;
}

.float-circle-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--sage-light) 0%, transparent 70%);
  top: -80px;
  right: -80px;
  animation-delay: 0s;
  animation-duration: 8s;
}

.float-circle-2 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--blush) 0%, transparent 70%);
  bottom: 10%;
  left: 5%;
  animation-delay: 2s;
  animation-duration: 7s;
}

.float-circle-3 {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--cream-dark) 0%, transparent 70%);
  top: 40%;
  right: 10%;
  animation-delay: 4s;
  animation-duration: 9s;
}

/* ── Bunny Hop (loading / hero) ── */
@keyframes bunnyHop {
  0%, 100% { transform: translateY(0); }
  40%       { transform: translateY(-18px); }
  60%       { transform: translateY(-8px); }
}

.bunny-hop {
  animation: bunnyHop 1.8s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════
   LOADING SCREEN — Embroidery Hoop Reveal
   Premium concept: an embroidery hoop ring draws
   itself, brand logo fades in inside, name reveals
   ═══════════════════════════════════════════════ */

/* Keyframes */
@keyframes loadingFadeOut {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

/* Hoop ring draws itself */
@keyframes hoopDraw {
  from { stroke-dashoffset: 553; }
  to   { stroke-dashoffset: 0; }
}
@keyframes hoopInnerDraw {
  from { stroke-dashoffset: 478; }
  to   { stroke-dashoffset: 0; }
}

/* Logo scales in */
@keyframes logoReveal {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* Brand name slides up */
@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stitch dots appear */
@keyframes stitchPop {
  0%   { opacity: 0; transform: scaleX(0); }
  60%  { opacity: 1; transform: scaleX(1.1); }
  100% { opacity: 1; transform: scaleX(1); }
}

/* Full screen */
#loading-screen {
  position: fixed;
  inset: 0;
  background: #F7F8F6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.7s ease;
  overflow: hidden;
}

/* Subtle warm radial glow */
#loading-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(178,190,181,0.12) 0%, transparent 65%);
  pointer-events: none;
}

#loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Hoop wrapper */
.ls-hoop-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  margin-bottom: 2rem;
}

/* SVG ring */
.ls-hoop-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ls-ring-outer {
  fill: none;
  stroke: var(--sage);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 553;
  stroke-dashoffset: 553;
  animation: hoopDraw 1.6s cubic-bezier(0.4,0,0.2,1) 0.2s forwards;
}

.ls-ring-inner {
  fill: none;
  stroke: var(--sage-lighter);
  stroke-width: 1.5;
  stroke-dasharray: 478;
  stroke-dashoffset: 478;
  animation: hoopInnerDraw 1.4s ease 0.4s forwards;
}

/* Logo centered inside the hoop */
.ls-logo-center {
  position: absolute;
  inset: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: logoReveal 0.9s cubic-bezier(0.34,1.56,0.64,1) 1.5s forwards;
}

.ls-logo-center img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(143,164,140,0.25));
}

/* Brand name */
.ls-brand {
  font-family: var(--font-logo);
  font-size: clamp(2rem, 6vw, 2.8rem);
  color: var(--sage-dark);
  letter-spacing: 0.04em;
  opacity: 0;
  animation: slideUpFade 0.9s ease 2.0s forwards;
}

/* Tagline */
.ls-tagline {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sage);
  opacity: 0;
  animation: slideUpFade 0.8s ease 2.3s forwards;
  margin-top: 0.35rem;
}

/* Stitch dashes row */
.ls-stitches {
  display: flex;
  gap: 7px;
  margin-top: 1.4rem;
  opacity: 0;
  animation: slideUpFade 0.7s ease 2.5s forwards;
}

.ls-stitches span {
  display: block;
  height: 2.5px;
  border-radius: 2px;
  background: var(--sage-light);
}
.ls-stitches span:nth-child(1) { width: 28px; animation: stitchPop 0.4s ease 2.5s both; }
.ls-stitches span:nth-child(2) { width: 10px; animation: stitchPop 0.4s ease 2.6s both; }
.ls-stitches span:nth-child(3) { width: 28px; animation: stitchPop 0.4s ease 2.7s both; }
.ls-stitches span:nth-child(4) { width: 10px; animation: stitchPop 0.4s ease 2.8s both; }
.ls-stitches span:nth-child(5) { width: 28px; animation: stitchPop 0.4s ease 2.9s both; }

/* ── Pulse (WhatsApp button indicator) ── */
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70%  { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-float {
  animation: pulse 2.5s ease-in-out infinite;
}

.whatsapp-float:hover {
  animation: none;
}

/* ── Image hover scale ── */
.img-hover-scale {
  overflow: hidden;
}

.img-hover-scale img {
  transition: transform var(--transition);
}

.img-hover-scale:hover img {
  transform: scale(1.06);
}

/* ── Category card hover ── */
.category-card {
  transition: transform var(--transition), box-shadow var(--transition);
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

/* ── Shimmer placeholder ── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.placeholder-shimmer {
  background: linear-gradient(90deg, var(--sage-lighter) 25%, var(--sage-light) 50%, var(--sage-lighter) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.8s infinite linear;
}
