/* ==========================================================================
   1. HERO (V6 "Warm Glass Atelier"). The stage of the reference design: a full-viewport photoreal scene (an arched stone hall, ONE synthetic model centred), the headline centred
   at the top in large italic serif with a tracked-caps tagline between hairlines, a frosted tool rail on the left, two DECKS of three frosted-glass cards in true 3D on either side
   of the model (nearest = largest and sharp, the others smaller, tilted back and fading), round glass arrows, a wide glass bar at the bottom and the scroll cue.
   GEOMETRY. Everything is sized by the viewport HEIGHT first (the design is for short wide screens: 1920x940, 1536x730, 1440x760, 1366x650). --H is the height of the part of the hero
   that is on screen at load; the photograph is a feathered window whose height is chosen so that the model's head starts under the headline and her feet end behind the bar:
       --pic-h = (H - feet - headTop) / (box-y1 - box-y0)        box-* = where the model stands inside the photograph (fractions; hero-app.js refines the defaults from the data).
   Wide screens show the photograph's feathered edges over a blurred copy of itself (the wash), so the room never has hard edges.
   LAYERS (back to front): wash, scene (zoom > looks, masked), veil, frame (headline, rail, decks, arrows, row, dock, cue). One transform owner per element: scroll scrub = .hx__deck /
   .hx__scene, pointer parallax = .hx__deck-in / .hx__zoom-in, entrance = .hx-swing, hover tilt = .hx-card (motion kit), slot position = .hx-slot (CSS custom properties + transitions).
   NO-JS / FAIL-SAFE: the rest state is the complete hero; the entrance hides things only under html.hz-intro and a CSS animation shows them after 1.35 s whatever happens.
   ========================================================================== */
.hx {
  --hx-off: var(--announce-h, 0px);                 /* what sits above the hero at load (announcement strip); hero.js writes the measured value */
  --hx-top: var(--header-bar-h);                        /* the transparent header covers the top of the hero */
  --H: calc(max(100svh, 34rem) - var(--hx-off));
  --u: calc(var(--H) / 100);
  --box-y0: .16; --box-y1: .973; --box-x0: .43; --box-x1: .58; --box-cx-d: .505; --box-cx: var(--box-cx-d); --ar-d: 1.792; --ar-m: .502; --ar: var(--ar-d);
  --gx: clamp(1rem, 2vw, 2.25rem);                  /* side gutter of the stage */
  /* headline block */
  --hl-fs: clamp(2.1rem, calc(var(--u) * 6.4), 5rem);
  --yh: calc(var(--hx-top) + .3rem + var(--hl-fs) * 1.04 + .7rem + .85rem + .8rem);   /* y of the top of the model's head */
  /* bottom stack: cue, dock (bar + note) */
  --cue-b: clamp(.55rem, calc(var(--u) * 1.5), 1.1rem);
  --cue-h: clamp(1.8rem, calc(var(--u) * 3.7), 2.6rem);
  --bar-h: clamp(3.9rem, calc(var(--u) * 8.4), 5.6rem);
  --dock-b: calc(var(--cue-b) + var(--cue-h) + clamp(.4rem, calc(var(--u) * .8), .75rem));
  --dock-h: calc(var(--bar-h) + 1.7rem);
  /* the photograph: a true full-bleed COVER of the whole hero. It is scaled so that it covers the width (with the model centred, plus 3% for the parallax) and the height, and
     it is placed so that the top of the model's head is at --yh: the extra photograph is cropped at the bottom (and at the sides on narrow screens), never shown as blur. */
  --hero-h: max(100svh, 34rem);
  --pic-h: max(calc(100vw * 2 * max(var(--box-cx), calc(1 - var(--box-cx))) * 1.03 / var(--ar)), calc((var(--hero-h) - var(--yh)) / (1 - var(--box-y0))));
  --pic-w: calc(var(--pic-h) * var(--ar));
  --model-half: calc((var(--box-x1) - var(--box-x0)) * var(--pic-w) * .5);
  /* the decks */
  --cw: clamp(7rem, min(calc(var(--u) * 18.5), 12.4vw), 14.5rem);
  --card-h: calc(var(--cw) * 1.25 + 3.7rem);
  --bar-top: calc(var(--H) - var(--dock-b) - var(--dock-h));
  --deck-top: calc(var(--yh) + (var(--bar-top) - var(--yh) - var(--card-h)) * .46);
  --deck-cy: calc(var(--deck-top) + var(--card-h) * .5);
  --step: calc(var(--cw) * .74);
  --dz: calc(var(--cw) * .8);
  --ry: 13deg; --ry-step: 8deg;
  --model-gap: clamp(1.1rem, 2.4vw, 3rem);
  --deck-w: calc(var(--cw) + var(--step) * 2);

  position: relative; isolation: isolate; overflow: hidden; overflow: clip; height: max(100svh, 34rem); color: var(--ink); background: var(--sand);
}
html:not(.js) .hx { --hx-top: 0px; --hx-off: calc(var(--announce-h, 0px) + var(--header-bar-h)); }
.hx-sprite { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; }
.hx-i { display: block; inline-size: 1.25rem; block-size: 1.25rem; flex: none; }

