/* Situs publik (beranda, pemasangan, galat). Arah desain beranda ada di DESIGN.md.
   Mode: terang secara bawaan, gelap bila sistem gelap, atau sesuai pilihan di header (html[data-theme]). */
:root {
  color-scheme: light;
  --bg: #fbf9f3; --bg2: #f2ede1; --ink: #1f2a26; --muted: #5d6963; --primary: #0f4c3a; --on-primary: #fff;
  --accent: #c9a24b; --accent-text: #85600f; --card: #fff; --line: #e2dccb; --err: #8a1f1f; --ok: #17512a;
  --band: #0f4c3a; --band-ink: #fff; --bezel: #1b1b1a; --shadow: 0 18px 40px rgba(31, 42, 38, .18);
  --alert-bg: #fbe7e7; --alert-ink: #7a1d1d;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #101714; --bg2: #17211c; --ink: #ecefe9; --muted: #a3aea8; --primary: #4fbf97; --on-primary: #08130e;
    --accent: #d7b45e; --accent-text: #d7b45e; --card: #19231e; --line: #2a3630; --err: #f0a3a3; --ok: #8fd6a6;
    --band: #17211c; --band-ink: #ecefe9; --bezel: #050706; --shadow: 0 18px 40px rgba(0, 0, 0, .55);
    --alert-bg: #3a1f1f; --alert-ink: #f0a3a3;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101714; --bg2: #17211c; --ink: #ecefe9; --muted: #a3aea8; --primary: #4fbf97; --on-primary: #08130e;
  --accent: #d7b45e; --accent-text: #d7b45e; --card: #19231e; --line: #2a3630; --err: #f0a3a3; --ok: #8fd6a6;
  --band: #17211c; --band-ink: #ecefe9; --bezel: #050706; --shadow: 0 18px 40px rgba(0, 0, 0, .55);
  --alert-bg: #3a1f1f; --alert-ink: #f0a3a3;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 "Plus Jakarta Sans", system-ui, sans-serif; }
a { color: var(--primary); }
h1, h2, h3 { font-family: "Lora", Georgia, serif; font-weight: 500; line-height: 1.2; }
h1 { font-size: clamp(2rem, 6.4vw, 3.2rem); margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 4.4vw, 2.1rem); margin: 0 0 .7em; }
h3 { font-size: 1.15rem; margin: 0 0 .4em; }
section { max-width: 960px; margin: 0 auto; padding: 48px 20px; }
.narrow { max-width: 520px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 40rem; }
.center .lead { margin-inline: auto; }
.eyebrow { letter-spacing: .2em; text-transform: uppercase; font-size: .78rem; color: var(--accent-text); font-weight: 600; margin: 0 0 .6em; }
.arab { font-family: "Amiri", "Traditional Arabic", serif; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 10px; }

/* ---------- Header & footer ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px 22px; flex-wrap: wrap;
  padding: 10px 20px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 8px; font: 600 1.15rem "Lora", Georgia, serif; text-decoration: none; color: var(--primary); }
.brand-mark { width: 24px; height: 24px; color: var(--accent); stroke-width: 3; }
.site-header nav { display: flex; gap: 6px 20px; flex-wrap: wrap; margin-inline: auto 0; }
.site-header nav a { text-decoration: none; color: var(--ink); font-size: .93rem; padding: 6px 0; }
.site-header nav a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
.head-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.site-header nav + .head-tools { margin-left: 0; }
.theme-toggle {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink);
}
.theme-toggle:hover { border-color: var(--primary); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .ico-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ico-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .ico-sun { display: block; }
}
.site-footer { text-align: center; color: var(--muted); font-size: .88rem; padding: 28px 20px 36px; border-top: 1px solid var(--line); }
.site-footer p { margin: .2em 0; }

/* ---------- Tombol ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.center .actions { justify-content: center; }
.btn {
  display: inline-block; background: var(--primary); color: var(--on-primary); border: 1px solid var(--primary); border-radius: 12px;
  padding: 11px 22px; font: 600 .95rem "Plus Jakarta Sans", sans-serif; text-decoration: none; cursor: pointer; text-align: center;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.ghost:hover { background: var(--primary); color: var(--on-primary); }
.btn.small { padding: 7px 15px; font-size: .85rem; border-radius: 10px; }
.btn.big { padding: 14px 26px; font-size: 1rem; }
.btn.light { background: #fff; color: #0f4c3a; border-color: #fff; }
:root[data-theme="dark"] .btn.light { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.light { background: var(--primary); color: var(--on-primary); border-color: var(--primary); } }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button, summary, label[for], select { cursor: pointer; }

/* ---------- Beranda ---------- */
.hm-hero {
  position: relative; max-width: 1120px; display: grid; gap: 36px 56px; align-items: center; padding-top: 44px; padding-bottom: 36px; overflow-x: clip; overflow-y: visible;
}
.hm-khatam { position: absolute; right: -140px; top: 0; width: 560px; height: 560px; color: var(--accent); opacity: .4; stroke-width: .22; pointer-events: none; z-index: 0; }
.hm-hero > :not(.hm-khatam) { position: relative; z-index: 1; }
.hm-bism { font-size: 1.5rem; line-height: 1.8; color: var(--accent-text); margin: 0 0 .2em; text-align: left; }
.hm-hero .lead { margin: 0 0 1.4em; }
.btn.big + .btn.big { margin-left: 0; }
.hm-facts { list-style: none; margin: 26px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 26px; color: var(--muted); font-size: .92rem; }
.hm-facts b { color: var(--ink); font-weight: 700; }

