/* Sodium Apps: the /apps index. The hero, eyebrows and links come from
   integrations.css. */

/* ---------- Hero: Sodium wired to an app ---------- */

.ap-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  max-width: 440px;
}

.ap-link-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 12px;
  border-radius: 20px;
  background: white;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
  text-align: center;
  color: var(--primary);
}

.ap-link-node img {
  width: 52px;
  height: 52px;
  margin-bottom: 4px;
}

.ap-link-node strong {
  font-size: 1.05rem;
}

.ap-link-node small {
  font-size: 0.78rem;
  color: #6b7a7e;
  line-height: 1.3;
}

.ap-link-wire {
  position: relative;
  height: 10px;
}

.ap-link-wire::before {
  content: "";
  position: absolute;
  left: -6px;
  right: -6px;
  top: 50%;
  border-top: 2px dashed rgba(207, 224, 160, 0.55);
}

.ap-link-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
  animation: ap-pulse 2.6s ease-in-out infinite alternate;
}

@keyframes ap-pulse {
  from {
    left: -4px;
  }
  to {
    left: calc(100% - 6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ap-link-pulse {
    animation: none;
    left: calc(50% - 5px);
  }
}

/* ---------- Why apps: a short summary of the vision ---------- */

.ap-why {
  padding: 56px 0;
  background: white;
}

.ap-why-title {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  line-height: 1.25;
  color: var(--primary);
  margin: 0 0 12px;
}

.ap-why-body {
  max-width: 720px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #444;
  margin: 0;
}

/* ---------- The apps: one card each ---------- */

.ap-apps {
  padding: 88px 0;
  background: var(--bg);
  scroll-margin-top: var(--header-height);
}

.ap-apps-title {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  line-height: 1.2;
  color: var(--primary);
  margin: 0 0 32px;
}

.ap-apps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.ap-app {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  height: 100%;
  padding: 32px;
  border-radius: 20px;
  background: white;
  border: 1px solid rgba(34, 54, 60, 0.06);
  text-decoration: none;
  color: var(--primary);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ap-app:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 48px rgba(34, 54, 60, 0.12);
}

.ap-app:hover .ix-more svg {
  transform: translateX(3px);
}

.ap-app-logo {
  height: 44px;
  width: auto;
}

.ap-app p {
  margin: 0;
  line-height: 1.7;
  color: #444;
}

.ap-app .ix-more {
  margin-top: auto;
}

/* The placeholder after the last app */
.ap-app-ghost {
  background: transparent;
  border: 2px dashed rgba(34, 54, 60, 0.18);
}

.ap-app-ghost:hover {
  transform: none;
  box-shadow: none;
}

.ap-app-ghost-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(162, 185, 100, 0.16);
  color: #5d7230;
}

.ap-app-ghost strong {
  font-size: 1.2rem;
}

@media (max-width: 1024px) {
  .ap-link {
    margin: 0 auto;
  }
}

@media (max-width: 860px) {
  .ap-apps {
    padding: 64px 0;
  }

  .ap-app {
    padding: 24px;
  }
}

@media (max-width: 560px) {
  .ap-link {
    grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
  }

  .ap-link-node {
    padding: 16px 8px;
  }

  .ap-link-node img {
    width: 40px;
    height: 40px;
  }
}
