/* Motion layer. Everything here is scoped to html.motion, html.sn-motion, which is only set when
   animation is allowed (not ?static=1, not "reduce motion"). Without it the site is fully static. */

html.motion, html.sn-motion { scroll-behavior: smooth; }
:root { --ease: cubic-bezier(.2, .7, .2, 1); --ease-back: cubic-bezier(.34, 1.56, .64, 1); }

/* ---------- Scroll reveal ---------- */
.motion [data-reveal] { opacity: 0; transition: opacity .8s var(--ease), transform .9s var(--ease), filter .8s var(--ease); transition-delay: var(--d, 0s); will-change: opacity, transform; }
.motion [data-reveal="up"] { transform: translateY(34px); }
.motion [data-reveal="pop"] { transform: translateY(26px) scale(.94); }
.motion [data-reveal="left"] { transform: translateY(26px); }
.motion [data-reveal="right"] { transform: translateY(26px) scale(.97); }
.motion [data-reveal="zoom"] { transform: scale(.82) rotate(-6deg); transition-timing-function: var(--ease-back); }
.motion [data-reveal="wipe"] { transform: scaleX(.55); transform-origin: left center; }
.motion [data-reveal="curtain"] { transform: translateY(30px) scale(.95); }
.motion [data-reveal="blur"] { filter: blur(10px); transform: translateY(18px); }
.motion [data-reveal].is-in { opacity: 1; transform: none; filter: none; }
.motion hr.rule[data-reveal] { opacity: 1; transform: scaleX(0); transform-origin: left center; }
.motion .values-head hr.rule[data-reveal] { transform-origin: center; }
.motion hr.rule[data-reveal].is-in { transform: scaleX(1); }

/* ---------- Page and hero entrance ---------- */
.motion .topbar { animation: m-drop .6s var(--ease) both; }
.motion .site-header .brand, .motion .site-header .nav a, .motion .site-header .header-tools > * { animation: m-drop .7s var(--ease) both; animation-delay: calc(.12s + var(--i, 0) * .06s); }
.motion .hero-slides { animation: m-glow 2.2s ease-out both; }
.motion .hero-copy > * { animation: m-rise .95s var(--ease) both; }
.motion .hero-copy > :nth-child(1) { animation-delay: .25s; }
.motion .hero-copy > :nth-child(2) { animation-delay: .4s; }
.motion .hero-copy > :nth-child(3) { animation-delay: .58s; }
.motion .hero-copy > :nth-child(4) { animation-delay: .74s; }
.motion .hero-badge { animation: m-stamp .9s var(--ease-back) 1s both, m-sway 7s ease-in-out 2s infinite; }
.motion .hero-new { animation: m-stamp .8s var(--ease-back) 1.25s both, m-float 4.5s ease-in-out 2.1s infinite; }
.motion .hero-foot { animation: m-fade 1s ease 1.2s both; }
.motion .scroll-cue path { animation: m-cue 1.9s ease-in-out infinite; }
.motion .about-hero h1, .motion .about-hero p { animation: m-rise 1s var(--ease) both; }
.motion .about-hero p { animation-delay: .22s; }
.motion .blog-hero > div:first-child > *, .motion .shop-intro > *, .motion .policy-body > h1, .motion .policy-body > .policy-intro, .motion .quiz-intro > * { animation: m-rise .9s var(--ease) both; animation-delay: calc(.15s + var(--i, 0) * .1s); }
.motion .gallery-main img { animation: m-product 1.1s var(--ease-back) .2s both; }
.motion .pdp-info > * { animation: m-rise .8s var(--ease) both; animation-delay: calc(.15s + var(--i, 0) * .07s); }