.hm-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hm-phone { --s: .74; padding: 10px; background: var(--bezel); border-radius: 40px; box-shadow: var(--shadow); }
.hm-screen { width: calc(375px * var(--s)); height: calc(760px * var(--s)); border-radius: 30px; overflow: hidden; background: var(--bg2); }
.hm-screen iframe { width: 375px; height: 760px; border: 0; display: block; transform: scale(var(--s)); transform-origin: 0 0; background: var(--bg2); }
.hm-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 420px; }
.hm-picker.one { grid-template-columns: 1fr; max-width: 240px; }
.hm-field { display: grid; gap: 4px; font-size: .78rem; color: var(--muted); font-weight: 500; }

/* Dropdown kustom: select asli disembunyikan secara visual; daftar mengikuti palet situs dan mode terang/gelap */
.dd { position: relative; }
.dd-native { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.dd-btn, .dd-opt { font: 500 .86rem "Plus Jakarta Sans", system-ui, sans-serif; }
.dd-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 34px 9px 12px; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; background-color: var(--card); color: var(--ink);
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.dd-btn:hover, .dd-btn[aria-expanded="true"] { border-color: var(--primary); }
.dd-btn .dd-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-list {
  position: absolute; z-index: 60; left: 0; top: calc(100% + 6px); min-width: 100%; width: max-content; max-width: min(320px, 86vw);
  margin: 0; padding: 6px; list-style: none; max-height: 272px; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.dd.up .dd-list { top: auto; bottom: calc(100% + 6px); }
.hm-field:last-child .dd-list { left: auto; right: 0; }
.dd-list:focus { outline: none; }
.dd-list:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dd-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; color: var(--ink); }
.dd-opt.on { background: var(--bg2); }
.dd-opt[aria-selected="true"] { color: var(--primary); }
.dd-opt[aria-selected="true"]::after { content: "✓"; margin-left: auto; padding-left: 8px; font-weight: 700; }
.dd-txt { display: grid; gap: 1px; min-width: 0; }
.dd-desc { font-size: .74rem; font-weight: 400; color: var(--muted); line-height: 1.35; }
.dd-btn .dd-desc { display: none; }
.sw3 { display: inline-flex; flex: none; width: 36px; height: 18px; border-radius: 5px; overflow: hidden; border: 1px solid rgba(128, 128, 128, .45); }
.sw3 i { flex: 1; }
.sw3 i:first-child { flex: 2; }
.hm-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 420px; }
.hm-chips a { display: inline-flex; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-size: .86rem; font-weight: 500; }
.hm-cap { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; font-size: .9rem; color: var(--muted); }
.hm-cap b { color: var(--ink); }

.hm-sec { max-width: 1120px; padding-top: 64px; padding-bottom: 8px; }
.hm-sub { color: var(--muted); max-width: 38rem; margin: -.3em 0 1.6em; }

/* Alasan memilih: baris editorial, bukan kartu */
.hm-why h2 { max-width: 30rem; }
.hm-rows { margin: 0; border-top: 2px solid var(--ink); }
.hm-rows > div { display: grid; gap: 4px 40px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.hm-rows dt { font: 500 1.25rem "Lora", Georgia, serif; }
.hm-rows dd { margin: 0; color: var(--muted); }

/* Tema */
.hm-themes, .hm-packs { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }

.hm-theme { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; }
.hm-theme p:not(.actions) { color: var(--muted); font-size: .94rem; margin: 0 0 1em; flex: 1; }
.swatch { display: flex; height: 60px; border-radius: 10px; overflow: hidden; margin-bottom: 14px; border: 1px solid var(--line); }
.swatch span { flex: 1; }
.swatch span:first-child { flex: 2; }

/* Paket */
.hm-packs { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); max-width: 820px; }
.hm-pack { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.price { font: 500 2rem "Lora", Georgia, serif; color: var(--primary); margin: 0 0 .6em; }
.ticks { list-style: none; padding: 0; margin: 0 0 1.2em; }
.ticks li { padding-left: 1.5em; position: relative; margin-bottom: .35em; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-text); font-weight: 700; }

