/* Angel Club Seoul - ui.css (2026-10-22): heart menu icon, winged heart bag with the count inside, wishlist heart on
   the look tiles, heart-pop burst + fly-to-bag fx. Ported from components/heart-cart.html (iPhone-checked demo);
   colours are the styles.css tokens only. Loaded after styles.css; the fx nodes are built by ui.js.
   Order: 1 menu icon, 2 bag, 3 wishlist heart, 4 fx, 5 header peek, 5b product page, 5c toast, 6 breakpoints, 7 reduce. */

/* ---------- 1. menu icon: the silver bow over three polished bars (Higgsfield render graded to the hero silver,
   assets/ui/menu-*.webp). Open = the bars fold away and the bow turns into a little cross. ---------- */
.burger { width: 30px; height: 30px; }
.burger::after { inset: -7px; }   /* 44px hit area for the 30px box */
.burger .mi {   /* explicit box: styles.css .burger i still sets the old 20 x 1px lines */
  position: absolute; left: 0; top: 0; width: 30px; height: 30px; transform: none;
  background: url("assets/ui/menu-2x.webp") center / 100% 100% no-repeat;
  background-image: image-set(url("assets/ui/menu-2x.webp") 2x, url("assets/ui/menu-3x.webp") 3x);
  filter: drop-shadow(0 .5px .6px rgba(74, 56, 50, .4));
  transition: transform .28s var(--ease-soft), opacity .2s var(--ease-soft);
}
.burger .mi.bow { clip-path: inset(0 0 52% 0); transform-origin: 50% 24%; transform: translateY(9%) scale(1.08); }   /* pull the bow and the bars together */
.burger .mi.bars { clip-path: inset(47% 0 0 0); transform-origin: 50% 74%; transform: translateY(-20%); }
.nav-open .burger .mi.bars { transform: translateY(-20%) scaleY(0); opacity: 0; top: 0; }
.nav-open .burger .mi.bow { top: 0; }
.nav-open .burger .mi.bow { transform: translateY(30%) rotate(45deg) scale(1.3); }

/* ---------- 2. bag: the silver winged heart with halo (Higgsfield render graded to the hero silver, assets/ui/bag-*.webp,
   1342 x 1000). Three layers of the same image: left wing (x 0-34 %), right wing (x 66-100 %), heart + halo band
   (x 31-69 %) on top so the wing roots stay covered while the wings rotate. The count sits on the polished heart. ---------- */
.hdr-right { display: flex; align-items: center; }
.bag-link { display: block; width: 58px; height: 44px; padding: 2px 0; margin-right: -4px; color: var(--ink); }
.bag { position: relative; display: block; width: 54px; height: 40px; }
.bag .bw, .bag .bh, .fx-fly .bw, .fx-fly .bh {
  position: absolute; inset: 0;
  background: url("assets/ui/bag-2x.webp") center / 100% 100% no-repeat;
  background-image: image-set(url("assets/ui/bag-2x.webp") 2x, url("assets/ui/bag-3x.webp") 3x);
  filter: drop-shadow(0 .5px .6px rgba(74, 56, 50, .4));
}
/* founder 10/22: heart bigger, wings shorter -> wings scale .78 about their shoulder, heart band 1.22 about its centre */
.bag .bw.l, .fx-fly .bw.l { clip-path: inset(0 66% 0 0); transform-origin: 33% 52%; transform: scale(.78); }
.bag .bw.r, .fx-fly .bw.r { clip-path: inset(0 0 0 66%); transform-origin: 67% 52%; transform: scale(.78); }
.bag .bh, .fx-fly .bh { clip-path: inset(0 31% 0 31%); transform-origin: 50% 58%; transform: scale(1.22); }
.bag .bw.l { animation: ui-idle-l 3.6s ease-in-out infinite; }
.bag .bw.r { animation: ui-idle-r 3.6s ease-in-out infinite; }
.bag .count {
  position: absolute; left: 0; right: 0; top: 60%; transform: translateY(-50%);
  text-align: center; font: 400 13px/1 var(--f-display); font-variant-numeric: lining-nums tabular-nums; letter-spacing: .02em;
  color: rgba(88, 66, 62, .92);   /* engraved into the silver: dark recess, light catch on the lower edge, soft dark rim above */
  text-shadow: 0 .7px 0 rgba(255, 252, 250, .9), 0 -.4px .3px rgba(60, 40, 38, .45);
}
.bag.bump .bh { animation: ui-bump 520ms cubic-bezier(.3, 1.6, .5, 1); }
.bag.bump .bw.l { animation: ui-flap-l 520ms ease-in-out; }
.bag.bump .bw.r { animation: ui-flap-r 520ms ease-in-out; }
@keyframes ui-idle-l { 0%, 100% { transform: scale(.78) rotate(0); } 50% { transform: scale(.78) rotate(-6deg); } }
@keyframes ui-idle-r { 0%, 100% { transform: scale(.78) rotate(0); } 50% { transform: scale(.78) rotate(6deg); } }
@keyframes ui-bump { 0% { transform: scale(1.22); } 35% { transform: scale(1.5); } 100% { transform: scale(1.22); } }
@keyframes ui-flap-l { 0%, 100% { transform: scale(.78) rotate(0); } 25% { transform: scale(.78) rotate(-26deg); } 50% { transform: scale(.78) rotate(8deg); } 75% { transform: scale(.78) rotate(-14deg); } }
@keyframes ui-flap-r { 0%, 100% { transform: scale(.78) rotate(0); } 25% { transform: scale(.78) rotate(26deg); } 50% { transform: scale(.78) rotate(-8deg); } 75% { transform: scale(.78) rotate(14deg); } }

