:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --text: #1d1a16;
  --muted: #6b645a;
  --border: #e8e1d6;
  --accent: #c8102e;   /* Jalur Gemilang red */
  --accent-2: #010066; /* Jalur Gemilang blue */
  --gold: #ffcc00;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110;
    --surface: #1c1a18;
    --text: #f3efe8;
    --muted: #a9a196;
    --border: #2e2a26;
    --accent: #ff4d5e;
    --accent-2: #8ea2ff;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
h1, h2, h3 { font-family: Fraunces, Georgia, serif; line-height: 1.15; margin: 0 0 .5rem; }
a { color: inherit; }
.muted { color: var(--muted); }

/* Hero */
.hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(circle at 85% 20%, rgba(255,204,0,.35), transparent 40%),
    linear-gradient(135deg, #062a4f 0%, #0369a1 50%, #14b8a6 100%);
  padding: 0 16px 96px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 60px;
  background: var(--bg);
  clip-path: ellipse(70% 100% at 50% 100%);
}
.nav {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 0;
}
.brand { font-weight: 600; text-decoration: none; font-size: 1.1rem; }
.nav-links { display: flex; gap: 20px; }
.nav-links a { text-decoration: none; opacity: .85; }
.nav-links a:hover { opacity: 1; }
.hero-content { max-width: 1100px; margin: 0 auto; padding: 72px 0 24px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .14em;
  font-size: .78rem; font-weight: 600; margin: 0 0 .5rem; opacity: .85;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); max-width: 14ch; }
.hero h1 span { color: var(--gold); }
.lede { max-width: 56ch; font-size: 1.1rem; opacity: .9; }
.cta {
  display: inline-block; margin-top: 16px;
  background: var(--gold); color: #1d1a16;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; text-decoration: none;
  transition: transform .15s ease;
}
.cta:hover { transform: translateY(-2px); }

/* Sections */
.section { max-width: 1100px; margin: 0 auto; padding: 56px 16px; }
.section-head h2, .facts h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }

.controls { display: flex; flex-direction: column; gap: 14px; margin: 24px 0 8px; }
#search {
  width: 100%; max-width: 480px;
  padding: 12px 16px; font: inherit;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text);
}
#search:focus { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 7px 14px; border-radius: 999px; font: inherit; font-size: .9rem;
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.count { font-size: .9rem; margin: 8px 0 16px; }

/* Cards */
.grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  cursor: pointer; text-align: left; padding: 0; font: inherit; color: inherit;
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover, .card:focus-visible { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.12); }
.card:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.card-banner {
  height: 120px; display: grid; place-items: center; font-size: 3.2rem;
  position: relative;
}
.badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,.9); color: #1d1a16;
  font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
}
.card-body { padding: 16px 18px 20px; }
.card-body h3 { font-size: 1.35rem; margin-bottom: 2px; }
.card-state { color: var(--muted); font-size: .88rem; margin: 0 0 8px; }
.card-tagline { margin: 0; font-size: .95rem; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* Facts */
.fact-grid {
  display: grid; gap: 16px; margin-top: 24px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.fact {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; gap: 4px;
}
.fact strong { font-family: Fraunces, Georgia, serif; font-size: 1.3rem; color: var(--accent); }
.fact span { color: var(--muted); font-size: .9rem; }

.footer { text-align: center; padding: 32px 16px 48px; color: var(--muted); border-top: 1px solid var(--border); }

/* Modal */
dialog {
  width: min(560px, calc(100% - 32px));
  border: none; border-radius: 20px; padding: 0;
  background: var(--surface); color: var(--text);
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
}
dialog::backdrop { background: rgba(10,8,30,.55); backdrop-filter: blur(3px); }
.modal-banner { height: 140px; display: grid; place-items: center; position: relative; }
.modal-emoji { font-size: 4rem; }
.close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.9); color: #1d1a16; cursor: pointer; font-size: 1rem;
}
.modal-body { padding: 20px 24px 28px; }
.modal-body .eyebrow { color: var(--accent); opacity: 1; }
.modal-body h3 { font-size: 1.9rem; }
.modal-body h4 { margin: 20px 0 8px; font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.modal-body ul { margin: 0; padding-left: 20px; }
.modal-body li { margin: 4px 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: var(--bg); border: 1px solid var(--border); padding: 5px 12px; border-radius: 999px; font-size: .88rem; }

@media (max-width: 600px) {
  .nav-links { gap: 14px; font-size: .9rem; }
  .hero-content { padding-top: 40px; }
}
