/* ============================================================
   LONGGE LINKTREE — style.css
   冷粉玫瑰 · 清新母嬰風  #fff0f4
   ============================================================ */


/* ── 1. CSS Variables ─────────────────────────────────────── */

:root {
  --c-bg:           #fff7f9;        /* 極淡粉白 */
  --c-surface:      #ffffff;        /* 白色卡片 */
  --c-text-1:       #3d1a2e;        /* 深紫粉，主文字（卡片內） */
  --c-text-2:       #8a4068;        /* 次要文字 */
  --c-text-3:       #b87098;        /* 輔助文字 */

  /* on-bg：冷粉淡底 → 文字用深色 */
  --c-on-bg-1:      #3d1a2e;
  --c-on-bg-2:      rgba(61, 26, 46, 0.68);
  --c-on-bg-3:      rgba(61, 26, 46, 0.42);

  /* 品牌粉：按鈕、徽章、重點色 */
  --c-pink:         #e8608a;
  --c-pink-h:       #d44d78;
  --c-pink-light:   #f5a0bc;
  --c-pink-soft:    rgba(232, 96, 138, 0.10);

  /* 卡片內 accent = 與 --c-pink 同 */
  --c-accent:       #e8608a;
  --c-accent-h:     #d44d78;
  --c-accent-soft:  rgba(232, 96, 138, 0.10);

  --c-border:       rgba(232, 96, 138, 0.20);   /* 卡片邊框 */
  --c-card-border:  rgba(232, 96, 138, 0.20);

  --shadow-card:  0 3px 16px rgba(180, 60, 100, 0.10);
  --shadow-hover: 0 8px 28px rgba(180, 60, 100, 0.18);

  --r-card: 18px;
  --r-badge: 999px;
  --r-full:  999px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Helvetica Neue", Arial, "PingFang TC", "Noto Sans TC",
          "Microsoft JhengHei", sans-serif;

  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --t-fast: 180ms;
  --t-mid:  300ms;
  --t-slow: 540ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-bg:         #2d0a1e;
    --c-surface:    #3d1430;
    --c-text-1:     #fff0f8;
    --c-text-2:     #e0a0c8;
    --c-text-3:     #a06080;

    --c-on-bg-1:    #ffffff;
    --c-on-bg-2:    rgba(255, 255, 255, 0.78);
    --c-on-bg-3:    rgba(255, 255, 255, 0.50);

    --c-pink:       #f080aa;
    --c-pink-h:     rgba(240, 128, 170, 0.85);
    --c-pink-light: #e86090;
    --c-pink-soft:  rgba(240, 128, 170, 0.14);

    --c-accent:      #f080aa;
    --c-accent-h:    #f5a0c0;
    --c-accent-soft: rgba(240, 128, 170, 0.16);

    --c-border:     rgba(240, 128, 170, 0.25);
    --c-card-border: rgba(240, 128, 170, 0.30);

    --shadow-card:  0 3px 16px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.50);
  }
}


/* ── 2. Reset ─────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background-color: var(--c-bg);
  background-image: url('assets/背景圖.jpg');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  color: var(--c-text-1);
  line-height: 1.55;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a   { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--c-pink);
  outline-offset: 3px;
  border-radius: 4px;
}


/* ── 3. Page Loader ───────────────────────────────────────── */

