/* * Fonts */
@font-face {
  font-family: 'RU Maggi KC';
  src: url('../fonts/RU-Maggi-KC.woff2') format("woff2");
  font-weight: normal;
  font-style: normal
}
@font-face {
  font-family: 'Cookit';
  src: url('../fonts/Cookit-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal
}
@font-face {
  font-family: 'RU Maggi Bcwt';
  src: url('../fonts/RU-Maggi-Bcwt.woff2') format('woff2');
  font-weight: normal;
  font-style: normal
}
@font-face {
  font-family: 'Buckwheat TC';
  src: url('../fonts/Buckwheat-TC-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal
}

/* * Papirus custom properties */
.papirus {
  --lp-body-font-size: clamp(1rem, 0.968vw + 0.782rem, 1.75rem); /* 16px to 28px */
  --lp-body-line-height: 1;

  --lp-hero-spacing-x: var(--m-page-spacing-x);
  --lp-hero-spacing-y: calc(var(--m-logo-header-spacing-y) + var(--m-logo-header-size-y) + 1rem);
  --lp-hero-title-font-size: clamp(2.5rem, 3.226vw + 1.774rem, 5rem); /* 40px to 80px */
  --lp-hero-subtitle-font-size: clamp(1.5rem, 2.903vw + 0.847rem, 3.75rem); /* 24px to 34px */
  --lp-hero-subtitle-size-x: calc(100vw - var(--m-page-spacing-x) * 2);

  --lp-hero-product-cards-spacing-x: 0.375rem;
  --lp-hero-product-card-size-x: calc(var(--m-column-width-responsive) * 8);
  --lp-hero-product-card-shadow: drop-shadow(0.125rem 0.125rem 0.125rem hsla(var(--m-color-secondary-hsl) / var(--m-level-2)));

  --lp-features-subtitle-spacing-x: var(--m-page-spacing-x);
  --lp-features-title-font-size: clamp(1.625rem, 2.581vw + 1.044rem, 3.625rem); /* 26px to 58px */
  --lp-features-subtitle-font-size: clamp(0.625rem, 0.806vw + 0.444rem, 1.25rem); /* 10px to 20px */

  --lp-feature-title-font-size: 1.875rem; /* 30px */
  --lp-feature-note-font-size: clamp(0.625rem, 0.645vw + 0.48rem, 1.125rem); /* 10px to 18px */
  --lp-feature-image-size-x: 100%;
  --lp-feature-image-spacing-y: 0.625rem;
  --lp-feature-content-border-size: 1.125rem; /* 18px */
  --lp-feature-content-size-x: calc(var(--m-column-width-responsive) * 11 - var(--lp-feature-content-border-size));
  --lp-feature-content-size-y: clamp(11.375rem, 11.774vw + 8.726rem, 20.5rem) ; /* 182px to 328px */
  --lp-wide-feature-content-size-x: calc(var(--m-column-width-responsive) * 10 - var(--lp-feature-content-border-size));

  --lp-products-section-spacing-y: 0;
  --lp-products-title-font-size: clamp(2.5rem, 4.839vw + 1.411rem, 6.25rem); /* 40px to 100px */
  --lp-products-section-spacing-x: var(--m-page-spacing-x);
  --lp-products-spacing-y: clamp(5rem, 4.808vw + 2.692rem, 7.5rem); /* 80px to 120px */
  --lp-products-product-title-spacing-y: 2rem;
  --lp-products-product-title-font-size: 1.875rem; /* 30px */
  --lp-products-product-subtitle-font-size: 1.875rem; /* 30px */
  font-size: clamp(1rem, 0.19230769230769218rem + 1.682692307692308vw, 1.875rem);

  --lp-product-cards-spacing-x: 0;
  --lp-product-cards-spacing-y: clamp(5rem, 4.808vw + 2.692rem, 7.5rem); /* 80px to 120px */
  --lp-product-cards-spacing: var(--m-spacing-y-1);

  --lp-recipes-spacing-y: clamp(3.125rem, 2.451vw + 2.574rem, 3.75rem); /* 50px to 60px */
  --lp-recipes-header-spacing-y: 0.625rem; /* 10px */
  --lp-recipes-title-font-size: clamp(2.5rem, 0.49vw + 2.39rem, 2.625rem); /* 40px to 42px */
  --lp-recipes-subtitle-font-size: 1.25rem; /* 20px */
}
@media (min-width: 768px) {
  .papirus {
    --lp-hero-spacing-x: 0;
    --lp-hero-spacing-y: var(--m-page-spacing-y);
    --lp-hero-subtitle-size-x: calc(var(--m-column-width-responsive) * 18);
    --lp-hero-product-cards-spacing-x: .5rem;
    --lp-hero-product-card-size-x: calc(var(--m-column-width-responsive) * 6);
    --lp-hero-product-card-shadow: drop-shadow(0.25rem 0.25rem 0.25rem hsla(var(--m-color-secondary-hsl) / var(--m-level-2)));

    --lp-features-subtitle-spacing-x: 0;
    --lp-feature-title-font-size: clamp(1.875rem, 0.25961538461538436rem + 3.365384615384616vw, 3.625rem);
    --lp-feature-image-size-x: calc(var(--m-column-width-responsive) * 13);
    --lp-feature-image-spacing-y: 0;

    --lp-products-section-spacing-x: 0;
    --lp-products-section-spacing-y: var(--m-spacing-y-1);
    --lp-products-product-title-spacing-y: clamp(1rem, 0.07692307692307687rem + 1.9230769230769231vw, 2rem); /* 16px to 32px */
    --lp-products-product-title-font-size: clamp(1.25rem, 0.32692307692307687rem + 1.9230769230769231vw, 2.25rem); /* 20px to 36px */
    --lp-products-product-subtitle-font-size: clamp(1rem, 0.19230769230769218rem + 1.682692307692308vw, 1.875rem); /* 16px to 30px */

    --lp-product-cards-spacing-x: calc(var(--m-column-width-responsive) * 2);
    --lp-product-cards-spacing: var(--m-column-width-responsive);

    --lp-recipes-spacing-y: clamp(3.75rem, 4.808vw + 1.442rem, 6.25rem); /* 60px to 100px */
    --lp-recipes-header-spacing-y: clamp(0.625rem, 1.202vw + 0.048rem, 1.25rem); /* 10px to 20px */
    --lp-recipes-title-font-size: clamp(2.625rem, 4.567vw + 0.433rem, 5rem); /* 42px to 80px */
    --lp-recipes-subtitle-font-size: clamp(1.25rem, 2.404vw + 0.096rem, 2.5rem); /* 20px to 40px */
  }
}
@media (min-width: 1400px) {
  .papirus {
    --lp-hero-subtitle-size-x: calc(var(--m-column-width-responsive) * 12);
    --lp-hero-product-cards-spacing-x: 1.125rem;
  }
}

/* * Common styles */
.papirus {
  background-image: url('../images/bg-main.jpg');
  /* font-family: 'RU Maggi Bcwt', sans-serif; */
  font-size: var(--lp-body-font-size);
  line-height: var(--lp-body-line-height);
}
.papirus .brand-name {
  font-family: 'Buckwheat TC', sans-serif;
}
.papirus .brand-name + sup {
  font-family: 'RU Maggi Bcwt', sans-serif;
}
.papirus :is(h1, h2, h3) .brand-name {
  font-family: 'Buckwheat TC', sans-serif;
}
.papirus :is(h1, h2, h3, p, ul, dl, li) {
  margin-bottom: 0;
}

/* * Common product cards styles */
.lp-product-cards {
  display: flex;
  justify-content: center;
}
.lp-product-image img {
  width: 100%;
  height: auto;
}

/* * Hero banner */
.lp-hero-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: var(--lp-hero-spacing-y);
  color: #0F0F0F;
  text-transform: uppercase;
}
.lp-hero-banner header { margin-inline: var(--lp-hero-spacing-x); }
.lp-hero-title {
  font-family: 'RU Maggi KC', sans-serif;
  font-size: var(--lp-hero-title-font-size);
  line-height: 100%;
  text-align: center;
}
.lp-hero-subtitle {
  font-family: 'RU Maggi KC', sans-serif;
  width: var(--lp-hero-subtitle-size-x);
  font-size: var(--lp-hero-subtitle-font-size);
  line-height: 100%;
  text-align: center;
}
/* ** Products in Hero banner */
.lp-hero-banner .lp-product-cards {
  position: relative;
  margin: var(--m-spacing-y-2) 0;
}
.lp-hero-banner .lp-product-card {
  width: var(--lp-hero-product-card-size-x);
}
.lp-hero-banner .lp-product-card:nth-child(1) {
  margin-right: var(--lp-hero-product-cards-spacing-x);
  transform: rotate(-5deg) scale(0.95);
  transform-origin: bottom left;
}
.lp-hero-banner .lp-product-card:nth-child(3) {
  margin-left: var(--lp-hero-product-cards-spacing-x);
  transform: rotate(5deg) scale(0.95);
  transform-origin: bottom right;
}
.lp-hero-banner .lp-product-card img {
  filter: var(--lp-hero-product-card-shadow);
}

/* * Features section */
.lp-features header hgroup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-top: var(--lp-features-spacing-y);
  color: #0F0F0F;
  text-transform: uppercase;
  text-align: center;
}
.lp-features-title {
  font-family: 'RU Maggi Bcwt', sans-serif;
  font-size: var(--lp-features-title-font-size);
  line-height: 100%;
}
.lp-features-subtitle {
  margin-inline: var(--lp-features-subtitle-spacing-x);
  font-family: 'RU Maggi Bcwt', sans-serif;
  font-size: var(--lp-features-subtitle-font-size);
  line-height: 100%;
}
/* ** Features */
.lp-feature {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: var(--lp-feature-title-font-size);
}
@media (min-width: 768px) {
  .lp-feature { flex-direction: row; }
  .lp-feature:nth-of-type(1) { margin-top: clamp(1.25rem, 3.226vw + 0.524rem, 3.75rem); }
  .lp-feature:nth-of-type(2n+2) { flex-direction: row-reverse; }
}
/* *** Feature image */
.lp-feature-image {
  width: var(--lp-feature-image-size-x);
  margin-top: var(--lp-feature-image-spacing-y);
  z-index: 1;
}
.lp-feature-image img {
  /* max-width: 100%; */
  width: 100%;
}
/* *** Feature content wrapper */
.lp-feature-content {
  position: relative;
  height: var(--lp-feature-content-size-y);
  width: calc(100% - var(--m-page-spacing-x) - var(--lp-feature-content-border-size));
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 3rem;
  filter: drop-shadow(0 0.25rem 0.25rem hsla(var(--m-color-secondary-hsl) / var(--m-level-4)));
}
.lp-feature-content::before,
.lp-feature-content::after {
  content: "";
  position: absolute;
  top: 0;
  height: 100%;
  background-image: url('../images/bg-craft-paper-yellow.png');
}
.lp-feature-content::before { width: 100%; }
.lp-feature-content::after {
  width: var(--lp-feature-content-border-size);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 38'%3E%3Cpath fill='%23fff' d='M16 0H0v38h16v-8h-.5C8.04 30 2 25.08 2 19S8.04 8 15.5 8h.5V0Z'/%3E%3C/svg%3E");
  mask-repeat: repeat-y;
  mask-size: var(--lp-feature-content-border-size);
}
.lp-feature:nth-child(2n+2):not(.is-wide) .lp-feature-content { margin-left: calc(var(--m-page-spacing-x) + var(--lp-feature-content-border-size)); }
.lp-feature:nth-child(2n+2):not(.is-wide) .lp-feature-content::after {
  left: calc(var(--lp-feature-content-border-size) * -1);
  mask-position: left center;
  transform: rotateY(180deg);
}
.lp-feature:nth-child(2n+1):not(.is-wide) .lp-feature-content { margin-right: calc(var(--m-page-spacing-x) + var(--lp-feature-content-border-size)); }
.lp-feature:nth-child(2n+1):not(.is-wide) .lp-feature-content::after {
  right: calc(var(--lp-feature-content-border-size) * -1);
  mask-position: right center;
}
@media (min-width: 768px) {
  .lp-feature-content {
    width: var(--lp-feature-content-size-x);
  }
  .lp-feature-content::before { width: 100%; }
  .lp-feature-content::after {
    width: var(--lp-feature-content-border-size);
  }
  .lp-feature:nth-child(2n+2):not(.is-wide) .lp-feature-content { margin-left: var(--lp-feature-content-border-size); }
  .lp-feature:nth-child(2n+2):not(.is-wide) .lp-feature-content::after {
    left: calc(var(--lp-feature-content-border-size) * -1);
  }
  .lp-feature:nth-child(2n+1):not(.is-wide) .lp-feature-content { margin-right: var(--lp-feature-content-border-size); }
  .lp-feature:nth-child(2n+1):not(.is-wide) .lp-feature-content::after {
    right: calc(var(--lp-feature-content-border-size) * -1);
  }
}
/* **** Feature with full width stripe */
.lp-feature.is-wide {
  margin-top: 1.625rem;
  background-image: url('../images/bg-craft-paper-yellow.png');
}
.lp-feature.is-wide .lp-feature-content::before,
.lp-feature.is-wide .lp-feature-content::after {
  display: none;
}
@media (min-width: 768px) {
  .lp-feature.is-wide {
    margin-top: 0;
    background-image: none;
  }
  .lp-feature.is-wide .lp-feature-content {
    width: var(--lp-wide-feature-content-size-x);
    padding-left: var(--lp-feature-content-border-size);
  }
  .lp-feature.is-wide .lp-feature-content::before,
  .lp-feature.is-wide .lp-feature-content::after {
    display: initial;
  }
  .lp-feature.is-wide .lp-feature-content:before {
    width: calc(var(--m-column-width-responsive) * 23 - var(--lp-feature-content-border-size));
    left: 0;
    z-index: 0;
  }
  .lp-feature.is-wide .lp-feature-content:after {
    left: calc(var(--lp-feature-content-border-size) * -1);
    mask-position: right center;
    transform: rotateY(180deg);
  }
}
/* *** Feature text content */
.lp-feature-title {
  font-family: 'RU Maggi Bcwt', sans-serif;
  font-size: inherit;
  line-height: 100%;
  text-transform: uppercase;
  text-align: center;
  white-space: pre;
  z-index: 1;
}
.lp-feature-note {
  position: absolute;
  bottom: 1.125rem;
  font-size: var(--lp-feature-note-font-size);
  text-align: center;
  z-index: 1;
}
/* *** Feature decor */
@media (min-width: 768px) {
  /* *** Feature decor */
  .lp-feature:nth-of-type(1)::after,
  .lp-feature:nth-of-type(2)::after,
  .lp-feature:nth-of-type(4)::after {
    content: "";
    position: absolute;
    width: calc(var(--m-column-width-responsive) * 5);
    aspect-ratio: 9/10;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 2;
  }
  .lp-feature:nth-of-type(1)::after {
    left: 0;
    top: calc(100% - 1.25em);
    background-image: url(../images/decor-1.png);
    background-position: left top;
  }
  .lp-feature:nth-of-type(2)::after {
    right: 0;
    top: calc(100% - 0.5em);
    background-image: url(../images/decor-2.png);
    background-position: right top;
  }
  .lp-feature:nth-of-type(4)::after {
    left: 0;
    top: calc(100% - 1em);
    background-image: url(../images/decor-3.png);
    background-position: left top;
  }
}

