/*
 * Magia Flory — homepage repair/final layer, 2026-08-16.
 * Keeps the production header/footer identical to the rest of the storefront,
 * removes the brittle sprite composition and gives every lower homepage block
 * a stable, content-first layout.
 */

/* Header/footer use the same production container as every other page. */
.page-home--reference .announcement .container,
.page-home--reference .utility-bar .container,
.page-home--reference .site-header > .container,
.page-home--reference .mega-menu .container,
.page-home--reference .site-footer .container {
  width: min(calc(100% - 64px), var(--container)) !important;
  margin-inline: auto !important;
}

/* Hero: keep the approved composition, but never move it under the pointer. */
.page-home--reference .ref-hero__visual,
.page-home--reference .ref-hero__visual::before,
.page-home--reference .ref-hero__cms-figure {
  transform: none !important;
}

.page-home--reference .ref-hero__cms-image {
  opacity: 1 !important;
}

/* Stable interaction: colour/shadow can change, geometry cannot jump. */
.page-home--reference .ref-button,
.page-home--reference .ref-feeling,
.page-home--reference .ref-category,
.page-home--reference .home-product-card,
.page-home--reference .ref-review-card,
.page-home--reference .ref-review-card__link {
  transform: none !important;
}

@media (hover: hover) and (pointer: fine) {
  .page-home--reference .ref-button:hover,
  .page-home--reference .ref-feeling:hover,
  .page-home--reference .ref-category:hover,
  .page-home--reference .home-product-card:hover,
  .page-home--reference .ref-review-card__link:hover {
    transform: none !important;
  }

  .page-home--reference .ref-feeling:hover {
    border-color: rgba(255,255,255,.44);
    background: rgba(255,255,255,.11);
    box-shadow: 0 12px 26px rgba(7,31,17,.14);
  }

  .page-home--reference .ref-category:hover,
  .page-home--reference .home-product-card:hover,
  .page-home--reference .ref-review-card:hover {
    box-shadow: 0 18px 42px rgba(43,55,38,.09);
  }
}

/* Mood selector — real files in markup, no generated sprite and no pseudo art. */
.page-home--reference .ref-feelings__panel {
  overflow: hidden;
}

.page-home--reference .ref-feelings__head {
  align-items: end;
}

.page-home--reference .ref-feelings__head p,
.page-home--reference .ref-feelings__intro {
  color: rgba(255,255,255,.88) !important;
}

.page-home--reference .ref-feeling::after,
.page-home--reference .ref-feelings__grid > a::after {
  display: none !important;
  content: none !important;
  background: none !important;
}

.page-home--reference .ref-feeling {
  min-height: 224px;
  padding: 22px 12px 92px;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease !important;
}

.page-home--reference .ref-feeling svg,
.page-home--reference .ref-feeling b,
.page-home--reference .ref-feeling small {
  position: relative;
  z-index: 3;
}

.page-home--reference .ref-feeling__image {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: -10px;
  display: block !important;
  width: 84%;
  height: 94px;
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
  opacity: .84;
  filter: drop-shadow(0 9px 12px rgba(4,30,15,.13));
  transform: translateX(-50%) !important;
  pointer-events: none;
}

.page-home--reference .ref-feeling--energy .ref-feeling__image {
  width: 58%;
  height: 104px;
}

.page-home--reference .ref-feeling--harmony .ref-feeling__image,
.page-home--reference .ref-feeling--immunity .ref-feeling__image {
  width: 92%;
}

/* Collections — no absolute text/image collision. */
.page-home--reference .ref-categories {
  background: #fffdf9;
}

.page-home--reference .ref-category-grid {
  display: grid;
  grid-template-columns: minmax(0,1.18fr) repeat(2,minmax(0,.82fr));
  grid-template-rows: repeat(2,258px);
  gap: 18px;
}

.page-home--reference .ref-category {
  display: grid;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(35,72,41,.13);
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(45,60,39,.035);
  transition: border-color .2s ease, box-shadow .2s ease !important;
}