#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--c-bg);
  background-image: url('assets/背景圖.jpg');
  background-size: cover;
  background-position: center top;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--t-mid) var(--ease-out), visibility var(--t-mid);
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-ring {
  width: 34px;
  height: 34px;
  border: 2.5px solid rgba(232, 96, 138, 0.20);
  border-top-color: var(--c-pink);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

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


/* ── 4. Background ────────────────────────────────────────── */

.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* 半透明白色遮罩 + 光暈，讓背景圖柔和、文字清晰 */
  background:
    linear-gradient(rgba(255, 247, 249, 0.62), rgba(255, 240, 248, 0.72)),
    radial-gradient(ellipse 100% 50% at 50% 0%,   rgba(255, 200, 225, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 80%  60% at 10% 100%,  rgba(200, 130, 175, 0.10) 0%, transparent 60%);
}

@media (prefers-color-scheme: dark) {
  .bg-gradient {
    background:
      linear-gradient(rgba(20, 5, 15, 0.55), rgba(30, 8, 22, 0.65)),
      radial-gradient(ellipse 100% 50% at 50% 0%,  rgba(240, 100, 160, 0.15) 0%, transparent 55%),
      radial-gradient(ellipse 80%  60% at 10% 100%, rgba(80,  20,  50, 0.25) 0%, transparent 60%);
  }
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 360px;
  height: 360px;
  background: rgba(255, 180, 215, 0.28);   /* 粉紅光暈（淡化） */
  top: -80px;
  right: -80px;
  animation: float 9s ease-in-out infinite;
}

.orb-2 {
  width: 280px;
  height: 280px;
  background: rgba(180, 100, 150, 0.10);   /* 玫瑰暗角（淡化） */
  bottom: 10%;
  left: -70px;
  animation: float 11s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-22px); }
}


/* ── 5. Layout ────────────────────────────────────────────── */

#main {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 18px 72px;
}


/* ── 6. Hero ──────────────────────────────────────────────── */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 0 36px;
  text-align: center;
  animation: heroEnter var(--t-slow) var(--ease-spring) both;
}

@keyframes heroEnter {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Optional avatar */
.avatar-container {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 18px;
}

.avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--c-pink), var(--c-pink-light), var(--c-pink));
  animation: ringRotate 5s linear infinite;
  z-index: 0;
}

/* 這一層 ::after 用底色填出「間距」，讓頭像和彩圈分開 */
.avatar-ring::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--c-bg);          /* 冷粉底色 = 間距顏色 */
  transition: background var(--t-mid);
}

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

.avatar {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--c-surface);
  box-shadow: 0 4px 16px rgba(232, 96, 138, 0.18);
}

.avatar-fallback {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-pink-soft), rgba(255,182,200,0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  border: 3px solid var(--c-surface);
}

/* Name */
.hero-name {
  font-size: clamp(2.2rem, 9vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--c-on-bg-1);          /* 深色字，在淡粉底上 */
  line-height: 1.1;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
  text-shadow: 0 2px 8px rgba(180, 60, 100, 0.12);
}

/* 玫瑰粉底線 */
.hero-name::after {
  content: '';
  display: block;
  width: 60%;
  height: 4px;
  background: var(--c-pink);
  border-radius: 2px;
  margin: 8px auto 0;
  opacity: 0.75;
}

.hero-tagline {
  font-size: 0.92rem;
  color: var(--c-on-bg-2);
  margin-bottom: 6px;
  max-width: 280px;
}

.hero-sub {
  font-size: 0.88rem;
  color: var(--c-on-bg-2);
  margin-bottom: 24px;
}

/* Social icons */
.socials {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(232, 96, 138, 0.10);
  border: 1.5px solid rgba(232, 96, 138, 0.28);
  box-shadow: 0 2px 8px rgba(180, 60, 100, 0.08);
  color: var(--c-pink);
  transition:
    transform var(--t-fast) var(--ease-spring),
    box-shadow var(--t-fast),
    background var(--t-fast),
    border-color var(--t-fast);
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: var(--c-pink);
  transition: fill var(--t-fast);
}

.social-link:hover {
  transform: translateY(-3px) scale(1.1);
  background: var(--c-pink);
  border-color: var(--c-pink);
  box-shadow: 0 6px 18px rgba(232, 96, 138, 0.30);
}

.social-link:hover svg { fill: #ffffff; }
.social-link:active    { transform: scale(0.90); }


/* ── 7. Section Heading ───────────────────────────────────── */

.section-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-on-bg-1);          /* 深色字，在淡粉底上 */
  text-align: center;
  margin: 32px 0 18px;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--t-mid) var(--ease-out), transform var(--t-mid) var(--ease-spring);
}

.section-heading.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ── 8. Link Cards ────────────────────────────────────────── */

.links-section  { margin-bottom: 8px; }

.links-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--r-card);
  background: var(--c-surface);
  border: 2px solid var(--c-card-border);
  box-shadow: var(--shadow-card);
  color: var(--c-text-1);
  cursor: pointer;
  position: relative;
  overflow: visible;

  opacity: 0;
  transform: translateY(18px);
}

