/* Mas Raden · Kliker Khatulistiwa
   Palet: biru-hijau Sungai Kapuas, emas garis khatulistiwa, krem kertas. Huruf: Fredoka (judul), Plus Jakarta Sans (teks). */
:root {
  --river: #0e4f5c; --river-2: #0a3a44; --gold: #f2b134; --gold-2: #d99a1c; --cream: #fbf6ec; --paper: #fffdf8;
  --ink: #1d1b17; --muted: #6a6458; --line: #e7dfcf; --green: #128150; --wa: #1fa855; --red: #c8322b;
  --display: "Fredoka", "Trebuchet MS", system-ui, sans-serif; --body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 16px;
}
* { box-sizing: border-box }
[hidden] { display: none !important }
html { scroll-behavior: smooth; scroll-padding-top: 76px }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased }
img { max-width: 100%; height: auto; display: block }
a { color: inherit }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)) }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; margin: 0; text-wrap: balance }
button { font: inherit; color: inherit }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px }

/* tombol */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 13px 22px; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .15s, filter .15s }
.btn:hover { transform: translateY(-1px); filter: brightness(1.05) }
.btn-gold { background: var(--gold); color: var(--river-2) }
.btn-wa { background: var(--wa); color: #fff }
.btn-wa.small { padding: 9px 16px; font-size: 14px }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink) }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--river) 96%, transparent); color: #fff; backdrop-filter: blur(8px) }
.top-in { display: flex; align-items: center; gap: 20px; min-height: 64px }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none }
.hexlogo { width: 32px; height: 37px; flex: none }
.brand b { font-family: var(--display); font-size: 20px; font-weight: 600; display: block; line-height: 1 }
.brand small { font-size: 12px; opacity: .75 }
.nav { display: flex; gap: 18px; margin-left: auto; font-size: 14px; font-weight: 600 }
.nav a { text-decoration: none; opacity: .85 } .nav a:hover { opacity: 1 }
@media (max-width: 760px) { .nav { display: none } .top-in { justify-content: space-between } }

/* hero */
.hero { background: var(--river); color: #fff; overflow: hidden; position: relative }
.hero::after { content: ""; position: absolute; left: 0; right: 0; top: 52%; height: 2px; background: repeating-linear-gradient(90deg, var(--gold) 0 14px, transparent 14px 24px); opacity: .35 }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: 24px; padding-block: 48px 40px; position: relative; z-index: 1 }
.eyebrow { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; color: var(--gold); margin: 0 0 12px }
.hero h1 { font-size: clamp(36px, 5.6vw, 64px) }
.hero h1 span { color: var(--gold) }
.lead { font-size: 18px; max-width: 46ch; opacity: .9; margin: 16px 0 24px }
.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap }
.from { opacity: .85 } .from b { color: var(--gold) }
.hero-img { filter: drop-shadow(0 30px 40px rgba(0,0,0,.35)) }
@media (max-width: 860px) { .hero-in { grid-template-columns: 1fr; padding-top: 32px } }

/* section head */
section { padding-block: 56px }
.sec-head { margin-bottom: 24px; max-width: 70ch } .sec-head h2 { font-size: clamp(28px, 3.6vw, 40px) } .sec-head p { color: var(--muted); margin: 8px 0 0 }

/* studio: kiri ikon & charm | tengah pratinjau 3D | kanan warna & pesanan */
.studio-sec { padding-block: 28px 56px; background: linear-gradient(var(--cream), #f4ecdc) }
.studio-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px }
.studio-head h2 { font-size: clamp(28px, 3.4vw, 38px) } .studio-head p { margin: 6px 0 0; color: var(--muted); max-width: 62ch }
.mode-tabs { display: inline-grid; grid-template-columns: 1fr 1fr; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px }
.mode-tabs button { border: 0; background: transparent; border-radius: 999px; padding: 9px 18px; font-weight: 700; cursor: pointer; white-space: nowrap }
.mode-tabs button[aria-selected="true"] { background: var(--river); color: #fff }
.studio { max-width: 1480px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right));
  display: grid; grid-template-columns: 290px minmax(0, 1fr) 320px; grid-template-areas: "left center right"; gap: 16px; align-items: stretch;
  height: max(560px, calc(100vh - 210px)) }
