/* ============================================================
   Hive Bento — replaces prior launchgrid skinny-tile version.
   B (Spatial Bento) base + C (Live Terminal) grafts:
     - live stats trio (injected into left .nh-hero-text)
     - streaming signing receipt as the NanoPay feature cell
   Scope: .hp-bento (right column) + .hp-livestats (left column injection)
   Public posture: USDC + Base only. ML-DSA-65. No emojis.
   ============================================================ */

.hp-bento{
  --bg:#070B11;
  --panel:#0F172A;
  --panel-soft:rgba(15,23,42,0.85);
  --text:#EAF2FF;
  --muted:rgba(234,242,255,0.62);
  --faint:rgba(234,242,255,0.40);
  --blue:#2F80FF;
  --blue-soft:#5B9BFF;
  --gold:#D4A44F;
  --green:#34D399;
  --hair:rgba(234,242,255,0.10);
  --hair-soft:rgba(234,242,255,0.08);
  --t:180ms cubic-bezier(0.16,1,0.3,1);
  width:100%;
  display:flex;
  flex-direction:column;
  gap:14px;
  font-family:'Inter Tight',system-ui,sans-serif;
  color:var(--text);
  min-height:0;
}

.hp-bento .hp-cell{
  background:var(--panel-soft);
  border:1px solid var(--hair);
  border-radius:18px;
  padding:20px;
  position:relative;
  overflow:hidden;
  text-decoration:none;
  color:inherit;
  display:flex;
  flex-direction:column;
  transition:transform var(--t), border-color var(--t), box-shadow var(--t);
}
.hp-bento .hp-cell:hover{
  border-color:rgba(47,128,255,0.55);
  box-shadow:0 18px 42px -16px rgba(47,128,255,0.45);
}

