/* ============================================================
   style.css - tampilan halaman biolink (dark premium)
   ============================================================ */
:root{
  --bg:        #0A0B0D;
  --card:      #15171B;
  --card-2:    #121317;
  --tile:      #1A1E24;
  --stroke:    rgba(255,255,255,.08);
  --stroke-2:  rgba(255,255,255,.05);
  --txt:       #F2F4F7;
  --muted:     #9AA3AF;
  --dim:       #6B7480;
  --blue:      #2563EB;
  --blue-soft: #3B82F6;
}

*{ margin:0; padding:0; box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  font-family:'Plus Jakarta Sans','Inter',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--txt);
  min-height:100vh;
  display:flex;
  justify-content:center;
  padding:48px 16px 0;
  -webkit-font-smoothing:antialiased;
}
/* cahaya ambient di bagian atas halaman (murni CSS, tanpa JS) */
body::before{
  content:"";
  position:fixed; inset:0;
  background:
    radial-gradient(560px 420px at 50% -90px, rgba(37,99,235,.16), transparent 65%),
    radial-gradient(480px 360px at 88% 4%,   rgba(147,51,234,.10), transparent 65%),
    radial-gradient(420px 340px at 10% 26%,  rgba(34,211,238,.06), transparent 65%);
  pointer-events:none;
}
.wrap{ position:relative; width:100%; max-width:440px; display:flex; flex-direction:column; gap:18px; }

/* ============ HEADER / PROFIL ============ */
button:focus-visible{ outline:2px solid var(--blue-soft); outline-offset:2px; }

