/* =========================================================================
   Kho Giày Tâm 1 — Landing (link-in-bio)
   Theme: HỒNG PASTEL dễ thương. Mobile-first, responsive, có hiệu ứng.
   (Tên biến giữ nguyên --purple-* cho tương thích, nhưng GIÁ TRỊ là tông hồng.)
   ========================================================================= */

:root {
  /* Màu nền gradient (hồng nhạt) */
  --bg-1: #ffe3ef;
  --bg-2: #ffd8e8;
  --bg-3: #fff2f7;

  /* Hồng thương hiệu */
  --purple-900: #8f1d48; /* chữ đậm nhất */
  --purple-700: #be185d;
  --purple-600: #db2777;
  --purple-500: #ec4899;
  --purple-400: #f472b6;
  --purple-200: #fbcfe8;
  --purple-100: #fde7f1;

  --ink: #7a3f5a;
  --ink-soft: #b06d8a;

  --white: #ffffff;

  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;

  --shadow-soft: 0 10px 30px rgba(236, 72, 153, 0.16);
  --shadow-btn: 0 8px 20px rgba(236, 72, 153, 0.18);
  --shadow-primary: 0 12px 26px rgba(236, 72, 153, 0.4);

  --font-head: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-script: "Dancing Script", "Fredoka", cursive;

  --maxw: 460px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1100px 700px at 15% -5%, var(--bg-3), transparent 60%),
    radial-gradient(1000px 800px at 110% 10%, #ffd0e4, transparent 55%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2) 55%, #ffe6f1);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ====================== Lớp trang trí nền ====================== */
.decor-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.decor-item {
  position: absolute;
  display: block;
  transform: scale(var(--s, 1));
  opacity: 0.5;
  animation: floaty var(--dur, 9s) ease-in-out var(--delay, 0s) infinite;
  will-change: transform;
}
.decor-item svg { display: block; }
.d-cloud { width: 72px; color: #ffffff; opacity: 0.78; }
.d-paw   { width: 30px; color: #f6b9d4; opacity: 0.5; }
.d-star  { width: 20px; color: #f7a8cc; opacity: 0.6; }
.d-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, #f8b4d2);
  opacity: 0.65;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0) scale(var(--s, 1)); }
  50%      { transform: translateY(-18px) scale(var(--s, 1)); }
}

/* ====================== Khung trang ====================== */
.page {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  padding: clamp(18px, 5vw, 44px) 18px calc(40px + env(safe-area-inset-bottom));
}
.card {
  width: 100%;
  max-width: var(--maxw);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Hiệu ứng vào trang: các khối mờ dần + trượt lên */
.card > * {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.6s cubic-bezier(.2,.7,.25,1) forwards;
}
.card > .banner        { animation-delay: .02s; }
.card > .avatar-wrap   { animation-delay: .10s; }
.card > .brand-name    { animation-delay: .16s; }
.card > .badge         { animation-delay: .22s; }
.card > .welcome       { animation-delay: .28s; }
.card > .links         { animation-delay: .34s; }
.card > .note          { animation-delay: .44s; }
.card > .foot          { animation-delay: .52s; }
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* ====================== Banner ====================== */
.banner {
  position: relative;
  width: 100%;
  border-radius: var(--radius-xl);
  padding: 20px 20px 50px;
  background:
    linear-gradient(135deg, #ffd9ec 0%, #ffcfe4 45%, #ffe4f1 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  text-align: center;
}
.banner-glow {
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 120%;
  background: radial-gradient(60% 60% at 50% 0%, rgba(255,255,255,.7), transparent 70%);
  pointer-events: none;
}
.banner-logo {
  position: relative;
  margin: 2px auto 10px;
  width: 62px; height: 62px;
  border-radius: 18px;
  display: grid; place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--purple-400), var(--purple-600));
  box-shadow: 0 6px 14px rgba(236,72,153,.3);
}
.banner-logo img { width: 100%; height: 100%; object-fit: cover; }
.logo-fallback {
  font-family: var(--font-head);
  font-weight: 700;
  color: #fff;
  font-size: 20px;
}
.banner-body { position: relative; }
.banner-title {
  position: relative;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(24px, 7.5vw, 32px);
  letter-spacing: .5px;
  margin: 0 0 12px;
  color: var(--purple-700);
  text-shadow: 0 2px 0 rgba(255,255,255,.6);
}
.banner-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 3px 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.mini-ic {
  width: 16px; height: 16px;
  flex: 0 0 16px;
  display: inline-block;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.mini-fb    { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231877f2' d='M22 12.06C22 6.5 17.52 2 12 2S2 6.5 2 12.06c0 5 3.66 9.15 8.44 9.94v-7.03H7.9v-2.9h2.54V9.85c0-2.52 1.49-3.91 3.78-3.91 1.1 0 2.24.2 2.24.2v2.47h-1.26c-1.24 0-1.63.78-1.63 1.57v1.88h2.78l-.44 2.9h-2.34V22c4.78-.79 8.44-4.94 8.44-9.94Z'/%3E%3C/svg%3E"); }
.mini-page  { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23db2777' d='M4 4h16a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Zm2 3v2h12V7H6Zm0 4v2h12v-2H6Zm0 4v2h8v-2H6Z'/%3E%3C/svg%3E"); }
.mini-phone { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23db2777' d='M6.62 10.79a15.53 15.53 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.02-.24c1.12.37 2.33.57 3.57.57a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.24.2 2.45.57 3.57a1 1 0 0 1-.24 1.02l-2.21 2.2Z'/%3E%3C/svg%3E"); }
.banner-note {
  position: relative;
  margin: 12px 0 2px;
  padding: 8px 12px;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 700;
  font-style: italic;
  color: var(--purple-700);
  background: rgba(255,255,255,.62);
  border-radius: 10px;
}

/* ====================== Avatar ====================== */
.avatar-wrap {
  position: relative;
  margin-top: -56px;
  width: 128px; height: 128px;
  display: grid; place-items: center;
}
.avatar-ring {
  position: absolute; inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #f472b6, #ffd1ec, #ec4899, #f9a8d4, #f472b6);
  animation: spin 7s linear infinite;
  filter: blur(.3px);
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar {
  position: relative;
  width: 112px; height: 112px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--purple-200), var(--purple-400));
  border: 5px solid #fff;
  box-shadow: 0 10px 24px rgba(236,72,153,.28);
  display: grid; place-items: center;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-fallback {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 40px;
  color: #fff;
}

/* ====================== Tên / badge / welcome ====================== */
.brand-name {
  font-family: var(--font-script);
  font-weight: 700;
  font-size: clamp(40px, 12vw, 58px);
  line-height: 1.05;
  margin: 14px 0 10px;
  color: var(--purple-600);
  text-align: center;
  letter-spacing: 0;
  text-shadow: 0 3px 0 rgba(255,255,255,.7), 0 10px 24px rgba(236,72,153,.22);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple-400), var(--purple-600));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-btn);
}
.badge svg { width: 15px; height: 15px; color: #ffe3f1; }
.welcome {
  margin: 16px 6px 8px;
  text-align: center;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 380px;
}

/* ====================== Nút liên kết ====================== */
.links {
  width: 100%;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.link-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-btn);
  text-decoration: none;
  color: var(--purple-900);
  font-weight: 700;
  font-size: 15.5px;
  overflow: hidden;
  border: 1.5px solid rgba(236,72,153,.08);
  transition: transform .2s cubic-bezier(.2,.7,.25,1), box-shadow .2s, background .2s;
  isolation: isolate;
  opacity: 0;
  transform: translateY(10px);
  animation: linkIn .5s ease forwards;
  animation-delay: calc(var(--d, 0ms) + .34s);
}
@keyframes linkIn { to { opacity: 1; transform: translateY(0); } }
.link-btn:hover {
  transform: translateY(-3px) scale(1.012);
  box-shadow: 0 16px 30px rgba(236,72,153,.26);
}
.link-btn:active { transform: translateY(0) scale(.99); }

.link-btn--primary {
  background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-primary);
}
.link-btn--primary .link-ic { background: rgba(255,255,255,.2); color: #fff; }
.link-btn--primary .link-chev { color: rgba(255,255,255,.85); }

.link-ic {
  flex: 0 0 42px;
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  color: #fff;
}
.link-ic svg { width: 22px; height: 22px; }
.ic--facebook { background: linear-gradient(135deg, #2b6bff, #1877f2); }
.ic--tiktok   { background: linear-gradient(135deg, #111, #2b2b2b); }
.ic--zalo     { background: linear-gradient(135deg, #0a8cff, #0068ff); }
.ic--phone    { background: linear-gradient(135deg, #f472b6, #db2777); }

.link-label { flex: 1; }
.link-chev {
  flex: 0 0 auto;
  color: var(--purple-400);
  display: grid; place-items: center;
  transition: transform .2s;
}
.link-chev svg { width: 20px; height: 20px; }
.link-btn:hover .link-chev { transform: translateX(4px); }

/* Ripple khi nhấn */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(236,72,153,.18);
  transform: scale(0);
  animation: ripple .55s ease-out;
  pointer-events: none;
  z-index: -1;
}
.link-btn--primary .ripple { background: rgba(255,255,255,.3); }
@keyframes ripple { to { transform: scale(2.4); opacity: 0; } }

/* ====================== Hộp lưu ý ====================== */
.note {
  width: 100%;
  margin-top: 22px;
  display: flex;
  gap: 12px;
  padding: 16px 16px;
  border-radius: var(--radius-md);
  background: #fff0f6;
  border: 1.5px dashed #f9a8d4;
}
.note-ic {
  flex: 0 0 30px;
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #f8a3cb, #ec4899);
  color: #fff;
}
.note-ic svg { width: 18px; height: 18px; }
.note-title { margin: 0 0 4px; font-weight: 800; font-size: 13.5px; color: #a01452; line-height: 1.45; }
.note-body  { margin: 0; font-size: 12.5px; color: #c23b7a; line-height: 1.5; }

/* ====================== Footer ====================== */
.foot {
  margin-top: 26px;
  text-align: center;
}
.foot-heart { display: inline-block; color: var(--purple-400); }
.foot-heart svg { width: 22px; height: 22px; animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 0%,100%{transform:scale(1)} 15%{transform:scale(1.18)} 30%{transform:scale(1)} }
.copyright {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--purple-600);
  margin: 6px 0 8px;
  font-size: 15px;
}
.foot-links {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  display: flex; gap: 10px; justify-content: center; align-items: center;
}
.foot-links a { color: var(--ink-soft); text-decoration: none; transition: color .2s; }
.foot-links a:hover { color: var(--purple-600); text-decoration: underline; }

/* ====================== Tinh chỉnh ====================== */
@media (min-width: 520px) {
  .link-btn { font-size: 16px; padding: 16px 20px; }
}

/* Giảm hiệu ứng nếu người dùng yêu cầu */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .card > * { opacity: 1; transform: none; }
}

/* Chống nháy trước khi JS chạy */
body:not(.ready) .page { visibility: hidden; }

/* Focus rõ ràng cho bàn phím */
a:focus-visible, .link-btn:focus-visible {
  outline: 3px solid var(--purple-500);
  outline-offset: 3px;
}
