/* =====================================================================
   HONGKONGGAME — Master Stylesheet
   Imperial gold · lacquer red · deep charcoal
   Dipakai oleh SEMUA halaman. Halaman lain cukup ikuti struktur ini.
   Mobile-first, aman sampai 280px (Z Fold 4 terlipat).
   ===================================================================== */

/* ---------- 1. Design Tokens ---------- */
:root {
  /* Warna dasar (charcoal) */
  --ink-900: #14100c;
  --ink-800: #1e1813;
  --ink-750: #241c15;
  --ink-700: #2a2119;
  --ink-600: #3a2d20;

  /* Emas imperial */
  --gold-300: #f9e2a5;
  --gold-400: #f3c55b;
  --gold-500: #e3b24a;
  --gold-600: #c9962e;
  --gold-metal: linear-gradient(180deg, #f9e2a5 0%, #e3b24a 46%, #b9822a 100%);

  /* Merah lampion / lacquer */
  --red-400: #d14349;
  --red-500: #c0272d;
  --red-600: #8e1b1f;
  --red-700: #6b1316;

  /* Teks & netral hangat */
  --ivory: #efe6d2;
  --ivory-dim: #b7aa90;
  --ivory-faint: #8a7f6c;
  --jade: #3e9e82; /* status "online / live" — dipakai sangat terbatas */

  /* Sistem */
  --radius: 14px;
  --radius-sm: 9px;
  --line: 1px solid rgba(227, 178, 74, 0.18);
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.8);
  --shadow-gold: 0 10px 34px -12px rgba(227, 178, 74, 0.35);
  --maxw: 1180px;
  --pad-x: clamp(16px, 5vw, 56px);
  --gap: clamp(18px, 3.5vw, 34px);

  --ff-display: "Marcellus", Georgia, serif;
  --ff-body: "Sora", system-ui, -apple-system, sans-serif;
}

/* ---------- 2. Reset & Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--ff-body);
  color: var(--ivory);
  background:
    radial-gradient(1100px 620px at 50% -8%, #2c2016 0%, transparent 60%),
    linear-gradient(180deg, var(--ink-800) 0%, var(--ink-900) 100%);
  background-attachment: fixed;
  line-height: 1.65;
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem);
  overflow-x: hidden;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, .display { font-family: var(--ff-display); font-weight: 400; line-height: 1.12; letter-spacing: 0.01em; }
h1 { font-size: clamp(2.1rem, 1.3rem + 5vw, 4.4rem); }
h2 { font-size: clamp(1.55rem, 1rem + 2.6vw, 2.7rem); }
h3 { font-size: clamp(1.15rem, 1rem + 0.8vw, 1.5rem); }

p { color: var(--ivory-dim); }
strong { color: var(--ivory); font-weight: 600; }

::selection { background: var(--gold-600); color: var(--ink-900); }

/* Fokus keyboard terlihat (aksesibilitas) */
:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 3px; border-radius: 4px; }

/* Emas metalik untuk teks penting */
.gold-text {
  background: var(--gold-metal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 3. Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad-x); }

.section { padding-block: clamp(48px, 8vw, 104px); position: relative; }
.section--tight { padding-block: clamp(34px, 5vw, 64px); }

.eyebrow {
  font-family: var(--ff-body);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-500);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before { content: "❖"; color: var(--red-500); }

