/* JualanInsight — arah orisinal "Pasar": kertas hangat, hijau daun,
   oranye, kuning. Judul serif Fraunces, struk belanja sebagai visual hero,
   kartu bergaris tebal dengan bayangan keras. Bukan tiruan web lain. */
:root {
  --bg: #fdf3e3; --surface: #fffdf7; --surface-2: #faf0dc;
  --ink: #1f2a1d; --ink-2: #3d4a38; --muted: #5a6852; --line: #e8dcc4;
  --hijau: #1e6b3a; --hijau-tua: #14532d; --hijau-tint: #e2f2e7;
  --oranye: #c2410c; --oranye-terang: #e8590c;
  --kuning: #ffc53d; --kuning-tint: #fff3c4;
  --merah: #b3261e; --merah-tint: #fbe9e7;
  --radius: 14px; --radius-kartu: 18px;
  --bayang: 0 12px 28px -14px rgba(31, 42, 29, .35);
  --bayang-keras: 6px 6px 0 rgba(31, 42, 29, .9);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: clip; }
::selection { background: var(--kuning); color: var(--ink); }
a { color: var(--hijau); text-decoration: none; }
a:hover { text-decoration: underline; }
a[href], button, select, summary { cursor: pointer; }
button:disabled, input:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--hijau); outline-offset: 2px; border-radius: 6px; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.serif { font-family: "Fraunces", Georgia, serif; }

