/* Token: lihat DESIGN.md */
:root {
  --ink: #111827;
  --paper: #ffffff;
  --bg: #f7f3ea;         /* krem, latar halaman */
  --brand: #ffb170;      /* oranye utama. Teks di atasnya selalu tinta (7:1), bukan putih */
  --brand-text: #c2410c; /* oranye tua untuk teks di atas krem/putih (4.7:1) */
  --soft: #ffeedd;       /* oranye muda untuk panel */
  --accent: #ffc83d;     /* kuning amber: badge status */
  --muted: #4b5563;
  --line: 2.5px solid var(--ink);
  --hard: 5px 5px 0 var(--ink);
  --font: "Poppins", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; }
img, video { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); line-height: 1.2; font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
section { margin: 72px 0; }
.sub { color: var(--muted); margin-top: 8px; max-width: 56ch; }

.draft { background: var(--ink); color: #fff; text-align: center; font-size: .85rem; padding: 6px 16px; }

/* Nav */
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-block: 16px; }
.brand span { color: var(--brand-text); }
.brand { font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em; text-decoration: none; margin-right: auto; }
.nav-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-weight: 600; padding: 12px 0; display: inline-block; }
.nav-links a:hover { text-decoration: underline; }

/* Tombol */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px;
  font: inherit; font-weight: 700; text-decoration: none; color: var(--ink); background: var(--paper);
  border: var(--line); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink); cursor: pointer;
  transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.btn-primary { background: var(--brand); }
