/* Shared component section styles */
.mm-page--full-width {
  width: 100%;
}

.mm-page {
  display: flex;
  flex-direction: column;
  row-gap: var(--mm-section-gap);
}

.mm-page > .mm-component {
  padding-block: 0;
}

/* Full-bleed banded sections keep internal breathing room inside their background */
.mm-page > .mm-component.mm-component-split,
.mm-page > .mm-component.mm-component-gallery {
  padding-block: var(--mm-section-pad-y);
}

/* Bookend padding for pages without a hero (or after compact chrome) */
.mm-page > .mm-component:first-child:not(.mm-component-hero) {
  padding-top: var(--mm-section-pad-y);
}

.mm-page > .mm-component:last-child {
  padding-bottom: var(--mm-section-pad-y);
}

.mm-section-inner {
  width: 100%;
}

html {
  scroll-behavior: smooth;
}

body:has(.mm-component-sidebar-nav),
body:has(.mm-component-sub-nav) {
  scroll-padding-top: 11rem;
}

.mm-component {
  scroll-margin-top: 7rem;
}

/* Compact sticky in-page nav (products, partners, sustainability, etc.) */
.mm-component-sidebar-nav,
.mm-sidebar-nav,
.mm-component-sub-nav {
  padding-block: 0.875rem;
  background-color: var(--mm-surface);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.mm-component-sidebar-nav.is-stuck,
.mm-component-sub-nav.is-stuck {
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

/* Hide the horizontal scrollbar on the pill bar while keeping it scrollable */
.mm-component-sub-nav [data-mm-subnav-bar] {
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mm-component-sub-nav [data-mm-subnav-bar]::-webkit-scrollbar {
  display: none;
}

.mm-sidebar-nav__track {
  position: relative;
  mask-image: linear-gradient(to right, transparent 0, #000 1.25rem, #000 calc(100% - 1.25rem), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 1.25rem, #000 calc(100% - 1.25rem), transparent 100%);
}

.mm-sidebar-nav__links {
  scrollbar-width: thin;
  scrollbar-color: var(--mm-primary-muted) transparent;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.125rem;
}

.mm-sidebar-nav__links::-webkit-scrollbar {
  height: 4px;
}

.mm-sidebar-nav__links::-webkit-scrollbar-thumb {
  background: var(--mm-primary-muted);
  border-radius: 9999px;
}

.mm-sidebar-nav__links .mm-anchor-nav-link {
  scroll-snap-align: start;
}

.mm-page > .mm-component.mm-component-sidebar-nav:first-child,
.mm-page > .mm-component.mm-component-sub-nav:first-child {
  padding-top: calc(var(--mm-section-pad-y) * 0.65);
  padding-bottom: 0.875rem;
}

.mm-page > .mm-component.mm-component-sidebar-nav + .mm-component-paragraph {
  margin-top: -0.25rem;
}

.mm-component-product-details article:first-child {
  padding-top: 0.5rem;
}

.mm-component-product-details article,
.mm-component-video-embed {
  scroll-margin-top: 11rem;
}

.mm-component-video-embed {
  padding-bottom: var(--mm-section-pad-y);
}

/* Hero sits below fixed header via #site-page-root padding-top. */
.mm-page > .mm-component.mm-component-hero {
  --mm-hero-pad-top: clamp(2rem, 5vw, 4rem);
  --mm-hero-pad-bottom: clamp(2.5rem, 6vw, 5rem);

  align-items: center;
  min-height: max(32rem, calc(100vh - 7rem));
  padding-block: var(--mm-hero-pad-top) var(--mm-hero-pad-bottom);
}

.mm-page > .mm-component.mm-component-hero--home {
  --mm-hero-pad-top: clamp(2rem, 4vw, 3.5rem);
  --mm-hero-pad-bottom: clamp(2rem, 4vw, 3.5rem);
}

.mm-component-hero > .container {
  width: 100%;
}

@media (max-width: 767px) {
  .mm-page > .mm-component.mm-component-hero {
    --mm-hero-pad-top: 1.5rem;
    --mm-hero-pad-bottom: 2rem;

    min-height: max(30rem, calc(100svh - 7rem));
  }
}

/* Hero legibility: gradient glass panel — readable text, image still visible. */
.mm-component-hero .mm-hero-copy {
  position: relative;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.5rem, 3.5vw, 2.5rem);
  border-radius: 1.25rem;
  background: var(--mm-hero-panel-bg);
  border: 1px solid var(--mm-hero-panel-border);
  box-shadow: var(--mm-hero-panel-shadow);
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  isolation: isolate;
}

.mm-component-hero--home .mm-hero-copy {
  max-width: 42rem;
  padding: clamp(1rem, 2.4vw, 1.65rem) clamp(1.25rem, 3vw, 2.15rem);
}

.mm-component-hero .mm-hero-copy h1,
.mm-component-hero .mm-hero-copy .home-hero-headline,
.mm-component-hero .mm-hero-copy p {
  text-shadow: none;
}

.mm-component-hero .mm-hero-copy p {
  color: #0f172a !important;
}

.mm-component-hero .mm-hero-copy .glass-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.08);
}

.hero-slide__scrim,
.mm-component-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--mm-hero-scrim);
}

.text-glow {
  text-shadow: 0 0 20px rgb(var(--mm-primary-rgb) / 0.3);
}

.home-hero-headline {
  display: block;
  width: 100%;
  line-height: var(--home-hero-line-height, 1.05);
  min-height: calc(3 * var(--home-hero-line-height, 1.05) * 1em);
  max-height: calc(3 * var(--home-hero-line-height, 1.05) * 1em);
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: break-word;
  word-break: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 320ms ease, transform 320ms ease;
}

.home-hero-headline.is-fading {
  opacity: 0;
  transform: translateY(8px);
}

.hero-slide img {
  position: relative;
  z-index: 0;
}

.hero-slide__scrim {
  z-index: 1;
}

.hero-slides-root {
  isolation: isolate;
}

.hero-slide {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.03);
  transition:
    opacity 720ms ease,
    transform 1200ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 720ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.mm-component-gallery .home-gallery-tab {
  padding: 0.8rem 1.2rem;
  border-radius: 9999px;
  border: 1px solid var(--mm-border);
  background: var(--mm-glass-bg);
  color: var(--mm-on-surface-variant);
  font-weight: 700;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.mm-component-gallery .home-gallery-tab.is-active {
  background: var(--mm-primary-muted);
  color: var(--mm-on-surface);
  border-color: var(--mm-frosted-border);
}

.home-gallery-panel {
  display: none;
}

.home-gallery-panel.is-active {
  display: block;
}

.home-gallery-slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.985);
  transition:
    opacity 520ms ease,
    transform 820ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 520ms;
}

.home-gallery-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
  transition:
    opacity 520ms ease,
    transform 820ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

.home-gallery-slider {
  position: relative;
}

.home-gallery-slides {
  display: grid;
  position: relative;
}

.home-gallery-media {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.home-gallery-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.22) 1px, transparent 1px),
    linear-gradient(135deg, var(--mm-frosted-bg), transparent);
  background-size: 44px 44px, 44px 44px, 100% 100%;
  mix-blend-mode: screen;
  transform-origin: center;
}

.home-gallery-media img,
.home-gallery-media iframe {
  display: block;
  transition: transform 900ms ease, filter 900ms ease;
  transform-origin: center;
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.home-gallery-slide.is-active .home-gallery-media::after {
  animation: home-gallery-mosaic-out 720ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-gallery-slide.is-active .home-gallery-media img,
.home-gallery-slide.is-active .home-gallery-media iframe {
  animation: home-gallery-media-settle 820ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes home-gallery-mosaic-out {
  0% {
    opacity: 0.72;
    clip-path: inset(0 0 0 0);
    transform: scale(1.015);
  }
  100% {
    opacity: 0;
    clip-path: inset(0 100% 100% 0);
    transform: scale(1);
  }
}

@keyframes home-gallery-media-settle {
  0% {
    transform: scale(1.035);
    filter: saturate(0.88) contrast(0.94);
  }
  100% {
    transform: scale(1);
    filter: saturate(1) contrast(1);
  }
}

.home-gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.home-gallery-control {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid var(--mm-border);
  background: var(--mm-glass-bg);
  color: var(--mm-on-surface);
  transition: transform 180ms ease, background-color 180ms ease;
}

.home-gallery-control:hover {
  transform: translateY(-1px);
  background: var(--mm-primary-muted);
}

.home-gallery-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex: 1;
}

.home-gallery-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 9999px;
  background: rgba(160, 180, 196, 0.35);
  transition: transform 180ms ease, background-color 180ms ease;
}

.home-gallery-dot.is-active {
  background: var(--mm-primary);
  transform: scale(1.15);
}

.mm-component-gallery .home-gallery-autoplay-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid var(--mm-border);
  background: var(--mm-glass-bg);
  color: var(--mm-on-surface);
  width: 3.25rem;
  height: 3.25rem;
  font-weight: 700;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.mm-component-gallery .home-gallery-autoplay-toggle:hover {
  background: var(--mm-primary-muted);
  border-color: var(--mm-frosted-border);
}

.mm-component-gallery .home-gallery-autoplay-toggle .material-symbols-outlined {
  font-size: 1.7rem;
}

.bg-mesh {
  background-image: radial-gradient(at 0% 0%, rgba(125, 211, 252, 0.1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(200, 160, 240, 0.05) 0px, transparent 50%);
}

.subnav-link.is-active {
  color: var(--mm-primary);
  border-color: var(--mm-frosted-border);
  background: var(--mm-primary-muted);
}

.mm-anchor-nav-link {
  text-decoration: none;
  transition: all 0.2s ease;
}

.mm-anchor-nav-link.is-active {
  background: var(--mm-primary-muted);
  color: var(--mm-primary);
  border-color: var(--mm-primary);
  font-weight: 600;
}

@media (max-width: 767px) {
  .home-hero-headline {
    min-height: calc(5 * var(--home-hero-line-height, 1.05) * 1em);
    max-height: calc(5 * var(--home-hero-line-height, 1.05) * 1em);
    -webkit-line-clamp: 5;
    line-clamp: 5;
  }

  .home-gallery-controls {
    justify-content: center;
    flex-wrap: wrap;
  }
}

.mm-bento--image-only .mm-bento-infographic {
  min-height: 12rem;
}

.mm-bento-infographic__img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: rgb(var(--mm-surface-rgb) / 0.35);
}
