/* Product modules — ultra-glossy transparent glass tiles */
.eh-modules-section {
  --eh-mod-accent: var(--accent, var(--blue));
  position: relative;
  overflow: hidden;
  padding: 100px 0 92px;
  background:
    radial-gradient(980px 460px at 6% -8%, color-mix(in srgb, var(--eh-mod-accent) 22%, transparent), transparent 66%),
    radial-gradient(820px 400px at 94% 108%, color-mix(in srgb, var(--eh-mod-accent) 16%, transparent), transparent 68%),
    linear-gradient(180deg, #e8efff 0%, #f4f8ff 38%, #fdfdfb 100%);
}

.eh-modules-section::before,
.eh-modules-section::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(48px);
}

.eh-modules-section::before {
  width: 340px;
  height: 340px;
  top: 8%;
  left: -6%;
  background: color-mix(in srgb, var(--eh-mod-accent) 28%, transparent);
  opacity: 0.65;
}

.eh-modules-section::after {
  width: 380px;
  height: 380px;
  bottom: 4%;
  right: -8%;
  background: color-mix(in srgb, var(--eh-mod-accent) 18%, #ffffff);
  opacity: 0.5;
}

.eh-modules-section.tone-violet { --eh-mod-accent: var(--violet); }
.eh-modules-section.tone-amber { --eh-mod-accent: var(--orange); }
.eh-modules-section.tone-cyan { --eh-mod-accent: var(--cyan); }
.eh-modules-section.tone-blue { --eh-mod-accent: var(--blue); }
.eh-modules-section.tone-green { --eh-mod-accent: var(--green); }
.eh-modules-section.tone-purple { --eh-mod-accent: var(--purple); }

.eh-modules-section .site-shell {
  width: var(--site-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.eh-modules-head {
  max-width: 720px;
  margin-bottom: 34px;
}

.eh-modules-head .section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: color-mix(in srgb, var(--eh-mod-accent) 8%, rgba(255, 255, 255, 0.38));
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  color: color-mix(in srgb, var(--eh-mod-accent) 80%, #1a1c1b);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.eh-modules-head h2 {
  margin: 0 0 12px;
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  color: var(--ink);
}

.eh-modules-head p {
  margin: 0;
  max-width: 54ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.eh-modules-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* Glossy glass tile */
.eh-module-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 132px;
  padding: 18px 16px 16px;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(148deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.14) 42%, rgba(255, 255, 255, 0.06) 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--eh-mod-accent) 7%, transparent) 0%, transparent 72%);
  backdrop-filter: blur(24px) saturate(1.65) brightness(1.06) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.65) brightness(1.06) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -20px 36px rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px color-mix(in srgb, var(--eh-mod-accent) 14%, rgba(255, 255, 255, 0.35)),
    0 18px 44px color-mix(in srgb, var(--eh-mod-accent) 16%, rgba(32, 31, 26, 0.1));
  transition:
    transform 0.34s cubic-bezier(0.22, 0.82, 0.2, 1),
    border-color 0.34s ease,
    box-shadow 0.34s ease,
    background 0.34s ease;
}

/* Frost + color wash */
.eh-module-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(
      128deg,
      rgba(255, 255, 255, 0.62) 0%,
      rgba(255, 255, 255, 0.12) 34%,
      transparent 52%,
      color-mix(in srgb, var(--eh-mod-accent) 8%, transparent) 100%
    );
  pointer-events: none;
  z-index: 1;
}

/* Top-left glossy hotspot */
.eh-module-item::after {
  content: "";
  position: absolute;
  top: -45%;
  left: -25%;
  width: 78%;
  height: 62%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.22) 42%, transparent 72%);
  pointer-events: none;
  z-index: 2;
  opacity: 0.92;
  transition: opacity 0.34s ease, transform 0.34s ease;
}

/* Animated shine sweep */
.eh-mod-shine {
  position: absolute;
  top: -35%;
  bottom: -35%;
  left: -70%;
  width: 52%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 35%,
    rgba(255, 255, 255, 0.82) 50%,
    rgba(255, 255, 255, 0.15) 65%,
    transparent 100%
  );
  transform: rotate(20deg);
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  animation: ehModTileSheen 5.2s ease-in-out infinite;
}

.eh-module-item:nth-child(2n) .eh-mod-shine { animation-delay: -1.4s; }
.eh-module-item:nth-child(3n) .eh-mod-shine { animation-delay: -2.8s; }
.eh-module-item:nth-child(4n) .eh-mod-shine { animation-delay: -0.7s; }

@keyframes ehModTileSheen {
  0%, 24% {
    opacity: 0;
    transform: translateX(-85%) rotate(20deg);
  }
  40% {
    opacity: 0.85;
  }
  58%, 100% {
    opacity: 0;
    transform: translateX(240%) rotate(20deg);
  }
}

.eh-module-item:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.95);
  background:
    linear-gradient(148deg, rgba(255, 255, 255, 0.48) 0%, rgba(255, 255, 255, 0.2) 44%, rgba(255, 255, 255, 0.1) 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--eh-mod-accent) 10%, transparent) 0%, transparent 72%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -22px 40px rgba(255, 255, 255, 0.12),
    inset 0 0 0 1px color-mix(in srgb, var(--eh-mod-accent) 22%, rgba(255, 255, 255, 0.5)),
    0 26px 56px color-mix(in srgb, var(--eh-mod-accent) 22%, rgba(32, 31, 26, 0.14));
}

.eh-module-item:hover::after {
  opacity: 1;
  transform: translate(8%, 10%) scale(1.05);
}

.eh-module-item .eh-mod-num,
.eh-module-item b,
.eh-module-item small {
  position: relative;
  z-index: 4;
}

.eh-module-item .eh-mod-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.72) 0%, color-mix(in srgb, var(--eh-mod-accent) 16%, rgba(255, 255, 255, 0.22)) 100%);
  backdrop-filter: blur(10px) saturate(1.4);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  color: color-mix(in srgb, var(--eh-mod-accent) 85%, #1a1c1b);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 6px 16px color-mix(in srgb, var(--eh-mod-accent) 18%, transparent);
}

.eh-module-item b {
  display: block;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.25;
  letter-spacing: -0.03em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.eh-module-item small {
  display: block;
  color: color-mix(in srgb, var(--muted) 88%, var(--ink));
  font-size: 0.9rem;
  line-height: 1.45;
}

.eh-modules-note {
  margin: 22px 0 0;
  color: #7a889f;
  font-size: 0.9rem;
}

@media (max-width: 1100px) {
  .eh-modules-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .eh-modules-section {
    padding: 72px 0 64px;
  }
  .eh-modules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .eh-module-item {
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .eh-modules-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eh-module-item,
  .eh-module-item:hover,
  .eh-module-item::after,
  .eh-mod-shine {
    transition: none;
    transform: none;
    animation: none !important;
  }
}
