/* Halaman utama. Gaya bersama (header, tombol, footer, modal) ada di site.css. */

/* Hero */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: 48px 0 64px; color: #fff; }
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: #1f6b34; }
.hero-bg::before {
  content: ''; position: absolute; inset: -24px;
  background: url('/public/img/gameplay/panen-egrek-640.webp') center / cover no-repeat;
  filter: blur(10px) saturate(1.15);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14, 70, 110, 0.55) 0%, rgba(20, 90, 40, 0.72) 65%, rgba(20, 70, 30, 0.9) 100%);
}
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px; }
.pill {
  display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--sun); color: #5a3a00;
  font-family: var(--display); font-size: 16px; box-shadow: 0 3px 0 var(--sun-dark);
}
.hero h1 { margin-top: 16px; font-size: clamp(36px, 5.4vw, 60px); text-shadow: 0 3px 0 rgba(0, 0, 0, 0.25); }
.hero .hl { color: var(--sun); }
.lead { margin-top: 16px; font-size: 19px; max-width: 34em; color: rgba(255, 255, 255, 0.95); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 26px 0 0; }
.hero-stats li {
  display: flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: 14px;
  background: rgba(0, 0, 0, 0.18); border: 1px solid rgba(255, 255, 255, 0.22);
}
.hero-stats strong { font-family: var(--display); font-weight: 400; font-size: 20px; color: var(--sun); }
.hero-stats span { font-size: 15px; opacity: 0.95; }
.hero-shot {
  margin: 0; border-radius: 24px; overflow: hidden; border: 6px solid #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); transform: rotate(1.5deg); background: #fff;
}
.hero-shot img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

/* Section */
.section { padding: 64px 0; }
.section-green { background: var(--leaf-soft); }
.section-sky { background: var(--sky-soft); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2, .board-copy h2, .trailer-copy h2 { font-size: clamp(30px, 4vw, 42px); color: var(--leaf-dark); }
.section-head p { color: var(--muted); font-size: 18px; margin-top: 4px; }

/* Galeri */
.gallery-nav { display: flex; gap: 8px; }
.round-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; background: var(--sun); color: #5a3a00;
  font-size: 30px; line-height: 1; padding-bottom: 4px; box-shadow: 0 4px 0 var(--sun-dark);
}
.round-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sun-dark); }
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 3); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 14px;
  scrollbar-width: thin; scrollbar-color: var(--leaf) transparent;
}
.shot {
  scroll-snap-align: start; margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--card);
  box-shadow: var(--shadow); cursor: zoom-in; border: 0; padding: 0; text-align: left; font: inherit; color: inherit;
}
/* height:auto wajib: atribut height="360" di <img> mengalahkan aspect-ratio kalau tidak di-reset. */
.shot img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.3s ease; }
.shot:hover img { transform: scale(1.04); }
.shot span { display: block; padding: 12px 16px 14px; font-weight: 600; }

/* Fitur: gambar asli dari game, bukan ikon */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feature { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.feature img { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; border: 3px solid var(--leaf-soft); }
.feature h3 { font-size: 22px; }
.feature p { margin-top: 4px; color: var(--muted); font-size: 16px; }

/* Trailer */
.trailer { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 36px; align-items: center; }
.trailer-copy p { margin: 10px 0 22px; color: var(--muted); font-size: 18px; }
.video-frame { border-radius: 24px; overflow: hidden; border: 6px solid var(--ink); background: #000; box-shadow: var(--shadow); }
.video-frame video { width: 100%; aspect-ratio: 16 / 9; background: #000; }

/* Pengumuman */
.news { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.news-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.news-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--sky-soft); }
.news-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-date { font-size: 14px; color: var(--muted); font-weight: 600; }
.news-body h3 { font-size: 22px; }
.news-body .btn { margin-top: auto; align-self: flex-start; }

/* Leaderboard */
.board-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 36px; align-items: center; }
.board-copy p { margin: 10px 0 22px; color: var(--muted); font-size: 18px; }
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.board li {
  display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 12px; background: var(--card);
  border-radius: 16px; padding: 10px 16px 10px 10px; box-shadow: var(--shadow);
}
.board .rank { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; font-family: var(--display); font-size: 22px; background: var(--sky-soft); }
.board li:nth-child(1) .rank { background: var(--sun); color: #5a3a00; }
.board li:nth-child(2) .rank { background: #dfe7ef; }
.board li:nth-child(3) .rank { background: #f3c9a4; color: #6b3a12; }
.board .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .value { font-family: var(--display); color: var(--leaf-dark); font-size: 18px; white-space: nowrap; }
.board .board-empty { display: block; text-align: center; color: var(--muted); padding: 18px; }

/* CTA */
.cta { background: var(--leaf); color: #fff; padding: 56px 0; text-align: center; border-top: 6px solid var(--leaf-dark); }
.cta-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cta img { width: 240px; height: auto; }
.cta h2 { font-size: clamp(30px, 4vw, 42px); }
.cta p { opacity: 0.92; margin-bottom: 10px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; padding: 16px; background: rgba(10, 18, 28, 0.9); }
.lightbox.show { display: grid; }
.lightbox img { max-height: 80vh; border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.lightbox p { color: #fff; margin-top: 12px; font-weight: 600; text-align: center; }
.lightbox-close { position: absolute; top: 14px; right: 14px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 0;
  background: var(--sun); color: #5a3a00; font-size: 34px; line-height: 1; padding-bottom: 5px; cursor: pointer;
}
.lightbox-nav.prev { left: 14px; }
.lightbox-nav.next { right: 14px; }

@media (max-width: 960px) {
  .hero-inner, .trailer, .board-wrap { grid-template-columns: 1fr; }
  .hero { padding: 32px 0 48px; text-align: center; }
  .lead { margin-inline: auto; }
  .hero-actions, .hero-stats { justify-content: center; }
  .hero-shot { transform: none; max-width: 640px; margin-inline: auto; }
  .gallery { grid-auto-columns: calc((100% - 16px) / 2); }
  .trailer-copy, .board-copy { text-align: center; }
}

@media (max-width: 600px) {
  .section { padding: 48px 0; }
  .features { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 80px 1fr; }
  .feature img { width: 80px; height: 80px; }
  .gallery { grid-auto-columns: 86%; }
  .section-head { align-items: center; }
  .gallery-nav { display: none; }
  .btn-play { width: 100%; max-width: 320px; }
  .hero-actions .btn-white { width: 100%; max-width: 320px; }
  .lightbox-nav { width: 44px; height: 44px; font-size: 28px; }
}

/* Tombol versi Windows (itch.io) */
.btn-windows svg { fill: #4cc2ff; }
.trailer-copy .btn-play + .btn-windows { margin-left: 10px; }
@media (max-width: 960px) {
  .trailer-copy .btn-play + .btn-windows { margin: 12px 0 0; }
}
