/* DIME landing v2 — modul "stage": panggung koin pemegang (#holders) + agen & cincin pembagian fee (#agents).
   Semua selektor dikunci di bawah id bagian supaya tidak bertabrakan dengan modul lain. */

/* =========================================================
   A. #holders — panggung koin
   ========================================================= */
#holders { overflow: hidden; overflow: clip; }
#holders .hl-top { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px 64px; align-items: end; }
#holders .hl-copy .sub { margin-top: 0; }
#holders .hl-plain { margin: 14px 0 0; font-size: 14px; line-height: 1.6; color: var(--steel-2); max-width: 520px; padding-left: 14px; border-left: 1px solid var(--hair-2); }

/* Panggung: kanvas + kolom label HTML di atasnya */
#holders .stage { position: relative; margin: 40px -24px 0; height: 520px; }
#holders .st-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#holders .st-cols { position: absolute; inset: 0; margin: 0; padding: 0 24px; list-style: none; display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); }
#holders .st-col { position: relative; cursor: default; -webkit-tap-highlight-color: transparent; transition: opacity .6s var(--ease); outline: none; }
#holders .st-col:focus-visible .st-name { text-decoration: underline; text-underline-offset: 4px; }
#holders .st-top { position: absolute; left: 0; right: 0; top: 0; text-align: center;
  transform: translateY(calc(var(--y, 0px) - 100% - var(--lift, 0px))); transition: opacity .9s var(--ease); }
#holders .st-bonus { display: block; font: 200 clamp(30px, 4.2vw, 58px)/1 var(--sans); letter-spacing: -0.05em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffffff 0%, #d7dae0 55%, #8f949d 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
#holders .st-bonus small { font-size: .55em; letter-spacing: -0.02em; margin-left: .04em; }
#holders .st-base { display: block; margin-top: 8px; font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
#holders .st-bot { position: absolute; left: 0; right: 0; top: var(--fy, 0px); text-align: center; padding-top: 30px; }
#holders .st-name { display: block; font: 500 15px/1.2 var(--sans); letter-spacing: -0.01em; color: var(--text); }
#holders .st-min { display: block; margin-top: 7px; font: 400 11.5px/1 var(--mono); letter-spacing: .06em; color: var(--muted); font-variant-numeric: tabular-nums; }
/* sebelum koin jatuh, angka di atas tumpukan disembunyikan */
#holders .st-col:not(.shown) .st-top { opacity: 0; }
#holders .st-col.dim { opacity: .32; }
#holders .st-col.on .st-name::after { content: ''; display: block; width: 18px; height: 1px; margin: 9px auto 0; background: var(--edge); box-shadow: var(--edge-glow); }

/* Kaki bagian: pelat cek dompet + fakta live */
#holders .hl-foot { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 28px 56px; align-items: start; margin-top: 8px; }
#holders .hw { padding: 24px 26px 22px; display: flex; flex-direction: column; gap: 14px; }
#holders .hw-row { display: flex; gap: 10px; }
#holders .hw .input { flex: 1; min-width: 0; height: 46px; font: 14px var(--mono); letter-spacing: 0; border-radius: 10px; background: rgba(0,0,0,.35); }
#holders .hw .input[aria-invalid="true"] { border-color: rgba(255,255,255,.55); }
#holders .hw .btn { height: 46px; padding: 0 20px; border-radius: 10px; }
#holders .hw-out { margin: 0; min-height: 22px; font: 13px/1.6 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
#holders .hw-out b { color: var(--white); font-weight: 500; }
#holders .hw-out .warn { color: var(--steel-2); }
#holders .hw-out.busy::after { content: ''; display: inline-block; width: 22px; height: 1px; margin-left: 10px; vertical-align: middle;
  background: linear-gradient(90deg, transparent, var(--white), transparent); background-size: 200% 100%; animation: hdscan 1s linear infinite; }
@keyframes hdscan { from { background-position: 100% 0; } to { background-position: -100% 0; } }
#holders .hl-facts { margin: 0; display: flex; flex-direction: column; }
#holders .hl-facts > div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--hair); }
#holders .hl-facts > div:last-child { border-bottom: 1px solid var(--hair); }
#holders .hl-facts dt { font: 500 10.5px/1.6 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); padding-top: 2px; }
#holders .hl-facts dd { margin: 0; display: flex; flex-direction: column; gap: 2px; }
#holders .hl-facts dd b { font: 400 17px/1.3 var(--mono); color: var(--text); font-variant-numeric: tabular-nums; }
#holders .hl-facts dd span { font-size: 13px; color: var(--muted); }
#holders .hl-facts .tlink { font: 13px var(--mono); align-self: flex-start; }

@media (max-width: 900px) {
  #holders .hl-top { grid-template-columns: 1fr; gap: 24px; }
  #holders .hl-foot { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  #holders .stage { margin: 28px -16px 0; height: 360px; }
  #holders .st-cols { padding: 0 8px; }
  #holders .st-bonus { font-size: 30px; }
  #holders .st-base { font-size: 9px; letter-spacing: .1em; margin-top: 6px; }
  #holders .st-bot { padding-top: 22px; }
  #holders .st-name { font-size: 13px; }
  #holders .st-min { font-size: 10px; letter-spacing: 0; margin-top: 5px; }
  #holders .hw { padding: 20px 18px; }
  #holders .hw-row { flex-direction: column; }
  #holders .hw .btn { width: 100%; }
  #holders .hl-facts > div { grid-template-columns: 1fr; gap: 6px; }
}

/* =========================================================
   B. #agents — murai, cincin pembagian fee, berkas agen
   ========================================================= */
