/* FlexGuard motion system. Content stays visible when JavaScript is unavailable. */
body.customer-app { --fg-ease: cubic-bezier(.22, 1, .36, 1); }
html:has(body.customer-app), body.customer-app .app { scroll-behavior: smooth; }
.fg-motion-reveal { backface-visibility: hidden; }
.fg-count-ready { font-variant-numeric: tabular-nums; }
.fg-counter-accessible { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.fg-motion-offscreen *, .fg-motion-offscreen *::before, .fg-motion-offscreen *::after { animation-play-state: paused !important; }
body.premium-home .premium-faq-list details:has(summary:focus-visible) { outline: 3px solid #bd954c; outline-offset: 4px; }

/* A quiet, continuous hero composition in the original forest and gold palette. */
body.premium-home .premium-hero { isolation: isolate; overflow: clip; }
body.premium-home .premium-hero > .premium-shell { z-index: 1; }
.fg-motion-hero { position: absolute; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; }
body.premium-flow .flow-hero { isolation: isolate; }
body.premium-flow .flow-hero > :not(.fg-motion-hero) { position: relative; z-index: 1; }
body.premium-flow .fg-flow-graphic { inset: -42px -20px 0; opacity: .5; border-radius: 22px; }
body.premium-flow .flow-product-aside > .fg-orbital-trace { z-index: 0; height: 270px; top: 16px; }
.fg-motion-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform: translateY(var(--fg-parallax, 0px)); }
.fg-graphic-path {
  fill: none; stroke: #e2c58c; stroke-width: 1; opacity: .26;
  vector-effect: non-scaling-stroke; stroke-dasharray: 260 1200;
  animation: fg-line-travel 18s linear infinite;
}
.fg-graphic-path:nth-child(2) { opacity: .16; animation-duration: 24s; animation-delay: -8s; }
.fg-graphic-path:nth-child(3) { opacity: .12; animation-direction: reverse; animation-delay: -13s; }
.fg-aurora {
  position: absolute; width: 62%; height: 80%; border-radius: 50%;
  filter: blur(46px); opacity: .5; transform-origin: center;
  animation: fg-aurora-drift 18s ease-in-out infinite alternate;
}
.fg-aurora.aurora-one {
  top: 7%; right: -13%;
  background: radial-gradient(ellipse, #5281464d, #194b2b35 46%, transparent 72%);
}
.fg-aurora.aurora-two {
  bottom: -49%; left: 23%; width: 75%; height: 100%;
  background: radial-gradient(ellipse, #e2c58c23, #e2c58c09 48%, transparent 72%);
  animation-duration: 23s; animation-delay: -9s; animation-direction: alternate-reverse;
}
.fg-particle {
  position: absolute; left: calc(5% + var(--i, 0) * 7.8%);
  top: calc(20% + var(--i, 0) * 5.2%); width: 3px; height: 3px;
  border-radius: 50%; background: #e2c58c; opacity: .22;
  box-shadow: 0 0 10px #e2c58c55;
  animation: fg-particle-drift calc(10s + var(--i, 0) * .7s) ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -.9s);
}
.fg-particle:nth-of-type(3n) { width: 2px; height: 2px; opacity: .14; }
body.premium-home .premium-hero-art .premium-product {
  z-index: 2; opacity: 1; animation: fg-product-float 6s ease-in-out infinite;
}
body.premium-home .premium-hero-art {
  transform: perspective(1200px) rotateX(var(--fg-tilt-x, 0deg)) rotateY(var(--fg-tilt-y, 0deg));
  transition: transform .35s var(--fg-ease);
}
body.premium-home .premium-orbit {
  --fg-orbit-angle: 0deg;
  animation: fg-orbit-breathe 16s ease-in-out infinite;
}
body.premium-home .premium-orbit.orbit-two { --fg-orbit-angle: 145deg; animation-duration: 21s; animation-direction: reverse; }
body.premium-home .premium-orbit.orbit-three { --fg-orbit-angle: 235deg; animation-duration: 28s; }
.fg-orbital-trace {
  position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%;
  overflow: visible; pointer-events: none;
}
.fg-orbit-path {
  fill: none; stroke: #e2c58c; stroke-width: 1.2; opacity: .45;
  stroke-dasharray: 42 260; stroke-linecap: round; vector-effect: non-scaling-stroke;
  transform-origin: center; transform-box: view-box;
  animation: fg-orbit-trace 24s linear infinite;
}
.fg-orbit-path:nth-child(2) { opacity: .25; animation-duration: 31s; animation-direction: reverse; }
.fg-orbit-path:nth-child(3) { opacity: .2; stroke-dasharray: 2 12; animation-duration: 42s; }
body.premium-home .premium-float { animation: fg-card-float 7s ease-in-out infinite; }
body.premium-home .premium-float.float-bottom { animation-duration: 8.5s; animation-delay: -3s; }

/* A sweep accompanies view changes; JavaScript controls its exact timing. */
.fg-reading-progress {
  position: fixed; z-index: 80; top: 0; left: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, #a88a4f, #e2c58c 58%, #f4e2bd);
  transform: scaleX(var(--fg-scroll, 0)); transform-origin: left;
  box-shadow: 0 0 12px #e2c58c55; pointer-events: none;
}
.fg-transition-sweep {
  position: fixed; z-index: 9998; inset: 0; opacity: 0;
  background: linear-gradient(110deg, #102e20ed 0%, #194b2be8 70%, #264a2de8 100%);
  transform: translateX(-105%); will-change: transform; pointer-events: none;
}
.fg-transition-sweep::after {
  content: ""; position: absolute; top: 0; right: 0; width: 2px; height: 100%;
  background: linear-gradient(transparent, #e2c58c 35%, #f8f6ed 50%, #e2c58c 65%, transparent);
  box-shadow: 0 0 46px 14px #e2c58c2b;
}

/* Tactile controls, restrained hover movement, and visible focus feedback. */
.fg-ripple-host { position: relative; overflow: hidden; }
.fg-ripple {
  position: absolute; z-index: 4; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, #f8f6ed5c, #e2c58c3d 42%, transparent 72%);
  pointer-events: none;
}
body.premium-home .premium-button,
body.premium-home .premium-button-outline,
body.premium-home .premium-shop { position: relative; overflow: hidden; isolation: isolate; }
body.premium-home .premium-button::after,
body.premium-home .premium-button-outline::after,
body.premium-home .premium-shop::after {
  content: ""; position: absolute; pointer-events: none; top: -60%; left: 0;
  width: 45%; height: 220%; background: linear-gradient(90deg, transparent, #fffefa35, transparent);
  opacity: 0; transform: translateX(-180%) skewX(-20deg);
  transition: transform .8s var(--fg-ease), opacity .15s;
}
body.premium-home .premium-button:hover::after,
body.premium-home .premium-button-outline:hover::after,
body.premium-home .premium-shop:hover::after,
body.premium-home .premium-button:focus-visible::after {
  opacity: 1; transform: translateX(330%) skewX(-20deg);
}
body.premium-home .premium-menu a { position: relative; }
body.premium-home .premium-menu a::after {
  content: ""; position: absolute; inset: auto 0 5px; height: 1px; background: #e2c58c;
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--fg-ease);
}
body.premium-home .premium-menu a:hover::after,
body.premium-home .premium-menu a:focus-visible::after { transform: scaleX(1); }
body.premium-home .premium-landing .premium-ingredient-card,
body.premium-home .premium-document {
  transition: transform .5s var(--fg-ease), box-shadow .5s var(--fg-ease), border-color .3s ease;
}
body.premium-home .premium-ingredient-picture,
body.premium-home .premium-document-preview img { transition: transform .65s var(--fg-ease); }
body.premium-home .premium-text-link { transition: color .3s ease, gap .4s var(--fg-ease); }
body.premium-home .premium-text-link:hover { gap: 20px; }
body.premium-home .premium-support-tabs button {
  transition: color .25s ease, background .3s ease, box-shadow .4s ease, transform .4s var(--fg-ease);
}
body.premium-home .premium-support-tabs button[aria-selected=true] {
  box-shadow: 0 8px 23px #194b2b16, 0 0 0 1px #e2c58c48 inset;
}
body.premium-home .premium-overview,
body.premium-home .premium-formula { position: relative; }
body.premium-home .premium-overview::after,
body.premium-home .premium-formula::after {
  content: ""; position: absolute; bottom: 0; left: 50%; width: min(28%, 240px); height: 1px;
  background: linear-gradient(90deg, transparent, #b79b62a6, transparent);
  transform: translateX(-50%) scaleX(.72); transition: transform .7s var(--fg-ease); pointer-events: none;
}
body.premium-home .premium-overview:hover::after,
body.premium-home .premium-formula:hover::after { transform: translateX(-50%) scaleX(1); }
.fg-joint-active svg > circle[stroke-dasharray] {
  transform-origin: 193px 215px; animation: fg-joint-trace 22s linear infinite;
}
.fg-joint-active svg > circle[fill="#e2c58c"] { animation: fg-joint-signal 3.6s ease-in-out infinite; }
.fg-joint-active svg > path[stroke="currentColor"] { stroke-dasharray: 4 7; animation: fg-joint-flow 6s linear infinite; }
body.premium-home .premium-faq-list summary::after { transition: color .3s ease, transform .4s var(--fg-ease); }
body.premium-home .premium-faq-list details[open] summary::after { color: #a38244; transform: rotate(180deg); }
body.premium-home .premium-faq-list details { overflow: hidden; transition: border-color .3s ease; }
body.premium-home .premium-faq-list summary:focus-visible { outline-offset: -3px; border-radius: 4px; }
body.premium-home .premium-faq-list details.fg-faq-open { border-color: #b9a476; }
body.customer-app .choice { transition: border-color .3s ease, background .3s ease, box-shadow .4s ease, transform .4s var(--fg-ease); }
body.customer-app .choice.selected { animation: fg-choice-confirm .7s var(--fg-ease); }
body.customer-app .progress span { transition: background .45s ease, transform .5s var(--fg-ease); transform-origin: left; }
body.customer-app .progress .done { background: linear-gradient(90deg, #194b2b, #587245); }
body.premium-home .premium-stories .story-card[aria-current=true] { animation: fg-story-reveal .5s var(--fg-ease); }
body.customer-app dialog::backdrop { background: #102e208f; backdrop-filter: blur(6px); }
body.customer-app dialog.fg-dialog-present[open] { animation: fg-dialog-present .4s var(--fg-ease); }

@media (hover: hover) and (pointer: fine) {
  body.premium-home .premium-landing .premium-ingredient-card:hover {
    transform: perspective(1000px) translateY(-8px) rotateX(1.2deg);
    border-color: #b79b62; box-shadow: 0 17px 35px #194b2b12;
  }
  body.premium-home .premium-ingredient-card:hover .premium-ingredient-picture { transform: scale(1.035); }
  body.premium-home .premium-document:hover {
    transform: perspective(1000px) translateY(-8px) rotateX(.8deg);
    border-color: #e2c58c; box-shadow: 0 20px 35px #071a1530;
  }
  body.premium-home .premium-document:hover .premium-document-preview img { transform: translateY(-5px) rotate(-.7deg); }
  body.customer-app .choice:hover { transform: translateY(-2px); }
}
@media (max-width: 700px) {
  .fg-aurora { filter: blur(24px); opacity: .45; }
  .fg-particle:nth-of-type(n + 7) { display: none; }
  .fg-graphic-path { opacity: .18; stroke-width: .85; }
  .fg-orbit-path { opacity: .32; }
  body.customer-app dialog::backdrop { backdrop-filter: blur(3px); }
}
@media (hover: none), (pointer: coarse) {
  body.premium-home .premium-landing .premium-ingredient-card:hover,
  body.premium-home .premium-document:hover,
  body.customer-app .choice:hover { transform: none; }
}
body.fg-motion-paused *, body.fg-motion-paused *::before, body.fg-motion-paused *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  html:has(body.customer-app), body.customer-app .app { scroll-behavior: auto; }
  body.customer-app *, body.customer-app *::before, body.customer-app *::after {
    animation: none !important; transition: none !important; scroll-behavior: auto !important;
  }
  .fg-transition-sweep { display: none; }
  .fg-motion-reveal { opacity: 1; }
  body.premium-home .premium-hero-art, .fg-motion-lines { transform: none; }
}

@keyframes fg-line-travel { to { stroke-dashoffset: -1460; } }
@keyframes fg-aurora-drift { from { transform: translate3d(-3%, 2%, 0) scale(1); } to { transform: translate3d(8%, -7%, 0) scale(1.14); } }
@keyframes fg-particle-drift { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(12px, -34px, 0); } }
@keyframes fg-product-float { 0%, 100% { transform: translateY(0) rotate(-7deg); } 50% { transform: translateY(-12px) rotate(-5.5deg); } }
@keyframes fg-card-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes fg-orbit-breathe {
  0% { transform: translate(-50%, -50%) rotate(var(--fg-orbit-angle)) scale(1); opacity: .7; }
  50% { transform: translate(-50%, -50%) rotate(calc(var(--fg-orbit-angle) + 180deg)) scale(1.025); opacity: 1; }
  100% { transform: translate(-50%, -50%) rotate(calc(var(--fg-orbit-angle) + 360deg)) scale(1); opacity: .7; }
}
@keyframes fg-orbit-trace { to { transform: rotate(360deg); stroke-dashoffset: -604; } }
@keyframes fg-joint-trace { to { transform: rotate(360deg); } }
@keyframes fg-joint-signal { 0%, 100% { opacity: .7; } 50% { opacity: 1; filter: drop-shadow(0 0 6px #b3934a75); } }
@keyframes fg-joint-flow { to { stroke-dashoffset: -44; } }
@keyframes fg-choice-confirm { from { box-shadow: 0 0 0 0 #e2c58c55; } 50% { box-shadow: 0 0 0 5px #e2c58c33; } to { box-shadow: 0 0 0 4px #194b2b09; } }
@keyframes fg-dialog-present { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fg-story-reveal { from { opacity: .5; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }
