/* Site shell — header, footer, glass utilities, scroll effects */

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

body {
  background-color: var(--mm-background);
  color: var(--mm-body);
}

.site-shell-header {
  background-color: color-mix(in srgb, var(--mm-header-bg) 92%, transparent);
  border-bottom: 1px solid var(--mm-header-border);
  box-shadow: 0 0 24px var(--mm-header-shadow);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-shell-header--scrolled {
  background-color: color-mix(in srgb, var(--mm-header-bg) 68%, transparent);
  backdrop-filter: blur(20px) saturate(1.25);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  border-bottom-color: var(--mm-frosted-border);
  box-shadow: 0 8px 32px var(--mm-header-shadow);
}

/* Brand lockup — catchy logo + gradient wordmark. */
.site-brand {
  transition: transform 0.25s ease;
}

.site-brand-logo {
  filter: drop-shadow(0 3px 8px rgba(220, 38, 38, 0.28));
  transition: filter 0.25s ease, transform 0.25s ease;
}

.site-brand:hover .site-brand-logo {
  filter: drop-shadow(0 6px 15px rgba(220, 38, 38, 0.45));
  transform: scale(1.04);
}

.site-shell-nav-link {
  color: var(--mm-header-text);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-shell-nav-link:hover,
.site-shell-nav-link.is-active {
  color: var(--mm-primary);
  background-color: var(--mm-primary-muted);
}

/* Modern animated underline for the desktop top-level menu. */
.site-shell-header nav .site-shell-nav-link {
  position: relative;
  background-color: transparent;
}

.site-shell-header nav .site-shell-nav-link::after {
  content: "";
  position: absolute;
  left: 0.625rem;
  right: 0.625rem;
  bottom: 0.3rem;
  height: 2px;
  border-radius: 2px;
  background-color: var(--mm-primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease;
}

.site-shell-header nav .site-shell-nav-link:hover::after,
.site-shell-header nav .site-shell-nav-link.is-active::after {
  transform: scaleX(1);
}

.site-shell-nav-cta {
  background-color: var(--mm-primary-container);
  color: var(--mm-on-primary-container);
  border: 1px solid var(--mm-border);
}

/* Gradient hover handled globally in interactions.css */

.site-shell-dropdown {
  background-color: color-mix(in srgb, var(--mm-header-bg) 96%, transparent);
  border: 1px solid var(--mm-header-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.glass-card,
.glass-card-elevated,
.glass-panel,
.glass-panel-elevated,
.glass-elevated,
.glass-input {
  color: var(--mm-on-surface);
}

.glass-card,
.glass-card-elevated,
.glass-panel,
.glass-panel-elevated,
.glass-elevated,
.glass-input {
  color: var(--mm-on-surface);
  background: var(--mm-glass-bg);
  border: 1px solid var(--mm-border);
}

.glass-card-elevated,
.glass-panel-elevated,
.glass-elevated {
  background: var(--mm-glass-elevated);
}

.mm-feature-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--mm-on-surface);
  background: var(--mm-feature-card-bg);
  border-color: var(--mm-feature-card-border);
  box-shadow: var(--mm-feature-card-shadow);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.mm-feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--mm-feature-card-sheen);
}

.mm-feature-card > * {
  position: relative;
  z-index: 1;
}

.mm-feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--mm-frosted-border);
  box-shadow: var(--mm-hover-glow-strong), var(--mm-feature-card-shadow);
}

.mm-feature-card h3,
.mm-feature-card .mm-feature-card__title {
  color: var(--mm-title);
}

.mm-feature-card .text-on-surface-variant {
  color: var(--mm-body) !important;
}

.mm-feature-card--center {
  text-align: center;
}

.mm-feature-card--compact:hover {
  transform: translateY(-2px);
}

.mm-feature-icon {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--mm-primary);
  background: var(--mm-feature-icon-bg);
  border: 1px solid var(--mm-feature-icon-border);
  border-radius: 0.9rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 24px rgba(14, 165, 233, 0.14);
}

.mm-feature-icon .material-symbols-outlined,
.mm-feature-icon.material-symbols-outlined {
  color: var(--mm-primary);
  font-size: 1.55rem;
}

.mm-icon-img {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  object-fit: contain;
  vertical-align: -0.3em;
}

.mm-feature-icon .mm-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Logos fill the whole box; drop the icon badge tint/padding so they read as logos. */
.mm-feature-icon:has(.mm-icon-img) {
  background: transparent;
  padding: 0;
}

.mm-feature-icon--round {
  border-radius: 9999px;
}

.mm-feature-icon--compact {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 0.8rem;
}

.mm-feature-icon--compact .material-symbols-outlined,
.mm-feature-icon--compact.material-symbols-outlined {
  font-size: 1.35rem;
}

.mm-feature-icon--dot {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
}

.mm-feature-icon--dot::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 9999px;
  background: var(--mm-primary);
  box-shadow: 0 0 0.9rem rgba(14, 165, 233, 0.34);
}

.mm-product-card {
  text-decoration: none;
}

.mm-product-card__media {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.mm-product-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 42%);
}

.mm-product-card:hover .mm-product-card__media img {
  filter: saturate(1.06) contrast(1.03);
  transform: scale(1.065);
}

.mm-product-detail-card {
  scroll-margin-top: 11rem;
}

.mm-product-detail-card__media {
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.13);
}

.mm-product-detail-card__media img {
  transition: transform 700ms ease, filter 700ms ease;
}

.mm-product-detail-card:hover .mm-product-detail-card__media img {
  filter: saturate(1.06) contrast(1.03);
  transform: scale(1.035);
}

