/* ===============================
   CARDS GRID
   =============================== */

.cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
}


/* ===============================
   CARD STRUCTURE
   =============================== */

.card {
  position: relative;
}

.card-shell {
  position: relative;
  height: 100%;
  opacity: 0;
  animation: card-enter 0.9s ease-out forwards;
  will-change: transform, opacity;
}

/* MAIN CARD SURFACE */
.card-float {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.75rem;

  position: relative;

  background: linear-gradient(45deg,
      rgba(255, 255, 255, 0.10),
      rgba(255, 255, 255, 0.04) 55%,
      rgba(11, 15, 20, 0.85));

  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);

  backdrop-filter: blur(14px);

  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ===============================
   SUBTLE BLUE OUTLINE (NO GLOW)
   =============================== */

.card-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  pointer-events: none;

  /*border: 1px solid rgba(77,163,255,0.45);*/
  opacity: 0.6;
}

/* Hover: slightly stronger outline */
.card:hover .card-shell::after {
  opacity: 1;
  border-color: rgba(77, 163, 255, 0.75);
}

/* ===============================
   CARD ENTER ANIMATION
   =============================== */

@keyframes card-enter {
  0% {
    opacity: 0;
    transform: translateY(calc(var(--arc-offset, 0px) + 60px)) scale(0.96);
  }

  60% {
    opacity: 1;
    transform: translateY(calc(var(--arc-offset, 0px) - 6px)) scale(1.01);
  }

  100% {
    opacity: 1;
    transform: translateY(var(--arc-offset, 0px)) scale(1);
  }
}

/* ===============================
   ARC OFFSETS (UNCHANGED)
   =============================== */

@media (min-width: 1200px) {
  .card:nth-child(1) .card-shell {
    --arc-offset: -48px;
  }

  .card:nth-child(2) .card-shell {
    --arc-offset: -24px;
  }

  .card:nth-child(3) .card-shell {
    --arc-offset: 0px;
  }

  .card:nth-child(4) .card-shell {
    --arc-offset: -24px;
  }

  .card:nth-child(5) .card-shell {
    --arc-offset: -48px;
  }
}

@media (max-width: 1199px) {
  .card-shell {
    --arc-offset: 0px;
  }
}

/* ===============================
   STAGGERED ENTRY
   =============================== */

.card:nth-child(1) .card-shell {
  animation-delay: 0.55s;
}

.card:nth-child(2) .card-shell {
  animation-delay: 0.7s;
}

.card:nth-child(3) .card-shell {
  animation-delay: 0.85s;
}

.card:nth-child(4) .card-shell {
  animation-delay: 1s;
}

.card:nth-child(5) .card-shell {
  animation-delay: 1.15s;
}

/* ===============================
   CARD HEADER
   =============================== */

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon img,
.card-icon svg {
  width: 32px;
  height: 32px;
  opacity: 0;
  animation: icon-draw 0.5s ease-out forwards;
}

/* Icon draw stagger */
.card:nth-child(1) .card-icon img,
.card:nth-child(1) .card-icon svg {
  animation-delay: 0.75s;
}

.card:nth-child(2) .card-icon img,
.card:nth-child(2) .card-icon svg {
  animation-delay: 0.9s;
}

.card:nth-child(3) .card-icon img,
.card:nth-child(3) .card-icon svg {
  animation-delay: 1.05s;
}

.card:nth-child(4) .card-icon img,
.card:nth-child(4) .card-icon svg {
  animation-delay: 1.2s;
}

.card:nth-child(5) .card-icon img,
.card:nth-child(5) .card-icon svg {
  animation-delay: 1.35s;
}

/* ===============================
   ICON DRAW
   =============================== */

@keyframes icon-draw {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===============================
   CARD TEXT
   =============================== */

.card h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

.card h3 span {
  color: var(--accent-green);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
  /* margin-bottom: 1.25rem;
  flex-grow: 1; */
}

.card a {
  color: var(--accent-green);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

/* ===============================
   ACCESSIBILITY
   =============================== */

@media (prefers-reduced-motion: reduce) {

  .card-shell,
  .card-icon img,
  .card-icon svg {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

/* ===============================
   RESPONSIVE OVERRIDES
   =============================== */

@media (max-width: 1200px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards>.card:nth-child(5) {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .cards {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card-float {
    padding: 1.5rem 1.25rem;
  }

  .card h3 {
    font-size: 1.1rem;
  }

  .card-header {
    margin-bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .cards {
    gap: 1.25rem;
  }

  .card-float {
    padding: 1.25rem 1rem;
  }

  .card h3 {
    font-size: 1rem;
  }

  .card p {
    font-size: 0.85rem;
  }

  .card-header {
    margin-bottom: 0.75rem;
  }

  .card-icon {
    width: 32px;
    height: 32px;
  }

  .card-icon img,
  .card-icon svg {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 368px) {
  .cards {
    gap: 1rem;
  }

  .card-float {
    padding: 1rem;
  }

  .card h3 {
    font-size: 0.95rem;
  }

  .card-header {
    margin-bottom: 0.6rem;
  }
}