/* GMT App Store: tata letak ala Microsoft Store, palet dan huruf dari gmt.id */
@font-face { font-family: "Saira"; font-weight: 100 900; font-stretch: 50% 125%; font-display: swap; src: url("fonts/saira-latin.woff2") format("woff2"); }
@font-face { font-family: "Share Tech Mono"; font-weight: 400; font-display: swap; src: url("fonts/share-tech-mono-latin.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --sheet-deep: #071630;
  --sheet: #0b1e3f;
  --plate: #10294f;
  --plate-2: #15325c;
  --gold: #f5b800;
  --gold-2: #d9a300;
  --bone: #f3eee3;
  --bone-75: rgba(243, 238, 227, .78);
  --bone-60: rgba(243, 238, 227, .62);
  --rule: rgba(245, 184, 0, .26);
  --line: rgba(243, 238, 227, .12);
  --leaf: #6db33f;
  --ink-on-gold: #0b1e3f;
  --sans: "Saira", "Segoe UI", system-ui, sans-serif;
  --mono: "Share Tech Mono", ui-monospace, Consolas, monospace;
  --pad: clamp(16px, 3vw, 40px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --bar: 56px;
  accent-color: var(--gold);
}

* { box-sizing: border-box; }
html { scrollbar-color: var(--plate-2) var(--sheet); }
body { margin: 0; min-height: 100dvh; background: var(--sheet-deep); color: var(--bone); font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
::selection { background: var(--gold); color: var(--ink-on-gold); }
img, svg { display: block; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-stretch: 92%; line-height: 1.12; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: 0; }

.skip { position: fixed; left: -999px; top: 8px; z-index: 100; padding: 8px 14px; background: var(--gold); color: var(--ink-on-gold); border-radius: 4px; font-weight: 600; }
.skip:focus { left: 8px; }
.noscript { padding: 24px; text-align: center; }
.data { font-family: var(--mono); font-size: 13px; color: var(--bone-60); font-variant-numeric: tabular-nums; }

/* ---------- bingkai aplikasi ---------- */
.titlebar { position: fixed; inset: 0 0 auto 0; z-index: 30; height: var(--bar); display: grid; grid-template-columns: 1fr minmax(240px, 560px) 1fr; align-items: center; gap: 16px; padding: 0 16px; background: var(--sheet-deep); }
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15px; font-weight: 700; font-stretch: 92%; }
.brand-text small { font-size: 11.5px; color: var(--bone-60); }

.search { position: relative; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: 6px; background: var(--plate); border: 1px solid var(--line); overflow: hidden; }
.search::after { content: ""; position: absolute; inset: auto 0 0 0; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform .25s var(--ease); }
.search:focus-within::after { transform: scaleX(1); }
.search svg { width: 18px; height: 18px; color: var(--bone-60); flex: none; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--bone); font: inherit; caret-color: var(--gold); }
.search input::placeholder { color: var(--bone-60); }
.search input::-webkit-search-cancel-button { filter: grayscale(1) brightness(2); }
.search kbd { font: 12px/1 var(--mono); color: var(--bone-60); border: 1px solid var(--line); border-radius: 4px; padding: 3px 7px; }

.frame { display: grid; grid-template-columns: 76px minmax(0, 1fr); padding-top: var(--bar); min-height: 100dvh; }
.rail { position: fixed; top: var(--bar); bottom: 0; left: 0; width: 76px; z-index: 20; display: flex; flex-direction: column; gap: 4px; padding: 6px; }
.rail a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 7px; border-radius: 6px; font-size: 11.500px; font-weight: 500; color: var(--bone-75); transition: background .15s, color .15s; }
.rail a:last-child { margin-top: auto; }
.rail svg { width: 22px; height: 22px; }
.rail a:hover { background: var(--plate); color: var(--bone); }
.rail a[aria-current="page"] { background: var(--plate); color: var(--gold); }
.rail a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 2px; background: var(--gold); }
.content { grid-column: 2; min-width: 0; display: flex; flex-direction: column; background: var(--sheet); border-top-left-radius: 12px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
main { flex: 1; padding: var(--pad); padding-bottom: 8px; width: 100%; max-width: 1560px; margin-inline: auto; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding: 28px var(--pad); margin-top: 32px; font-size: 13px; color: var(--bone-60); }

/* ---------- tombol ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 20px; border-radius: 6px; border: 1px solid transparent; font: 600 14.500px/1 var(--sans); white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-gold { background: var(--gold); color: var(--ink-on-gold); }
.btn-gold:hover { background: var(--gold-2); }
.btn-line { border-color: rgba(243, 238, 227, .34); color: var(--bone); background: rgba(7, 22, 48, .4); }
.btn-line:hover { background: var(--plate-2); border-color: var(--bone-60); }
.btn-off { background: var(--plate); color: var(--bone-60); cursor: not-allowed; }
.btn-wide { width: 100%; height: 44px; }

/* ---------- hero ---------- */
.hero { position: relative; height: clamp(340px, 34vw, 460px); border-radius: 10px; overflow: hidden; background: var(--sheet-deep); isolation: isolate; }
.slide { position: absolute; inset: 0; display: flex; align-items: center; opacity: 0; visibility: hidden; transition: opacity .7s var(--ease), visibility 0s .7s; }
.slide.on { opacity: 1; visibility: visible; transition: opacity .7s var(--ease); }
.slide-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.slide::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--sheet-deep) 0%, rgba(7, 22, 48, .94) 30%, rgba(7, 22, 48, .45) 58%, rgba(7, 22, 48, .05) 82%); }
.slide-copy { padding: 0 clamp(24px, 4vw, 56px) 36px; max-width: 620px; }
.hero-ico { width: 64px; height: 64px; margin-bottom: 16px; }
.hero-stack { display: flex; gap: 8px; margin-bottom: 16px; }
.hero-stack .ico { width: 48px; height: 48px; }
.slide h2 { font-size: clamp(2.25rem, 4.6vw, 4rem); font-weight: 700; font-stretch: 86%; letter-spacing: -.01em; line-height: 1; }
.slide p { margin-top: 12px; max-width: 46ch; font-size: clamp(15px, 1.25vw, 18px); color: var(--bone); }
.slide-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-frame { position: absolute; inset: 12px; pointer-events: none; --c: var(--rule); --l: 18px;
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / var(--l) 1px, linear-gradient(var(--c), var(--c)) 0 0 / 1px var(--l),
    linear-gradient(var(--c), var(--c)) 100% 0 / var(--l) 1px, linear-gradient(var(--c), var(--c)) 100% 0 / 1px var(--l),
    linear-gradient(var(--c), var(--c)) 0 100% / var(--l) 1px, linear-gradient(var(--c), var(--c)) 0 100% / 1px var(--l),
    linear-gradient(var(--c), var(--c)) 100% 100% / var(--l) 1px, linear-gradient(var(--c), var(--c)) 100% 100% / 1px var(--l);
  background-repeat: no-repeat; }
