.hap-root {
  background: #080f2e;
  padding: 72px 0 80px;
  position: relative; overflow: hidden;
}
.hap-root::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(155deg, rgba(26,15,60,0.88) 0%, rgba(14,26,92,0.84) 45%, rgba(10,18,48,0.88) 100%);
  z-index: 0; pointer-events: none;
}
.hap-fade-top {
  position: absolute; top: 0; left: 0; right: 0; height: 140px;
  background: linear-gradient(to bottom, #060b24 0%, transparent 100%);
  pointer-events: none; z-index: 1;
}
.hap-fade-bottom {
  position: absolute; bottom: 0; left: 0; right: 0; height: 160px;
  background: linear-gradient(to top, #060b24, transparent);
  pointer-events: none; z-index: 1;
}

/* particles */
.hap-particle {
  position: absolute; bottom: 0; border-radius: 50%;
  opacity: 0; pointer-events: none; z-index: 0;
  animation: hap-float linear infinite;
}
@keyframes hap-float {
  0%   { transform: translateY(0); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.3; }
  100% { transform: translateY(-100vh); opacity: 0; }
}

.hap-inner {
  max-width: 1380px; margin: 0 auto; padding: 0 40px;
  position: relative; z-index: 4;
}

/* header */
.hap-header { text-align: center; margin-bottom: 72px; }
.hap-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-space); font-size: 11px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase; color: #c0f43c;
  border: 1px solid rgba(192,244,60,0.3); padding: 6px 20px;
  border-radius: 100px; margin-bottom: 24px;
}
.hap-eye-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #c0f43c; box-shadow: 0 0 8px #c0f43c;
  animation: hap-blink 2s ease-in-out infinite;
}
@keyframes hap-blink {
  0%,100% { opacity: 1; box-shadow: 0 0 8px #c0f43c; }
  50%      { opacity: 0.3; box-shadow: none; }
}
.hap-h2 {
  font-family: var(--font-space);
  font-size: clamp(28px, 3.8vw, 52px);
  font-weight: 800; color: #fff;
  letter-spacing: -0.025em; line-height: 1.1; margin-bottom: 18px;
}
.hap-h2-grad {
  background: linear-gradient(100deg, #1b9ad6, #c0f43c);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hap-sub {
  font-family: var(--font-inter); font-size: 16px;
  color: rgba(255,255,255,0.70); max-width: 480px;
  margin: 0 auto; line-height: 1.7;
}

/* bento grid */
.hap-bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-areas:
    "a a b b c c"
    "d d d e e e";
  gap: 20px;
}
.hap-card-a { grid-area: a; }
.hap-card-b { grid-area: b; }
.hap-card-c { grid-area: c; }
.hap-card-d { grid-area: d; }
.hap-card-e { grid-area: e; }

/* card */
.hap-card {
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1.5px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease,
              border-color 0.35s ease, background 0.35s ease;
  min-height: unset;
}
.hap-card:hover {
  transform: translateY(-6px);
  background: rgba(var(--rgb), 0.07);
  border-color: rgba(var(--rgb), 0.4);
  box-shadow: 0 24px 64px rgba(var(--rgb), 0.2),
              0 0 0 1px rgba(var(--rgb), 0.15);
}

/* top bar */
.hap-bar {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent); opacity: 0; transition: opacity 0.3s;
}
.hap-card:hover .hap-bar { opacity: 1; }

/* scanline sweep */
.hap-scanline {
  position: absolute; top: -60%; left: 0; right: 0; height: 50%;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.025), transparent);
  pointer-events: none; z-index: 1;
  animation: hap-scan 5s ease-in-out infinite;
}
@keyframes hap-scan {
  0%   { top: -60%; }
  100% { top: 130%; }
}

.hap-card-inner {
  padding: 28px 28px 28px;
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}

.hap-card-top {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 20px;
}
.hap-num-badge {
  font-family: var(--font-space); font-size: 12px; font-weight: 800;
  letter-spacing: 0.12em;
  padding: 5px 14px; border-radius: 100px; border: 1px solid;
}
.hap-icon-wrap {
  width: 50px; height: 50px; border-radius: 50%;
  border: 1.5px solid;
  display: flex; align-items: center; justify-content: center;
  position: relative; transition: background 0.3s;
}
.hap-card:hover .hap-icon-wrap { background: rgba(var(--rgb), 0.15) !important; }
.hap-orbit {
  position: absolute; inset: -10px;
  border-radius: 50%; border: 1px dashed; opacity: 0.25;
  animation: hap-orbit 8s linear infinite;
}
@keyframes hap-orbit { to { transform: rotate(360deg); } }

.hap-card-title {
  font-family: var(--font-space);
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 800; color: #fff;
  line-height: 1.2; margin-bottom: 12px; letter-spacing: -0.02em;
}
.hap-card-desc {
  font-family: var(--font-inter); font-size: clamp(14px, 1.1vw, 15.5px);
  color: rgba(255,255,255,0.82); line-height: 1.8;
  margin-bottom: 0; flex: 1;
}

.hap-card-b .hap-card-desc,
.hap-card-d .hap-card-desc { flex: 0 0 auto; }
.hap-card-b .hap-card-desc + .hap-card-desc,
.hap-card-d .hap-card-desc + .hap-card-desc { margin-top: 10px; }

.hap-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.08); }
.hap-tag {
  font-family: var(--font-space); font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 100px; border: 1px solid;
}

/* connector overlay */
.hap-connector { overflow: visible; }

/* reveal */
.hap-reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.8s ease, transform 0.8s ease; }
.hap-vis    { opacity: 1; transform: none; }
.hap-reveal:nth-child(2) { transition-delay: 0.1s; }

/* responsive */
@media (max-width: 960px) {
  .hap-bento {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "a a"
      "b c"
      "d e";
  }
  .hap-connector { display: none; }
}
@media (max-width: 580px) {
  .hap-inner { padding: 0 16px; }
  .hap-bento {
    grid-template-columns: 1fr;
    grid-template-areas: "a" "b" "c" "d" "e";
  }
  .hap-card-inner { padding: 22px 18px 18px; }
}
