/* ── Products section ─────────────────────────────────────────── */

.products {
  position: relative;
  padding: clamp(3rem, 6vh, 4.5rem) 0;
  overflow: hidden;
}

.products__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 15% 20%, rgba(168, 85, 247, 0.09), transparent 55%),
    radial-gradient(ellipse 45% 35% at 85% 70%, rgba(34, 211, 238, 0.07), transparent 50%);
}

.products__header {
  max-width: 680px;
  margin: 0 auto clamp(2rem, 4vw, 2.75rem);
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.products.is-visible .products__header.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.products__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.products__title {
  margin: 0 0 0.85rem;
  font-size: var(--type-subsection-title);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.products__subtitle {
  margin: 0;
  font-size: var(--type-section-subtitle);
  line-height: 1.65;
  color: var(--text-secondary);
}

.products__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.35rem);
}

.product-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, color-mix(in srgb, var(--product-accent) 12%, transparent), transparent 65%),
    linear-gradient(160deg, rgba(14, 22, 44, 0.82) 0%, rgba(8, 14, 30, 0.72) 100%);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  transition-delay: var(--reveal-delay, 0s);
}

.products.is-visible .product-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.product-card:hover {
  border-color: color-mix(in srgb, var(--product-accent) 40%, rgba(148, 163, 184, 0.2));
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.34),
    0 0 0 1px color-mix(in srgb, var(--product-accent) 18%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.product-card__visual {
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(ellipse 70% 80% at 50% 30%, color-mix(in srgb, var(--product-accent) 22%, transparent), transparent 70%),
    rgba(6, 12, 28, 0.5);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  overflow: hidden;
}

.product-card__image {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__image.is-loaded {
  display: block;
}

.product-card__image.is-loaded + .product-card__fallback {
  display: none;
}

.product-card__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.product-card__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  color: var(--product-accent);
  background: color-mix(in srgb, var(--product-accent) 14%, rgba(255, 255, 255, 0.04));
  border: 1px solid color-mix(in srgb, var(--product-accent) 28%, transparent);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--product-accent) 20%, transparent);
}

.product-card__icon svg {
  width: 32px;
  height: 32px;
}

.product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.15rem 1.25rem 1.35rem;
}

.product-card__category {
  margin: 0 0 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--product-accent);
}

.product-card__name {
  margin: 0 0 0.55rem;
  font-size: var(--type-card-title-sm);
  font-weight: 700;
  line-height: 1.25;
}

.product-card__desc {
  margin: 0 0 1rem;
  flex: 1;
  font-size: var(--type-body-sm);
  line-height: 1.6;
  color: var(--text-secondary);
}

.product-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--product-accent);
  transition: gap 0.2s ease, opacity 0.2s ease;
}

.product-card__cta:hover {
  gap: 0.55rem;
  opacity: 0.9;
}

@media (max-width: 1024px) {
  .products__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .products__grid {
    grid-template-columns: 1fr;
  }
}
