/* Islands: scoped styles for the premium sections. Reads the kit variables
   with fallbacks. Base layout always applies; hiding / animate-in rules live
   only under .mh-isl--ready so content never depends on JavaScript. */
.mh-isl {
  --_accent: var(--accent, #c8553d);
  --_bg: var(--bg, #fff);
  --_surface: var(--surface, #f6f4f1);
  --_text: var(--text, #1c1a18);
  --_muted: var(--muted, #6b655f);
  --_border: var(--border, #e2ddd6);
  --_radius: var(--radius, 12px);
  position: relative;
  box-sizing: border-box;
  padding: 3rem 1.25rem;
  color: var(--_text);
  font-family: var(--font-body, inherit);
}
.mh-isl *, .mh-isl *::before, .mh-isl *::after { box-sizing: border-box; }
.mh-isl__heading { font-family: var(--font-heading, inherit); margin: 0 0 .5rem; line-height: 1.1; }
.mh-isl__text { margin: 0 0 1rem; color: var(--_muted); }
.mh-isl__cta {
  display: inline-block; padding: .75rem 1.5rem; border-radius: var(--_radius);
  background: var(--_accent); color: #fff; text-decoration: none; font-weight: 600;
}

/* Hero islands: photo layer behind the text. */
.mh-isl--crossfade-hero, .mh-isl--spotlight-hero {
  min-height: 70vh; display: flex; flex-direction: column; justify-content: center;
  align-items: flex-start; overflow: hidden; background: var(--_surface); isolation: isolate;
}
.mh-isl--crossfade-hero > :not(.mh-isl__media),
.mh-isl--spotlight-hero > :not(.mh-isl__media) { position: relative; z-index: 2; }
.mh-isl--crossfade-hero .mh-isl__heading, .mh-isl--spotlight-hero .mh-isl__heading {
  font-size: clamp(2.2rem, 6vw, 4rem);
}
/* White text only over a real photo (the kit adds mh-isl--has-media when one
   was rendered); a hero with no photo keeps --_text on --_surface. */
.mh-isl--has-media .mh-isl__heading { color: #fff; text-shadow: 0 2px 16px rgba(0, 0, 0, .45); }
.mh-isl--has-media .mh-isl__text { color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, .5); }
.mh-isl--crossfade-hero .mh-isl__media, .mh-isl--spotlight-hero .mh-isl__media {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
}
.mh-isl--crossfade-hero .mh-isl__media { inset: -30px 0 0; }
.mh-isl--crossfade-hero .mh-isl__media img, .mh-isl--spotlight-hero .mh-isl__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
/* Dark wash so light text stays readable on any photo. */
.mh-isl--has-media.mh-isl--crossfade-hero .mh-isl__media::after, .mh-isl--has-media.mh-isl--spotlight-hero .mh-isl__media::after {
  content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .28); pointer-events: none;
}
.mh-isl--has-media.mh-isl--spotlight-hero .mh-isl__media::after {
  background:
    radial-gradient(circle at var(--mh-spot-x, 50%) var(--mh-spot-y, 50%), rgba(255, 255, 255, .22), transparent 38%),
    rgba(0, 0, 0, .28);
}

/* Effects: only once the loader has attached the island. */
.mh-isl--crossfade-hero.mh-isl--ready .mh-isl__media img { opacity: 0; transition: opacity 1.2s ease; }
.mh-isl--crossfade-hero.mh-isl--ready .mh-isl__media img.is-active { opacity: 1; }
.mh-isl--spotlight-hero.mh-isl--zoom.mh-isl--ready .mh-isl__media img {
  animation: mh-isl-zoom 20s ease-in-out infinite alternate;
}
.mh-isl--ready .mh-w { display: inline-block; animation: mh-isl-rise .6s ease both; }
.mh-isl--ready .mh-isl__fade { animation: mh-isl-fade .2s ease both; }

@keyframes mh-isl-zoom { from { transform: scale(1); } to { transform: scale(1.05); } }
@keyframes mh-isl-rise { from { opacity: 0; transform: translateY(.4em); } to { opacity: 1; transform: none; } }
@keyframes mh-isl-fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .mh-isl--crossfade-hero .mh-isl__media { transform: none !important; }
  .mh-isl--ready .mh-isl__media img { animation: none !important; transition: none !important; }
  .mh-isl--ready .mh-w { animation: mh-isl-fade .2s ease both; animation-delay: 0s !important; }
}

/* Collections: glow cards, showcase carousel, parallax gallery. */
.mh-isl--glow-cards .mh-isl__list, .mh-isl--showcase-carousel .mh-isl__list {
  list-style: none; margin: 1rem 0 0; padding: 0;
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
}
.mh-isl--glow-cards .mh-isl__item, .mh-isl--showcase-carousel .mh-isl__item {
  position: relative; display: flex; flex-direction: column; gap: .35rem; min-width: 0;
  padding: 1rem; background: var(--_surface); border: 1px solid var(--_border);
  border-radius: var(--_radius); overflow: hidden;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.mh-isl__item .mh-isl__media img { display: block; width: 100%; height: 11rem; object-fit: cover; border-radius: calc(var(--_radius) - 4px); }
.mh-isl__item .mh-isl__title { font-weight: 600; color: var(--_text); text-decoration: none; }
.mh-isl__item .mh-isl__price { color: var(--_accent); font-weight: 600; }
.mh-isl__item .mh-isl__text { margin: 0; }
.mh-isl--glow-cards .mh-isl__item::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s ease;
  background: radial-gradient(14rem circle at var(--mh-glow-x, 50%) var(--mh-glow-y, 50%), color-mix(in srgb, var(--_accent) 28%, transparent), transparent 70%);
}
.mh-isl--glow-cards .mh-isl__item:hover::before, .mh-isl--glow-cards .mh-isl__item:focus-within::before { opacity: 1; }
.mh-isl--glow-cards .mh-isl__item:hover, .mh-isl--glow-cards .mh-isl__item:focus-within {
  border-color: var(--_accent); box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}
.mh-isl--glow-cards.mh-isl--ready .mh-isl__item { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.mh-isl--glow-cards.mh-isl--ready .mh-isl__item:hover, .mh-isl--glow-cards.mh-isl--ready .mh-isl__item:focus-within {
  transform: translateY(-4px);
}

.mh-isl--showcase-carousel { overflow-x: clip; }
.mh-isl--carousel-on .mh-isl__viewport { overflow: hidden; margin-top: 1rem; border-radius: var(--_radius); touch-action: pan-y pinch-zoom; }
.mh-isl--carousel-on .mh-isl__viewport:focus-visible { outline: 2px solid var(--_accent); outline-offset: 2px; }
.mh-isl--carousel-on .mh-isl__list { display: flex; gap: 1rem; margin: 0; }
.mh-isl--carousel-on .mh-isl__item { flex: 0 0 min(85%, 22rem); }
.mh-isl__controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem; margin-top: 1rem; }
.mh-isl__btn {
  width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid var(--_border);
  background: var(--_surface); color: var(--_text); font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.mh-isl__btn:disabled, .mh-isl__btn[aria-disabled="true"] { opacity: .4; cursor: default; }
.mh-isl__btn:focus-visible, .mh-isl__dot:focus-visible { outline: 2px solid var(--_accent); outline-offset: 2px; }
.mh-isl__dots { display: flex; gap: .4rem; }
.mh-isl__dot { width: .65rem; height: .65rem; padding: 0; border-radius: 50%; border: 1px solid var(--_accent); background: transparent; cursor: pointer; }
.mh-isl__dot.is-active { background: var(--_accent); }
.mh-isl__status { flex-basis: 100%; margin: 0; text-align: center; color: var(--_muted); font-size: .85rem; }

.mh-isl--parallax-gallery .mh-isl__media {
  display: grid; gap: 1.5rem; padding: 1rem 0; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
}
.mh-isl--parallax-gallery .mh-isl__media img { display: block; width: 100%; height: 16rem; object-fit: cover; border-radius: var(--_radius); will-change: transform; }
@media (prefers-reduced-motion: reduce) {
  .mh-isl--glow-cards .mh-isl__item { transition: none; }
  .mh-isl--glow-cards.mh-isl--ready .mh-isl__item:hover, .mh-isl--glow-cards.mh-isl--ready .mh-isl__item:focus-within { transform: none; }
  .mh-isl--parallax-gallery .mh-isl__media img { transform: none !important; }
}

/* Scroll story: steps stack by default (also in reduced motion). */
.mh-isl--scroll-story .mh-isl__list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 2rem; }
.mh-isl--scroll-story .mh-isl__item { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.mh-isl--scroll-story .mh-isl__item .mh-isl__media img { display: block; width: 100%; height: auto; max-height: 24rem; object-fit: cover; border-radius: var(--_radius); }
.mh-isl--scroll-story .mh-isl__title { font-family: var(--font-heading, inherit); font-size: 1.4rem; font-weight: 600; }
.mh-isl--scroll-story.mh-isl--story-fade .mh-isl__item { opacity: 0; transform: translateY(1rem); }
.mh-isl--scroll-story.mh-isl--story-fade .mh-isl__item.is-in { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }
@media (min-width: 900px) {
  .mh-isl--story-on .mh-isl__story { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
  .mh-isl--story-on .mh-isl__stage { position: relative; height: 100vh; }
  .mh-isl--story-on .mh-isl__stage img {
    position: absolute; left: 0; top: 10vh; width: 100%; height: 80vh; object-fit: cover;
    border-radius: var(--_radius); opacity: 0; transition: opacity .4s ease;
  }
  .mh-isl--story-on .mh-isl__stage img.is-active { opacity: 1; }
  .mh-isl--story-on .mh-isl__list { margin: 0; gap: 0; }
  .mh-isl--story-on .mh-isl__item { min-height: 100vh; justify-content: center; opacity: .35; transition: opacity .3s ease; }
  .mh-isl--story-on .mh-isl__item.mh-isl--active { opacity: 1; }
  .mh-isl--story-on .mh-isl__item .mh-isl__media { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mh-isl--scroll-story .mh-isl__item { opacity: 1 !important; transform: none !important; transition: none !important; }
}
