/* ==========================================================================
   SIMANIS · Buku Tamu
   Satu kolom, sentuhan besar, bisa di ponsel tamu maupun tablet meja pelayanan.
   ========================================================================== */

:root {
  --canvas: #eef3f1;
  --canvas-2: #e3ece9;
  --panel: #f8fbfa;
  --sea: #0e2e38;
  --sea-2: #164452;
  --sea-3: #2b6170;
  --gold: #e9c27a;
  --gold-soft: #f4e3bd;
  --accent: #c2412d;
  --accent-hover: #a63422;
  --accent-muted: rgba(194, 65, 45, .16);
  --ok: #2f7d5b;
  --text-2: #3e5c64;
  --line: rgba(14, 46, 56, .14);
  --line-strong: #6f8c93;
  --f-display: 'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
  --f-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* atribut hidden harus menang atas display tombol dan kartu */
.bt [hidden] { display: none !important; }
body.bt {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 16px/1.55 var(--f-body);
  color: var(--sea);
  background:
    radial-gradient(70vmax 60vmax at 0% 0%, rgba(233, 194, 122, .3), transparent 60%),
    radial-gradient(60vmax 60vmax at 100% 100%, rgba(43, 97, 112, .18), transparent 60%),
    var(--canvas);
  -webkit-font-smoothing: antialiased;
}
.bt a { color: var(--sea-2); }
.bt :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* ---------- Kepala dan kaki ---------- */
.bt-top { display: flex; align-items: center; gap: 16px; width: min(760px, calc(100% - 32px)); margin: 16px auto 0; padding: 10px 14px; border-radius: 999px; background: rgba(250, 252, 251, .85); border: 1px solid rgba(255, 255, 255, .7); box-shadow: 0 10px 40px -24px rgba(14, 46, 56, .4); }
.bt-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--sea) !important; min-width: 0; }
.bt-brand img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.bt-brand span { min-width: 0; }
.bt-brand b { display: block; font: 800 18px/1.1 var(--f-display); }
.bt-brand small { display: block; font: 500 11px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-clock { margin-left: auto; text-align: right; font-family: var(--f-mono); line-height: 1.2; flex: none; }
.bt-clock span { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.bt-clock b { font-size: 18px; }
.bt-site { flex: none; font-size: 14px; font-weight: 600; text-decoration: none; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line); }
.bt-site:hover { background: #fff; }
.bt-foot { margin-top: auto; padding: 28px 16px 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: 13px; color: var(--text-2); text-align: center; }

.bt-main { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 8px; }

/* ---------- Tipografi ---------- */
.bt-hero { padding: 12px 4px 22px; }
.bt-kicker { display: inline-flex; align-items: center; gap: 10px; font: 500 12px/1.3 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.bt-kicker .pip { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-muted); flex: none; }
.bt h1 { font: 800 clamp(30px, 6vw, 46px)/1.08 var(--f-display); letter-spacing: -.02em; margin: 14px 0 0; overflow-wrap: anywhere; }
.bt-hero p { margin: 12px 0 0; font-size: 17px; color: var(--text-2); max-width: 52ch; }
.bt-hero .bt-count { display: inline-flex; gap: 8px; align-items: baseline; margin-top: 16px; padding: 8px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; }
.bt-hero .bt-count b { font: 800 18px/1 var(--f-display); color: var(--sea); }
.bt-sub { font: 700 20px/1.2 var(--f-display); margin: 6px 0 14px; }
.bt-note { color: var(--text-2); font-size: 15px; margin: 0 0 14px; }
.bt-tengah { text-align: center; margin-top: 18px; }

/* ---------- Kartu dan pesan ---------- */
.bt-card { background: var(--panel); border: 1px solid var(--line); border-radius: 26px; padding: clamp(20px, 4vw, 34px); box-shadow: 0 30px 70px -50px rgba(14, 46, 56, .5); }
.bt-alert { margin-bottom: 16px; padding: 14px 18px; border-radius: 16px; background: #fbe9e5; border: 1px solid rgba(194, 65, 45, .35); color: #7d2416; font-weight: 600; }
.bt-kosong { display: grid; gap: 6px; text-align: center; padding: 20px 8px; }
.bt-kosong b { font: 700 20px/1.25 var(--f-display); }
.bt-kosong span { color: var(--text-2); }

/* ---------- Langkah ---------- */
.bt-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 22px; }
.bt-steps li { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--canvas-2); color: var(--text-2); font-size: 14px; font-weight: 600; min-width: 0; }
.bt-steps li span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; font: 700 13px/1 var(--f-mono); flex: none; }
.bt-steps li.is-on { background: var(--sea); color: #fff; }
.bt-steps li.is-on span { background: var(--accent); color: #fff; }
.bt-steps li.is-done span { background: var(--ok); color: #fff; }
.no-js .bt-steps { display: none; }

.bt-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.bt-step + .bt-step { margin-top: 26px; }
.js .bt-step { display: none; }
.js .bt-step.is-on { display: block; animation: bt-masuk .45s var(--ease) both; }
.js .bt-step + .bt-step { margin-top: 0; }
@keyframes bt-masuk { from { opacity: 0; transform: translateY(8px); } }
.bt-step legend { font: 700 22px/1.2 var(--f-display); padding: 0; margin: 0 0 16px; }
.bt-step legend em, .bt-field label em { font-style: normal; font-weight: 500; color: var(--text-2); font-size: .8em; }

/* ---------- Isian ---------- */
.bt-field { margin-bottom: 18px; }
.bt-field > label, .bt-label { display: block; font-weight: 700; margin-bottom: 8px; }
.bt-field small { display: block; margin-top: 6px; color: var(--text-2); font-size: 13.5px; }
.bt input[type=text], .bt input[type=tel], .bt textarea, .bt select {
  width: 100%; min-height: 54px; padding: 13px 16px; border-radius: 16px; border: 1.5px solid var(--line-strong);
  background: #fff; color: var(--sea); font: 500 17px/1.4 var(--f-body); transition: border-color .2s, box-shadow .2s;
}
.bt textarea { min-height: 84px; resize: vertical; }
.bt select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%230e2e38' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 44px; }
.bt input:focus, .bt textarea:focus, .bt select:focus { outline: none; border-color: var(--sea-3); box-shadow: 0 0 0 4px rgba(43, 97, 112, .16); }
.bt .is-salah, .bt .is-salah input, .bt .is-salah select { border-color: var(--accent) !important; }
.bt-field.is-salah .bt-seg, .bt-field.is-salah .bt-chips { border-radius: 16px; box-shadow: 0 0 0 2px var(--accent); }

/* Pilihan tombol: jenis kelamin dan keperluan */
.bt-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bt-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bt-seg label, .bt-chips label { position: relative; display: block; cursor: pointer; }
.bt-seg input, .bt-chips input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.bt-seg span, .bt-chips span { display: flex; align-items: center; justify-content: center; min-height: 54px; height: 100%; padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--line-strong); background: #fff; font-weight: 600; text-align: center; line-height: 1.3; transition: background-color .2s, border-color .2s, color .2s; }
.bt-chips span { justify-content: flex-start; text-align: left; }
.bt-seg input:checked + span, .bt-chips input:checked + span { background: var(--sea); border-color: var(--sea); color: #fff; }
.bt-seg input:focus-visible + span, .bt-chips input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.bt-lainnya { margin-top: 10px; }

.bt-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.bt-quick button { font: 600 14px/1.2 var(--f-body); padding: 9px 14px; border-radius: 999px; border: 1px dashed var(--line-strong); background: transparent; color: var(--sea-2); cursor: pointer; }
.bt-quick button:hover { background: #fff; }

.bt-trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Tombol ---------- */
.bt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: 999px; border: 0; background: var(--accent); color: #fff !important; font: 700 16px/1 var(--f-body); text-decoration: none; cursor: pointer; box-shadow: 0 12px 28px -12px rgba(194, 65, 45, .7); transition: background-color .25s, transform .3s var(--ease); }
.bt-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.bt-btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.bt-ghost { background: #fff; color: var(--sea) !important; border: 1.5px solid var(--line-strong); box-shadow: none; }
.bt-ghost:hover { background: var(--canvas-2); }
.bt-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; }
.bt-nav-tengah { justify-content: center; flex-wrap: wrap; }
.bt-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin: 22px 0 0; font-size: 15px; }

/* ---------- Kamera ---------- */
.bt-cam { position: relative; aspect-ratio: 4 / 3; max-width: 420px; margin: 0 auto; border-radius: 22px; overflow: hidden; background: var(--sea); color: #c9dbdc; }
.bt-cam video, .bt-cam img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bt-cam video { transform: scaleX(-1); }
.bt-cam-kosong { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; font-size: 15px; }
.bt-cam-kosong svg { width: 48px; height: 48px; }
.bt-cam.is-hidup .bt-cam-kosong, .bt-cam.is-ada .bt-cam-kosong { display: none; }
.bt-cam-aksi { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.bt-file { position: relative; overflow: hidden; }
.bt-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- Selesai ---------- */
.bt-done { text-align: center; }
.bt-done p { color: var(--text-2); font-size: 17px; margin: 12px auto 0; max-width: 44ch; }
.bt-tick { width: 72px; height: 72px; margin: 0 auto 14px; color: var(--ok); }
.bt-tick svg { width: 100%; height: 100%; }
.bt-ticket { margin: 24px auto 0; max-width: 340px; padding: 22px 20px; border-radius: 22px; background: var(--sea); color: #dbe7e7; position: relative; }
.bt-ticket::before, .bt-ticket::after { content: ""; position: absolute; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: var(--panel); }
.bt-ticket::before { left: -11px; } .bt-ticket::after { right: -11px; }
.bt-ticket small { display: block; font: 500 12px/1.3 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-soft); }
.bt-ticket b { display: block; font: 800 88px/1 var(--f-display); color: #fff; margin: 8px 0 6px; letter-spacing: -.02em; }
.bt-ticket span { font-size: 14px; }
.bt-ringkas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0 0; text-align: left; }
.bt-ringkas div { padding: 14px 16px; border-radius: 16px; background: #fff; border: 1px solid var(--line); min-width: 0; }
.bt-ringkas dt { font: 500 11px/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.bt-ringkas dd { margin: 4px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.bt-ajak { display: flex; align-items: center; gap: 16px; margin-top: 18px; padding: 16px 18px; border-radius: 18px; background: var(--gold-soft); text-align: left; }
.bt-ajak div { flex: 1; min-width: 0; }
.bt-ajak b { display: block; font: 700 17px/1.3 var(--f-display); }
.bt-ajak span { display: block; font-size: 14.5px; color: #5a4a2a; }
.bt-ajak .bt-btn { flex: none; }
.bt-mundur { font-size: 13.5px; color: var(--text-2); margin-top: 14px !important; }

/* ---------- Survei ---------- */
.bt-saya { display: grid; gap: 2px; margin-bottom: 20px; padding: 18px 20px; border-radius: 18px; background: var(--sea); color: #dbe7e7 !important; text-decoration: none; }
.bt-saya b { font: 800 24px/1.2 var(--f-display); color: #fff; }
.bt-saya em { font-style: normal; color: var(--gold-soft); font-weight: 600; }
.bt-tamu { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.bt-tamu a { display: grid; gap: 2px; padding: 16px; border-radius: 16px; background: #fff; border: 1.5px solid var(--line); text-decoration: none; color: var(--sea); transition: border-color .2s, transform .3s var(--ease); }
.bt-tamu a:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.bt-tamu b { font-size: 17px; }
.bt-tamu span { font-size: 13.5px; color: var(--text-2); }

.bt-tanya h1 { text-align: center; font-size: clamp(26px, 5vw, 38px); margin: 18px auto 26px; max-width: 22ch; }
.bt-progres span { display: block; text-align: center; font: 500 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.bt-progres i { display: block; height: 6px; margin-top: 10px; border-radius: 6px; background: var(--canvas-2); overflow: hidden; position: relative; }
.bt-progres i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--isi, 0); background: var(--accent); border-radius: inherit; }
.bt-jawab { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bt-jawab form { margin: 0; }
.bt-pilih { width: 100%; height: 100%; display: grid; justify-items: center; gap: 10px; padding: 18px 8px; border-radius: 20px; border: 1.5px solid var(--line-strong); background: #fff; color: var(--sea); font: 700 15px/1.25 var(--f-body); cursor: pointer; transition: transform .3s var(--ease), border-color .2s, background-color .2s; }
.bt-pilih svg { width: 56px; height: 56px; }
.bt-pilih:hover { transform: translateY(-3px); }
.bt-pilih-1 { color: #2f7d5b; } .bt-pilih-1:hover { border-color: #2f7d5b; background: #eaf5ef; }
.bt-pilih-2 { color: #3b7a8c; } .bt-pilih-2:hover { border-color: #3b7a8c; background: #e8f2f4; }
.bt-pilih-3 { color: #9a6b12; } .bt-pilih-3:hover { border-color: #9a6b12; background: #f8f0dd; }
.bt-pilih-4 { color: var(--accent); } .bt-pilih-4:hover { border-color: var(--accent); background: #fbe9e5; }
.bt-pilih span { color: var(--sea); }

/* ---------- Mode kios (tablet di meja pelayanan) ---------- */
.is-kios .bt-site { display: none; }
.is-kios body.bt, body.bt.is-kios { font-size: 18px; }
.is-kios .bt-seg span, .is-kios .bt-chips span, .is-kios .bt input, .is-kios .bt select { min-height: 62px; font-size: 19px; }
.is-kios .bt-btn { min-height: 60px; font-size: 18px; padding: 0 30px; }

/* ---------- Layar kecil ---------- */
@media (max-width: 620px) {
  .bt-top { gap: 10px; padding: 8px 8px 8px 12px; }
  .bt-clock { display: none; }
  .bt-brand img { width: 38px; height: 38px; }
  .bt-site { margin-left: auto; padding: 8px 12px; font-size: 13px; }
  .bt-steps li { font-size: 0; justify-content: center; padding: 8px; }
  .bt-steps li span { font-size: 13px; }
  .bt-chips { grid-template-columns: 1fr; }
  .bt-ringkas { grid-template-columns: 1fr; }
  .bt-ajak { flex-direction: column; align-items: stretch; text-align: center; }
  .bt-jawab { grid-template-columns: 1fr 1fr; }
  .bt-nav { flex-wrap: wrap; }
  .bt-nav .bt-btn { flex: 1 1 auto; }
}
@media (max-width: 380px) { .bt-brand small { max-width: 44vw; } }
@media (prefers-reduced-motion: reduce) { .bt * { animation: none !important; transition: none !important; } }