/* ---------- Receipt cell (full width, row 1) ---------- */
.hp-bento .hp-receipt{
  padding:0;
  background:
    linear-gradient(180deg, rgba(47,128,255,0.06), transparent 40%),
    var(--panel);
  cursor:pointer;
}
.hp-bento .hp-receipt::before{
  content:""; position:absolute; inset:0; border-radius:18px;
  padding:1px; pointer-events:none;
  background:linear-gradient(120deg, rgba(47,128,255,0.45), transparent 35%, transparent 70%, rgba(212,164,79,0.28));
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude;
}
.hp-rc-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 16px; border-bottom:1px solid var(--hair-soft);
  background:rgba(7,11,17,0.4);
}
.hp-rc-title{
  font-family:'JetBrains Mono',monospace; font-size:12px;
  color:var(--muted); display:flex; align-items:center; gap:9px;
}
.hp-rc-dots{ display:flex; gap:6px; }
.hp-rc-dots i{ width:9px; height:9px; border-radius:50%; background:#27344b; display:block; }
.hp-rc-ctx{
  font-family:'JetBrains Mono',monospace; font-size:11px;
  padding:5px 10px; border-radius:7px; display:inline-flex; align-items:center; gap:7px;
  border:1px solid var(--hair); background:rgba(47,128,255,0.10); color:var(--blue-soft);
  white-space:nowrap;
}
.hp-rc-ctx .ck{ width:7px; height:7px; border-radius:50%; background:currentColor; }
.hp-rc-body{
  padding:14px 18px 6px;
  font-family:'JetBrains Mono',monospace;
  font-size:12.5px; line-height:1.8;
  min-height:230px;
  color:var(--text);
}
.hp-rc-line{ white-space:pre-wrap; word-break:break-word; }
.hp-rc-body .k{ color:var(--blue-soft); }
.hp-rc-body .s{ color:var(--gold); }
.hp-rc-body .g{ color:var(--green); }
.hp-rc-body .p{ color:var(--faint); }
.hp-cursor{
  display:inline-block; width:7px; height:14px; vertical-align:-2px;
  background:var(--green); margin-left:2px;
  animation:hp-blink 1s steps(1) infinite;
}
@keyframes hp-blink { 0%,100%{opacity:1;} 50%{opacity:0.25;} }
.hp-rc-foot{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px; padding:12px 16px; border-top:1px solid var(--hair-soft);
  background:rgba(7,11,17,0.4); flex-wrap:wrap;
}
.hp-verifier{
  display:flex; align-items:center; gap:10px;
  font-family:'JetBrains Mono',monospace; font-size:12px; color:var(--muted);
}
.hp-vbadge{
  width:22px; height:22px; border-radius:50%; flex:none;
  border:1.5px solid var(--green); color:var(--green);
  display:grid; place-items:center; position:relative;
}
.hp-vbadge svg{ width:12px; height:12px; }
.hp-vbadge.verifying{ border-color:var(--gold); color:var(--gold); }
.hp-vbadge.verifying::after{
  content:""; position:absolute; inset:-2px; border-radius:50%;
  border:1.5px solid transparent; border-top-color:var(--gold);
  animation:hp-spin 0.8s linear infinite;
}
@keyframes hp-spin { to { transform:rotate(360deg); } }
.hp-vtext b{ color:var(--text); font-weight:600; }
.hp-vtext.ok b{ color:var(--green); }
.hp-lat{ font-family:'JetBrains Mono',monospace; font-size:11.5px; color:var(--faint); }
.hp-lat b{ color:var(--blue-soft); }

/* ---------- Carousel card (rotating featured launch, row 2) ----------
   NOTE: must override stale #hp-carousel-v1 styles that force height:560px
   with !important on bare .hp-carousel. We neutralize those here. */
.hp-bento .hp-carousel,
.nh-hero .nh-flow .hp-bento .hp-carousel,
.nh-hero .hp-bento .hp-carousel,
body .hp-bento .hp-cell.hp-carousel{
  cursor:pointer !important;
  padding:22px 22px 18px !important;
  background:
    radial-gradient(560px 280px at 0% 0%, rgba(47,128,255,0.10), transparent 60%),
    var(--panel-soft) !important;
  /* override stale fixed-height rules from #hp-carousel-v1 */
  flex:0 0 auto !important;
  width:100% !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  border:1px solid var(--hair) !important;
  border-radius:18px !important;
  box-shadow:none !important;
  overflow:hidden !important;
  display:flex !important;
  flex-direction:column !important;
  isolation:isolate !important;
}
.hp-bento .hp-carousel::before,
.nh-hero .nh-flow .hp-bento .hp-carousel::before,
.nh-hero .hp-bento .hp-carousel::before,
body .hp-bento .hp-cell.hp-carousel::before{
  content:none !important;
  background:none !important;
  background-image:none !important;
}
.hp-car-top{ display:flex; align-items:center; gap:14px; }
.hp-car-iconwrap{
  width:54px; height:54px; border-radius:14px;
  background:rgba(47,128,255,0.10); border:1px solid var(--hair);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.hp-car-iconwrap svg{ width:28px; height:28px; }
.hp-car-meta{ flex:1; min-width:0; }
.hp-car-eyebrow{
  display:inline-flex; align-items:center; gap:7px;
  font-family:'JetBrains Mono',monospace;
  font-size:10.5px; letter-spacing:0.16em; text-transform:uppercase;
  color:var(--muted);
}
.hp-car-dot{ width:7px; height:7px; border-radius:50%; background:var(--green); box-shadow:0 0 8px currentColor; }
.hp-car-name{ font-size:22px; font-weight:700; letter-spacing:-0.02em; margin-top:3px; line-height:1.1; }
.hp-tag{
  font-size:10px; font-weight:600; letter-spacing:0.10em; text-transform:uppercase;
  padding:4px 9px; border-radius:7px; font-family:'JetBrains Mono',monospace;
  flex-shrink:0;
}
.hp-tag.live{ color:var(--green); background:rgba(52,211,153,0.12); border:1px solid rgba(52,211,153,0.30); }
.hp-tag.new{ color:var(--blue); background:rgba(47,128,255,0.12); border:1px solid rgba(47,128,255,0.30); }
.hp-tag.gold{ color:var(--gold); background:rgba(212,164,79,0.12); border:1px solid rgba(212,164,79,0.32); }

.hp-car-headline{
  font-size:16.5px; font-weight:600; letter-spacing:-0.01em; line-height:1.32;
  margin-top:16px; color:var(--text);
}
.hp-car-body{
  font-size:13px; line-height:1.55; color:var(--muted);
  margin-top:8px;
}
.hp-car-bullets{
  list-style:none; padding:0; margin:12px 0 0;
  display:grid; grid-template-columns:1fr 1fr; gap:6px 14px;
}
.hp-car-bullets li{
  display:flex; align-items:center; gap:8px;
  font-size:12px; color:var(--text); line-height:1.4;
  font-family:'JetBrains Mono',monospace;
}
.hp-car-bullets li svg{ flex-shrink:0; }
.hp-car-foot{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  margin-top:auto; padding-top:14px;
}
.hp-car-progress{
  flex:1; height:3px; border-radius:2px; background:rgba(234,242,255,0.06); position:relative; overflow:hidden;
}
.hp-car-progress::after{
  content:''; position:absolute; left:0; top:0; bottom:0; width:100%;
  background:linear-gradient(90deg, var(--blue), var(--blue-soft));
  transform-origin:left center; transform:scaleX(0);
  animation:hp-progress 6.5s linear infinite;
}
@keyframes hp-progress { 0%{transform:scaleX(0);} 100%{transform:scaleX(1);} }
.hp-car-cta{
  display:inline-flex; align-items:center; gap:10px;
  font-family:'JetBrains Mono',monospace; font-size:11.5px;
  color:var(--blue-soft); flex-shrink:0;
}
.hp-arrow{
  width:32px; height:32px; border-radius:10px; border:1px solid var(--hair);
  display:flex; align-items:center; justify-content:center; color:var(--blue-soft);
  transition:background var(--t), color var(--t), border-color var(--t);
}
.hp-cell:hover .hp-arrow{ background:var(--blue); color:#fff; border-color:var(--blue); }

/* ---------- Chip rail (all 10 launches, 2 cols x 5 rows) ---------- */
.hp-bento .hp-chips{
  padding:18px;
  display:flex; flex-direction:column; gap:12px;
}
.hp-chips-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.hp-chips-head .label{
  font-size:11.5px; font-weight:600; letter-spacing:0.14em; text-transform:uppercase;
  color:var(--muted); display:flex; align-items:center; gap:9px;
}
.hp-chips-head .label .gd{
  width:7px; height:7px; border-radius:50%; background:var(--green);
  box-shadow:0 0 9px var(--green); display:inline-block;
}
.hp-chips-head .count{ font-size:10.5px; color:var(--faint); font-family:'JetBrains Mono',monospace; letter-spacing:0.1em; }
.hp-chip-grid{
  display:grid; grid-template-columns:repeat(2,1fr); gap:8px;
}
.hp-chip{
  background:var(--panel); border:1px solid var(--hair-soft); border-radius:11px;
  padding:10px 12px; text-decoration:none; color:inherit; position:relative; overflow:hidden;
  transition:border-color var(--t), background var(--t), transform var(--t);
  min-height:54px; display:block;
}
.hp-chip:hover, .hp-chip.is-active{
  transform:translateY(-1px);
  border-color:rgba(47,128,255,0.55);
  background:rgba(47,128,255,0.06);
}
.hp-chip-row{ display:flex; align-items:center; gap:10px; }
.hp-chip-icon{
  width:32px; height:32px; border-radius:9px;
  background:rgba(47,128,255,0.08); border:1px solid var(--hair-soft);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.hp-chip-text{ flex:1; min-width:0; }
.hp-chip-name{
  font-size:13.5px; font-weight:600; letter-spacing:-0.01em; line-height:1.2;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.hp-chip-meta{
  font-size:11px; color:var(--faint); margin-top:2px; line-height:1.25;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.hp-chip-badge{
  font-size:9px; font-weight:600; letter-spacing:0.08em; text-transform:uppercase;
  font-family:'JetBrains Mono',monospace; color:var(--faint);
  padding:3px 7px; border-radius:5px; border:1px solid var(--hair-soft); flex-shrink:0;
}
.hp-chip-badge.live{ color:var(--green); border-color:rgba(52,211,153,0.32); }
.hp-chip-badge.gold{ color:var(--gold); border-color:rgba(212,164,79,0.32); }

/* ---------- Live stats trio (injected above trust pills in left column) ---------- */
.hp-livestats{
  display:grid; grid-template-columns:repeat(3, 1fr);
  gap:1px; background:rgba(234,242,255,0.08);
  border:1px solid rgba(234,242,255,0.08); border-radius:14px; overflow:hidden;
  margin:14px 0 16px;
  font-family:'Inter Tight',system-ui,sans-serif;
}
.hp-stat{
  background:rgba(15,23,42,0.6); padding:13px 16px;
}
.hp-stat-val{
  font-family:'JetBrains Mono',monospace; font-weight:600;
  font-size:19px; letter-spacing:-0.01em; color:#EAF2FF;
  display:flex; align-items:baseline; gap:7px;
}
.hp-stat-val.live{ color:#34D399; }
.hp-stat-val .mini-dot{
  width:7px; height:7px; border-radius:50%; background:#34D399;
  align-self:center; box-shadow:0 0 10px rgba(52,211,153,0.8);
  animation:hp-blink2 1.6s ease-in-out infinite;
}
@keyframes hp-blink2 { 0%,100%{opacity:1;} 50%{opacity:0.35;} }
.hp-stat-label{
  font-size:10.5px; letter-spacing:0.08em; text-transform:uppercase;
  color:rgba(234,242,255,0.40); margin-top:5px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce){
  .hp-bento *, .hp-livestats *{ animation:none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1280px){
  .hp-bento .hp-rc-body{ min-height:200px; font-size:11.5px; line-height:1.75; }
  .hp-bento .hp-chip-name{ font-size:12.5px; }
  .hp-bento .hp-car-name{ font-size:20px; }
  .hp-bento .hp-car-headline{ font-size:15px; }
  .hp-bento .hp-car-body{ font-size:12.5px; }
  .hp-bento .hp-car-bullets li{ font-size:11px; }
}
@media (max-width: 900px){
  .hp-bento .hp-chip-grid{ grid-template-columns:repeat(2,1fr); }
  .hp-bento .hp-car-bullets{ grid-template-columns:1fr; }
  .hp-livestats{ grid-template-columns:1fr; }
}
