/**
 * Christmas campaign page — "Move in for Christmas".
 *
 * Standalone stylesheet, enqueued only on the Christmas page template (see
 * christmas.php). Everything is scoped under .xmas so nothing leaks into the
 * main theme; delete this file with the rest of /christmas after the campaign.
 *
 * Source: Figma "Hive Homes" node 303:3099, designed at 1920px wide.
 *
 *  - Below 1200px the page is a simple stacked layout (decoration hidden).
 *  - From 1200px up it is a faithful scale of the 1920px design: every
 *    position and size is `design px × --u`, where --u is one design pixel
 *    (viewport width / 1920). Positions are set per element through the
 *    --x / --y / --w / --h custom properties (design px, relative to the
 *    section's top-left corner).
 *
 * Fonts (Northwell script + Avenir) are already registered by the theme in
 * includes/fonts.php.
 */

.xmas {
  --xmas-cream: #FFF4E0;
  --xmas-amber: #F9B233;
  --xmas-crimson: #EA5151;
  --xmas-grey: #5F5F5F;
  --xmas-sky: #B6DFE5;

  --xmas-script: 'NorthwellRegular', cursive;
  --xmas-heavy: 'AvenirLTStd-Heavy', helvetica, arial, sans-serif;
  --xmas-medium: 'AvenirLTStd-Medium', helvetica, arial, sans-serif;
  --xmas-roman: 'AvenirLTStd-Roman', helvetica, arial, sans-serif;

  /* One design pixel (designs are 1920px wide) */
  --u: calc(100vw / 1920);

  margin-top: 96px; /* clears the fixed site header (mobile height) */
  overflow: hidden;
  color: #000;
  font-family: var(--xmas-roman);
  font-weight: 400;
}

.xmas *,
.xmas *::before,
.xmas *::after {
  box-sizing: border-box;
}

/* Reset the theme's heading/paragraph styling. :where() keeps this at zero
   specificity so the component rules below always win. */
:where(.xmas h1, .xmas h2, .xmas p, .xmas ul) {
  margin: 0;
  padding: 0;
  border: 0;
}

:where(.xmas h1, .xmas h2) {
  font-weight: 400;
}

:where(.xmas h1, .xmas h2)::before,
:where(.xmas h1, .xmas h2)::after {
  content: none;
}

.xmas img {
  display: block;
  max-width: none; /* the theme sets img { max-width: 100% } */
}

.xmas-stage {
  position: relative;
}

/* Decorative graphics are CSS backgrounds (hidden on small screens) */
.xmas-deco {
  display: none;
  background: no-repeat center / 100% 100%;
  pointer-events: none;
}

/* ---- Hexagon-masked photos ------------------------------------------- */
.xmas-hex {
  position: relative;
  overflow: hidden;
  -webkit-mask: no-repeat center / 100% 100%;
  mask: no-repeat center / 100% 100%;
}

.xmas-hex img {
  position: absolute;
  left: var(--ix, 0);
  top: var(--iy, 0);
  width: var(--iw, 100%);
  height: var(--ih, 100%);
  object-fit: cover;
}

.xmas-hero__photo {
  --ix: -36.87%;
  --iy: -12.99%;
  --iw: 175.84%;
  --ih: 135.48%;
  -webkit-mask-image: url('img/hero-mask.svg');
  mask-image: url('img/hero-mask.svg');
}

.xmas-photo--kitchen .xmas-photo__hex {
  --ix: 1.5%;
  --iw: 133.33%;
  -webkit-mask-image: url('img/kitchen-mask.svg');
  mask-image: url('img/kitchen-mask.svg');
}

.xmas-photo--living .xmas-photo__hex {
  --ix: 4.34%;
  --iw: 119.76%;
  -webkit-mask-image: url('img/living-mask.svg');
  mask-image: url('img/living-mask.svg');
}

.xmas-photo--hallway .xmas-photo__hex {
  --ix: -7.5%;
  --iw: 133.33%;
  -webkit-mask-image: url('img/hallway-mask.svg');
  mask-image: url('img/hallway-mask.svg');
}

/* ---- Badges (sized from --b, the badge's width) ----------------------- */
.xmas-badge {
  --b: 200px;
  position: relative;
  width: var(--b);
  height: var(--b);
  text-align: center;
  text-transform: uppercase;
  font-family: var(--xmas-heavy);
}

.xmas-badge::before {
  content: '';
  position: absolute;
  background: no-repeat center / 100% 100%;
}

.xmas-badge--crimson {
  color: #fff;
}