/* * Product section */
.lp-products {
  position: relative;
  margin-top: var(--lp-products-section-spacing-y);
  padding-block: var(--lp-products-spacing-y);
  padding-inline: var(--lp-products-section-spacing-x);
  background-image: url('../images/bg-craft-paper-brown.jpg');
  background-repeat: repeat;
  background-size: contain;
  color: var(--m-color-white);
  text-align: center;
}
/* ** Decorative perforation of product section */
.lp-products::before,
.lp-products::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 16px;
  background-image: url('../images/bg-craft-paper-brown.jpg');
  background-repeat: repeat-x;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 45 16'%3E%3Cpath fill='%23fff' d='M45 16V0H0v16h9.47v-.5C9.47 8.04 15.3 2 22.5 2c7.2 0 13.03 6.04 13.03 13.5v.5H45Z'/%3E%3C/svg%3E");
  mask-repeat: repeat-x;
  mask-size: 2.8125rem;
}
.lp-products::before {
  top: -16px;
  transform: rotateX(180deg);
}
.lp-products::after { bottom: -16px; }
/* ** Products section header */
.lp-products header {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lp-products-title {
  font-family: 'RU Maggi KC', sans-serif;
  font-size: var(--lp-products-title-font-size);
  line-height: 100%;
}
/* ** Products */
.lp-products .lp-product-cards {
  margin-top: var(--lp-product-cards-spacing-y);
  padding-inline: var(--lp-product-cards-spacing-x);
  gap: var(--lp-product-cards-spacing);
  flex-direction: column;
}
@media (min-width: 768px) {
  .lp-products .lp-product-cards {
    flex-direction: row;
  }
}
.lp-products .lp-product-cards .lp-product {
  position: relative;
  flex: 0 0 calc(var(--m-column-width-responsive) * 6);
  text-transform: uppercase;
}
/* *** Product images */
.lp-product-gallery {
  position: relative;
  width: calc(var(--m-column-width-responsive)* 14);
  margin: 0 auto;
  filter: drop-shadow(0.25rem 0.25rem 0.25rem hsla(var(--m-color-secondary-hsl) / var(--m-level-2)));
}
@media (min-width: 768px) {
  .lp-product-gallery {
    width: unset;
  }
}
.lp-product-gallery .lp-product-image {
  padding-inline: calc(var(--m-column-width-responsive) * 0.5);
}
.lp-product-gallery .lp-product-cover {
  position: relative;
  filter: drop-shadow(0.1875rem 0.1875rem 0.1875rem hsla(var(--m-color-secondary-hsl) / var(--m-level-3)));
  z-index: 2;
}
.lp-product-gallery .lp-product-paper {
  position: absolute;
  top: -2rem;
  transform: rotateZ(10deg) scaleY(0.9) scaleX(1.1);
  z-index: 1;
}
/* *** Product text content */
.lp-products .lp-product-cards .lp-product-card hgroup {
  padding-inline: 16px;
}
.lp-products .lp-product-cards .lp-product-title {
  position: relative;
  margin-top: 1.25rem;
  background-color: var(--lp-product-title-color);
  padding-block: var(--lp-products-product-title-spacing-y);
  margin-inline: -0.5rem;
  font-size: var(--lp-products-product-title-font-size);
  font-family: 'RU Maggi KC', sans-serif;
  filter: drop-shadow(0 0.1875rem 0.1875rem hsla(var(--m-color-black-hsl) / var(--m-level-4)));
}
.lp-products .lp-product-cards .lp-product-title::before,
.lp-products .lp-product-cards .lp-product-title::after {
  content: "";
  position: absolute;
  top: 0;
  height: 100%;
  width: 16px;
  background-color: var(--lp-product-title-color);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 45'%3E%3Cpath fill='%23fff' d='M0-23.5h16v9.47h-.5C8.04-14.03 2-8.2 2-1c0 7.2 6.04 13.03 13.5 13.03h.5v18.94h-.5C8.04 30.97 2 36.8 2 44c0 7.2 6.04 13.03 13.5 13.03h.5v9.47H0v-90Z'/%3E%3C/svg%3E");
  mask-repeat: repeat-y;
  mask-size: 16px;
  mask-position: center center;
}
.lp-products .lp-product-cards .lp-product-title::before {
  left: -16px;
  transform: rotateY(180deg);
}
.lp-products .lp-product-cards .lp-product-title::after { right: -16px; }
.lp-products .lp-product-cards .lp-product-subtitle {
  margin-top: 1.25rem;
  font-family: 'RU Maggi Bcwt', sans-serif;
  font-size: var(--lp-products-product-subtitle-font-size);
}
.lp-products .lp-product-cards .lp-product a.stretched-link::after {
  z-index: 3;
}

/* ** Recipes */
.lp-recipes {
  position: relative;
  padding-top: var(--lp-recipes-spacing-y);
  padding-inline: calc(var(--m-column-width-responsive) * 2);
}
@media (min-width: 768px) {
  .lp-recipes::before {
    content: "";
    position: absolute;
    top: -3em;
    right: 0;
    width: calc(var(--m-column-width-responsive) * 5);
    aspect-ratio: 9/10;
    background-image: url(../images/decor-4.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: right top;
    z-index: 2;
  }
}
.lp-recipes header {
  text-align: center;
}
.lp-recipes-title {
  font-family: 'RU Maggi KC', sans-serif;
  font-size: var(--lp-recipes-title-font-size);
  line-height: 100%;
}
.lp-recipes-subtitle {
  margin-top: var(--lp-recipes-header-spacing-y);
  font-family: 'RU Maggi Bcwt', sans-serif;
  font-size: var(--lp-recipes-subtitle-font-size);
  line-height: 100%;
  text-transform: uppercase;
}
.lp-recipes .lp-recipes-list {
  margin-block: var(--lp-recipes-spacing-y);
}

/* * Animation on scroll */
.js-scroll {
  opacity: 0;
  transition: opacity 500ms;
}
.js-scroll.scrolled {
  opacity: 1;
}
.scrolled.slide-left {
  animation: slide-in-left 1s ease-in-out both;
}
.scrolled.slide-right {
  animation: slide-in-right 1s ease-in-out both;
}
@keyframes slide-in-left {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slide-in-right {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}
