/* ===========================================================================
   CliniMedia Holiday Kit — visual layer
   ---------------------------------------------------------------------------
   Drop-in seasonal decoration + a thin "benefits deadline" notice bar.
   Runs on Astro, Next.js and plain static HTML without a build step.

   EVERYTHING is namespaced `hk-`. This file sets no resets, touches no
   element selectors, and never styles `body` or `html` except behind an
   `hk-` class or a `data-hk-*` attribute. It cannot leak into a client's
   own CSS.

   State lives in data-* ATTRIBUTES on <html>, never classes. React
   reconciles className during hydration and wipes a class a pre-hydration
   script added; it leaves attributes it never rendered alone. See gate.js.

   Two halves, deliberately separated:

     .hk-bar     CONTENT. Server-rendered markup in the page. Visible with
                 JavaScript disabled, and occupies its height in the HTML so
                 it cannot shift the layout (CLS). JS only fills the digits.

     .hk-lights  DECORATION. Injected by holiday.js. Fixed-position and
     .hk-snow    pointer-events:none, so it has zero layout impact and
                 degrades to nothing at all without JS.

   Removal: delete the one <HolidayKit /> include per site. Nothing else
   in any site references these classes.
   =========================================================================== */

:root {
  /* Bulb colours. Deliberately NOT Santa red/green — that fights every
     brand palette we run (BDC navy #455789, SkyOne gold, Moonstone). Warm
     amber + cranberry + ice-mint reads festive against all of them. Any
     site can override these four in its own CSS if a palette clashes. */
  --hk-bulb-1: #ffc24b; /* amber      */
  --hk-bulb-2: #ef5a52; /* cranberry  */
  --hk-bulb-3: #8ce8d0; /* ice mint   */
  --hk-bulb-4: #fff0c4; /* warm white */

  --hk-wire: #1d2433;

  /* Notice bar */
  --hk-bar-bg-from: #0f3d2e; /* deep evergreen */
  --hk-bar-bg-to: #16553d;
  --hk-bar-fg: #f2fbf6;
  --hk-bar-accent: #ffc24b;

  /* Stacking. Lights drape over page chrome (that is the point), but stay
     below anything a site puts at 99999 — BDC's fixed mobile CTA, modals,
     cookie bars. Raise per-site if a site's own chrome outranks it. */
  --hk-z-lights: 9990;
  --hk-z-snow: 9989;
}

/* The inline <head> gate adds these to <html> before first paint, so an
   out-of-window or dismissed bar never flashes. Never animate these —
   a transition would reintroduce the flash. */
html[data-hk-off] .hk-bar {
  display: none !important;
}

/* ---------------------------------------------------------------------------
   1. NOTICE BAR
   Sits directly under the site's utility bar, above the main header.
   Target height 38px desktop / 34px mobile — thin enough to read as a
   system notice rather than a second promo band.
   --------------------------------------------------------------------------- */

/* --- two layout modes ------------------------------------------------------
   FLOW (default). The bar is normal-flow markup under the site's utility bar.
   It occupies its height in the served HTML, so it cannot shift the hero, and
   it needs nothing from the host site. Use wherever the header is in flow.
   BDC is this.

   FIXED (`.hk-bar--fixed`). For sites whose header is `position: fixed` and
   therefore OUT of flow, with the hero deliberately beginning at y=0 behind
   it — Moonstone is built that way and its migration QA measures it. On those
   sites an in-flow bar would be painted behind the floating header and never
   seen, and adding one to the flow would push every hero down and fail the
   fidelity check. So the bar floats too, and the site offsets its own header
   down by --hk-bar-h.

   --hk-bar-h is declared here rather than per-site so a host site's header
   offset can reference it and stay in step with the breakpoint below.
   -------------------------------------------------------------------------- */
:root { --hk-bar-h: 38px; }

@media (max-width: 760px) {
  :root { --hk-bar-h: 34px; }
}

.hk-bar--fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Above the host header, which on these sites is around z-index 999, but
     below the light strand so the bulbs still drape in front. */
  z-index: 9988;
}

/* Expired or dismissed in fixed mode, the header offset has to come back or
   the site is left with a 38px gap under a bar that is not there. Host sites
   key their offset off this variable, so zeroing it is the whole fix. */
