/* Halaman bio: satu kolom tombol link, mobile-first. Warna dari CSS variables --b-* (lihat App\Support\Bio). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, p, ul, blockquote { margin: 0; padding: 0; }
ul { list-style: none; }
[hidden] { display: none !important; }
.ic { width: 1.25em; height: 1.25em; flex: none; }

.bio {
  --demo-bar: 0px;
  min-height: 100svh; background: var(--b-bg); color: var(--b-ink);
  font-family: var(--font-body), system-ui, sans-serif; font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.bio.has-demo { --demo-bar: 60px; padding-bottom: var(--demo-bar); }
.bio.has-grad::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--b-grad); }

/* Tema foto: sampul jadi latar penuh dengan lapisan gelap supaya teks terbaca */
.bio__bg { position: fixed; inset: 0; z-index: -1; background: var(--b-bg); }
.bio__bg img { width: 100%; height: 100%; object-fit: cover; }
.bio__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(10 10 12 / .45) 0%, rgb(10 10 12 / .62) 45%, rgb(10 10 12 / .82) 100%); }
.theme-foto .blink, .theme-foto .bio__share, .theme-foto .bio__socials a { -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

.bio__wrap { position: relative; width: min(100% - 32px, 560px); margin-inline: auto; padding: 28px 0 32px; display: grid; gap: 24px; }

.bio__share {
  position: absolute; top: 16px; right: 0; z-index: 2;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--b-card); color: var(--b-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--b-ink) 10%, transparent);
}
.bio__share:focus-visible, .blink:focus-visible, .bio__socials a:focus-visible, .bprod:focus-visible, .bio__more:focus-visible { outline: 3px solid var(--b-btn); outline-offset: 3px; }
.is-dark .bio__share:focus-visible, .is-dark .blink:focus-visible { outline-color: var(--b-ink); }

/* ---------- Profil ---------- */
.bio__head { display: grid; justify-items: center; text-align: center; gap: 10px; padding-top: 28px; }
.bio__head.has-cover { padding-top: 0; }
.bio__cover { width: 100%; aspect-ratio: 16 / 7; overflow: hidden; border-radius: 24px; background: var(--b-card); margin-bottom: -58px; }
.shape-square .bio__cover { border-radius: 8px; }
.bio__cover img { width: 100%; height: 100%; object-fit: cover; }
.bio__avatar {
  position: relative; width: 104px; height: 104px; border-radius: 999px; overflow: hidden; flex: none;
  display: grid; place-items: center; background: var(--b-btn); color: var(--b-btn-ink);
  border: 4px solid var(--b-bg); box-shadow: 0 8px 24px rgb(0 0 0 / .12); margin-bottom: 4px;
}
.has-grad .bio__avatar, .theme-foto .bio__avatar { border-color: rgb(255 255 255 / .9); }
.bio__avatar img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.bio__avatar span { font-family: var(--font-head), sans-serif; font-weight: 700; font-size: 2.1rem; letter-spacing: -.02em; }
.bio__name { font-family: var(--font-head), sans-serif; font-weight: var(--head-weight, 700); letter-spacing: var(--head-tracking, -.01em); font-size: clamp(1.5rem, 1.2rem + 1.4vw, 1.9rem); line-height: 1.15; overflow-wrap: anywhere; max-width: 100%; }
.bio__text { color: var(--b-muted); max-width: 36ch; font-size: 1rem; overflow-wrap: break-word; }
.bio__socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.bio__socials a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; background: var(--b-card); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--b-ink) 10%, transparent); transition: transform .15s ease; }
.bio__socials a:hover { transform: translateY(-2px); }
.bio__socials .ic { width: 20px; height: 20px; }

/* ---------- Tombol link ---------- */
.bio__links { display: grid; gap: 12px; }
.bio__h {
  display: flex; align-items: center; gap: 12px; margin-top: 10px;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--b-muted);
}
.bio__h::before, .bio__h::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .3; }

.blink {
  --r: 999px; --mr: 999px;
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 52px minmax(0, 1fr) 28px; align-items: center; gap: 14px;
  min-height: 68px; padding: 8px 18px 8px 8px; border-radius: var(--r);
  background: var(--b-btn); color: var(--b-btn-ink);
  transition: transform .15s ease, box-shadow .15s ease, background-color .2s ease;
}
.blink:hover { transform: translateY(-2px); }
.blink:active { transform: translateY(0) scale(.99); }
.blink__media {
  width: 52px; height: 52px; border-radius: var(--mr); overflow: hidden;
  display: grid; place-items: center; background: color-mix(in srgb, currentColor 14%, transparent);
}
.blink__media img { width: 100%; height: 100%; object-fit: cover; }
.blink__media .ic { width: 22px; height: 22px; }
.blink__t { display: grid; gap: 1px; min-width: 0; }
.blink__t b { font-weight: 700; font-size: 1rem; line-height: 1.3; overflow-wrap: break-word; }
.blink__t small { font-size: .85rem; line-height: 1.35; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blink__go { display: grid; place-items: center; opacity: .7; }
.blink__go .ic { width: 18px; height: 18px; }

.shape-round .blink { --r: 18px; --mr: 12px; }
.shape-square .blink { --r: 6px; --mr: 4px; }

.bio--soft .blink { background: var(--b-card); color: var(--b-ink); }
.bio--soft .blink .blink__media { background: color-mix(in srgb, var(--b-btn) 16%, transparent); color: var(--b-ink); }
.bio--outline .blink { background: transparent; color: var(--b-ink); box-shadow: inset 0 0 0 1.5px currentColor; }
.bio--outline .blink:hover { background: color-mix(in srgb, var(--b-ink) 6%, transparent); }
.bio--shadow .blink { background: var(--b-card); color: var(--b-ink); box-shadow: inset 0 0 0 2px var(--b-ink), 4px 4px 0 var(--b-ink); }
.bio--shadow .blink:hover { transform: translate(-1px, -1px); box-shadow: inset 0 0 0 2px var(--b-ink), 6px 6px 0 var(--b-ink); }
.bio--shadow .blink:active { transform: translate(3px, 3px); box-shadow: inset 0 0 0 2px var(--b-ink), 1px 1px 0 var(--b-ink); }
.theme-foto .blink, .has-grad.bio--soft .blink { background: var(--b-card); color: var(--b-ink); }
.theme-foto.bio--solid .blink { background: var(--b-btn); color: var(--b-btn-ink); }

/* Tombol yang disorot: warna isi penuh + kilau berkala */
.blink.is-hl { background: var(--b-btn); color: var(--b-btn-ink); }
.blink.is-hl .blink__media { color: inherit; background: color-mix(in srgb, currentColor 14%, transparent); }
.bio--outline .blink.is-hl, .bio--shadow .blink.is-hl { box-shadow: none; }
.bio--shadow .blink.is-hl { box-shadow: 4px 4px 0 var(--b-ink); }
.blink.is-hl::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / .28) 50%, transparent 70%);
  transform: translateX(-100%); animation: shine 4s ease-in-out 1.2s infinite;
}
@keyframes shine { 0%, 60% { transform: translateX(-100%); } 85%, 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .blink.is-hl::after { animation: none; } .blink, .bio__socials a { transition: none; } }