.link-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity    var(--t-mid)  var(--ease-out),
    transform  var(--t-mid)  var(--ease-spring),
    box-shadow var(--t-fast),
    border-color var(--t-fast),
    background var(--t-fast);
}

.link-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--c-pink);
}

.link-card:active { transform: scale(0.97); }

/* Badge — top-right corner */
.link-card-badge {
  position: absolute;
  top: -13px;
  right: 14px;
  background: var(--c-pink-light);
  color: #ffffff;
  font-size: 0.70rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: var(--r-badge);
  white-space: nowrap;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px rgba(232, 96, 138, 0.28);
}

@media (prefers-color-scheme: dark) {
  .link-card-badge {
    background: var(--c-pink);
    color: #ffffff;
  }
}

.link-card-badge.ongoing {
  background: var(--c-pink);   /* 深玫瑰粉 */
}

/* Icon */
.link-card-icon {
  flex-shrink: 0;
  font-size: 1.6rem;
  width: 40px;
  text-align: center;
  line-height: 1;
}

/* Text */
.link-card-text { flex: 1; min-width: 0; }

.link-card-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--c-text-1);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-card-desc {
  font-size: 0.80rem;
  color: var(--c-text-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-card-arrow {
  flex-shrink: 0;
  color: var(--c-pink-light);
  opacity: 0.7;
  transition: transform var(--t-fast) var(--ease-spring), opacity var(--t-fast);
}

.link-card-arrow svg { width: 14px; height: 14px; fill: currentColor; }
.link-card:hover .link-card-arrow { transform: translateX(3px); opacity: 1; }


/* ── 9. Featured Section ──────────────────────────────────── */

.featured-section { margin-bottom: 40px; }

.featured-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-on-bg-1);
  text-align: center;
  margin: 32px 0 16px;
}

.featured-card {
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--c-surface);
  border: 2px solid var(--c-card-border);
  box-shadow: var(--shadow-card);
  transition: transform var(--t-mid) var(--ease-spring), box-shadow var(--t-mid);
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.featured-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--c-pink-soft);
}

.featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease-out);
}

.featured-card:hover .featured-img { transform: scale(1.03); }

.featured-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: linear-gradient(135deg, rgba(255,182,200,0.2), rgba(232,96,138,0.08));
}

.featured-body { padding: 18px 18px 20px; }

.featured-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--c-pink);
  background: var(--c-pink-soft);
  padding: 3px 10px;
  border-radius: var(--r-full);
  margin-bottom: 8px;
}

.featured-text {
  font-size: 0.92rem;
  color: var(--c-text-2);
  line-height: 1.65;
  margin-bottom: 16px;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--c-pink);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 11px 24px;
  border-radius: var(--r-full);
  box-shadow: 0 4px 16px rgba(232, 96, 138, 0.32);
  transition:
    background  var(--t-fast),
    transform   var(--t-fast) var(--ease-spring),
    box-shadow  var(--t-fast);
}

.btn-cta:hover {
  background: var(--c-pink-h);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 96, 138, 0.42);
}

.btn-cta:active { transform: scale(0.95); box-shadow: none; }


/* ── 10. Scroll Reveal ────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity   var(--t-slow) var(--ease-out),
    transform var(--t-slow) var(--ease-spring);
}

.reveal.visible { opacity: 1; transform: translateY(0); }


/* ── 11. Footer ───────────────────────────────────────────── */

.footer {
  text-align: center;
  padding: 16px 0 env(safe-area-inset-bottom, 0);
  color: var(--c-on-bg-3);          /* 淡深色 */
  font-size: 0.80rem;
  line-height: 2;
}


/* ── 12. Responsive ───────────────────────────────────────── */

@media (min-width: 600px) {
  #main { padding: 0 28px 88px; }
  .hero { padding: 72px 0 44px; }
  .link-card { padding: 18px 22px; }
  .link-card-title { font-size: 1.02rem; }
}


/* ── 13. Reduced Motion ───────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .link-card, .reveal, .section-heading { opacity: 1; transform: none; }
}


/* ── 14. Utilities ────────────────────────────────────────── */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
