/* HDC — home.css v4.3 (Beranda publik). Hero asimetris + Orbital Visualizer. Hanya tata letak; token dari voyager.css.
   v4.3: angka ringkasan peserta tanpa nilai bawaan 0; selama data belum ada tampil kerangka statis berdimensi tetap (Design Concept 7.4).
   v4.2: kartu penutup "Siap naik panggung HDC?" di desktop/laptop (>= 1024px): teks kiri, tombol kanan; HP/tablet tidak berubah.
   v4.1: dibangun ulang dari v3.9. Hanya bagian "The Champions" yang berubah: poster juara tampil langsung tanpa kotak
   pembungkus (Instruksi 1.6): hanya garis tepi, sudut melengkung, dan pendaran tipis. Nama juara maks. 2 baris (Design 7.7 poin 10).
   v3.9: hero tanpa subjudul (pill > judul 4 baris > tombol > pill kategori); di desktop hero setinggi layar, judul dan orbit
   mengecil bila layar pendek, pusat orbit sejajar dengan pusat blok teks. Warna planet diatur home.js (tanpa penanda status).
   Visualizer digambar dan digerakkan home.js; animasi dijeda saat hero keluar layar atau tab tidak aktif (kelas .is-paused dari home.js). */
.hm-sec { margin-top: var(--s-8); }
@media (min-width: 768px) { .hm-sec { margin-top: calc(var(--s-8) + var(--s-2)); } }
.hm-sec > h2, .hm-sec .hdc-wrap > h2 { margin: 0 0 var(--s-3); font-size: var(--hdc-fs-h2); }
.hm-sec h3 { margin: 0 0 var(--s-2); font-size: var(--hdc-fs-h3); }
.hm-btns { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }

/* ---- hero (Design Concept 3 & 3.1): grid asimetris 58% : 42% di desktop, satu kolom terpusat di bawah 1024px ----
   Urutan: pill status > headline 4 baris > tombol > pill kategori > visualizer 5 planet. */
.hm-hero { display: grid; gap: var(--s-4); grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding-block: var(--s-6) 0; }
.hm-hero__txt { display: grid; justify-items: center; min-width: 0; }

/* pill status di atas headline: hanya untuk hero (keputusan pemilik). inline-block agar spasi antar-teks tidak hilang */
.hm-hero__txt .hm-pill { display: inline-block; max-width: 100%; margin: 0 0 var(--s-3); padding: 9px 16px; border: 1px solid var(--hdc-orange-line); border-radius: var(--r-pill); font-family: var(--hdc-font-head); font-size: var(--hdc-fs-small); font-weight: 700; letter-spacing: .05em; line-height: 1.3; text-align: center; text-transform: uppercase; color: var(--hdc-orange); }

/* headline: 4 baris (tiap baris = .hm-hl, display: block), sangat tebal, tanpa outline.
   Lebar "COMPETITION" = ±7,65 x ukuran huruf. HP/tablet: ukuran = (lebar layar - 48px) / 8,2, maks 80px. */
.hm-hero__txt .hdc-hero-title { margin: 0 0 var(--s-3); font-size: min(80px, calc((100vw - 48px) / 8.2)); line-height: 1.05; font-weight: 800; letter-spacing: -.01em; text-transform: uppercase; overflow-wrap: normal; word-break: normal; -webkit-text-stroke: 0; }
.hm-hl { display: block; }
.hm-hero__txt .hm-btns { margin-top: 0; justify-content: center; }
.hm-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-1); margin: var(--s-4) 0 0; padding: 0; list-style: none; }
.hm-cats a { text-decoration: none; }
@media (min-width: 768px) {
  .hm-hero__txt .hdc-hero-title { margin-bottom: 28px; }
  .hm-cats { gap: 12px; margin-top: 40px; }
}
@media (min-width: 1024px) {
  /* hero setinggi layar di bawah header; isi di tengah baris, jadi pusat teks dan pusat orbit sejajar */
  .hm-hero { grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); gap: var(--s-4); align-items: center; justify-items: stretch; text-align: left; min-height: max(520px, calc(100vh - var(--hdc-header-h))); padding-block: var(--s-2); }
  .hm-hero__txt { justify-items: start; }
  .hm-hero__txt .hm-pill { margin-bottom: var(--s-3); padding-inline: 20px; letter-spacing: .08em; }
  /* ukuran judul: lebar layar (6,2vw) atau tinggi layar, mana yang lebih kecil; 4 baris x 1,05 = 4,2 x ukuran huruf */
  .hm-hero__txt .hdc-hero-title { margin-bottom: 32px; font-size: clamp(44px, min(6.2vw, (100vh - 310px) / 4.2), 80px); }
  .hm-hero__txt .hm-btns { justify-content: flex-start; }
  .hm-cats { justify-content: flex-start; margin-top: var(--s-3); }
}
@supports (height: 100svh) {
  @media (min-width: 1024px) {
    .hm-hero { min-height: max(520px, calc(100svh - var(--hdc-header-h))); }
    .hm-hero__txt .hdc-hero-title { font-size: clamp(44px, min(6.2vw, (100svh - 310px) / 4.2), 80px); }
  }
}