#agents { overflow: hidden; overflow: clip; }  /* clip: tidak membuat wadah gulir, jadi sticky tetap jalan */
#agents .ag-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 32px 64px; align-items: start; }
#agents .perch { margin: 0; position: sticky; top: calc(var(--nav-h) + 24px); }
#agents .perch-in { position: relative; aspect-ratio: 1 / 1.08; }
@media (min-width: 1280px) { #agents .perch-in { margin-left: -24px; } }
#agents .ring-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#agents .bird { position: absolute; left: 12%; top: 11%; width: 76%; height: auto; pointer-events: none; user-select: none;
  filter: drop-shadow(0 30px 40px rgba(0,0,0,.6)); }

/* label cincin (diletakkan JS di ujung busur) */
#agents .rl { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; transition: opacity .9s var(--ease); pointer-events: none; }
#agents .rl.on { opacity: 1; }
#agents .rl b { display: block; font: 200 34px/1 var(--sans); letter-spacing: -0.045em; color: var(--white); font-variant-numeric: tabular-nums; }
#agents .rl span { display: block; margin-top: 7px; font: 500 10.5px/1.25 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--steel-2); }
#agents .rl-c b { color: #c6c9cf; }
#agents .rl-d b { color: #8d9199; }
#agents .rl-in span { margin: 0; color: var(--muted); letter-spacing: .16em; }
#agents .ag-legend { display: none; }

#agents .ag-side .sub { margin-top: 20px; }
#agents .ag-side .hd { font-size: clamp(34px, 3.5vw, 50px); }

/* Berkas agen */
#agents .dossier { margin-top: 34px; padding: 22px 24px 8px; }
#agents .ds-h { display: flex; align-items: center; gap: 14px; }
#agents .ds-av { width: 44px; height: 44px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px var(--hair-2); object-fit: cover; background: #111; }
#agents .ds-id { min-width: 0; flex: 1; }
#agents .ds-id b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#agents .ds-id span { display: block; font: 12px/1.4 var(--mono); color: var(--muted); }
#agents .ds-live { display: inline-flex; align-items: center; gap: 7px; font: 500 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--steel-2); }
#agents .ds-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--white); box-shadow: 0 0 8px rgba(255,255,255,.9); }
#agents .ds-persona { margin: 14px 0 6px; font-size: 14px; line-height: 1.55; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#agents .ds-spec { margin: 10px 0 0; }
#agents .ds-spec > div { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding: 11px 0; border-top: 1px solid var(--hair); }
#agents .ds-spec dt { font: 500 10.5px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); flex: none; }
#agents .ds-spec dd { margin: 0; font-size: 13.5px; color: var(--text); text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#agents .ds-spec dd.mono { font-size: 12.5px; }
#agents .ds-spec dd .dim { color: var(--dim); }
#agents .ds-go { display: flex; justify-content: flex-end; padding: 12px 0 14px; border-top: 1px solid var(--hair); }

/* Garis waktu tipis */
#agents .tl { list-style: none; margin: 30px 0 0; padding: 0 0 0 26px; position: relative; }
#agents .tl::before { content: ''; position: absolute; left: 4px; top: 8px; bottom: 10px; width: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,.08)); }
#agents .tl li { position: relative; padding: 0 0 18px; }
#agents .tl li:last-child { padding-bottom: 0; }
#agents .tl li::before { content: ''; position: absolute; left: -26px; top: 6px; width: 7px; height: 7px; margin-left: 1px;
  border: 1px solid rgba(255,255,255,.75); background: var(--bg); transform: rotate(45deg); }
#agents .tl li:last-child::before { background: var(--white); box-shadow: var(--edge-glow); }
#agents .tl b { display: block; font-size: 14.5px; font-weight: 500; color: var(--text); letter-spacing: -0.005em; }
#agents .tl span { display: block; margin-top: 3px; font-size: 13px; line-height: 1.5; color: var(--muted); }
#agents .tl i { font-style: normal; font-family: var(--mono); color: var(--steel-2); }

#agents .ag-cta { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; margin-top: 32px; }
#agents .ag-fine { margin: 18px 0 0; font-size: 12.5px; color: var(--dim); }
#agents .ag-fine span { color: var(--muted); }

@media (max-width: 1080px) {
  #agents .rl b { font-size: 28px; }
}
@media (max-width: 900px) {
  /* layar sempit: judul + paragraf dulu, lalu burung, lalu berkas agen */
  #agents .ag-grid { grid-template-columns: 1fr; gap: 0; }
  #agents .ag-side { display: contents; }
  #agents .ag-side .hd { order: -2; }
  #agents .ag-side .sub { order: -1; }
  #agents .perch { position: relative; top: 0; max-width: 620px; margin: 40px auto 0; width: 100%; }
  #agents .perch-in { margin-left: 0; }
}
@media (max-width: 760px) {
  #agents .perch-in { margin: 0 -8px; aspect-ratio: 1 / 1.04; }
  #agents .rl-a, #agents .rl-c, #agents .rl-d { display: none; }
  #agents .ag-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 6px; }
  #agents .ag-legend > div { padding-top: 12px; border-top: 1px solid var(--hair-2); }
  #agents .ag-legend > div:first-child { border-top-color: rgba(255,255,255,.8); }
  #agents .ag-legend b { display: block; font: 200 26px/1 var(--sans); letter-spacing: -0.04em; color: var(--white); }
  #agents .ag-legend span { display: block; margin-top: 6px; font: 500 9.5px/1.35 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--steel-2); }
  #agents .dossier { padding: 20px 18px 6px; }
  #agents .ds-spec dd { white-space: normal; overflow-wrap: anywhere; }
  #agents .ag-cta { gap: 20px; }
}
