/* ==========================================================================
   PiPO HRIS — LAYER 07 · HOMEPAGE HERO
   Midnight ground, asymmetric 5/7 grid, product composition as the hero.
   Staged entrance; fully static under prefers-reduced-motion.
   ========================================================================== */

.xhero {
  position: relative;
  min-height: 88vh;
  display: flex; align-items: center;
  padding-block: calc(var(--hdr-h) + clamp(40px, 4vw, 72px)) clamp(64px, 7vw, 108px);
  overflow: hidden;
  background:
    radial-gradient(760px 420px at 18% 82%, rgba(19,185,129,.24), transparent 68%),
    radial-gradient(700px 400px at 54% 96%, rgba(11,140,120,.14), transparent 70%),
    radial-gradient(820px 460px at 88% 6%,  rgba(63,50,141,.11), transparent 70%),
    radial-gradient(520px 320px at 62% 104%, rgba(153,42,144,.05), transparent 70%),
    linear-gradient(172deg, #0A1B17 0%, var(--ground) 58%, #050F0D 100%);
  color: rgba(255,255,255,.76);
}
@media (max-width: 1020px) { .xhero { min-height: 0; } }

/* Faint workforce-node motif — meaning, not decoration */
.xhero__motif { position: absolute; inset: 0; pointer-events: none; opacity: .5; }
.xhero__motif::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: radial-gradient(900px 560px at 30% 40%, #000, transparent 76%);
  -webkit-mask-image: radial-gradient(900px 560px at 30% 40%, #000, transparent 76%);
}
.xhero__nodes { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }

.xhero__grid {
  position: relative;
  display: grid; grid-template-columns: 47fr 53fr;
  gap: clamp(30px, 3.6vw, 62px);
  align-items: center;
  width: 100%;
}
@media (max-width: 1020px) { .xhero__grid { grid-template-columns: 1fr; gap: 40px; } }

/* ── Copy ───────────────────────────────────────────────────────────────── */
.xhero__eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .42em .9em .42em .75em;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: .66rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.72);
}
.xhero__eyebrow i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--emerald-400);
  box-shadow: 0 0 0 3px rgba(19,185,129,.18);
}

.xhero h1 { margin-top: 1.4rem; }
.xhero__l1 {
  display: block;
  font-size: clamp(2.6rem, 4.9vw, 4.55rem);
  font-weight: 800; line-height: 1.0; letter-spacing: -.045em; color: #fff;
}
.xhero__l2 {
  display: block; margin-top: .5rem;
  font-size: clamp(1.45rem, 2.3vw, 2.1rem);
  font-weight: 600; line-height: 1.18; letter-spacing: -.028em;
  color: rgba(255,255,255,.88);
  max-width: 19ch;
}
.xhero__l2 em { font-style: normal; color: var(--emerald-300); }

.xhero__copy {
  margin-top: 1.5rem; max-width: 46ch;
  font-size: clamp(1rem, 1.12vw, 1.08rem); line-height: 1.66;
  color: rgba(255,255,255,.66);
}

.xhero__cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2.1rem; }
.xhero__micro {
  margin-top: 1.4rem; display: flex; align-items: center; gap: .6em;
  font-size: .84rem; color: rgba(255,255,255,.58);
}
.xhero__micro svg { width: 14px; height: 14px; color: var(--emerald-400); flex: none; }

@media (max-width: 620px) {
  .xhero__cta { flex-direction: column; align-items: stretch; }
  .xhero__cta .btn { width: 100%; }
}

/* ── Product composition ────────────────────────────────────────────────── */
.xhero__stage { position: relative; }
@media (min-width: 1400px) { .xhero__stage { margin-right: calc((100vw - var(--maxw)) / -3.2); } }

.xhero__glow {
  position: absolute; inset: -12% -8% -14% -8%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(46% 50% at 26% 84%, rgba(19,185,129,.32), transparent 70%),
    radial-gradient(42% 44% at 56% 60%, rgba(11,140,120,.16), transparent 72%),
    radial-gradient(44% 46% at 80% 10%, rgba(63,50,141,.14), transparent 72%);
  filter: blur(10px);
}

