/* ---------------------------------------------------------------------------
   Home page. Loaded on the front page only (inc/home.php).
   Warm, light, plenty of air. Every colour and size comes from the theme's
   tokens (style.css); the one local value is the warm tint of the cards.
   ------------------------------------------------------------------------ */

.mf-home-page {
  --h-tint: #efebe4;
  --h-radius: 14px;
  color: var(--text);
  overflow-x: clip;
}

.mf-home-page a {
  text-decoration: none;
}

.mf-hwrap {
  max-width: var(--page);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  box-sizing: border-box;
}

.mf-hsec-title {
  margin: 0;
  font-size: var(--type-h1);
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 700;
}

/* Buttons ------------------------------------------------------------- */

.mf-hbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 3.4rem;
  padding: 0 1.7rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: var(--type-control);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.mf-home-page .mf-hbtn--dark {
  background: var(--ink);
  color: var(--on-dark);
}

.mf-home-page .mf-hbtn--dark:hover {
  background: var(--graphite);
  color: var(--on-dark);
}

.mf-home-page .mf-hbtn--light {
  background: #fff;
  color: var(--ink);
  border-color: var(--rule);
}

.mf-home-page .mf-hbtn--light:hover {
  border-color: var(--ink);
}

.mf-home-page .mf-hbtn--small {
  min-height: 2.5rem;
  padding: 0 1.1rem;
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
  font-size: var(--type-meta);
}

.mf-home-page .mf-hbtn--small:hover {
  background: var(--ink);
  color: var(--on-dark);
}

.mf-hbtn .mf-icon {
  width: 1.15em;
  height: 1.15em;
}

.mf-home-page :is(.mf-hbtn, .mf-hh__arrow, .mf-hh__dot, .mf-hcfg__swatch, .mf-hcat, .mf-hown__tile, .mf-hpop__rail):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* Hero ---------------------------------------------------------------- */

.mf-hh {
  position: relative;
  background: var(--paper-bright);
}

.mf-hh__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem) var(--gutter);
  box-sizing: border-box;
}

.mf-hh__text {
  max-width: 38rem;
}

.mf-hh__eyebrow {
  margin: 0 0 1.1rem;
  color: var(--text-muted);
  font-size: var(--type-caption);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.mf-hh__title {
  margin: 0 0 1.4rem;
  font-size: clamp(2.5rem, 1.5rem + 3.6vw, 4.25rem);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -0.025em;
}

.mf-hh__title span {
  display: block;
}

.mf-hh__lede {
  max-width: 28rem;
  margin: 0 0 2rem;
  color: var(--text-muted);
  font-size: var(--type-lede);
  line-height: 1.55;
}

.mf-hh__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 0 0 2.2rem;
}

.mf-hh__points {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mf-hh__points li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 8.6rem;
  margin: 0;
  font-size: var(--type-caption);
  line-height: 1.3;
}

.mf-hh__points .mf-icon {
  flex: none;
  width: 1.55rem;
  height: 1.55rem;
  stroke-width: 1.4;
}

.mf-hh__stage {
  position: relative;
}

.mf-hh__slides {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: var(--paper);
}

.mf-hh__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.mf-hh__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease;
}

.mf-hh__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mf-hh__controls {
  position: absolute;
  right: var(--gutter);
  bottom: 1rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.mf-hh__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(20, 21, 24, 0.14);
  cursor: pointer;
}

.mf-hh__arrow:hover {
  background: var(--ink);
  color: var(--on-dark);
}

.mf-hh__arrow .mf-icon {
  width: 1.1rem;
  height: 1.1rem;
  transform: rotate(180deg);
}

.mf-hh__arrow--next .mf-icon {
  transform: none;
}

.mf-hh__arrow--flat {
  background: transparent;
  box-shadow: none;
  border: 1px solid var(--border-control);
}

.mf-hh__dots {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.2rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}

.mf-home-page .mf-hh__dot {
  min-width: 0;
  box-shadow: none;
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.mf-home-page .mf-hh__dot:hover,
.mf-home-page .mf-hh__dot:focus {
  background: none;
}

.mf-home-page .mf-hh__dot::after {
  content: "";
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(20, 21, 24, 0.45);
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease), background-color 0.25s var(--ease);
}

.mf-home-page .mf-hh__dot.is-active::after {
  width: 1.3rem;
  background: var(--ink);
}