/* ---- Orbital Visualizer 5 planet + core (Design Concept 2.3, 3.1 poin 2) ---- */
.hm-hero__vis { display: grid; place-items: center; min-width: 0; width: 100%; }
.hm-orbit { position: relative; width: min(96vw, 400px); aspect-ratio: 1; margin-inline: auto; }
@media (min-width: 768px) { .hm-orbit { width: 500px; } }
@media (min-width: 1024px) { .hm-orbit { width: min(100%, 500px, calc(100vh - 140px)); } }
@supports (height: 100svh) { @media (min-width: 1024px) { .hm-orbit { width: min(100%, 500px, calc(100svh - 140px)); } } }
.hm-orbit__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hm-trace { fill: none; stroke: rgb(var(--hdc-cyan-rgb) / .30); stroke-width: 1.5; }

/* node: area sentuh 44 x 44. HP: planet 16px, core 22px. >= 768px: planet 18px, core 30px. Warna planet diisi home.js */
.hm-node, .hm-core { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0; border: 0; border-radius: var(--r-pill); background: none; cursor: pointer; }
.hm-core { z-index: 2; }
.hm-dot { position: relative; width: 16px; height: 16px; border-radius: var(--r-pill); background: var(--hdc-line); border: 1px solid rgb(var(--hdc-cyan-rgb) / .55); transition: transform .2s ease; }
.hm-dot::after { content: ""; position: absolute; inset: -6px; border-radius: inherit; border: 1.5px solid var(--hdc-cyan); opacity: 0; }
.hm-core .hm-dot { width: 22px; height: 22px; background: var(--hdc-orange); border-color: var(--hdc-cyan); box-shadow: 0 0 14px rgb(var(--hdc-orange-rgb) / .55), 0 0 22px rgb(var(--hdc-cyan-rgb) / .35); }
.hm-core .hm-dot::after { inset: -5px; opacity: .6; }
@media (min-width: 768px) {
  .hm-dot { width: 18px; height: 18px; }
  .hm-core .hm-dot { width: 30px; height: 30px; box-shadow: 0 0 18px rgb(var(--hdc-orange-rgb) / .55), 0 0 28px rgb(var(--hdc-cyan-rgb) / .35); }
  .hm-core .hm-dot::after { inset: -8px; }
}
@media (hover: hover) { .hm-node:hover .hm-dot, .hm-core:hover .hm-dot { transform: scale(1.25); } }
.hm-node:is(:active, :focus-visible) .hm-dot, .hm-core:is(:active, :focus-visible) .hm-dot { transform: scale(1.25); }
.hm-node:focus-visible, .hm-core:focus-visible { outline: 2px solid var(--hdc-cyan); outline-offset: 0; }

/* tooltip telemetry: nama fase dan tanggal */
.hm-tip { position: absolute; z-index: 3; left: 50%; top: calc(100% + 6px); width: max-content; max-width: 220px; padding: 8px 12px; border: 1px solid var(--hdc-card-line); border-radius: var(--r-ctl); background: var(--hdc-bg); box-shadow: var(--hdc-card-glow); color: var(--hdc-text-strong); font-size: var(--hdc-fs-small); line-height: 1.4; text-align: left; transform: translate3d(-50%, 0, 0); pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .16s ease, visibility 0s linear .16s; }
.hm-tip b { display: block; font-family: var(--hdc-font-head); }
.hm-tip small { display: block; color: var(--hdc-text-2); font-size: var(--hdc-fs-small); }
.hm-node:is(:hover, :focus-visible, .is-tip) .hm-tip, .hm-core:is(:hover, :focus-visible, .is-tip) .hm-tip { opacity: 1; visibility: visible; transition-delay: 0s; }
.hm-node.tip-up .hm-tip, .hm-core.tip-up .hm-tip { top: auto; bottom: calc(100% + 6px); }
.hm-node.tip-l .hm-tip { left: 0; transform: none; }
.hm-node.tip-r .hm-tip { left: auto; right: 0; transform: none; }
/* tooltip core di atas inti, supaya tidak menutupi lintasan di bawahnya */
.hm-core .hm-tip { top: auto; bottom: calc(100% + 6px); }