html[data-hk-off] { --hk-bar-h: 0px; }

.hk-bar {
  display: block;
  /* Positioned so the bar gets a stacking context of its own. Fletcher's
     hero is `position: relative; z-index: 9` and, at viewports from about
     1920px up, its box reached over the top of the page and painted across
     a static bar - the notice was there and measured correctly at y=0 with
     full height, but the hero was drawn on top of it. It looked fine on a
     laptop and wrong on a monitor, which is exactly the kind of thing a
     single-width check misses. 100 clears ordinary page content while
     staying below the sticky headers and modals sites put at 999+. */
  position: relative;
  z-index: var(--hk-z-bar, 100);
  background-image: linear-gradient(
    96deg,
    var(--hk-bar-bg-from) 0%,
    var(--hk-bar-bg-to) 58%,
    var(--hk-bar-bg-from) 100%
  );
  color: var(--hk-bar-fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* A hairline of warm light along the bottom edge. Ties the bar to the
     bulb palette without adding a second block of colour. */
  box-shadow: inset 0 -1px 0 rgb(255 194 75 / 0.38);
}

.hk-bar__inner {
  max-width: 1320px;
  margin: 0 auto;
  min-height: 38px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.25;
}

/* --- "live news" badge -----------------------------------------------------
   The breaking-news cue, done with a pulsing dot and letterspaced caps
   rather than a scrolling marquee. A marquee moves text the reader cannot
   pause, which is both a WCAG 2.2.2 failure and measurably worse at being
   read. Static copy that shortens on small screens beats it on both counts.
   -------------------------------------------------------------------------- */
.hk-bar__badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  background: rgb(255 194 75 / 0.16);
  color: var(--hk-bar-accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hk-bar__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff6a5e;
  box-shadow: 0 0 0 0 rgb(255 106 94 / 0.7);
  animation: hk-pulse 2.4s ease-out infinite;
}

@keyframes hk-pulse {
  0%   { box-shadow: 0 0 0 0 rgb(255 106 94 / 0.65); }
  70%  { box-shadow: 0 0 0 7px rgb(255 106 94 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(255 106 94 / 0); }
}

/* The colour is repeated here, not inherited from .hk-bar, and that is the
   whole point. BDC's stylesheet carries a bare `p { color: var(--color-black) }`,
   and ANY direct rule on an element beats a colour inherited from an
   ancestor regardless of specificity - so the headline rendered black on the
   dark green bar while the rest of the bar stayed white. A drop-in kit cannot
   assume the host site leaves element selectors alone, so every text node in
   the bar sets its own colour. */
.hk-bar__msg {
  margin: 0;
  min-width: 0;
  text-align: center;
  color: var(--hk-bar-fg);
}

.hk-bar__msg strong {
  font-weight: 700;
  color: var(--hk-bar-fg);
}

/* The qualifier. Dimmer than the headline but NOT decorative — it is the
   clause that keeps the claim true for patients on fiscal-year plans, so
   it must survive to the smallest size the bar is shown at. */
.hk-bar__sub {
  color: rgb(242 251 246 / 0.78);
}

.hk-bar__count {
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.18rem 0.5rem;
  border-radius: 3px;
  background: rgb(0 0 0 / 0.22);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  /* Reserve the width of "00d 00h 00m" so the digits landing from JS cannot
     nudge the flex row. Height is already fixed by the bar. */
  min-width: 7.25ch;
  justify-content: center;
  white-space: nowrap;
}

/* Hidden until JS has a real value in it — an empty box is worse than none.
   Collapsing it costs no layout shift because the bar's height is fixed and
   the row is centre-justified. */
.hk-bar__count:empty {
  display: none;
}

.hk-bar__cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20rem;
  background: var(--hk-bar-accent);
  color: #15321f;
  font-size: 0.78125rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.hk-bar__cta:hover,
.hk-bar__cta:focus-visible {
  background: #ffd275;
  color: #15321f;
  text-decoration: none;
}

/* --- the two CTAs ----------------------------------------------------------
   Phones get tap-to-call, wider screens get the booking form. Two separate
   anchors swapped by a media query, NOT one anchor whose href JavaScript
   rewrites: an <a> cannot hold two hrefs, and a JS rewrite would leave a
   no-JS visitor tapping a form link expecting a dialler — or worse, a
   desktop visitor hitting a tel: that opens whatever handler Windows has
   registered. The hidden one is `display: none`, so it is out of the
   accessibility tree too and screen readers announce a single CTA.

   760px is the same threshold the bar already compacts at. It takes in small
   tablets as well as phones; a tablet can still place a call, and on one
   without a SIM the tel: hands off to FaceTime or the paired phone, which is
   a reasonable outcome. The alternative, keying off (pointer: coarse), gets
   touchscreen laptops wrong in the more annoying direction.
   -------------------------------------------------------------------------- */
.hk-bar__cta--call { display: none; }

@media (max-width: 760px) {
  .hk-bar__cta--form { display: none; }
  .hk-bar__cta--call { display: inline-flex; }
}

/* Handset glyph as a background on a pseudo-element rather than an <svg> in
   the markup: it keeps the per-site snippet to one line per CTA, and the kit
   already requires `img-src data:` for the light strand's wire, so it needs
   no further CSP allowance. Colour is baked to match --hk-bar-accent's ink. */
.hk-bar__cta--call::before {
  content: '';
  width: 0.95em;
  height: 0.95em;
  flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%2315321f' d='M3.7 1.3a1.2 1.2 0 0 1 1.7.3l1.2 1.7a1.2 1.2 0 0 1-.2 1.6l-.9.7a8 8 0 0 0 3.9 3.9l.7-.9a1.2 1.2 0 0 1 1.6-.2l1.7 1.2a1.2 1.2 0 0 1 .3 1.7l-.8 1.1a2 2 0 0 1-2.2.7A13.3 13.3 0 0 1 2.1 5.4a2 2 0 0 1 .7-2.2z'/%3E%3C/svg%3E") center / contain no-repeat;
}


/* Keyboard focus. Sites in the portfolio vary in whether they set a global
   focus style, so the bar carries its own against its dark background. */
.hk-bar :where(a, button):focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* --- notice bar, responsive ------------------------------------------------
   Drop order under pressure, least to most valuable: the qualifier clause
   stays longest of the text because it is the accuracy guard; the badge and
   the countdown go before the CTA, because the CTA is the only element that
   can convert. Below 420px it is deadline + button and nothing else.
   -------------------------------------------------------------------------- */
/* The bar is one flex row and must STAY one row — a notice bar that wraps to
   two lines stops reading as chrome and starts reading as a content block,
   and it doubles the height pushed above every hero on the site.
   `nowrap` makes any future copy change fail visibly (text clipped) instead
   of silently costing 38px of fold on every page. Thresholds below were set
   from measured element widths, not guessed. */
.hk-bar__inner { flex-wrap: nowrap; }
.hk-bar__msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 1024px) {
  .hk-bar__inner { gap: 0.6rem; }
  .hk-bar__badge { display: none; }
}

/* The qualifier goes at 900px, not 760px. Measured: headline 243px +
   qualifier 291px + countdown 96px + CTA 149px + close 20px + gaps and
   padding comes to ~880px, so at 768px the row wrapped to 44.8px tall.
   Dropping the clause here is safe for accuracy because the hedge that
   makes the claim true — "Most dental plans" — is in the headline, not
   in the clause. */
@media (max-width: 900px) {
  .hk-bar__sub { display: none; }
}

@media (max-width: 760px) {
  .hk-bar__inner {
    min-height: 34px;
    padding: 0 0.875rem;
    font-size: 0.75rem;
  }
  .hk-bar__cta { font-size: 0.75rem; padding: 0.22rem 0.6rem; }
}

/* Phones. Measured at 360px: short headline 162px + full CTA 139px + close
   20px + gaps 19px + padding 28px = 368px against a 360px viewport, so the
   headline wrapped. The CTA label shortens here too, which buys ~55px and
   clears 320px with room. */
@media (max-width: 480px) {
  .hk-bar__count { display: none; }
}

/* Below 480px the long headline is swapped for a written-for-mobile sentence
   rather than a truncated desktop one. Both strings sit in the server markup
   and the swap is pure CSS, so it survives with JS disabled and costs no
   measure-and-rewrite pass on load. */
.hk-bar__long { display: inline; }
.hk-bar__short { display: none; }

@media (max-width: 480px) {
  .hk-bar__long { display: none; }
  .hk-bar__short { display: inline; }
}

/* Same swap inside the CTA label: "Book before Dec 31" is the right call to
   action where there is room for it, but it is 139px wide and on a 320px
   phone that width is the difference between one line and two. The deadline
   is already the subject of the sentence next to it. */
.hk-bar__cta .hk-bar__long { display: inline; }
.hk-bar__cta .hk-bar__short { display: none; }

@media (max-width: 480px) {
  .hk-bar__cta .hk-bar__long { display: none; }
  .hk-bar__cta .hk-bar__short { display: inline; }
}

/* ---------------------------------------------------------------------------
   2. STRING LIGHTS
   A three-sided drape — top plus both verticals, no bottom strand.
   Bottom is omitted on purpose: half the portfolio puts something fixed at
   the bottom of a phone viewport (BDC's mobile call bar at z-index 99999),
   and a strand of bulbs behind a sticky CTA reads as a rendering bug.
   --------------------------------------------------------------------------- */

.hk-lights {
  position: fixed;
  inset: 0;
  z-index: var(--hk-z-lights);
  pointer-events: none; /* load-bearing: the frame spans the whole viewport */
  contain: layout paint style;
}

.hk-edge {
  position: absolute;
  background-repeat: repeat;
}

/* Each edge holds four bulb strands, one per colour, offset 60px apart so
   the four cycle along the wire. They are separate elements only so each
   colour can twinkle on its own clock — one element cannot animate the
   opacity of its individual background layers. */
.hk-edge > i {
  position: absolute;
  inset: 0;
  display: block;
  background-repeat: repeat;
  animation: hk-twinkle var(--hk-dur, 3.2s) ease-in-out infinite;
  animation-delay: var(--hk-delay, 0s);
}

@keyframes hk-twinkle {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.42; }
}