@media (min-width: 900px) {
  .mf-hh {
    min-height: clamp(32rem, 36vw, 36rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .mf-hh__stage {
    position: static;
  }

  .mf-hh__slides {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 62%;
    aspect-ratio: auto;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 42%);
    mask-image: linear-gradient(90deg, transparent 0, #000 42%);
  }

  .mf-hh__controls {
    right: max(var(--gutter), calc((100% - var(--page)) / 2 + var(--gutter)));
    bottom: 1.5rem;
  }
}

/* Categories ---------------------------------------------------------- */

.mf-hcats {
  padding: clamp(1.25rem, 2.5vw, 2rem) 0 0;
}

.mf-hcats__grid {
  display: grid;
  gap: 1.1rem;
}

.mf-hcat {
  position: relative;
  display: block;
  min-height: 14rem;
  overflow: hidden;
  border-radius: var(--h-radius);
  background: var(--h-tint);
  color: var(--ink);
}

.mf-hcat__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 56%;
  height: 100%;
  min-height: 14rem;
  padding: 1.6rem 0 1.6rem 1.7rem;
  box-sizing: border-box;
}

.mf-hcat__title {
  margin: 0 0 0.7rem;
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.mf-hcat__text {
  margin-bottom: auto;
  color: var(--text-muted);
  font-size: var(--type-meta);
  line-height: 1.5;
}

.mf-hcat__more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.1rem;
  font-size: var(--type-control);
  font-weight: 600;
}

.mf-hcat__more .mf-icon {
  width: 1.1em;
  height: 1.1em;
  transition: transform 0.2s var(--ease);
}

.mf-hcat:hover .mf-hcat__more .mf-icon,
.mf-hown__tile:hover .mf-hcat__more .mf-icon {
  transform: translateX(4px);
}

.mf-hcat__media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 58%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%);
  mask-image: linear-gradient(90deg, transparent 0, #000 30%);
}

.mf-hcat__media > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The print card: a real room with a real print on its wall (same markup as
   the art archive's scene, which is not loaded here). The scene keeps its
   own shape, so it is as tall as the card and cropped at the sides. */
.mf-hcat__media .mf-scene {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  min-width: 100%;
  margin: 0;
  overflow: hidden;
  container-type: inline-size;
  aspect-ratio: var(--scene-ar, 4 / 3);
  background: var(--room-wall, var(--paper));
}

.mf-hcat__media .mf-scene__room {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mf-hcat__media .mf-scene__slot {
  position: absolute;
  left: var(--slot-x);
  top: var(--slot-y);
  width: var(--slot-w);
  height: var(--slot-h);
  display: block;
}

.mf-hcat__media .mf-scene__art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(var(--art-shadow, 0 1.6cqw 2.4cqw) rgba(24, 22, 18, 0.34));
}

@media (min-width: 1000px) {
  .mf-hcats__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Benefits ------------------------------------------------------------ */

.mf-hben {
  padding: clamp(2rem, 4vw, 3.2rem) 0 0;
}

.mf-hben__list {
  display: grid;
  gap: 1.4rem 0;
  margin: 0 auto;
  list-style: none;
}

.mf-hben__item {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 0;
  padding: 0.2rem 1.4rem;
}

.mf-hben__icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  background: var(--h-tint);
  color: var(--graphite);
}

.mf-hben__icon .mf-icon {
  width: 1.6rem;
  height: 1.6rem;
  stroke-width: 1.4;
}

.mf-hben__copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: var(--type-meta);
  line-height: 1.45;
  color: var(--text-muted);
}

.mf-hben__copy strong {
  color: var(--ink);
  font-size: var(--type-control);
  font-weight: 600;
}

@media (min-width: 560px) {
  .mf-hben__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .mf-hben__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mf-hben__item + .mf-hben__item {
    border-left: 1px solid var(--rule);
  }
}

/* 3D configurator showcase -------------------------------------------- */

.mf-hcfg {
  position: relative;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
  background: var(--paper-bright);
}

.mf-hcfg__bg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 55%;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 30%);
  mask-image: linear-gradient(180deg, transparent 0, #000 30%);
}

.mf-hcfg__bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 60%;
}

.mf-hcfg__inner {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 2rem;
  padding-top: clamp(2.25rem, 5vw, 3.75rem);
  padding-bottom: clamp(2.25rem, 5vw, 3.75rem);
}

.mf-hcfg__title {
  margin: 0 0 1.2rem;
  font-size: clamp(2.1rem, 1.3rem + 2.8vw, 3.4rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.mf-hcfg__title span {
  display: block;
}

.mf-hcfg__lede {
  max-width: 28rem;
  margin: 0 0 1.8rem;
  color: var(--text-muted);
  font-size: var(--type-lede);
  line-height: 1.55;
}

.mf-hcfg .mf-hh__actions {
  margin-bottom: 1.6rem;
}

.mf-hcfg__points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--type-caption);
}