.mm-product-detail-card__copy h3 {
  color: var(--mm-title);
}

.mm-product-detail-card__copy .prose {
  color: var(--mm-body);
}

.mm-component-cards-grid,
.mm-component-products-grid,
.mm-component-product-details,
.mm-component-process-steps,
.mm-component-items-list,
.mm-component-region-blocks,
.mm-component-bento {
  position: relative;
  isolation: isolate;
}

.mm-component-cards-grid > .container,
.mm-component-products-grid > .container,
.mm-component-product-details > .container,
.mm-component-process-steps > .container,
.mm-component-items-list > .container,
.mm-component-region-blocks > .container,
.mm-component-bento > .container {
  position: relative;
  z-index: 1;
}

.mm-component-cards-grid::before,
.mm-component-products-grid::before,
.mm-component-product-details::before,
.mm-component-process-steps::before,
.mm-component-bento::before {
  content: "";
  position: absolute;
  inset: -1.5rem 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 20%, rgba(14, 165, 233, 0.09), transparent 28%),
    radial-gradient(circle at 88% 72%, rgba(2, 132, 199, 0.07), transparent 30%);
}

.mm-frosted-text {
  position: relative;
  isolation: isolate;
  background: linear-gradient(160deg, var(--mm-frosted-bg), color-mix(in srgb, var(--mm-background) 50%, transparent));
  border: 1px solid var(--mm-frosted-border);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border-radius: 1rem;
  box-shadow: var(--mm-frosted-shadow);
}

.mm-frosted-text--padded {
  padding: clamp(1rem, 2.6vw, 1.6rem);
}

.mm-image-caption {
  background: var(--mm-frosted-bg);
  border: 1px solid var(--mm-frosted-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 0.9rem;
  padding: 0.65rem 0.85rem;
}

.mm-frosted-text h1,
.mm-hero-copy h1 {
  color: var(--mm-title);
  letter-spacing: -0.02em;
}

.mm-frosted-text p,
.mm-hero-copy p {
  color: var(--mm-body) !important;
}

.mm-hero-copy {
  padding: 0;
}

html[data-scroll-reveal="true"] .mm-component.mm-reveal,
.mm-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  will-change: opacity, transform;
}

html[data-scroll-reveal="true"] .mm-component.mm-reveal--visible,
.mm-reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html[data-scroll-reveal="true"] .mm-component.mm-reveal,
  .mm-reveal {
    transition: none;
    will-change: auto;
  }
}

.mm-reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.mm-reveal--visible.mm-reveal-stagger > * {
  opacity: 1;
  transform: translateY(0);
}

.mm-reveal--visible.mm-reveal-stagger > *:nth-child(1) { transition-delay: 0.05s; }
.mm-reveal--visible.mm-reveal-stagger > *:nth-child(2) { transition-delay: 0.12s; }
.mm-reveal--visible.mm-reveal-stagger > *:nth-child(3) { transition-delay: 0.19s; }
.mm-reveal--visible.mm-reveal-stagger > *:nth-child(4) { transition-delay: 0.26s; }

@supports not ((-webkit-backdrop-filter: blur(2px)) or (backdrop-filter: blur(2px))) {
  .mm-frosted-text,
  .mm-image-caption,
  .mm-feature-card,
  .site-shell-header--scrolled {
    background-color: var(--mm-header-bg);
  }
}

body.site-shell-nav-open {
  overflow: hidden;
}

#site-shell-drawer {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

#site-shell-drawer.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

#site-shell-drawer [data-shell-panel] {
  transform: translateX(100%);
  transition: transform 0.22s ease-out;
}

#site-shell-drawer.is-open [data-shell-panel] {
  transform: translateX(0);
}

.site-shell-more > summary,
.site-shell-navdrop > summary,
.site-shell-mobiledrop > summary {
  list-style: none;
}

.site-shell-more > summary::-webkit-details-marker,
.site-shell-navdrop > summary::-webkit-details-marker,
.site-shell-mobiledrop > summary::-webkit-details-marker {
  display: none;
}

.site-shell-mobiledrop[open] summary .material-symbols-outlined {
  transform: rotate(180deg);
}

.site-shell-mobiledrop summary .material-symbols-outlined {
  transition: transform 0.2s ease;
}

/* Contact page and footer nav still use raw sky/slate utilities */
aside[class*="bg-slate"],
[class*="bg-slate-950"],
[class*="bg-slate-900"] {
  background-color: color-mix(in srgb, var(--mm-surface-container) 94%, transparent) !important;
}

[class*="border-sky-400"],
[class*="border-sky-300"] {
  border-color: var(--mm-header-border) !important;
}

[class*="text-sky-300"],
[class*="text-sky-200"],
[class*="text-sky-100"] {
  color: var(--mm-primary) !important;
}

/* Filled primary-container buttons must use high-contrast label text */
[class*="bg-primary-container"][class*="text-sky-300"],
[class*="bg-primary-container"][class*="text-sky-200"],
[class*="bg-primary-container"][class*="text-sky-100"] {
  color: var(--mm-on-primary-container) !important;
}

[class*="text-slate-400"],
[class*="text-slate-300"],
[class*="text-slate-200"] {
  color: var(--mm-on-surface-variant) !important;
}

[class*="hover:bg-sky-400"]:hover,
a[class*="hover:bg-sky-400"]:hover {
  background-color: var(--mm-primary-muted) !important;
}

[class*="hover:text-sky-100"]:hover,
a[class*="hover:text-sky-100"]:hover {
  color: var(--mm-primary) !important;
}