/* Vary the clock per strand. Co-prime-ish durations keep the four from
   re-syncing into a visible single pulse. */
.hk-edge > i:nth-child(1) { --hk-dur: 3.1s;  --hk-delay: 0s;    }
.hk-edge > i:nth-child(2) { --hk-dur: 4.3s;  --hk-delay: 0.7s;  }
.hk-edge > i:nth-child(3) { --hk-dur: 3.7s;  --hk-delay: 1.45s; }
.hk-edge > i:nth-child(4) { --hk-dur: 4.9s;  --hk-delay: 0.3s;  }

/* --- the wire -------------------------------------------------------------
   Drawn TWICE in each SVG: a soft white stroke underneath, then the dark
   core on top. The single dark stroke it replaces was invisible wherever it
   crossed a dark photograph, which on a dental site is most of the hero —
   and a strand of bulbs with no visible wire between them does not read as
   string lights, it reads as dirt on the screen. The halo makes the wire
   legible on a white header and over a dark photo with one asset.

   Two explicit quadratics per repeat rather than Q + T: the reflected
   control point of a T command arcs the second half upward, giving
   alternating sag-and-hump instead of a continuous swag.
   -------------------------------------------------------------------------- */

/* How far the bulbs hang from the top of the viewport. The default clears
   text in a top utility bar of ~40px with centred type (bulbs occupy 6-12px;
   a 15px/1.2 line in a 40-44px bar starts around 13px). A site with a taller
   or differently-aligned bar overrides this one value. */
