/**
 * Proxy Grove — Enterprise Proxy Solutions (products)
 * Grove brand tokens only · does not alter hero/trust styles
 */

.pg-products {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 4.5rem 0 5.5rem;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgb(19 0 154 / 0.055), transparent 55%),
    radial-gradient(ellipse 40% 35% at 100% 40%, rgb(19 127 21 / 0.04), transparent 50%),
    radial-gradient(ellipse 35% 30% at 0% 80%, rgb(0 0 174 / 0.04), transparent 50%),
    var(--color-surface-body);
}

.pg-products__grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(19 0 154 / 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgb(19 0 154 / 0.028) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 65% at 50% 35%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 35%, #000 20%, transparent 78%);
}

.pg-products__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.pg-products__glow--1 {
  width: 22rem;
  height: 22rem;
  top: 5%;
  left: -6rem;
  background: rgb(19 0 154 / 0.1);
  animation: pg-prod-drift 15s ease-in-out infinite;
}

.pg-products__glow--2 {
  width: 26rem;
  height: 26rem;
  bottom: 8%;
  right: -8rem;
  background: rgb(19 127 21 / 0.09);
  animation: pg-prod-drift 17s ease-in-out infinite reverse;
}

.pg-products__inner {
  position: relative;
  z-index: 1;
}

.pg-products__header {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 2.75rem;
}

.pg-products__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-heading);
  background: var(--color-surface-raised);
  border: 1px solid rgb(19 0 154 / 0.12);
  box-shadow: 0 4px 20px rgb(19 0 154 / 0.05);
  margin-bottom: 1rem;
}

.pg-products__eyebrow-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--color-button-primary-bg);
  box-shadow: 0 0 0 0 rgb(19 127 21 / 0.4);
  animation: pg-prod-pulse 2.2s ease-out infinite;
}

.pg-products__title {
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(1.85rem, 3.8vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--color-text-heading);
}

.pg-products__subtitle {
  margin: 0.9rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text-body);
}

/* —— Grid —— */
.pg-products__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .pg-products__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.35rem;
  }
}

@media (min-width: 1100px) {
  .pg-products__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

/* —— Product card —— */
.pg-prod {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border-radius: 1.5rem;
  background: color-mix(in srgb, var(--color-surface-raised) 92%, transparent);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid transparent;
  box-shadow: var(--shadow-glass);
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s ease;
}

.pg-prod::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    150deg,
    rgb(19 0 154 / 0.2),
    rgb(255 255 255 / 0.55) 42%,
    rgb(19 127 21 / 0.18)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

.pg-prod:hover {
  transform: translateY(-6px);
  box-shadow:
    0 12px 24px rgb(19 0 154 / 0.07),
    0 32px 64px rgb(19 0 154 / 0.14);
}

.pg-prod__visual {
  position: relative;
  height: 9.5rem;
  flex-shrink: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 80% at 70% 30%, rgb(19 0 154 / 0.08), transparent 60%),
    radial-gradient(ellipse 60% 70% at 20% 80%, rgb(19 127 21 / 0.07), transparent 55%),
    linear-gradient(180deg, rgb(249 250 251), rgb(243 245 250));
  content-visibility: auto;
  contain-intrinsic-size: 152px;
}

.pg-prod__visual svg {
  width: 100%;
  height: 100%;
  display: block;
}

.pg-prod__float {
  animation: pg-prod-float 5.5s ease-in-out infinite;
  transform-origin: center;
}

.pg-prod:hover .pg-prod__float {
  animation-duration: 3.5s;
}

.pg-prod__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1.35rem 1.4rem;
  min-height: 0;
}

.pg-prod__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.pg-prod__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-heading);
  background: rgb(19 0 154 / 0.08);
  border: 1px solid rgb(19 0 154 / 0.1);
  white-space: nowrap;
}

.pg-prod__badge--popular {
  color: var(--color-button-primary-bg);
  background: rgb(19 127 21 / 0.1);
  border-color: rgb(19 127 21 / 0.18);
}

.pg-prod__badge--perf {
  color: var(--color-text-heading);
  background: linear-gradient(135deg, rgb(19 0 154 / 0.1), rgb(19 127 21 / 0.08));
}

.pg-prod__badge--new {
  color: #fff;
  background: var(--color-text-heading);
  border-color: transparent;
}

.pg-prod__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.7rem;
  background: linear-gradient(145deg, rgb(19 0 154 / 0.1), rgb(19 127 21 / 0.08));
  color: var(--color-text-heading);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.pg-prod:hover .pg-prod__icon {
  transform: scale(1.08) rotate(-4deg);
}

