/* "Choose Your Path" on the homepage: five cards in one wide row on large
   screens, 3 + 2 on laptops (1100-1399px), a swipeable row on phones and tablets, each with its own colour (--c), and a staggered
   rise-in as they scroll into view (the site's .reveal). */
/* AI Basics uses the logo blue (the card colours are set inline in index.html) */
.path5-row > .path5-item:first-child .path5-card { --c: #2f86ff !important; }
.path5-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.path5-item { display: flex; min-width: 0; }
.path5-row > .reveal:nth-child(2) { transition-delay: 0.08s; }
.path5-row > .reveal:nth-child(3) { transition-delay: 0.16s; }
.path5-row > .reveal:nth-child(4) { transition-delay: 0.24s; }
.path5-row > .reveal:nth-child(5) { transition-delay: 0.32s; }
.path5-card {
  position: relative; display: flex; flex-direction: column; width: 100%; padding: 24px 18px 18px;
  border-radius: var(--radius-md); overflow: hidden; isolation: isolate;
  background: linear-gradient(165deg, color-mix(in srgb, var(--c) 16%, var(--surface)), var(--surface) 58%);
  border: 1px solid color-mix(in srgb, var(--c) 32%, var(--border));
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s ease, border-color 0.35s ease;
}
/* glowing top edge */
.path5-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 1;
  background: linear-gradient(90deg, transparent, var(--c), color-mix(in srgb, var(--c) 55%, #fff), var(--c), transparent);
  background-size: 200% 100%; animation: path5-edge 4s linear infinite;
}
/* soft colour glow in the corner, brighter on hover */
.path5-card::after {
  content: ""; position: absolute; width: 180px; height: 180px; right: -70px; top: -70px; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 45%, transparent), transparent 70%);
  opacity: 0.55; transition: opacity 0.35s ease, transform 0.35s ease;
}
.path5-card:hover, .path5-card:focus-within {
  transform: translateY(-6px); border-color: var(--c);
  box-shadow: 0 20px 44px -20px var(--c), 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent);
}
.path5-card:hover::after, .path5-card:focus-within::after { opacity: 1; transform: scale(1.15); }
.path5-icon {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: #fff;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #ffffff));
  box-shadow: 0 10px 22px -10px var(--c); animation: path5-float 4.5s ease-in-out infinite;
}
.path5-item:nth-child(2) .path5-icon { animation-delay: -0.9s; }
.path5-item:nth-child(3) .path5-icon { animation-delay: -1.8s; }
.path5-item:nth-child(4) .path5-icon { animation-delay: -2.7s; }
.path5-item:nth-child(5) .path5-icon { animation-delay: -3.6s; }
.path5-icon svg { width: 26px; height: 26px; }
.path5-card h3 { margin: 0 0 8px; font-size: 1.08rem; line-height: 1.3; }
.path5-card p { margin: 0 0 14px; font-size: 0.9rem; line-height: 1.55; color: var(--text-muted); }
.path5-meta { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.path5-meta li { font-size: 0.72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; color: var(--text); background: color-mix(in srgb, var(--c) 18%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.path5-btn {
  margin-top: auto; width: 100%; justify-content: center; font-size: 0.88rem; padding: 10px 14px;
  background: transparent; color: var(--text); border: 1px solid color-mix(in srgb, var(--c) 55%, var(--border));
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.path5-btn span { display: inline-block; transition: transform 0.25s ease; }
.path5-card:hover .path5-btn, .path5-btn:focus-visible { background: var(--c); border-color: var(--c); color: #fff; }
.path5-card:hover .path5-btn span { transform: translateX(4px); }
.path5-swipe { display: none; }
@keyframes path5-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes path5-edge { to { background-position: -200% 0; } }

/* Buttons wrap inside the card (e.g. "Open Creator Studio" + the SOON badge) instead of spilling out. */
.path5-btn { flex-wrap: wrap; white-space: normal; row-gap: 4px; padding-inline: 10px; text-align: center; }

/* Laptops: 3 cards on top, 2 centred below, so each card has room. */
@media (min-width: 1100px) and (max-width: 1399px) {
  .path5-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px; }
  .path5-item { flex: 0 0 calc((100% - 52px) / 3); }
}
/* Wide screens: one row of five, wider than the text column, with more space between cards. */
@media (min-width: 1400px) {
  .path5-row { gap: 26px; margin-inline: calc((100% - min(1440px, 100vw - 64px)) / 2); }
}

/* Phones and tablets: still one row, swiped sideways, one card snapping at a time. */
@media (max-width: 1099px) {
  .path5-row {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    padding: 8px 4px 16px; margin: -8px -4px 0; scrollbar-width: thin; -webkit-overflow-scrolling: touch;
  }
  .path5-item { flex: 0 0 min(78%, 280px); scroll-snap-align: start; }
  .path5-swipe { display: block; margin: 4px 0 0; font-size: 0.82rem; color: var(--text-muted); text-align: center; }
  /* In a sideways row a card must never stay hidden: always visible, it only
     glides up a little as it comes into view. */
  .path5-row > .reveal { opacity: 1; }
  .path5-row > .reveal:not(.is-visible) { transform: translateY(14px); }
}
@media (prefers-reduced-motion: reduce) {
  .path5-icon, .path5-card::before { animation: none; }
  .path5-card, .path5-card::after, .path5-btn span { transition: none; }
  .path5-card:hover, .path5-card:focus-within { transform: none; }
}
html.lite .path5-icon, html.lite .path5-card::before { animation: none; }
