/* Tata letak: panggung video di atas (kemasan berdiri melingkar, yang di depan diputar), lalu koleksi, takaran seduh, dan kaki.
   Warna halaman mengikuti latar studio di video produk, supaya kartu video menyatu dengan halaman. */
:root {
  color-scheme: light;
  --bg: #d8d1c6;
  /* satu warna latar untuk seluruh halaman dan panel; pemisah hanya garis tipis */
  --surface: var(--bg);
  --raise: var(--bg);
  --ink: #1b2233;
  --muted: #5e5a55;
  --line: rgba(27, 34, 51, .16);
  --arabica: #a23a24;
  --robusta: #243f95;
  --terra: var(--arabica);
  --cream: #f3efe8;
  --err: #a52a14;
  --display: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.7, 0, .2, 1);
  --panel-w: 400px;
  --gut-l: max(20px, env(safe-area-inset-left, 0px));
  --gut-r: max(20px, env(safe-area-inset-right, 0px));
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
section { scroll-margin-top: calc(60px + env(safe-area-inset-top, 0px)); }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
img, video { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h1, h2, h3 { text-wrap: balance; font-weight: 800; }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: var(--gut-l); padding-right: var(--gut-r); }
.eyebrow { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; color: var(--muted); }
.notes { display: flex; flex-wrap: wrap; gap: 6px; }
.notes li { font-size: 12px; padding: 4px 11px; border: 1px solid var(--line); border-radius: 99px; }

/* ---------- kepala ---------- */
.top { position: sticky; z-index: 40; top: env(safe-area-inset-top, 0px); display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px var(--gut-r) 8px var(--gut-l); background: var(--bg); border-bottom: 1px solid var(--line); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 41; background: var(--bg); }
.wordmark { font-size: 17px; letter-spacing: .04em; white-space: nowrap; }
.wordmark b { font-weight: 600; }
.top-nav { display: flex; align-items: center; gap: 18px; }
.top-nav .plain { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; padding: 8px 0; }
.icon-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.icon-btn:hover { background: var(--line); }
.icon-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.cart-count { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ink); color: var(--cream); font-size: 11px; font-weight: 600; display: grid; place-items: center; transition: transform .3s var(--ease); }
.cart-count.bump { transform: scale(1.4); }

/* ---------- panggung ---------- */
.runway { position: relative; height: calc(100svh - 62px); min-height: 600px; max-height: 940px; overflow: hidden; }
.runway-head { position: absolute; top: 28px; left: var(--gut-l); right: var(--gut-r); z-index: 5; pointer-events: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.runway-head h1 { font-family: var(--display); font-size: clamp(30px, 3.4vw, 52px); line-height: .86; text-transform: uppercase; margin-top: 8px; }
.runway-head h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; text-transform: none; font-size: .78em; color: var(--arabica); }
.runway[data-state="focus"] .runway-head { opacity: 0; transform: translateY(-12px); }

.stage { position: absolute; z-index: 2; inset: 0 0 86px 0; user-select: none; -webkit-user-select: none; touch-action: pan-y; cursor: grab; }
.stage.dragging { cursor: grabbing; }
.stage.dragging .model { transition: none; }
.model { position: absolute; left: 0; bottom: 0; transform-origin: 50% 100%; cursor: pointer; will-change: transform, opacity;
  transition: transform 1s var(--ease), opacity .8s var(--ease), filter .8s var(--ease); }
.model.enter { transition: none; }
/* dinding studio di video sudah sewarna halaman; tepi bingkai dipudarkan tipis saja agar tidak terlihat kotak.
   Bagian atas hampir tidak dipudarkan supaya biji kopi yang jatuh dari atas tetap terlihat. */
.model img, .model .clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent), linear-gradient(to bottom, transparent, #000 1.5%, #000 92%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent), linear-gradient(to bottom, transparent, #000 1.5%, #000 92%, transparent);
  mask-composite: intersect; }