/* ---------- Always-on ambient motion ---------- */
.motion .ring { animation: m-spin 26s linear infinite; }
.motion .s-art > img:first-child { animation: m-float 9s ease-in-out infinite; }
.motion .sticker { animation: m-sway 6s ease-in-out infinite; transform-origin: 50% 10%; }
.motion .leaf { animation: m-leaf 8s ease-in-out infinite; }
.motion .leaf-2 { animation-duration: 11s; animation-direction: reverse; }
.motion [data-parallax] { translate: 0 var(--py, 0px); }
.motion .teaser-art .loop, .motion .blog-art .curl { animation: m-nudge 3.2s ease-in-out infinite; }
.motion .blog-art .bowl-img, .motion .teaser-art > img:first-child, .motion .quiz-art > img:first-child { animation: m-float 8s ease-in-out infinite; }
.motion .chat { animation: m-float 5s ease-in-out infinite; }
.motion .play { animation: m-pulse 2.2s ease-in-out infinite; }
.motion .topbar-offer { background: linear-gradient(100deg, #fff 40%, #e6ffd9 50%, #fff 60%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: m-shine 5s linear infinite; }

/* ---------- Hover and press ---------- */
.motion .btn { transition: transform .35s var(--ease-back), box-shadow .35s ease, background-color .25s ease, color .25s ease; }
.motion .btn:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(20, 40, 25, .22); }
.motion .btn:active { transform: translateY(0) scale(.97); }
.motion .btn .arrow { transition: transform .35s var(--ease); }
.motion .btn:hover .arrow { transform: translateX(6px); }
.motion .hero-link .circle { transition: transform .35s var(--ease); }
.motion .hero-link:hover .circle { transform: translateX(6px); }
.motion .nav a { position: relative; }
.motion .nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.motion .nav a:hover { text-decoration: none; }
.motion .nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.motion .goal-media, .motion .fan-video, .motion .thumbs li { transition: transform .5s var(--ease), box-shadow .5s ease, opacity .8s var(--ease); }
.motion .goal:hover .goal-media, .motion a.goal-media.is-in:hover, .motion .fan:hover .fan-video { transform: translateY(-6px); box-shadow: 0 16px 28px rgba(40, 30, 10, .18); }
.motion .thumbs li:hover { transform: translateY(-4px); }
.motion .goal-media span { transition: transform .5s var(--ease); }
.motion .goal:hover .goal-media span, .motion a.goal-media:hover span { transform: translateY(-6px); }
.motion .product-media img, .motion .card-media img, .motion .mega-product .thumb img { transition: transform .6s var(--ease-back), filter .4s ease; }
.motion .product:hover .product-media img, .motion .card:hover .card-media img, .motion .mega-product:hover .thumb img { transform: translateY(-10px) rotate(-3deg) scale(1.04); filter: drop-shadow(0 18px 14px rgba(0, 0, 0, .18)); }
.motion .card, .motion .post, .motion .review, .motion .answer, .motion .fan-product, .motion .step { transition: transform .45s var(--ease), box-shadow .45s ease, border-color .25s ease, background-color .25s ease, opacity .8s var(--ease); }
.motion .card.is-in:hover, .motion .post.is-in:hover, .motion .review.is-in:hover { transform: translateY(-8px); box-shadow: 0 18px 34px rgba(60, 45, 20, .14); }
.motion .answer:hover { transform: translateX(6px); border-color: #b9c7b4; }
.motion .answer-icon { transition: transform .4s var(--ease-back), color .25s ease, border-color .25s ease; }
.motion .answer:hover .answer-icon { transform: rotate(-8deg) scale(1.08); }
.motion .answer.is-active .answer-icon { animation: m-stamp .5s var(--ease-back); }
.motion .feature img, .motion .value img, .motion .service img, .motion .bowl > img { transition: transform .5s var(--ease-back); }
.motion .feature:hover img, .motion .value:hover img, .motion .service li:hover img { transform: translateY(-6px) rotate(-6deg) scale(1.1); }
.motion .bowl:hover > img { transform: rotate(18deg) scale(1.08); }
.motion .social img, .motion .footer-social img { transition: transform .35s var(--ease-back); }
.motion .social a:hover img, .motion .footer-social a:hover img { transform: translateY(-3px) scale(1.2); }
.motion .footer-col a, .motion .mega-lines a { transition: padding-left .3s var(--ease), opacity .3s ease; }
.motion .footer-col li a:hover, .motion .mega-lines a:hover { padding-left: 6px; }
.motion .chip, .motion .flavour { transition: transform .3s var(--ease-back), background-color .25s ease, color .25s ease, border-color .25s ease; }
.motion .chip:hover, .motion .flavour:hover { transform: translateY(-2px); }
.motion .cart img { transition: transform .4s var(--ease-back); }
.motion .cart:hover img { transform: rotate(-10deg) scale(1.08); }
.motion .cart-count.is-bump { animation: m-bump .5s var(--ease-back); }
.motion .faq details[open] p, .motion .accordion details[open] p { animation: m-rise .45s var(--ease) both; }
.motion .faq summary::after, .motion .accordion summary::after { transition: transform .3s var(--ease); display: inline-block; }
.motion .faq summary:hover::after, .motion .accordion summary:hover::after { transform: rotate(90deg); }

/* ---------- Quiz ---------- */
.motion .quiz-step.is-active { animation: m-step .55s var(--ease) both; }
.motion .quiz-step.is-active .answer { animation: m-rise .6s var(--ease) both; animation-delay: calc(.12s + var(--i, 0) * .06s); }
.motion .quiz-step.is-active .progress i { animation: m-grow .9s var(--ease) both; }
.motion .quiz-result.is-active h2 { animation: m-stamp .8s var(--ease-back) .15s both; }

/* ---------- Keyframes ---------- */
@keyframes m-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes m-drop { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes m-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes m-glow { from { opacity: 0; filter: brightness(.6) saturate(.7); } to { opacity: 1; filter: none; } }
@keyframes m-stamp { 0% { opacity: 0; transform: scale(.3) rotate(-25deg); } 100% { opacity: 1; transform: none; } }
@keyframes m-product { from { opacity: 0; transform: translateY(40px) rotate(6deg) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes m-spin { to { transform: rotate(360deg); } }
@keyframes m-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes m-sway { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(6deg); } }
@keyframes m-leaf { 0%, 100% { transform: rotate(-5deg) translateY(0); } 50% { transform: rotate(6deg) translateY(-10px); } }
@keyframes m-nudge { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(5px, -5px); } }
@keyframes m-cue { 0%, 100% { transform: translateY(-3px); opacity: .5; } 50% { transform: translateY(3px); opacity: 1; } }
@keyframes m-pulse { 0%, 100% { transform: translate(-40%, -50%) scale(1); opacity: .92; } 50% { transform: translate(-40%, -50%) scale(1.14); opacity: 1; } }
@keyframes m-shine { from { background-position: 120% 0; } to { background-position: -130% 0; } }
@keyframes m-bump { 0% { transform: scale(1); } 40% { transform: scale(1.6); } 100% { transform: scale(1); } }
@keyframes m-step { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes m-grow { from { width: var(--from, 0%); } }

/* Phones: lighter, shorter movement */
@media (max-width: 600px) {
  .motion [data-reveal] { transition-duration: .6s, .7s, .6s; }
}

/* ---------- Nothing gets cut off while it moves ---------- */
/* Sections that clipped their edges now let moving pieces show in full; the page itself guards against sideways scroll. */
html.motion, html.sn-motion, .motion body { overflow-x: clip; }
.motion .ritual, .motion .blog, .motion .quiz, .motion .policy { overflow: visible; }
.motion .leaf-2 { right: 28px; }
/* Swipe rows clip vertically by nature, so give their items headroom to rise, tilt and cast shadows */
@media (max-width: 900px) {
  .motion .fans-grid, .motion .policy-nav ul { padding-block: 44px; margin-block: -44px; }
}
@media (max-width: 600px) {
  .motion .goals, .motion .reviews, .motion .bowls, .motion .goal-tiles { padding-block: 44px; margin-block: -44px; }
}

/* Cart and account */
.motion .page-head > *, .motion .auth-card > h1, .motion .auth-card > .squiggle { animation: m-rise .8s var(--ease) both; }
.motion .drawer-open .drawer .line { animation: m-rise .5s var(--ease) both; }
.motion .drawer-open .drawer .line:nth-child(2) { animation-delay: .06s; }
.motion .drawer-open .drawer .line:nth-child(3) { animation-delay: .12s; }
.motion .empty-icon { animation: m-stamp .7s var(--ease-back) both, m-float 5s ease-in-out .8s infinite; }
.motion .suggest-card, .motion .dash-card, .motion .address { transition: transform .4s var(--ease), box-shadow .4s ease, opacity .8s var(--ease); }
.motion .suggest-card:hover, .motion .dash-grid .dash-card.is-in:hover, .motion .address:hover { transform: translateY(-5px); box-shadow: 0 14px 28px rgba(60, 45, 20, .12); }
.motion .suggest-img img, .motion .line-img img { transition: transform .5s var(--ease-back); }
.motion .suggest-card:hover .suggest-img img, .motion .line:hover .line-img img { transform: rotate(-4deg) scale(1.05); }
.motion .track li.is-current::before { animation: m-ping 1.8s ease-out infinite; }
@keyframes m-ping { 0% { box-shadow: 0 0 0 0 rgba(29, 77, 59, .45); } 100% { box-shadow: 0 0 0 10px rgba(29, 77, 59, 0); } }

/* Reviews page and quantity controls */
.motion .buybox-qty:not([hidden]) { animation: m-qty .35s var(--ease-back); }
@keyframes m-qty { from { transform: scale(.9); opacity: .4; } to { transform: none; opacity: 1; } }
.motion .rv-card { transition: transform .4s var(--ease), box-shadow .4s ease, opacity .8s var(--ease); }
.motion .rv-card.is-in:hover { transform: translateY(-6px); box-shadow: 0 16px 30px rgba(60, 45, 20, .12); }
@media (max-width: 600px) { .motion .rv-videos { padding-block: 44px; margin-block: -44px; } }

@media (max-width: 600px) { .motion .rv-grid, .motion .rv-sources { padding-block: 44px; margin-block: -44px; } }

.motion .how-modal[open] { animation: m-rise .4s var(--ease) both; }
.motion .how-modal[open]::backdrop { animation: m-fade .3s ease both; }
.motion .sub-panel:not([hidden]) { animation: m-rise .4s var(--ease) both; }
.motion .freq-opt { transition: transform .3s var(--ease-back), border-color .2s ease, background-color .2s ease, color .2s ease; }
.motion .freq-opt:hover { transform: translateY(-2px); }

.motion [data-pdp-main].is-swap { animation: m-product .6s var(--ease-back) both; }
.motion .soon-card { transition: transform .4s var(--ease), box-shadow .4s ease, opacity .8s var(--ease); }
.motion .soon-card.is-in:hover { transform: translateY(-6px); box-shadow: 0 18px 34px rgba(60, 45, 20, .12); }
.motion .notify-done:not([hidden]) .empty-icon { animation: m-stamp .6s var(--ease-back) both; }


/* ---------- RTL logical adjustments for Sola Naturals Motion ---------- */
[dir="rtl"] .motion .btn:hover .arrow,
[dir="rtl"] .sn-motion .btn:hover .arrow {
  transform: translateX(-6px) rotate(180deg);
}
[dir="rtl"] .motion .hero-link:hover .circle,
[dir="rtl"] .sn-motion .hero-link:hover .circle {
  transform: translateX(-6px);
}
[dir="rtl"] .motion .answer:hover,
[dir="rtl"] .sn-motion .answer:hover {
  transform: translateX(-6px);
}
[dir="rtl"] .motion .footer-col li a:hover,
[dir="rtl"] .motion .mega-lines a:hover,
[dir="rtl"] .sn-motion .footer-col li a:hover,
[dir="rtl"] .sn-motion .mega-lines a:hover {
  padding-left: 0;
  padding-right: 6px;
}
[dir="rtl"] .motion [data-reveal="wipe"],
[dir="rtl"] .sn-motion [data-reveal="wipe"] {
  transform-origin: right center;
}
[dir="rtl"] .motion hr.rule[data-reveal],
[dir="rtl"] .sn-motion hr.rule[data-reveal] {
  transform-origin: right center;
}
