/* =============================================================================
   X3WEB — Christmas decorations
   -----------------------------------------------------------------------------
   Loaded only while X3_XMAS is true in config.php (includes/header.php); the
   pieces themselves are drawn by assets/js/x3-xmas.js. Set X3_XMAS to false
   and every decoration is gone from every page.

   Overlays only. Every piece is an aria-hidden element with position:absolute
   (the snow: fixed) and pointer-events:none, laid over the page: no text,
   image, colour, button or layout of the site is changed, and nothing moves.

     1. Festive colours (this file only)
     2. Header: snow-capped edge, pine garland, string of lights, Santa hat
     3. Hero and large photographs: decorated corners, a tree with presents
     4. Portfolio tiles and cards: a corner piece on every one
     5. Section eyebrows: holly and a small bauble on the orange line
     6. Footer: lights along the top edge, a snowy tree with presents
     7. Snowfall over the page
     8. Motion: gentle sway, twinkle and fall (transforms and opacity only),
        all of it off under reduced motion
   ============================================================================= */


/* ── 1. Festive colours ────────────────────────────────────────────────────── */

/* Deep green, red and gold beside the brand orange, for these decorations
   only; the site's own tokens are untouched. */
.x3x {
  --x3x-g1: #1d4a31;
  --x3x-g2: #27603f;
  --x3x-g3: #367a50;
  --x3x-tex: #4f9466;
  --x3x-sage: #7f9b57;
  --x3x-sage2: #9cb571;
  --x3x-sage3: #627d42;
  --x3x-stem: #6b7d46;
  --x3x-red: #c0272d;
  --x3x-red2: #8e1820;
  --x3x-gold: #d6aa48;
  --x3x-gold2: #a8822f;
  --x3x-cream: #faf6ea;
  --x3x-warm: #fff2c6;
  --x3x-trunk: #6e4a2e;
  --x3x-fur: #fbf8f1;
  --x3x-orange: var(--accent, #ff5500);
  /* the lights */
  --x3x-lred: #e3343c;
  --x3x-lgold: #f6c344;
  --x3x-lgreen: #37b062;
  --x3x-lwarm: #fff3c9;

  pointer-events: none;
  user-select: none;
}
.x3x svg { display: block; overflow: visible; }

.x3x .x3x-f-g1 { fill: var(--x3x-g1); }
.x3x .x3x-f-g2 { fill: var(--x3x-g2); }
.x3x .x3x-f-g3 { fill: var(--x3x-g3); }
.x3x .x3x-f-sage { fill: var(--x3x-sage); }
.x3x .x3x-f-sage2 { fill: var(--x3x-sage2); }
.x3x .x3x-f-sage3 { fill: var(--x3x-sage3); }
.x3x .x3x-f-red { fill: var(--x3x-red); }
.x3x .x3x-f-red2 { fill: var(--x3x-red2); }
.x3x .x3x-f-gold { fill: var(--x3x-gold); }
.x3x .x3x-f-gold2 { fill: var(--x3x-gold2); }
.x3x .x3x-f-green { fill: var(--x3x-g3); }
.x3x .x3x-f-orange { fill: var(--x3x-orange); }
.x3x .x3x-f-cream { fill: var(--x3x-cream); }
.x3x .x3x-f-warm { fill: var(--x3x-warm); }
.x3x .x3x-f-glow { fill: var(--x3x-warm); opacity: 0.45; }
.x3x .x3x-f-trunk { fill: var(--x3x-trunk); }
.x3x .x3x-f-fur { fill: var(--x3x-fur); }
.x3x .x3x-f-furshade { fill: #d9d2c3; opacity: 0.55; }
.x3x .x3x-f-snow { fill: #fff; }
.x3x .x3x-f-snowshade { fill: #d6dee7; }
.x3x .x3x-f-shade { fill: #000; opacity: 0.14; }
.x3x .x3x-edge { stroke: var(--x3x-gold2); stroke-width: 0.6; }
.x3x .x3x-vein { fill: none; stroke: #fff; stroke-opacity: 0.22; stroke-width: 0.8; stroke-linecap: round; }
.x3x .x3x-stem { fill: none; stroke: var(--x3x-stem); stroke-width: 1.4; stroke-linecap: round; }
.x3x .x3x-berry { fill: var(--x3x-cream); stroke: #cfc6ad; stroke-width: 0.6; }
.x3x .x3x-s-gold { fill: none; stroke: var(--x3x-gold); stroke-width: 1.1; stroke-linecap: round; }
.x3x .x3x-s-cream { fill: none; stroke: var(--x3x-cream); stroke-width: 1.1; stroke-linecap: round; }
.x3x .x3x-s-thread { fill: none; stroke: var(--x3x-gold2); stroke-width: 0.9; }
.x3x .x3x-wire { fill: none; stroke: var(--x3x-g1); stroke-width: 1.2; }

/* Light bulbs and their glow. */
.x3x .x3x-l-red { fill: var(--x3x-lred); }
.x3x .x3x-l-gold { fill: var(--x3x-lgold); }
.x3x .x3x-l-green { fill: var(--x3x-lgreen); }
.x3x .x3x-l-orange { fill: var(--x3x-orange); }
.x3x .x3x-l-warm { fill: var(--x3x-lwarm); stroke: var(--x3x-gold); stroke-width: 0.5; }
.x3x .x3x-glow { opacity: 0.32; }
.x3x .x3x-glow--red { fill: var(--x3x-lred); }
.x3x .x3x-glow--gold { fill: var(--x3x-lgold); }
.x3x .x3x-glow--green { fill: var(--x3x-lgreen); }
.x3x .x3x-glow--orange { fill: var(--x3x-orange); }
.x3x .x3x-glow--warm { fill: #ffd86b; }

/* The shared gradient and snowflake (a 0×0 <svg> the script adds once). Not
   display:none, which would switch them off in some browsers. */
.x3x-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* A host that is not positioned already gets position:relative, so the
   overlay sits on it. No offsets: nothing moves. */
.x3x-host { position: relative; }

/* A piece the script found would touch the content (see the end of
   x3-xmas.js) is left out. */
.x3x-off { display: none !important; }


/* ── 2. Header ─────────────────────────────────────────────────────────────── */

/* Everything here sits under the header's own menus and the phone menu
   panel, which have a higher z-index inside the header. */

/* Snow lying along the bottom edge of the bar, a few px of drips below it. */
.x3x-snowcap {
  position: absolute;
  top: calc(100% - 7px);
  left: 0;
  right: 0;
  z-index: 1;
  height: 11px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 11'%3E%3Cpath fill='%23fff' d='M0 0H120V5.2C116 5.2 115 8.6 111.5 8.4C108.5 8.2 108.4 5.6 104 5.8C100 6 99.6 10.6 96 10.4C92.6 10.2 93.4 6.2 88 6.2C83 6.2 82.6 8 78 7.8C74 7.6 73.8 5.4 69 5.6C64.6 5.8 64.4 9.4 60.6 9.2C57 9 57.6 6 52 6C47 6 46.4 8.2 42 8C38 7.8 37.6 5.2 33 5.4C28.6 5.6 28.6 10.8 24.6 10.6C21 10.4 21.6 6.4 16 6.2C11 6 10.6 8.4 6.4 8.2C3 8 2.6 5.2 0 5.2Z'/%3E%3C/svg%3E") repeat-x 0 0 / 120px 11px;
  filter: drop-shadow(0 1px 1px rgb(28 28 25 / 0.16));
}

/* At the top of the page: a full pine garland hanging from the bar, over
   the hero's empty top padding, with lights, bows and baubles. Once the
   page scrolls it lifts away, so nothing hangs over the text, fields or
   buttons passing beneath; the string of lights below takes its place. */
.x3x-garland {
  --x3x-swag: 140px;     /* one scallop */
  --x3x-ball: calc(var(--x3x-swag) * 0.1125);
  position: absolute;
  top: calc(100% - 4px - var(--x3x-swag) * 0.075);
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  height: calc(var(--x3x-swag) * 0.4);
  overflow: hidden;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0s;
}
@media (min-width: 1280px)    { .x3x-garland { --x3x-swag: 160px; } }
@media (max-width: 767.98px)  { .x3x-garland { --x3x-swag: 100px; } }
/* Only where the bar is sticky (768px and up). Below that the bar scrolls
   away with the page, so the garland simply stays with it. */
@media (min-width: 768px) {
  .site-header.is-scrolled .x3x-garland {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-14px);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s;
  }
}

.x3x-swag {
  position: relative;
  flex: none;
  width: var(--x3x-swag);
  height: calc(var(--x3x-swag) * 46 / 160);
}
.x3x-swag > svg { width: 100%; height: 100%; }
.x3x .x3x-rope { fill: none; stroke: var(--x3x-g1); stroke-width: 7.4; stroke-linecap: round; }
.x3x .x3x-rope--fringe { stroke: var(--x3x-g2); stroke-width: 10; stroke-dasharray: 0.5 1.3; }
.x3x .x3x-rope--tex { stroke: var(--x3x-tex); stroke-dasharray: 0.6 2.2; }
.x3x .x3x-rope--tex2 { stroke: var(--x3x-g3); stroke-width: 4.4; stroke-dasharray: 0.7 1.7; stroke-dashoffset: 1; }
.x3x .x3x-thread { fill: none; stroke: var(--x3x-gold); stroke-width: 1; stroke-dasharray: 3 2.2; }

/* The bauble under each scallop, on a short gold thread. */
.x3x-bob {
  position: absolute;
  top: calc(var(--x3x-swag) * 0.155);
  left: 50%;
  width: var(--x3x-ball);
  height: calc(var(--x3x-len, 6px) + var(--x3x-ball) * 1.25);
  margin-left: calc(var(--x3x-ball) / -2);
  transform-origin: 50% 0;
}
.x3x-bob::before,
.x3x-hang::before {
  content: '';
  position: absolute;
  top: 0;
  left: calc(50% - 0.5px);
  width: 1px;
  height: calc(var(--x3x-len, 6px) + 2px);
  background: var(--x3x-gold2);
}
.x3x-bob > svg {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: calc(var(--x3x-ball) * 1.25);
}

/* Once scrolled (768px and up, where the bar is sticky): a string of lights
   inside the bar's empty bottom strip, below the buttons. */
.x3x-hlights {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  z-index: 2;
  display: flex;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.35s ease;
}
@media (min-width: 768px) { .site-header.is-scrolled .x3x-hlights { opacity: 1; } }

.x3x-lstring { display: block; flex: none; }
.x3x-lstring > svg { width: 100%; height: 100%; }

/* A Santa hat on the X3 mark, tipped onto its top-left corner. */
.x3x-hat {
  position: absolute;
  top: -19px;
  left: -13px;
  z-index: 1;
  width: 30px;
  transform: rotate(-14deg);
  transform-origin: 40% 90%;
  filter: drop-shadow(0 2px 2px rgb(28 28 25 / 0.2));
}
@media (max-width: 767.98px) { .x3x-hat { top: -16px; left: -10px; width: 25px; } }


/* ── 3. Hero and the large photographs ─────────────────────────────────────── */

/* A set hangs from a top corner: the holly-and-bow cluster in the corner,
   and baubles, a star and mistletoe on threads from the top edge. All sizes
   scale with --x3x-k. Inside the photograph, which clips it. */
.x3x-set {
  --x3x-k: 1;
  position: absolute;
  top: 0;
  z-index: 1;
  width: calc(320px * var(--x3x-k));
  height: calc(160px * var(--x3x-k));
}
.x3x-set--r { right: 0; }
.x3x-set--l { left: 0; }
.x3x-set > * { filter: drop-shadow(0 4px 6px rgb(28 28 25 / 0.28)); }

.x3x-set--hero { --x3x-k: 0.68; }
@media (min-width: 640px)  { .x3x-set--hero { --x3x-k: 0.85; } }
@media (min-width: 1024px) {
  .x3x-set--hero { --x3x-k: 1; }
  /* Clear of the fade on the photograph's left edge. */
  .x3x-set--hero.x3x-set--l { left: 10%; }
}
@media (min-width: 1280px) { .x3x-set--hero { --x3x-k: 1.12; } }

.x3x-set--photo { --x3x-k: 0.7; }
@media (min-width: 900px) { .x3x-set--photo { --x3x-k: 0.9; } }

.x3x-corner {
  position: absolute;
  top: 0;
  width: calc(108px * var(--x3x-k));
  aspect-ratio: 100 / 80;
  transform-origin: 90% 10%;
}
.x3x-set--r .x3x-corner { right: 0; }
.x3x-set--l .x3x-corner { left: 0; transform-origin: 10% 10%; }
.x3x-corner > svg { width: 100%; height: 100%; }
.x3x-set--l .x3x-corner > svg { transform: scaleX(-1); }

/* One ornament on its thread. */
.x3x-hang {
  position: absolute;
  top: 0;
  width: calc(var(--x3x-w) * var(--x3x-k));
  height: calc((var(--x3x-len) + var(--x3x-w) * 1.25) * var(--x3x-k));
  transform-origin: 50% 0;
}
.x3x-set--r .x3x-hang { right: calc(var(--x3x-x) * var(--x3x-k)); }
.x3x-set--l .x3x-hang { left: calc(var(--x3x-x) * var(--x3x-k)); }
.x3x-hang::before {
  left: calc(50% - 0.75px);
  width: 1.5px;
  height: calc(var(--x3x-len) * var(--x3x-k) + 2px);
}
.x3x-hang > svg {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: calc(var(--x3x-w) * 1.25 * var(--x3x-k));
}
/* Mistletoe hangs on a red ribbon. */
.x3x-hang--mist { height: calc((var(--x3x-len) + var(--x3x-w) * 70 / 60) * var(--x3x-k)); }
.x3x-hang--mist::before {
  left: calc(50% - 1.5px);
  width: 3px;
  background: linear-gradient(to right, var(--x3x-red2), var(--x3x-red) 45%, var(--x3x-red2));
}
.x3x-hang--mist > svg { height: calc(var(--x3x-w) * 70 / 60 * var(--x3x-k)); }

/* The outer ornaments only where the photograph is wide enough for both
   sets to stay apart. */
.x3x-hang--wide,
.x3x-hang--xwide { display: none; }
@media (min-width: 640px) and (max-width: 1023.98px) {
  .x3x-hang--wide,
  .x3x-hang--xwide { display: block; }
}
@media (min-width: 1280px) { .x3x-hang--wide { display: block; } }
@media (min-width: 1400px) { .x3x-hang--xwide { display: block; } }
.x3x-set--photo .x3x-hang--wide { display: none; }
@media (min-width: 900px) { .x3x-set--photo .x3x-hang--wide { display: block; } }

/* A snowy tree with presents in the hero photograph's bottom corner, away
   from the "Meet …" card (bottom-left on phones and tablets, bottom-right
   on desktops). */
.x3x-gifts {
  position: absolute;
  right: 3%;
  bottom: 0;
  z-index: 1;
  width: 96px;
  aspect-ratio: 92 / 82;
}
@media (min-width: 640px)  { .x3x-gifts { width: 116px; } }
@media (min-width: 1024px) { .x3x-gifts { right: auto; left: 11%; width: 132px; } }
@media (min-width: 1280px) { .x3x-gifts { width: 148px; } }
.x3x-gifts > svg,
.x3x-ftree > svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 6px rgb(28 28 25 / 0.22)); }


/* ── 4. Every card ─────────────────────────────────────────────────────────── */

/* A big piece over the card's top-left corner, mostly outside the card: above it and to its left. Inside the
   card it reaches only a thin strip along the top and left edges, clear of
   the words of the orange case-study pill and of every title and icon; the
   script leaves out any piece that would touch text (end of x3-xmas.js). */
.x3x-cp {
  --x3x-S: 60px;     /* the drawing's width; the card's corner is at 60% across, 61% down */
  --x3x-W: calc(var(--x3x-S) * var(--x3x-f, 1));   /* --x3x-f: smaller where space is short */
  position: absolute;
  top: calc(var(--x3x-W) * -0.6286 + var(--x3x-ny, 0px));
  left: calc(var(--x3x-W) * -0.6 + var(--x3x-nx, 0px));
  z-index: 3;
  width: var(--x3x-W);
  height: calc(var(--x3x-W) * 72 / 70);
  transform-origin: 60% 61%;
  filter: drop-shadow(0 3px 4px rgb(28 28 25 / 0.3));
}
.x3x-cp > svg { width: 100%; height: 100%; }
/* On a picture card (portfolio, blog, case study) the piece is larger. */
.x3x-cp--img { --x3x-S: 76px; }
@media (min-width: 640px) {
  .x3x-cp      { --x3x-S: 76px; }
  .x3x-cp--img { --x3x-S: 96px; }
}
@media (min-width: 1024px) {
  .x3x-cp      { --x3x-S: 92px; }
  .x3x-cp--img { --x3x-S: 116px; }
}

/* Placed on the card's corner from its grid (cards that clip). It fades in
   with its card and lifts with it on hover. */
.x3x-cp--out {
  top: calc(var(--x3x-cy, 0px) - var(--x3x-W) * 0.6286 + var(--x3x-ny, 0px));
  left: calc(var(--x3x-cx, 0px) - var(--x3x-W) * 0.6 + var(--x3x-nx, 0px));
  transition: opacity 0.7s ease, translate 0.35s ease;
}
html.x3-rv [data-rv]:not(.is-in) + .x3x-cp--out { opacity: 0; }
.x3-work__item:hover + .x3x-cp--out,
a.x3-crew:hover + .x3x-cp--out,
.x3-card:has(a[href]):hover + .x3x-cp--out { translate: 0 -3px; }


/* ── 5. Section eyebrows ───────────────────────────────────────────────────── */

/* On the orange line before an eyebrow: holly at its start and a small
   bauble hanging from it, both clear of the eyebrow's words. */
.x3x-brow {
  position: absolute;
  top: calc(50% - 9px);
  left: -7px;
  z-index: 1;
  width: 40px;
  height: 26px;
  transform-origin: 30% 35%;
}
.x3x-brow > svg { width: 100%; height: 100%; }


/* ── 5b. Section bands ─────────────────────────────────────────────────────── */

/* A pine garland along a band's top edge (the knots just above it), with
   baubles on the reviews and portfolio bands, in the band's top padding. */
.x3x-rowg {
  --x3x-swag: 110px;
  --x3x-ball: calc(var(--x3x-swag) * 0.1125);
  position: absolute;
  top: calc(var(--x3x-swag) * -0.075);
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  height: calc(var(--x3x-swag) * 0.27);
  overflow: hidden;
}
.x3x-rowg--bobs { height: calc(var(--x3x-swag) * 0.4); }
@media (min-width: 1280px)   { .x3x-rowg { --x3x-swag: 140px; } }
@media (max-width: 767.98px) { .x3x-rowg { --x3x-swag: 90px; } }

/* A string of lights along a band's top edge. */
.x3x-rowl {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

/* Corner sets in a band's top corners, in line with its content; the script
   sizes them (--x3x-k) to stay inside the band's top padding. */
.x3x-set--band { z-index: 3; }
.x3x-set--band.x3x-set--l { left: var(--pad-x, 1.375rem); }
.x3x-set--band.x3x-set--r { right: var(--pad-x, 1.375rem); }
.x3x-set--band .x3x-hang--wide { display: none; }
@media (min-width: 1100px) { .x3x-set--band .x3x-hang--wide { display: block; } }


/* ── 6. Footer ─────────────────────────────────────────────────────────────── */

/* Lights along the footer's top edge, in its empty top padding. */
.x3x-flights {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

/* The tree: on a drift of snow in the footer's top padding (--x3x-base above
   its first line), at the right-hand end of the content column, rising into
   the empty bottom padding of the block above. Sized by the script. */
.x3x-ftree {
  position: absolute;
  bottom: calc(100% - var(--x3x-base, 0px));
  right: calc(var(--pad-x, 1.5rem) + max(0px, (100% - 2 * var(--pad-x, 1.5rem) - var(--content, 90rem)) / 2));
  z-index: 2;
  width: var(--x3x-tw, 120px);
  height: calc(var(--x3x-tw, 120px) * 82 / 92);
}


/* ── 7. Snowfall ───────────────────────────────────────────────────────────── */

/* Fixed to the screen, under the header (200), the phone bar and floating
   button (150), the cookie banner (160) and the pop-ups. Each flake is a
   small layer of its own that falls one screen height by a transform. */
.x3x-snowfall {
  position: fixed;
  inset: 0;
  z-index: 140;
  overflow: hidden;
  contain: strict;
}
.x3x-flake {
  position: absolute;
  top: -18px;
  left: var(--x3x-x);
  width: var(--x3x-s);
  height: var(--x3x-s);
}
.x3x-flake > i,
.x3x-flake > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: var(--x3x-o);
}
/* A soft white dot with a faint edge, so it shows on the light blocks too. */
.x3x-flake > i {
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 38%, rgb(255 255 255 / 0.9) 48%, rgb(90 110 130 / 0.3) 58%, rgb(90 110 130 / 0) 70%);
}
/* A big soft flake. */
.x3x-flake--soft > i {
  background: radial-gradient(circle, rgb(255 255 255 / 0.95) 0 24%, rgb(255 255 255 / 0.6) 46%, rgb(140 160 180 / 0.24) 60%, rgb(140 160 180 / 0) 72%);
}


/* ── 8. Motion ─────────────────────────────────────────────────────────────── */

@keyframes x3x-sway {
  from { transform: rotate(calc(var(--x3x-a, 6deg) * -1)); }
  to   { transform: rotate(var(--x3x-a, 6deg)); }
}
@keyframes x3x-hat {
  from { transform: rotate(-16deg); }
  to   { transform: rotate(-11deg); }
}
@keyframes x3x-twinkle {
  from { opacity: 0.45; transform: scale(0.86); }
  to   { opacity: 1;    transform: scale(1.05); }
}
@keyframes x3x-shine {
  from { opacity: 0.8; transform: scale(0.9); }
  to   { opacity: 1;   transform: scale(1.08); }
}
@keyframes x3x-fall {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, calc(100vh + 36px), 0); }
}
@keyframes x3x-drift {
  from { transform: translateX(calc(var(--x3x-dx) * -1)) rotate(0deg); }
  to   { transform: translateX(var(--x3x-dx)) rotate(var(--x3x-rot, 0deg)); }
}

/* No fade-ins: every piece is visible from the first paint, so nothing
   depends on an animation running (a background tab, a screenshot). */
@media (prefers-reduced-motion: no-preference) {
  .x3x-bob,
  .x3x-hang,
  .x3x-corner,
  .x3x-cp,
  .x3x-brow {
    animation: x3x-sway var(--x3x-t, 4s) ease-in-out var(--x3x-d, 0s) infinite alternate;
  }
  .x3x-bob    { --x3x-a: 7deg; }
  .x3x-hang   { --x3x-a: 4deg; }
  .x3x-hang--mist { --x3x-a: 2.5deg; }
  .x3x-corner { --x3x-a: 1.5deg; --x3x-t: 6s; }
  .x3x-cp     { --x3x-a: 2deg; --x3x-t: 5.4s; }
  .x3x-brow   { --x3x-a: 3deg; --x3x-t: 4.6s; }
  .x3x-hat { animation: x3x-hat 3.2s ease-in-out infinite alternate; }

  /* The lights, the tree's baubles and its star. */
  .x3x-bulb,
  .x3x-orns > *,
  .x3x-star {
    transform-box: fill-box;
    transform-origin: center;
    animation: x3x-twinkle 2.2s ease-in-out var(--x3x-d, 0s) infinite alternate;
  }
  .x3x-bulb { transform-origin: 50% 0; }
  .x3x-bulb--1 { animation-delay: calc(var(--x3x-d, 0s) - 0.7s); animation-duration: 2.6s; }
  .x3x-bulb--2 { animation-delay: calc(var(--x3x-d, 0s) - 1.4s); animation-duration: 1.9s; }
  .x3x-bulb--3 { animation-delay: calc(var(--x3x-d, 0s) - 2.1s); animation-duration: 2.4s; }
  .x3x-orns > :nth-child(3n + 2) { animation-delay: -0.8s; animation-duration: 2.9s; }
  .x3x-orns > :nth-child(3n)     { animation-delay: -1.7s; animation-duration: 2.1s; }
  .x3x-star { animation-name: x3x-shine; animation-duration: 2.6s; }

  .x3x-flake {
    will-change: transform;
    animation: x3x-fall var(--x3x-t) linear var(--x3x-d) infinite;
  }
  .x3x-flake > * {
    animation: x3x-drift var(--x3x-t2) ease-in-out var(--x3x-d) infinite alternate;
  }
  /* The tab is in the background: the snow waits. */
  .x3x-snowfall.is-paused .x3x-flake,
  .x3x-snowfall.is-paused .x3x-flake > * { animation-play-state: paused; }
}

/* Reduced motion: the decorations stay, still; there is no snowfall. */
@media (prefers-reduced-motion: reduce) {
  .x3x,
  .x3x * { animation: none !important; }
  .x3x-snowfall { display: none; }
}

/* Not on paper, and not in Windows high-contrast mode. */
@media print, (forced-colors: active) {
  .x3x { display: none !important; }
}