.xmas-badge--crimson::before {
  inset: 0 6.7%;
  background-image: url('img/hex-crimson.svg');
}

.xmas-badge__amount {
  margin-bottom: 0;
  position: relative;
  padding-top: calc(var(--b) * 0.205);
  font-size: calc(var(--b) * 0.2241);
  line-height: normal;
}

.xmas-badge__text {
  position: relative;
  font-size: calc(var(--b) * 0.0917);
  line-height: calc(var(--b) * 0.1019);
}

.xmas-badge__text span {
  display: block;
}

.xmas-badge__text span:first-child {
  line-height: calc(var(--b) * 0.1426);
}

/* A word instead of a figure ("Monthly"): the figure size would overflow the hexagon, so it is set smaller */
.xmas-badge--word .xmas-badge__amount {
  padding-top: calc(var(--b) * 0.265);
  font-size: calc(var(--b) * 0.12);
  line-height: calc(var(--b) * 0.145);
}

.xmas-badge--cream {
  --b: 220px;
  color: var(--xmas-grey);
}

.xmas-badge--cream::before {
  inset: -0.8% 6%;
  background-image: url('img/hex-cream.svg');
}

.xmas-badge__label strong,
.xmas-badge__label b {
  font-weight: 700;
}

.xmas-badge__label {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--b) * 0.799);
  transform: translate(-50%, -50%);
  font-size: calc(var(--b) * 0.0995);
  line-height: calc(var(--b) * 0.1172);
  letter-spacing: calc(var(--b) * 0.0199);
}

/* =========================================================
   Hero
   ========================================================= */
.xmas-hero {
  background: var(--xmas-grey);
  padding: 32px 20px 0;
}

.xmas-hero .xmas-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.xmas-hero__title {
  order: 1;
  color: #fff;
  font-family: var(--xmas-script);
  font-size: clamp(72px, 19vw, 96px);
  line-height: 0.95;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.xmas-hero__line {
  display: block;
}

.xmas-hero__line > span {
  display: inline-block;
  transform: rotate(-3.35deg);
}

.xmas-hero__intro {
  order: 2;
  max-width: 590px;
  margin-top: 16px;
  color: var(--xmas-amber);
  font-family: var(--xmas-heavy);
  font-size: clamp(22px, 5.4vw, 28px);
  line-height: 1.25;
}

/* Small print for the offers: after the offers, before the photo (cream at 85%, 4.8:1 on the grey) */
.xmas-hero__disclaimer {
  order: 4;
  max-width: 590px;
  margin-top: 20px;
  color: rgba(255, 244, 224, 0.85);
  font-size: 13px;
  line-height: 1.4;
}

.xmas-hero__disclaimer > a {
  color: inherit;
  text-decoration: underline;
}

/* The three offers: a cream badge, then two red ones, with an OR between each */
.xmas-offers {
  order: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 24px;
}

.xmas-offers .xmas-badge {
  --b: 190px;
}

/* The OR between offers: a small amber hexagon */
.xmas-or {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 45px;
  height: 52px;
  margin: -6px 0;
  background: var(--xmas-amber);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  color: var(--xmas-grey);
  font-family: var(--xmas-heavy);
  font-size: 17px;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.xmas-hero__photo {
  order: 5;
  width: calc(100% + 40px);
  margin: 24px -20px 0;
  aspect-ratio: 999.393 / 865.5;
}

/* Tablet: the three offers sit side by side instead of stacking */
@media (min-width: 600px) {
  .xmas-hero .xmas-stage {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 24px;
  }

  .xmas-hero__title {
    flex: 0 0 100%;
  }

  /* Own row, with its text still held to 590px and centred, so it never shares a row with the badges */
  .xmas-hero__intro {
    flex: 0 0 100%;
    max-width: none;
    padding: 0 max(0px, calc((100% - 590px) / 2));
  }

  .xmas-hero__disclaimer {
    flex: 0 0 100%;
    max-width: none;
    padding: 0 max(0px, calc((100% - 590px) / 2));
  }

  .xmas-offers {
    flex: 0 0 100%;
    flex-direction: row;
    justify-content: center;
  }

  .xmas-offers .xmas-badge {
    --b: clamp(130px, 21vw, 200px);
  }

  .xmas-or {
    margin: 0 -4px;
  }

  .xmas-hero__photo {
    flex: none;
  }
}

/* =========================================================
   Introduction + Ready to Move package
   ========================================================= */
.xmas-mid .xmas-stage {
  display: flex;
  flex-direction: column;
}

.xmas-intro {
  --xmas-gutter: 20px;
  order: 1;
  padding: 40px var(--xmas-gutter) 8px;
  text-align: center;
}

.xmas-intro__heading {
  color: #000;
  font-family: var(--xmas-heavy);
  font-size: clamp(28px, 7vw, 34px);
  line-height: 1.1;
}

.xmas-intro__script {
  position: relative;
  margin-top: 8px;
  padding: 12px 0 20px;
  background: var(--xmas-amber);
  font-family: var(--xmas-script);
  font-size: clamp(64px, 16vw, 80px);
  line-height: 0.8;
}

/* Carry the amber band out to the edges of the screen, past the section's side padding */
.xmas-intro__script::before,
.xmas-intro__script::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--xmas-gutter);
  background: var(--xmas-amber);
}