/* ---------- Produk pilihan ---------- */
.bio__prods { display: grid; gap: 14px; }
.bprods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bprod { display: grid; gap: 6px; align-content: start; min-width: 0; padding: 8px 8px 12px; border-radius: 20px; background: var(--b-card); }
.shape-square .bprod { border-radius: 8px; }
.bprod__img { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 14px; background: color-mix(in srgb, var(--b-ink) 8%, transparent); }
.shape-square .bprod__img { border-radius: 4px; }
.bprod__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.bprod:hover .bprod__img img { transform: scale(1.04); }
.bprod__name { padding-inline: 4px; font-weight: 600; font-size: .92rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bprod__price { padding-inline: 4px; font-weight: 700; font-size: .95rem; }
.bprod__price small { font-weight: 500; font-size: .78rem; color: var(--b-muted); }
.theme-foto .bprod__price small, .has-grad .bprod__price small { color: inherit; opacity: .8; }
.bio__more {
  justify-self: center; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; font-weight: 600; box-shadow: inset 0 0 0 1.5px currentColor;
}
.bio__more .ic { width: 18px; height: 18px; }

/* ---------- Kaki ---------- */
.bio__ftr { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 8px; padding-top: 8px; font-size: .85rem; color: var(--b-muted); text-align: center; }
.bio__ftr a { overflow-wrap: anywhere; }
.bio__ftr a:hover { color: var(--b-ink); text-decoration: underline; }

/* ---------- Toast, dialog demo, bar demo ---------- */
.bio__toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + var(--demo-bar)); z-index: 60; width: fit-content; margin-inline: auto;
  padding: 12px 18px; border-radius: 12px; background: #111214; color: #fafafa; font-weight: 600; font-size: .92rem; box-shadow: 0 10px 30px rgb(0 0 0 / .25);
}
.bio__dlg { width: min(100% - 32px, 420px); padding: 0; border: 0; border-radius: 20px; background: #fff; color: #18181b; box-shadow: 0 30px 60px rgb(0 0 0 / .3); }
.bio__dlg::backdrop { background: rgb(0 0 0 / .5); }
.bio__dlg-in { display: grid; gap: 12px; padding: 22px; font-size: .95rem; }
.bio__dlg-in b { font-size: 1.1rem; }
.bio__dlg-in p { color: #52525b; }
.bio__dlg blockquote { white-space: pre-wrap; padding: 12px 14px; border-radius: 12px; background: #dcf8c6; color: #111; font-size: .92rem; overflow-wrap: anywhere; }
.bio__dlg-btn { width: 100%; min-height: 46px; border: 0; border-radius: 12px; background: #18181b; color: #fff; font-weight: 700; cursor: pointer; }

.demo-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: var(--demo-bar);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 12px 0 16px; background: #111214; color: #f4f4f5; font-family: system-ui, sans-serif; font-size: .9rem;
}
.demo-bar__t { min-width: 0; display: grid; }
.demo-bar__t strong { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-bar__t span { color: #a1a1aa; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-bar__a { display: flex; gap: 8px; flex: none; }
.demo-bar .dbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 10px; font-weight: 600; font-size: .86rem; white-space: nowrap; }
.demo-bar .dbtn .ic { width: 16px; height: 16px; }
.demo-bar .dbtn--y { background: #d9f99d; color: #1a2e05; }
.demo-bar .dbtn--g { border: 1px solid #3f3f46; color: #e4e4e7; }
.demo-bar .dbtn--g span { display: none; }
@media (min-width: 640px) { .demo-bar .dbtn--g span { display: inline; } }

/* Gambar contoh gagal dimuat: ganti gradasi lembut */
.img-ph, img.img-fail { display: block; width: 100%; height: 100%; min-height: 40px; background: radial-gradient(120% 90% at 20% 10%, color-mix(in srgb, var(--b-btn) 40%, transparent), transparent 60%), color-mix(in srgb, var(--b-ink) 10%, var(--b-bg)); }
img.img-fail { color: transparent; font-size: 0; }

@media (min-width: 720px) {
  .bio__wrap { padding-top: 48px; gap: 28px; }
  .bio__share { top: 0; }
  .bio__head:not(.has-cover) { padding-top: 12px; }
}
