/* Motion layer: loaded last, overrides the timing/easing of the original theme sections.
   Rules of thumb: UI responds in < 300ms with a strong ease-out, pressables scale on :active,
   hover lifts only on real pointers, and decoration doesn't loop forever. */

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --press: 160ms var(--ease-out);
}

/* ---------- Intro splash: once per session, and shorter ---------- */
.fl-seen #flintro { display: none; }
#flintro { transition: opacity 300ms var(--ease-out), visibility 300ms; }

/* ---------- Age gate: fade + slight scale from centre (modal, so centred origin) ---------- */
#AgeGate {
  transition: opacity 200ms var(--ease-out), display 200ms allow-discrete;
}
#AgeGate > div {
  scale: 1;
  transition: scale 250ms var(--ease-out);
}
@starting-style {
  #AgeGate { opacity: 0; }
  #AgeGate > div { scale: 0.96; }
}
#AgeGate button { transition: transform var(--press), background-color 150ms ease; }
#AgeGate button:active { transform: scale(0.97); }

/* ---------- Hero entrance: no overshoot, no 1s blur ---------- */
.fl-hero.fle .fl-col,
.fl-hero.fle .flc { transform: translateY(16px) scale(0.98); filter: blur(4px); }
.fl-hero.fle.is-in .fl-col,
.fl-hero.fle.is-in .flc {
  transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-out), filter 400ms var(--ease-out);
}
.fl-hero.fle.is-in .flc { transition-delay: 60ms; }

/* ---------- Scroll reveals: shorter travel, faster settle ---------- */
.flr { transform: translateY(12px); transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-out); }
.fl-js .fl-rv { transform: translateY(12px); transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-out); }
.flr.is-in, .fl-js .fl-rv.is-in { transform: none; }