/* Cara pesan: empat langkah bersambung */
.hm-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: s; }
.hm-steps li { counter-increment: s; position: relative; padding: 0 0 26px 62px; display: grid; gap: 2px; }
.hm-steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 44px; height: 44px; display: grid; place-items: center;
  border: 1.5px solid var(--primary); border-radius: 12px; font: 500 1.35rem "Lora", Georgia, serif; color: var(--primary); background: var(--bg);
}
.hm-steps li::after { content: ""; position: absolute; left: 21px; top: 50px; bottom: 6px; width: 2px; background: var(--line); }
.hm-steps li:last-child::after { display: none; }
.hm-steps b { font-size: 1.05rem; padding-top: 8px; }
.hm-steps span { color: var(--muted); }

/* Tanya jawab */
.hm-qa { max-width: 760px; border-top: 2px solid var(--ink); }
.hm-qa details { border-bottom: 1px solid var(--line); }
.hm-qa summary { list-style: none; padding: 16px 36px 16px 0; font-weight: 600; position: relative; }
.hm-qa summary::-webkit-details-marker { display: none; }
.hm-qa summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 400 1.5rem "Plus Jakarta Sans", sans-serif; color: var(--primary); }
.hm-qa details[open] summary::after { content: "−"; }
.hm-qa p { margin: 0 0 18px; color: var(--muted); max-width: 40rem; }

/* Ajakan penutup */
.hm-band { max-width: none; margin: 64px 0 0; padding: 56px 20px; text-align: center; background: var(--band); color: var(--band-ink); }
.hm-band h2, .hm-band p { max-width: 36rem; margin-inline: auto; }
.hm-band p { margin-bottom: 1.2em; opacity: .92; }
.hm-band .actions { justify-content: center; }
.hm-bar { display: none; }

@media (min-width: 900px) {
  .hm-hero { grid-template-columns: 1.15fr .85fr; padding-top: 72px; padding-bottom: 56px; }
  .hm-phone { --s: .92; }
  .hm-khatam { right: 0; top: 0; width: 600px; height: 600px; }
  .hm-rows > div { grid-template-columns: 1fr 1.6fr; align-items: baseline; }
  .hm-steps { grid-template-columns: repeat(4, 1fr); gap: 22px; }
  .hm-steps li { padding: 62px 0 0; }
  .hm-steps li::after { left: 54px; right: -22px; top: 21px; bottom: auto; width: auto; height: 2px; }
  .hm-steps b { padding-top: 0; }
}
@media (max-width: 719px) {
  .site-header { padding: 8px 14px; }
  .site-header nav { order: 3; width: 100%; margin: 0; gap: 4px 16px; }
  .head-cta { display: none; }
  section { padding-left: 16px; padding-right: 16px; }
  .hm-hero .actions .btn { flex: 1 1 100%; }
  .hm-bar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: var(--bg); border-top: 1px solid var(--line);
  }
  .hm-bar .btn { display: block; width: 100%; }
  .site-footer { padding-bottom: 92px; }
}

