/* Madu Asli Hutan Sumatera — mobile-first. Palet dari brosur: hijau hutan, kuning madu, cokelat kayu.
   Tema terang default; gelap mengikuti perangkat, bisa dipaksa lewat html[data-theme]. */

:root {
  --bg: #fffaf0;
  --bg-alt: #f6efdc;
  --surface: #ffffff;
  --surface-2: #fbf3df;
  --text: #20301c;
  --muted: #5f6b57;
  --border: #e8dfc6;
  --forest: #1d4a25;
  --forest-2: #2f6d32;
  --leaf: #4f9a3a;
  --honey: #f6b81a;
  --honey-2: #ffd34d;
  --amber: #c9761a;
  --wood: #6b3f1d;
  --wood-2: #8a5426;
  --link: #2f6d32;
  --ok: #1f7a3d;
  --ok-bg: #e4f4e6;
  --warn: #9a5b00;
  --warn-bg: #fff1d1;
  --danger: #b42318;
  --danger-bg: #fdeceb;
  --pending: #6b5a2e;
  --pending-bg: #f3ecd9;
  --wa: #25d366;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(29, 74, 37, .06), 0 6px 20px rgba(29, 74, 37, .08);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f150e;
    --bg-alt: #141c12;
    --surface: #1a2418;
    --surface-2: #222e1f;
    --text: #eef3e6;
    --muted: #a9b59f;
    --border: #2d3a29;
    --link: #f6c54a;
    --ok: #6fd18e;
    --ok-bg: #133020;
    --warn: #f6c54a;
    --warn-bg: #33270f;
    --danger: #ff8a7d;
    --danger-bg: #3a1714;
    --pending: #d7c49a;
    --pending-bg: #2f2718;
    --shadow: none;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f150e;
  --bg-alt: #141c12;
  --surface: #1a2418;
  --surface-2: #222e1f;
  --text: #eef3e6;
  --muted: #a9b59f;
  --border: #2d3a29;
  --link: #f6c54a;
  --ok: #6fd18e;
  --ok-bg: #133020;
  --warn: #f6c54a;
  --warn-bg: #33270f;
  --danger: #ff8a7d;
  --danger-bg: #3a1714;
  --pending: #d7c49a;
  --pending-bg: #2f2718;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.6 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  /* footer selalu di dasar layar walau isi halaman pendek */
  min-height: 100vh; display: flex; flex-direction: column;
}
body > .footer { margin-top: auto; }

h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0 0 .8rem; }
a { color: var(--link); }
img { max-width: 100%; }

.script { font-family: "Kaushan Script", cursive; font-weight: 400; }
.display { font-family: "Lilita One", "Plus Jakarta Sans", sans-serif; font-weight: 400; letter-spacing: .01em; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; }
.muted { color: var(--muted); }
.fineprint { color: var(--muted); font-size: .8rem; margin-top: .75rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 640px; }

.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.icon.lg { width: 30px; height: 30px; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 1000;
  background: var(--forest); color: #fff7e0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 60px; padding-top: env(safe-area-inset-top);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.brand img { width: 38px; height: auto; flex: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand strong { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 1.02rem; letter-spacing: .02em; }
.brand small { font-family: "Kaushan Script", cursive; color: var(--honey-2); font-size: .85rem; }

.nav { display: none; gap: 18px; }
.nav a { color: #fff7e0; text-decoration: none; font-weight: 600; font-size: .9rem; }
.nav a:hover { color: var(--honey-2); }

.tools { display: flex; align-items: center; gap: 8px; flex: none; }
.lang-switch { display: flex; border: 1px solid rgba(255, 247, 224, .35); border-radius: 999px; overflow: hidden; }
.lang-switch button {
  min-width: 38px; min-height: 34px; border: 0; background: transparent; color: inherit; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: .78rem;
}
.lang-switch button[aria-pressed="true"] { background: var(--honey); color: #2a1d08; }
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255, 247, 224, .35);
  background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer;
}
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--honey); color: #2a1d08; text-decoration: none;
  font-family: inherit; font-weight: 800; font-size: .98rem;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .15);
}
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-outline { background: transparent; color: inherit; border: 2px solid currentColor; box-shadow: none; }
.btn-block { width: 100%; }
.btn-ghost { background: var(--surface-2); color: var(--text); box-shadow: none; border: 1px solid var(--border); }