/* ---- jadwal ---- */
.hm-phases { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-2); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .hm-phases { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .hm-phases { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hm-ph { display: grid; gap: 4px; align-content: start; padding: var(--s-3); height: 100%; min-width: 0; }
.hm-ph .hdc-badge { justify-self: start; margin-bottom: 4px; }
.hm-ph--done > * { opacity: .72; }
.hm-ph b { font-family: var(--hdc-font-head); font-size: var(--hdc-fs-h3); color: var(--hdc-text-strong); font-variant-numeric: tabular-nums; }
.hm-ph span { overflow-wrap: anywhere; }

/* ---- cara daftar ---- */
.hm-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-2); grid-template-columns: minmax(0, 1fr); counter-reset: hm; }
@media (min-width: 768px) { .hm-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .hm-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hm-step { display: grid; gap: var(--s-1); align-content: start; padding: var(--s-3); height: 100%; counter-increment: hm; }
.hm-step::before { content: counter(hm); display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-pill); background: var(--hdc-orange); color: var(--hdc-ink); font-family: var(--hdc-font-head); font-weight: 800; font-variant-numeric: tabular-nums; }
.hm-step h3 { margin: 0; font-size: var(--hdc-fs-label); }
.hm-step p { margin: 0; font-size: var(--hdc-fs-small); }

/* ---- juara (Instruksi 1.6: gambar besar tampil langsung, tanpa kotak pembungkus, tanpa padding) ----
   Tiap <li> hanya berisi poster + keterangan. Poster: garis tepi tipis, sudut melengkung 12px, pendaran tipis.
   Rasio mengikuti rasio asli berkas (aspect-ratio: auto 3 / 4 = cadangan sebelum gambar termuat, mencegah geser tata letak). */