.xmas-intro__script::before {
  right: 100%;
}

.xmas-intro__script::after {
  left: 100%;
}

.xmas-photos {
  order: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 20px;
}

.xmas-photo--kitchen {
  grid-column: 1 / -1;
  width: 80%;
  justify-self: center;
}

.xmas-photo__hex {
  aspect-ratio: 1;
}

/* Tablet: all three photos on one row, sized in the proportions of the design,
   with the large kitchen photo in the middle */
@media (min-width: 600px) {
  .xmas-photos {
    grid-template-columns: 1fr 1.8fr 1.1fr;
    align-items: center;
    gap: 16px;
    max-width: 840px;
  }

  .xmas-photo--kitchen {
    grid-column: auto;
    order: 2;
    width: 100%;
  }

  .xmas-photo--living {
    order: 1;
  }

  .xmas-photo--hallway {
    order: 3;
  }
}

.xmas-copy {
  font-size: 18px;
  line-height: 1.8;
}

/* The theme sets its own font size on p, so inherit from the block instead */
.xmas-copy p {
  font-size: inherit;
  line-height: inherit;
}

.xmas-copy p + p {
  margin-top: 1.8em;
}

/* Line breaks in the copy only matter on the scaled desktop layout */
.xmas-copy br {
  display: none;
}

.xmas-copy strong {
  font-family: var(--xmas-heavy);
  font-weight: 400;
}

.xmas-intro__content {
  margin-top: 24px;
  text-align: left;
}

.xmas-package {
  order: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0 48px;
  background: var(--xmas-cream);
}

.xmas-package__heading {
  align-self: stretch;
  padding: 16px 20px 0;
  text-align: center;
}

.xmas-package__pre,
.xmas-package__post {
  display: block;
  font-family: var(--xmas-script);
  font-size: clamp(64px, 16vw, 80px);
  line-height: 0.8;
}

.xmas-package__title {
  display: block;
  margin: 12px -20px;
  padding: 14px 20px;
  background: var(--xmas-sky);
  color: var(--xmas-grey);
  font-family: var(--xmas-heavy);
  font-size: clamp(24px, 7vw, 34px);
  letter-spacing: 0.3em;
  line-height: 1.1;
  text-transform: uppercase;
}

.xmas-package__content {
  width: 100%;
  padding: 24px 20px 0;
}