.hero .btn-primary, .cta .btn-primary { background: var(--ink); color: #fff; } /* di atas panel oranye, tombol utama jadi gelap */

/* Panel utama */
.panel { border: var(--line); border-radius: 24px; box-shadow: var(--hard); padding: clamp(24px, 5vw, 56px); }
.hero { background: var(--brand); display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin-top: 8px; }
.hero p { margin: 16px 0 28px; font-size: 1.1rem; max-width: 46ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Placeholder jujur: garis putus-putus, bukan disamarkan sebagai konten final */
.ph { display: grid; place-items: center; text-align: center; padding: 12px; aspect-ratio: 16 / 9;
  border: 2px dashed var(--ink); border-radius: 16px; background: var(--paper); font-weight: 700; font-size: .9rem; }

/* Jenis video */
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 20px 0 0; }
.chips li { border: var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: .95rem; }

/* Paket */
.pricing { background: var(--soft); display: grid; grid-template-columns: 1fr 2fr; gap: 40px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.plan { background: var(--paper); border: var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.plan .price { font-size: 1.4rem; font-weight: 800; }
.plan .btn { margin-top: auto; }

/* Cara pesan */
.how { display: grid; grid-template-columns: 3fr 2fr; gap: 40px; align-items: start; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 24px 0 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 16px 0; border-top: var(--line); }
.steps li::before { content: counter(s, decimal-leading-zero); font-weight: 800; font-size: 1.4rem; }
.contact { border: var(--line); border-radius: 16px; padding: 24px; }
.contact p { margin: 8px 0 20px; color: var(--muted); }

/* Halaman Karya, Paket, Cara pesan */
.nav-links a[aria-current] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
main > section:first-child { margin-top: 24px; }
.scroller { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  margin-top: 24px; padding: 4px 4px 16px; }
.scroller { max-width: 880px; margin-inline: auto; scrollbar-width: none; }
.scroller figure { flex: 0 0 100%; margin: 0; scroll-snap-align: start; scroll-snap-stop: always; } /* satu video per bingkai */
.hitung { font-weight: 700; min-width: 4ch; text-align: center; align-self: center; }
video[data-auto] { width: 100%; aspect-ratio: 16 / 9; border: var(--line); border-radius: 16px; background: var(--ink); }
.scroller figcaption { margin-top: 10px; font-weight: 700; }
.cta { background: var(--brand); display: grid; gap: 20px; }
.pricing-page { background: var(--soft); }
.pricing-page .plans { margin-top: 28px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.plan h2 { font-size: 1.2rem; }
.plan ul { margin: 0 0 12px; padding-left: 20px; }
.terms dl { margin: 20px 0 0; display: grid; grid-template-columns: minmax(140px, 1fr) 2fr; gap: 12px 24px; }
.terms dt { font-weight: 700; }
.terms dd { margin: 0; }
.faq { margin-top: 20px; border-bottom: var(--line); }
.faq details { border-top: var(--line); }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; min-height: 44px; }
.faq details p { padding: 0 0 16px; max-width: 65ch; }
@media (max-width: 760px) { .terms dl { grid-template-columns: 1fr; gap: 4px; } .terms dd { margin-bottom: 12px; } }
@media (prefers-reduced-motion: reduce) { .scroller { scroll-behavior: auto; } }

/* Halaman aplikasi: login, order, bayar, dashboard, admin */
[hidden] { display: none !important; }
.narrow { max-width: 720px; padding-bottom: 72px; }
.narrow > h1, .head-row h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
.head-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.akun { display: flex; gap: 20px; align-items: center; font-weight: 600; }
.linklike { font: inherit; font-weight: 600; color: inherit; background: none; border: 0; padding: 12px 0; min-height: 44px;
  text-decoration: underline; cursor: pointer; }
.card-form, .card-form form { display: grid; gap: 18px; justify-items: start; }
.card-form { margin-top: 24px; background: var(--paper); }
.card-form .field, .card-form fieldset, .card-form form, #google { width: 100%; }
.card-form h1 { font-size: 1.8rem; }
.field { display: grid; gap: 6px; }
.field label, legend { font-weight: 700; }
input:not([type=radio]), textarea, select { font: inherit; color: inherit; width: 100%; min-height: 48px; padding: 10px 12px;
  border: var(--line); border-radius: 12px; background: var(--paper); }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
#paket-list { display: grid; gap: 10px; }
.opsi { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: var(--line); border-radius: 12px; cursor: pointer; }
.opsi:has(:checked) { background: var(--soft); }
.opsi input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--ink); }
.opsi small { display: block; color: var(--muted); font-size: .9rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: 3px 3px 0 var(--ink); }
.state { color: var(--muted); min-height: 1.6em; }
.state.err { color: #a3162a; font-weight: 600; } /* 7.4:1 di atas putih */
.total { font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 800; }
.pay { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.pay h2 { font-size: 1.1rem; margin-bottom: 10px; }
.qris { width: 100%; max-width: 320px; height: auto; border: var(--line); border-radius: 16px; }
.orders { display: grid; gap: 16px; margin-top: 24px; }
.order, .contact { background: var(--paper); }
.order { display: grid; gap: 10px; justify-items: start; border: var(--line); border-radius: 16px; padding: 20px; }
.order .field { width: 100%; }
.order-top { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; width: 100%; }
.order h2 { font-size: 1.15rem; }
.order .sub { margin: 0; }
.brief { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Badge = status pesanan yang nyata, bukan dekorasi */
.badge { border: var(--line); border-radius: 999px; padding: 2px 12px; font-size: .85rem; font-weight: 700; }
.badge.menunggu_pembayaran, .badge.ditolak { background: var(--accent); }
.badge.selesai { background: var(--soft); }
@media (max-width: 760px) { .pay { grid-template-columns: 1fr; } }

footer { background: var(--soft); border-top: var(--line); margin-top: 72px; padding: 28px 0; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; font-size: .95rem; }

@media (max-width: 760px) {
  section { margin: 48px 0; }
  .hero, .pricing, .how { grid-template-columns: 1fr; gap: 24px; }
  .nav nav { order: 3; width: 100%; }
  .nav { row-gap: 0; }
  .panel { box-shadow: 3px 3px 0 var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Variasi warna: empat warna lembut pendamping oranye, dipakai bergiliran.
   Semuanya terang, jadi teks tinta di atasnya tetap terbaca jelas (di atas 10:1). */
:root {
  --butter: #ffe9a8;
  --coral: #ffd0c2;
  --sage: #d3ebca;
  --sky: #d2e6f7;
}
.chips li:nth-child(4n+1), .plan:nth-child(4n+1) { background: var(--butter); }
.chips li:nth-child(4n+2), .plan:nth-child(4n+2) { background: var(--coral); }
.chips li:nth-child(4n+3), .plan:nth-child(4n+3) { background: var(--sage); }
.chips li:nth-child(4n+4), .plan:nth-child(4n+4) { background: var(--sky); }
.plan .btn-primary { background: var(--paper); }   /* kartu sudah berwarna, tombolnya putih */
.cta { background: var(--sage); }
.contact { background: var(--sky); }
.opsi:has(:checked) { background: var(--sage); }
.badge.selesai { background: var(--sage); }
.badge.dikerjakan { background: var(--sky); }
.badge.menunggu_verifikasi { background: var(--butter); }
.badge.menunggu_pembayaran, .badge.ditolak { background: var(--coral); }
footer { background: var(--butter); }

/* Timer bayar dan status batal */
.timer { font-weight: 600; background: var(--coral); border: var(--line); border-radius: 12px; padding: 8px 14px; display: inline-block; margin-top: 12px; }
.timer strong { font-variant-numeric: tabular-nums; font-size: 1.15rem; }
.badge.batal, .badge.kedaluwarsa { background: #e5e7eb; }

/* Admin kelola paket */
#kelola-paket { margin: 24px 0 56px; }
.cek { display: flex; gap: 10px; align-items: center; font-weight: 600; min-height: 44px; cursor: pointer; }
.cek input { width: 20px; height: 20px; accent-color: var(--ink); }
.order.nonaktif { background: #eceae4; border-style: dashed; }

/* Tanya jawab */
.mt { margin-top: 48px; }
#kelola-tanya { margin: 24px 0 56px; }
.jawaban { background: var(--sage); border: var(--line); border-radius: 12px; padding: 12px 16px; width: 100%; }

.center { display: flex; justify-content: center; margin-top: 20px; }
