/* motion.css — the motion layer (motion brief 2026-10-15; the strand fields and petals retired in Plan D Task 5). Driven by app/js/motion.js.
 * Blush, rose-gold and petal (app.css tokens) are for glows, sparkles and selection only — never body text.
 * html[data-motion]: full | lite (Data Saver, <= 4 GB or <= 4 cores: no blur, no drop shadows) | off (reduced motion).
 * Every piece has a reduced-motion branch at the end: state still shows, nothing moves. */

:root { --amb: var(--ny-glow); --amb-hair: var(--gold); }

/* ---------- 7. motion type: words rise one by one (motion.js Rise) ---------- */
.rise .rw { display: inline-block; opacity: 0; transform: translateY(.45em); filter: blur(6px); }
.rise.rise-in .rw { animation: rw-in .9s var(--ease-hair) forwards; animation-delay: calc(var(--d, 0s) + var(--i) * .085s); }
.rise .rw-accent { color: var(--ny-ink);
  background: linear-gradient(100deg, var(--ny-ink) 0%, var(--ny-ink) 40%, var(--ny-gold) 46%, var(--gold) 50%, var(--ny-gold) 54%, var(--ny-ink) 60%, var(--ny-ink) 100%);
  background-size: 250% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.rise.rise-in .rw-accent { animation: rw-in .9s var(--ease-hair) forwards, rw-shine 5s ease-in-out 3;
  animation-delay: calc(var(--d, 0s) + var(--i) * .085s), calc(1.4s + var(--i) * .1s); }
@keyframes rw-in { to { opacity: 1; transform: none; filter: none; } }
@keyframes rw-shine { 0%, 55% { background-position: 100% 0; } 100% { background-position: 0 0; } }
html[data-motion="lite"] .rise .rw { filter: none; }
.style-menu-page h1.t-hero { font-size: clamp(36px, 5.4vw, 56px); }
h1.t-hero-family { font-size: clamp(40px, 6vw, 60px); }

/* ---------- 2. depth looks: arch (back), the model cut out (middle), shade + price + action (front) ---------- */
.depth-stage { --px: 0; --py: 0; position: relative; overflow: hidden; isolation: isolate; }
.depth-stage > .depth-photo { position: relative; z-index: 0; display: block; transition: filter .8s var(--ease-hair), transform .8s var(--ease-hair); }
.depth-stage::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .7s var(--ease-hair);
  background: linear-gradient(180deg, color-mix(in srgb, var(--ny-glow) 62%, transparent), color-mix(in srgb, var(--amb) 40%, transparent) 70%, color-mix(in srgb, var(--amb-hair) 30%, transparent)); }
