/* ============================================================
   makeBIMI — Global Structural Hierarchy & Spatial Polish
   feature/premium-matrix-ui branch
   ============================================================ */

/* ── 1. DROPZONE ENVIRONMENTAL ANCHOR ──────────────────────────────────────── */

/* Radial glow behind the utility panel to lift it off the canvas */
.utility-panel {
  position: relative;
}
.utility-panel::before {
  content: '';
  position: absolute;
  inset: -60px -80px;
  background: radial-gradient(
    circle at 50% 40%,
    rgba(113,112,255,0.07) 0%,
    rgba(113,112,255,0.03) 30%,
    transparent 65%
  );
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
}

/* Dropzone hover/drag state — accent border glow */
.dropzone {
  transition:
    border-color 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow   200ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    background   200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.dropzone:hover,
.dropzone.drag-over {
  border-color: rgba(113,112,255,0.5) !important;
  box-shadow:
    0 0 0 1px rgba(113,112,255,0.15),
    0 0 24px rgba(113,112,255,0.12),
    inset 0 0 16px rgba(113,112,255,0.04);
  background: rgba(113,112,255,0.03) !important;
}

/* ── 2. HOW IT WORKS — STEP NUMBER WATERMARKS ──────────────────────────────── */

/* The step cards use .bento-card inside the process grid.
   We target the first 3 .bento-card elements inside the process section. */
#how-it-works .bento-card {
  position: relative;
  overflow: hidden;
}

/* Watermark pseudo-element — massive typographic number */
#how-it-works .bento-card::after {
  content: attr(data-step);
  position: absolute;
  bottom: -20px;
  right: -8px;
  font-size: 140px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: rgba(255,255,255,0.03);
  pointer-events: none;
  user-select: none;
  font-family: var(--font);
  z-index: 0;
}

/* Ensure card content sits above the watermark */
#how-it-works .bento-card > * {
  position: relative;
  z-index: 1;
}

/* ── 3. BENTO GRID — FEATURE CARD DISTINCTION ──────────────────────────────── */

/* Hover lift + border brightening */
.bento-grid .bento-card {
  transition:
    transform     160ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    border-color  160ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow    160ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    background    160ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.bento-grid .bento-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.12) !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 8px 24px rgba(0,0,0,0.3);
  background: rgba(255,255,255,0.025) !important;
}

/* Unique 1px colored accent line at the top of each card */
/* Security card */
.bento-card:has(.tag-security)::before,
.bento-card--audience:nth-child(1)::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(239,68,68,0.5), transparent);
  pointer-events: none;
}

/* Identity / VMC card */
.bento-card:has(.tag-identity)::before,
.bento-card--audience:nth-child(2)::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(66,133,244,0.5), transparent);
  pointer-events: none;
}

/* DNS / Standard card */
.bento-card:has(.tag-dns)::before,
.bento-card--audience:nth-child(3)::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(113,112,255,0.5), transparent);
  pointer-events: none;
}

/* Standard / W3C card */
.bento-card:has(.tag-standard)::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(76,175,125,0.5), transparent);
  pointer-events: none;
}

/* Fallback: all bento-grid cards get a subtle accent line if :has not supported */
.bento-grid .bento-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(113,112,255,0.3), transparent);
  pointer-events: none;
  z-index: 1;
}

/* Icon glow — subtle radial behind the bento-icon */
.bento-icon {
  position: relative;
}
.bento-icon::before {
  content: '';
  position: absolute;
  inset: -12px;
  background: radial-gradient(circle, rgba(113,112,255,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.bento-icon > * {
  position: relative;
  z-index: 1;
}
