/* =====================================================================
   SEFORAA – sistem tampilan & gerak halaman produk (produk/software-*.php)
   Pasangan: includes/produk-hero.php + assets/js/seforaa-detail-motion.js

   Peran library:
   - anime.js : panel instrumen di hero (SVG tergambar, angka, token),
                parallax screenshot, garis langkah implementasi, progres baca
   - Motion   : koreografi antarmuka (judul per kata, daftar, clip reveal,
                accordion, bar navigasi produk)

   Keadaan tersembunyi hanya berlaku bila <html> punya .has-dmo dan belum
   .dmo-fallback; tanpa JavaScript / "kurangi gerakan" semua tampil normal.
   ===================================================================== */

:root {
  --dm-maroon: #69131B;
  --dm-deep: #4A0D13;
  --dm-night: #2A080C;
  --dm-accent: #C74A56;
  --dm-pink: #F2B8BE;
  --dm-ink: #333333;
  --dm-slate: #5E7176;
  --dm-line: rgba(51, 51, 51, .12);
  --dm-out: cubic-bezier(.22, 1, .36, 1);
}


/* =====================================================================
   HERO
   ===================================================================== */
.dm-hero {
  position: relative; overflow: hidden; color: #fff; padding: 84px 0 96px;
  background:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px) 0 0 / 56px 56px,
    radial-gradient(120% 90% at 85% 10%, #6E1620 0%, var(--dm-deep) 45%, var(--dm-night) 100%);
}
.dm-hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: center; }
.dm-crumbs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 26px; padding: 0; font-size: 14px; }
.dm-crumbs li, .dm-crumbs a { color: rgba(255, 255, 255, .68); }
.dm-crumbs a:hover, .dm-crumbs [aria-current] { color: #fff; }
.dm-h1 { font-size: clamp(34px, 3.6vw, 54px); line-height: 1.08; letter-spacing: -.02em; font-weight: 400; color: #fff; margin: 0 0 22px; }
.dm-lead { font-size: 18px; line-height: 1.65; color: rgba(255, 255, 255, .8); max-width: 48ch; margin: 0 0 34px; }
.dm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 30px; }
.dm-btn-light.tp-btn { background-color: #fff; color: var(--dm-maroon); border-color: #fff; }
.dm-btn-light.tp-btn .btn-icon::after, .dm-btn-light.tp-btn i::after { background-color: var(--dm-maroon); }
.dm-textlink { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.dm-textlink:hover { color: #fff; border-bottom-color: transparent; }
.dm-hero a:focus-visible { outline-color: #fff; }

/* ---------- panel instrumen ---------- */
.dm-sig { position: relative; }
.dm-panel {
  position: relative; background: #fff; color: var(--dm-ink); border-radius: 16px; padding: 22px 24px 24px;
  box-shadow: 0 50px 80px -40px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06);
}
.dm-panel-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--dm-line); }
.dm-panel-ico { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; display: grid; place-items: center; background: #F9EDEE; color: var(--dm-maroon); }
.dm-panel-head > div { flex: 1; min-width: 0; }
.dm-panel-title { margin: 0; font-size: 16px; font-weight: 600; color: var(--dm-ink); line-height: 1.3; }
.dm-panel-meta { margin: 2px 0 0; font-size: 13px; color: var(--dm-slate); line-height: 1.3; }
.dm-status {
  flex: 0 0 auto; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 30px;
  background: var(--dm-accent); color: #fff; white-space: nowrap; transition: background-color .3s ease, color .3s ease;
}
.dm-status.is-pending { background: rgba(51, 51, 51, .1); color: var(--dm-slate); }
.dm-panel [data-dm-count] { font-variant-numeric: tabular-nums; }

.dm-outs { display: flex; gap: 12px; list-style: none; margin: 0; padding: 0 12px; justify-content: space-between; }
.dm-outs li { position: relative; flex: 1; text-align: center; padding-top: 26px; }
.dm-out-line { position: absolute; left: 50%; top: 0; width: 1px; height: 22px; background: rgba(255, 255, 255, .35); transform-origin: top center; }
.dm-outs span {
  display: inline-block; font-size: 13px; font-weight: 600; color: #fff; padding: 7px 14px; border-radius: 30px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); white-space: nowrap;
}

/* tabel/daftar angka */
.dm-rows { margin: 0; }
.dm-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px dashed rgba(51, 51, 51, .14); font-size: 14px; }
.dm-rows dt { font-weight: 400; color: #3E5157; }
.dm-rows dd { margin: 0; white-space: nowrap; }
.dm-rows .dm-total { border-top: 1.5px solid var(--dm-ink); margin-top: 4px; padding-top: 9px; }
.dm-rows .dm-total dt, .dm-rows .dm-total dd { font-weight: 700; color: var(--dm-ink); }
.dm-rows-cap { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dm-accent); }
.dm-rows-inline { margin-top: 10px; }

/* cincin progres */
.dm-ring { position: relative; width: 150px; flex: 0 0 150px; }
.dm-ring svg { width: 100%; height: auto; display: block; }
.dm-ring-bg { fill: none; stroke: #F1E6E7; stroke-width: 10; }
.dm-ring-fg { fill: none; stroke: var(--dm-maroon); stroke-width: 10; stroke-linecap: round; }
.dm-ring-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dm-ring-txt strong { font-size: 26px; font-weight: 600; color: var(--dm-ink); line-height: 1; }
.dm-ring-txt > span { font-size: 11px; color: var(--dm-slate); margin-top: 4px; max-width: 80px; line-height: 1.25; }
.dm-ring-sm { width: 128px; flex-basis: 128px; }

/* payroll */
.dm-pay { display: flex; gap: 26px; align-items: center; }
.dm-slip { flex: 1; min-width: 0; }

/* akuntansi */
.dm-ledger { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.dm-ledger th { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--dm-slate); text-align: left; padding: 0 0 8px; }
.dm-ledger th + th, .dm-ledger td + td { text-align: right; }
.dm-ledger td { padding: 8px 0; border-top: 1px dashed rgba(51, 51, 51, .14); color: #3E5157; }
.dm-ledger tfoot td { border-top: 1.5px solid var(--dm-ink); font-weight: 700; color: var(--dm-ink); }
.dm-balance { display: grid; grid-template-columns: 1fr 44px; grid-template-rows: auto auto; gap: 6px 14px; align-items: center; margin-top: 18px; }
.dm-bal-bar { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 10px; font-size: 12px; color: var(--dm-slate); }
.dm-bal-bar i { display: block; height: 8px; width: var(--w); border-radius: 8px; background: var(--dm-maroon); transform-origin: left center; }
.dm-bal-bar + .dm-bal-bar i { background: var(--dm-accent); }
.dm-bal-check { grid-column: 2; grid-row: 1 / span 2; width: 44px; height: 44px; }
.dm-bal-check circle { fill: #F9EDEE; stroke: none; }
.dm-bal-check path { fill: none; stroke: var(--dm-maroon); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* invoice */
.dm-track { width: 100%; height: auto; display: block; overflow: visible; }
.dm-track-line { fill: none; stroke: #E8DCDD; stroke-width: 3; stroke-linecap: round; }
.dm-node circle { fill: var(--dm-maroon); stroke: #fff; stroke-width: 3; transition: fill .3s ease; }
.dm-node text { font-size: 11px; fill: var(--dm-slate); }
.dm-node.is-off circle { fill: #E8DCDD; }
.dm-token rect { fill: var(--dm-accent); }
.dm-token path { stroke: #fff; stroke-width: 1.8; stroke-linecap: round; }
.dm-token { transform: translate(490px, 44px); } /* posisi akhir (tanpa JS): di simpul "Lunas" */

/* auditor timesheet */
.dm-audit { display: flex; gap: 22px; align-items: center; }
.dm-hrs-list { flex: 1; min-width: 0; display: grid; gap: 12px; }
.dm-hrs { display: grid; grid-template-columns: 64px 1fr 92px; align-items: center; gap: 10px; font-size: 13px; color: #3E5157; }
.dm-hrs-bar { position: relative; height: 12px; border-radius: 6px; background: #F4ECEC; }
.dm-hrs-bar b { position: absolute; top: -3px; bottom: -3px; left: var(--b); width: 2px; background: var(--dm-ink); border-radius: 2px; }
.dm-hrs-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: 6px; background: var(--dm-maroon); transform-origin: left center; }
.dm-hrs.is-over .dm-hrs-bar i { background: var(--dm-accent); }
.dm-hrs-val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 12px; }

/* consultant timesheet */
.dm-tl { position: relative; }
.dm-tl-head, .dm-tl-row { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 10px; }
.dm-tl-head div { display: flex; justify-content: space-between; font-size: 11px; color: var(--dm-slate); }
.dm-tl-head em { font-style: normal; }
.dm-tl-row { margin-top: 10px; font-size: 13px; color: #3E5157; }
.dm-tl-lane { position: relative; height: 26px; border-radius: 6px; background: repeating-linear-gradient(90deg, #F6F0F0 0 calc(25% - 1px), #EADFE0 calc(25% - 1px) 25%); }
.dm-task {
  position: absolute; top: 3px; bottom: 3px; left: var(--a); width: var(--z); border-radius: 5px;
  font-style: normal; font-size: 10.5px; font-weight: 600; color: #fff; padding: 0 6px; line-height: 20px; white-space: nowrap; overflow: hidden;
  transform-origin: left center;
}
.dm-task.is-done, .dm-legend .is-done::before { background: var(--dm-maroon); }
.dm-task.is-review, .dm-legend .is-review::before { background: var(--dm-accent); }
.dm-task.is-work, .dm-legend .is-work::before { background: var(--dm-slate); }
.dm-task.is-wait { background: #fff; color: var(--dm-slate); box-shadow: inset 0 0 0 1.5px #CDBFC1; }
.dm-legend .is-wait::before { background: #fff; box-shadow: inset 0 0 0 1.5px #CDBFC1; }
/* garis "hari ini" (tanggal 17 dari 30); lajur dimulai 72px dari kiri */
.dm-tl-today { position: absolute; top: 18px; bottom: -4px; left: calc(72px + (100% - 72px) * 0.5333); width: 2px; background: var(--dm-ink); }
.dm-tl-today span { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 700; color: #fff; background: var(--dm-ink); padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.dm-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 30px 0 0; padding: 0; font-size: 12px; color: var(--dm-slate); }
.dm-legend li { display: inline-flex; align-items: center; gap: 6px; }
.dm-legend li::before { content: ""; width: 10px; height: 10px; border-radius: 3px; }

/* esg */
.dm-esg-total { margin: 0 0 12px; font-size: 14px; color: var(--dm-slate); }
.dm-esg-total strong { font-size: 34px; font-weight: 600; color: var(--dm-ink); letter-spacing: -.02em; margin-right: 4px; font-variant-numeric: tabular-nums; }
.dm-esg-total > span { display: block; font-size: 12px; margin-top: 2px; }
.dm-stack { display: flex; height: 16px; border-radius: 8px; overflow: hidden; background: #F4ECEC; gap: 2px; }
.dm-stack i { display: block; width: var(--w); transform-origin: left center; }
.dm-stack .s1, .dm-legend-esg .s1::before { background: var(--dm-night); }
.dm-stack .s2, .dm-legend-esg .s2::before { background: var(--dm-maroon); }
.dm-stack .s3, .dm-legend-esg .s3::before { background: var(--dm-accent); }
.dm-legend-esg { margin-top: 10px; }
.dm-lineage { width: 100%; height: auto; display: block; margin-top: 14px; overflow: visible; }
.dm-lin-line { fill: none; stroke: #D9C7C9; stroke-width: 2; stroke-dasharray: 4 5; }
.dm-lin-node rect { fill: #fff; stroke: #E0D2D3; stroke-width: 1.5; }
.dm-lin-node text { font-size: 11px; fill: var(--dm-ink); }
.dm-lin-node.is-end rect { fill: var(--dm-maroon); stroke: var(--dm-maroon); }
.dm-lin-node.is-end text { fill: #fff; font-weight: 600; }
.dm-lin-dot { fill: var(--dm-accent); opacity: 0; }
.dm-lin-cap { font-size: 9.5px; fill: var(--dm-slate); }

/* asset */
.dm-asset { display: flex; gap: 22px; align-items: center; }
.dm-gauge { position: relative; width: 200px; flex: 0 0 200px; }
.dm-gauge svg { width: 100%; height: auto; display: block; overflow: visible; }
.dm-gauge-bg, .dm-gauge-fg { fill: none; stroke-width: 14; stroke-linecap: round; }
.dm-gauge-bg { stroke: #F1E6E7; }
.dm-gauge-fg { stroke: var(--dm-maroon); }
.dm-gauge-tick { stroke: var(--dm-accent); stroke-width: 3; stroke-linecap: round; }
.dm-gauge-txt { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; }
.dm-gauge-txt strong { display: block; font-size: 30px; font-weight: 600; line-height: 1; color: var(--dm-ink); }
.dm-gauge-txt > span { font-size: 11px; color: var(--dm-slate); }
.dm-wo { flex: 1; min-width: 0; border: 1px solid var(--dm-line); border-radius: 12px; padding: 14px 16px; background: #FCF8F8; }
.dm-wo-id { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--dm-accent); }
.dm-wo-title { margin: 2px 0 12px; font-size: 15px; font-weight: 600; color: var(--dm-ink); }
.dm-wo-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: s; }
.dm-wo-steps li { position: relative; padding-left: 22px; font-size: 13px; color: var(--dm-ink); }
.dm-wo-steps li::before { content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--dm-maroon); }
.dm-wo-steps li.is-off { color: #A8A0A1; }
.dm-wo-steps li.is-off::before { background: #E6DADB; }

/* --- keadaan awal hero (sebelum anime.js berjalan) --- */
.has-dmo:not(.dmo-fallback) .dm-panel,
.has-dmo:not(.dmo-fallback) .dm-outs li { opacity: 0; }


/* =====================================================================
   BAR NAVIGASI PRODUK (dibuat JavaScript)
   ===================================================================== */
.dm-bar {
  position: fixed; left: 0; right: 0; top: var(--dm-bar-top, 0px); z-index: 8;
  background: rgba(255, 255, 255, .94); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--dm-line); transform: translateY(-110%); visibility: hidden;
}
.dm-bar.is-on { visibility: visible; }
.dm-bar-in { display: flex; align-items: center; gap: 28px; height: 56px; }
.dm-bar-name { font-weight: 600; color: var(--dm-ink); white-space: nowrap; font-size: 15px; }
.dm-bar-name b { color: var(--dm-maroon); font-weight: 600; }
.dm-bar-links { position: relative; display: flex; gap: 22px; list-style: none; margin: 0 0 0 auto; padding: 0; height: 100%; }
.dm-bar-links a { display: flex; align-items: center; height: 100%; font-size: 14px; color: var(--dm-slate); transition: color .2s ease; }
.dm-bar-links a:hover, .dm-bar-links a[aria-current="true"] { color: var(--dm-ink); }
.dm-bar-ind { position: absolute; left: 0; bottom: 0; width: 100px; height: 2px; background: var(--dm-bar-color, var(--dm-maroon)); transform-origin: left center; transform: scaleX(0); }
.dm-bar-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--dm-bar-color, var(--dm-accent)); transform-origin: left center; transform: scaleX(0); }
@media (max-width: 991px) { .dm-bar-links { display: none; } .dm-bar-in { justify-content: space-between; } }
/* ponsel: nama aplikasi panjang (mis. Consultant Timesheet) dipotong */
@media (max-width: 575px) {
  .dm-bar-in { gap: 12px; }
  .dm-bar-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
}
main [id] { scroll-margin-top: 150px; }


/* =====================================================================
   ELEMEN HALAMAN
   ===================================================================== */
/* judul per kata */
.dw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.dw > span { display: inline-block; }
.has-dmo:not(.dmo-fallback) main .tp-section-title:not(.dmo-split) { opacity: 0; }

/* screenshot: gambar sedikit diperbesar agar parallax tidak menampakkan tepi */
.g-shot-wrap { position: relative; }
.dmo-ready .g-shot-wrap .g-shot { transform: scale(1.08); transform-origin: center; }

/* garis langkah implementasi */
.dm-proc-line { position: absolute; left: 12.5%; right: 12.5%; height: 2px; background: rgba(255, 255, 255, .18); pointer-events: none; }
.dm-proc-line span { position: absolute; inset: 0; background: #fff; transform-origin: left center; transform: scaleX(0); }
.tp-fa-process-ptb .row { position: relative; }
.tp-fa-process-item { transition: opacity .5s ease; }
.has-dmo:not(.dmo-fallback) .dm-proc .tp-fa-process-item:not(.is-on) { opacity: .45; }

/* checklist pil: sedikit terangkat saat disorot */
.g-check-list .tp-fi-about-list-item p { transition: transform .35s var(--dm-out), border-color .3s ease, box-shadow .35s ease; }
.g-check-list .tp-fi-about-list-item p:hover { transform: translateY(-2px); border-color: rgba(105, 19, 27, .25); box-shadow: 0 12px 24px -16px rgba(74, 13, 19, .45); }

/* kartu fitur */
.tp-fa-control-item { transition: transform .45s var(--dm-out); }
.tp-fa-control-item:hover { transform: translateY(-4px); }

/* elemen yang muncul saat terlihat (diatur JS) */
.has-dmo:not(.dmo-fallback) [data-dmo-hide] { opacity: 0; }


/* =====================================================================
   RESPONSIF
   ===================================================================== */
@media (max-width: 1199px) {
  .dm-hero-grid { gap: 40px; }
  .dm-ring { width: 128px; flex-basis: 128px; }
  .dm-gauge { width: 170px; flex-basis: 170px; }
}
@media (max-width: 991px) {
  .dm-hero { padding: 64px 0 76px; }
  .dm-hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .dm-sig { max-width: 620px; }
}
@media (max-width: 575px) {
  .dm-panel { padding: 18px 16px 18px; }
  .dm-pay, .dm-audit, .dm-asset { flex-direction: column; align-items: stretch; }
  .dm-ring, .dm-ring-sm { margin: 0 auto; }
  .dm-gauge { margin: 0 auto; }
  .dm-outs { flex-direction: column; align-items: center; gap: 0; }
  .dm-outs li { padding-top: 18px; }
  .dm-out-line { height: 14px; }
  .dm-status { display: none; }
  .dm-node text { font-size: 17px; }
  .dm-lin-node text { font-size: 16px; }
  .dm-hrs { grid-template-columns: 56px 1fr 84px; }
}

/* langkah work order yang sedang berjalan */
.dm-wo-steps li.is-cur { font-weight: 700; color: var(--dm-maroon); }
.dm-wo-steps li.is-cur::before { background: var(--dm-accent); box-shadow: 0 0 0 4px rgba(199, 74, 86, .2); }
.dm-legend-esg { margin-top: 10px; }

/* lencana nomor langkah tetap di atas lingkaran ikon */
.dm-proc .tp-fa-process-item-icon i { position: absolute; z-index: 2; }

/* tablet & HP: label tugas di linimasa minimal 11px */
@media (max-width: 991px) { .dm-task { font-size: 11px; padding: 0 5px; } }
@media (max-width: 991px) { .dm-tl-today span { font-size: 11px; } }