/* ---------- 3. wishlist heart: bottom-right of the arch (margin-top % = figure width, so the caption height never matters) ---------- */
.wish {
  position: absolute; top: 0; right: 8px; z-index: 1;
  margin-top: calc(167.1% - 46px); right: 11%;   /* the framed photo ends at 167.1 % of the width (bottom lace band); heart 14px above it, inside the side band */
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: transparent;   /* no white disc (founder 10/22): the heart sits on the satin like the first screen's marks */
  color: var(--ink);
  /* no filter here: a drop-shadow on this button inside the scroll-animated tile painted black boxes in WebKit 26 */
}
.wish::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; }   /* 44px hit area */
/* founder 10/22 ("the heart next to the item looks weird"): the silver beaded heart cut from the bag render (assets/ui/heart-*.webp,
   aspect .975) replaces the outline svg. Two stacked layers of the same box: the silver heart stays, the "on" heart
   (polished face tinted satin) fades in over it, so the cross-fade never shows the satin through a half-faded heart. */
.wish-ico { position: relative; display: block; width: 24px; height: 24px; }
.wish-ico::before, .wish-ico::after {
  content: ""; position: absolute; inset: 0;
  background: url("assets/ui/heart-2x.webp") center / contain no-repeat;
  background-image: image-set(url("assets/ui/heart-1x.webp") 1x, url("assets/ui/heart-2x.webp") 2x, url("assets/ui/heart-3x.webp") 3x);
}
.wish-ico::after {
  background-image: url("assets/ui/heart-on-2x.webp");
  background-image: image-set(url("assets/ui/heart-on-1x.webp") 1x, url("assets/ui/heart-on-2x.webp") 2x, url("assets/ui/heart-on-3x.webp") 3x);
  opacity: 0; transition: opacity .2s var(--ease-soft);
}
.wish.on .wish-ico::after { opacity: 1; }
.wish.is-restoring .wish-ico::after { transition: none; }   /* ui.js: the saved state comes back without a fade */
.wish.pop .wish-ico { animation: ui-wish-pop 460ms cubic-bezier(.3, 1.6, .5, 1); }
@keyframes ui-wish-pop { 0% { transform: scale(1); } 35% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* look 01: the photo links to its page; the link wraps the media only, so the wishlist button (later, z-index 1) stays on top */
.tile-link { display: block; }
.tile-link:focus-visible { outline: none; }
.tile-link:focus-visible .tile-img { outline: 1px solid var(--ink); outline-offset: 3px; }
/* photos (look 01 tile + product page): the same W/2 arch as styles.css, written out so the bottom corners can round
   by 5 % and tuck under the lace corner scrolls (a light photo showed its square corner past them) */
.tile-img { border-radius: 50% 50% 5% 5% / 27.75% 27.75% 2.775% 2.775%; }

/* lace frame: the silver lace arch (Higgsfield render, assets/ui/frame-*.webp, 1506 x 2669) laid over the tile box;
   the media is inset under its band in styles.css (.tile-img ...). No pointer events, no white hairline anymore. */
.tile::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 1506 / 2669; pointer-events: none;
  background: url("assets/ui/frame-2x.webp") center / 100% 100% no-repeat;
  background-image: image-set(url("assets/ui/frame-2x.webp") 2x, url("assets/ui/frame-3x.webp") 3x);
}

/* lace dividers (founder 10/22): the frame's own lace band, cut thin (14px) and mirrored into a seamless strip,
   replaces every hairline divider (footer top, drawer foot). */