/* gambar diam langsung menutup saat video berhenti, dan baru memudar setelah bingkai video pertama tergambar */
.model img { z-index: 1; }
.model.playing img { opacity: 0; transition: opacity .4s; }
.feed { position: fixed; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }

.stage-nav { position: absolute; z-index: 6; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; transition: left .9s var(--ease); }
.arrow { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--ink); font-size: 22px; line-height: 1; background: transparent; }
.arrow:hover { background: var(--ink); color: var(--cream); }
.now { min-width: 190px; height: 52px; padding: 0 22px; border-radius: 99px; background: var(--ink); color: var(--cream); display: grid; place-items: center; line-height: 1.15; }
.now span { font-weight: 600; font-size: 15px; }
.now small { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; opacity: .7; }
.runway[data-state="focus"] .now { display: none; }
@media (min-width: 821px) { .runway[data-state="focus"] .stage-nav { left: calc((100% - var(--panel-w)) / 2); } }

/* ---------- panel detail ---------- */
.look-panel { position: absolute; z-index: 8; top: 0; right: 0; bottom: 0; width: var(--panel-w); max-width: 100%; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line);
  transform: translateX(100%); visibility: hidden; transition: transform .8s var(--ease), visibility 0s .8s; }
.runway[data-state="focus"] .look-panel { transform: none; visibility: visible; transition: transform .8s var(--ease); }
.look-panel .panel-top h2 { font-size: 40px; line-height: .95; }
.panel-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 24px 16px; display: flex; flex-direction: column; gap: 14px; }
.panel-note { color: var(--muted); }
.label { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: -6px; }
.sizes { display: flex; gap: 8px; flex-wrap: wrap; }
.size { min-width: 76px; height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 8px; font-weight: 500; font-variant-numeric: tabular-nums; }
.size:hover { border-color: var(--ink); }
.size.on { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.specs { border-top: 1px solid var(--line); }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.specs dt { color: var(--muted); }
.specs dd { text-align: right; }
.panel-photo { width: 46%; height: auto; align-self: center; border-radius: 6px; box-shadow: 0 10px 24px rgba(27, 34, 51, .2); }

/* ---------- koleksi ---------- */
.collection { padding-block: 72px; background: var(--surface); border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 48px; flex-wrap: wrap; margin-bottom: 36px; }
.section-head h2 { font-family: var(--display); font-size: clamp(44px, 5.4vw, 76px); line-height: .9; text-transform: uppercase; margin-top: 6px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; }
.card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
/* kartu koleksi: potongan kemasan setinggi sama, berdiri di garis dasar yang sama, dengan bayangan lantai yang sama */
.card-img { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1.08; padding: 9% 0 10%; overflow: hidden; }
.card-img::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 7%; height: 5%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(27, 20, 14, .32), transparent); }
.card-img img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; transition: transform .8s var(--ease); }
.card-img:hover img { transform: translateY(-6px); }
.stl { position: absolute; z-index: 2; left: 0; bottom: 0; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; }
.card-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card h3 { font-family: var(--sans); font-size: 17px; font-weight: 500; }
.card[data-v="arabica"] .tag { color: var(--arabica); }
.card[data-v="robusta"] .tag { color: var(--robusta); }
.tag { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.price { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.add { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--ink); font-size: 22px; line-height: 1; }
.add:hover { background: var(--ink); color: var(--cream); }

/* ---------- cara seduh, kaki ---------- */
.brew { padding-block: 72px; border-top: 1px solid var(--line); }
.brew .wrap { display: flex; flex-direction: column; gap: 14px; }
.brew h2 { font-family: var(--display); font-size: clamp(32px, 4vw, 54px); line-height: 1.05; text-transform: uppercase; }
.sub { color: var(--muted); max-width: 52ch; }
.brew-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.brew-tabs button { height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 99px; font-weight: 500; }
.brew-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.brew-card { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg); }
.brew-card div { padding: 16px 14px; border-right: 1px solid var(--line); min-width: 0; }
.brew-card div:nth-child(4) { border-right: 0; }
.brew-card dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.brew-card dd { font-family: var(--display); font-size: clamp(22px, 2.8vw, 34px); line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; }
.brew-card p { grid-column: 1 / -1; padding: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
/* lencana halal: label resmi dengan latar putih yang sudah dibuat bening, langsung di atas warna halaman */
.halal { border-top: 1px solid var(--line); }
.halal-in { max-width: 1160px; margin: 0 auto; padding: 44px var(--gut-r) 44px var(--gut-l); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 24px 48px; align-items: center; }
.halal-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.halal-text h2 { font-family: var(--display); font-size: clamp(32px, 3.6vw, 48px); line-height: .95; text-transform: uppercase; }
.halal-text p:last-child { color: var(--muted); max-width: 46ch; }
.halal-no { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.halal-badge { width: 100%; height: auto; }
@media (max-width: 820px) { .halal-in { grid-template-columns: 1fr; padding-block: 36px; } .halal-badge { max-width: 440px; } }

.foot { padding: 40px var(--gut-r) calc(44px + env(safe-area-inset-bottom, 0px)) var(--gut-l); display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; border-top: 1px solid var(--line); }
.foot p { font-size: 12.5px; color: var(--muted); }
.foot p:first-of-type { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink); margin: 6px 0; }
.chat { position: fixed; z-index: 30; right: max(18px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: 50px; height: 50px; border-radius: 16px; background: var(--ink); display: grid; place-items: center; box-shadow: 0 10px 24px rgba(50, 24, 14, .3); }
.chat svg { width: 22px; height: 22px; fill: var(--cream); }

/* ---------- bagian bersama panel ---------- */
.panel-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 24px 14px; }
.panel-top h2 { font-family: var(--display); font-size: 26px; line-height: 1.1; text-transform: uppercase; margin-top: 4px; }
.close-btn { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--line); font-size: 14px; }
.close-btn:hover { border-color: var(--ink); }
.panel-foot { padding: 14px 24px calc(18px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.total-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; }
.total { font-family: var(--display); font-size: 24px; font-variant-numeric: tabular-nums; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; font-variant-numeric: tabular-nums; }
.qty button { width: 40px; height: 40px; font-size: 18px; }
.qty span { min-width: 28px; text-align: center; }
.btn-primary, .btn-ghost { display: block; width: 100%; text-align: center; height: 50px; line-height: 50px; border-radius: 99px; font-weight: 600; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.btn-ghost { border: 1px solid var(--line); line-height: 48px; }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- keranjang ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(40, 20, 10, .45); opacity: 0; pointer-events: none; transition: opacity .4s; }
.cart-open .scrim { opacity: 1; pointer-events: auto; }
.cart { position: fixed; z-index: 61; top: 0; right: 0; bottom: 0; width: min(420px, 100%); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px); transform: translateX(100%); visibility: hidden; transition: transform .5s var(--ease), visibility 0s .5s; }
.cart-open .cart { transform: none; visibility: visible; transition: transform .5s var(--ease); }
.cart-items { flex: 1; overflow-y: auto; padding: 0 24px; }
.li { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.thumb { width: 56px; aspect-ratio: 3 / 4; display: flex; align-items: flex-end; justify-content: center; }
.thumb img { height: 100%; width: auto; object-fit: contain; }
.li-name { font-weight: 500; }
.li .qty { margin-top: 8px; }
.li .qty button { width: 34px; height: 34px; }
.rm { font-size: 12px; color: var(--muted); text-decoration: underline; padding: 10px 4px; }
.empty { padding: 60px 0; text-align: center; color: var(--muted); }

/* ---------- formulir ---------- */
.order { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(40, 20, 10, .5); opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s; }
.order-open .order { opacity: 1; visibility: visible; transition: opacity .35s; }
.order-card { width: min(620px, 100%); max-height: calc(100svh - 32px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.order-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 24px 20px; display: flex; flex-direction: column; gap: 18px; }
fieldset { border: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
legend { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--terra); margin-bottom: 10px; }
.order label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); min-width: 0; }
.order label i { font-style: normal; opacity: .7; }
.order input:not([type="radio"]), .order textarea { width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; }
.order textarea { height: auto; padding: 12px; font-size: 13px; line-height: 1.5; resize: vertical; }
.order input::placeholder { color: color-mix(in srgb, var(--muted) 55%, transparent); }
.order input:focus { outline: none; border-color: var(--terra); }
.order input.err { border-color: var(--err); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row4 { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.3fr; gap: 12px; }
.pay { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.order .pay-opt { flex-direction: row; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; color: var(--ink); }
.pay-opt:has(input:checked) { border-color: var(--terra); }
.pay-opt input { margin-top: 3px; accent-color: var(--terra); }
.pay-opt b { display: block; font-size: 14px; font-weight: 500; }
.pay-opt small { color: var(--muted); font-size: 12px; }
.order-sum { padding: 14px; border-radius: 8px; border: 1px solid var(--line); font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.order-sum li, .sum-row { display: flex; justify-content: space-between; gap: 16px; }
.order-sum ul { display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.muted { color: var(--muted); }
.order-err { color: var(--err); font-size: 13px; min-height: 0; }
.order-err:empty { display: none; }
.fine { font-size: 12px; color: var(--muted); text-align: center; }
.done { display: flex; flex-direction: column; gap: 6px; padding: 8px 0 4px; }
.done-code { font-family: var(--display); font-size: clamp(34px, 9vw, 46px); line-height: 1; letter-spacing: .02em; font-variant-numeric: tabular-nums; user-select: all; }
.done-lead { color: var(--muted); margin-top: 6px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.add:disabled, .btn-primary:disabled, .btn-ghost:disabled { opacity: .4; cursor: not-allowed; }

.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); padding: 12px 20px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease); max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }



body.focus .chat { display: none; }

/* ---------- ponsel ---------- */
@media (max-width: 820px) {
  .top-nav { gap: 12px; }
  .top-nav .plain { font-size: 11px; letter-spacing: .06em; }
  .runway { min-height: 500px; }
  .chat { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .runway-head { top: 12px; }
  .runway-head h1 { margin-top: 2px; }
  .stage { bottom: 78px; top: 40px; }
  .look-panel { top: auto; left: 0; width: 100%; max-height: 60%; border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; transform: translateY(100%); }
  .look-panel .panel-top { padding: 16px var(--gut-r) 8px var(--gut-l); }
  .look-panel .panel-top h2 { font-size: 32px; }
  .panel-body { padding: 0 var(--gut-r) 12px var(--gut-l); gap: 10px; }
  .look-panel .panel-foot { display: grid; grid-template-columns: 1fr 1fr; padding: 10px var(--gut-r) calc(12px + env(safe-area-inset-bottom, 0px)) var(--gut-l); }
  .look-panel .total-row { grid-column: 1 / -1; }
  .look-panel .btn-primary { order: 2; }
  .look-panel .btn-primary, .look-panel .btn-ghost { font-size: 11px; letter-spacing: .06em; }
  .panel-photo, .specs { display: none; }
  .runway[data-state="focus"] .stage-nav { display: none; }
  .collection { padding-block: 52px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .stl { display: none; }
  .brew-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brew-card div:nth-child(2) { border-right: 0; }
  .brew-card div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .row4 { grid-template-columns: 1fr 1fr; }
  .pay { grid-template-columns: 1fr; }
  .order { padding: 0; place-items: end center; }
  .order-card { max-height: 94svh; border-radius: 18px 18px 0 0; }
  .toast { bottom: auto; top: calc(70px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -20px); }
  .grid .card-img { padding: 10% 0 12%; }
}
@media (max-width: 420px) { .row2 { grid-template-columns: 1fr; } .top-nav .plain:first-child { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition-duration: .01ms !important; scroll-behavior: auto !important; } }