.section-head { max-width: 640px; margin-bottom: clamp(26px, 4vw, 46px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { margin-top: 14px; }

/* Pembatas motif "sisik naga" (signature) */
.scale-divider {
  height: 16px;
  width: 100%;
  background-image: radial-gradient(circle at 50% 120%, var(--gold-600) 0 6px, transparent 7px);
  background-size: 18px 16px;
  background-position: center;
  opacity: 0.4;
  margin-block: 6px;
}

/* ---------- 4. Header / Navigasi ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(10px);
  background: rgba(20, 16, 12, 0.78);
  border-bottom: var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; min-height: 62px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--ff-display); font-size: 1.15rem; letter-spacing: 0.04em; white-space: nowrap; }
.brand .brand-mark { color: var(--gold-400); font-size: 1.3em; line-height: 1; }
.brand b { font-weight: 400; }
.brand span { color: var(--gold-400); }

.nav-links { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); }
.nav-links a { font-size: 0.9rem; color: var(--ivory-dim); position: relative; padding: 4px 0; transition: color 0.2s; }
.nav-links a:hover { color: var(--gold-300); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 0;
  background: var(--gold-metal); transition: width 0.25s ease;
}
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--ink-600);
  color: var(--gold-400); width: 42px; height: 40px; border-radius: 9px;
  font-size: 1.2rem; cursor: pointer;
}

/* ---------- 5. Tombol ---------- */
.btn {
  --btn-pad-y: 13px; --btn-pad-x: 24px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: 999px; font-family: var(--ff-body); font-weight: 600;
  font-size: 0.92rem; letter-spacing: 0.02em; cursor: pointer;
  border: 1px solid transparent; transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s;
  white-space: nowrap; text-align: center;
}
.btn:active { transform: translateY(1px); }

.btn--gold {
  background: var(--gold-metal); color: #3a2a10;
  box-shadow: var(--shadow-gold); position: relative; overflow: hidden;
}
.btn--gold:hover { box-shadow: 0 12px 40px -10px rgba(243, 197, 91, 0.55); }
.btn--gold::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
}
.btn--gold:hover::after { animation: shimmer 0.9s ease; }
@keyframes shimmer { to { transform: translateX(120%); } }

.btn--ghost { background: rgba(255, 255, 255, 0.03); border-color: var(--gold-600); color: var(--gold-300); }
.btn--ghost:hover { background: rgba(227, 178, 74, 0.1); }

.btn--red { background: linear-gradient(180deg, var(--red-500), var(--red-700)); color: var(--ivory); }
.btn--red:hover { filter: brightness(1.08); }

.btn--block { width: 100%; }

/* ---------- 6. Chips / badge ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px; font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.04); border: var(--line); color: var(--ivory-dim);
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--jade); box-shadow: 0 0 0 3px rgba(62, 158, 130, 0.25); }
.chip--warn { border-color: var(--red-600); color: #e9b7b8; }

/* ---------- 7. HERO (satu gambar per halaman) ---------- */
.hero { padding-block: clamp(40px, 7vw, 88px); text-align: center; position: relative; }
.hero::before { /* cahaya emas di belakang emblem */
  content: ""; position: absolute; top: 8%; left: 50%; transform: translateX(-50%);
  width: min(680px, 90%); aspect-ratio: 1.6/1;
  background: radial-gradient(closest-side, rgba(227, 178, 74, 0.22), transparent 72%);
  filter: blur(6px); z-index: -1; pointer-events: none;
}
.hero-emblem {
  width: min(520px, 84%); margin-inline: auto; margin-bottom: 26px;
  border-radius: 18px; filter: drop-shadow(0 24px 46px rgba(0, 0, 0, 0.7));
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.hero h1 { margin-bottom: 8px; }
.hero .lede { max-width: 620px; margin: 14px auto 26px; font-size: clamp(1rem, 0.95rem + 0.5vw, 1.2rem); color: var(--ivory-dim); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero .chip-row { justify-content: center; margin-top: 26px; }

/* ---------- 8. Stat bar ---------- */
.statbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 1px; background: var(--ink-600); border: var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--ink-750); padding: clamp(20px, 3vw, 32px) 16px; text-align: center; }
.stat .num { font-family: var(--ff-display); font-size: clamp(1.7rem, 1.2rem + 2.4vw, 2.8rem); color: var(--gold-400); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.stat .lbl { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ivory-faint); margin-top: 6px; }

/* ---------- 9. Kartu grid (game / fitur / berita) ---------- */
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }

.card {
  background: linear-gradient(180deg, var(--ink-700), var(--ink-750));
  border: var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 28px);
  position: relative; overflow: hidden; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s;
}
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--gold-metal); opacity: 0.7; }
.card:hover { transform: translateY(-5px); border-color: var(--gold-600); box-shadow: var(--shadow); }
.card .ico { font-size: 2.4rem; line-height: 1; margin-bottom: 14px; display: block; }
.card h3 { color: var(--ivory); margin-bottom: 8px; }
.card p { font-size: 0.92rem; }
.card .card-tag { position: absolute; top: 16px; right: 16px; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-500); border: 1px solid var(--gold-600); padding: 3px 9px; border-radius: 999px; }