.xdash {
  position: relative; z-index: 1;
  background: #fff; border-radius: var(--r-shot);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 34px 90px rgba(3,10,8,.6);
  overflow: hidden;
  font-size: 12px; color: var(--ink-2);
}
.xdash__bar { display: flex; align-items: center; gap: .5rem; padding: 10px 14px; background: var(--paper); border-bottom: 1px solid var(--line-soft); }
.xdash__dots { display: flex; gap: 5px; }
.xdash__dots i { width: 8px; height: 8px; border-radius: 50%; background: #D3DBD7; display: block; }
.xdash__url { font-family: var(--font-mono); font-size: 10px; color: var(--muted-2); margin-inline: auto; }

.xdash__body { padding: 18px 20px 22px; background: var(--paper); }
.xdash__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.xdash__head h2 { font-size: 15px; font-weight: 700; letter-spacing: -.024em; color: var(--ink); }
.xdash__head p { font-size: 10.5px; color: var(--muted-2); margin-top: 2px; }
.xdash__pill { font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; border-radius: 5px; background: var(--emerald-tint); color: var(--emerald-700); }

/* headline metric row */
.xdash__kpis { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; gap: 9px; }
@media (max-width: 560px) { .xdash__kpis { grid-template-columns: 1fr 1fr; } }
.xkpi { background: #fff; border: 1px solid var(--line-soft); border-radius: 10px; padding: 11px 12px; }
.xkpi .k { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
.xkpi .v { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.045em; color: var(--ink); line-height: 1; margin-top: 5px; font-variant-numeric: tabular-nums; }
.xkpi .v small { font-size: 12px; font-weight: 600; letter-spacing: -.02em; }
.xkpi .d { font-size: 9.5px; margin-top: 4px; color: var(--muted); }
.xkpi--lead { background: linear-gradient(160deg, var(--ground-soft), var(--ground)); border-color: transparent; }
.xkpi--lead .k { color: rgba(255,255,255,.58); }
.xkpi--lead .v { color: #fff; }
.xkpi--lead .d { color: var(--emerald-300); }

/* workforce composition — the frontline signal */
.xcomp { margin-top: 12px; background: #fff; border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px 13px; }
.xcomp__h { display: flex; align-items: baseline; justify-content: space-between; }
.xcomp__h b { font-size: 11.5px; font-weight: 600; color: var(--ink); }
.xcomp__h span { font-family: var(--font-mono); font-size: 9px; color: var(--muted-2); letter-spacing: .08em; text-transform: uppercase; }
.xcomp__bar { display: flex; height: 9px; border-radius: 5px; overflow: hidden; margin-top: 10px; background: var(--mist); }
.xcomp__bar i { display: block; height: 100%; }
.xcomp__key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.xcomp__key span { display: inline-flex; align-items: center; gap: .42em; font-size: 10px; color: var(--muted); }
.xcomp__key i { width: 8px; height: 8px; border-radius: 2px; display: block; }
.xcomp__key b { color: var(--ink); font-family: var(--font-mono); font-size: 10px; font-weight: 500; }

/* attendance rail */
.xatt { margin-top: 12px; background: #fff; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
.xatt__h { display: flex; align-items: center; justify-content: space-between; padding: 10px 13px; border-bottom: 1px solid var(--line-soft); }
.xatt__h b { font-size: 11.5px; font-weight: 600; color: var(--ink); }
.xatt__h span { font-family: var(--font-mono); font-size: 9px; color: var(--muted-2); }
.xatt__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.xatt__cell { padding: 11px 13px; border-right: 1px solid var(--line-soft); }
.xatt__cell:last-child { border-right: 0; }
.xatt__cell .k { font-size: 9.5px; color: var(--muted); display: flex; align-items: center; gap: .4em; }
.xatt__cell .k i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.xatt__cell .v { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -.04em; color: var(--ink); margin-top: 4px; line-height: 1; }

/* floating panels */
.xfloat {
  position: absolute; z-index: 3;
  background: #fff; border: 1px solid var(--line-soft);
  border-radius: 12px; padding: 11px 13px;
  box-shadow: 0 16px 42px rgba(3,10,8,.34);
  min-width: 182px;
}
.xfloat .k { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
.xfloat .v { font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: -.03em; color: var(--ink); margin-top: 4px; line-height: 1.1; }
.xfloat .d { font-size: 9.5px; color: var(--muted); margin-top: 3px; }
.xfloat__row { display: flex; align-items: center; gap: .5rem; }
.xfloat__ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.xfloat__ic svg { width: 14px; height: 14px; }
.xfloat--payroll { left: -68px; top: -32px; }
.xfloat--perf { right: -34px; bottom: -26px; }
@media (max-width: 1240px) { .xfloat--payroll { left: -18px; } .xfloat--perf { right: -10px; } }
@media (max-width: 1020px) { .xfloat--payroll { left: auto; right: 10px; top: -22px; } .xfloat--perf { display: none; } }
@media (max-width: 620px)  { .xfloat { display: none; } }

/* progress meter inside the payroll float */
.xmeter { height: 5px; border-radius: 3px; background: var(--mist); margin-top: 7px; overflow: hidden; }
.xmeter i { display: block; height: 100%; border-radius: 3px; background: var(--violet); }

/* ── Entrance ───────────────────────────────────────────────────────────── */
.xhero [data-stage] { opacity: 0; transform: translateY(14px); }
.xhero.is-ready [data-stage] {
  opacity: 1; transform: none;
  transition: opacity .62s var(--e-out), transform .62s var(--e-out);
}
.xhero.is-ready [data-stage="1"] { transition-delay: .05s }
.xhero.is-ready [data-stage="2"] { transition-delay: .13s }
.xhero.is-ready [data-stage="3"] { transition-delay: .21s }
.xhero.is-ready [data-stage="4"] { transition-delay: .29s }
.xhero.is-ready [data-stage="5"] { transition-delay: .40s }
.xhero.is-ready [data-stage="6"] { transition-delay: .54s }
.xhero.is-ready [data-stage="7"] { transition-delay: .64s }
.xhero.no-anim [data-stage] { opacity: 1; transform: none; transition: none; }
@media (prefers-reduced-motion: reduce) {
  .xhero [data-stage] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ── Trust strip — workforce breadth, no invented statistics ────────────── */
.wstrip {
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,.08);
  padding-block: clamp(26px, 3vw, 40px);
}
.wstrip__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem clamp(18px, 2.4vw, 38px); }
.wstrip__lead {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255,255,255,.58);
  flex: none; max-width: 22ch; line-height: 1.6;
}
.wstrip__types { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem clamp(12px, 1.8vw, 26px); }
.wstrip__types span {
  display: inline-flex; align-items: center; gap: .55em;
  font-size: .95rem; font-weight: 500; color: rgba(255,255,255,.8); letter-spacing: -.012em;
}
.wstrip__types span::before { content: ''; width: 5px; height: 5px; border-radius: 1.5px; background: var(--emerald-400); flex: none; }
@media (max-width: 720px) { .wstrip__lead { max-width: none; } .wstrip__types { gap: .6rem 18px; } }

/* ── Transition into the next section ───────────────────────────────────── */
.xnext {
  background: linear-gradient(to bottom, var(--ink) 0%, var(--ink) 38%, var(--paper-2) 38%, var(--paper-2) 100%);
  padding-block: 0 clamp(40px, 5vw, 72px);
}
.xnext__card {
  max-width: 980px; margin-inline: auto;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(26px, 3vw, 44px);
  box-shadow: var(--sh-lg);
  text-align: center;
}
.xnext__card .eyebrow { justify-content: center; }
.xnext__card h2 { margin-top: 1rem; font-size: clamp(1.5rem, 2.4vw, 2.1rem); letter-spacing: -.032em; }
.xnext__card p { margin-top: .9rem; color: var(--muted); font-size: 1.02rem; max-width: 58ch; margin-inline: auto; }
.xnext__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.5rem; }
.xnext__chips span {
  font-size: .84rem; padding: .48em .95em; border-radius: 100px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-3);
}


/* ── PiPO Gold in the hero ───────────────────────────────────────────────
   One executive metric and one fine rule. Gold is 6.1:1 on midnight, so the
   number itself can carry it. The CTA stays emerald. */
.xkpi--lead { position: relative; }
.xkpi--lead::before {
  content: ''; position: absolute; top: 0; left: 0; width: 46px; height: 2px;
  background: var(--gold); border-radius: 2px;
}
.xkpi--lead .v { color: var(--gold); }
.xkpi--lead .k { color: var(--gold-lt); }
