/* ============================================================
   JAVIR — CORPORATE PASS v1
   Editorial structure, masked word reveals, staggered grids,
   smart navbar. Loaded after premium.css — refines, no rewrites.
============================================================ */

/* ---------- Section rhythm: hairline dividers ---------- */
.section::before,
.faq-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 48px));
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(139,197,255,.22) 20%,
    rgba(117,239,255,.34) 50%,
    rgba(139,197,255,.22) 80%,
    transparent);
  pointer-events: none;
}
.faq-section { position: relative; }
/* Hero flows straight into the pain section — no divider there */
#masalah::before { display: none; }

html[data-theme="light"] .section::before,
html[data-theme="light"] .faq-section::before {
  background: linear-gradient(90deg,
    transparent,
    rgba(11,20,40,.1) 20%,
    rgba(47,70,206,.18) 50%,
    rgba(11,20,40,.1) 80%,
    transparent);
}

/* ---------- Masked word reveal (section titles) ---------- */
.split-title .cw {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: .16em;
  margin-bottom: -.16em;
}
.split-title .cwi {
  display: inline-block;
  transform: translateY(112%);
  transition: transform .85s cubic-bezier(.22,.61,.2,1);
  will-change: transform;
}
.split-title.t-in .cwi { transform: translateY(0); }

/* keep per-word gradient rendering crisp */
.split-title .cwi.gradient-text { animation: none; }

/* ---------- Auto-staggered grid children ---------- */
.auto-stag {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity .75s var(--ease-out),
    transform .85s var(--ease-out);
  transition-delay: var(--stag-d, 0s);
}
.auto-stag.in {
  opacity: 1;
  transform: translateY(0);
}
/* After the entrance completes, hand transitions back to hover styling
   so tilt/hover interactions stay snappy */
.auto-stag.stag-done {
  transition:
    transform .4s var(--ease-spring),
    border-color .35s ease,
    box-shadow .45s ease,
    background .35s ease,
    opacity .3s ease;
  transition-delay: 0s;
}

/* ---------- Smart navbar: hide on scroll down ---------- */
header.navbar-wrap {
  transition: transform .5s var(--ease-out);
  will-change: transform;
}
header.navbar-wrap.nav-hidden { transform: translateY(-130%); }
header.navbar-wrap:focus-within { transform: none; }

/* ---------- Ambient orbs: slow breathing (opacity only —
     transform is owned by the parallax engine) ---------- */
.bg-orb { animation: orb-breathe 11s ease-in-out infinite; }
.bg-orb.o2 { animation-delay: -4s; }
.bg-orb.o3 { animation-delay: -7s; }
@keyframes orb-breathe {
  0%, 100% { opacity: .7; }
  50%      { opacity: .45; }
}

/* ---------- Workflow: guided live tour ---------- */
.workflow-step {
  transition:
    transform .5s var(--ease-spring),
    border-color .45s ease,
    box-shadow .5s ease,
    background .45s ease,
    opacity .45s ease;
}
.workflow-visual.touring .workflow-step:not(.active-step) { opacity: .55; }
.workflow-visual.touring .workflow-step.active-step {
  opacity: 1;
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0,0,0,.4), 0 0 44px rgba(55,183,255,.16);
}
.workflow-step .workflow-icon { transition: transform .4s var(--ease-spring), box-shadow .4s ease, background .4s ease; }
.workflow-visual.touring .workflow-step.active-step .workflow-icon {
  transform: scale(1.12);
  box-shadow: 0 0 34px rgba(55,183,255,.45);
}

/* ---------- Stats strip: hairline separators ---------- */
.stats-strip .stats-item { position: relative; }
@media (min-width: 721px) {
  .stats-strip .stats-item + .stats-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18%;
    height: 64%;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(139,197,255,.25), transparent);
  }
  html[data-theme="light"] .stats-strip .stats-item + .stats-item::before {
    background: linear-gradient(180deg, transparent, rgba(11,20,40,.14), transparent);
  }
}

/* ---------- Cards: precision top-edge light ---------- */
.value-card, .contact-card, .int-card, .impact-box, .ps-col {
  background-clip: padding-box;
}
.value-card:hover, .contact-card:hover {
  border-top-color: rgba(117,239,255,.5);
}

/* ---------- Metric cells: lift + glow ---------- */
.ps-metric {
  transition: transform .4s var(--ease-spring), border-color .35s ease, box-shadow .4s ease;
}
.ps-metric:hover {
  transform: translateY(-5px);
  border-color: rgba(117,239,255,.35);
  box-shadow: 0 20px 50px rgba(0,0,0,.35), 0 0 40px rgba(55,183,255,.1);
}

/* ---------- Impact boxes: match card language ---------- */
.impact-box {
  transition: transform .4s var(--ease-spring), border-color .35s ease, background .35s ease;
}
.impact-box:hover {
  transform: translateY(-4px);
  border-color: rgba(117,239,255,.32);
  background: rgba(117,239,255,.04);
}

/* ---------- Nav links: sliding underline (ensure present) ---------- */
.nav-links a { position: relative; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan-500), var(--cyan-300));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .35s var(--ease-out);
}
.nav-links a:hover::after { transform: scaleX(1); }

/* ---------- Footer card polish ---------- */
.footer-card {
  transition: border-color .4s ease, box-shadow .45s ease;
}
.footer-card:hover {
  border-color: rgba(117,239,255,.3);
  box-shadow: 0 24px 70px rgba(0,0,0,.45), 0 0 50px rgba(55,183,255,.1);
}

/* ---------- Reduced motion: everything settles instantly ---------- */
@media (prefers-reduced-motion: reduce) {
  .split-title .cwi { transform: none !important; transition: none !important; }
  .auto-stag { opacity: 1 !important; transform: none !important; transition: none !important; }
  header.navbar-wrap { transition: none; }
  header.navbar-wrap.nav-hidden { transform: none; }
  .bg-orb { animation: none; }
  .workflow-visual.touring .workflow-step:not(.active-step) { opacity: 1; }
}