/* ---------- Halaman lain yang memakai layout situs (pemasangan, galat) ---------- */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 4px; font-weight: 500; font-size: .92rem; }
.form fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 12px; }
.form legend { font-weight: 600; padding: 0 6px; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.alert { padding: 12px 14px; border-radius: 10px; margin: 0 0 16px; }
.alert.err { background: var(--alert-bg); color: var(--alert-ink); }
.alert ul { margin: 0; padding-left: 1.2em; }
code { background: var(--line); padding: 1px 6px; border-radius: 4px; }

/* Harga coret dan penanda paket (diatur admin di /admin/paket) */
.hm-pack { position: relative; }
.hm-pack.is-featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.pk-badge { position: absolute; top: -12px; left: 20px; margin: 0; padding: 2px 12px; border-radius: 999px; background: var(--primary); color: var(--on-primary, #fff); font-size: .78rem; font-weight: 600; }
.price-old { color: var(--muted); font: 400 1rem "Plus Jakarta Sans", system-ui, sans-serif; text-decoration-thickness: 1.5px; }
.pk-off { display: inline-block; padding: 1px 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 24%, transparent); color: var(--ink); font: 600 .76rem "Plus Jakarta Sans", system-ui, sans-serif; vertical-align: middle; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Pilihan tema: satu baris yang digeser ke samping, tiap kartu membawa cuplikan undangannya */
.hm-rail-tools { display: flex; gap: 8px; justify-content: flex-end; margin: -6px 0 10px; }
.hm-rail-tools .btn:disabled { opacity: .4; cursor: default; }
.hm-themes { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 14px; margin: 0 -16px; padding-inline: 16px; scrollbar-width: thin; overscroll-behavior-x: contain; }
.hm-themes:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.hm-theme { flex: 0 0 236px; scroll-snap-align: start; }
.hm-shot { position: relative; width: 200px; height: 356px; margin: 0 auto 14px; overflow: hidden; border-radius: 22px; border: 1px solid var(--line); background: var(--bg2); box-shadow: 0 8px 20px rgba(0, 0, 0, .12); }
.hm-shot iframe { position: absolute; left: 0; top: 0; width: 390px; height: 694px; border: 0; transform: scale(.5128); transform-origin: 0 0; pointer-events: none; background: #fff; }
.hm-theme .swatch { height: 12px; margin-bottom: 12px; }
@media (min-width: 1100px) { .hm-themes { margin: 0; padding-inline: 2px; } }.hm-themes { scroll-padding-inline: 16px; }


/* Contoh karakter: tiga pas foto bertumpuk, kartu tengah di atas dan dua lainnya miring di belakangnya */
.hm-chars dd p b { color: var(--ink); font-weight: 600; }
.pf-stack { --w: clamp(104px, 33vw, 150px); position: relative; width: calc(var(--w) * 2.15); height: calc(var(--w) * 1.62); margin: 8px 0 0 10px; padding: 0; list-style: none; }
.pf-stack li { position: absolute; top: 0; width: var(--w); }
.pf-stack li:nth-child(1) { left: 0; top: calc(var(--w) * .1); transform: rotate(-8deg); z-index: 1; }
.pf-stack li:nth-child(2) { left: calc(var(--w) * .52); z-index: 3; transform: rotate(1.5deg); }
.pf-stack li:nth-child(3) { left: calc(var(--w) * 1.05); top: calc(var(--w) * .1); transform: rotate(8deg); z-index: 2; }
.pf { width: 100%; margin: 0; padding: 6px 6px 22px; background: #fff; border-radius: 3px; box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 10px 20px rgba(0, 0, 0, .22); }
.pf-img { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--bg-photo); }
.pf-img img { position: absolute; left: 50%; bottom: 0; width: 108%; height: auto; transform: translateX(-50%); display: block; }
.pf.red { --bg-photo: #c9352b; } .pf.blue { --bg-photo: #2b5db3; } .pf.sky { --bg-photo: #5d8fcf; }
.pf-names { margin: 14px 0 0; font-size: .82rem; }
/* Baris tema: bilah gulir disembunyikan (ada tombol Sebelumnya/Berikutnya), kartu aktif lebih besar dari yang lain */
.hm-themes { scrollbar-width: none; -ms-overflow-style: none; padding-top: 18px; padding-bottom: 22px; align-items: stretch; }
.hm-themes::-webkit-scrollbar { display: none; }
.hm-themes::after { content: ""; flex: 0 0 calc(100% - 270px); }
.hm-theme { transform: scale(.9); opacity: .72; transition: transform .35s ease, opacity .35s ease, box-shadow .35s ease, border-color .35s ease; cursor: pointer; }
.hm-theme.is-active { transform: scale(1); opacity: 1; border-color: var(--accent); box-shadow: 0 12px 28px rgba(0, 0, 0, .16); cursor: auto; }
@media (min-width: 1100px) { .hm-themes::after { flex-basis: calc(100% - 270px); } }
/* Sorotan di tengah: kartu snap ke tengah dan ruang kiri/kanan diatur lewat JS */
.hm-themes { position: relative; scroll-snap-type: x mandatory; scroll-padding-inline: 0; }
.hm-themes::after { content: none; }
.hm-theme { scroll-snap-align: center; }
/* Seret dengan mouse di PC */
@media (hover: hover) and (pointer: fine) { .hm-themes { cursor: grab; } }
.hm-themes.is-dragging { cursor: grabbing; user-select: none; }
.hm-themes.is-dragging .hm-theme { cursor: grabbing; }