.hk-lights { --hk-drop: 9px; }

.hk-edge--top {
  top: 0;
  left: 0;
  right: 0;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='16' viewBox='0 0 120 16'%3E%3Cpath d='M0 2 Q30 12 60 2 Q90 12 120 2' fill='none' stroke='%23ffffff' stroke-opacity='.38' stroke-width='3.2' stroke-linecap='round'/%3E%3Cpath d='M0 2 Q30 12 60 2 Q90 12 120 2' fill='none' stroke='%231d2433' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 120px 16px;
}

/* Bulbs sit at the low point of each sag — x = 30 + i*60 across a 240px
   four-colour cycle. Two layers per strand: a wide soft glow, then the
   bulb. Positions are driven off --hk-drop so one variable retunes them. */
.hk-edge--top > i {
  background-size: 240px 16px;
}

.hk-edge--top > i:nth-child(1) {
  background-image:
    radial-gradient(circle 8px at 30px var(--hk-drop), rgb(255 194 75 / 0.5) 0, transparent 100%),
    radial-gradient(circle 3px at 30px var(--hk-drop), var(--hk-bulb-1) 0 78%, transparent 100%);
}
.hk-edge--top > i:nth-child(2) {
  background-image:
    radial-gradient(circle 8px at 90px var(--hk-drop), rgb(239 90 82 / 0.5) 0, transparent 100%),
    radial-gradient(circle 3px at 90px var(--hk-drop), var(--hk-bulb-2) 0 78%, transparent 100%);
}
.hk-edge--top > i:nth-child(3) {
  background-image:
    radial-gradient(circle 8px at 150px var(--hk-drop), rgb(140 232 208 / 0.5) 0, transparent 100%),
    radial-gradient(circle 3px at 150px var(--hk-drop), var(--hk-bulb-3) 0 78%, transparent 100%);
}
.hk-edge--top > i:nth-child(4) {
  background-image:
    radial-gradient(circle 8px at 210px var(--hk-drop), rgb(255 240 196 / 0.55) 0, transparent 100%),
    radial-gradient(circle 3px at 210px var(--hk-drop), var(--hk-bulb-4) 0 78%, transparent 100%);
}

