/*
 * LRS Christmas edition.
 * Namespace: lrs-christmas
 *
 * Loaded only while theme_mod lrs_christmas_enabled is on.
 * Snowfield and tapered catalogue ribbons. No garland, bauble or lights.
 *
 * Hooks:
 *   .course-card          courses, camps, workshops, trials, online, blog
 *   .lrs-activity-card    Our Activities
 *   body.lrs-christmas::before   snowfield
 */

html {
  overflow-x: clip;
}

body.lrs-christmas {
  position: relative;
  z-index: 0;
  /* Existing page colour stays on body from the theme (--page-bg). */
}

/* —— Snowfield, behind text, above the page colour —— */
body.lrs-christmas::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("assets/snow.svg");
  background-repeat: repeat;
  background-position: 0 0;
  background-size: 800px 640px;
}

/* —— Tapered ribbon. SVG caps pinch to a point; the middle band stays 8px. —— */
body.lrs-christmas .course-card,
body.lrs-christmas .lrs-activity-card {
  position: relative;
}

body.lrs-christmas .course-card::before,
body.lrs-christmas .lrs-activity-card::before {
  content: "";
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  right: 0;
  height: 14px;
  pointer-events: none;
  background: repeating-linear-gradient(
    -28deg,
    #d1252c 0 8px,
    #ffffff 8px 30px,
    #d1252c 30px 38px,
    #ffffff 38px 60px,
    #d1252c 60px 68px,
    #ffffff 68px 92px,
    #1a5c36 92px 100px,
    #ffffff 100px 126px
  );
  -webkit-mask-image:
    url("assets/ribbon-left.svg"),
    linear-gradient(#000, #000),
    url("assets/ribbon-right.svg");
  -webkit-mask-repeat: no-repeat, no-repeat, no-repeat;
  -webkit-mask-size: 64px 14px, calc(100% - 80px) 8px, 64px 14px;
  -webkit-mask-position: left top, 40px top, right top;
  mask-image:
    url("assets/ribbon-left.svg"),
    linear-gradient(#000, #000),
    url("assets/ribbon-right.svg");
  mask-repeat: no-repeat, no-repeat, no-repeat;
  mask-size: 64px 14px, calc(100% - 80px) 8px, 64px 14px;
  mask-position: left top, 40px top, right top;
}

body.lrs-christmas .lrs-activity-card::before {
  height: 14px;
  -webkit-mask-image:
    url("assets/ribbon-left-20.svg"),
    linear-gradient(#000, #000),
    url("assets/ribbon-right-20.svg");
  -webkit-mask-size: 56px 14px, calc(100% - 72px) 8px, 56px 14px;
  -webkit-mask-position: left top, 36px top, right top;
  mask-image:
    url("assets/ribbon-left-20.svg"),
    linear-gradient(#000, #000),
    url("assets/ribbon-right-20.svg");
  mask-size: 56px 14px, calc(100% - 72px) 8px, 56px 14px;
  mask-position: left top, 36px top, right top;
}