.hero-bar { position: absolute; left: clamp(24px, 4vw, 56px); right: 24px; bottom: 22px; display: flex; align-items: center; justify-content: space-between; }
.hero-count { color: var(--gold); font-size: 14px; }
.hero-ctrl { display: flex; gap: 6px; }
.hero-ctrl button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 6px; border: 1px solid rgba(243, 238, 227, .28); background: rgba(7, 22, 48, .62); color: var(--bone); cursor: pointer; transition: background .15s; }
.hero-ctrl button:hover { background: var(--plate-2); }
.hero .i-play, .hero.stopped .i-pause { display: none; }
.hero.stopped .i-play { display: block; }
.hero-timer { position: absolute; inset: auto 0 0 0; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; }
.hero-timer.run { animation: timer 8s linear forwards; }
.hero.paused .hero-timer { animation-play-state: paused; }
@keyframes timer { to { transform: scaleX(1); } }

/* ---------- ikon ---------- */
.ico { display: block; flex: none; width: 64px; height: 64px; border-radius: 18%; overflow: hidden; }
.ico img { width: 100%; height: 100%; object-fit: contain; }
.ico-plate { background: #fff; }
.ico-plate img { transform: scale(.84); }

/* ---------- rak dan kartu ---------- */
.shelf { margin-top: 40px; }
.shelf-head { margin-bottom: 14px; }
.shelf-head h2 { font-size: 22px; font-weight: 700; }
.shelf-head a { display: inline-flex; align-items: center; gap: 4px; }
.shelf-head svg { width: 18px; height: 18px; color: var(--bone-60); transition: transform .2s var(--ease), color .2s; }
.shelf-head a:hover svg { transform: translateX(3px); color: var(--gold); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; border-radius: 8px; background: var(--plate); border: 1px solid var(--line); transition: background .15s, border-color .15s; }
.card:hover { background: var(--plate-2); border-color: var(--rule); }
.card-link { display: block; flex: 1; padding: 16px 16px 8px; border-radius: 8px 8px 0 0; }
.card h3 { margin-top: 14px; font-size: 16.500px; font-weight: 600; }
.card-cat { margin-top: 2px; font-size: 13px; color: var(--bone-60); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px 10px 16px; }
.dl-count { font-size: 13px; color: var(--bone-60); }
.card .dl-count { display: block; margin-top: 2px; }
.row .dl-count { font: inherit; }
.row .dl-count::before { content: " · "; }
.buy-count { display: block; margin-top: 2px; text-align: center; }
.dl-count:empty { display: none; }
.icon-dl { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 6px; color: var(--gold); transition: background .15s, color .15s; }
.icon-dl:hover { background: var(--gold); color: var(--ink-on-gold); }
.badge-off { font-size: 12px; color: var(--bone-60); padding: 8px 6px; }

/* ---------- aplikasi web ---------- */
.posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.posters.gap-top { margin-top: 20px; }
.poster { display: flex; flex-direction: column; border-radius: 8px; overflow: hidden; background: var(--plate); border: 1px solid var(--line); transition: background .15s, border-color .15s; }
.poster:hover { background: var(--plate-2); border-color: var(--rule); }
.poster-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--sheet-deep); }
.poster-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.poster:hover .poster-img img { transform: scale(1.04); }
.poster-body { display: flex; flex-direction: column; flex: 1; gap: 4px; padding: 14px 16px 12px; }
.poster-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.poster-title strong { font-size: 17px; font-weight: 600; font-stretch: 92%; }
.badge-beta { flex: none; font: 12px/1 var(--mono); color: var(--gold); border: 1px solid var(--rule); border-radius: 4px; padding: 4px 6px; }
.poster-tag { flex: 1; font-size: 14px; color: var(--bone-75); }
.poster-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; min-width: 0; }
.poster-foot .data { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poster-foot svg { flex: none; width: 18px; height: 18px; color: var(--gold); }

/* ---------- daftar ---------- */
.page-head { margin: 8px 0 22px; }
.page-head h1 { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700; }
.page-head p { margin-top: 6px; max-width: 70ch; color: var(--bone-75); }
.rows { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 14px; padding-right: 16px; border-radius: 8px; background: var(--plate); border: 1px solid var(--line); transition: background .15s, border-color .15s; }
.row:hover { background: var(--plate-2); border-color: var(--rule); }
.row-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px; padding: 14px 0 14px 16px; border-radius: 8px; }
.row-text { display: flex; flex-direction: column; min-width: 0; }
.row-name { font-size: 17px; font-weight: 600; font-stretch: 92%; }
.row-tag { color: var(--bone-75); font-size: 14px; }
.empty { padding: 48px 16px; text-align: center; color: var(--bone-75); background: var(--plate); border-radius: 8px; }