/* --- vertical strands -----------------------------------------------------
   OFF BY DEFAULT. See README: measured against a full-bleed photographic
   hero they read as scattered coloured dots rather than a strand, because
   a vertical swag has no horizontal rhythm to tie the bulbs together the
   way the top drape does. Opt a site in by adding `hk-sides` to <html>.

   height:100% of the fixed `inset:0` parent, never 100vh — 100vh is the
   wrong number on mobile Safari and Chrome Android while the URL bar is
   collapsing, and a strand sized to it overshoots the fold.
   -------------------------------------------------------------------------- */

.hk-edge--left,
.hk-edge--right { display: none; }

html[data-hk-sides] .hk-edge--left,
html[data-hk-sides] .hk-edge--right {
  display: block;
  top: 0;
  height: 100%;
  width: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='120' viewBox='0 0 16 120'%3E%3Cpath d='M2 0 Q12 30 2 60 Q12 90 2 120' fill='none' stroke='%23ffffff' stroke-opacity='.38' stroke-width='3.2' stroke-linecap='round'/%3E%3Cpath d='M2 0 Q12 30 2 60 Q12 90 2 120' fill='none' stroke='%231d2433' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 16px 120px;
}

html[data-hk-sides] .hk-edge--left { left: 0; }

/* Mirrored, which flips the wire's sag and every bulb position in one
   declaration — the right edge needs no geometry of its own. */
html[data-hk-sides] .hk-edge--right {
  right: 0;
  transform: scaleX(-1);
}

html[data-hk-sides] .hk-edge--left > i,
html[data-hk-sides] .hk-edge--right > i {
  background-size: 16px 240px;
}

html[data-hk-sides] .hk-edge--left > i:nth-child(1),
html[data-hk-sides] .hk-edge--right > i:nth-child(1) {
  background-image:
    radial-gradient(circle 8px at var(--hk-drop) 30px, rgb(255 194 75 / 0.5) 0, transparent 100%),
    radial-gradient(circle 3px at var(--hk-drop) 30px, var(--hk-bulb-1) 0 78%, transparent 100%);
}
html[data-hk-sides] .hk-edge--left > i:nth-child(2),
html[data-hk-sides] .hk-edge--right > i:nth-child(2) {
  background-image:
    radial-gradient(circle 8px at var(--hk-drop) 90px, rgb(239 90 82 / 0.5) 0, transparent 100%),
    radial-gradient(circle 3px at var(--hk-drop) 90px, var(--hk-bulb-2) 0 78%, transparent 100%);
}
html[data-hk-sides] .hk-edge--left > i:nth-child(3),
html[data-hk-sides] .hk-edge--right > i:nth-child(3) {
  background-image:
    radial-gradient(circle 8px at var(--hk-drop) 150px, rgb(140 232 208 / 0.5) 0, transparent 100%),
    radial-gradient(circle 3px at var(--hk-drop) 150px, var(--hk-bulb-3) 0 78%, transparent 100%);
}
html[data-hk-sides] .hk-edge--left > i:nth-child(4),
html[data-hk-sides] .hk-edge--right > i:nth-child(4) {
  background-image:
    radial-gradient(circle 8px at var(--hk-drop) 210px, rgb(255 240 196 / 0.55) 0, transparent 100%),
    radial-gradient(circle 3px at var(--hk-drop) 210px, var(--hk-bulb-4) 0 78%, transparent 100%);
}