.xmas-package__offers {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* The same small print again, after the package offers (grey on cream, 5.9:1) */
.xmas-package__disclaimer {
  max-width: 590px;
  margin-top: 24px;
  padding: 0 20px;
  color: var(--xmas-grey);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

/* Text in the box is sized from --tb. On phones that is a fixed 480px, so the
   text is readable; on desktop it is the box's own size (see below).
   On phones the hexagon is drawn with CSS: its top and bottom are always the
   regular hexagon's 60 degree points and the sides lengthen to fit the
   text, so it is never stretched out of shape. An amber hexagon with a
   white one inset inside it makes the outline. */
.xmas-package__box {
  --bw: min(92vw, 460px);
  --tb: 480px;
  --cap: calc(var(--bw) * 0.2887); /* height of each pointed end of a regular hexagon */
  --hex: polygon(50% 0, 100% var(--cap), 100% calc(100% - var(--cap)), 50% 100%, 0 calc(100% - var(--cap)), 0 var(--cap));
  position: relative;
  width: var(--bw);
  margin-top: 32px;
  padding: calc(var(--bw) * 0.17) calc(var(--bw) * 0.08) calc(var(--bw) * 0.26);
  background: var(--xmas-amber);
  clip-path: var(--hex);
  color: var(--xmas-grey);
  font-family: var(--xmas-heavy);
  text-align: center;
  text-transform: uppercase;
}

.xmas-package__box::before {
  content: '';
  position: absolute;
  inset: 3px;
  background: #fff;
  clip-path: var(--hex);
}

.xmas-package__box-title {
  position: relative;
  font-size: calc(var(--tb) * 0.0519);
  letter-spacing: calc(var(--tb) * 0.0153);
  line-height: calc(var(--tb) * 0.061);
}

.xmas-package__box-title span {
  display: block;
}

/* The first two lines ("Ready" / "to move") are set heavier than the last */
.xmas-package__box-title span:nth-child(-n + 2) {
  font-weight: 700;
}

.xmas-package__subtitle {
  position: relative;
  width: calc(var(--tb) * 0.56);
  max-width: 100%;
  margin: calc(var(--tb) * 0.0143) auto 0;
  font-family: var(--xmas-medium);
  font-size: max(14px, calc(var(--tb) * 0.0264));
  line-height: 1.35;
  text-transform: none;
}

.xmas-package__list {
  position: relative;
  width: calc(var(--tb) * 0.571);
  max-width: 100%;
  margin: calc(var(--tb) * 0.023) auto 0;
  font-size: max(14px, calc(var(--tb) * 0.0331));
  letter-spacing: calc(var(--tb) * 0.00496);
  line-height: 1.43;
  list-style: disc inside;
}

.xmas-package__list li {
  margin: 0 0 calc(var(--tb) * 0.01277);
  padding: 0;
}

.xmas-package__note {
  font-family: var(--xmas-medium);
}

.xmas-package__badge {
  --b: 200px;
}

.xmas-package__offers .xmas-or {
  margin: -6px 0;
}


/* =========================================================
   Call to action
   ========================================================= */
.xmas-cta {
  padding: 48px 20px 8px;
  text-align: center;
}

.xmas-cta__heading {
  color: #000;
  font-family: var(--xmas-script);
  font-size: clamp(48px, 11vw, 60px);
  line-height: 0.95;
}

.xmas-cta__text {
  max-width: 1033px;
  margin: 16px auto 0;
  font-family: var(--xmas-heavy);
  font-size: 18px;
  line-height: 1.8;
}

/* =========================================================
   Enquiry form (styled by the theme's .gform-alt)
   ========================================================= */
.xmas-form {
  padding: 24px 16px 60px;
}

.xmas-form__inner {
  max-width: 1085px;
  margin: 0 auto;
}

/* =========================================================
   Desktop: scaled 1920px design
   ========================================================= */
/* Type sizes. On phones the sizes are capped close to where they start, so
   they stay in proportion even if the browser reports a viewport wider than
   the screen (iOS Safari can until the page is reloaded after a rotation).
   From 480px up, wider than any phone, they use their full range. */
@media (min-width: 480px) {
  .xmas-hero__title {
    font-size: clamp(72px, 19vw, 134px);
  }

  .xmas-hero__intro {
    font-size: clamp(22px, 5.4vw, 40px);
  }

  .xmas-intro__heading {
    font-size: clamp(28px, 7vw, 45px);
  }

  .xmas-intro__script,
  .xmas-package__pre,
  .xmas-package__post {
    font-size: clamp(64px, 16vw, 100px);
  }

  .xmas-package__title {
    font-size: clamp(24px, 7vw, 55px);
  }

  .xmas-cta__heading {
    font-size: clamp(48px, 11vw, 100px);
  }
}

@media (min-width: 993px) {
  .xmas {
    margin-top: 148px; /* the theme's desktop header height */
  }
}

@media (min-width: 1200px) {
  /* Elements placed from --x/--y/--w/--h (design px) */
  .xmas-deco,
  .xmas-hex,
  .xmas-badge,
  .xmas-or,
  .xmas-package__box {
    position: absolute;
    left: calc(var(--x) * var(--u));
    top: calc(var(--y) * var(--u));
    width: calc(var(--w) * var(--u));
    height: calc(var(--h) * var(--u));
  }

  /* Text placed from --x/--y/--w (height follows content) */
  .xmas-hero__line,
  .xmas-hero__intro,
  .xmas-hero__disclaimer,
  .xmas-package__disclaimer,
  .xmas-intro__heading,
  .xmas-intro__script,
  .xmas-intro__content,
  .xmas-package__pre,
  .xmas-package__title,
  .xmas-package__post,
  .xmas-package__content,
  .xmas-cta__heading,
  .xmas-cta__text {
    position: absolute;
    left: calc(var(--x) * var(--u));
    top: calc(var(--y) * var(--u));
    width: calc(var(--w) * var(--u));
  }

  /* Wrapper elements that only exist to group content on small screens */
  .xmas-intro,
  .xmas-package,
  .xmas-package__heading,
  .xmas-photos,
  .xmas-photo,
  .xmas-offers,
  .xmas-package__offers,
  .xmas-hero__title {
    display: contents;
  }

  .xmas-deco {
    display: block;
  }

  .xmas-stage {
    display: block;
    height: calc(var(--sh) * var(--u));
  }

  .xmas-badge,
  .xmas-offers .xmas-badge {
    --b: calc(var(--w) * var(--u));
  }

  .xmas-package__box {
    --b: calc(var(--w) * var(--u));
    --tb: var(--b); /* text is sized from the box on desktop */
    margin: 0;
    padding: 0;
    background: none;
    clip-path: none;
  }

  /* On desktop the hexagon is the outline artwork in a square box */
  .xmas-package__box::before {
    inset: -0.63% 6.15%;
    background: url('img/hex-outline.svg') no-repeat center / 100% 100%;
    clip-path: none;
  }

  .xmas-package__box-title {
    padding-top: calc(var(--tb) * 0.114);
  }

  .xmas-package__subtitle {
    font-size: calc(var(--tb) * 0.0264);
  }

  .xmas-package__list {
    font-size: calc(var(--tb) * 0.0331);
  }

  .xmas-or,
  .xmas-package__offers .xmas-or {
    font-size: calc(var(--u) * 18);
    margin: 0;
  }

  /* ---- Hero (913 tall) ---- */
  .xmas-hero {
    padding: 0;
  }

  .xmas-hero {
    overflow: hidden; /* the dotted lights run past the hero's bottom edge */
  }

  .xmas-hero .xmas-stage {
    --sh: 913;
  }

  .xmas-hero__title,
  .xmas-hero__intro,
  .xmas-hero__disclaimer,
  .xmas-offers,
  .xmas-hero__photo {
    order: 0;
    margin: 0;
  }

  .xmas-deco--hero-triangle {
    --x: 1314; --y: 39; --w: 606; --h: 352;
    background-image: url('img/hero-triangle.svg');
  }

  .xmas-hero__photo {
    --x: 960; --y: 47; --w: 999.393; --h: 865.5;
    aspect-ratio: auto;
  }

  .xmas-deco--hero-lights {
    --x: 72; --y: 39; --w: 966.344; --h: 926.766;
    background-image: url('img/hero-lights.svg');
  }

  .xmas-deco--hero-shapes {
    --x: -41; --y: 670; --w: 1207; --h: 243;
    background-image: url('img/hero-shapes.svg');
  }

  .xmas-hero__line {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(var(--u) * 134.314);
    line-height: normal;
    white-space: nowrap;
  }

  .xmas-hero__line--1 { --x: 300; --y: 173; --w: 450; height: calc(var(--u) * 243.2); }
  .xmas-hero__line--2 { --x: 488.04; --y: 295; --w: 413.05; height: calc(var(--u) * 241.05); }

  .xmas-hero__intro {
    --x: 306; --y: 536; --w: 590;
    max-width: none;
    padding: 0;
    font-size: calc(var(--u) * 40);
    line-height: calc(var(--u) * 50);
    text-align: left;
  }

  /* Small print under the intro. The band between the intro (ends at 636) and
     the top of the red hexagon below it (691) holds one line, or two short
     ones (up to 120 characters); 640 wide keeps it clear of the offers. */
  .xmas-hero__disclaimer {
    --x: 306; --y: 646; --w: 640;
    max-width: none;
    padding: 0;
    font-size: max(11px, calc(var(--u) * 16));
    line-height: 1.3;
    text-align: left;
  }

  /* The three offers, stacked down the left edge of the photo with an OR between each */
  .xmas-offer--1 { --x: 916; --y: 165; --w: 220; --h: 220; }
  .xmas-or--1 { --x: 1003.5; --y: 379; --w: 45; --h: 52; }
  .xmas-offer--2 { --x: 931; --y: 426; --w: 190; --h: 190; }
  .xmas-or--2 { --x: 1003.5; --y: 610; --w: 45; --h: 52; }
  .xmas-offer--3 { --x: 931; --y: 656; --w: 190; --h: 190; }

  /* ---- Introduction + package (1957 tall) ---- */
  .xmas-mid {
    background:
      linear-gradient(var(--xmas-amber), var(--xmas-amber)) 0 calc(var(--u) * 352) / 100% calc(var(--u) * 97) no-repeat,
      linear-gradient(var(--xmas-cream), var(--xmas-cream)) 0 calc(var(--u) * 1377) / 100% 100% no-repeat,
      #fff;
  }

  .xmas-mid {
    overflow: hidden; /* a snowflake straddles the hero edge; the hero covers it in the design */
  }

  .xmas-mid .xmas-stage {
    --sh: 2040;
  }

  .xmas-deco--mountains {
    --x: -256; --y: 834; --w: 2482; --h: 1123;
    background-image: url('img/package-bg.svg');
  }

  .xmas-deco--band-blue {
    --x: 0; --y: 1075; --w: 1920; --h: 101;
    background: var(--xmas-sky);
    /* runs the band full-bleed on screens wider than 1920px */
    box-shadow: -100vw 0 0 var(--xmas-sky), 100vw 0 0 var(--xmas-sky);
  }

  .xmas-deco--band-amber {
    display: none; /* drawn by the section background so it runs edge to edge */
  }

  /* The same lights artwork as the footer, flipped */
  .xmas-deco--string {
    --x: -147.52; --y: 9; --w: 2081.26; --h: 162.35;
    background-image: url('img/lights-footer.svg');
    transform: scaleY(-1);
  }

  /* Snowflakes: cream on white, white on the cream package section */
  .xmas-snow { background-image: url('img/snowflake.svg'); }
  .xmas-snow--a { --x: 1766; --y: 120; --w: 140.25; --h: 143.75; }
  .xmas-snow--b { --x: 1183; --y: -82; --w: 140.25; --h: 143.75; }
  .xmas-snow--c { --x: 455; --y: 64; --w: 140.25; --h: 143.75; }
  .xmas-snow--d { --x: 72.2; --y: 586.7; --w: 177.82; --h: 182.25; }
  .xmas-snow--e { --x: 792; --y: 530; --w: 140.25; --h: 143.75; }
  .xmas-snow--f { --x: 1672.25; --y: 579.66; --w: 107.75; --h: 110.43; }
  .xmas-snow--g { --x: 1142; --y: 834; --w: 140.25; --h: 143.75; }
  .xmas-snow--h { --x: 1043; --y: 1129; --w: 99.52; --h: 102; }
  .xmas-snow--i { --x: 61; --y: 1215; --w: 116; --h: 118.89; }
  .xmas-snow--j { --x: 278; --y: 1652; --w: 132.59; --h: 135.89; }
  .xmas-snow--k { --x: 1179; --y: 1456; --w: 116; --h: 118.89; }
  .xmas-snow--l { --x: 1623; --y: 1659.6; --w: 91; --h: 93.27; }
  .xmas-snow--m { --x: 1744; --y: 1288; --w: 118; --h: 120.94; }
  .xmas-snow--h,
  .xmas-snow--i,
  .xmas-snow--j,
  .xmas-snow--k,
  .xmas-snow--l,
  .xmas-snow--m {
    filter: brightness(0) invert(1);
  }

  /* Photos + the ribbons they hang from */
  .xmas-photo--kitchen .xmas-photo__hex { --x: 20; --y: 50; --w: 677; --h: 677; width: calc(var(--w) * var(--u)); }
  .xmas-photo--living .xmas-photo__hex { --x: 584; --y: 171; --w: 375; --h: 375; width: calc(var(--w) * var(--u)); }
  .xmas-photo--hallway .xmas-photo__hex { --x: 487; --y: 560; --w: 417; --h: 417; width: calc(var(--w) * var(--u)); }

  .xmas-photo__tie {
    display: block;
  }

  .xmas-photo--kitchen .xmas-photo__tie {
    --x: 340.5; --y: 0; --w: 45.47; --h: 51.63;
    background-image: url('img/kitchen-bow.svg');
    transform: scaleX(-1);
  }

  .xmas-photo--living .xmas-photo__tie {
    --x: 752.5; --y: 0; --w: 45.47; --h: 172.63;
    background-image: url('img/living-line.svg');
    transform: scaleX(-1);
  }

  .xmas-photo--hallway .xmas-photo__tie {
    --x: 669.35; --y: 0; --w: 45.47; --h: 561.63;
    background-image: url('img/hallway-line.svg');
  }

  /* Introduction text */
  .xmas-intro__heading {
    --x: 985; --y: 208; --w: 593;
    font-size: calc(var(--u) * 45);
    line-height: calc(var(--u) * 49);
  }

  .xmas-intro__script {
    --x: 1043; --y: 390; --w: 476;
    margin: 0;
    padding: 0;
    background: none;
    font-size: calc(var(--u) * 100);
    line-height: calc(var(--u) * 40);
    white-space: nowrap;
  }

  /* On desktop the amber band is drawn by the section background */
  .xmas-intro__script::before,
  .xmas-intro__script::after {
    content: none;
  }

  .xmas-intro__content {
    --x: 988; --y: 546; --w: 592;
    margin: 0;
    text-align: left;
  }

  .xmas-copy {
    font-size: max(14px, calc(var(--u) * 20));
  }

  .xmas-copy br {
    display: inline;
  }

  /* Package text */
  .xmas-package__pre,
  .xmas-package__post {
    width: auto;
    font-size: calc(var(--u) * 100);
    line-height: calc(var(--u) * 40);
    white-space: nowrap;
    transform: translateX(-50%);
  }

  .xmas-package__pre { --x: 583.5; --y: 1062; }
  .xmas-package__post { --x: 1318; --y: 1208; }

  .xmas-package__title {
    --x: 546; --y: 1102; --w: 829;
    margin: 0;
    padding: 0;
    background: none;
    font-size: calc(var(--u) * 55);
    line-height: calc(var(--u) * 49);
    letter-spacing: calc(var(--u) * 16.5);
  }

  .xmas-package__content {
    --x: 337; --y: 1339; --w: 592;
    padding: 0;
  }

  /* keep the second paragraph's lines clear of the red badge */
  .xmas-package__content p + p {
    max-width: calc(var(--u) * 530);
  }

  /* The small print again, centred along the foot of the section: the package
     hexagon ends at 1993 and the section at 2040, so it holds one line (the
     field is limited to 120 characters, which fits 1200 wide). */
  .xmas-package__disclaimer {
    --x: 360; --y: 2002; --w: 1200;
    max-width: none;
    margin: 0;
    padding: 0;
    font-size: max(11px, calc(var(--u) * 16));
    line-height: 1.3;
    text-align: center;
  }

  /* The package hexagon, with the two deposit offers either side of its foot and an OR on each join */
  .xmas-package__box { --x: 939; --y: 1293; --w: 700; --h: 700; }
  .xmas-package__badge { --w: 220; --h: 220; margin: 0; }
  .xmas-package__badge--1 { --x: 800; --y: 1745; }
  .xmas-package__badge--2 { --x: 1558; --y: 1745; }
  .xmas-or--pkg { --w: 45; --h: 52; }
  .xmas-or--pkg-1 { --x: 997.5; --y: 1800; }
  .xmas-or--pkg-2 { --x: 1535.5; --y: 1800; }

  /* ---- Call to action (440 tall) ---- */
  .xmas-cta {
    padding: 0;
  }

  .xmas-cta .xmas-stage {
    --sh: 440;
  }

  .xmas-deco--lights-footer {
    --x: -147.52; --y: 14.9; --w: 2081.26; --h: 162.35;
    background-image: url('img/lights-footer.svg');
  }

  .xmas-cta__heading {
    --x: 420; --y: 245; --w: 1080;
    font-size: calc(var(--u) * 100);
    line-height: calc(var(--u) * 40);
    white-space: nowrap;
  }

  .xmas-cta__text {
    --x: 444; --y: 332; --w: 1033;
    margin: 0;
    font-size: max(16px, calc(var(--u) * 25));
  }

  /* ---- Form ---- */
  .xmas-form {
    padding: calc(var(--u) * 46) 20px calc(var(--u) * 84);
  }
}

/* =========================================================
   Drifting snowflakes (desktop, and only if motion is welcome)
   Each flake spins slowly and bobs up and down, at its own pace and
   starting point, so they never move in step. The spin and bob use the
   separate `rotate` and `translate` properties so they can run together.
   ========================================================= */
@media (min-width: 1200px) and (prefers-reduced-motion: no-preference) {
  @keyframes xmas-bob {
    to {
      translate: 0 calc(var(--u) * 18);
    }
  }

  @keyframes xmas-spin {
    to {
      rotate: calc(var(--dir) * 360deg);
    }
  }

  .xmas-snow {
    animation:
      xmas-bob var(--bob) ease-in-out var(--delay) infinite alternate,
      xmas-spin var(--spin) linear var(--delay) infinite;
  }

  /* bob (s), spin (s), start offset (s), spin direction */
  .xmas-snow--a { --bob: 9s;  --spin: 70s; --delay: -2s;  --dir: 1; }
  .xmas-snow--b { --bob: 11s; --spin: 90s; --delay: -6s;  --dir: -1; }
  .xmas-snow--c { --bob: 8s;  --spin: 60s; --delay: -4s;  --dir: 1; }
  .xmas-snow--d { --bob: 12s; --spin: 80s; --delay: -9s;  --dir: -1; }
  .xmas-snow--e { --bob: 10s; --spin: 75s; --delay: -1s;  --dir: 1; }
  .xmas-snow--f { --bob: 7s;  --spin: 55s; --delay: -5s;  --dir: -1; }
  .xmas-snow--g { --bob: 13s; --spin: 95s; --delay: -8s;  --dir: 1; }
  .xmas-snow--h { --bob: 9s;  --spin: 65s; --delay: -3s;  --dir: 1; }
  .xmas-snow--i { --bob: 11s; --spin: 85s; --delay: -7s;  --dir: -1; }
  .xmas-snow--j { --bob: 8s;  --spin: 70s; --delay: -2s;  --dir: 1; }
  .xmas-snow--k { --bob: 12s; --spin: 60s; --delay: -10s; --dir: -1; }
  .xmas-snow--l { --bob: 10s; --spin: 90s; --delay: -5s;  --dir: 1; }
  .xmas-snow--m { --bob: 9s;  --spin: 75s; --delay: -4s;  --dir: -1; }
}

.xmas-write {
  display: inline-block;
}

/* =========================================================
   Hexagon pop-in (only if motion is welcome)
   The hero badges pop in as the page loads. The package hexagon and its
   badge pop in when scrolled into view: christmas.js adds .xmas-js to the
   page, which is what hides them until it adds .is-in, so without the
   script they are simply there.
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  @keyframes xmas-pop {
    0% {
      opacity: 0;
      scale: 0.4;
    }

    65% {
      opacity: 1;
      scale: 1.08;
    }

    100% {
      opacity: 1;
      scale: 1;
    }
  }

  .xmas-offers .xmas-badge,
  .xmas-offers .xmas-or {
    animation: xmas-pop 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }

  .xmas-offer--1 { animation-delay: 0.3s; }
  .xmas-or--1 { animation-delay: 0.4s; }
  .xmas-offer--2 { animation-delay: 0.5s; }
  .xmas-or--2 { animation-delay: 0.6s; }
  .xmas-offer--3 { animation-delay: 0.7s; }

  .xmas-js .xmas-pop:not(.is-in) {
    opacity: 0;
    scale: 0.4;
  }

  .xmas-pop.is-in {
    animation: xmas-pop 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }

  .xmas-or--pkg-1.is-in,
  .xmas-package__badge--1.is-in {
    animation-delay: 0.25s;
  }

  .xmas-or--pkg-2.is-in,
  .xmas-package__badge--2.is-in {
    animation-delay: 0.4s;
  }
}

/* =========================================================
   Script heading write-on (only if motion is welcome)
   The two title lines are wiped on from the left one after the other, like
   handwriting, using the same inset clip as the home slider's Christmas
   slide. `backwards` hides each line until its turn and leaves it
   unclipped afterwards, so nothing is cut off once it has been written.
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  @keyframes xmas-wipe {
    from {
      clip-path: inset(var(--wipe-v, -40%) 100% var(--wipe-v, -40%) -8%);
    }

    to {
      clip-path: inset(var(--wipe-v, -40%) -8% var(--wipe-v, -40%) -8%);
    }
  }

  .xmas-hero__line > span {
    animation: xmas-wipe 0.9s cubic-bezier(0.4, 0, 0.2, 1) backwards;
  }

  .xmas-hero__line--1 > span {
    animation-delay: 0.15s;
  }

  .xmas-hero__line--2 > span {
    animation-delay: 1.05s;
  }

  /* The headings further down are written on as they scroll into view:
     christmas.js adds .xmas-js to the page, which is what hides them until
     it adds .is-in. Their text is much taller than its line box, so the
     clip is made tall enough not to cut it. */
  .xmas-write {
    --wipe-v: -250%;
  }

  .xmas-js .xmas-write:not(.is-in) {
    clip-path: inset(var(--wipe-v) 100% var(--wipe-v) -8%);
  }

  .xmas-write.is-in {
    animation: xmas-wipe 0.9s cubic-bezier(0.4, 0, 0.2, 1) 0.1s backwards;
  }

  .xmas-cta__heading .xmas-write.is-in {
    animation-duration: 1.5s;
  }
}

