/* Homepage accents only; the header, hero and purchase pages keep their styles. */
#homepage-layout .chp-origin-heading,
#homepage-layout .chp-sec-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.4vw, 17px);
  min-width: 0;
  max-width: 100%;
  text-align: center;
}

/* Replace the older flanking rules, diamonds and duplicate underline. */
#homepage-layout .chp-origin-heading::before,
#homepage-layout .chp-origin-heading::after,
#homepage-layout .chp-origin-heading h2::before,
#homepage-layout .chp-sec-head h2::before,
#homepage-layout .chp-news-top h2::before {
  content: none !important;
  display: none !important;
  animation: none !important;
}
#homepage-layout .chp-sec-head .chp-sec-underline { display: none; }

#homepage-layout .chp-origin-heading h2,
#homepage-layout .chp-sec-head h2,
#homepage-layout .chp-news-top h2 {
  position: relative;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0 0 19px;
  color: #142139;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: clamp(1.5rem, 2.6vw, 2.125rem) !important;
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: .012em;
  white-space: normal !important;
  word-break: normal;
  overflow-wrap: normal;
  text-wrap: balance;
  background: none;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  filter: none;
  text-shadow: none;
  transform: none;
  animation: none !important;
}
#homepage-layout .chp-origin-heading h2::after,
#homepage-layout .chp-sec-head h2::after,
#homepage-layout .chp-news-top h2::after {
  content: "";
  display: block;
  position: absolute;
  inset: auto auto 0 50%;
  width: clamp(84px, 9vw, 124px);
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(201, 160, 75, .14), #c7a153 48%, rgba(201, 160, 75, .14));
  box-shadow: 0 3px 10px rgba(191, 151, 67, .12);
  transform: translateX(-50%);
  animation: homepage-heading-line 5.6s ease-in-out infinite;
}

/* News retains its useful left-aligned heading and introductory copy. */
#homepage-layout .chp-news-top { flex-wrap: wrap; gap: 16px; }
#homepage-layout .chp-news-top > div { flex: 1 1 260px; min-width: 0; }
#homepage-layout .chp-news-top h2 { display: inline-block; text-align: left; text-transform: none; }
#homepage-layout .chp-news-top h2::after { left: 0; transform: none; }
#homepage-layout .chp-news-top h2 + p { margin-top: 12px; }

/* Decorative sparks move independently; heading text remains still. */
#homepage-layout .chp-origin-heading .chp-heading-burst,
#homepage-layout .chp-sec-head .chp-sec-spark {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: clamp(20px, 2.1vw, 27px);
  height: clamp(20px, 2.1vw, 27px);
  color: #c5a055;
  opacity: 1;
  background: none !important;
  filter: none;
  transform-origin: center;
  animation: homepage-heading-turn 36s linear infinite !important;
}
#homepage-layout .chp-origin-heading .chp-heading-burst > *,
#homepage-layout .chp-sec-head .chp-sec-spark > * { visibility: hidden; }
#homepage-layout .chp-origin-heading .chp-heading-burst::before,
#homepage-layout .chp-sec-head .chp-sec-spark::before {
  content: "";
  position: absolute;
  inset: 1px;
  background:
    linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat,
    linear-gradient(90deg, currentColor, currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(45deg, transparent 48%, currentColor 49%, currentColor 51%, transparent 52%) center / 100% 100% no-repeat,
    linear-gradient(-45deg, transparent 48%, currentColor 49%, currentColor 51%, transparent 52%) center / 100% 100% no-repeat;
  filter: drop-shadow(0 1px 5px rgba(197, 160, 85, .18));
  animation: homepage-heading-breathe 5.6s ease-in-out infinite;
}
#homepage-layout .chp-origin-heading .chp-heading-burst:last-child,
#homepage-layout .chp-sec-head .chp-sec-spark:last-child { animation-direction: reverse !important; }
#homepage-layout .chp-origin-heading .chp-heading-burst:last-child::before,
#homepage-layout .chp-sec-head .chp-sec-spark:last-child::before { animation-delay: -2.8s; }

