/* ============================================
   SECTION: PRODUCTS
   ============================================ */

.products {
  padding: clamp(80px, 10vh, 120px) 0;
  background: var(--c-bg);
  position: relative;
  overflow: hidden;
}

/* Clean subtle background */
.products-bg-circuit {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0,201,122,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(0,201,122,0.03) 0%, transparent 60%);
  pointer-events: none;
}

.products-header {
  text-align: center;
  margin-bottom: clamp(48px, 6vh, 70px);
  position: relative;
  z-index: 1;
}

.products-header .tag-label { margin-bottom: 18px; }

.products-header h2 {
  font-family: var(--f-display);
  font-size: clamp(28px, 4vw, 46px);
  color: var(--c-dark);
  letter-spacing: -0.025em;
  margin-bottom: 14px;
  line-height: 1.1;
}

.products-header p {
  font-size: 17px;
  color: var(--c-muted);
  max-width: 540px;
  margin-inline: auto;
  line-height: 1.7;
}

/* Products grid — 4 equal columns */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
  z-index: 1;
}

/* Product card — all equal */
.product-card {
  background: var(--c-surface);
  border-radius: var(--radius-l);
  padding: clamp(28px, 3vw, 38px) 26px;
  border: 1px solid var(--c-border);
  cursor: default;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--t-med) var(--ease-spring),
              box-shadow var(--t-med) var(--ease-out),
              border-color var(--t-med) ease;
}

/* Corner glow on hover */
.product-card::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at top left, rgba(0,201,122,0.10) 0%, transparent 55%);
  opacity: 0;
  transition: opacity var(--t-med) ease;
  pointer-events: none;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lift);
  border-color: rgba(0,201,122,0.25);
}

.product-card:hover::after { opacity: 1; }

/* Product icon */
.product-icon-wrap {
  width: 56px; height: 56px;
  border-radius: var(--radius-m);
  background: var(--c-accent-soft);
  border: 1px solid rgba(0,201,122,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
  transition: all var(--t-med) var(--ease-spring);
}

.product-icon-wrap svg {
  width: 26px; height: 26px;
  color: var(--c-accent);
  transition: transform var(--t-med) var(--ease-spring), color var(--t-fast) ease;
}

.product-card:hover .product-icon-wrap {
  background: var(--c-accent);
  border-color: var(--c-accent);
  box-shadow: 0 12px 28px rgba(0,201,122,0.35);
  transform: rotate(-6deg) scale(1.05);
}

.product-card:hover .product-icon-wrap svg {
  color: #000;
  transform: rotate(6deg);
}

.product-name {
  font-family: var(--f-display);
  font-size: 20px;
  color: var(--c-dark);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.product-desc {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.7;
  flex: 1;
  position: relative;
  z-index: 1;
  text-align: justify;
  hyphens: auto;           /* Automatically adds hyphens to long words at line breaks */
  word-break: break-word;   /* Safely handles ultra-long technical words (like micro-architecture) */
  text-align-last: left;    /* Forces the final line of a paragraph to align normally to the left */
/*  text-justify: inter-word; /* Ensures spacing between words remains natural */*/
}

/* Product card footer link */
.product-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-accent);
  margin-top: 24px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--t-med) ease, transform var(--t-med) var(--ease-out);
  position: relative;
  z-index: 1;
}

.product-link svg {
  width: 14px; height: 14px;
  transition: transform var(--t-med) var(--ease-spring);
}

.product-card:hover .product-link { opacity: 1; transform: translateY(0); }
.product-card:hover .product-link svg { transform: translateX(4px); }

/* Responsive breakpoints */
@media (max-width: 1050px) {
  .products-grid { grid-template-columns: 1fr 1fr; }
}

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