/* ---------- Carousel ---------- */
.flc-s:not(.is-wait) .flc-cap { transition: opacity 400ms var(--ease-out), transform 500ms var(--ease-out); }
.flc-s.is-wait .flc-cap { transform: translateY(8px) scale(0.98); transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
.flc-nav { transition: transform var(--press), box-shadow 200ms ease, border-color 200ms ease; }
.flc-dots button { transition: width 250ms var(--ease-in-out), background 200ms ease, box-shadow 200ms ease; }

/* ---------- Every pressable answers the press ---------- */
.fl .fl-btn,
.fl-hero .fl-col a,
.flb .flb-b,
.fl .flg-shops a,
.fl .fl-pill,
.fl .fl-pick,
.fl .fl-news .fl-btn,
.shop-pill {
  transition: transform var(--press), box-shadow 200ms ease, background-color 200ms ease,
    border-color 200ms ease, color 200ms ease, filter 200ms ease;
}
.fl .fl-btn:active,
.fl-hero .fl-col a:active,
.flb .flb-b:active,
.fl .flg-shops a:active,
.fl .fl-pill:active,
.fl .fl-pick:active,
.fl .fl-news .fl-btn:active,
.flc-nav:active,
.shop-pill:active {
  transform: scale(0.97) !important;
}
.flc-dots button:active { transform: scale(0.9); }

/* Cards are links: a lighter press so the whole tile doesn't jump */
.fl .fl-oil, .fl .fl-shop, .fl .fl-card, .fl .fl-pc, .flb-card {
  transition: transform 250ms var(--ease-out), box-shadow 250ms ease, border-color 250ms ease;
}
.fl .fl-card:active, .fl .fl-shop:active, .fl .fl-pc:active { transform: scale(0.99); }

.tbl-icon-circle { transition: background-color 200ms ease, box-shadow 200ms ease; }
.tbl-icon { transition: fill 200ms ease, stroke 200ms ease; }
.tbl-item { transition: transform 250ms var(--ease-out); }
.arrow-action { transition: transform 200ms var(--ease-out); }

/* ---------- Hover lifts only where hover exists (no sticky lift after a tap) ---------- */
@media not ((hover: hover) and (pointer: fine)) {
  .flc-nav:hover,
  .fl-hero .fl-col a:hover,
  .flb .flb-b.flb-b1:hover,
  .fl .fl-oil .fl-btn.fl-btn--light:hover,
  .fl .fl-oil:hover, .fl .fl-shop:hover, .fl .fl-card:hover, .fl .fl-pc:hover,
  .fl-hcos:hover .fl-hcos-in,
  .tbl-item:hover,
  .shop-pill:hover { transform: none !important; }
  .fl-hcos:hover img, .flb-card:hover .flb-ph img { transform: none; }
}

/* ---------- Decoration: stop the always-on loops competing for attention ---------- */
/* The gold "add to cart" keeps its sheen, but only as a hover response */
.flb .flb-b.flb-b1::after { animation: none; }
@media (hover: hover) and (pointer: fine) {
  .flb .flb-b.flb-b1:hover::after { animation: flSheen 700ms var(--ease-out) 1 both; }
}
/* transform instead of the original `left` sweep: no layout work per frame */
@keyframes flSheen {
  from { transform: skewX(-20deg) translateX(0); }
  to   { transform: skewX(-20deg) translateX(500%); }
}
.fl .fl-oil .fl-btn.fl-btn--light { animation: none; }
.flb .flb-k i,   /* star wiggle */
.flb .flb-p em { animation: none; } /* discount tag pulse */
/* The slow border spin on the featured cards is the one ambient loop we keep */

/* ---------- Reduced motion: keep fades, drop movement ---------- */
@media (prefers-reduced-motion: reduce) {
  #AgeGate > div { transition: none; }
  @starting-style { #AgeGate > div { scale: 1; } }
  .fl-hero.fle .fl-col, .fl-hero.fle .flc,
  .flr, .fl-js .fl-rv { transform: none; filter: none; }
  .fl .fl-btn:active, .fl-hero .fl-col a:active, .flb .flb-b:active,
  .flc-nav:active, .shop-pill:active { transform: none !important; }
}

/* =====================================================================
   Apple-style fluid layer
   ===================================================================== */

/* ---------- Mobile menu drawer: slide only (no fade), iOS drawer curve, same path in and out ---------- */
html body .drawer--header.is-open .drawer__inner { animation: flDrawerIn 420ms cubic-bezier(0.32, 0.72, 0, 1) forwards; }
html body .drawer--header.is-closing .drawer__inner { animation: flDrawerOut 300ms cubic-bezier(0.32, 0.72, 0, 1) forwards; }
@keyframes flDrawerIn  { from { transform: translate3d(0, 0, 0); visibility: visible; } to { transform: translate3d(100%, 0, 0); visibility: visible; } }
@keyframes flDrawerOut { from { transform: translate3d(100%, 0, 0); visibility: visible; } to { transform: translate3d(0, 0, 0); visibility: hidden; } }
/* horizontal swipes belong to menu-swipe.js, vertical ones still scroll the menu */
.drawer--header .drawer__inner { touch-action: pan-y; }

/* ---------- Header material: no hard divider at the top, a soft edge once content scrolls under ---------- */
html body [id$="__header"] .header__wrapper:not(.js__header__stuck) .theme__header { border-bottom-color: transparent !important; }
html body [id$="__header"] .js__header__stuck .theme__header {
  border-bottom-color: transparent !important;
  box-shadow: 0 1px 0 rgba(43, 39, 33, .05), 0 10px 24px -18px rgba(43, 39, 33, .35) !important;
}

/* ---------- Type: tracking follows size (tight display, neutral body) ---------- */
html body .fl .fl-h1 { letter-spacing: -0.022em !important; }
html body .fl .fl-h2, .fl-page .pdp-title { letter-spacing: -0.016em !important; }
html body .fl .fl-h3, .fl-page .pcard-title { letter-spacing: -0.008em !important; }

/* ---------- Reduced transparency: frosted surfaces become solid ---------- */
@media (prefers-reduced-transparency: reduce) {
  html body [id$="__header"] .theme__header,
  html body [id$="__header"] .theme__header::after { background: var(--sand-50) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  .flx-nav, html body .fl .flc-cap { background: var(--card) !important; backdrop-filter: none !important; }
}

/* ---------- Increased contrast: defined borders, darker secondary text ---------- */
@media (prefers-contrast: more) {
  :root { --ink-2: #3E3830; --ink-3: #5A5247; --sand-200: #B9AA92; }
  .fl-page .pcard, html body .fl .fl-card, .flx-nav, .fl-page .cat-chips a { border-color: var(--ink-3) !important; }
}

/* ---------- Reduced motion: the drawer cross-fades instead of sliding ---------- */
@media (prefers-reduced-motion: reduce) {
  html body .drawer--header.is-open .drawer__inner { animation: flFadeIn 200ms ease forwards; transform: translate3d(100%, 0, 0); }
  html body .drawer--header.is-closing .drawer__inner { animation: flFadeOut 160ms ease forwards; transform: translate3d(100%, 0, 0); }
  @keyframes flFadeIn  { from { opacity: 0; visibility: visible; } to { opacity: 1; visibility: visible; } }
  @keyframes flFadeOut { from { opacity: 1; visibility: visible; } to { opacity: 0; visibility: hidden; } }
}