/* ---- glass (real blur: rail, arrows, bar; the deck cards are milky gradients because fourteen live blurs in 3D cost frames) ---- */
.hx-glass {
  background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat)); backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
}
.hx-glass--strong { background: var(--glass-bg-strong); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .hx-glass, .hx-glass--strong { background: var(--paper); } }

/* ---- wash + scene ---- */
.hx__wash { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--sand); }
.hx__wash img { position: absolute; inset: -6%; inline-size: 112%; block-size: 112%; max-inline-size: none; object-fit: cover; filter: blur(34px) saturate(.82) brightness(1.22) contrast(.8); }
.hx__wash::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--cream-rgb), .55), rgba(var(--cream-rgb), .3) 50%, rgba(var(--cream-rgb), .72)); }
.hx__scene {
  position: absolute; z-index: 1; inset-inline-start: 50%; inset-block-start: calc(var(--yh) - var(--box-y0) * var(--pic-h)); inline-size: var(--pic-w); block-size: var(--pic-h);
  margin-inline-start: calc(var(--pic-w) * var(--box-cx) * -1); transform-origin: 50% 36%;
}
.hx__zoom { position: absolute; inset: 0; transform-origin: 50% 36%; animation: hx-zoom 26s var(--ease-in-out) 1.2s infinite alternate; }
.hx__zoom-in { position: absolute; inset: 0; }
@keyframes hx-zoom { from { transform: scale(1); } to { transform: scale(1.05); } }
.hx__looks {
  position: absolute; inset: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 9%);
  mask-image: linear-gradient(180deg, transparent 0, #000 9%);
  filter: brightness(1.08) contrast(.97) saturate(1.03);      /* airier exposure: the Gemini hall is moodier than the reference */
}
.hx__look { position: absolute; inset: 0; display: block; opacity: 0; transition: opacity var(--showroom-swap, .55s) var(--ease-soft); z-index: 0; }
.hx__look img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.hx__look.is-current { opacity: 1; z-index: 2; }
.hx__look.is-under { opacity: 1; z-index: 1; transition: none; }      /* the outgoing picture stays under the incoming one until the fade is done (no dip) */
/* a soft bloom of the skylight (screen blend of a near-white radial: it lifts the highlights, it adds no colour) and a fade of the lower scene into the cream page */
.hx__bloom {
  position: absolute; z-index: 2; inset: 0; pointer-events: none; mix-blend-mode: soft-light; opacity: .9;
  background: radial-gradient(52% 42% at 50% calc(var(--yh) + 4%), rgba(255, 249, 238, .95) 0, rgba(255, 249, 238, .45) 45%, rgba(255, 249, 238, 0) 100%);
}
.hx__fade {
  position: absolute; z-index: 2; inset: auto 0 0 0; block-size: calc(var(--dock-h) + var(--dock-b) + var(--hx-off) + 3rem); pointer-events: none;
  background: linear-gradient(0deg, var(--cream) 0, rgba(var(--cream-rgb), .92) 22%, rgba(var(--cream-rgb), .55) 52%, rgba(var(--cream-rgb), 0) 100%);
}
.hx__veil {
  position: absolute; z-index: 2; inset: 0 0 auto 0; block-size: calc(var(--yh) + 2.5rem); pointer-events: none;
  background: linear-gradient(180deg, rgba(var(--cream-rgb), .82) 0, rgba(var(--cream-rgb), .55) 52%, rgba(var(--cream-rgb), 0) 100%);
}
.hx--bare .hx__wash { background: linear-gradient(180deg, var(--cream), var(--sand)); }