.side { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow-y: auto; overscroll-behavior: contain; padding: 16px; display: flex; flex-direction: column; gap: 22px; min-width: 0; scrollbar-width: thin }
.side-left { grid-area: left } .side-right { grid-area: right }
.grp { display: grid; gap: 10px }
.grp-t { font-family: var(--body); font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--river); display: flex; justify-content: space-between; align-items: baseline; gap: 8px }
.grp-t small { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted) }
.help { margin: 0; font-size: 13px; color: var(--muted) }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0) }

.center { grid-area: center; display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0 }
.name-bar { position: relative }
#nameInput { width: 100%; font-family: var(--display); font-size: clamp(26px, 3vw, 36px); font-weight: 600; letter-spacing: .22em; text-align: center; text-transform: uppercase;
  padding: 10px 64px; border: 2px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); box-shadow: 0 2px 0 rgba(0,0,0,.03) }
#nameInput:focus { border-color: var(--river); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--river) 14%, transparent) }
#nameInput::placeholder { color: #cdc3b0; letter-spacing: .12em }
.count { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums }
.center-help { text-align: center }
.stage { position: relative; flex: 1; min-height: 320px; background: radial-gradient(110% 85% at 50% 22%, #ffffff, #efe5d1 70%, #e6d9bf); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab }
#c.on-key { cursor: pointer } #c:active { cursor: grabbing }
.stage-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; pointer-events: none }
.badge { background: var(--river); color: #fff; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; pointer-events: auto; font-variant-numeric: tabular-nums }
.stage-btns { display: flex; gap: 6px; pointer-events: auto; flex-wrap: wrap }
.stage-btns button { background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; cursor: pointer }
.stage-btns button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold) }
.press-hint { position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; padding: 8px 14px; border-radius: 999px; display: flex; align-items: center; gap: 8px; white-space: nowrap; transition: opacity .4s; pointer-events: none }
.press-hint .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); animation: pulse 1.2s infinite }
.press-hint.gone { opacity: 0 }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1 } 50% { transform: scale(1.6); opacity: .4 } }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 700; background: rgba(255,253,248,.6); transition: opacity .25s }
.loading.off { opacity: 0; pointer-events: none }
.stage-foot { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--muted); margin: 0; pointer-events: none }

.icons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px }
.ic { position: relative; border: 2px solid transparent; border-radius: 12px; background: var(--cream); padding: 4px 4px 6px; cursor: pointer; text-align: center; display: grid; gap: 2px; transition: border-color .15s, transform .15s }
.ic:hover { transform: translateY(-2px) }
.ic img, .ic-relief { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: 9px; background: radial-gradient(100% 80% at 50% 30%, #fff, #efe6d4) }
.ic-relief { display: grid; place-items: center } .ic-relief svg { width: 66% }
.ic .ic-n { font-size: 11px; font-weight: 700; line-height: 1.2 }
.ic .ic-p { font-size: 10px; color: var(--muted) }
.ic[aria-pressed="true"] { border-color: var(--river); background: #fff; box-shadow: 0 4px 14px rgba(14,79,92,.15) }
.ic[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--river); color: #fff; font-size: 12px; display: grid; place-items: center }

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 8px }
.sw { aspect-ratio: 1; width: 100%; max-width: 40px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line), inset 0 -3px 0 rgba(0,0,0,.08); cursor: pointer; padding: 0; transition: transform .12s }
.sw:hover { transform: scale(1.08) }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 2.5px var(--river), inset 0 -3px 0 rgba(0,0,0,.08) }
.toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer }
.toggle input { width: 18px; height: 18px; accent-color: var(--river) }

