
/* ============================================================
   Applications module — mad-motor.com
   Namespace: .mm-apps   (safe against Ueeshop .page_* globals)
   ============================================================ */

.mm-apps {
  --mm-accent: #f2621b;
  --mm-ink: #111213;
  --mm-muted: #5f6165;
  --mm-gap: 16px;
  --mm-radius: 10px;

  box-sizing: border-box;
  width: 100%;
  max-width: 1492px;
  margin: 0 auto;
  padding: 0 24px;
  color: var(--mm-ink);
  font-family: inherit;
  -webkit-font-smoothing: antialiased;
}

.mm-apps *,
.mm-apps *::before,
.mm-apps *::after {
  box-sizing: border-box;
}

/* ---------- header ---------- */

.mm-apps__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.mm-apps__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mm-ink);
  line-height: 1;
}

.mm-apps__dot {
  display: block;
  width: 13px;
  height: 6px;
  border-radius: 1px;
  background: var(--mm-accent);
  flex: 0 0 auto;
}

.mm-apps__all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: var(--mm-ink);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.mm-apps__all svg {
  display: block;
  width: 15px;
  height: 15px;
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mm-apps__all:hover {
  color: var(--mm-accent);
}

.mm-apps__all:hover svg {
  transform: translateX(3px);
}

.mm-apps__title {
  margin: 0 0 22px;
  font-size: clamp(26px, 3.05vw, 46px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.018em;
  text-transform: uppercase;
  color: var(--mm-ink);
}

/* ---------- grid ---------- */

.mm-apps__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--mm-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.mm-apps__grid > li {
  margin: 0;
  padding: 0;
  min-width: 0;
}

/* ---------- card ---------- */

.mm-apps__card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--mm-radius);
  aspect-ratio: 831 / 464;
  background: #14161a;
  color: #fff;
  text-decoration: none;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  transition: box-shadow 0.35s ease;
}

.mm-apps__card img {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.mm-apps__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      to top,
      rgba(4, 6, 10, 0.80) 0%,
      rgba(4, 6, 10, 0.52) 22%,
      rgba(4, 6, 10, 0.14) 52%,
      rgba(4, 6, 10, 0) 76%
    ),
    linear-gradient(rgba(6, 8, 12, 0.16), rgba(6, 8, 12, 0.16));
}

.mm-apps__copy {
  position: absolute;
  left: clamp(16px, 2.1vw, 30px);
  right: clamp(56px, 6vw, 78px);
  bottom: clamp(16px, 1.9vw, 26px);
  z-index: 2;
  display: block;
}

.mm-apps__card-title {
  display: block;
  font-size: clamp(17px, 1.45vw, 22px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.mm-apps__card-desc {
  display: block;
  margin-top: 6px;
  font-size: clamp(12px, 0.95vw, 14px);
  font-weight: 400;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.88);
}

/* ---------- arrow button ---------- */

.mm-apps__go {
  position: absolute;
  right: clamp(14px, 1.7vw, 24px);
  bottom: clamp(14px, 1.7vw, 24px);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(34px, 3vw, 42px);
  height: clamp(34px, 3vw, 42px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mm-apps__go svg {
  display: block;
  width: 46%;
  height: 46%;
}

/* ---------- interaction ---------- */

.mm-apps__card:hover img,
.mm-apps__card:focus-visible img {
  transform: scale(1.045);
}

.mm-apps__card:hover .mm-apps__go,
.mm-apps__card:focus-visible .mm-apps__go {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateX(2px);
}

.mm-apps__card:focus-visible {
  outline: 2px solid var(--mm-accent);
  outline-offset: 3px;
}

/* ---------- graceful degradation ---------- */

.mm-apps__card.is-media-error {
  background:
    radial-gradient(120% 90% at 30% 10%, #2b3442 0%, #171b22 55%, #101216 100%);
}

.mm-apps__card.is-media-error img {
  opacity: 0;
}

/* ---------- entrance ---------- */

.mm-apps--js .mm-apps__card {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.62s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.62s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 85ms);
}

.mm-apps--js.is-ready .mm-apps__card {
  opacity: 1;
  transform: none;
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .mm-apps {
    padding: 0 20px;
  }

  .mm-apps__title {
    margin-bottom: 18px;
  }
}

@media (max-width: 768px) {
  .mm-apps {
    padding: 0 16px;
  }

  .mm-apps__head {
    margin-bottom: 12px;
  }

  .mm-apps__all {
    font-size: 12px;
  }

  .mm-apps__title {
    margin-bottom: 16px;
    line-height: 1.08;
  }

  .mm-apps__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .mm-apps__card {
    aspect-ratio: 16 / 10;
  }

  /* keep copy clear of the arrow button on narrow cards */
  .mm-apps__copy {
    right: 68px;
    bottom: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mm-apps--js .mm-apps__card,
  .mm-apps--js.is-ready .mm-apps__card {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .mm-apps__card img,
  .mm-apps__go,
  .mm-apps__all svg {
    transition: none;
  }
}