.avatar{
  position:relative;
  width:116px; height:116px;
  margin:0 auto;
  border-radius:30px;
  padding:3px;
  background:linear-gradient(135deg,#3B82F6 0%,#22D3EE 55%,#A855F7 100%);
  box-shadow:0 18px 44px rgba(0,0,0,.55), 0 0 36px rgba(59,130,246,.28);
}
/* EDIT: untuk foto asli, ganti src <img> di dalam .avatar-inner dengan
   src="foto-kamu.jpg" (rasio kotak 1:1 paling bagus; wajah otomatis di-fokus ke atas) */
.avatar-inner{
  width:100%; height:100%;
  border-radius:27px;
  border:4px solid var(--bg);   /* jarak gelap antara cincin gradasi dan foto */
  background:#1B2026;
  overflow:hidden;
}
.avatar-inner img{
  width:100%; height:100%;
  display:block;
  object-fit:cover;
  object-position:center 22%;
  border-radius:23px;
}

h1{
  margin-top:20px;
  text-align:center;
  font-size:28px; font-weight:800; line-height:1.15;
  letter-spacing:-.03em;
  color:var(--txt);
  text-wrap:balance;
}
/* EDIT: ganti teks tag dengan label kamu */
.tag{
  margin:12px auto 0; width:fit-content; max-width:100%;
  display:flex; align-items:center; gap:8px;
  font-size:12px; font-weight:600; color:#C6CFDB;
  background:rgba(148,163,184,.10);
  border:1px solid rgba(148,163,184,.22);
  padding:6px 14px; border-radius:999px;
}
.tag::before{
  content:""; width:7px; height:7px; border-radius:50%; flex:none;
  background:var(--blue-soft); box-shadow:0 0 8px rgba(59,130,246,.9);
}
/* EDIT: ganti dengan bio singkat kamu */
.bio{
  margin:16px auto 0; max-width:340px; text-wrap:balance;
  text-align:center;
  font-size:14px; line-height:1.7; color:#A6AFBC;
}

/* ---- kartu statistik ---- */
/* EDIT: sesuaikan angka & label statistik dengan data kamu */
.stats{ margin-top:24px; display:flex; gap:10px; }
.stat{
  flex:1; display:flex; align-items:center; justify-content:center; gap:8px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  padding:12px 14px;
}
.stat svg{ width:17px; height:17px; color:#7FA6F0; flex:none; }
.stat b{ font-size:14px; font-weight:700; }
.stat small{ font-size:11.5px; color:#8D97A4; white-space:nowrap; }

/* ---- label kecil di atas tiap section ---- */
.sec-label{ display:flex; align-items:center; gap:10px; margin:6px 2px -2px; }
.sec-label span{
  font-size:10.5px; font-weight:700; letter-spacing:.16em;
  text-transform:uppercase; color:#8791A0;
}
.sec-label::after{
  content:""; flex:1; height:1px;
  background:linear-gradient(90deg, rgba(255,255,255,.12), transparent);
}

/* ============ KARTU CTA MOTIONREN (border gradasi) ============ */
.note-card{
  display:flex; align-items:center; gap:14px;
  border:1px solid transparent;
  border-radius:20px;
  padding:16px;
  text-decoration:none;
  background:
    linear-gradient(180deg,#171A20 0%,#121418 100%) padding-box,
    linear-gradient(135deg, rgba(59,130,246,.65), rgba(168,85,247,.45) 55%, rgba(34,211,238,.55)) border-box;
  box-shadow:0 14px 34px rgba(0,0,0,.4);
  transition:transform .15s ease, box-shadow .15s ease;
}
/* icon kartu CTA = favicon resmi motionren.pages.dev (base64) */
.note-ic{
  width:56px; height:56px; flex:none;
  border-radius:15px;
  border:1px solid rgba(255,255,255,.10);
  background:#0F1114;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
}
.note-ic img{ width:100%; height:100%; object-fit:cover; display:block; }
.note-tx{ flex:1; min-width:0; }
.note-title{ display:flex; align-items:center; gap:8px; }
.note-title b{ font-size:16px; font-weight:700; color:var(--txt); letter-spacing:-.01em; line-height:1.2; }
.note-tx small{
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2;
  overflow:hidden;               /* maksimal 2 baris */
  margin-top:5px; font-size:12.5px; line-height:1.5; color:#98A2B0;
}
.note-arrow{
  width:34px; height:34px; flex:none;
  border-radius:50%;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.10);
  display:flex; align-items:center; justify-content:center;
  transition:background .15s ease, transform .15s ease;
}
.note-arrow svg{ width:16px; height:16px; color:#DBE3EE; }


/* ---- wadah kartu CTA (diisi dari cta.json / tools.json); kalau kosong tidak memakan jarak ---- */
.tools{ display:flex; flex-direction:column; gap:18px; }
.tools:empty{ display:none; }
.load-err{ padding:14px 10px; font-size:12px; line-height:1.6; color:#8D97A4; text-align:center; }

/* ============ KARTU TOOLS (grid 2 kolom, tersusun ke bawah: ikon, nama, keterangan) ============ */
.tools-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.tools-grid:empty{ display:none; }
.tool-tile{
  position:relative;
  display:flex; flex-direction:column; align-items:flex-start; gap:12px;
  border:1px solid transparent;
  border-radius:20px;
  padding:16px 14px 16px;
  text-decoration:none;
  background:
    linear-gradient(180deg,#171A20 0%,#121418 100%) padding-box,
    linear-gradient(135deg, rgba(59,130,246,.55), rgba(168,85,247,.38) 55%, rgba(34,211,238,.48)) border-box;
  box-shadow:0 12px 28px rgba(0,0,0,.38);
  transition:transform .15s ease, box-shadow .15s ease;
}
.tool-ic{
  width:52px; height:52px; flex:none;
  border-radius:15px;
  border:1px solid rgba(255,255,255,.10);
  background:#0F1114;
  overflow:hidden;
}
.tool-ic img{ width:100%; height:100%; object-fit:cover; display:block; }
.tool-tile b{ font-size:15.5px; font-weight:700; letter-spacing:-.01em; line-height:1.2; color:var(--txt); }
.tool-tile small{
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; line-clamp:3;
  overflow:hidden;
  font-size:12px; line-height:1.55; color:#98A2B0;
}
.tool-go{
  position:absolute; top:14px; right:12px;
  width:28px; height:28px;
  border-radius:50%;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.10);
  display:flex; align-items:center; justify-content:center;
  transition:background .15s ease, transform .15s ease;
}
.tool-go svg{ width:14px; height:14px; color:#DBE3EE; }
@media (max-width:340px){ .tools-grid{ grid-template-columns:1fr; } }

/* ============ KARTU PLATFORM ============ */
.card{
  background:var(--card);
  border:1px solid var(--stroke);
  border-radius:22px;
  padding:18px 14px 4px;
  overflow:hidden;
}
/* gradasi kebiruan di bagian atas kartu */
.card.tinted{
  background:linear-gradient(180deg,#1B2531 0%, #15171B 42%);
}
.card-head{ display:flex; align-items:center; gap:12px; padding:0 4px 16px; }
.head-ic{
  width:42px; height:42px; flex:none;
  border-radius:13px;
  background:rgba(59,130,246,.12);
  border:1px solid rgba(59,130,246,.30);
  display:flex; align-items:center; justify-content:center;
}
.head-ic svg{ width:20px; height:20px; color:#8FB0F5; }
.head-tx{ flex:1; min-width:0; }
.head-tx h2{ font-size:15.5px; font-weight:700; letter-spacing:-.01em; }
.head-tx p{
  margin-top:3px;
  font-size:12.5px; white-space:nowrap; color:#8D97A4;
  display:flex; align-items:center; gap:5px;
}
.head-tx p svg{ width:12px; height:12px; flex:none; color:#6E7885; }
.pills{ display:flex; gap:8px; flex-wrap:wrap; padding:0 2px 14px; }
.pill{
  display:inline-flex; align-items:center; gap:6px;
  font-size:11.5px; font-weight:600; color:#B9C1CC;
  background:rgba(255,255,255,.05);
  border:1px solid var(--stroke);
  padding:6px 12px; border-radius:999px;
}
.pill svg{ width:12px; height:12px; color:#8D9AA9; }

/* ---- daftar platform: tiap baris jadi kartu kecil ---- */
.rows{ display:flex; flex-direction:column; gap:8px; padding:2px; }
.row{
  position:relative;
  display:flex; align-items:center; gap:12px;
  padding:10px 12px;
  background:var(--tile);
  border:1px solid rgba(255,255,255,.06);
  border-radius:15px;
  text-decoration:none;
  transition:transform .15s ease, background .15s ease, border-color .15s ease;
}
.mini{
  width:36px; height:36px; flex:none;
  border-radius:10px; overflow:hidden;
  background:#0F1114;
  border:1px solid rgba(255,255,255,.10);
  display:flex; align-items:center; justify-content:center;
}
.mini img{ width:100%; height:100%; object-fit:cover; display:block; }
.rname{
  flex:1; min-width:0;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  font-size:14px; font-weight:600; letter-spacing:-.01em;
  color:#E9EDF3;
}
/* baris nama: nama + label "Popular" di sampingnya. EDIT: tambah/hapus <span class="pop"> */
.rline{ display:flex; align-items:center; gap:7px; min-width:0; }
.rn{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pop{
  flex:none;
  font-size:9.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:#FBBF24; line-height:1.4;
  background:rgba(245,158,11,.12);
  border:1px solid rgba(245,158,11,.30);
  padding:1px 6px; border-radius:999px;
}
/* keterangan singkat di bawah nama. EDIT teksnya di kolom desc pada microstock.json */
.rdesc{
  display:block; margin-top:2px;
  font-size:11px; font-weight:500; letter-spacing:0; line-height:1.3;
  color:#8D97A4;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
/* tombol "Daftar" = ikon panah saja (teksnya tetap ada untuk pembaca layar) */
.rtag{
  width:34px; height:34px; flex:none;
  display:inline-flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  border-radius:50%;
  transition:background .15s ease, border-color .15s ease;
}
.rtag span{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.rtag svg{ width:15px; height:15px; color:#B4BDC9; }
.card-foot{
  margin-top:12px;
  padding:12px 8px 10px;
  text-align:center;
  font-size:12px; line-height:1.55; color:#929BA8;
  border-top:1px solid var(--stroke-2);
}
.card-foot p{ margin:0; text-wrap:balance; }
/* info referral: di bawah "Links open the official..." */
.card-foot .ref-note{ margin-top:6px; font-size:11.5px; color:#8993A0; }

/* ============ KARTU FOOTER (QUOTE + SOSMED + COPYRIGHT) ============ */
.foot-card{
  background:var(--card-2);
  border:1px solid var(--stroke);
  border-bottom:none;
  border-radius:22px 22px 0 0;
  padding:28px 24px 18px;
  text-align:center;
}
.qicon{ display:flex; justify-content:center; }
.qicon svg{ width:26px; height:26px; color:#46566B; }
.qtext{
  margin-top:14px;
  font-size:15.5px; line-height:1.85; font-style:italic;
  color:#E3E8EF;
}
/* ---- sosmed kecil di dalam kartu footer ---- */
.foot-card .socials{ margin-top:20px; }
.socials{ display:flex; justify-content:center; gap:14px; }
.social{
  width:42px; height:42px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 8px 20px rgba(0,0,0,.35);
  display:flex; align-items:center; justify-content:center;
  text-decoration:none;
  transition:transform .15s ease, filter .15s ease;
}
.social svg{ width:21px; height:21px; display:block; }

/* ---- garis + copyright di dalam kartu footer ---- */
.foot-line{ height:1px; background:rgba(255,255,255,.08); margin:22px 0 14px; }
.copyright{ font-size:13px; line-height:1.6; color:#8A93A0; }

/* ---- tombol kembali ke atas (kotak membulat 12px, bukan lingkaran) ---- */
.to-top{
  position:fixed; right:18px; bottom:18px; z-index:50;
  width:40px; height:40px;
  border-radius:12px;
  background:rgba(24,26,30,.82);
  border:1px solid rgba(255,255,255,.14);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  box-shadow:0 12px 30px rgba(0,0,0,.5);
  display:flex; align-items:center; justify-content:center;
  text-decoration:none;
  color:#C9D2DE;
  /* tersembunyi dulu; class .show ditambahkan oleh JS saat pengunjung sudah di bagian bawah halaman */
  opacity:0; visibility:hidden; pointer-events:none; transform:translateY(10px);
  transition:opacity .25s ease, transform .25s ease, visibility .25s, border-color .15s ease, color .15s ease;
}
.to-top.show{ opacity:1; visibility:visible; pointer-events:auto; transform:none; }
.to-top svg{ width:20px; height:20px; }

/* ---- efek hover (kursor) & efek tekan (layar sentuh) ---- */
a, button{ -webkit-tap-highlight-color:transparent; }
@media (hover:hover){
  .note-card:hover{ transform:translateY(-2px); box-shadow:0 18px 44px rgba(0,0,0,.52); }
  .note-card:hover .note-arrow{ background:rgba(59,130,246,.3); transform:translateX(2px); }
  .tool-tile:hover{ transform:translateY(-2px); box-shadow:0 18px 40px rgba(0,0,0,.5); }
  .tool-tile:hover .tool-go{ background:rgba(59,130,246,.3); transform:translate(2px,-2px); }
  .row:hover{ background:#20252D; border-color:rgba(255,255,255,.14); transform:translateY(-1px); }
  .row:hover .rtag{ background:rgba(59,130,246,.28); border-color:rgba(59,130,246,.45); }
  .social:hover{ transform:translateY(-2px); filter:brightness(1.1); }
  .to-top.show:hover{ transform:translateY(-2px); border-color:rgba(59,130,246,.5); color:#fff; }
}
.note-card:active{ transform:scale(.98); box-shadow:0 8px 20px rgba(0,0,0,.4); }
.note-card:active .note-arrow{ background:rgba(59,130,246,.35); }
.tool-tile:active{ transform:scale(.97); }
.tool-tile:active .tool-go{ background:rgba(59,130,246,.35); }
.row:active .rtag{ background:rgba(59,130,246,.35); }
.row:active{ background:#252B35; border-color:rgba(59,130,246,.45); transform:scale(.98); }
.social:active{ transform:scale(.94); filter:brightness(1.1); }
.to-top.show:active{ transform:scale(.92); }

a:focus-visible{ outline:2px solid var(--blue-soft); outline-offset:3px; border-radius:14px; }

::selection{ background:rgba(59,130,246,.35); color:#fff; }

::-webkit-scrollbar{ width:10px; }
::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.12); border-radius:99px; border:2px solid var(--bg); }
::-webkit-scrollbar-track{ background:transparent; }

@media (prefers-reduced-motion:reduce){
  html{ scroll-behavior:auto; }
  *{ transition:none !important; }
}

/* layar <=340px: panah di kartu CTA disembunyikan (seluruh kartu tetap bisa diklik) agar teks muat 2 baris */
@media (max-width:340px){
  .note-arrow{ display:none; }
}

/* layar sangat kecil: perkecil nama + label agar muat */
@media (max-width:360px){
  .rname{ font-size:13px; }
  .rline{ gap:5px; }
  .pop{ font-size:8.5px; padding:1px 5px; letter-spacing:.04em; }
}

@media (max-width:380px){
  body{ padding:38px 12px 0; }
  .stats{ gap:8px; }
  .stat{ padding:11px 12px; }
  .note-card{ gap:10px; padding:14px; }
  .note-ic{ width:44px; height:44px; border-radius:12px; }
  .note-arrow{ width:28px; height:28px; }
  .note-arrow svg{ width:14px; height:14px; }
  .note-tx small{ font-size:12px; }
  .socials{ gap:12px; }
  .foot-card{ padding:24px 16px 16px; }
  .rname{ font-size:13.5px; }
  .head-tx p{ white-space:normal; }
}
