/* ==========================================================================
   BIEKIN DESIGN — LINK HUB
   Gaya kartu lembut + aksen biru #0E64FC.
   Animasi: entrance stagger, 3D tilt (JS), icon tile, banner gradasi,
   ambient background, cursor pill. Font: Be Vietnam Pro.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  color-scheme: only light;

  --bg: #eef1f6;
  --card: #ffffff;
  --text: #12151c;
  --muted: #5b6472;
  --accent: #0e64fc;
  --accent-soft: #e7efff;   /* latar icon tile */
  --radius: 22px;

  --shadow: 0 1px 2px rgba(18, 26, 43, 0.05), 0 8px 22px rgba(18, 26, 43, 0.06);
  --shadow-hover: 0 4px 8px rgba(14, 100, 252, 0.08), 0 18px 44px rgba(14, 100, 252, 0.16);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100svh;
  color: var(--text);
  font-family: "Be Vietnam Pro", -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Ambient — dua cahaya biru sangat lembut yang bergerak pelan */
body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 32% at 22% 18%, rgba(14, 100, 252, 0.09), transparent 70%),
    radial-gradient(34% 30% at 82% 78%, rgba(14, 100, 252, 0.07), transparent 70%);
  animation: drift 26s ease-in-out infinite alternate;
}

@keyframes drift {
  to {
    transform: translate(4%, 5%) rotate(4deg) scale(1.06);
  }
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

img {
  max-width: 100%;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.spin {
  animation: spin 40s linear infinite;
  transform-origin: 50% 50%;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Entrance stagger — state akhir normal, keyframes hanya "from" */
.anim {
  animation: rise 0.7s var(--ease) backwards;
  animation-delay: calc(0.1s + var(--i, 0) * 0.07s);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
}

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.page {
  width: min(100% - 2.5rem, 520px);
  margin-inline: auto;
  padding-block: clamp(1rem, 4vw, 1.75rem) clamp(2.5rem, 8vw, 4rem);
}

/* --------------------------------------------------------------------------
   4. Top bar
   -------------------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chip {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--card);
  color: var(--accent);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.chip svg {
  width: 21px;
  height: 21px;
}

.chip:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-hover);
}

.chip:active {
  transform: scale(0.92);
}

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */
.head {
  margin-top: -2.4rem; /* judul sejajar dengan tombol pojok */
  text-align: center;
}

.head__title {
  padding-inline: 4rem; /* ruang aman untuk tombol 46px kiri-kanan */
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.head__tagline {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: clamp(1rem, 3.9vw, 1.15rem);
  line-height: 1.45;
  text-wrap: balance;
}

.head__status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.head__dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.head__dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
  animation: pulse 2.6s ease-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.4);
    opacity: 0.9;
  }
  70%,
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   6. Link cards
   -------------------------------------------------------------------------- */
.links {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: clamp(1.75rem, 6vw, 2.5rem);
}

.card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 0.55rem;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  will-change: transform;
  transition: box-shadow 0.35s var(--ease);
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

.card:active {
  transform: scale(0.98);
}

.card__label {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: clamp(1rem, 3.7vw, 1.18rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
  transition: color 0.3s ease;
}

.card:hover .card__label {
  color: var(--accent);
}

/* Icon tile kiri */
.tile {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  transition: transform 0.4s var(--ease);
}

.tile svg {
  width: 26px;
  height: 26px;
}

.card:hover .tile {
  transform: scale(1.08) rotate(-4deg);
}

/* Penyeimbang label supaya teks tetap di tengah kartu */
.tile + .card__label {
  margin-right: calc(64px + 12px);
}

/* Panah kecil muncul saat hover */
.card__arrow {
  position: absolute;
  right: 1.1rem;
  top: 50%;
  width: 16px;
  height: 16px;
  color: var(--accent);
  opacity: 0;
  transform: translateY(-50%) translate(-8px, 8px);
  transition: opacity 0.3s ease, transform 0.4s var(--ease);
}

.card__arrow svg {
  width: 100%;
  height: 100%;
}

.card:hover .card__arrow,
.card:focus-visible .card__arrow {
  opacity: 1;
  transform: translateY(-50%) translate(0, 0);
}

/* ---- Kartu utama (website) ---- */
.card--feature {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding-bottom: 0;
}

.banner {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border-radius: 17px;
  overflow: hidden;
  background: linear-gradient(135deg, #0a4fd6 0%, var(--accent) 45%, #5f97ff 100%);
  color: #fff;
}

/* Kolase karya: 1 gambar besar kiri + 2 bertumpuk kanan */
.banner__grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 5px;
}

.banner__grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease);
}

.banner__grid img:first-child {
  grid-row: 1 / 3;
  object-position: center 72%;
}

.card--feature:hover .banner__grid img {
  transform: scale(1.06);
}

/* Gradasi tipis di bawah supaya label tetap terbaca */
.banner__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 16, 34, 0) 55%, rgba(8, 16, 34, 0.55) 100%);
}

.banner__url {
  position: absolute;
  left: 1.1rem;
  bottom: 0.9rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Kilau menyapu banner saat hover */
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
  transform: translateX(-120%);
}

.card--feature:hover .banner::after {
  animation: shine 0.9s var(--ease);
}

@keyframes shine {
  to {
    transform: translateX(120%);
  }
}

.card--feature .card__label {
  margin-right: 0;
  padding-block: 1.05rem;
}

/* --------------------------------------------------------------------------
   7. Footer
   -------------------------------------------------------------------------- */
.foot {
  margin-top: clamp(2rem, 7vw, 2.75rem);
  color: var(--muted);
  font-size: 0.8125rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   8. Toast (konfirmasi share) + cursor pill
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 10;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.cursor-tag {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  padding: 0.55em 0.95em;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  transition: opacity 0.25s ease;
  will-change: transform;
}

.cursor-tag.is-on {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   9. Layar kecil
   -------------------------------------------------------------------------- */
@media (max-width: 420px) {
  .tile {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .tile + .card__label {
    margin-right: calc(56px + 12px);
  }

  .card {
    min-height: 72px;
  }
}

/* --------------------------------------------------------------------------
   10. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
  }

  body::before,
  .spin,
  .head__dot::after {
    animation: none !important;
  }

  .cursor-tag {
    display: none !important;
  }
}
