/* ============================================================
   Hive Solutions — Work / Projects page
   Feature panel · SellerMagnet dashboard mock · NDA work grid
   Depends on: static/css/main.css (variables + base classes)
   ============================================================ */

/* ---------- Featured product panel ---------- */

.feature-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 176, 32, 0.2);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 4.5vw, 3.5rem);
  background:
    radial-gradient(ellipse 75% 95% at 8% -12%, rgba(255, 176, 32, 0.13), transparent 55%),
    radial-gradient(ellipse 55% 75% at 102% 112%, rgba(255, 122, 26, 0.08), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
}
.feature-panel > * { position: relative; z-index: 1; }
.feature-panel .glow-orb { z-index: 0; }

.fp-content .chip-amber { margin-bottom: 1.25rem; }
.fp-content h2 { margin-bottom: 0.9rem; }
.fp-content .lead { margin-bottom: 1.7rem; max-width: 34rem; }

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  flex: none;
  animation: livePulse 2.4s ease-out infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.45); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
}

/* Feature checklist */
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 1.4rem;
}
.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-1);
}
.feature-list svg { flex: none; color: var(--amber-400); }

.fp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.6rem;
}
.fp-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.9rem;
}

/* ---------- SellerMagnet dashboard mock ---------- */

.sm-mock { width: 100%; max-width: 560px; justify-self: end; }

.sm-window {
  background: #0c0c13;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow:
    0 50px 110px -42px rgba(0, 0, 0, 0.9),
    0 0 80px -32px rgba(255, 176, 32, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sm-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.sm-head::after { content: ""; width: 41px; flex: none; }
.sm-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  flex: none;
}
.sm-url {
  margin-inline: auto;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.18rem 0.75rem;
}

.sm-body { display: grid; grid-template-columns: 46px 1fr; }

.sm-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 0;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}
.sm-side-logo {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--grad-btn);
  margin-bottom: 0.45rem;
}
.sm-side-item {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
}
.sm-side-item.is-active {
  background: rgba(255, 176, 32, 0.8);
  box-shadow: 0 0 12px -2px var(--glow);
}

.sm-main {
  padding: 0.95rem 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

/* KPI tiles */
.sm-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}
.sm-kpi {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.55s var(--ease-out);
}
.sm-kpi:nth-child(2) { transition-delay: 0.1s; }
.sm-kpi:nth-child(3) { transition-delay: 0.2s; }
.sm-kpi-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sm-kpi-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.06rem;
  line-height: 1.2;
  color: var(--text-1);
}
.sm-kpi-trend {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sm-kpi-trend.is-up { color: #4ade80; }
.sm-kpi-trend.is-amber { color: var(--amber-300); }

/* Chart */
.sm-chart {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 0.85rem 0.85rem;
}
.sm-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.66rem;
  letter-spacing: 0.02em;
  color: var(--text-3);
  margin-bottom: 0.7rem;
}
.sm-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  flex: none;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.07);
  border-radius: 999px;
  padding: 0.14rem 0.55rem;
}
.sm-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4ade80;
  animation: livePulse 2.4s ease-out infinite;
}

.sm-bars {
  position: relative;
  height: 108px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
}
.sm-bars .b {
  flex: 1;
  height: var(--h, 40%);
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--amber-300), rgba(245, 158, 11, 0.22));
  opacity: 0.85;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.65s var(--ease-out);
  transition-delay: calc(0.25s + var(--i, 0) * 0.055s);
}
.sm-bars .b.hot {
  background: linear-gradient(180deg, var(--amber-200), var(--orange-500));
  opacity: 1;
  box-shadow: 0 0 20px -4px rgba(255, 176, 32, 0.6);
}
.sm-avg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 56%;
  border-top: 1px dashed rgba(255, 255, 255, 0.18);
  pointer-events: none;
}
.sm-avg em {
  position: absolute;
  right: 0;
  bottom: 3px;
  font-style: normal;
  font-size: 0.54rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* Order rows */
.sm-rows { display: flex; flex-direction: column; gap: 0.45rem; }
.sm-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.5s ease, transform 0.55s var(--ease-out);
}
.sm-row:nth-child(1) { transition-delay: 0.85s; }
.sm-row:nth-child(2) { transition-delay: 0.95s; }
.sm-row:nth-child(3) { transition-delay: 1.05s; }
.sm-sq {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.09);
  flex: none;
}
.sm-line {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}
.sm-amt {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #4ade80;
  flex: none;
}

/* Reveal states — global JS adds .revealed to [data-reveal] elements.
   With reduced motion or missing IntersectionObserver, .revealed is added
   immediately, so the mock renders fully populated. */
.sm-mock.revealed .sm-kpi { opacity: 1; transform: none; }
.sm-mock.revealed .sm-bars .b { transform: scaleY(1); }
.sm-mock.revealed .sm-row { opacity: 1; transform: none; }

.sm-caption {
  display: block;
  text-align: center;
  margin-top: 0.85rem;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  color: var(--text-3);
}

/* ---------- Product stats row ---------- */

.sm-stats { margin-top: clamp(3rem, 6vw, 4.75rem); }

/* ---------- Client work (NDA) grid ---------- */

.work-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.chip-cat {
  padding: 0.26rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-300);
  border-color: rgba(255, 176, 32, 0.3);
  background: rgba(255, 176, 32, 0.06);
  margin-bottom: 1.15rem;
}
.work-card h3 { font-size: 1.16rem; }
.work-card p { flex-grow: 1; }
.tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.35rem;
}
.tech-row .chip {
  padding: 0.22rem 0.65rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-3);
}

/* ---------- "Your project" ghost card ---------- */

.card-ghost {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(2.25rem, 5vw, 3rem) 2rem;
  border: 1.5px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-l);
  background: transparent;
  transition: border-color 0.35s, background 0.35s, box-shadow 0.35s, transform 0.35s var(--ease-out);
}
.card-ghost:hover {
  border-color: rgba(255, 176, 32, 0.55);
  background: rgba(255, 176, 32, 0.035);
  box-shadow:
    0 0 60px -22px var(--glow),
    0 18px 44px -28px rgba(0, 0, 0, 0.6);
  transform: translateY(-4px);
}
.ghost-plus {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1.5px dashed rgba(255, 176, 32, 0.5);
  border-radius: 50%;
  color: var(--amber-300);
  margin-bottom: 1rem;
  transition: transform 0.35s var(--ease-spring), border-color 0.35s;
}
.card-ghost:hover .ghost-plus {
  transform: rotate(90deg);
  border-color: rgba(255, 176, 32, 0.85);
}
.card-ghost h3 { margin-bottom: 0.4rem; }
.card-ghost p {
  max-width: 46ch;
  font-size: 0.96rem;
  line-height: 1.65;
}
.card-ghost .btn-link { margin-top: 1.15rem; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .feature-panel .split { gap: 2.75rem; }
  .sm-mock { justify-self: center; }
}

@media (max-width: 520px) {
  .feature-list { grid-template-columns: 1fr; }
  .sm-kpi-value { font-size: 0.95rem; }
  .sm-kpi-label, .sm-kpi-trend { white-space: normal; }
  .sm-bars { gap: 3px; height: 92px; }
  .sm-body { grid-template-columns: 38px 1fr; }
}

/* Product line cards (SellerMagnet API / RaffleHive) */
.product-card .plc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}
.product-card .plc-head h3 { margin-bottom: 0; }
.product-card .tech-row { margin-top: 1.15rem; }
