/* ============================================================
   motion.css — Anuva Organics UI motion layer (.mo-*, .g-*)
   Small, fast animations that reach every section, plus the
   styles for the Google Business Profile pieces (.g-*).
   House rules, shared with scroll-effects / story / scroll-cinema:
   - transform/opacity only. Hover motion uses the individual
     `translate` / `scale` / `rotate` properties on purpose: a
     finished reveal animation (fill-mode: both) pins `transform`,
     so hover effects written with `transform` would never play.
   - nothing here hides content before JS runs, and nothing on the
     first screen waits for JS to appear (the page must open fast).
   - loops only run inside a section that is on screen (.mo-live,
     toggled by motion.js) and stop for prefers-reduced-motion.
   Hand-written additive layer, no build step (see story.css).
   ============================================================ */

/* ---------- hero: keyword line inside the H1 ---------- */
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--oil-deep);
}
.hero-kicker::before {
  content: "";
  flex: 0 0 2.25rem;
  height: 1px;
  background: currentColor;
  transform-origin: left center;
  animation: mo-rule 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}
@keyframes mo-rule { from { scale: 0 1; } }

/* phones: one line, so the rule makes way for the words */
@media (max-width: 639px) {
  .hero-kicker { font-size: 0.66rem; letter-spacing: 0.12em; }
  .hero-kicker::before { display: none; }
}

/* ---------- hero: Google rating badge ---------- */
.g-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.75rem;
  padding: 0.55rem 0.95rem 0.55rem 0.85rem;
  border: 1px solid oklch(32% 0.06 145 / 0.14);
  border-radius: 999px;
  background: oklch(100% 0 0 / 0.6);
  color: var(--charcoal);
  font-size: 0.875rem;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 12px 30px -20px oklch(40% 0.05 60 / 0.5);
  transition: translate 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.g-badge:hover { translate: 0 -2px; border-color: oklch(70% 0.17 65 / 0.45); box-shadow: var(--shadow-glow); }
.g-badge-stars { display: inline-flex; gap: 2px; color: var(--oil-deep); }
.g-badge-stars svg { width: 15px; height: 15px; }
.g-badge-text b { font-weight: 700; color: var(--forest); }
.g-badge-arrow { width: 15px; height: 15px; opacity: 0.55; transition: translate 0.3s ease, opacity 0.3s ease; }
.g-badge:hover .g-badge-arrow { translate: 2px -2px; opacity: 1; }

/* stars pop in one after another (decoration only: the text is
   readable from the first frame) */
.g-badge-stars svg,
.mo-in .g-review-stars svg,
.mo-stars.mo-in svg {
  animation: mo-star-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.g-badge-stars svg:nth-child(2), .mo-in .g-review-stars svg:nth-child(2), .mo-stars.mo-in svg:nth-child(2) { animation-delay: 0.08s; }
.g-badge-stars svg:nth-child(3), .mo-in .g-review-stars svg:nth-child(3), .mo-stars.mo-in svg:nth-child(3) { animation-delay: 0.16s; }
.g-badge-stars svg:nth-child(4), .mo-in .g-review-stars svg:nth-child(4), .mo-stars.mo-in svg:nth-child(4) { animation-delay: 0.24s; }
.g-badge-stars svg:nth-child(5), .mo-in .g-review-stars svg:nth-child(5), .mo-stars.mo-in svg:nth-child(5) { animation-delay: 0.32s; }
@keyframes mo-star-pop { from { scale: 0.4; opacity: 0.2; } }

/* ---------- testimonials: Google review summary card ---------- */
.g-review {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem 2rem;
  max-width: 56rem;
  margin: 2.75rem auto 0;
  padding: 1.5rem 1.75rem;
  border: 1px solid oklch(32% 0.06 145 / 0.12);
  border-radius: 2rem;
  background: linear-gradient(135deg, oklch(100% 0 0 / 0.85), oklch(97.5% 0.018 85 / 0.9));
  box-shadow: var(--shadow-soft);
}
/* one golden sweep across the card as it comes into view */
.g-review::before {
  content: "";
  position: absolute;
  inset: -40% auto -40% 0;
  z-index: -1;
  width: 35%;
  background: linear-gradient(100deg, transparent, oklch(82% 0.16 82 / 0.22), transparent);
  rotate: 12deg;
  translate: -130% 0;
  pointer-events: none;
}
.g-review.mo-in::before { animation: mo-sweep 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both; }
@keyframes mo-sweep { to { translate: 420% 0; } }

.g-review-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding-right: 2rem;
  border-right: 1px solid oklch(32% 0.06 145 / 0.12);
}
.g-review-num { font-family: var(--font-display); font-size: 3rem; font-weight: 600; line-height: 1; color: var(--forest); }
.g-review-stars { display: inline-flex; gap: 3px; color: var(--oil-deep); }
.g-review-stars svg { width: 18px; height: 18px; }
.g-review-title { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; line-height: 1.25; color: var(--charcoal); }
.g-review-sub { margin-top: 0.35rem; font-size: 0.95rem; line-height: 1.5; color: oklch(22% 0.02 60 / 0.65); }
.g-review-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.6rem; }

