/* ============================================================
   PUBLIC SHELL — Si-Reino (beranda, cek status)
   Dibangun di atas tokens.css (palet, spasi, radius, bayangan).
   ============================================================ */
:root {
  --gold-500: #C8A951;
  --page-bg: #F3F6FB;
  --container: 1120px;
}

html { scroll-behavior: smooth; }
body.public {
  background: var(--page-bg);
  color: var(--ink-900);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
}
body.public a:not(.btn) { color: inherit; }
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 2000;
  background: var(--brand-900); color: #fff; padding: 10px 16px;
  border-radius: var(--rad-md); font-weight: 600; text-decoration: none;
  transition: top var(--dur-fast);
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid rgba(30,90,174,.45); outline-offset: 2px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-5); }

/* ---------- TOPBAR ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--ink-200);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); height: 68px; }
.brand { display: flex; align-items: center; gap: var(--sp-3); text-decoration: none; min-width: 0; }
.brand img { height: 42px; width: auto; flex-shrink: 0; }
.brand-text { line-height: 1.25; min-width: 0; }
.brand-text strong { display: block; font-size: 14px; font-weight: 800; color: var(--brand-900); letter-spacing: -.1px; }
.brand-text span { display: block; font-size: 11.5px; color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; align-items: center; gap: var(--sp-1); }
.nav a, .nav button.nav-link {
  white-space: nowrap;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-700);
  padding: 8px 14px; border-radius: var(--rad-full); text-decoration: none;
  background: none; border: 0; cursor: pointer; transition: background var(--dur-fast), color var(--dur-fast);
}
.nav a:hover, .nav button.nav-link:hover { background: var(--brand-100); color: var(--brand-700); }
.nav a[aria-current="page"] { color: var(--brand-700); background: var(--brand-100); }
.nav a.btn { margin-left: var(--sp-2); min-height: 40px; padding: 9px 18px; border-radius: var(--rad-md); }
.nav a.btn-primary { background: var(--brand-700); color: #fff; }
.nav a.btn-primary:hover { background: var(--brand-900); color: #fff; }

/* ---------- HERO ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(92,143,214,.45), transparent 60%),
    radial-gradient(600px 300px at 0% 110%, rgba(200,169,81,.20), transparent 60%),
    linear-gradient(160deg, var(--brand-900) 0%, var(--brand-700) 100%);
}
.hero::after { /* pola garis halus */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .06;
  background-image: repeating-linear-gradient(135deg, #fff 0 1px, transparent 1px 22px);
}
.hero-in {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--sp-10);
  align-items: center; padding: 72px var(--sp-5) 96px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #F3DFA3; background: rgba(200,169,81,.14); border: 1px solid rgba(200,169,81,.35);
  padding: 6px 14px; border-radius: var(--rad-full); margin-bottom: var(--sp-5);
}
.hero h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; margin-bottom: var(--sp-4); }
.hero h1 { text-wrap: balance; }
.hero h1 em { font-style: normal; color: #F3DFA3; }
.hero p.lead { font-size: 17px; line-height: 1.7; color: #CFE0F7; max-width: 520px; margin-bottom: var(--sp-8); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.btn-gold { background: var(--gold-500); color: var(--brand-900); }
.btn-gold:hover { background: #D9BC68; color: var(--brand-900); text-decoration: none; }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.3); }
.btn-ghost:hover { background: rgba(255,255,255,.16); color: #fff; text-decoration: none; }
.hero-facts { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); margin-top: var(--sp-8); font-size: 13.5px; color: #B9D0F0; }
.hero-facts span { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts i { color: #F3DFA3; }

.hero-art { position: relative; display: grid; place-items: center; }
.hero-art .mascot {
  width: min(280px, 70%); aspect-ratio: 2/3; object-fit: cover; border-radius: 28px;
  box-shadow: 0 30px 60px rgba(0,0,0,.35); border: 4px solid rgba(255,255,255,.9);
  transform: rotate(2deg);
}
.hero-art .chip {
  position: absolute; display: flex; align-items: center; gap: 10px;
  background: #fff; color: var(--ink-900); border-radius: var(--rad-lg);
  padding: 10px 14px; font-size: 13px; font-weight: 700; box-shadow: var(--shadow-lg);
}
.hero-art .chip i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; font-size: 16px; }
.hero-art .chip small { display: block; font-weight: 500; color: var(--ink-500); font-size: 11.5px; }
.chip-a { left: 0; top: 14%; } .chip-a i { background: var(--success-100); color: var(--success-600); }
.chip-b { right: 0; bottom: 12%; } .chip-b i { background: var(--info-100); color: var(--info-600); }

/* ---------- SERVICES (menimpa hero) ---------- */
.services { margin-top: -52px; position: relative; z-index: 2; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.service {
  display: flex; gap: var(--sp-4); align-items: flex-start; text-decoration: none;
  background: #fff; border: 1px solid var(--ink-200); border-radius: var(--rad-lg);
  padding: var(--sp-5); box-shadow: var(--shadow-md);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base), border-color var(--dur-base);
}
.service:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand-300); }
.service-ic { width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; font-size: 22px; color: #fff; }
.ic-blue { background: var(--brand-700); } .ic-gold { background: var(--gold-600); } .ic-green { background: #1F8A5F; }
.service h3 { font-size: 15.5px; font-weight: 700; color: var(--brand-900); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.service h3 i { font-size: 13px; color: var(--ink-400); transition: transform var(--dur-fast), color var(--dur-fast); }
.service:hover h3 i { transform: translateX(3px); color: var(--brand-500); }
.service p { font-size: 13.5px; line-height: 1.6; color: var(--ink-500); }

/* ---------- SECTIONS ---------- */
.section { padding: 72px 0 0; }
.section-head { max-width: 620px; margin-bottom: var(--sp-8); }
.section-head .kicker { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-600); margin-bottom: 8px; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; font-weight: 800; letter-spacing: -.015em; color: var(--brand-900); margin-bottom: 10px; }
.section-head p { font-size: 15.5px; line-height: 1.7; color: var(--ink-500); }

.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); counter-reset: s; list-style: none; }
.flow li {
  position: relative; background: #fff; border: 1px solid var(--ink-200); border-radius: var(--rad-lg);
  padding: var(--sp-6) var(--sp-5) var(--sp-5);
}
.flow li::before {
  counter-increment: s; content: counter(s);
  width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: var(--sp-4);
  border-radius: 50%; background: var(--brand-100); color: var(--brand-700); font-weight: 800; font-size: 15px;
}
.flow li:not(:last-child)::after {
  content: ''; position: absolute; top: 40px; left: calc(var(--sp-5) + 34px + 10px); right: calc(-1 * var(--sp-4) + 6px);
  border-top: 2px dashed var(--ink-300); z-index: 0;
}
.flow h3 { font-size: 15px; font-weight: 700; color: var(--brand-900); margin-bottom: 6px; }
.flow p { font-size: 13.5px; line-height: 1.65; color: var(--ink-500); }

.docs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); margin-top: var(--sp-8); }
.panel { background: #fff; border: 1px solid var(--ink-200); border-radius: var(--rad-lg); padding: var(--sp-6); }
.panel h3 { font-size: 16px; font-weight: 700; color: var(--brand-900); margin-bottom: var(--sp-4); display: flex; align-items: center; gap: 10px; }
.panel h3 i { color: var(--brand-500); }
.checklist { list-style: none; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; font-size: 14px; color: var(--ink-700); line-height: 1.5; }
.checklist li i { color: var(--success-600); margin-top: 2px; flex-shrink: 0; }
.panel .note { margin-top: var(--sp-4); padding: var(--sp-3) var(--sp-4); background: var(--gold-100); border-radius: var(--rad-md); font-size: 13px; color: #7A5E17; line-height: 1.6; }
.faq details { border-top: 1px solid var(--ink-200); padding: 12px 0; }
.faq details:first-of-type { border-top: 0; padding-top: 0; }
.faq summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-900); list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '\F282'; font-family: 'bootstrap-icons'; font-size: 12px; color: var(--ink-400); transition: transform var(--dur-fast); }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details p { margin-top: 8px; font-size: 13.5px; line-height: 1.7; color: var(--ink-500); }

/* ---------- FOOTER ---------- */
.site-footer { margin-top: 80px; background: var(--brand-900); color: #A9C2E4; font-size: 13px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4); padding-top: var(--sp-8); padding-bottom: var(--sp-8); line-height: 1.7; }
.site-footer strong { color: #fff; font-weight: 600; }
.site-footer .foot-brand { display: flex; align-items: center; gap: 12px; }
.site-footer .foot-brand img { height: 36px; background: #fff; border-radius: 8px; padding: 3px 6px; }

/* ---------- PANDUAN MODAL (dipakai beranda) ---------- */
.panduan-overlay { position: fixed; inset: 0; background: rgba(11,37,69,.6); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.panduan-overlay.show { display: flex; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.panduan-box { background: #fff; border-radius: var(--rad-xl); width: 100%; max-width: 580px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); overflow: hidden; animation: modalIn var(--dur-base) var(--ease-out); }
.panduan-head { background: linear-gradient(135deg, var(--brand-900), var(--brand-500)); color: #fff; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 3px solid var(--gold-500); }
.panduan-head-title { font-size: 16.5px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.panduan-head-sub { font-size: 12.5px; color: rgba(255,255,255,.75); margin-top: 2px; }
.panduan-close { background: rgba(255,255,255,.15); border: 0; color: #fff; width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 16px; display: grid; place-items: center; flex-shrink: 0; }
.panduan-close:hover { background: rgba(255,255,255,.25); }
.panduan-body { padding: 20px 24px; overflow-y: auto; flex: 1; }
.panduan-step { display: flex; gap: 14px; padding: 14px; background: var(--brand-50); border: 1px solid var(--ink-200); border-radius: var(--rad-md); margin-bottom: 10px; }
.panduan-step-num { flex-shrink: 0; width: 30px; height: 30px; background: var(--brand-700); color: #fff; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.panduan-step-content { flex: 1; min-width: 0; }
.panduan-step-title { font-size: 14px; font-weight: 700; color: var(--brand-900); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.panduan-step-title i { color: var(--brand-500); }
.panduan-step-desc { font-size: 13px; color: var(--ink-500); line-height: 1.65; }
.panduan-step-desc ul { margin: 4px 0 6px 18px; }
.panduan-step-desc strong { color: var(--brand-900); }
.panduan-step-desc code { background: var(--ink-100); padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.panduan-footer { padding: 14px 24px 20px; border-top: 1px solid var(--ink-200); display: flex; gap: 10px; }
.panduan-footer .btn { flex: 1; }
.panduan-footer .btn-primary { flex: 1.5; }

/* ---------- CEK STATUS ---------- */
.page-narrow { max-width: 680px; margin: 0 auto; width: 100%; padding: 40px var(--sp-5) 0; flex: 1; }
.crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--brand-700); text-decoration: none; margin-bottom: var(--sp-4); }
.crumb:hover { text-decoration: underline; }
.page-title { font-size: clamp(24px, 3.4vw, 30px); font-weight: 800; letter-spacing: -.015em; color: var(--brand-900); margin-bottom: 6px; }
.page-sub { font-size: 15px; color: var(--ink-500); line-height: 1.7; margin-bottom: var(--sp-6); }
.search-card { background: #fff; border: 1px solid var(--ink-200); border-radius: var(--rad-lg); padding: var(--sp-6); box-shadow: var(--shadow-sm); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; padding: 48px var(--sp-5) 80px; gap: var(--sp-8); }
  .hero-art { display: none; }
  .service-grid { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr 1fr; }
  .flow li::after { display: none; }
  .docs { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topbar-in { height: 60px; }
  .brand img { height: 36px; }
  .brand-text strong { font-size: 12px; line-height: 1.3; }
  .nav .hide-sm { display: none; }
  .nav .hide-sm { display: none; }
  .hero p.lead { font-size: 15.5px; }
  .hero-cta .btn { width: 100%; }
  .section { padding-top: 56px; }
  .flow { grid-template-columns: 1fr; }
  .services { margin-top: -40px; }
  .panduan-body { padding: 16px; }
  .panduan-footer { flex-direction: column-reverse; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* cek-status: cegah input mendorong tombol keluar kartu di layar sempit */
.search-card .input-ref { min-width: 0; }
.search-card .btn-cek { flex-shrink: 0; }
@media (max-width: 480px) { .search-card { padding: var(--sp-5) var(--sp-4); } .search-card .input-ref { padding-inline: 12px; } }
html, body.public { overflow-x: clip; }


/* ============================================================
   REFRESH HP: tab bar bawah, maskot mini, timeline, pita CTA
   ============================================================ */
.mascot-mini { display: none; }
.tabbar { display: none; }

/* latar section selang-seling + aksen emas pada panel */
.band-blue {
  margin-top: 72px; padding: 64px 0;
  background:
    radial-gradient(circle at 1px 1px, rgba(30,90,174,.10) 1px, transparent 0) 0 0 / 22px 22px,
    linear-gradient(180deg, var(--brand-100), #EEF4FC);
  border-block: 1px solid #DCE7F7;
}
.panel { border-top: 3px solid var(--gold-500); }

/* pita ajakan sebelum footer */
.cta-band {
  margin-top: 80px; color: #fff;
  background:
    radial-gradient(700px 260px at 90% 0%, rgba(92,143,214,.35), transparent 60%),
    linear-gradient(160deg, var(--brand-700), var(--brand-900));
  border-top: 3px solid var(--gold-500);
}
.cta-in { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-6); padding-top: 48px; padding-bottom: 48px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 800; letter-spacing: -.01em; margin-bottom: 6px; }
.cta-band p { color: #CFE0F7; font-size: 15px; line-height: 1.6; }
.cta-band + .site-footer { margin-top: 0; border-top: 1px solid rgba(255,255,255,.08); }

@media (max-width: 640px) {
  /* topbar ringkas: hanya logo + nama instansi (menu pindah ke tab bar) */
  .topbar .nav { display: none; }
  .brand-text strong { font-size: 12px; line-height: 1.25; }
  .brand-text span { display: block; font-size: 10.5px; margin-top: 1px; white-space: normal; }

  /* maskot kecil di hero (sejajar dengan label di atas judul) */
  .hero-in { position: relative; padding-bottom: 88px; }
  .mascot-mini {
    display: block; position: absolute; right: var(--sp-5); top: 30px;
    width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: 50% 52%;
    border: 3px solid var(--gold-500); box-shadow: 0 8px 20px rgba(0,0,0,.3); background: #A8672F;
  }
  .hero-facts { margin-top: var(--sp-6); }

  /* alur: timeline vertikal */
  .band-blue { margin-top: 56px; padding: 48px 0; }
  .flow { gap: 0; }
  .flow li { background: none; border: 0; padding: 0 0 26px 58px; min-height: 66px; }
  .flow li::before {
    position: absolute; left: 0; top: 0; margin: 0; width: 42px; height: 42px; font-size: 17px;
    background: var(--brand-700); color: #fff; box-shadow: 0 0 0 5px var(--brand-100);
  }
  .flow li:not(:last-child)::after {
    display: block; content: ''; position: absolute; left: 20px; top: 48px; bottom: 6px; right: auto;
    width: 2px; border: 0; background: linear-gradient(var(--brand-300), rgba(92,143,214,.15));
  }
  .flow h3 { font-size: 16px; padding-top: 8px; }

  .section { padding-top: 48px; }
  .band-blue + .section { padding-top: 32px; }
  .cta-band { margin-top: 56px; }
  .cta-in { padding-top: 36px; padding-bottom: 36px; }
  .cta-band .hero-cta .btn { width: 100%; }
  .site-footer { margin-bottom: 0; }

  /* tab bar */
  body.public:not(.no-tabbar) { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: rgba(255,255,255,.97); backdrop-filter: blur(10px);
    border-top: 1px solid var(--ink-200); box-shadow: 0 -6px 18px rgba(11,37,69,.08);
    padding-bottom: env(safe-area-inset-bottom);
  }
  body.public .tabbar a, .tabbar button {
    flex: 1; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font: inherit; font-size: 12px; font-weight: 600; color: var(--ink-500);
    background: none; border: 0; text-decoration: none; cursor: pointer; position: relative;
  }
  .tabbar i { font-size: 21px; }
  body.public .tabbar [aria-current="page"] { color: var(--brand-700); }
  .tabbar [aria-current="page"]::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold-500); }
  .panduan-overlay { z-index: 1000; }
  .skip-link { display: none; }
}

/* ============================================================
   CEK STATUS: kartu menimpa pita, legenda status, bantuan
   ============================================================ */
.page-narrow.overlap { padding-top: 0; margin-top: -64px; position: relative; z-index: 2; }
.search-card { box-shadow: 0 16px 40px rgba(11,37,69,.12), 0 4px 8px rgba(11,37,69,.04); }
.ref-label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-700); margin-bottom: 8px; }
.info-grid { display: grid; gap: var(--sp-4); margin-top: var(--sp-5); }
.info-card { background: #fff; border: 1px solid var(--ink-200); border-top: 3px solid var(--gold-500); border-radius: var(--rad-lg); padding: var(--sp-5); }
.info-card h2 { font-size: 15.5px; font-weight: 700; color: var(--brand-900); display: flex; align-items: center; gap: 10px; margin-bottom: var(--sp-4); }
.info-card h2 i { color: var(--brand-500); }
.legend { list-style: none; display: grid; gap: 14px; }
.legend li { display: flex; gap: 12px; align-items: flex-start; }
.legend strong { display: block; font-size: 14px; color: var(--ink-900); }
.legend p { font-size: 13.5px; line-height: 1.6; color: var(--ink-700); }
.lg { width: 36px; height: 36px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; font-size: 17px; }
.lg-pending { background: #FEF3C7; color: #92400E; }
.lg-proses  { background: #DBEAFE; color: #1E40AF; }
.lg-selesai { background: #D1FAE5; color: #065F46; }
.lg-tolak   { background: #FEE2E2; color: #991B1B; }
.info-card.help p { font-size: 14px; line-height: 1.7; color: var(--ink-700); margin-bottom: var(--sp-4); }
.help-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: var(--rad-md); background: #15803D; color: #fff !important; font-weight: 700; font-size: 14px; text-decoration: none; }
.help-btn:hover { background: #166534; }
@media (max-width: 640px) { .page-narrow.overlap { margin-top: -52px; } .info-card { padding: var(--sp-4); } }
