/**
 * Glowing feature cards — adapted from dark glow FeatureCard prompt
 * Used in Projects section (Projects delivered with client trust)
 */

.glow-features {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.glow-features .section-head {
  width: 100%;
  max-width: 936px;
  text-align: center;
  margin-inline: auto;
}

.glow-features .section-head h2 {
  max-width: none;
}

.glow-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  width: 100%;
  max-width: 936px;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .glow-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
}

.glow-card {
  --glow-gradient: linear-gradient(137deg, #ff3d77 0%, #ffb1ce 45%, #ff9d3c 100%);
  --glow-delay: 0.1s;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  max-width: 260px;
  margin-inline: auto;
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease-out var(--glow-delay),
    transform 0.8s ease-out var(--glow-delay);
}

.glow-card.in-view,
.glow-features.has-scroll-motion .glow-card.in-view,
body.has-scroll-motion .glow-card.in-view,
.glow-card.reveal-item.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Fallback when GSAP reveal not applied yet */
.glow-features:not(.reveal) .glow-card,
body:not(.has-scroll-motion) .glow-card {
  animation: glow-card-in 0.8s ease-out var(--glow-delay) both;
}

@keyframes glow-card-in {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 768px) {
  .glow-card {
    max-width: 300px;
  }
}

.glow-card-blur {
  position: absolute;
  inset-inline: 0;
  top: 0;
  width: 100%;
  height: 260px;
  opacity: 0.6;
  border-radius: 40px;
  pointer-events: none;
  background: var(--glow-gradient);
  filter: blur(18px);
  z-index: 0;
}

@media (min-width: 768px) {
  .glow-card-blur {
    height: 300px;
  }
}

.glow-card-face {
  position: relative;
  z-index: 10;
  align-self: stretch;
  width: 100%;
  height: 260px;
  border-radius: 40px;
  overflow: hidden;
  border: 8px solid transparent;
  background:
    linear-gradient(#1a1a1c, #1a1a1c) padding-box,
    var(--glow-gradient) border-box;
  transition: transform 0.35s ease;
}

@media (min-width: 768px) {
  .glow-card-face {
    height: 300px;
  }
}

.glow-card:hover .glow-card-face {
  transform: translateY(-4px);
}

.glow-card-inner {
  width: 100%;
  height: 100%;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

.glow-card-icon {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 18px;
  display: inline-flex;
}

.glow-card-icon svg {
  display: block;
}

.glow-card-title {
  margin: 0 0 12px;
  color: #ffffff;
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.glow-card-desc {
  margin: 0;
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
}

.glow-card-desc::selection {
  background: rgba(255, 255, 255, 0.2);
}

.glow-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.glow-card-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.glow-card-link:hover,
.glow-card-link:focus-visible {
  opacity: 0.85;
}

.glow-card-link-muted {
  color: rgba(156, 163, 175, 0.95);
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  .glow-card,
  body:not(.has-scroll-motion) .glow-card {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .glow-card:hover .glow-card-face {
    transform: none;
  }
}