/* Phones: tighter bulb spacing so the drape still reads as a strand rather
   than four lonely bulbs, and sides forced off regardless of opt-in. */
@media (max-width: 767px) {
  html[data-hk-sides] .hk-edge--left,
  html[data-hk-sides] .hk-edge--right { display: none; }

  .hk-edge--top { background-size: 96px 16px; }
  .hk-edge--top > i { background-size: 192px 16px; }
  .hk-edge--top > i:nth-child(1) {
    background-image:
      radial-gradient(circle 7px at 24px var(--hk-drop), rgb(255 194 75 / 0.5) 0, transparent 100%),
      radial-gradient(circle 2.6px at 24px var(--hk-drop), var(--hk-bulb-1) 0 78%, transparent 100%);
  }
  .hk-edge--top > i:nth-child(2) {
    background-image:
      radial-gradient(circle 7px at 72px var(--hk-drop), rgb(239 90 82 / 0.5) 0, transparent 100%),
      radial-gradient(circle 2.6px at 72px var(--hk-drop), var(--hk-bulb-2) 0 78%, transparent 100%);
  }
  .hk-edge--top > i:nth-child(3) {
    background-image:
      radial-gradient(circle 7px at 120px var(--hk-drop), rgb(140 232 208 / 0.5) 0, transparent 100%),
      radial-gradient(circle 2.6px at 120px var(--hk-drop), var(--hk-bulb-3) 0 78%, transparent 100%);
  }
  .hk-edge--top > i:nth-child(4) {
    background-image:
      radial-gradient(circle 7px at 168px var(--hk-drop), rgb(255 240 196 / 0.55) 0, transparent 100%),
      radial-gradient(circle 2.6px at 168px var(--hk-drop), var(--hk-bulb-4) 0 78%, transparent 100%);
  }
}

/* A site can hide the drape while its own full-screen overlay is open by
   setting this class on <html>; documented in README. */
html[data-hk-suppress] .hk-lights,
html[data-hk-suppress] .hk-snow { opacity: 0; }

/* ---------------------------------------------------------------------------
   3. SNOW
   --------------------------------------------------------------------------- */

.hk-snow {
  position: fixed;
  inset: 0;
  /* Explicit, and NOT `contain: strict`.
     `strict` implies `contain: size`, which tells the browser to size the
     element as if it had no contents. On a non-replaced div that changes
     nothing — `inset: 0` still stretches it. But <canvas> is a REPLACED
     element, so size containment zeroes its intrinsic dimensions and
     `width: auto` resolves to 0. The canvas measured 0x0 and the snow
     silently never drew. Layout+paint containment gives the same isolation
     without the size trap. */
  width: 100%;
  height: 100%;
  z-index: var(--hk-z-snow);
  pointer-events: none;
  contain: layout paint style;
}

/* ---------------------------------------------------------------------------
   4. OPT-OUTS
   --------------------------------------------------------------------------- */

/* Reduced motion. The decoration stays — it is the MOVEMENT that is the
   accessibility problem, not the colour. Bulbs hold at full brightness and
   holiday.js never starts the snow canvas. The bar's pulsing dot stops too;
   it is the one moving thing inside a block of text. */
@media (prefers-reduced-motion: reduce) {
  .hk-edge > i { animation: none; opacity: 1; }
  .hk-bar__dot { animation: none; }
  .hk-bar__cta { transition: none; }
}

/* Print. Nobody wants bulbs on a printed directions page, and the notice
   bar is meaningless on paper. */
@media print {
  .hk-bar,
  .hk-lights,
  .hk-snow { display: none !important; }
}