/* ---- the frame: the part of the hero that is on screen at load ---- */
.hx__frame { position: absolute; z-index: 3; inset: 0 0 var(--hx-off) 0; pointer-events: none; }
.hx__frame > * { pointer-events: auto; }
.hx__frame > .hx__decks, .hx__frame > .hx__head { pointer-events: none; }

/* ---- headline ---- */
.hx__head { position: absolute; inset-inline: 0; inset-block-start: calc(var(--hx-top) + .3rem); display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: .7rem; padding-inline: var(--gx); text-align: center; }
.hx__title {
  margin: 0; max-inline-size: 22ch; font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: var(--hl-fs); line-height: 1.04; letter-spacing: -.014em; color: var(--cocoa);
  text-wrap: balance; text-shadow: 0 1px 28px rgba(var(--cream-rgb), .85), 0 0 2px rgba(var(--cream-rgb), .6);
}
.hx__title em { font-style: normal; }
.hx__tag { color: var(--ink); font-size: clamp(.64rem, calc(var(--u) * 1.2), .8rem); letter-spacing: var(--tracking-wide); max-inline-size: 100%; text-shadow: 0 0 14px rgba(var(--cream-rgb), .9); }
.hx__tag::before, .hx__tag::after { flex: 0 1 clamp(1.5rem, 8vw, 7rem); opacity: .65; }
.hx__tag > span { text-align: center; text-wrap: balance; flex: 0 1 auto; }
.hx__tag { inline-size: min(100%, 60rem); }

/* ---- tool rail (left) ---- */
.hx__rail { position: absolute; inset-inline-start: var(--gx); inset-block-start: var(--deck-cy); translate: 0 -50%; display: flex; flex-direction: column; gap: .35rem; padding: .45rem; border-radius: 999px; z-index: 6; }
.hx__rail[hidden] { display: none; }
.hx__tool {
  display: grid; place-items: center; inline-size: 2.6rem; block-size: 2.6rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--cocoa); cursor: pointer; text-decoration: none;
  transition: background-color var(--dur-2) var(--ease-soft), color var(--dur-2) var(--ease-soft), transform var(--dur-3) var(--ease-spring);
}
.hx__tool:hover { background: rgba(255, 255, 255, .7); transform: scale(1.06); }
.hx__tool.is-active, .hx__tool[aria-pressed="true"] { background: var(--cocoa); color: var(--cream); }
.hx__tool[data-act="wish"][aria-pressed="true"] .hx-i { fill: currentColor; }
.hx__tool:focus-visible, .hx__arrow:focus-visible, .hx-card:focus-visible, .hx-add:focus-visible, .hx-sw:focus-visible, .hx-size:focus-visible, .hx__cue:focus-visible, .hx-bar a:focus-visible { outline: 2px solid var(--cocoa); outline-offset: 3px; box-shadow: 0 0 0 5px rgba(255, 250, 244, .9); }