/* ---------- landing: hero ---------- */

.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 214, 102, .35), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(79, 154, 58, .45), transparent 50%),
    linear-gradient(160deg, #2c6a2f 0%, #1d4a25 55%, #10301a 100%);
}
.hero::before {
  /* pola sarang lebah */
  content: ""; position: absolute; inset: 0; opacity: .08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0l28 16v32L28 64 0 48V16zM28 64l28 16v32L28 128 0 112V80z' fill='none' stroke='%23ffffff' stroke-width='2'/%3E%3C/svg%3E");
  background-size: 56px 97px;
}
.hero .wrap { position: relative; display: grid; gap: 20px; padding-top: 28px; padding-bottom: 36px; }
.hero-script { font-size: 2.6rem; line-height: 1; text-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.wood-sign {
  display: inline-block; margin: 6px 0 14px; padding: 10px 18px 6px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .06) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, var(--wood-2), var(--wood));
  border-radius: 10px; transform: rotate(-2deg);
  box-shadow: 0 6px 0 rgba(0, 0, 0, .25), inset 0 0 0 2px rgba(255, 255, 255, .08);
}
.wood-sign h1 {
  font-family: "Lilita One", sans-serif; font-weight: 400; color: var(--honey-2);
  font-size: 2.6rem; line-height: .95; text-transform: uppercase; text-shadow: 0 3px 0 rgba(0, 0, 0, .35);
}
.hero-slogan { font-family: "Kaushan Script", cursive; font-size: 1.35rem; margin-bottom: 14px; }
.sultan {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25);
  padding: 6px 14px; border-radius: 999px; font-weight: 700;
}
.sultan .script { color: var(--honey-2); font-size: 1.15rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-cta .btn-outline { color: #fff; }
.hero-photo { position: relative; justify-self: center; width: min(320px, 85%); }
.hero-photo img {
  display: block; width: 100%; border-radius: 22px; border: 4px solid rgba(255, 255, 255, .85);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}

/* ---------- landing: sections ---------- */

section.block { padding: 40px 0; }
section.block.alt { background: var(--bg-alt); }

.brush {
  display: inline-block; padding: 8px 18px; margin-bottom: 16px;
  background: var(--honey); color: #20301c; transform: rotate(-1.5deg);
  border-radius: 6px 18px 6px 18px;
  font-family: "Kaushan Script", cursive; font-size: 1.45rem; line-height: 1.25;
  box-shadow: 0 4px 0 rgba(201, 118, 26, .35);
}
.section-title { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 1.6rem; color: var(--forest-2); margin-bottom: 18px; }
:root[data-theme="dark"] .section-title { color: var(--honey-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .section-title { color: var(--honey-2); } }

.lead { font-size: 1.05rem; }

.benefits { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.benefits li {
  display: flex; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow);
}
.benefit-icon {
  width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--forest-2); color: #fff; border: 3px solid var(--honey);
}

.trust-card {
  position: relative; border-radius: var(--radius); padding: 22px 18px; color: #fff; overflow: hidden;
  background: linear-gradient(180deg, var(--wood-2), var(--wood));
  box-shadow: var(--shadow);
}
.trust-card h2 { font-family: "Kaushan Script", cursive; font-weight: 400; font-size: 1.6rem; color: #fff; margin-bottom: 8px; }

.steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; counter-reset: step; }
.steps li {
  position: relative; padding: 16px 16px 16px 66px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 14px; top: 14px; width: 38px; height: 42px;
  display: grid; place-items: center; color: #2a1d08; font-family: "Lilita One", sans-serif; font-size: 1.2rem;
  background: var(--honey); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.steps h3 { font-size: 1rem; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); font-size: .92rem; }

.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.features li { display: flex; gap: 10px; align-items: flex-start; }
.features li .icon { color: var(--leaf); margin-top: 2px; }

.order-band {
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 214, 102, .3), transparent 40%),
    linear-gradient(160deg, var(--forest-2), var(--forest));
  color: #fff; padding: 36px 0; text-align: center;
}
.order-band .spoon { font-family: "Kaushan Script", cursive; font-size: 1.45rem; margin-bottom: 18px; color: #fff7e0; }
.order-band .label { font-weight: 800; color: var(--honey-2); margin-bottom: 6px; }
.order-band .phone { font-family: "Lilita One", sans-serif; font-size: 2.2rem; letter-spacing: .03em; margin-bottom: 16px; }
.quality-seal {
  width: 116px; height: 116px; margin: 22px auto 0; border-radius: 50%;
  display: grid; place-items: center; text-align: center; padding: 14px;
  background: radial-gradient(circle, #4a2a12 60%, #2c180a);
  border: 4px solid var(--honey); color: var(--honey-2);
  font-family: "Lilita One", sans-serif; font-size: .92rem; line-height: 1.1;
}

/* ---------- footer ---------- */

.footer { background: #0f2614; color: #d6e3cf; padding: 26px 0 34px; text-align: center; font-size: .88rem; }
.footer .slogan { font-family: "Kaushan Script", cursive; font-size: 1.3rem; color: var(--honey-2); margin-bottom: 10px; }
.footer a { color: #fff7e0; }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 10px 0; }
.socials span { display: inline-flex; align-items: center; gap: 6px; }
.footer .made { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; opacity: .85; }
.footer .made img { width: 26px; }

/* ---------- verify page ---------- */

.banner { position: relative; height: 150px; overflow: hidden; background: var(--forest); }
.banner img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; display: block; opacity: .9; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(16, 48, 26, .65)); }
.banner .banner-text {
  position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 1; color: #fff;
  font-family: "Kaushan Script", cursive; font-size: 1.35rem; text-shadow: 0 2px 6px rgba(0, 0, 0, .5);
}

main.verify { display: flex; flex-direction: column; gap: 14px; padding: 18px 16px 28px; max-width: 640px; margin: 0 auto; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 16px;
}
.welcome h1 { font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 1.7rem; color: var(--forest-2); text-transform: uppercase; margin-bottom: 6px; }
:root[data-theme="dark"] .welcome h1 { color: var(--honey-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .welcome h1 { color: var(--honey-2); } }

.code-label { font-weight: 700; margin: 14px 0 6px; }
.code-box {
  display: block; width: 100%; padding: 14px; text-align: center;
  border: 2px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text);
  font: 700 1.3rem/1.2 ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .08em;
}
input.code-box:focus { outline: none; border-color: var(--honey); box-shadow: 0 0 0 3px rgba(246, 184, 26, .35); }
.code-hint { font-size: .82rem; color: var(--muted); margin: 6px 0 0; }
.code-error { font-size: .85rem; color: var(--danger); margin: 6px 0 0; min-height: 1.2em; }

/* slider "geser untuk verifikasi" */
.slider {
  position: relative; height: 60px; margin-top: 16px; border-radius: 14px; overflow: hidden;
  background: #fff3cd; border: 1px solid #f3dc92; touch-action: none; user-select: none; -webkit-user-select: none;
}
:root[data-theme="dark"] .slider { background: #33270f; border-color: #574217; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .slider { background: #33270f; border-color: #574217; } }
.slider-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--honey-2), var(--honey)); }
.slider-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-left: 56px;
  font-weight: 700; color: #6b5310; pointer-events: none;
}
:root[data-theme="dark"] .slider-label { color: #f3dc92; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .slider-label { color: #f3dc92; } }
.slider-handle {
  position: absolute; top: 4px; left: 4px; width: 52px; height: 52px; border-radius: 11px; border: 0;
  background: var(--honey); color: #2a1d08; display: grid; place-items: center; cursor: grab;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.slider-handle:focus-visible { outline: 3px solid var(--forest-2); outline-offset: 2px; }
.slider.dragging .slider-handle { cursor: grabbing; }
.slider.animate .slider-handle, .slider.animate .slider-fill { transition: all .25s ease; }
.slider.disabled { opacity: .5; pointer-events: none; }
.slider.done .slider-label { color: #2a1d08; }

.checking { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 40px 0; color: var(--muted); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--honey); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* hasil verifikasi */
.result { border-radius: var(--radius); padding: 20px 16px; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; }
.result h1 { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.result p { margin: 0 0 6px; color: var(--text); }
.result .code-line { font-size: .9rem; color: var(--muted); }
.result .result-mark { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; color: #fff; }
.result .result-mark .icon { width: 40px; height: 40px; stroke-width: 3; }
.result-ok { background: var(--ok-bg); color: var(--ok); }
.result-ok .result-mark { background: #5aa83a; }
.result-warn { background: var(--warn-bg); color: var(--warn); }
.result-warn .result-mark { background: #e39b16; }
.result-danger { background: var(--danger-bg); color: var(--danger); }
.result-danger .result-mark { background: #d64535; }
.result .btn { margin-top: 8px; grid-column: 1 / -1; }

.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--leaf); }
.section-head h2 { font-size: 1.1rem; color: var(--text); }
h3.sub { font-size: .95rem; margin: 16px 0 6px; }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 0 0 10px; }
.fact dt { font-size: .75rem; color: var(--muted); }
.fact dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: .9rem; margin-bottom: 10px; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-pending { background: var(--pending-bg); color: var(--pending); }

.lab-list { list-style: none; padding: 0; margin: 4px 0 0; }
.lab-row { display: grid; grid-template-columns: 1fr auto 26px; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); }
.lab-name strong, .lab-value strong { display: block; }
.lab-name span, .lab-value span { display: block; font-size: .78rem; color: var(--muted); }
.lab-value { text-align: right; white-space: nowrap; }
.lab-value small { font-weight: 500; color: var(--muted); }
.lab-row.pass .lab-mark { color: var(--ok); }
.lab-row.fail .lab-mark, .lab-row.fail .lab-value strong { color: var(--danger); }

.map { height: 210px; border-radius: 12px; border: 1px solid var(--border); margin: 8px 0; z-index: 0; }

.timeline { list-style: none; padding: 0; margin: 12px 0 0; }
.tl-item { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding-bottom: 18px; }
.tl-item::before { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: var(--border); }
.tl-item:last-child::before { display: none; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--forest-2); border: 2px solid var(--honey); }
:root[data-theme="dark"] .tl-dot { color: var(--honey-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tl-dot { color: var(--honey-2); } }
.tl-BUYER .tl-dot { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.tl-body p { margin: 0 0 2px; }
.tl-stage { font-weight: 700; }
.tl-time { font-size: .8rem; color: var(--muted); }
.tl-note { font-size: .9rem; margin-top: 4px !important; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--surface-2); border-radius: 12px; padding: 10px 6px; text-align: center; }
.stat b { display: block; font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.stat b.small { font-size: .85rem; line-height: 1.8; }
.stat span { font-size: .72rem; color: var(--muted); }
.stat-danger { background: var(--danger-bg); color: var(--danger); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 12px 0 0; }
.chip { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: .82rem; }
.scan-list { list-style: none; padding: 0; margin: 0; font-size: .85rem; }
.scan-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--border); }
.scan-list li span:last-child { color: var(--muted); text-align: right; }

.actions { display: grid; gap: 10px; }

/* ---------- admin ---------- */

.demo-grid { display: grid; gap: 14px; }
.demo-item { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; }
.demo-item .qr { width: 110px; height: 110px; background: #fff; border-radius: 10px; padding: 6px; border: 1px solid var(--border); }
.demo-item .qr img, .demo-item .qr svg { width: 100%; height: 100%; display: block; }
.demo-item h3 { font-size: .95rem; margin-bottom: 4px; }
.demo-item code { font-size: .95rem; letter-spacing: .04em; overflow-wrap: anywhere; }
.demo-item p { margin: 4px 0; font-size: .88rem; color: var(--muted); }

/* ---------- layar lebar ---------- */

@media (min-width: 760px) {
  .nav { display: flex; }
  .hero .wrap { grid-template-columns: 1.15fr .85fr; align-items: center; padding-top: 48px; padding-bottom: 60px; }
  .hero-script { font-size: 3.4rem; }
  .wood-sign h1 { font-size: 3.6rem; }
  .benefits { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
  .demo-grid { grid-template-columns: 1fr 1fr; }
}