.page-home--reference .ref-category--feature {
  grid-row: 1 / 3;
  grid-template-rows: auto minmax(0,1fr);
  background: linear-gradient(145deg,#e8ede2,#f1f0e7);
}

.page-home--reference .ref-category:not(.ref-category--feature) {
  grid-template-columns: minmax(0,1.04fr) minmax(130px,.96fr);
  align-items: stretch;
}

.page-home--reference .ref-category--water { background: #edf4f3; }
.page-home--reference .ref-category--blend { background: #f6eee4; }
.page-home--reference .ref-category--ritual { background: #f8efd3; }
.page-home--reference .ref-category--practice { background: #edf1e8; }

.page-home--reference .ref-category__copy,
.page-home--reference .ref-category--feature .ref-category__copy {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  max-width: none;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px 28px 24px;
}

.page-home--reference .ref-category--feature .ref-category__copy {
  padding: 38px 40px 22px;
}

.page-home--reference .ref-category__number {
  margin-bottom: 16px;
  color: rgba(35,72,41,.55);
  font: 700 .58rem/1 var(--ref-ui);
  letter-spacing: .18em;
}

.page-home--reference .ref-category h3,
.page-home--reference .ref-category--feature h3 {
  max-width: 100%;
  margin: 0 0 12px;
  color: #315137;
  font: 500 clamp(1.7rem,2.35vw,2.45rem)/1 var(--ref-display);
  letter-spacing: -.03em;
}

.page-home--reference .ref-category--feature h3 {
  font-size: clamp(2.7rem,4vw,4rem);
}

.page-home--reference .ref-category p {
  max-width: 330px;
  margin: 0;
  color: #596359;
  font: 400 .76rem/1.6 var(--ref-ui);
}

.page-home--reference .ref-category b {
  display: grid;
  width: 36px;
  height: 36px;
  margin-top: auto;
  place-items: center;
  color: var(--ref-green);
  border: 1px solid rgba(35,72,41,.27);
  border-radius: 50%;
  background: rgba(255,255,255,.36);
  font: 650 .9rem/1 var(--ref-ui);
}

.page-home--reference .ref-category--feature b {
  display: inline-flex;
  width: auto;
  height: auto;
  margin-top: 20px;
  padding: 11px 18px;
  color: #fff;
  border: 0;
  border-radius: 999px;
  background: var(--ref-green);
  font: 650 .66rem/1 var(--ref-ui);
}

.page-home--reference .ref-category__media {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: hidden;
  margin: 14px 14px 14px 0;
  border-radius: 18px;
  background: rgba(255,255,255,.3);
}

.page-home--reference .ref-category--feature .ref-category__media {
  min-height: 0;
  margin: 0 24px 24px;
  border-radius: 28px 28px 18px 18px;
}

.page-home--reference .ref-category__media img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  transform: none !important;
}

.page-home--reference .ref-category--water .ref-category__media img,
.page-home--reference .ref-category--ritual .ref-category__media img,
.page-home--reference .ref-category--practice .ref-category__media img {
  object-fit: contain;
  padding: 8px;
}

/* Products — the same visual language as product recommendation cards. */
.page-home--reference .ref-products {
  background: linear-gradient(180deg,#f7f1e7,#fbf7ef);
}

.page-home--reference .ref-product-grid.product-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 22px;
}

.page-home--reference .ref-product-card.home-product-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgba(35,72,41,.14);
  border-radius: 22px 30px 24px 34px;
  background: rgba(255,255,255,.67);
  box-shadow: 0 8px 25px rgba(45,58,40,.04);
  transition: box-shadow .22s ease, border-color .22s ease !important;
}

.page-home--reference .home-product-card .product-card__media {
  position: relative;
  display: block;
  height: 315px;
  overflow: hidden;
  isolation: isolate;
  background: #e9e2d7;
}

.page-home--reference .home-product-card .product-card__media::after {
  display: none !important;
  content: none !important;
}

.page-home--reference .home-product-card .recommendation-product-art {
  position: relative;
  z-index: 1;
  display: block !important;
  width: 120%;
  max-width: none;
  height: 100%;
  margin-left: -20%;
  padding: 0;
  object-fit: cover;
  object-position: 68% center;
  opacity: 1 !important;
  transform: none !important;
  filter: none;
}

.page-home--reference .home-product-card .recommendation-product-bottle {
  position: absolute;
  z-index: 4;
  right: 16px;
  bottom: 14px;
  display: block !important;
  width: min(27%,94px);
  height: min(50%,174px);
  max-width: none;
  padding: 0;
  object-fit: contain;
  object-position: right bottom;
  opacity: 1 !important;
  background: transparent;
  border: 0;
  filter: drop-shadow(0 13px 15px rgba(30,49,25,.22));
  transform: none !important;
  pointer-events: none;
}

.page-home--reference .home-product-card .product-card__content {
  display: flex;
  min-height: 250px;
  flex: 1;
  flex-direction: column;
  padding: 24px 25px 25px;
}

.page-home--reference .home-product-card .product-type {
  margin: 0 0 9px;
  color: var(--ref-green);
  font: 700 .58rem/1.25 var(--ref-ui);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.page-home--reference .home-product-card h3 {
  margin: 0 0 8px;
  font: 500 1.72rem/1.05 var(--ref-display);
}

.page-home--reference .home-product-card h3 a {
  color: inherit;
  text-decoration: none;
}

.page-home--reference .home-product-card .latin {
  margin: 0;
  color: #767c72;
  font-size: .76rem;
}

.page-home--reference .home-product-card .ref-product-card__rating {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  color: var(--ref-gold);
  font: 600 .61rem/1 var(--ref-ui);
}

.page-home--reference .home-product-card .ref-product-card__rating b,
.page-home--reference .home-product-card .ref-product-card__rating small {
  color: #6d746a;
}

.page-home--reference .home-product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 22px;
}

.page-home--reference .home-product-card__footer > strong {
  font: 500 1.62rem/1 var(--ref-display);
}

.page-home--reference .home-product-card__footer form {
  margin: 0;
}

.page-home--reference .home-product-card .ref-cart-button {
  min-height: 40px;
  padding: 10px 17px;
  transition: background-color .2s ease, box-shadow .2s ease !important;
  transform: none !important;
}

/* Story — one clean photo, no decorative containers obscuring the founders. */
.page-home--reference .ref-story {
  background: #fffdf9;
}

.page-home--reference .ref-story__grid {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0,.9fr) minmax(430px,1.1fr);
  align-items: center;
  gap: clamp(55px,7vw,100px);
}

.page-home--reference .ref-story__copy {
  max-width: 570px;
}

.page-home--reference .ref-story__visual {
  position: relative;
  width: 100%;
  min-height: 0;
  margin: 0;
}

.page-home--reference .ref-story__photo {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 5 / 4;
  border: 1px solid rgba(35,72,41,.12);
  border-radius: 32px 48px 30px 58px;
  background: #ece6dc;
  box-shadow: 0 18px 48px rgba(47,57,40,.08);
}

.page-home--reference .ref-story__photo picture,
.page-home--reference .ref-story__photo img {
  display: block;
  width: 100%;
  height: 100%;
}

.page-home--reference .ref-story__photo img {
  object-fit: cover;
  object-position: center 34%;
  transform: none !important;
}

.page-home--reference .ref-story__photo-caption {
  max-width: 520px;
  margin: 14px 2px 0 !important;
  color: #657061 !important;
  font: italic 500 .96rem/1.45 var(--ref-display) !important;
}

.page-home--reference .ref-story blockquote {
  border-left: 1px solid rgba(35,72,41,.36);
  padding-left: 24px;
}

.page-home--reference .ref-story blockquote::before {
  display: none;
  content: none;
}

/* Reviews — independent visual, not the hero still-life. */
.page-home--reference .ref-reviews {
  background: #f5efe6;
}

.page-home--reference .ref-reviews__grid {
  display: grid;
  grid-template-columns: minmax(0,.92fr) minmax(460px,1.08fr);
  align-items: stretch;
  gap: 24px;
}

.page-home--reference .ref-reviews__visual {
  position: relative;
  display: grid;
  min-height: 440px;
  grid-template-rows: auto minmax(0,1fr);
  overflow: hidden;
  color: #fff;
  border-radius: 28px 40px 30px 50px;
  background: linear-gradient(145deg,#173f27,#245c35);
  box-shadow: 0 18px 44px rgba(32,54,35,.11);
}

.page-home--reference .ref-reviews__heading {
  position: relative;
  z-index: 2;
  max-width: none;
  padding: 38px 40px 28px;
}

.page-home--reference .ref-reviews h2 {
  margin: 14px 0 0;
  color: #fff;
  font-size: clamp(2.55rem,3.7vw,4rem);
  line-height: .98;
}

.page-home--reference .ref-reviews h2 em {
  color: #efe6d9;
}

.page-home--reference .ref-reviews__image {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  object-position: center;
  opacity: .92;
  filter: saturate(.88) contrast(1.02);
}

.page-home--reference .ref-review-card {
  display: flex;
  min-height: 440px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px,4vw,54px);
  border: 1px solid rgba(35,72,41,.1);
  border-radius: 28px 40px 30px 50px;
  background: #fffdf9;
  box-shadow: 0 14px 40px rgba(45,57,40,.06);
  transition: box-shadow .22s ease !important;
}

.page-home--reference .ref-review-card__link {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  color: var(--ref-green);
  font: 700 .67rem/1 var(--ref-ui);
  text-decoration: none;
}

.page-home--reference .ref-review-proof {
  margin-top: 28px;
}

/* Offline boutique — clean copy/image split, no floating SVG card. */
.page-home--reference .ref-boutique {
  padding-top: 48px;
  padding-bottom: 86px;
  background: #fffdf9;
}

.page-home--reference .ref-boutique__card {
  display: grid;
  min-height: 500px;
  grid-template-columns: minmax(360px,.82fr) minmax(0,1.18fr);
  overflow: hidden;
  border: 1px solid rgba(35,72,41,.12);
  border-radius: 28px 42px 30px 54px;
  background: #174c2b;
  box-shadow: 0 20px 52px rgba(32,54,35,.12);
}

.page-home--reference .ref-boutique__copy {
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: clamp(42px,5vw,64px);
  background: linear-gradient(145deg,#143f26,#1d5631);
}

.page-home--reference .ref-boutique h2 {
  margin: 15px 0 18px;
  color: #fff;
  font-size: clamp(3rem,4vw,4.5rem);
}

.page-home--reference .ref-boutique__copy > p {
  max-width: 490px;
  margin-bottom: 24px;
  color: rgba(255,255,255,.8) !important;
}

.page-home--reference .ref-boutique__meta {
  display: grid;
  gap: 13px;
  margin: 0 0 28px;
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,.17);
  border-bottom: 1px solid rgba(255,255,255,.17);
}

.page-home--reference .ref-boutique__meta span {
  display: grid;
  gap: 4px;
  color: rgba(255,255,255,.78);
  font: 500 .68rem/1.45 var(--ref-ui);
}

.page-home--reference .ref-boutique__meta b {
  color: #fff;
  font-size: .56rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.page-home--reference .ref-boutique__visual {
  position: relative;
  min-height: 500px;
  margin: 0;
  overflow: hidden;
  background: #d9d2c6;
}

.page-home--reference .ref-boutique__visual::after {
  display: none !important;
  content: none !important;
}

.page-home--reference .ref-boutique__visual > img:first-child {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  filter: saturate(.9) contrast(1.02);
  transform: none !important;
}

/* Reveal animation only runs once on scroll and never follows the pointer. */
.page-home--reference.home-motion-ready .mf-reveal {
  will-change: opacity, transform;
  transition: opacity .52s ease, transform .58s cubic-bezier(.2,.72,.2,1) !important;
}

.page-home--reference.home-motion-ready .mf-reveal.is-visible {
  will-change: auto;
}

@media (max-width: 1100px) {
  .page-home--reference .ref-feelings__grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }

  .page-home--reference .ref-category-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    grid-template-rows: auto;
  }

  .page-home--reference .ref-category--feature {
    grid-column: 1 / -1;
    grid-row: auto;
    grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr);
    grid-template-rows: auto;
    min-height: 420px;
  }

  .page-home--reference .ref-category--feature .ref-category__media {
    margin: 20px 20px 20px 0;
  }

  .page-home--reference .ref-category:not(.ref-category--feature) {
    min-height: 255px;
  }

  .page-home--reference .ref-product-grid.product-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .page-home--reference .ref-product-card:last-child {
    grid-column: auto;
    width: auto;
    justify-self: stretch;
  }

  .page-home--reference .ref-story__grid,
  .page-home--reference .ref-reviews__grid {
    grid-template-columns: 1fr;
  }

  .page-home--reference .ref-story__visual,
  .page-home--reference .ref-review-card {
    max-width: none;
  }

  .page-home--reference .ref-boutique__card {
    grid-template-columns: minmax(320px,.9fr) minmax(0,1.1fr);
  }
}