.lace-line {
  display: block; height: 14px; margin: 0 auto; width: min(100%, 1100px);
  background: url("assets/ui/lace-divider-2x.webp") center / auto 14px repeat-x;
  background-image: image-set(url("assets/ui/lace-divider-2x.webp") 2x, url("assets/ui/lace-divider-3x.webp") 3x);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  filter: drop-shadow(0 .5px .6px rgba(74, 56, 50, .25));
}
.ft-inner { border-top: 0; padding-top: 0; }
.ft-inner .lace-line { margin-bottom: 36px; }
.nav-foot { border-top: 0; }
.nav-foot .lace-line { position: absolute; left: 0; right: 0; top: 0; width: auto; }

/* ---------- 4. fx: burst hearts / sparkles and the flying winged heart (fixed, above the header) ---------- */
.fx { position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; color: var(--ink); will-change: transform, opacity; }
.fx svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fx-heart { filter: drop-shadow(0 1px 1px rgba(102, 64, 75, .25)); }
.fx-spark { filter: drop-shadow(0 0 3px #fff); }
.fx-fly { filter: drop-shadow(0 1px 2px rgba(102, 64, 75, .3)); }
.fx-fly .bw.l { animation: ui-fly-l 170ms ease-in-out infinite; }   /* ~6 flaps per second while it glides */
.fx-fly .bw.r { animation: ui-fly-r 170ms ease-in-out infinite; }
@keyframes ui-fly-l { 0%, 100% { transform: scale(.78) rotate(4deg); } 50% { transform: scale(.78) rotate(-30deg); } }
@keyframes ui-fly-r { 0%, 100% { transform: scale(.78) rotate(-4deg); } 50% { transform: scale(.78) rotate(30deg); } }

/* ---------- 5. header peek: on home the bar is hidden over the hero/look band (styles.css); an add-to-bag shows it for a moment ---------- */
body:not(.nav-open) .hdr.hdr--home.ui-peek {
  opacity: 1; transform: none; pointer-events: auto;
  background: rgba(218, 187, 181, .86);   /* = .hdr--over.is-solid (satin): the compact bar simply arrives early */
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}

/* ---------- 5b. product page (products/01.html): no hero, so the bar is the compact satin bar from the start ---------- */
body:not(.nav-open) .hdr--solid {
  background: rgba(218, 187, 181, .86);   /* = .hdr--over.is-solid */
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
@supports not (backdrop-filter: blur(1px)) { body:not(.nav-open) .hdr--solid { background: var(--bg); } }

/* one satin surface: the look band's satin gradient + poster folds (styles.css section 7) under the whole page body,
   feathered into the plate only at the bottom (the top sits under the bar). No panels, no cards. */
.pdp {
  position: relative; isolation: isolate; contain: paint;
  padding: calc(var(--top-stack) + env(safe-area-inset-top, 0px) + var(--sp-3)) var(--gutter) var(--sec);
}
.pdp::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--g-satin); }
.pdp::after {
  content: ""; position: absolute; top: 0; left: 50%; z-index: -1;
  height: 100%; aspect-ratio: 9 / 4; min-width: 100%; transform: translateX(-50%);
  opacity: .55; background: var(--satin-tex) 50% 0% / 100% auto no-repeat;
}
.pdp::before, .pdp::after {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 64px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 64px), transparent);
}
/* one column, centred on the arch; the column is the frame's width so the button and the lace line up */
.pdp-in { display: grid; justify-items: center; }
.gallery, .pdp-info { width: min(100%, 420px); }
/* phones: the arch is also capped by the screen height so the counter and "add to bag" sit in the first screen under it
   (atlas 1064 Studio 78d64423b60da6 and Alighieri dadb70b91b1817 show the CTA in the first mobile screen).
   svh = Safari with its bars shown (the load state); space under the arch = bar + 3 x sp-3 (top, above the button,
   air under it) + counter line 20 + button 48; 1506 / 2669 = the frame's aspect. Never narrower than 260px (then it scrolls). */