/* ---------- detail ---------- */
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 16px; font-size: 14px; color: var(--bone-75); }
.back:hover { color: var(--gold); }
.back svg { width: 16px; height: 16px; }
.detail { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; align-items: start; }
.buy { position: sticky; top: calc(var(--bar) + 16px); padding: 24px; border-radius: 10px; background: var(--plate); border: 1px solid var(--line); }
.buy-ico { width: 112px; height: 112px; margin-bottom: 18px; }
.buy h1 { font-size: 30px; font-weight: 700; font-stretch: 88%; }
.buy-pub { margin-top: 4px; color: var(--gold); font-size: 14px; font-weight: 500; }
.buy-cat { font-size: 13.500px; color: var(--bone-60); margin-bottom: 18px; }
.buy-size { margin-top: 8px; text-align: center; }
.buy-hint { margin-top: 12px; font-size: 13.500px; color: var(--bone-75); }
.alt { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; font-size: 14px; }
.alt a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.alt p { flex-basis: 100%; font-size: 13px; color: var(--bone-60); }
.qr { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; gap: 14px; align-items: center; }
.qr-code { flex: none; width: 96px; height: 96px; padding: 6px; background: #fff; border-radius: 6px; }
.qr-code svg { width: 100%; height: 100%; stroke: none; }
.qr p { font-size: 13px; color: var(--bone-75); }
.qr strong { display: block; color: var(--bone); font-size: 14.500px; font-weight: 600; }
.about { display: grid; gap: 32px; max-width: 820px; padding-top: 4px; }
.about h2, .guides h2 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.lead { max-width: 70ch; font-size: 16px; color: var(--bone); }
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 24px; }
.features li { display: flex; align-items: center; gap: 10px; }
.features svg { flex: none; width: 18px; height: 18px; color: var(--gold); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 10px; color: var(--bone-75); }
.steps li::before { content: counter(s); font: 15px/1.5 var(--mono); color: var(--gold); }
.steps strong { color: var(--bone); font-weight: 600; }
.info { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 24px; }
.info dt { font-size: 13px; color: var(--bone-60); }
.info dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- bantuan ---------- */
.guides { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.guides section { padding: 22px; border-radius: 8px; background: var(--plate); border: 1px solid var(--line); }
.contact { margin-top: 12px; padding: 22px; border-radius: 8px; border: 1px solid var(--rule); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.contact h2 { font-size: 19px; font-weight: 700; }
.contact p { margin-top: 4px; color: var(--bone-75); }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 50; translate: -50% 16px; opacity: 0; pointer-events: none; padding: 11px 18px; border-radius: 6px; background: var(--bone); color: var(--ink-on-gold); font-weight: 600; font-size: 14px; box-shadow: 0 10px 28px rgba(0, 0, 0, .45); transition: opacity .2s, translate .2s var(--ease); max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; translate: -50% 0; }

/* ---------- responsif ---------- */
@media (max-width: 960px) {
  .titlebar { grid-template-columns: auto minmax(0, 1fr); }
  .detail { grid-template-columns: 1fr; gap: 24px; }
  .buy { position: static; }
  .buy-ico { width: 88px; height: 88px; }
  .about { max-width: none; }
}
@media (max-width: 720px) {
  :root { --bar: 60px; }
  .titlebar { padding: 0 12px; gap: 12px; }
  .brand-text, .search kbd { display: none; }
  .frame { grid-template-columns: minmax(0, 1fr); }
  .content { grid-column: 1; border-left: 0; border-top-right-radius: 12px; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .rail { top: auto; left: 0; right: 0; bottom: 0; width: auto; flex-direction: row; gap: 0; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: var(--sheet-deep); border-top: 1px solid var(--line); }
  .rail a { flex: 1; }
  .rail a:last-child { margin-top: 0; }
  .rail a[aria-current="page"]::before { left: 30%; right: 30%; top: 0; bottom: auto; width: auto; height: 3px; }
  .hero { height: 440px; }
  .slide { align-items: flex-end; }
  .slide-photo { height: 56%; }
  .slide::before { background: linear-gradient(180deg, rgba(7, 22, 48, .1) 0%, rgba(7, 22, 48, .55) 34%, var(--sheet-deep) 56%); }
  .slide-copy { padding: 0 20px 68px; }
  .hero-ico { width: 52px; height: 52px; margin-bottom: 10px; }
  .hero-stack { margin-bottom: 10px; }
  .hero-stack .ico { width: 40px; height: 40px; }
  .hero-bar { left: 20px; right: 14px; bottom: 16px; }
  .hero-frame { display: none; }
  .cards { grid-template-columns: 1fr; gap: 8px; }
  .card { flex-direction: row; align-items: center; }
  .card-link { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 14px; padding: 12px 0 12px 12px; border-radius: 8px; }
  .card-link .ico { width: 52px; height: 52px; grid-row: span 3; align-self: center; }
  .card h3 { margin-top: 0; align-self: end; }
  .card-foot { padding: 0 8px 0 0; }
  .card-foot .data { display: none; }
  .posters { grid-template-columns: 1fr; }
  .row { padding-right: 10px; }
  .row-link { gap: 12px; padding-left: 12px; }
  .row .ico { width: 52px; height: 52px; }
  .row .btn { width: 40px; padding: 0; }
  .row .btn span { display: none; }
  .row .btn-off { width: auto; padding: 0 10px; font-size: 12px; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  #heroPause { display: none; }
}