.charms { display: grid; grid-template-columns: 1fr 1fr; gap: 8px }
.ch { border: 2px solid var(--line); border-radius: 12px; background: #fff; padding: 9px 10px; cursor: pointer; display: grid; gap: 1px; text-align: left; transition: border-color .15s }
.ch b { font-size: 13px } .ch span { font-size: 12px; color: var(--muted) }
.ch[aria-pressed="true"] { border-color: var(--green); background: color-mix(in srgb, var(--green) 8%, #fff) }
.ch[aria-pressed="true"] b::before { content: "✓ "; color: var(--green) }

.summary { display: grid; gap: 10px; border-top: 1px dashed var(--line); padding-top: 18px; margin-top: auto }
#lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px }
#lines li { display: flex; justify-content: space-between; gap: 12px } #lines li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap }
#lines li.disc span:last-child { color: var(--green) }
.qty, .total { display: flex; justify-content: space-between; align-items: center }
.total b { font-family: var(--display); font-size: 30px; color: var(--river) }
.stepper { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff }
.stepper button { border: 0; background: #fff; width: 36px; height: 34px; cursor: pointer; font-size: 18px }
.stepper output { min-width: 32px; text-align: center; font-weight: 700 }
.incl { margin: 0; font-size: 14px; font-weight: 700; color: var(--green) }
.field { display: grid; gap: 4px; font-size: 13px; font-weight: 700 }
.field input { font: inherit; font-weight: 500; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff }
.mbar { display: none }

/* tablet: pratinjau di atas, panel kiri & kanan berdampingan di bawah */
@media (max-width: 1180px) {
  .studio { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "center center" "left right"; height: auto }
  .center { height: 62vh; min-height: 420px } .side { overflow: visible }
}
/* HP: pratinjau menempel di atas saat pilihan digeser, total & tombol pesan mengambang di bawah */
@media (max-width: 760px) {
  .studio { grid-template-columns: minmax(0, 1fr); grid-template-areas: "center" "left" "right"; gap: 12px }
  .center { position: sticky; top: 64px; z-index: 5; height: auto; min-height: 0; background: var(--cream); padding-bottom: 6px }
  .stage { height: 38vh; min-height: 250px; flex: none }
  .center-help, .stage-foot { display: none }
  #nameInput { font-size: 24px; padding: 8px 56px }
  .stage-btns button#btnFront, .stage-btns button#btnFit { display: none }
  .press-hint { bottom: 12px; font-size: 12px }
  .icons { grid-template-columns: repeat(4, minmax(0, 1fr)) }
  .mbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; justify-content: space-between; align-items: center; gap: 12px;
    background: var(--paper); border-top: 1px solid var(--line); padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); box-shadow: 0 -6px 20px rgba(0,0,0,.08) }
  .mbar b { font-family: var(--display); font-size: 22px; color: var(--river) }
  .foot { padding-bottom: calc(80px + env(safe-area-inset-bottom)) }
}

/* galeri ikon */
.ikon-sec { background: var(--paper); border-block: 1px solid var(--line) }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px }
.g-card { background: var(--cream); border-radius: var(--r); overflow: hidden; display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line) }
.g-card img { aspect-ratio: 1; object-fit: cover; background: radial-gradient(100% 80% at 50% 30%, #fff, #efe6d4) }
.g-body { padding: 14px; display: grid; gap: 6px; align-content: start }
.g-body h3 { font-size: 19px } .g-body p { margin: 0; font-size: 14px; color: var(--muted) }
.g-body button { justify-self: start; margin-top: 4px; border: 0; background: var(--river); color: #fff; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 700; cursor: pointer }

/* langkah & faq */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px }
.steps li { counter-increment: s; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 6px }
.steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 50%; background: var(--gold); display: grid; place-items: center; font-family: var(--display); font-weight: 700; color: var(--river-2) }
.steps b { font-family: var(--display); font-size: 20px; font-weight: 600 } .steps span { color: var(--muted) }
.faq-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px }
@media (max-width: 760px) { .faq-in { grid-template-columns: 1fr } }
.faq { display: grid; gap: 10px }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px }
.faq summary { font-weight: 700; cursor: pointer } .faq p { margin: 8px 0 0; color: var(--muted) }
.foot { background: var(--river-2); color: #fff; padding-block: 24px calc(24px + env(safe-area-inset-bottom)) }
.foot-in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } .btn { transition: none } }
@media (max-width: 760px) {
  .brand small { display: none }
  .btn-wa.small { padding: 8px 14px }
  .studio-head p { display: none }
  .mode-tabs { width: 100% }
}
