/* Royal Dream — gaya dasar situs
   Warna utama (ubah di sini bila perlu, lalu cari-ganti di HTML):
   --biru   #1D4ED8   tombol utama, tautan
   --emas   #FFC233   tombol X8, label
   --tinta  #0F1F3D   teks utama
   --abu    #4A5878   teks sekunder
   --muda   #E8F0FF   latar section terang
   --dasar  #F6F9FF   latar halaman
   --garis  #D9E3F3   garis & border
*/
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: #F6F9FF; overflow-x: clip; }
img { max-width: 100%; }
a { color: #1D4ED8; }
a:hover { color: #1E3A8A; }
a:focus-visible, summary:focus-visible { outline: 3px solid #FFC233; outline-offset: 3px; border-radius: 6px; }
summary { list-style-position: outside; }

.skip { position: absolute; left: -9999px; top: 8px; background: #0F1F3D; color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 16px; color: #fff; }

/* Hero video full-bleed (首屏视频平铺背景) — desktop versi horizontal, HP versi vertikal.
   Video jadi latar yang menutupi seluruh layar pertama; teks di atasnya + scrim gelap biar terbaca. */
.hero { position: relative; overflow: hidden; display: flex; align-items: center; background: #0B1020; min-height: calc(100vh - 72px); min-height: calc(100svh - 72px); }
.hero-bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(8,11,28,0.90) 0%, rgba(8,11,28,0.66) 40%, rgba(8,11,28,0.22) 78%, rgba(8,11,28,0.10) 100%); }
.hero-content { position: relative; z-index: 2; }
.hero-badge { background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.28); color: #FFFFFF; border-radius: 999px; padding: 6px 13px; }
@media (max-width: 767px) {
  .hero { min-height: calc(100vh - 64px); min-height: calc(100svh - 64px); }
  .hero-scrim { background: linear-gradient(180deg, rgba(8,11,28,0.52) 0%, rgba(8,11,28,0.34) 38%, rgba(8,11,28,0.88) 100%); }
}

/* Tablet */
@media (max-width: 900px) {
  h1 { font-size: 44px !important; }
  h2 { font-size: 32px !important; }
}

/* HP */
@media (max-width: 640px) {
  .wrap { padding-left: 16px !important; padding-right: 16px !important; padding-top: 48px !important; padding-bottom: 48px !important; }
  header .wrap { padding-top: 10px !important; padding-bottom: 10px !important; }
  h1 { font-size: 34px !important; }
  h2 { font-size: 26px !important; }
  header nav { order: 3; width: 100%; gap: 6px 18px !important; }
  .deco { right: -6px !important; top: -16px !important; }
  [style*="padding: 56px"], [style*="padding: 44px"] { padding: 28px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ===== Iterasi 2026-10-19 ===== */

/* Judul hero pakai Instrument Serif + ukuran lebih ringkas */
.hero-title { font-family: 'Instrument Serif', Georgia, serif !important; font-weight: 400 !important; font-size: 56px; line-height: 1.06; letter-spacing: 0; }
@media (max-width: 900px) { .hero-title { font-size: 38px !important; } }
@media (max-width: 640px) { .hero-title { font-size: 27px !important; } }
.hero-sub { font-size: 17px; }
@media (max-width: 640px) { .hero-sub { font-size: 14.5px !important; } }
@media (max-width: 640px) { .hero-badge { font-size: 11.5px !important; padding: 5px 10px !important; } }

/* Header: tombol hamburger untuk HP */
.nav-toggle { display: none; background: none; border: 0; padding: 8px; margin: -4px -8px -4px 0; cursor: pointer; color: #0F1F3D; line-height: 0; }
@media (max-width: 767px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  #mainnav { display: none !important; order: 3; width: 100%; flex-direction: column; gap: 2px !important; margin-top: 10px; padding-top: 10px; border-top: 1px solid #D9E3F3; }
  #mainnav.open { display: flex !important; }
  #mainnav a { padding: 11px 2px; }
}

/* Daftar game: carousel geser */
.game-carousel { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 12px; scrollbar-width: thin; }
.game-carousel > * { flex: 0 0 240px; scroll-snap-align: start; }
@media (max-width: 640px) { .game-carousel > * { flex: 0 0 74%; } }

/* Tombol lihat selengkapnya / collapse */
.collapse { }
.collapse > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; background: #E8F0FF; color: #1D4ED8; font: 700 15px 'Plus Jakarta Sans', system-ui, sans-serif; padding: 12px 22px; border-radius: 999px; cursor: pointer; }
.collapse > summary::-webkit-details-marker { display: none; }
.collapse > summary .chev { transition: transform 0.2s; }
.collapse[open] > summary .chev { transform: rotate(180deg); }
.collapse[open] > summary .lbl-show { display: none; }
.collapse > summary .lbl-hide { display: none; }
.collapse[open] > summary .lbl-hide { display: inline; }

/* Header melekat di atas saat digulir */
header { position: sticky; top: 0; z-index: 50; }

/* HP: badge di atas, judul + tombol didorong ke bawah agar naga tidak tertutup */
@media (max-width: 767px) {
  .hero { align-items: stretch; }
  .hero-content { display: flex; flex-direction: column; }
  .hero-inner { flex: 1 1 auto; }
  .hero-lower { margin-top: auto; }
}

/* Popup sambutan (hanya HP, sekali per sesi) */
.intro-modal { display: none; }
.intro-card { position: relative; width: 100%; max-width: 360px; background: #0B1020; border-radius: 24px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.55); }
.intro-video { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: #0B1020; }
.intro-close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 999px; border: 0; background: rgba(0,0,0,0.45); color: #FFFFFF; font-size: 22px; line-height: 1; cursor: pointer; }
.intro-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; text-align: center; color: #FFFFFF; }
.intro-body strong { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: 26px; line-height: 1.1; }
.intro-body p { margin: 0; font-size: 14px; color: rgba(255,255,255,0.8); }
.intro-cta { background: #1D4ED8; color: #FFFFFF; text-decoration: none; font-weight: 700; padding: 13px; border-radius: 12px; }
.intro-dismiss { background: none; border: 0; color: rgba(255,255,255,0.72); font: 600 14px 'Plus Jakarta Sans', system-ui, sans-serif; cursor: pointer; padding: 4px; }
@media (max-width: 767px) {
  .intro-modal.show { display: flex; position: fixed; inset: 0; z-index: 100; background: rgba(6,9,22,0.82); align-items: center; justify-content: center; padding: 20px; }
}

/* Carousel banner cuplikan permainan */
.banner-carousel { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 12px; scrollbar-width: thin; }
.banner-carousel > * { flex: 0 0 min(90%, 520px); scroll-snap-align: start; }
.banner-carousel img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; }