.depth-arch { position: absolute; z-index: 2; left: 12%; right: 12%; top: 6%; bottom: -4%; border-radius: 999px 999px 0 0; pointer-events: none; opacity: 0;
  background: radial-gradient(110% 75% at 50% 14%, color-mix(in srgb, var(--amb) 65%, #fff) 0%, var(--amb) 36%, color-mix(in srgb, var(--amb-hair) 62%, var(--amb)) 92%);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--amb-hair) 45%, var(--gold)), 0 0 70px 14px color-mix(in srgb, var(--amb) 60%, transparent);
  transform: translate(calc(var(--px) * -9px), calc(var(--py) * -7px)); transition: opacity .7s var(--ease-hair); }
.depth-stage > .depth-cut { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; object-fit: cover; pointer-events: none; opacity: 0;
  transform: translate(calc(var(--px) * 8px), calc(var(--py) * 5px)) scale(1.015); transition: opacity .6s var(--ease-hair);
  filter: drop-shadow(0 16px 22px rgba(70, 25, 12, .26)); }
.depth-on::before { opacity: 1; }
.depth-on > .depth-photo { filter: blur(8px) saturate(.8) brightness(1.06); transform: translate(calc(var(--px) * -5px), calc(var(--py) * -4px)) scale(1.1); }
.depth-on > .depth-arch { opacity: .92; }
.depth-on > .depth-cut { opacity: 1; }
/* The Nayeli wordmark (2026-10-16): the back plane's baked watermark is blurred while the depth look is on, so a small
   crisp wordmark sits in the same corner (media.js markOf), over the cut-out, which carries no mark. */
.depth-stage > img.depth-mark { position: absolute; z-index: 4; bottom: 3.5%; right: 3.5%; width: 16%; max-width: 104px; height: auto; object-fit: contain; pointer-events: none;
  opacity: .8; filter: drop-shadow(0 1px 3px rgba(12, 7, 3, .55)); }
.depth-stage > img.depth-mark.at-left { right: auto; left: 3.5%; }
.depth-stage > img.depth-mark.at-center { right: auto; left: 50%; transform: translateX(-50%); }
html[data-motion="lite"] .depth-on > .depth-photo { filter: saturate(.7) brightness(1.1); }
html[data-motion="lite"] .depth-stage > .depth-cut { filter: none; }
.depth-front { position: absolute; z-index: 4; left: 12px; right: 12px; top: 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  pointer-events: none; opacity: 0; transform: translate(calc(var(--px) * 14px), calc(var(--py) * 9px)); transition: opacity .5s var(--ease-hair) .25s; }
.depth-front > * { pointer-events: auto; }
.depth-on > .depth-front { opacity: 1; }
.depth-tag { display: inline-flex; align-items: center; gap: 9px; padding: 5px 13px 5px 5px; border-radius: 99px; color: var(--ink);
  background: color-mix(in srgb, var(--paper) 78%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(60, 25, 12, .14), inset 0 0 0 1px color-mix(in srgb, var(--ny-glow) 70%, transparent); }
.depth-tag > span { display: grid; line-height: 1.15; }
.depth-tag b { font-weight: 500; font-size: 13px; }
.depth-tag small { font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dt-sw { width: 30px; height: 30px; border-radius: 99px; background: center / cover; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--ny-gold); flex: none; }
.depth-act { width: 44px; height: 44px; border-radius: 99px; border: 0; display: grid; place-items: center; color: var(--ink);
  background: color-mix(in srgb, var(--paper) 78%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 6px 20px rgba(60, 25, 12, .14); }
.depth-act[aria-pressed="true"] { color: var(--ny-ink); box-shadow: 0 0 0 2px var(--ny-glow), 0 6px 20px rgba(60, 25, 12, .14); }
.depth-stage > .gallery-cap { z-index: 4; }
.tilt-chip { position: absolute; z-index: 6; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 13px; border-radius: 99px; border: 0;
  font: 500 12.5px var(--sans); color: var(--ink); background: color-mix(in srgb, var(--ny-glow) 86%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px var(--ny-glow), 0 6px 18px rgba(60, 25, 12, .16); }
.hm-1.depth-stage .hm-link { position: absolute; inset: 0; z-index: 5; }
.hm-1.depth-stage .badge { z-index: 6; }

/* ---------- 3. shade-reactive ambience ---------- */
.swatch-row .sw-img { transition: border-color .2s, box-shadow .35s var(--spring), transform .35s var(--spring); }
.swatch-row .sw[aria-checked="true"] .sw-img { box-shadow: 0 0 0 1px var(--line-2), 0 0 0 5px color-mix(in srgb, var(--ny-glow) 55%, transparent), 0 4px 14px -2px var(--sw, var(--ny-gold)); transform: scale(1.06); }
.swatch-row--dark .sw[aria-checked="true"] .sw-img { box-shadow: 0 0 0 5px color-mix(in srgb, var(--ny-gold) 35%, transparent), 0 4px 16px -2px var(--sw, var(--ny-gold)); }
.swatch-row .sw:active .sw-img { transform: scale(.94); }
.hs-viewer .hs-stage { box-shadow: 0 0 0 2px color-mix(in srgb, var(--amb) 80%, transparent), 0 24px 64px -20px var(--amb-hair); }
.feed-glow { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(55% 45% at 50% 42%, color-mix(in srgb, var(--amb) 42%, transparent), transparent 72%); mix-blend-mode: screen; }

/* ---------- 6. feed depth: the next card waits behind; the rail's ribbon slides ---------- */
.live-feed .feed { z-index: 1; }
.feed > .reel { z-index: 1; }
.feed > .reel.peeking { z-index: 0; transform-origin: 50% 40%;
  transform: translateY(calc(var(--peek) * -100%)) scale(calc(1 - var(--peek) * .08));
  filter: blur(calc(var(--peek) * 6px)) brightness(calc(1 - var(--peek) * .3)); }
.feed > .reel.peeking::after { content: ""; position: absolute; inset: 0; z-index: 30; pointer-events: none;
  background: color-mix(in srgb, var(--amb) 55%, transparent); opacity: calc(var(--peek) * .75); }
html[data-motion="lite"] .feed > .reel.peeking { filter: brightness(calc(1 - var(--peek) * .3)); }
.feed-rail button { position: relative; z-index: 1; transition: color .25s; }
.feed-rail .rail-ink { position: absolute; z-index: 0; left: 0; top: 0; height: 100%; min-height: 32px; width: 0; border-radius: 99px; pointer-events: none; opacity: 0;
  background: var(--ny-gold-grad); box-shadow: 0 0 18px 2px color-mix(in srgb, var(--ny-gold) 45%, transparent); }

/* ---------- 4. girlie micro-interactions ---------- */
#fx-layer { position: fixed; inset: 0; z-index: 400; pointer-events: none; overflow: hidden; }
#fx-layer > i { position: absolute; display: block; will-change: transform, opacity; }
.fx-ripple { width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle, var(--c) 0%, color-mix(in srgb, var(--c) 45%, transparent) 46%, transparent 70%); }
.fx-spark { width: 12px; height: 12px; background: var(--ny-gold); clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); }
.fx-spark.fx-gold { width: 9px; height: 9px; background: var(--ny-gold, var(--ny-gold)); } /* the booking confetti */
.fx-fly { width: 48px; height: 48px; border-radius: 50%; background: var(--ny-gold) center / cover no-repeat; border: 2px solid var(--paper);
  box-shadow: 0 6px 18px rgba(60, 20, 10, .3), 0 0 0 4px color-mix(in srgb, var(--ny-glow) 70%, transparent); }
.icon-btn .dot.pop { animation: badge-pop .6s var(--spring); }
.icon-btn .dot.pop::after { content: ""; position: absolute; inset: -5px; border-radius: 99px; border: 2px solid var(--ny-gold); opacity: 0; animation: badge-ring .75s ease-out; }
@keyframes badge-pop { 0% { transform: scale(1); } 30% { transform: scale(1.5); background: var(--ny-gold); } 100% { transform: scale(1); } }
@keyframes badge-ring { from { opacity: .9; transform: scale(.6); } to { opacity: 0; transform: scale(1.7); } }
/* try-on result: a shimmer wipe (the logo's light sweep) reveals the preview over her photo */
.reveal { position: relative; }
.reveal--over:not(.vis-compare) { display: grid; }
.reveal--over:not(.vis-compare) > img { grid-area: 1 / 1; }
.reveal .reveal-before { width: 100%; max-height: 52vh; object-fit: contain; border-radius: var(--r); background: var(--sunk); }
.reveal-after { -webkit-mask-image: linear-gradient(100deg, #000 45%, transparent 56%); mask-image: linear-gradient(100deg, #000 45%, transparent 56%);
  -webkit-mask-size: 250% 100%; mask-size: 250% 100%; -webkit-mask-position: 0 0; mask-position: 0 0; animation: reveal-wipe 1.4s var(--ease-hair) .2s both; }
.reveal-light { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; border-radius: inherit;
  background: linear-gradient(100deg, transparent 40%, rgba(255, 242, 222, .6) 47%, color-mix(in srgb, var(--ny-gold) 45%, transparent) 52%, transparent 60%) 100% 0 / 250% 100% no-repeat;
  mix-blend-mode: screen; animation: reveal-light 1.4s var(--ease-hair) .2s both; }
@keyframes reveal-wipe { from { -webkit-mask-position: 100% 0; mask-position: 100% 0; } to { -webkit-mask-position: 0 0; mask-position: 0 0; } }
@keyframes reveal-light { 0% { opacity: 1; background-position: 100% 0; } 85% { opacity: 1; } 100% { opacity: 0; background-position: 0 0; } }

/* ---------- 5. weaving progress: three strands braid as the bar fills ---------- */
.wait-bar { position: relative; height: 18px; border-radius: 99px; overflow: hidden;
  background: color-mix(in srgb, var(--ny-glow) 70%, var(--sunk)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ny-glow) 60%, transparent); }
.weave { display: block; width: 100%; height: 100%; }
.weave rect { transition: width .45s linear; }
.weave-s { fill: none; stroke-width: 2.4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.weave-s0 { stroke: var(--gold); } .weave-s1 { stroke: var(--ny-gold); } .weave-s2 { stroke: var(--ny-ink); }
.weave-move { animation: weave 1.3s linear infinite; }
@keyframes weave { from { transform: translateX(-24px); } to { transform: translateX(0); } }
.weave-tip { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--ny-glow);
  box-shadow: 0 0 0 2px var(--ny-gold), 0 0 12px 3px color-mix(in srgb, var(--ny-glow) 80%, transparent); transition: left .45s linear; }

/* ---------- the intelligent rules: reduced motion keeps every state, moves nothing ---------- */
@media (prefers-reduced-motion: reduce) {
  .rise .rw, .rise.rise-in .rw, .rise.rise-in .rw-accent { opacity: 1; transform: none; filter: none; animation: none !important; }
  .depth-stage > .depth-photo, .depth-arch, .depth-stage > .depth-cut, .depth-front { transform: none !important; transition: none; }
  .depth-on > .depth-photo { transform: scale(1.1) !important; }
  .feed > .reel.peeking { transform: none; filter: none; }
  .feed > .reel.peeking::after { display: none; }
  .weave-move, .reveal-after, .reveal-light, .icon-btn .dot.pop, .icon-btn .dot.pop::after { animation: none !important; }
  .reveal-after { -webkit-mask-image: none; mask-image: none; }
  .weave rect, .weave-tip { transition: none; }
  #fx-layer { display: none; }
}