/* ---------- progress + header ---------- */
#progress { position: fixed; inset: 0 auto auto 0; height: 4px; width: 0%; background: linear-gradient(90deg, var(--hijau), var(--oranye-terang)); z-index: 80; }
header { background: rgba(253, 243, 227, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--ink); border-bottom: 2px solid transparent; position: sticky; top: 0; z-index: 70; transition: border-color .3s, box-shadow .3s; }
header.scrolled { border-bottom-color: var(--ink); box-shadow: 0 8px 24px -16px rgba(31, 42, 29, .4); }
header .wrap { max-width: 1080px; margin: 0 auto; padding: 10px 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.logo { font-size: 1.25rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.logo .dotmark { width: 36px; height: 36px; border-radius: 10px; background: var(--hijau); color: #f3ead6; display: grid; place-items: center; font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: .8rem; flex: none; border: 2px solid var(--ink); }
.logo em { font-style: normal; color: var(--hijau); }
.logo:hover { text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: .95rem; }
nav a { color: var(--ink-2); padding: 8px 13px; border-radius: 999px; font-weight: 600; }
nav a:hover { color: var(--hijau); background: var(--hijau-tint); text-decoration: none; }
nav .nama { color: var(--ink); font-weight: 600; padding: 6px 8px; }
nav button.link { background: none; border: none; color: var(--merah); cursor: pointer; font: inherit; font-weight: 600; padding: 6px 8px; }
main { max-width: 1080px; margin: 0 auto; padding: 28px 20px 56px; }
footer { background: var(--ink); color: #f3ead6; margin-top: 32px; }
footer .foot { max-width: 1080px; margin: 0 auto; padding: 28px 20px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; font-size: .9rem; }
footer .foot a { color: #f3ead6; font-weight: 600; }
footer .foot a:hover { color: var(--kuning); }
footer .logo { color: #f3ead6; }
footer .logo em { color: var(--kuning); }
h1 { font-size: 1.9rem; margin: 0 0 10px; letter-spacing: -.02em; line-height: 1.25; font-weight: 800; }
h2 { font-size: 1.35rem; margin: 32px 0 12px; letter-spacing: -.01em; font-weight: 800; }
h3 { margin: 0 0 6px; font-weight: 700; }
.kartu { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-kartu); padding: 20px; margin-bottom: 16px; box-shadow: var(--bayang); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.grid-dua { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-dua .kartu { margin-bottom: 0; }
.grid .kartu { margin-bottom: 0; transition: transform .2s ease, box-shadow .2s ease; }
.grid .kartu:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -14px rgba(31, 42, 29, .4); }
.meta { color: var(--muted); font-size: .92rem; margin: 2px 0; }
.harga { font-size: 1.6rem; font-weight: 800; color: var(--hijau); margin: 10px 0 4px; letter-spacing: -.02em; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 6px; font-size: .8rem; font-weight: 700; }
.badge.baik { background: var(--hijau-tint); color: var(--hijau-tua); }
.badge.info { background: var(--kuning-tint); color: #7a5c06; }
.badge.peringatan { background: #fdeecd; color: #8a5a00; }
.badge.offline { background: var(--surface-2); color: var(--muted); }
.badge.online { background: var(--kuning-tint); color: #7a5c06; }
.badge.kategori { background: var(--surface-2); color: var(--muted); }
.badge.nonaktif { background: var(--surface-2); color: var(--muted); }
form.inline { display: inline; }
label { display: block; font-weight: 600; font-size: .92rem; margin: 14px 0 5px; }
input, select, textarea { width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius); font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--hijau); box-shadow: 0 0 0 3px rgba(30, 107, 58, .2); }
button, .btn { display: inline-flex; align-items: center; gap: 9px; background: var(--hijau); color: #f3ead6; border: 2px solid var(--ink); padding: 12px 24px; border-radius: var(--radius); font: inherit; font-weight: 700; cursor: pointer; min-height: 48px; box-shadow: 3px 3px 0 var(--ink); transition: transform .15s, box-shadow .15s, background .15s; }
button:hover, .btn:hover { background: var(--hijau-tua); transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); text-decoration: none; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 2px solid var(--ink); }
.btn.ghost:hover { border-color: var(--hijau); color: var(--hijau); background: var(--surface); }
.btn.kuning { background: var(--kuning); color: var(--ink); }
.btn.kuning:hover { background: #ffd45e; }
.btn.bahaya { background: var(--merah); }
.btn.bahaya:hover { background: #8f1d17; }
.btn.kecil { padding: 8px 16px; font-size: .9rem; min-height: 40px; }
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 16px; border: 2px solid transparent; }
.alert.sukses { background: var(--hijau-tint); color: var(--hijau-tua); border-color: #b7dcc2; }
.alert.error { background: var(--merah-tint); color: var(--merah); border-color: #f3c1bd; }
.alert.error ul { margin: 4px 0 0; }
.tabel-gulir { overflow-x: auto; }
.tabel-gulir table { margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:hover { background: var(--surface-2); }
thead th, th { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.stat { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat .kartu { text-align: center; margin: 0; }
.stat .angka { font-size: 1.7rem; font-weight: 800; color: var(--hijau); letter-spacing: -.02em; }
.stat .label { color: var(--muted); font-size: .85rem; }
.filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.filter label { margin: 0; }
.filter > div { flex: 1 1 160px; }
.chart { width: 100%; overflow-x: auto; }
.chart svg { display: block; min-width: 560px; }
.insight { border-left: 4px solid var(--hijau); }
.insight.baik { border-left-color: var(--hijau-tua); }
.insight.peringatan { border-left-color: var(--oranye); }
.insight h3 { margin: 8px 0 4px; font-size: 1.05rem; }
.insight .cara { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; }
.tabs a:hover { text-decoration: none; border-color: var(--hijau); color: var(--hijau); }
.tabs a.aktif { background: var(--hijau); color: #f3ead6; border-color: var(--ink); }

/* ---------- hero: struk belanja ---------- */
.hero { position: relative; padding: 60px 0 76px; margin: -28px -20px 0; padding-inline: 20px; background-image: radial-gradient(var(--line) 1.2px, transparent 1.2px); background-size: 22px 22px; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; max-width: 1080px; margin: 0 auto; }
.stiker { display: inline-block; background: var(--kuning); color: var(--ink); border: 2px solid var(--ink); border-radius: 8px; padding: 7px 14px; font-family: "JetBrains Mono", monospace; font-size: .82rem; font-weight: 700; letter-spacing: .06em; box-shadow: 3px 3px 0 var(--ink); transform: rotate(-2deg); }
.hero h1 { font-family: "Fraunces", Georgia, serif; font-size: clamp(2.5rem, 5.4vw, 3.9rem); line-height: 1.06; letter-spacing: -.01em; margin: 24px 0 6px; font-weight: 700; }
.hero h1 .hl { color: var(--hijau); font-style: italic; position: relative; white-space: nowrap; }
.hero h1 .hl svg { position: absolute; left: 0; right: 0; bottom: -8px; width: 100%; height: 10px; }
.hero h1 .hl svg path { stroke: var(--oranye-terang); stroke-width: 4; fill: none; stroke-linecap: round; stroke-dasharray: 320; stroke-dashoffset: 320; animation: gambar 1s .7s ease forwards; }
@keyframes gambar { to { stroke-dashoffset: 0; } }
.hero-desc { color: var(--ink-2); font-size: 1.08rem; max-width: 34rem; margin: 20px 0 0; }
.hero-desc strong { color: var(--ink); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .meta { margin-top: 18px; }
.papan { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.papan span { font-family: "JetBrains Mono", monospace; font-size: .8rem; font-weight: 700; background: var(--surface); border: 2px solid var(--ink); border-radius: 8px; padding: 7px 12px; box-shadow: 3px 3px 0 var(--ink); }
.papan span b { color: var(--hijau); }
.struk-wrap { position: relative; justify-self: end; width: min(400px, 100%); }
.polaroid { position: absolute; top: -46px; right: -14px; width: 168px; background: #fff; border: 2px solid var(--ink); padding: 8px 8px 26px; transform: rotate(5deg); box-shadow: var(--bayang); z-index: 0; }
.polaroid img { width: 100%; height: 118px; object-fit: cover; display: block; }
.polaroid figcaption { font-family: "JetBrains Mono", monospace; font-size: .68rem; color: var(--muted); margin-top: 6px; text-align: center; }
.struk { position: relative; z-index: 1; background: var(--surface); border: 2px solid var(--ink); padding: 24px 22px 28px; font-family: "JetBrains Mono", monospace; transform: rotate(1.2deg); box-shadow: 8px 8px 0 rgba(31, 42, 29, .16); }
.struk::after { content: ""; position: absolute; left: -2px; right: -2px; bottom: -12px; height: 12px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12' viewBox='0 0 16 12'%3E%3Cpath d='M0 0 L8 12 L16 0 Z' fill='%23fffdf7'/%3E%3C/svg%3E"); background-repeat: repeat-x; background-size: 16px 12px; }
.struk-head { text-align: center; border-bottom: 2px dashed var(--line); padding-bottom: 14px; margin-bottom: 14px; }
.struk-head b { font-size: 1.05rem; letter-spacing: .08em; }
.struk-head p { margin: 4px 0 0; font-size: .78rem; color: var(--muted); }
.struk-item { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; opacity: 0; animation: cetak .45s ease forwards; }
.struk-item:nth-child(1) { animation-delay: .25s; }
.struk-item:nth-child(2) { animation-delay: .5s; }
.struk-item:nth-child(3) { animation-delay: .75s; }
.struk-item .harga-struk { font-weight: 700; white-space: nowrap; }
@keyframes cetak { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.struk-total { display: flex; justify-content: space-between; padding: 12px 0 4px; font-weight: 700; font-size: 1rem; animation: cetak .45s ease 1s forwards; opacity: 0; }
.struk-total span:last-child { color: var(--hijau); }
.struk-foot { text-align: center; font-size: .78rem; color: var(--muted); margin-top: 14px; }
.cap-lunas { position: absolute; right: -10px; bottom: -16px; z-index: 2; font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 1.05rem; letter-spacing: .18em; color: var(--oranye); border: 3px solid var(--oranye); border-radius: 8px; padding: 5px 14px; transform: rotate(-10deg); opacity: 0; animation: cap .3s ease 1.35s forwards; background: rgba(255, 253, 247, .92); box-shadow: 3px 3px 0 rgba(31, 42, 29, .25); }
@keyframes cap { 0% { opacity: 0; transform: rotate(-10deg) scale(1.6); } 60% { opacity: 1; transform: rotate(-10deg) scale(.94); } 100% { opacity: 1; transform: rotate(-10deg) scale(1); } }
.kredit-foto { font-size: .78rem; color: var(--muted); margin: 18px 0 0; text-align: right; }

/* ---------- pita harga berjalan ---------- */
.pita { background: var(--hijau-tua); color: #f3ead6; overflow: hidden; padding: 14px 0; transform: rotate(-1deg) scale(1.02); margin: 44px -8px 0; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.pita-track { display: flex; gap: 0; width: max-content; animation: jalan 32s linear infinite; }
.pita:hover .pita-track { animation-play-state: paused; }
.pita-track span { font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: .9rem; letter-spacing: .1em; padding: 0 16px; white-space: nowrap; display: flex; align-items: center; gap: 32px; }
.pita-track b { color: var(--kuning); font-weight: 400; }
@keyframes jalan { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: 72px 0 8px; }
.sec-head { max-width: 44rem; margin-bottom: 44px; }
.sec-tag { font-family: "JetBrains Mono", monospace; font-size: .8rem; font-weight: 700; letter-spacing: .12em; color: var(--oranye); text-transform: uppercase; display: inline-flex; align-items: center; gap: 10px; }
.sec-tag::before { content: ""; width: 9px; height: 9px; background: var(--oranye); border-radius: 2px; }
.section h2 { font-family: "Fraunces", Georgia, serif; font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -.01em; line-height: 1.12; margin: 12px 0 10px; font-weight: 700; }
.section h2 .hl { color: var(--hijau); font-style: italic; }
.sec-head p { color: var(--muted); margin: 0; font-size: 1.02rem; }
.kartu.unggulan { border: 3px solid var(--hijau); }
.label-pro { display: inline-block; background: var(--hijau); color: #f3ead6; font-family: "JetBrains Mono", monospace; font-size: .75rem; font-weight: 700; letter-spacing: .14em; padding: 4px 10px; border-radius: 6px; margin-bottom: 10px; }
.keras { border: 2px solid var(--ink); box-shadow: var(--bayang-keras); transition: transform .2s ease, box-shadow .2s ease; }
.keras:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 rgba(31, 42, 29, .9); }
.daftar { margin: 0 0 16px; padding: 0; list-style: none; }
.daftar li { padding: 14px 4px; border-bottom: 1px solid var(--line); }
.daftar li:last-child { border-bottom: none; }
.daftar h3 { margin: 0 0 4px; }
.daftar p { margin: 0; color: var(--muted); }
.fitur-utama { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.fitur-utama .kartu:first-child { grid-column: 1 / -1; }
.tiket-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tiket { position: relative; }
.tiket .nomor { font-family: "JetBrains Mono", monospace; font-size: .85rem; font-weight: 700; color: var(--hijau); letter-spacing: .1em; display: block; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 2px dashed var(--line); }
.cta-band { background: var(--hijau-tua); color: #f3ead6; border: 2px solid var(--ink); border-radius: 26px; padding: 56px 40px; margin: 56px 0 8px; text-align: center; box-shadow: var(--bayang-keras); }
.cta-band h2 { font-family: "Fraunces", Georgia, serif; font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -.01em; margin: 0 0 10px; color: #f3ead6; font-weight: 700; }
.cta-band h2 em { color: var(--kuning); font-style: italic; }
.cta-band p { color: #d8e8d5; margin: 0 0 28px; }

/* ---------- reveal + loading ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .3, 1); }
.js .reveal.terlihat { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: .08s; }
.js .reveal[data-delay="2"] { transition-delay: .16s; }
.js .reveal[data-delay="3"] { transition-delay: .24s; }
#memuat { position: fixed; top: 0; left: 0; height: 4px; width: 0; background: linear-gradient(90deg, var(--hijau), var(--oranye-terang)); z-index: 90; transition: width .5s ease; }
#memuat.aktif { width: 70%; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal, .struk-item, .struk-total, .cap-lunas { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 72px; }
  .struk-wrap { justify-self: center; }
  .tiket-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  h1 { font-size: 1.5rem; }
  .hero { padding: 40px 0 64px; }
  .hero h1 { font-size: 2.1rem; }
  .fitur-utama { grid-template-columns: 1fr; }
  .grid-dua { grid-template-columns: 1fr; }
  .cap-lunas { right: 6px; }
  .polaroid { display: none; }
  .pita { transform: rotate(-1.4deg) scale(1.04); }
  table { font-size: .85rem; }
  .stat .angka { font-size: 1.35rem; }
  .cta-band { padding: 40px 24px; }
}

/* Ikon mata untuk menampilkan/menyembunyikan password (login/daftar). */
.bidang-password { position: relative; }
.bidang-password input { padding-right: 48px; }
.lihat-password {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; min-height: 0; padding: 6px;
  display: grid; place-items: center;
  background: transparent; border: none; border-radius: 8px;
  color: var(--muted); box-shadow: none;
}
.lihat-password:hover { background: var(--hijau-tint); color: var(--hijau); transform: translateY(-50%); box-shadow: none; }
.lihat-password svg { width: 20px; height: 20px; }
.lihat-password .ikon-tutup { display: none; }
.lihat-password.aktif .ikon-tutup { display: block; }
.lihat-password.aktif .ikon-buka { display: none; }