.hm-tabs { display: flex; flex-wrap: nowrap; gap: var(--s-1); overflow-x: auto; padding: 4px 2px var(--s-1); margin-bottom: var(--s-2); }
.hm-tab { flex: none; cursor: pointer; font: inherit; font-family: var(--hdc-font-head); font-weight: 700; }
.hm-tab[aria-pressed="true"] { background: var(--hdc-cyan); border-color: var(--hdc-cyan); color: var(--hdc-ink); }
.hm-tab:focus-visible, .hm-more:focus-visible { outline: 2px solid var(--hdc-orange); outline-offset: 2px; }
.hm-podium { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-3) var(--s-2); grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.hm-podium > .hm-pc { display: grid; gap: var(--s-1); align-content: start; min-width: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.hm-pc img { display: block; width: 100%; height: auto; aspect-ratio: auto 3 / 4; border: 1px solid var(--hdc-card-line); border-radius: 12px; background: var(--hdc-surface); box-shadow: 0 0 16px rgb(var(--hdc-cyan-rgb) / .12); }
.hm-pc.is-first img { border-color: var(--hdc-orange-line); box-shadow: 0 0 18px rgb(var(--hdc-orange-rgb) / .22); }
.hm-cap { display: grid; gap: 4px; margin: 0; padding: 0 2px; font-size: var(--hdc-fs-small); overflow-wrap: anywhere; }
.hm-cap > span:not(.hm-rank) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; color: var(--hdc-text-strong); }
.hm-rank { font-family: var(--hdc-font-head); font-weight: 700; color: var(--hdc-orange-hover); }
@media (max-width: 599px) { .hm-podium { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hm-podium > .hm-pc.is-first { grid-column: 1 / -1; } }

/* ---- angka ---- */
.hm-stats { display: grid; gap: var(--s-4); grid-template-columns: minmax(0, 1fr); margin-bottom: var(--s-4); }
@media (min-width: 1024px) { .hm-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.hm-big3 { display: grid; gap: var(--s-2); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hm-big { display: grid; gap: 4px; padding: var(--s-3) var(--s-1); text-align: center; }
.hm-big b { font-family: var(--hdc-font-head); font-size: clamp(28px, 6vw, 44px); font-weight: 800; line-height: 1.1; color: var(--hdc-text-strong); font-variant-numeric: tabular-nums; }
.hm-big b:empty { justify-self: center; width: 3ch; min-height: calc(clamp(28px, 6vw, 44px) * 1.1); border-radius: var(--r-ctl); background: var(--hdc-tint-cyan); }
.hm-big span { font-size: var(--hdc-fs-small); color: var(--hdc-text-2); }
.hm-bars { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-1); }
.hm-bars li { display: grid; grid-template-columns: minmax(0, 120px) minmax(0, 1fr) 4ch; gap: var(--s-2); align-items: center; }
.hm-bars b { text-align: right; font-variant-numeric: tabular-nums; color: var(--hdc-text-strong); }
.hm-bars progress { width: 100%; height: 8px; border: 0; border-radius: var(--r-pill); overflow: hidden; background: rgb(var(--hdc-cyan-rgb) / .14); appearance: none; -webkit-appearance: none; }
.hm-bars progress::-webkit-progress-bar { background: rgb(var(--hdc-cyan-rgb) / .14); }
.hm-bars progress::-webkit-progress-value { background: var(--hdc-cyan); border-radius: var(--r-pill); }
.hm-bars progress::-moz-progress-bar { background: var(--hdc-cyan); border-radius: var(--r-pill); }
.hm-dom { display: flex; flex-wrap: wrap; gap: var(--s-1); margin: 0 0 var(--s-2); padding: 0; list-style: none; }
.hm-dom li[hidden] { display: none; }
.hm-more { margin-top: var(--s-1); }

/* ---- tentang ---- */
.hm-about { display: grid; gap: var(--s-3); justify-items: start; }
.hm-about p { max-width: none; margin: 0; font-size: 18px; line-height: 1.7; }

/* ---- sponsor (Design Concept 7.7 poin 1): tanpa tombol jeda; berhenti saat hover/fokus, off-screen, dan reduced motion.
   Tiap logo di dalam kartu datar. Jarak antar-logo 40px = padding kartu 12 + 12 + gap 16. ---- */
.hm-mqhead { margin-bottom: var(--s-3); }
.hm-mqhead h2 { margin: 0; font-size: var(--hdc-fs-h2); }
.hm-mq { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; margin-inline: calc(var(--hdc-gutter) * -1); padding: 4px var(--hdc-gutter); }
.hm-mq::-webkit-scrollbar { display: none; }
.hm-mq.is-drag { cursor: grabbing; }
.hm-mq:focus-visible { outline: 2px solid var(--hdc-cyan); outline-offset: -2px; }
.hm-mq-track { display: flex; align-items: center; gap: var(--s-2); width: max-content; }
.hm-sp { box-sizing: border-box; display: flex; align-items: center; justify-content: center; flex: none; width: 176px; height: 72px; padding: 12px; border: 1px solid var(--hdc-card-line); border-radius: var(--r-ctl); background: var(--hdc-surface); color: var(--hdc-text); text-align: center; text-decoration: none; font-size: var(--hdc-fs-small); font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; opacity: .8; transition: opacity .2s ease, border-color .2s ease; }
.hm-sp img { display: block; width: 100%; height: 100%; object-fit: contain; }
.hm-sp:is(:hover, :focus-visible), .hm-mq:focus-within .hm-sp:focus-visible { opacity: 1; border-color: var(--hdc-card-line-h); }
@media (min-width: 768px) { .hm-sp { height: 80px; } }

/* ---- penutup ---- */
.hm-final { display: grid; gap: var(--s-2); padding: var(--s-4) var(--s-3); }
.hm-final h2 { margin: 0; font-size: var(--hdc-fs-h2); }
.hm-final p { margin: 0; max-width: var(--hdc-measure); }
/* desktop/laptop (>= 1024px): teks di kiri, tombol di kanan sejajar tengah, tanpa ruang kosong di sisi kanan kartu dan tanpa jarak vertikal besar */
@media (min-width: 1024px) {
  .hm-final { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "judul aksi" "isi aksi"; column-gap: var(--s-6); row-gap: var(--s-1); align-items: center; padding: var(--s-4); }
  .hm-final h2 { grid-area: judul; align-self: end; }
  .hm-final p { grid-area: isi; align-self: start; }
  .hm-final .hm-btns { grid-area: aksi; margin: 0; flex-wrap: nowrap; justify-content: flex-end; align-self: center; }
}