.pg-prod__icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.pg-prod__title {
  margin: 0 0 0.5rem;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--color-text-heading);
}

.pg-prod__desc {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-text-body);
}

.pg-prod__features {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pg-prod__features li {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text-body);
}

.pg-prod__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.1rem;
  border-radius: 9999px;
  background: rgb(19 127 21 / 0.12);
  color: var(--color-button-primary-bg);
  flex-shrink: 0;
}

.pg-prod__check svg {
  width: 0.65rem;
  height: 0.65rem;
}

.pg-prod__footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgb(19 0 154 / 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.pg-prod__pricing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pg-prod__price-label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--color-text-body);
  opacity: 0.7;
}

.pg-prod__price {
  display: block;
  margin-top: 0.1rem;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-heading);
}

.pg-prod__status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-button-primary-bg);
  background: rgb(19 127 21 / 0.1);
  white-space: nowrap;
}

.pg-prod__status-dot {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--color-button-primary-bg);
  animation: pg-prod-pulse 2s ease-out infinite;
}

.pg-prod__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-btn);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--color-button-primary-text);
  background: var(--color-button-primary-bg);
  box-shadow: 0 0 20px rgb(19 127 21 / 0.22);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pg-prod__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgb(19 127 21 / 0.35);
}

.pg-prod__cta:focus-visible {
  outline: 2px solid var(--color-text-heading);
  outline-offset: 3px;
}

.pg-prod__cta svg {
  width: 0.95rem;
  height: 0.95rem;
  transition: transform 0.2s ease;
}

.pg-prod__cta:hover svg {
  transform: translateX(3px);
}

.pg-prod__ripple {
  position: absolute;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.35);
  transform: scale(0);
  animation: pg-prod-ripple 0.55s ease-out forwards;
  pointer-events: none;
}

/* —— Bottom CTA —— */
.pg-products__cta-band {
  margin-top: 3rem;
  padding: 2rem 1.75rem;
  border-radius: 1.5rem;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgb(19 0 154 / 0.06), transparent 60%),
    color-mix(in srgb, var(--color-surface-raised) 94%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid transparent;
  box-shadow: var(--shadow-glass);
  position: relative;
  overflow: hidden;
}

.pg-products__cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgb(19 0 154 / 0.2),
    rgb(255 255 255 / 0.4) 50%,
    rgb(19 127 21 / 0.18)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.pg-products__cta-title {
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text-heading);
}

.pg-products__cta-desc {
  margin: 0.65rem auto 0;
  max-width: 32rem;
  font-size: 0.975rem;
  line-height: 1.6;
  color: var(--color-text-body);
}

.pg-products__cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.35rem;
}

.pg-products__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-btn);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pg-products__btn--primary {
  color: var(--color-button-primary-text);
  background: var(--color-button-primary-bg);
  box-shadow: 0 0 22px rgb(19 127 21 / 0.25);
}

.pg-products__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgb(19 127 21 / 0.35);
}

.pg-products__btn--secondary {
  color: var(--color-text-heading);
  background: rgb(255 255 255 / 0.92);
  border: 1px solid rgb(19 0 154 / 0.15);
}

.pg-products__btn--secondary:hover {
  transform: translateY(-2px);
  border-color: rgb(19 0 154 / 0.28);
  box-shadow: 0 8px 28px rgb(19 0 154 / 0.1);
}

.pg-products__btn:focus-visible {
  outline: 2px solid var(--color-text-heading);
  outline-offset: 3px;
}

.pg-products__btn svg {
  width: 1rem;
  height: 1rem;
}

@media (max-width: 479px) {
  .pg-products__cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .pg-products__btn {
    width: 100%;
  }
}

@keyframes pg-prod-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12px, -14px) scale(1.05); }
}

@keyframes pg-prod-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes pg-prod-pulse {
  0% { box-shadow: 0 0 0 0 rgb(19 127 21 / 0.45); }
  70% { box-shadow: 0 0 0 6px rgb(19 127 21 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(19 127 21 / 0); }
}

@keyframes pg-prod-ripple {
  to {
    transform: scale(2.4);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pg-products__glow,
  .pg-products__eyebrow-dot,
  .pg-prod__float,
  .pg-prod__status-dot {
    animation: none !important;
  }

  .pg-prod:hover,
  .pg-prod:hover .pg-prod__icon,
  .pg-prod__cta:hover,
  .pg-products__btn:hover {
    transform: none;
  }
}
