/* MRVËY commerce chapters
   Isolated Product and Pricing refinements for the 2026 fashion-led system. */

:is(.story-page--products, .story-page--pricing) {
  --story-ink: var(--brand-ink, #10120f);
  --story-ink-soft: #171a15;
  --story-paper: var(--brand-paper-bright, #fbfcf8);
  --story-paper-soft: var(--brand-paper, #f4f5f0);
  --story-white: #fbfcf8;
  --story-green: var(--brand-green, #9be879);
  --story-green-deep: var(--brand-green-deep, #7eae00);
  --story-cobalt: var(--brand-cobalt, #5865ff);
  --story-cobalt-soft: #e3e5ff;
  --story-line: rgba(11, 12, 11, 0.17);
  --story-line-light: rgba(251, 252, 248, 0.18);
  --story-ease: var(--brand-ease, cubic-bezier(.22, 1, .36, 1));
  color: var(--story-ink);
  background: var(--story-paper-soft);
  font-family: var(--brand-body, "Hanken Grotesk", sans-serif);
}

:is(.story-page--products, .story-page--pricing),
:is(.story-page--products, .story-page--pricing) :is(button, summary) {
  font-family: var(--brand-body, "Hanken Grotesk", sans-serif);
}

:is(.story-page--products, .story-page--pricing) :is(h1, h2, h3) {
  font-family: var(--brand-display, "Hanken Grotesk", sans-serif);
  font-synthesis: none;
}

:is(.story-page--products, .story-page--pricing) h1 {
  line-height: .86;
  letter-spacing: -.06em;
}

:is(.story-page--products, .story-page--pricing) h2 {
  line-height: .9;
  letter-spacing: -.052em;
}

:is(.story-page--products, .story-page--pricing) h3 {
  line-height: .98;
  letter-spacing: -.038em;
}

:is(.story-page--products, .story-page--pricing) :is(
  .story-button,
  .story-text-link,
  .story-choice,
  .story-mini-choice,
  .story-details summary,
  .story-decoration__choice span,
  .story-price-anchors span,
  .story-small-order__facts span
) {
  font-family: var(--brand-body, "Hanken Grotesk", sans-serif) !important;
  letter-spacing: .01em !important;
  text-transform: none;
}

:is(.story-page--products, .story-page--pricing) :is(.story-button, .story-text-link) {
  font-size: 13px;
  font-weight: 700;
}

:is(.story-page--products, .story-page--pricing) .story-button {
  min-height: 52px;
  padding-inline: 25px;
}

:is(.story-page--products, .story-page--pricing) .story-text-link {
  font-size: 13px;
}

:is(.story-page--products, .story-page--pricing) .story-choice {
  min-height: 46px;
  padding-inline: 20px;
  border-radius: 0;
  font-size: 13px;
  font-weight: 700;
}

:is(.story-page--products, .story-page--pricing) .story-mini-choice {
  min-height: 44px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 700;
}

:is(.story-page--products, .story-page--pricing) .story-details summary {
  font-size: 13px;
  font-weight: 700;
}

/* Products */

.story-page--products .story-products-hero,
.story-page--products .story-product,
.story-page--products .story-contact {
  background: var(--story-paper-soft);
}

.story-page--products .story-products-hero h1 {
  max-width: 9.8ch;
}

.story-page--products .story-campaign {
  background:
    linear-gradient(135deg, rgba(251, 252, 248, .22), transparent 44%),
    var(--story-green);
}

.story-page--products .story-campaign::before {
  color: rgba(11, 12, 11, .10);
  font-family: var(--brand-display, "Hanken Grotesk", sans-serif);
  letter-spacing: -.065em;
}

.commerce-product-controls {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  max-width: var(--story-max);
  margin: 0 auto 28px;
}

.story-page--products .story-product__tabs {
  position: static;
  top: auto;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  background: transparent;
}

.commerce-colour-picker {
  min-width: 0;
}

.commerce-colour-picker__title {
  margin: 0 0 10px;
  color: rgba(11, 12, 11, .58);
  font-size: 13px !important;
  line-height: 1.3 !important;
}

.commerce-colour-picker__title strong {
  color: var(--story-ink);
  font-weight: 700;
}

.commerce-colour-picker__choices {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.commerce-colour-choice {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 5px 12px 5px 6px;
  color: var(--story-ink);
  background: transparent;
  border: 1px solid rgba(11, 12, 11, .28);
  border-radius: 0;
  font-family: var(--brand-body, "Hanken Grotesk", sans-serif);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  touch-action: manipulation;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.commerce-colour-choice:hover {
  border-color: var(--story-ink);
}

.commerce-colour-choice.is-active {
  color: var(--story-white);
  background: var(--story-ink);
  border-color: var(--story-ink);
}

.commerce-colour-choice[hidden] {
  display: none;
}

.commerce-colour-choice__chip {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid rgba(11, 12, 11, .22);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(251, 252, 248, .18);
}

.commerce-colour-choice__chip--taupe { background: #817b68; }
.commerce-colour-choice__chip--olive { background: #67684f; }
.commerce-colour-choice__chip--charcoal { background: #343633; }
.commerce-colour-choice__chip--ivory { background: #ece8d6; }
.commerce-colour-choice__chip--loden { background: #596047; }

.story-page--products .story-product__stage {
  background: var(--story-paper);
  border-color: var(--story-line);
}

.story-page--products .commerce-product-media {
  --commerce-enter-x: 0%;
  --commerce-exit-x: 0%;
  background:
    radial-gradient(circle at 50% 35%, rgba(155, 232, 121, .16), transparent 40%),
    var(--story-ink);
}

.story-page--products .story-product__visual > .commerce-product__image {
  position: absolute;
  inset: 8% 8% 10%;
  z-index: 2;
  width: 84%;
  height: 82%;
  max-width: none;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(var(--commerce-enter-x), 1.2%, 0) scale(.982);
  filter: drop-shadow(0 31px 32px rgba(0, 0, 0, .34));
  will-change: opacity, transform;
  transition:
    opacity 300ms ease,
    transform 520ms var(--story-ease),
    filter 520ms ease;
}

.story-page--products .story-product__visual > .commerce-product__image.is-active {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.story-page--products .story-product__visual > .commerce-product__image.is-leaving {
  opacity: 0;
  transform: translate3d(var(--commerce-exit-x), -.5%, 0) scale(.988);
}

.story-page--products [data-commerce-product-state="tee"] > .commerce-product__image {
  inset: 11% 13% 12%;
  width: 74%;
  height: 77%;
}

.story-page--products .commerce-product__shadow {
  left: 20%;
  bottom: 9.5%;
  width: 60%;
  height: 7%;
  opacity: .58;
  transform: scaleX(1);
  transform-origin: center;
  background: rgba(0, 0, 0, .62);
  filter: blur(16px);
  transition:
    left 520ms var(--story-ease),
    bottom 520ms var(--story-ease),
    width 520ms var(--story-ease),
    height 520ms var(--story-ease),
    opacity 320ms ease,
    transform 520ms var(--story-ease);
}

.story-page--products [data-commerce-product-state="tee"] .commerce-product__shadow {
  left: 29%;
  bottom: 12%;
  width: 42%;
  height: 5%;
  opacity: .38;
}

.story-page--products [data-commerce-view-state="back"] .commerce-product__shadow {
  transform: scaleX(.94);
}

.story-page--products .commerce-product-media.is-swapping .commerce-product__shadow {
  opacity: .26;
  transform: scaleX(.82);
}

.story-page--products .story-product__copy {
  background: var(--story-paper);
}

.story-page--products .story-product__panel.is-active {
  animation: commerce-copy-in 440ms var(--story-ease) both;
}

.story-page--products .story-decoration__choice span {
  max-width: 21ch;
  font-size: 13px;
  line-height: 1.4;
  text-transform: none;
}

.story-page--products .story-bridge {
  background: var(--story-green);
}

@keyframes commerce-copy-in {
  from { opacity: 0; transform: translate3d(0, 12px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Pricing */

.story-page--pricing .story-price-hero,
.story-page--pricing .story-price-builder,
.story-page--pricing .story-faq,
.story-page--pricing .story-contact {
  background: var(--story-paper-soft);
}

.story-page--pricing .story-price-anchors {
  color: var(--story-white);
  background: var(--story-cobalt);
}

.story-page--pricing .story-price-anchors article {
  padding: clamp(28px, 3vw, 46px);
  border-color: rgba(251, 252, 248, .24);
}

.story-page--pricing .story-price-anchors span {
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -.01em !important;
  text-transform: none;
}

.story-page--pricing .story-price-anchors strong {
  margin: 24px 0 0;
  font-family: var(--brand-display, "Hanken Grotesk", sans-serif);
  font-size: clamp(48px, 4.3vw, 72px);
  font-weight: 650;
  line-height: .88;
  letter-spacing: -.065em;
  white-space: nowrap;
}

.story-page--pricing .story-price-anchors > p {
  color: rgba(251, 252, 248, .76);
  font-size: 15px;
}

.commerce-pricing__head {
  margin-bottom: clamp(48px, 6vw, 88px);
}

.commerce-tier-list {
  max-width: var(--story-max);
  margin: 0 auto;
  border-top: 1px solid var(--story-line);
}

.commerce-tier {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(430px, .82fr);
  align-items: center;
  gap: clamp(42px, 7vw, 130px);
  min-height: 228px;
  padding: clamp(34px, 4.5vw, 70px);
  color: var(--story-ink);
  background: var(--story-paper);
  border-right: 1px solid var(--story-line);
  border-bottom: 1px solid var(--story-line);
  border-left: 1px solid var(--story-line);
}

.commerce-tier--signature {
  background: var(--story-green);
}

.commerce-tier__badge {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 13px;
  color: var(--story-white);
  background: var(--story-ink);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.commerce-tier__story h3 {
  max-width: none;
  margin-bottom: 18px;
  font-size: clamp(40px, 5vw, 78px);
  font-weight: 650;
}

.commerce-tier__story p {
  max-width: 49ch;
  margin-bottom: 0;
  color: rgba(11, 12, 11, .64);
}

.commerce-tier__prices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.commerce-tier__prices > div {
  min-width: 0;
  padding: 10px 0 10px clamp(22px, 3vw, 48px);
  border-left: 1px solid rgba(11, 12, 11, .24);
}

.commerce-tier__prices dt {
  min-height: 2.5em;
  margin-bottom: 14px;
  color: rgba(11, 12, 11, .62);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
}

.commerce-tier__prices dd {
  margin: 0;
  font-family: var(--brand-display, "Hanken Grotesk", sans-serif);
  font-size: clamp(46px, 5vw, 78px);
  font-weight: 650;
  line-height: .9;
  letter-spacing: -.065em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.commerce-pricing__caveat {
  max-width: var(--story-max);
  margin: 0 auto;
  padding: 24px clamp(24px, 4.5vw, 70px);
  color: rgba(11, 12, 11, .66);
  background: var(--story-paper-soft);
  border-right: 1px solid var(--story-line);
  border-bottom: 1px solid var(--story-line);
  border-left: 1px solid var(--story-line);
  font-size: 14px !important;
}

.commerce-pricing__caveat strong {
  color: var(--story-ink);
  font-weight: 700;
}

.story-page--pricing .story-small-order__facts span {
  font-size: 13px;
  font-weight: 650;
}

.story-page--pricing .story-faq summary {
  font-family: var(--brand-display, "Hanken Grotesk", sans-serif);
  font-weight: 600;
  letter-spacing: -.035em;
}

@media (max-width: 899px) {
  :is(.story-page--products, .story-page--pricing) {
    --story-gutter: 18px;
  }

  :is(.story-page--products, .story-page--pricing) .story-hero__copy {
    min-height: 43svh;
    padding-bottom: 34px;
  }

  :is(.story-page--products, .story-page--pricing) h1 {
    letter-spacing: -.055em;
  }

  .commerce-product-controls {
    display: grid;
    gap: 22px;
    margin-bottom: 18px;
  }

  .commerce-colour-picker__choices {
    justify-content: flex-start;
  }

  .story-page--products .story-product__tabs {
    position: static;
    top: auto;
    z-index: auto;
    margin: 0;
    padding: 0;
  }

  .story-page--products .story-product__visual,
  .story-page--products .commerce-product-media {
    min-height: clamp(390px, 56svh, 590px);
    height: clamp(390px, 56svh, 590px);
  }

  .story-page--products .story-product__visual > .commerce-product__image {
    inset: 7% 6% 9%;
    width: 88%;
    height: 84%;
  }

  .story-page--products [data-commerce-product-state="tee"] > .commerce-product__image {
    inset: 10% 12% 11%;
    width: 76%;
    height: 79%;
  }

  .story-page--products .story-decoration__choice span {
    max-width: 18ch;
    font-size: 12px;
  }

  .commerce-tier {
    grid-template-columns: 1fr;
    gap: 26px;
    min-height: 0;
    padding: 30px 22px;
  }

  .commerce-tier__story h3 {
    margin-bottom: 12px;
    font-size: clamp(35px, 9.5vw, 52px);
  }

  .commerce-tier__prices > div {
    padding-left: 18px;
  }

  .commerce-tier__prices dd {
    font-size: clamp(42px, 12vw, 64px);
  }

  .story-page--pricing .story-price-anchors strong {
    font-size: clamp(34px, 10.5vw, 58px);
  }

  .story-page--pricing .story-price-anchors article {
    min-height: 21svh;
  }

  .story-page--pricing .story-small-order__facts span {
    font-size: 12px;
  }
}

@media (max-width: 430px) {
  :is(.story-page--products, .story-page--pricing) :is(.story-button, .story-text-link) {
    font-size: 12px;
  }

  .story-page--products .story-products-hero .story-hero__copy {
    min-height: 42svh;
  }

  .story-page--products .story-campaign {
    min-height: 53svh;
  }

  .commerce-colour-choice {
    min-height: 44px;
    padding-right: 10px;
    font-size: 11px;
  }

  .commerce-colour-choice__chip {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  .story-page--products .story-product__copy {
    padding-inline: 20px;
  }

  .story-page--pricing .story-price-anchors article {
    min-height: 19svh;
    padding: 20px 14px;
  }

  .story-page--pricing .story-price-anchors span {
    font-size: 12px;
  }

  .story-page--pricing .story-price-anchors strong {
    font-size: clamp(29px, 9.5vw, 42px);
    letter-spacing: -.055em;
  }

  .commerce-tier {
    gap: 22px;
    padding: 27px 20px;
  }

  .commerce-tier__badge {
    margin-bottom: 14px;
    padding: 7px 11px;
    font-size: 12px;
  }

  .commerce-tier__prices dt {
    min-height: 3.6em;
    font-size: 11px;
  }

  .commerce-tier__prices dd {
    font-size: clamp(36px, 11vw, 48px);
  }

  .commerce-pricing__caveat {
    padding: 20px;
    font-size: 13px !important;
  }
}

@media (max-width: 899px) and (orientation: landscape) {
  .story-page--products .story-product__visual,
  .story-page--products .commerce-product-media {
    min-height: 420px;
    height: min(76svh, 520px);
  }

  .commerce-product-controls {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
  }

  .commerce-colour-picker__choices {
    justify-content: flex-end;
  }

  .commerce-tier {
    grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
    gap: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .story-page--products .story-product__visual > .commerce-product__image,
  .story-page--products .commerce-product__shadow,
  .commerce-colour-choice {
    transition: none;
  }

  .story-page--products .story-product__panel.is-active {
    animation: none;
  }
}
