/* Trails AMS mobile app showcase */
.trails-mobile-app-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: 2.5rem;
  padding: clamp(1.5rem, 3.5vw, 3.5rem);
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 84% 13%, rgba(37, 99, 235, 0.17), transparent 34%),
    linear-gradient(135deg, #f8fbff 0%, #f3f7fd 100%);
}

.trails-mobile-app-copy {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 1.25rem;
}

.trails-mobile-app-copy h2 {
  max-width: 12ch;
}

.trails-mobile-app-lead {
  color: #475569;
  line-height: 1.65;
}

.trails-mobile-app-benefits {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.25rem;
}

.trails-mobile-app-benefit {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  align-items: start;
  gap: 0.85rem;
}

.trails-mobile-app-icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 0.75rem;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  font-size: 1.25rem;
}

.trails-mobile-app-benefit h3 {
  color: inherit;
}

.trails-mobile-app-benefit p {
  color: #64748b;
  line-height: 1.55;
}

.trails-mobile-app-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding-top: 0.35rem;
}

.trails-mobile-app-platforms span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 999px;
  color: #334155;
  background: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  font-weight: 600;
}

.trails-mobile-app-platforms i {
  color: #2563eb;
  font-size: 1rem;
}

.trails-mobile-app-devices {
  position: relative;
  min-height: 31rem;
  isolation: isolate;
}

.trails-device-glow {
  position: absolute;
  right: 5%;
  bottom: 9%;
  width: 75%;
  aspect-ratio: 1;
  z-index: -1;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.16);
  filter: blur(2.5rem);
}

.trails-tablet-stack,
.trails-phone-stack {
  position: absolute;
  inset: 0;
}

.trails-device {
  position: absolute;
  display: block;
  margin: 0;
  overflow: hidden;
  border: clamp(4px, 0.5vw, 7px) solid #111827;
  background: #111827;
  box-shadow: 0 1.25rem 2.5rem rgba(15, 23, 42, 0.25);
}

.trails-device img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trails-device-tablet {
  width: clamp(12rem, 24vw, 18rem);
  aspect-ratio: 3 / 4;
  border-radius: 1.25rem;
}

.trails-device-phone {
  width: clamp(6.5rem, 11.2vw, 8.75rem);
  aspect-ratio: 6 / 13;
  border-radius: 1.4rem;
}

.trails-tablet-primary {
  top: 3%;
  left: 1%;
  z-index: 2;
  transform: rotate(-4deg);
}

.trails-tablet-secondary {
  top: 11%;
  left: 37%;
  z-index: 1;
  opacity: 0.94;
  transform: rotate(8deg);
}

.trails-phone-primary {
  right: 1%;
  bottom: 2%;
  z-index: 4;
  transform: rotate(5deg);
}

.trails-phone-secondary {
  right: 20%;
  bottom: 5%;
  z-index: 3;
  opacity: 0.96;
  transform: rotate(-6deg);
}

.dark .trails-mobile-app-shell {
  border-color: rgba(96, 165, 250, 0.2);
  background:
    radial-gradient(circle at 84% 13%, rgba(37, 99, 235, 0.28), transparent 34%),
    linear-gradient(135deg, #172033 0%, #111827 100%);
}

.dark .trails-mobile-app-lead,
.dark .trails-mobile-app-benefit p {
  color: #cbd5e1;
}

.dark .trails-mobile-app-platforms span {
  border-color: rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.5);
}

/* Keep the next section visually connected to the app showcase. */
.trails-mobile-app-section .section-outer {
  padding-bottom: 2rem !important;
}

.trails-mobile-app-section + hr + #capabilities .section-outer {
  padding-top: 2rem !important;
}

@media (min-width: 640px) {
  .trails-mobile-app-section .section-outer {
    padding-bottom: 3rem !important;
  }

  .trails-mobile-app-section + hr + #capabilities .section-outer {
    padding-top: 3rem !important;
  }
}

@media (max-width: 991.98px) {
  .trails-mobile-app-shell {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .trails-mobile-app-copy h2 {
    max-width: 18ch;
  }

  .trails-mobile-app-devices {
    width: min(100%, 38rem);
    min-height: 29rem;
    margin: 0 auto;
  }
}

@media (max-width: 639.98px) {
  .trails-mobile-app-shell {
    padding: 1.25rem;
    border-radius: 1.15rem;
  }

  .trails-mobile-app-devices {
    min-height: clamp(19rem, 90vw, 27rem);
  }

  .trails-device-tablet {
    width: min(52vw, 14rem);
  }

  .trails-device-phone {
    width: min(26vw, 7rem);
  }

  .trails-tablet-primary {
    left: 0;
  }

  .trails-tablet-secondary {
    left: 36%;
  }

  .trails-phone-secondary {
    right: 18%;
  }
}