@media (max-width: 960px) {
  .page-home--reference .announcement .container,
  .page-home--reference .utility-bar .container,
  .page-home--reference .site-header > .container,
  .page-home--reference .mega-menu .container,
  .page-home--reference .site-footer .container {
    width: min(calc(100% - 48px), 820px) !important;
  }

  .page-home--reference .ref-category--feature {
    min-height: 390px;
  }

  .page-home--reference .ref-boutique__card {
    grid-template-columns: 1fr;
  }

  .page-home--reference .ref-boutique__visual {
    min-height: 420px;
  }
}

@media (max-width: 680px) {
  .page-home--reference .announcement .container,
  .page-home--reference .utility-bar .container,
  .page-home--reference .site-header > .container,
  .page-home--reference .mega-menu .container,
  .page-home--reference .site-footer .container {
    width: min(calc(100% - 32px), 640px) !important;
  }

  .page-home--reference .ref-feelings__panel {
    padding: 32px 18px 28px;
  }

  .page-home--reference .ref-feelings__grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
  }

  .page-home--reference .ref-feeling {
    min-height: 205px;
    padding-bottom: 82px;
  }

  .page-home--reference .ref-feeling__image {
    height: 82px;
  }

  .page-home--reference .ref-category-grid,
  .page-home--reference .ref-product-grid.product-grid {
    grid-template-columns: 1fr;
  }

  .page-home--reference .ref-category--feature,
  .page-home--reference .ref-category:not(.ref-category--feature) {
    grid-column: auto;
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .page-home--reference .ref-category__copy,
  .page-home--reference .ref-category--feature .ref-category__copy {
    min-height: 220px;
    padding: 26px;
  }

  .page-home--reference .ref-category__media,
  .page-home--reference .ref-category--feature .ref-category__media {
    min-height: 220px;
    margin: 0 14px 14px;
  }

  .page-home--reference .home-product-card .product-card__media {
    height: 300px;
  }

  .page-home--reference .ref-story__values,
  .page-home--reference .ref-product-proof,
  .page-home--reference .ref-review-proof {
    grid-template-columns: 1fr;
  }

  .page-home--reference .ref-story__values span,
  .page-home--reference .ref-product-proof > span {
    padding: 12px 0;
    border-left: 0;
    border-top: 1px solid rgba(35,72,41,.1);
  }

  .page-home--reference .ref-story__photo {
    aspect-ratio: 4 / 5;
    border-radius: 24px 32px 24px 38px;
  }

  .page-home--reference .ref-reviews__visual,
  .page-home--reference .ref-review-card {
    min-height: 0;
    border-radius: 24px 30px 24px 34px;
  }

  .page-home--reference .ref-reviews__heading,
  .page-home--reference .ref-review-card {
    padding: 30px 24px;
  }

  .page-home--reference .ref-reviews__image {
    min-height: 210px;
  }

  .page-home--reference .ref-boutique__copy {
    padding: 36px 24px;
  }

  .page-home--reference .ref-boutique__visual {
    min-height: 340px;
  }
}

@media (max-width: 560px) {
  .page-home--reference .ref-feelings__grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-home--reference .ref-feeling b {
    font-size: .94rem;
  }

  .page-home--reference .ref-feeling small {
    font-size: .58rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home--reference .mf-reveal,
  .page-home--reference .ref-button,
  .page-home--reference .ref-feeling,
  .page-home--reference .ref-category,
  .page-home--reference .home-product-card,
  .page-home--reference .ref-cart-button {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