.mf-hcfg__points li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
}

.mf-hcfg__points .mf-icon {
  width: 1.35rem;
  height: 1.35rem;
  padding: 0.2rem;
  box-sizing: border-box;
  border: 1.5px solid var(--graphite);
  border-radius: 50%;
}

.mf-hcfg__badge {
  position: absolute;
  right: var(--gutter);
  bottom: 1.25rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem 0.35rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-size: var(--type-caption);
  font-weight: 600;
  text-decoration: none;
}

.mf-hcfg__badge span {
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--graphite);
  color: var(--on-dark);
  letter-spacing: 0.04em;
}

@media (max-width: 899px) {
  .mf-hcfg {
    display: flex;
    flex-direction: column;
  }

  .mf-hcfg__inner {
    order: 1;
    padding-bottom: 1.5rem;
  }

  .mf-hcfg__bg {
    position: relative;
    order: 2;
    height: 16rem;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 25%);
    mask-image: linear-gradient(180deg, transparent 0, #000 25%);
  }
}

@media (min-width: 900px) {
  .mf-hcfg {
    min-height: 34rem;
  }

  .mf-hcfg__bg {
    top: 0;
    left: auto;
    right: 0;
    width: 64%;
    height: auto;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%);
    mask-image: linear-gradient(90deg, transparent 0, #000 30%);
  }

  .mf-hcfg__inner {
    grid-template-columns: minmax(0, 34rem);
    justify-content: start;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: center;
  }
}

/* Popular products ---------------------------------------------------- */

.mf-hpop {
  padding-top: clamp(3rem, 6vw, 5rem);
}

.mf-hpop__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.mf-hpop__nav {
  display: none;
  gap: 0.6rem;
}

.mf-hpop__rail {
  --edge: max(var(--gutter), calc((100vw - var(--page)) / 2 + var(--gutter)));

  display: flex;
  gap: 1.1rem;
  margin: 0;
  padding: 0 var(--edge) 0.5rem;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--edge);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mf-hpop__rail::-webkit-scrollbar {
  display: none;
}

.mf-hpop__card {
  flex: 0 0 clamp(13.5rem, 62vw, 17rem);
  display: flex;
  flex-direction: column;
  margin: 0;
  scroll-snap-align: start;
}

.mf-hpop__media {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  background: var(--paper);
}

.mf-hpop__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.mf-hpop__cat {
  margin: 0.9rem 0 0.2rem;
  color: var(--text-muted);
  font-size: var(--type-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mf-hpop__name {
  margin: 0;
  font-size: var(--type-card);
  font-weight: 600;
  line-height: 1.35;
}

.mf-hpop__name a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: var(--ink);
}

.mf-hpop__price {
  margin: 0.35rem 0 0.9rem;
  font-size: var(--type-price);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.mf-hpop__card .mf-hbtn {
  align-self: flex-start;
  margin-top: auto;
}

@media (hover: hover) and (min-width: 900px) {
  .mf-hpop__card:hover .mf-hpop__media img {
    transform: scale(1.03);
  }
}

@media (min-width: 900px) {
  .mf-hpop__nav {
    display: flex;
  }
}

/* Your design on your product ---------------------------------------- */

.mf-hown {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(1rem, 3vw, 2rem);
}

.mf-hown__inner {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.mf-hown__tiles {
  display: grid;
  gap: 1rem;
}

.mf-hown__tile {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-radius: var(--h-radius);
  background: var(--h-tint);
  color: var(--ink);
}

.mf-hown__media {
  flex: 0 0 38%;
  min-height: 9rem;
  overflow: hidden;
}

.mf-hown__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mf-hown__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  padding: 1.2rem 1.3rem;
  font-size: var(--type-meta);
  color: var(--text-muted);
  line-height: 1.45;
}

.mf-hown__body strong {
  color: var(--ink);
  font-size: var(--type-lede);
  font-weight: 700;
}

.mf-hown__body .mf-hcat__more {
  margin-top: auto;
  padding-top: 0.6rem;
  color: var(--ink);
}

@media (min-width: 700px) {
  .mf-hown__tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .mf-hown__inner {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 2fr);
    gap: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mf-hh__slide,
  .mf-hh__slide.is-active {
    transition: none;
  }

  .mf-hpop__media img,
  .mf-hcat__more .mf-icon,
  .mf-hh__dot::after {
    transition: none;
  }

  .mf-hpop__rail {
    scroll-behavior: auto;
  }
}