/* Langkah bernomor (Cara Main) — nomor bermakna urutan */
.steps { counter-reset: step; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.step { position: relative; padding: clamp(22px, 3vw, 30px) clamp(20px, 3vw, 26px); background: rgba(255, 255, 255, 0.02); border: var(--line); border-radius: var(--radius); }
.step::before { counter-increment: step; content: "0" counter(step); font-family: var(--ff-display); font-size: 2.1rem; color: var(--gold-600); display: block; margin-bottom: 10px; }
.step h3 { color: var(--ivory); margin-bottom: 6px; }
.step p { font-size: 0.9rem; }

/* Kartu berita */
.news-card { display: flex; flex-direction: column; gap: 12px; }
.news-card .news-meta { display: flex; gap: 10px; align-items: center; font-size: 0.74rem; color: var(--ivory-faint); letter-spacing: 0.06em; text-transform: uppercase; }
.news-card .news-meta .cat { color: var(--red-400); }
.news-card h3 { font-size: 1.15rem; color: var(--ivory); }
.news-card a.more { color: var(--gold-400); font-size: 0.85rem; margin-top: auto; }

/* ---------- 9b. Artikel home ---------- */
.home-article { max-width: 760px; }
.home-article p { margin-bottom: 1.1em; font-size: 0.98rem; }
.home-article p:last-child { margin-bottom: 0; }
.home-article a { color: var(--gold-400); border-bottom: 1px dotted var(--gold-600); transition: color 0.2s; }
.home-article a:hover { color: var(--gold-300); }

/* ---------- 9c. Teaser Tentang Kami ---------- */
.about-teaser {
  display: flex; align-items: center; gap: clamp(16px, 3vw, 28px);
  padding: clamp(22px, 3.5vw, 34px);
  background: linear-gradient(120deg, rgba(192, 39, 45, 0.12), rgba(227, 178, 74, 0.07));
  border: var(--line); border-radius: var(--radius);
}
.about-teaser-ico { font-size: 2.6rem; flex: 0 0 auto; }
.about-teaser h3 { margin-bottom: 6px; }
.about-teaser p { font-size: 0.92rem; }
.about-teaser .btn { flex: 0 0 auto; }
@media (max-width: 680px) {
  .about-teaser { flex-direction: column; text-align: center; }
}

/* ---------- 9d. FAQ ---------- */
.faq-list { max-width: 760px; display: grid; gap: 12px; }
.faq-item {
  background: linear-gradient(180deg, var(--ink-700), var(--ink-750));
  border: var(--line); border-radius: var(--radius-sm);
  padding: 0 clamp(16px, 2.5vw, 22px);
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: var(--gold-600); }
.faq-item summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 0; font-weight: 600; color: var(--ivory); font-size: 0.95rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-mark { color: var(--gold-500); font-size: 1.1rem; transition: transform 0.2s; flex: 0 0 auto; }
.faq-item[open] .faq-mark { transform: rotate(45deg); }
.faq-item p { padding: 0 0 16px; font-size: 0.9rem; }

/* ---------- 10. Banner ajakan ---------- */
.cta-band {
  text-align: center; border: 1px solid var(--gold-600); border-radius: var(--radius);
  padding: clamp(34px, 6vw, 64px) var(--pad-x);
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(192, 39, 45, 0.22), transparent 70%),
    linear-gradient(180deg, var(--ink-700), var(--ink-800));
}
.cta-band h2 { margin-bottom: 10px; }
.cta-band p { max-width: 520px; margin: 0 auto 24px; }

/* ---------- 11. Responsible gaming ---------- */
.rg-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: center;
  text-align: center; padding: 18px var(--pad-x);
  background: rgba(107, 19, 22, 0.28); border-block: 1px solid var(--red-700);
  font-size: 0.85rem; color: #e9c9ca;
}
.rg-banner .age { flex: 0 0 auto; font-family: var(--ff-display); background: var(--red-600); color: var(--ivory); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 0.95rem; }

/* ---------- 12. Footer ---------- */
.site-footer { border-top: var(--line); background: var(--ink-900); padding-block: clamp(40px, 6vw, 64px) 26px; }
.footer-grid { display: grid; gap: 34px; grid-template-columns: 1.4fr repeat(3, 1fr); }
.footer-col h4 { font-family: var(--ff-body); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-500); margin-bottom: 16px; }
.footer-col a { display: block; color: var(--ivory-dim); font-size: 0.9rem; padding: 5px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--gold-300); }
.footer-brand p { font-size: 0.9rem; margin-top: 12px; max-width: 34ch; }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a { width: 40px; height: 40px; border: var(--line); border-radius: 10px; display: grid; place-items: center; font-size: 1.1rem; color: var(--gold-400); }
.footer-social a:hover { background: rgba(227, 178, 74, 0.1); }
.footer-bottom { margin-top: 38px; padding-top: 20px; border-top: var(--line); display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--ivory-faint); }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- 13. Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* =====================================================================
   14. RESPONSIVE
   ===================================================================== */

/* Tablet / fold terbuka ke bawah */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Ponsel: nav jadi menu geser */
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; inset: 62px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(20, 16, 12, 0.98); border-bottom: var(--line);
    padding: 8px var(--pad-x) 18px;
    transform: translateY(-140%); transition: transform 0.3s ease; z-index: 55;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px 0; border-bottom: var(--line); font-size: 1rem; }
  .nav-links a::after { display: none; }
  .nav-links .btn { margin-top: 14px; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { justify-content: center; text-align: center; }
  .hero-cta .btn { flex: 1 1 auto; }
}

/* Z Fold 4 TERLIPAT (layar luar ±280px) & ponsel sangat kecil */
@media (max-width: 340px) {
  :root { --pad-x: 14px; }
  .brand { font-size: 1rem; }
  .brand .brand-mark { font-size: 1.15em; }
  h1 { font-size: 1.95rem; }
  .btn { --btn-pad-x: 18px; font-size: 0.86rem; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .statbar { grid-template-columns: 1fr 1fr; }
  .chip { font-size: 0.72rem; padding: 6px 10px; }
}

/* Hormati preferensi gerak minimal */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