/* ---- the decks: two stacks of three cards in 3D. data-d = distance from the model (0 = nearest, largest and sharp) ---- */
.hx__decks { position: absolute; inset: 0; z-index: 4; }
.hx__deck { position: absolute; inset-block-start: var(--deck-top); block-size: var(--card-h); inline-size: var(--deck-w); }
.hx__deck--l { inset-inline-end: calc(50% + var(--model-half) + var(--model-gap)); }
.hx__deck--r { inset-inline-start: calc(50% + var(--model-half) + var(--model-gap)); }
.hx__deck-in { position: absolute; inset: 0; }
.hx__cards { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; perspective: 1300px; }
.hx__deck--l .hx__cards { perspective-origin: 100% 50%; }
.hx__deck--r .hx__cards { perspective-origin: 0 50%; }
.hx-slot {
  --d: 0; position: absolute; inset-block: 0; inline-size: var(--cw); pointer-events: none; will-change: transform;
  transition: transform var(--dur-4) var(--ease-power4), opacity var(--dur-3) var(--ease-soft);
  z-index: calc(10 - var(--d));
}
.hx-slot[data-d="1"] { --d: 1; } .hx-slot[data-d="2"] { --d: 2; } .hx-slot[data-d="3"] { --d: 3; }
.hx__deck--l .hx-slot { inset-inline-end: 0; transform-origin: 100% 50%; transform: translate3d(calc(var(--d) * var(--step) * -1), 0, calc(var(--d) * var(--dz) * -1)) rotateY(calc(var(--ry) + var(--d) * var(--ry-step))); }
.hx__deck--r .hx-slot { inset-inline-start: 0; transform-origin: 0 50%; transform: translate3d(calc(var(--d) * var(--step)), 0, calc(var(--d) * var(--dz) * -1)) rotateY(calc((var(--ry) + var(--d) * var(--ry-step)) * -1)); }
.hx-slot.is-gone { opacity: 0 !important; pointer-events: none; transition: opacity var(--dur-2) var(--ease-soft); }
.hx-slot.is-new { opacity: 0; transition: none; }
.hx-slot > * { pointer-events: auto; block-size: 100%; }
.hx-swing { position: relative; block-size: 100%; transform-origin: 100% 50%; }
.hx__deck--r .hx-swing { transform-origin: 0 50%; }
.hx-card {
  position: relative; display: flex; flex-direction: column; gap: .4rem; inline-size: 100%; block-size: 100%; margin: 0; padding: .45rem .45rem .7rem; border-radius: var(--radius-xl); text-align: center; cursor: pointer;
  color: var(--ink); font: inherit; background: linear-gradient(180deg, rgba(255, 252, 247, .9), rgba(255, 250, 244, .7)); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  transition: box-shadow var(--dur-3) var(--ease-soft), background-color var(--dur-3);
}
.hx-card::before { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; background: var(--cream); opacity: calc(var(--d, 0) * .3); pointer-events: none; transition: opacity var(--dur-3) var(--ease-soft); }
.hx-card:hover { box-shadow: var(--glass-shadow-lg); }
.hx-card:hover::before { opacity: calc(var(--d, 0) * .12); }
.hx-card.is-selected { box-shadow: 0 0 0 2px var(--cocoa), var(--glass-shadow-lg); }
.hx-card__img { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden; background: var(--sand); flex: none; }
.hx-card__img img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.hx-card__tick { position: absolute; inset-block-start: .45rem; inset-inline-end: .45rem; display: none; place-items: center; inline-size: 1.6rem; block-size: 1.6rem; border-radius: 50%; background: var(--olive); color: var(--on-accent); box-shadow: 0 2px 8px rgba(var(--cocoa-rgb), .3); }
.hx-card__tick .hx-i { inline-size: .95rem; block-size: .95rem; }
.hx-card.is-selected .hx-card__tick { display: grid; }
.hx-card__name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; padding-inline: .2rem; font: 600 clamp(.72rem, calc(var(--cw) * .077), .86rem)/1.22 var(--font-sans); letter-spacing: .005em; min-block-size: 2.45em; }
.hx-card__price { font: 500 clamp(.7rem, calc(var(--cw) * .072), .82rem)/1.1 var(--font-sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.hx-card .tilt-glare { border-radius: inherit; }
/* the cards behind the nearest one are photographs only: their words would be cut in half by the card in front */
.hx__decks .hx-slot:not([data-d="0"]) .hx-card__name, .hx__decks .hx-slot:not([data-d="0"]) .hx-card__price { opacity: 0; transition: opacity var(--dur-3) var(--ease-soft); }

/* ---- arrows ---- */
.hx__arrow { position: absolute; z-index: 6; inset-block-start: calc(var(--deck-cy) - 1.5rem); display: grid; place-items: center; inline-size: 3rem; block-size: 3rem; padding: 0; border-radius: 50%; color: var(--cocoa); cursor: pointer; transition: background-color var(--dur-2) var(--ease-soft), color var(--dur-2), transform var(--dur-3) var(--ease-spring); }
.hx__arrow[hidden] { display: none; }
.hx__arrow:hover { background: var(--cocoa); color: var(--cream); }
/* the arrows hug the outer end of the decks but never run into the rail (left) or off the screen (right) */
.hx__arrow--prev { inset-inline-start: max(calc(50% - var(--model-half) - var(--model-gap) - var(--deck-w) - 3.9rem), calc(var(--gx) + 4.1rem)); }
.hx__arrow--next { inset-inline-end: max(calc(50% - var(--model-half) - var(--model-gap) - var(--deck-w) - 3.9rem), calc(var(--gx) + .2rem)); }

/* ---- dock: the glass bar + the honest note ---- */
.hx__dock { position: absolute; z-index: 6; inset-inline-start: 50%; translate: -50% 0; inset-block-end: var(--dock-b); inline-size: min(60rem, calc(100% - var(--gx) * 2 - 7rem)); }
.hx-bar { display: flex; align-items: center; gap: clamp(.7rem, 1.4vw, 1.3rem); min-block-size: var(--bar-h); padding: .6rem .75rem .6rem .6rem; border-radius: var(--radius-2xl); }
.hx-bar__static { display: contents; }
.hx-bar__opts { flex: none; display: flex; align-items: center; gap: clamp(.7rem, 1.2vw, 1.1rem); min-inline-size: 0; }
.hx-bar__thumb { flex: none; display: block; inline-size: calc(var(--bar-h) * .64); aspect-ratio: 4 / 5; border-radius: var(--radius-md); overflow: hidden; background: var(--sand); }
.hx-bar__thumb img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.hx-bar__id { flex: 1 1 9rem; min-inline-size: 0; display: grid; gap: .15rem; }
.hx-bar__name { color: var(--ink); font: 600 clamp(.86rem, calc(var(--u) * 1.6), .98rem)/1.2 var(--font-sans); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-bar__name:hover { text-decoration: underline; text-underline-offset: .22em; }
.hx-bar__sub { margin: 0; color: var(--muted-strong); font-size: clamp(.72rem, calc(var(--u) * 1.3), .8rem); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-bar__note { margin: 0; color: var(--ink); font: 600 .72rem/1.2 var(--font-sans); letter-spacing: .02em; }
.hx-bar__note::before { content: ""; display: inline-block; inline-size: .45rem; block-size: .45rem; margin-inline-end: .4rem; border-radius: 50%; background: var(--olive); }
.hx-bar__note[hidden] { display: none; }
.hx-bar__price { margin: 0; flex: none; font: 600 clamp(.95rem, calc(var(--u) * 1.9), 1.12rem)/1.1 var(--font-sans); color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hx-was { margin-inline-start: .35rem; font-weight: 400; font-size: .78em; color: var(--muted-strong); }
.hx-opt { flex: none; display: flex; align-items: center; gap: .4rem; margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.hx-opt[hidden] { display: none; }
.hx-sw { position: relative; display: grid; place-items: center; inline-size: 2rem; block-size: 2rem; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.hx-sw::before { content: ""; inline-size: 1.15rem; block-size: 1.15rem; border-radius: 50%; background: var(--sw, var(--taupe)); box-shadow: inset 0 0 0 1px rgba(42, 27, 21, .28); transition: transform var(--dur-3) var(--ease-spring); }
.hx-sw[aria-pressed="true"]::after { content: ""; position: absolute; inset: .12rem; border-radius: 50%; border: 1.5px solid var(--cocoa); }
.hx-sw:hover::before { transform: scale(1.12); }
.hx-sw.is-out::before { opacity: .45; }
.hx-sizes { gap: .3rem; }
.hx-size {
  display: grid; place-items: center; min-inline-size: 2.15rem; block-size: 2.15rem; padding: 0 .35rem; border: 1px solid rgba(var(--cocoa-rgb), .3); border-radius: 999px; background: rgba(255, 255, 255, .6);
  color: var(--ink); font: 600 .74rem/1 var(--font-sans); letter-spacing: .02em; cursor: pointer; transition: background-color var(--dur-2) var(--ease-soft), color var(--dur-2), border-color var(--dur-2), transform var(--dur-3) var(--ease-spring);
}
.hx-size:hover:not(:disabled) { background: var(--white); border-color: var(--cocoa); }
.hx-size[aria-pressed="true"] { background: var(--cocoa); border-color: var(--cocoa); color: var(--cream); }
.hx-size:disabled { opacity: .5; text-decoration: line-through; cursor: not-allowed; }
.hx-opt.is-need .hx-size:not(:disabled):not([aria-pressed="true"]) { border-color: var(--red); box-shadow: 0 0 0 3px rgba(168, 40, 28, .14); }
.hx-add {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-block-size: 2.9rem; padding: .6rem 1.35rem; border: 1px solid var(--cocoa); border-radius: var(--btn-radius, 999px); background: var(--cocoa); color: var(--cream);
  font: 600 .88rem/1 var(--font-sans); letter-spacing: .01em; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color var(--dur-3) var(--ease-soft), translate var(--dur-3) var(--ease-soft), box-shadow var(--dur-3);
}
.hx-add:hover:not(:disabled) { background: var(--cocoa-2); border-color: var(--cocoa-2); translate: 0 -2px; box-shadow: var(--shadow-1); }
.hx-add:disabled { opacity: .55; cursor: not-allowed; }
.hx-add[aria-busy="true"] { opacity: .75; }
.hx-add .hx-i { inline-size: 1.15rem; block-size: 1.15rem; }
.hx__ai { inline-size: fit-content; max-inline-size: 100%; margin: .5rem auto 0; padding: .28rem .85rem; border-radius: 999px; text-align: center; color: var(--ink); background: rgba(255, 250, 244, .62); font-size: clamp(.66rem, calc(var(--u) * 1.25), .74rem); letter-spacing: .02em; line-height: 1.3; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hx__msg { margin: .45rem auto 0; max-inline-size: 36rem; padding: .45rem 1rem; border-radius: 999px; text-align: center; font: 600 .78rem/1.3 var(--font-sans); color: var(--ink); }
.hx__msg[hidden] { display: none; }
.hx__msg.is-warn { color: var(--ink); box-shadow: 0 0 0 1px var(--warn-text); }

/* ---- scroll cue ---- */
.hx__cue { position: absolute; z-index: 6; inset-inline-start: 50%; translate: -50% 0; inset-block-end: var(--cue-b); display: inline-flex; align-items: center; gap: .8rem; block-size: var(--cue-h); color: var(--ink); text-decoration: none; }
.hx__cue-text { white-space: nowrap; font: 600 .68rem/1 var(--font-sans); letter-spacing: var(--tracking-wide); text-transform: uppercase; text-shadow: 0 0 12px rgba(var(--cream-rgb), .95); }
.hx__mouse { position: relative; flex: none; inline-size: 1.05rem; block-size: 1.7rem; border: 1.5px solid var(--ink); border-radius: 999px; }
.hx__mouse i { position: absolute; inset-block-start: .3rem; inset-inline-start: 50%; inline-size: 2px; block-size: .35rem; margin-inline-start: -1px; border-radius: 2px; background: var(--ink); animation: hx-wheel 2.2s var(--ease-in-out) infinite; }
.hx__cue-chev { inline-size: 1.1rem; block-size: 1.1rem; animation: hx-bob 2.2s var(--ease-in-out) infinite; }
@keyframes hx-wheel { 0%, 20% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(.5rem); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
@keyframes hx-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(.25rem); } }

/* ---- the mobile row (one short swipeable row of cards above the bar); hidden on desktop ---- */
.hx__row { display: none; }

/* ==========================================================================
   ENTRANCE (html.hz-intro is set by the layout only without reduced motion). Hidden only until hero.js plays the timeline; a CSS animation shows everything after 1.35 s regardless.
   The scene is NEVER hidden (it is the LCP image).
   ========================================================================== */
@keyframes hx-show { to { opacity: 1; } }
.hz-intro .hx:not(.is-in) [data-intro] { opacity: 0; animation: hx-show .01s linear 1.35s forwards; }
.hx.is-in [data-intro] { animation: none; }

/* ==========================================================================
   TABLETS AND PHONES (< 1024px): no side decks. ONE short swipeable row of cards sits above a slim bar; the rail and arrows are hidden; no pin.
   The scene uses the portrait phone crop (a <source media="(max-width: 767px)"); tablets use the landscape picture feathered into the wash.
   ========================================================================== */
@media (max-width: 63.99rem) {
  .hx {
    --hl-fs: clamp(2.05rem, calc(var(--u) * 4.9), 3.5rem);
    --yh: calc(var(--hx-top) + .4rem + var(--hl-fs) * 1.04 + .8rem + 2.1rem + .7rem);
    --cue-h: 1.8rem; --cue-b: .45rem; --bar-h: 7.4rem;
    --row-h: clamp(11.2rem, calc(var(--u) * 22.5), 13.2rem);
    --dock-b: calc(var(--cue-b) + var(--cue-h) + .3rem);
    --dock-h: calc(var(--bar-h) + 1.9rem);
    --row-b: calc(var(--dock-b) + var(--dock-h) + .35rem);
  }
  .hx__scene { inset-inline-start: 50%; }
  .hx__looks { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 99%), linear-gradient(180deg, transparent 0, #000 14%, #000 92%, transparent 99.4%); mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 99%), linear-gradient(180deg, transparent 0, #000 14%, #000 92%, transparent 99.4%); }
  .hx__decks, .hx__rail, .hx__arrow { display: none !important; }
  .hx__tag { font-size: .62rem; letter-spacing: .16em; }
  .hx__tag::before, .hx__tag::after { flex-basis: 1.5rem; }
  .hx__head { gap: .75rem; }
  .hx__row {
    display: block; position: absolute; z-index: 5; inset-inline: 0; inset-block-end: var(--row-b); block-size: var(--row-h);
  }
  .hx__row[hidden] { display: none; }
  .hx__row-list {
    display: flex; gap: .6rem; margin: 0; padding: .2rem var(--gx) .6rem; block-size: 100%; list-style: none; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: var(--gx);
    scrollbar-width: none; -webkit-overflow-scrolling: touch; align-items: stretch;
  }
  .hx__row-list::-webkit-scrollbar { display: none; }
  .hx__row .hx-slot { position: relative; inset: auto; flex: none; inline-size: calc(var(--row-h) * .6); transform: none !important; opacity: 1 !important; pointer-events: auto; scroll-snap-align: center; will-change: auto; z-index: auto; transition: none; }
  .hx__row .hx-swing { block-size: 100%; }
  .hx__row .hx-card { padding: .3rem .3rem .45rem; gap: .25rem; border-radius: var(--radius-lg); }
  .hx__row .hx-card__img { border-radius: var(--radius-md); }
  .hx__row .hx-card__name { display: block; font-size: .68rem; min-block-size: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: unset; }   /* small cards: one line, ellipsis (the full name is in the product bar below the selected card) */
  .hx__row .hx-card__price { font-size: .68rem; }
  .hx__row .hx-card__tick { inline-size: 1.35rem; block-size: 1.35rem; inset-block-start: .3rem; inset-inline-end: .3rem; }
  .hx__dock { inline-size: calc(100% - var(--gx) * 2); }
  .hx-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "thumb id price" "opts opts add"; align-items: center; gap: .45rem .7rem; padding: .55rem .65rem; border-radius: var(--radius-xl); min-block-size: 0; }
  .hx-bar__static { display: contents; }
  .hx-bar__thumb { grid-area: thumb; inline-size: 2.6rem; }
  .hx-bar__id { grid-area: id; }
  .hx-bar__price { grid-area: price; }
  .hx-bar__opts { grid-area: opts; display: flex; flex-wrap: nowrap; gap: .5rem; align-items: center; min-inline-size: 0; }
  .hx-opt.hx-colours { gap: 0; }
  .hx-sizes { gap: .25rem; }
  .hx-add { grid-area: add; min-block-size: 2.6rem; padding-inline: 1.05rem; }
  .hx-bar__name { font-size: .88rem; }
  .hx__ai { margin-top: .35rem; font-size: .64rem; }
}
@media (max-width: 47.99rem) {
  .hx { --ar: var(--ar-m); --box-cx: .5; }          /* phones use the portrait crop of the scene (a <source media="(max-width: 767px)">); tablets keep the landscape picture */
  .hx__tag > span { max-inline-size: 25ch; }
  .hx__ai { font-size: .62rem; }
  .hx-size { min-inline-size: 2rem; block-size: 2rem; font-size: .7rem; }
}
/* short phones (iPhone SE class, 320x568 / 360x640): the row shows photograph + name only, the cue goes, the tagline takes two lines; the model keeps its head clear of the headline */
@media (max-width: 47.99rem) and (max-height: 45rem) {
  .hx { --cue-h: 0px; --cue-b: .2rem; --row-h: 9.6rem; --dock-h: calc(var(--bar-h) + 2.1rem); --hl-fs: clamp(1.9rem, calc(var(--u) * 4.7), 2.6rem); }
  .hx__cue { display: none; }
  .hx__row .hx-card__price { display: none; }   /* photograph + name only (as the comment above says): with the price too, the name was squeezed to a 6px sliver and looked cut off; the price is in the product bar */
  .hx__tag { font-size: .58rem; letter-spacing: .12em; }
  .hx__tag > span { max-inline-size: 38ch; }

}
@media (max-width: 47.99rem) and (max-height: 37.5rem) {
  .hx { --row-h: 6.3rem; }
  .hx__row .hx-card__name, .hx__row .hx-card__price { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .hx__row .hx-card { padding: .3rem; }
}
@media (max-width: 23.99rem) {
  .hx { --dock-h: calc(var(--bar-h) + 3rem); }   /* the note wraps to two lines */
  .hx-bar { gap: .4rem .5rem; padding: .5rem .55rem; }
  .hx-add span { display: none; }
  .hx-add { padding-inline: .9rem; }
  .hx-sw { inline-size: 1.5rem; block-size: 1.5rem; }
}
/* narrower desktops: two cards per side (the third would not fit between the rail and the model) */
@media (min-width: 64rem) and (max-width: 82rem) {
  .hx-slot[data-d="2"] { display: none; }
  /* one large card + one small card per side: the small one stands further back (perspective makes it about 78% of the large one) and is separated by a clear step */
  .hx { --cw: clamp(6.75rem, min(calc(var(--u) * 17.5), 11.4vw), 12rem); --step: calc(var(--cw) * .98); --dz: calc(var(--cw) * 2.1); --ry-step: 12deg; --deck-w: calc(var(--cw) + var(--step)); }
  .hx__deck--l .hx-slot[data-d="1"] { translate: 0 .9rem; }
  .hx__deck--r .hx-slot[data-d="1"] { translate: 0 .9rem; }
}
/* tall or square windows: the model is height-bound, so give the deck a little more room */
@media (min-width: 82.01rem) and (max-aspect-ratio: 4 / 3) { .hx { --cw: clamp(7.25rem, min(calc(var(--u) * 19), 12vw), 14rem); } }

/* ---- reduced motion: nothing moves, nothing is hidden ---- */
@media (prefers-reduced-motion: reduce) {
  .hx__zoom, .hx__mouse i, .hx__cue-chev { animation: none; }
  .hx__look, .hx-slot, .hx-card, .hx__tool, .hx__arrow, .hx-add, .hx-size, .hx-sw::before { transition: none; }
  .hz-intro .hx:not(.is-in) [data-intro] { opacity: 1; animation: none; }
}
html.reduced-motion .hx__zoom, html.reduced-motion .hx__mouse i, html.reduced-motion .hx__cue-chev { animation: none; }
html.reduced-motion .hx__look, html.reduced-motion .hx-slot, html.reduced-motion .hx-card, html.reduced-motion .hx__tool, html.reduced-motion .hx__arrow, html.reduced-motion .hx-add, html.reduced-motion .hx-size { transition: none; }
html.reduced-motion .hx [data-intro] { opacity: 1 !important; animation: none !important; }

/* Appearance > 3D floating hero product OFF: the scene stops breathing (JS also skips the pointer depth, the deck swing and the card tilt). */
html[data-fx-hero3d="off"] .hx__zoom { animation: none; }

/* touch screens: the name link in the pinned-piece bar keeps its look; only its touch area grows */
@media (max-width: 63.99rem) { .hx-bar__name { padding-block: .65rem; margin-block: -.65rem; } }

/* common phones, 384-431px (iPhone 12 to 15 = 390/393, Pixel = 412): the "Add to bag" label is shown, so the colour dots and size chips share the row with it. They were 2rem each (tap-size pass) and the XL chip slid under the button; slightly tighter, still at least 28px. */
@media (min-width: 24rem) and (max-width: 26.99rem) {
  .hx-bar { column-gap: .5rem; }
  .hx-bar__opts { gap: .35rem; }
  .hx-sizes { gap: .2rem; }
  .hx-size, .hx-sw { min-inline-size: 1.9rem; inline-size: auto; block-size: 1.9rem; }
  .hx-sw { inline-size: 1.9rem; }
  .hx-add { padding-inline: .75rem; }
}

/* touch areas, second pass: the scroll cue is a real 44px-high target (it grows evenly around its centre, so the text does not move) and the colour dots and size chips are at least 30px on every phone */
.hx__cue { --cue-hit: max(var(--cue-h), 2.75rem); block-size: var(--cue-hit); inset-block-end: calc(var(--cue-b) - (var(--cue-hit) - var(--cue-h)) / 2); }
@media (max-width: 23.99rem) {
  .hx-bar__opts { gap: .4rem; }
  .hx-sizes { gap: .2rem; }
  .hx-sw, .hx-size { inline-size: auto; min-inline-size: 1.9rem; block-size: 1.9rem; }
  .hx-sw { inline-size: 1.9rem; }
}
