/* Stack — forge tool panels */

#stack.stack-new {
  position: relative;
  overflow: hidden;
  padding: var(--sec-y, clamp(48px, 5.5vw, 72px)) 0;
  background: transparent;
}

.stack-new .stk-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.stack-new .stk-bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 42% 50% at 88% 20%, rgba(6, 182, 212, 0.1), transparent 58%),
    radial-gradient(ellipse 40% 48% at 8% 80%, rgba(93, 95, 239, 0.12), transparent 55%);
}

.stack-new .stk-bg-grid {
  position: absolute;
  inset: 0;
  opacity: 0.028;
  background-image:
    linear-gradient(rgba(238, 242, 255, 0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 242, 255, 0.55) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 18%, transparent 75%);
}

.stack-new .w {
  position: relative;
  z-index: 1;
}

.stack-new .sh {
  margin-bottom: clamp(40px, 5vw, 56px);
}

.stack-new .st {
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -0.04em;
  margin-bottom: 14px;
}

.stack-new .sd {
  max-width: 520px;
  font-size: 16px;
  color: var(--t2);
  line-height: 1.75;
}

.stack-new .stk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 20px);
}

.stack-new .stk-block {
  position: relative;
  padding: clamp(24px, 2.6vw, 32px);
  background: rgba(8, 7, 16, 0.72);
  border: 1px solid rgba(165, 180, 252, 0.14);
  border-radius: 4px 22px 4px 22px;
  overflow: hidden;
  transition:
    border-color 0.35s,
    transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.4s;
}

.stack-new .stk-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 35%;
  height: 1px;
  opacity: 0.75;
  transition: opacity 0.35s, right 0.35s;
}

.stack-new .sb1::before {
  background: linear-gradient(90deg, rgba(165, 180, 252, 0.55), transparent);
}

.stack-new .sb2::before {
  background: linear-gradient(90deg, rgba(110, 231, 183, 0.5), transparent);
}

.stack-new .sb3::before {
  background: linear-gradient(90deg, rgba(103, 232, 249, 0.5), transparent);
}

.stack-new .sb4::before {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.55), transparent);
}

.stack-new .stk-block:hover {
  border-color: rgba(165, 180, 252, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.38);
}

.stack-new .stk-block:hover::before {
  opacity: 1;
  right: 15%;
}

.stack-new .stk-bhead {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.stack-new .stk-bico {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stack-new .sb1 .stk-bico {
  background: rgba(93, 95, 239, 0.12);
  box-shadow: inset 0 0 0 1px rgba(165, 180, 252, 0.28);
}

.stack-new .sb2 .stk-bico {
  background: rgba(16, 185, 129, 0.1);
  box-shadow: inset 0 0 0 1px rgba(110, 231, 183, 0.28);
}

.stack-new .sb3 .stk-bico {
  background: rgba(6, 182, 212, 0.1);
  box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.28);
}

.stack-new .sb4 .stk-bico {
  background: rgba(6, 182, 212, 0.1);
  box-shadow: inset 0 0 0 1px rgba(6, 182, 212, 0.3);
}

.stack-new .stk-bn {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--t1, #eef2ff);
}

.stack-new .stk-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack-new .stk-item {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid;
  cursor: default;
  user-select: none;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.stack-new .stk-item:hover {
  transform: translateY(-1px);
}

.stack-new .sb1 .stk-item {
  background: rgba(93, 95, 239, 0.06);
  border-color: rgba(165, 180, 252, 0.2);
  color: #a5b4fc;
}

.stack-new .sb1 .stk-item:hover {
  background: rgba(93, 95, 239, 0.12);
  border-color: rgba(165, 180, 252, 0.35);
  box-shadow: none;
}

.stack-new .sb2 .stk-item {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(110, 231, 183, 0.22);
  color: #6ee7b7;
}

.stack-new .sb2 .stk-item:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(110, 231, 183, 0.4);
  box-shadow: none;
}

.stack-new .sb3 .stk-item {
  background: rgba(6, 182, 212, 0.06);
  border-color: rgba(103, 232, 249, 0.22);
  color: #67e8f9;
}

.stack-new .sb3 .stk-item:hover {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(103, 232, 249, 0.4);
  box-shadow: none;
}

.stack-new .sb4 .stk-item {
  background: rgba(6, 182, 212, 0.05);
  border-color: rgba(6, 182, 212, 0.22);
  color: #67e8f9;
}

.stack-new .sb4 .stk-item:hover {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .stack-new .stk-block,
  .stack-new .stk-block:hover,
  .stack-new .stk-item:hover {
    transition: none;
    transform: none;
  }
}

@media (max-width: 700px) {
  .stack-new .stk-grid {
    grid-template-columns: 1fr;
  }

  .stack-new .stk-block {
    padding: 22px 18px;
  }
}
