/* Brand page header: the animated "Landing Pages & More" scene. */
  /* ───────────────────────────────────────────────────────────────────────────
     Brand header. One responsive block: every size is a multiple of --u, the
     Figma frame's pixel (1728 × 1267.5). The wrapper is a size container, so
     the block scales with whatever column it is dropped into, not the window.
     It keeps the designed composition at every width, phones included.
     ─────────────────────────────────────────────────────────────────────────── */
  .bh-wrap { container-type: inline-size; width: 100%; background: #acc1b9; }
  /* On wide screens the scene also fits the window's height, so the whole composition (down to the
     phone, with the sage around it) shows without scrolling. The block is 1125 tall: about 100 above the headline and 110 below the phone. The page sets --bh-fit-h to the
     height left under its nav; the sage ground stays full width and the scene centres in it. */
  .bh { --u: min(100cqw / 1728, var(--bh-fit-h, 100vh) / 1125); --fw: 1728; position: relative;
    width: calc(var(--fw) * var(--u)); margin: 0 auto; height: calc(1125 * var(--u));
    background: #acc1b9; overflow: hidden; color: #1d2a25; }
  .bh * { box-sizing: border-box; }
  .bh img { display: block; max-width: none; }
  /* The pieces keep Figma's coordinates inside the scene; the scene itself sits 33 higher */
  .bh-scene { position: absolute; inset: 0; top: calc(-33 * var(--u)); }
  /* Everything sits 33 frame-px above Figma's layout (equal sage above the headline and below the phone); the headline is set at 116.25pt (Figma: 101.25), centred, its foot unchanged */
  .bh-headline { margin: 0; position: absolute; left: calc(322.7 * var(--u)); top: calc(105.9 * var(--u)); width: calc(1105.9 * var(--u)); }
  .bh-headline img { width: 100%; height: auto; }
  .bh-scroll { position: absolute; left: calc(824.42 * var(--u)); top: calc(259.06 * var(--u)); width: calc(113.6 * var(--u));
    height: calc(58 * var(--u)); display: block; }
  .bh-scroll img { position: absolute; }
  .bh-scroll .s-word { left: 0; top: 0; width: 100%; height: auto; }
  .bh-scroll .s-arrow { left: calc(45.25 * var(--u)); top: calc(27.24 * var(--u)); width: calc(23.76 * var(--u)); height: auto; } /* 80% of Figma's 29.7 */
  /* Phones: the same 116.25pt headline, and the block centred in the sage with 225 above the
     headline and 225 below the phone (13% of the width, the grey section's own top margin) */
  @container (max-width: 700px) {
    .bh { height: calc(1367 * var(--u)); }
    .bh-scene { top: calc(87 * var(--u)); }
    .bh-headline { left: calc(322.7 * var(--u)); top: calc(225 * var(--u)); width: calc(1105.9 * var(--u)); }
    .bh-scroll { top: calc(379 * var(--u)); }
    /* the selection handles' 6px floor reads huge at this scale: 30% smaller */
    .bh .sel i { width: 4.2px; }
  }

  .bh .bh-desk, .bh .bh-phone, .bh .bh-picker, .bh .bh-toolbar, .bh .bh-cursor { position: absolute; }
  .bh-desk { left: calc(392.91 * var(--u)); top: calc(378.15 * var(--u)); }
  .bh-phone { left: calc(1205.67 * var(--u)); top: calc(569.78 * var(--u)); }
  /* --tp: 0 = over the page (first play only), 1 = its designed spot */
  .bh-toolbar { --tx: 285; --ty: -102; --tp: 1; left: calc(405.3 * var(--u)); top: calc(1007.41 * var(--u)); transform-origin: 0 0;
    transform: translate(calc(var(--tx) * (1 - var(--tp)) * var(--u)), calc(var(--ty) * (1 - var(--tp)) * var(--u))) scale(calc(1.1307 * var(--tl, 1))); }
  .bh-picker { left: calc(290.88 * var(--u)); top: calc(568.64 * var(--u)); }

  /* Toolbar (Figma "Group 27") */
  .toolbar { display: flex; gap: calc(8.8 * var(--u)); }
  .tb-pill, .tb-btn { background: #fff; height: calc(34.14 * var(--u)); border: 0; padding: 0; flex: none; color: #000;
    -webkit-backdrop-filter: blur(calc(20.8 * var(--u))); backdrop-filter: blur(calc(20.8 * var(--u))); }
  .tb-pill { width: calc(102.5 * var(--u)); border-radius: calc(18.77 * var(--u)); padding-left: calc(16.4 * var(--u));
    display: flex; align-items: center; font: 400 calc(10.244 * var(--u)) / 1 "Wix Madefor Display", sans-serif; white-space: nowrap; }
  .tb-btn { width: calc(34.18 * var(--u)); border-radius: 50%; }
  .tb-btn svg { display: block; width: 100%; height: 100%; }

  /* Phone (Figma "mobile") */
  .phone { position: relative; width: calc(231 * var(--u)); height: calc(485.2 * var(--u)); }
  .phone > * { position: absolute; }
  /* Only the glass layer's soft shadow is kept: its white fill and rim showed as light lines down the phone's sides */
  .ph-glass { inset: 0; border-radius: calc(13.69 * var(--u));
    box-shadow: calc(-0.96 * var(--u)) calc(19.7 * var(--u)) calc(36.5 * var(--u)) calc(-2.96 * var(--u)) rgb(0 0 0 / .17); }
  .ph-bar { left: 0; top: 0; width: calc(231 * var(--u)); height: calc(60 * var(--u)); border-radius: calc(13.69 * var(--u));
    background: linear-gradient(to left, rgb(38 39 35) 33%, rgb(38 39 35 / .24));
    -webkit-backdrop-filter: blur(calc(3.42 * var(--u))); backdrop-filter: blur(calc(3.42 * var(--u)));
    box-shadow: inset 0 calc(0.86 * var(--u)) 0 rgb(249 249 249 / .45), calc(0.84 * var(--u)) calc(17.1 * var(--u)) calc(31.7 * var(--u)) rgb(0 0 0 / .17); }
  .ph-menu { left: calc(15.4 * var(--u)); top: calc(7.2 * var(--u)); width: calc(198.75 * var(--u)); }
  .ph-photo { left: 0; top: calc(39.2 * var(--u)); width: calc(230.9 * var(--u)); height: calc(446 * var(--u));
    border-radius: calc(13.69 * var(--u)); overflow: hidden; isolation: isolate; }
  .ph-photo img { position: absolute; left: calc(-396 * var(--u)); top: calc(-54.5 * var(--u));
    width: calc(770 * var(--u)); height: calc(526.7 * var(--u)); }
  .ph-card { left: 0; top: calc(304.5 * var(--u)); width: calc(231 * var(--u)); height: calc(180.6 * var(--u));
    border-radius: calc(13.69 * var(--u)); background: #fff; border: calc(0.38 * var(--u)) solid #c9c9c9; }
  .ph-text { left: calc(16.2 * var(--u)); top: calc(330.6 * var(--u)); width: calc(179 * var(--u)); }

  /* Colour picker (Figma "Color Input") */
  .picker { position: relative; width: calc(202.1 * var(--u)); height: calc(217.3 * var(--u)); background: #fff; overflow: hidden;
    border-radius: calc(14.78 * var(--u)); box-shadow: calc(0.93 * var(--u)) calc(19.05 * var(--u)) calc(35.25 * var(--u)) rgb(0 0 0 / .17);
    font-family: "Wix Madefor Text", sans-serif; color: #000624; }
  .picker > * { position: absolute; }
  .pk-area { left: 0; top: 0; width: 100%; height: calc(106.1 * var(--u));
    background: linear-gradient(184deg, var(--tint, rgb(246 244 224)) 15%, rgb(0 0 0 / .93) 98%); }
  .pk-cursor { left: calc(140.6 * var(--u)); top: calc(20.2 * var(--u)); width: calc(10.1 * var(--u)); aspect-ratio: 1;
    /* an inset ring keeps it a true circle at any scale; a border rounds each side separately */
    box-shadow: inset 0 0 0 calc(1.68 * var(--u)) #000624; border-radius: 50%; }
  .pk-hue { left: 0; top: calc(106.1 * var(--u)); width: 100%; height: calc(10.1 * var(--u));
    background: linear-gradient(to right, #f00, #ff00bb 18.7%, #2400ff 34.8%, #00e0ff 51.8%, #00ff07 69.1%, #ffdb00 84.9%, #f00); }
  .pk-knob { left: 0; top: calc(104.4 * var(--u)); width: calc(13.5 * var(--u)); height: calc(13.5 * var(--u)); border-radius: 50%; background: #fff;
    transform: translateX(calc(var(--knob, 56.9) * var(--u)));
    box-shadow: 0 calc(1.68 * var(--u)) calc(0.84 * var(--u)) rgb(0 6 36 / .48), 0 0 calc(2.53 * var(--u)) rgb(0 6 36 / .12); }
  .pk-input { left: calc(15.1 * var(--u)); top: calc(126.3 * var(--u)); width: calc(136.4 * var(--u)); height: calc(25.3 * var(--u));
    border: calc(0.84 * var(--u)) solid #d6e6fe; border-radius: calc(5.05 * var(--u)); padding-left: calc(10.2 * var(--u));
    display: flex; align-items: center; font-size: calc(11.79 * var(--u)); font-variant-numeric: tabular-nums; }
  .pk-add, .pk-x, .pk-ok { width: calc(25.3 * var(--u)); height: calc(25.3 * var(--u)); display: grid; place-items: center; }
  .pk-add { left: calc(161.7 * var(--u)); top: calc(126.3 * var(--u)); background: rgb(232 230 211);
    border: calc(0.84 * var(--u)) solid rgb(8 78 189 / .24); border-radius: calc(5.05 * var(--u)); }
  .pk-x { left: calc(126.3 * var(--u)); top: calc(176.9 * var(--u)); border: calc(0.84 * var(--u)) solid #116dff; border-radius: 50%; }
  .pk-ok { left: calc(161.7 * var(--u)); top: calc(176.9 * var(--u)); background: #116dff; border-radius: 50%;
    transition: transform .12s ease, background-color .12s ease; }
  .pk-ok[data-pressed] { transform: scale(.9); background: #0f5fe0; }
  .pk-add svg { width: calc(7.58 * var(--u)); height: calc(7.58 * var(--u)); }
  .pk-x svg { width: calc(6.27 * var(--u)); height: calc(6.27 * var(--u)); }
  .pk-ok svg { width: calc(7.11 * var(--u)); height: calc(5.71 * var(--u)); }

  /* Desktop landing page (Figma "Desktop") */
  .desk { position: relative; width: calc(928.1 * var(--u)); height: calc(599.6 * var(--u)); }
  .desk > *, .dk-panel > * { position: absolute; }
  .dk-frame { inset: 0; border-radius: calc(26.7 * var(--u));
    background: rgb(255 255 255 / .4); border: calc(1.1 * var(--u)) solid rgb(255 255 255 / .4);
    -webkit-backdrop-filter: blur(calc(2.56 * var(--u))); backdrop-filter: blur(calc(2.56 * var(--u)));
    box-shadow: calc(-0.93 * var(--u)) calc(19.05 * var(--u)) calc(35.25 * var(--u)) calc(-2.86 * var(--u)) rgb(0 0 0 / .17); }
  .dk-panel { overflow: hidden; }
  .dk-hero { left: calc(12.4 * var(--u)); top: calc(12.4 * var(--u)); width: calc(366.1 * var(--u)); height: calc(574.6 * var(--u));
    border-radius: calc(15.2 * var(--u)) 0 0 calc(15.2 * var(--u)); }
  .dk-hero img { left: calc(-198.8 * var(--u)); top: calc(-4.4 * var(--u)); width: calc(600.4 * var(--u)); height: calc(611.3 * var(--u)); }
  .dk-cream { left: calc(378.4 * var(--u)); top: calc(350.5 * var(--u)); width: calc(267.9 * var(--u)); height: calc(236.6 * var(--u)); background: rgb(231 229 210); }
  .dk-white { left: calc(646.3 * var(--u)); top: calc(350.5 * var(--u)); width: calc(267.9 * var(--u)); height: calc(236.6 * var(--u)); background: #fff; }
  /* Trimmed to the panels around it: Figma's mask ran 1.4px into the hero and 1.2px past and 0.8px over the cards below */
  .dk-photo { left: calc(378.5 * var(--u)); top: calc(12.4 * var(--u)); width: calc(535.7 * var(--u)); height: calc(338.1 * var(--u));
    border-radius: 0 calc(15.2 * var(--u)) 0 0; }
  .dk-photo img { left: calc(var(--px, -10.9) * var(--u)); top: calc(var(--py, 0) * var(--u)); width: calc(561.9 * var(--u)); height: calc(372.5 * var(--u)); object-fit: cover; }
  /* The bottle's lavender label band, masked out of a second copy so it turns with the satin */
  .dk-label { -webkit-mask: url(../images/brand/parts/desk-bottle-label-mask.png) 0 0 / 100% 100% no-repeat;
    mask: url(../images/brand/parts/desk-bottle-label-mask.png) 0 0 / 100% 100% no-repeat; }
  .dk-veil { left: calc(12.4 * var(--u)); top: calc(12.4 * var(--u)); width: calc(903.1 * var(--u)); height: calc(574.6 * var(--u));
    border-radius: calc(15.2 * var(--u)); border: calc(1.05 * var(--u)) solid rgb(255 255 255 / .4);
    background: linear-gradient(22deg, rgb(0 0 0 / .2), transparent 30%); pointer-events: none; }
  .dk-dot { width: calc(5.7 * var(--u)); height: calc(5.7 * var(--u)); border-radius: 50%; background: #fff; }
  .dk-title { left: calc(51.55 * var(--u)); top: calc(81.83 * var(--u)); width: calc(152.84 * var(--u)); }
  .dk-menu { left: calc(32.65 * var(--u)); top: calc(33.72 * var(--u)); width: calc(17.27 * var(--u)); }
  .dk-card-title { left: calc(418.62 * var(--u)); top: calc(409 * var(--u)); width: calc(185.82 * var(--u)); }
  .dk-shop { left: calc(417.22 * var(--u)); top: calc(493.71 * var(--u)); width: calc(63.15 * var(--u)); }
  .dk-body { left: calc(688.33 * var(--u)); top: calc(407.79 * var(--u)); width: calc(157.83 * var(--u)); }

  /* ── The story's own layers ─────────────────────────────────────────────── */

  /* The satin and the phone's lavender are recoloured in place by hue only;
     the bottle and the leaf are separate layers and keep their colour. */
  .bh .hue { filter: hue-rotate(var(--hue, 0deg)); }

  /* Entrance (once) and drift (always). Both use `translate`, so they compose
     with each piece's own transform (the toolbar's scale and drop, the compact
     desk's scale). Drifts are small and out of phase, so the composition reads
     as designed while never sitting dead still. */
  .bh .bh-piece { --fx: 0; --fy: -5; --fd: 7s; --d: 0s; }
  .bh .bh-desk { --fy: -5; --fd: 7.4s; --d: 0s; }
  .bh .bh-phone { --fy: -10; --fd: 5.6s; --d: .14s; }
  .bh .bh-picker { --fx: 3; --fy: -8; --fd: 4.8s; --d: .26s; }
  .bh .bh-toolbar { --fx: -2; --fy: -8; --fd: 6.2s; --d: .38s; }
  /* While the hand holds it, the toolbar stops drifting so it stays put under the cursor */
  .bh[data-in] .bh-toolbar[data-lifted] { animation-play-state: running, paused; }
  .bh-js .bh:not([data-in]) .bh-piece { opacity: 0; }
  .bh[data-in] .bh-piece { animation: bh-in .95s cubic-bezier(.25, .8, .25, 1) var(--d) both,
    bh-float var(--fd) ease-in-out calc(var(--d) + .95s) infinite; }
  @keyframes bh-in {
    from { opacity: 0; translate: 0 calc(42 * var(--u)); }
    35% { opacity: 1; }
    to { opacity: 1; translate: 0 0; }
  }
  @keyframes bh-float {
    0%, 100% { translate: 0 0; }
    50% { translate: calc(var(--fx) * var(--u)) calc(var(--fy) * var(--u)); }
  }
  /* A held toolbar lifts a little */
  .bh .bh-toolbar { transition: filter .2s ease; }
  .bh .bh-toolbar[data-lifted] { --tl: 1.03; filter: drop-shadow(0 calc(10 * var(--u)) calc(14 * var(--u)) rgb(0 0 0 / .18)); }

  /* Selection: the editor's blue frame, every edge visible, a handle on each
     corner. A rounded corner's handle sits on the arc (r × 0.293 in), never in
     the air beside it. Only one selection shows at a time. */
  .sel { pointer-events: none; opacity: 0; transition: opacity .16s ease;
    box-shadow: 0 0 0 max(1px, calc(1.6 * var(--u))) #116dff; --r: calc(15.2 * var(--u)); --k: calc(15.2 * .293 * var(--u)); }
  .sel-hero { left: calc(12.4 * var(--u)); top: calc(12.4 * var(--u)); width: calc(366.1 * var(--u)); height: calc(574.6 * var(--u));
    border-radius: var(--r) 0 0 var(--r); }
  .sel-photo { left: calc(378.5 * var(--u)); top: calc(12.4 * var(--u)); width: calc(535.7 * var(--u)); height: calc(338.1 * var(--u));
    border-radius: 0 var(--r) 0 0; }
  .sel i { position: absolute; width: max(6px, calc(9 * var(--u))); aspect-ratio: 1;
    border-radius: 50%; background: #fff; box-shadow: 0 0 0 max(1px, calc(1.6 * var(--u))) #116dff;
    translate: -50% -50%; transition: opacity .16s ease; }
  .sel i:nth-child(1) { left: 0; top: 0; }
  .sel i:nth-child(2) { left: 100%; top: 0; }
  .sel i:nth-child(3) { left: 0; top: 100%; }
  .sel i:nth-child(4) { left: 100%; top: 100%; }
  .sel-hero i:nth-child(1) { left: var(--k); top: var(--k); }
  .sel-hero i:nth-child(3) { left: var(--k); top: calc(100% - var(--k)); }
  .sel-photo i:nth-child(2) { left: calc(100% - var(--k)); top: var(--k); }
  .sel[data-state="hover"] { opacity: .5; }
  .sel[data-state="hover"] i { opacity: 0; }
  .sel[data-state="on"] { opacity: 1; }

  /* Hex readout */
  .pk-val { display: block; flex: 1; line-height: 1.3; }

  /* The cursor: macOS arrow, open hand and closed hand (stageshow kit glyphs),
     each placed so its hotspot is the point. Between 20 and 28px on any screen. */
  .bh-cursor { --csz: clamp(20px, calc(34 * var(--u)), 28px); --k: calc(var(--csz) / 24); left: 0; top: 0; width: 0; height: 0; z-index: 5;
    pointer-events: none; opacity: 0; transition: opacity .3s ease;
    transform: translate(calc(var(--cx, 900) * var(--u)), calc(var(--cy, 1100) * var(--u))); }
  .bh[data-cursor] .bh-cursor { opacity: 1; }
  .bh-cursor svg { position: absolute; display: block; opacity: 0; transition: opacity .08s linear, scale .1s ease;
    filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / .25)); }
  .bh-cursor .c-arrow { width: calc(24 * var(--k)); height: calc(24 * var(--k)); left: calc(-7.5 * var(--k)); top: calc(-5.25 * var(--k)); transform-origin: calc(7.5 * var(--k)) calc(5.25 * var(--k)); }
  .bh-cursor .c-open { width: calc(26 * var(--k)); height: calc(26 * var(--k)); left: calc(-11.7 * var(--k)); top: calc(-10.4 * var(--k)); transform-origin: calc(11.7 * var(--k)) calc(10.4 * var(--k)); }
  .bh-cursor .c-grab { width: calc(30 * var(--k)); height: calc(30 * var(--k)); left: calc(-12 * var(--k)); top: calc(-12 * var(--k)); transform-origin: calc(12 * var(--k)) calc(12 * var(--k)); }
  .bh-cursor:not([data-kind]) .c-arrow, .bh-cursor[data-kind="open"] .c-open, .bh-cursor[data-kind="grab"] .c-grab { opacity: 1; }
  .bh-cursor[data-pressed] svg { scale: .88; }


  @media (prefers-reduced-motion: reduce) {
    .bh-cursor, .sel { display: none; }
  }