.g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.15rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: translate 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.g-btn-solid { background: var(--forest); color: var(--cream); }
.g-btn-ghost { border: 1px solid oklch(32% 0.06 145 / 0.25); color: var(--forest); }
.g-btn:hover { translate: 0 -2px; box-shadow: var(--shadow-glow); }
.g-btn-ghost:hover { border-color: var(--oil-deep); color: var(--oil-deep); }
.g-btn:focus-visible,
.g-badge:focus-visible { outline: 2px solid var(--oil-deep); outline-offset: 3px; }

@media (max-width: 767px) {
  .g-review { grid-template-columns: 1fr; gap: 1rem; padding: 1.5rem 1.25rem; text-align: center; }
  .g-review-score { padding: 0 0 1rem; border-right: 0; border-bottom: 1px solid oklch(32% 0.06 145 / 0.12); }
  .g-review-actions { justify-content: center; }
}

/* ---------- footer: Google profile + rating links ---------- */
.ft-social a.ft-social-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: auto;
  padding: 0 1rem 0 0.85rem;
  font-size: 0.85rem;
  text-decoration: none;
}
.ft-social a.ft-social-rating svg { color: var(--oil); }
.ft-social a.ft-social-rating b { color: var(--oil); font-weight: 700; }

/* ---------- primary buttons: a light sweep on hover ---------- */
.mo-shine { position: relative; overflow: hidden; isolation: isolate; }
.mo-shine::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(110deg, transparent 35%, oklch(100% 0 0 / 0.38) 50%, transparent 65%);
  translate: -110% 0;
  pointer-events: none;
}
.mo-shine:hover::after,
.mo-shine:focus-visible::after { translate: 110% 0; transition: translate 0.75s cubic-bezier(0.22, 1, 0.36, 1); }
/* the hero's main button catches the light now and then */
.mo-live .mo-shine-auto::after { animation: mo-shine-auto 6.5s ease-in-out 2.5s infinite; }
@keyframes mo-shine-auto {
  0%, 72% { translate: -110% 0; }
  88%, 100% { translate: 110% 0; }
}

/* ---------- cards: lift + soft glow that follows the cursor ---------- */
.mo-card { transition: translate 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease, border-color 0.3s ease, background-color 0.3s ease; }
.mo-card:hover { translate: 0 -6px; box-shadow: 0 24px 50px -28px oklch(15% 0.04 145 / 0.7); }
.mo-glow { isolation: isolate; }
.mo-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), oklch(82% 0.16 82 / 0.2), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.mo-glow:hover::after { opacity: 1; }

/* ---------- icons: float, tilt and nudge ---------- */
.mo-live .mo-float { animation: mo-float 4.8s ease-in-out var(--mo-d, 0s) infinite; }
@keyframes mo-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
.mo-tilt { transition: rotate 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), scale 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.group:hover .mo-tilt,
.mo-tilt:hover { rotate: -8deg; scale: 1.08; }
.mo-nudge { transition: translate 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.group:hover .mo-nudge { translate: 6px 0; }

/* floating badges (years of legacy, extraction temperature) */
.mo-live .mo-bob { animation: mo-bob 6s ease-in-out infinite; }
@keyframes mo-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }

/* ---------- FAQ: items respond to the pointer ---------- */
.mo-faq { transition: translate 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease; }
.mo-faq:hover { translate: 0 -2px; border-color: oklch(70% 0.17 65 / 0.4); }

/* the page's own pause button (#vs-motion-toggle) stops the loops too */
.mo-paused .mo-float,
.mo-paused .mo-bob,
.mo-paused .mo-shine-auto::after { animation-play-state: paused; }

/* ---------- reduced motion: keep hover feedback, drop the loops ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-kicker::before,
  .g-badge-stars svg,
  .mo-in .g-review-stars svg,
  .mo-stars.mo-in svg,
  .g-review.mo-in::before,
  .mo-live .mo-shine-auto::after,
  .mo-live .mo-float,
  .mo-live .mo-bob { animation: none; }
  .mo-card:hover, .mo-faq:hover { translate: none; }
}