@media (max-width: 1023.98px) {
  .gallery, .pdp-info {
    width: min(100%, 420px, max(260px, (100vh - var(--top-stack) - env(safe-area-inset-top, 0px) - 3 * var(--sp-3) - 68px) * 1506 / 2669));
    width: min(100%, 420px, max(260px, (100svh - var(--top-stack) - env(safe-area-inset-top, 0px) - 3 * var(--sp-3) - 68px) * 1506 / 2669));
  }
}
.gallery > li + li { margin-top: var(--sp-3); }   /* more photos later: one arch per row (atlas 78d64423b60da6) */
.pdp-info { display: flex; flex-direction: column; align-items: center; text-align: center; }
.pdp-title { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); }
.pdp-title .n { font-size: 16px; line-height: 20px; }
.pdp-title .copy { margin: 0 auto; }
.pdp-title h1 { font-size: var(--t-title); line-height: var(--lh-title); }   /* the name, once written: title size, not body copy */
.pdp-title:has(> h1[data-copy-slot]:not(:empty)) > [data-h1-fallback] { display: none; }   /* "look 01" heading for screen readers until the name is written */
.price { font-size: 17px; }

/* options: chips (kit b section 13), rendered by ui.js from data-option-values; no values = no fieldset at all */
.chips { margin: var(--sp-3) 0 0; padding: 0; border: 0; min-width: 0; width: 100%; }
.chips:not(:has(.chip)) { display: none; }
.chips legend { padding: 0; margin: 0 auto var(--sp-1); font: italic 400 15px/20px var(--f-display); letter-spacing: .02em; }
.chip-row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-1); }
.chip {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  height: 32px; min-width: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  font: 400 13px/1 var(--f-ui); letter-spacing: .03em; white-space: nowrap;
  transition: background-color .2s, border-color .2s;
}
.chip::after { content: ""; position: absolute; left: 0; right: 0; top: -6px; bottom: -6px; }   /* 44px hit */
.chip[aria-pressed="true"] { border-color: var(--satin-shadow); background: var(--satin-light); box-shadow: inset 0 0 0 1px var(--satin-shadow); }
.chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* add to bag: ink pill, the full column (kit b section 12, lg 48) */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 28px; border-radius: 999px;
  background: var(--ink); color: var(--on-ink);
  font: 400 14px/1 var(--f-ui); letter-spacing: .04em; white-space: nowrap;
  transition: background-color .2s, transform .12s var(--ease-out);
}
.btn--add { width: 100%; margin-top: var(--sp-3); }
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (hover: hover) { .btn:hover { background: color-mix(in srgb, var(--ink) 86%, #000); } }

/* details: a quiet list on one centre axis (term right, value left), no rules, no accordion */
.pdp-details { margin-top: var(--sp-6); display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); width: 100%; }
.pdp-details h2 { font: italic 400 20px/24px var(--f-display); letter-spacing: .02em; text-shadow: 0 0 12px rgba(252, 249, 247, .9); }
.details { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--sp-2); row-gap: var(--sp-1); width: 100%; }
.details .row { display: contents; }
.details .row:has(> dd:empty) { display: none; }
.details dt { text-align: right; font: italic 400 16px/24px var(--f-display); letter-spacing: .02em; }
.details dd { text-align: left; font: 400 16px/24px var(--f-display); letter-spacing: .02em; }

/* back link: a plain underlined link in the info column, not a third ornamented title */
.back-row { display: flex; justify-content: center; margin-top: var(--sp-5); }
.back {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 400 14px/1 var(--f-ui); letter-spacing: .04em;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
  text-decoration-color: color-mix(in srgb, var(--ink) 40%, transparent);
  transition: text-decoration-color .2s;
}
.back:hover, .back:focus-visible { text-decoration-color: var(--ink); }

/* ---------- 5c. add confirmation: no visible toast (two reviews 20:3x: a pill stacks on the add button at the bottom and
   covers the lace bow at the top). The heart flight and the bag count are the confirmation; this live region only
   speaks "added to bag" to assistive tech (ui.js toast()). ---------- */
.toast { position: fixed; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- 6. breakpoints ---------- */
@media (min-width: 1024px) {
  .bag-link { width: 48px; height: 48px; }
  .bag { width: 48px; height: 44px; }
  .bag .count { font-size: 12.5px; }   /* 11.5 read faint on a 1x screen (review 10/22) */
  /* product page: arch left, the info column (back link included) beside it on the arch's centre line */
  .pdp-in { grid-template-columns: 420px minmax(0, 360px); column-gap: var(--sp-12); justify-content: center; align-items: center; }
  .gallery { grid-column: 1; grid-row: 1; }
  .pdp-info { grid-column: 2; grid-row: 1; width: 100%; }
}

/* ---------- 7. reduce: no idle sway, no flap, no bump (styles.css already stops every animation; kept here for the fx) ---------- */
@media (prefers-reduced-motion: reduce) {
  .bag .bw, .bag.bump .bh, .fx-fly .bw, .wish.pop .wish-ico { animation: none !important; }
}