/* Preserve each category's original green or red fill. */
#homepage-layout .chp-origin-category.is-green { --homepage-cta-rgb: 8, 116, 45; }
#homepage-layout .chp-origin-category.is-red { --homepage-cta-rgb: 217, 8, 18; }
#homepage-layout .chp-origin-category .chp-category-title {
  line-height: 1.18;
  letter-spacing: .008em;
  text-wrap: balance;
}
#homepage-layout .chp-origin-category .chp-category-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  justify-content: center;
  min-height: 42px;
  max-width: 100%;
  padding: 9px 20px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  color: #fff;
  font-size: .8125rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .03em;
  white-space: normal;
  box-shadow: 0 7px 17px rgba(var(--homepage-cta-rgb), .19);
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
  animation: homepage-category-glow 5.6s ease-in-out infinite;
}
#homepage-layout .chp-origin-category .chp-category-button::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -45%;
  bottom: -45%;
  left: 0;
  width: 38%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .24), transparent);
  opacity: 0;
  transform: translateX(-230%) skewX(-18deg);
  animation: homepage-category-shine 5.6s ease-in-out infinite;
}
#homepage-layout .chp-origin-category.is-red .chp-category-button,
#homepage-layout .chp-origin-category.is-red .chp-category-button::before { animation-delay: -2.8s; }
#homepage-layout .chp-origin-category:hover .chp-category-button,
#homepage-layout .chp-origin-category:focus-visible .chp-category-button {
  animation: none;
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 10px 23px rgba(var(--homepage-cta-rgb), .26);
}
#homepage-layout .chp-origin-category:focus-visible { outline: 3px solid #c5a055; outline-offset: 4px; }

@keyframes homepage-heading-turn { to { transform: rotate(180deg); } }
@keyframes homepage-heading-line {
  0%, 100% { opacity: .72; }
  50% { opacity: .96; }
}
@keyframes homepage-heading-breathe {
  0%, 100% { opacity: .62; transform: scale(.96); }
  50% { opacity: .94; transform: scale(1.04); }
}
@keyframes homepage-category-glow {
  0%, 62%, 100% { box-shadow: 0 7px 17px rgba(var(--homepage-cta-rgb), .17); }
  82% { box-shadow: 0 8px 22px rgba(var(--homepage-cta-rgb), .26); }
}
@keyframes homepage-category-shine {
  0%, 68% { opacity: 0; transform: translateX(-230%) skewX(-18deg); }
  74% { opacity: .65; }
  94%, 100% { opacity: 0; transform: translateX(420%) skewX(-18deg); }
}

@media (max-width: 420px) {
  #homepage-layout .chp-origin-heading,
  #homepage-layout .chp-sec-row { gap: 8px; }
  #homepage-layout .chp-origin-heading h2,
  #homepage-layout .chp-sec-head h2,
  #homepage-layout .chp-news-top h2 { letter-spacing: 0; }
  #homepage-layout .chp-origin-category .chp-category-button { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  #homepage-layout .chp-origin-heading h2::after,
  #homepage-layout .chp-sec-head h2::after,
  #homepage-layout .chp-news-top h2::after,
  #homepage-layout .chp-origin-heading .chp-heading-burst,
  #homepage-layout .chp-sec-head .chp-sec-spark,
  #homepage-layout .chp-origin-heading .chp-heading-burst::before,
  #homepage-layout .chp-sec-head .chp-sec-spark::before,
  #homepage-layout .chp-origin-category .chp-category-button,
  #homepage-layout .chp-origin-category .chp-category-button::before {
    animation: none !important;
    transition: none !important;
  }
  #homepage-layout .chp-origin-category:hover .chp-category-button,
  #homepage-layout .chp-origin-category:focus-visible .chp-category-button { transform: none; }
  #homepage-layout .chp-origin-category .chp-category-button::before { opacity: 0; }
}
