/* =========================================================
   page-home.css
   首頁（廠商缺貨通知系統入口）
   依賴：ewoooc-tokens.css → ewoooc-tokens-v2-alias.css → ewoooc-shell.css
   ========================================================= */

.home-page {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ---------- Hero ---------- */
.home-hero {
  position: relative;
  overflow: hidden;
  padding: 2.4rem 2rem;
  border: 1px solid var(--momo-border-strong);
  border-radius: 12px;
  background: var(--momo-surface-raised);
  box-shadow: var(--momo-shadow-soft);
}

.home-hero__lead {
  position: relative;
  z-index: 2;
  max-width: 70%;
}

.home-hero__title {
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--momo-font-display);
  font-size: clamp(1.7rem, 2.4vw, 2.4rem);
  font-weight: 800;
  color: var(--momo-text-strong);
  letter-spacing: 0;
}

.home-hero__title i {
  color: var(--momo-page-accent);
}

.home-hero__subtitle {
  margin: 0;
  color: var(--momo-text-muted);
  font-size: 1.02rem;
  line-height: 1.5;
}

/* 右側裝飾：點陣 + 對角線條 */
.home-hero__decor {
  position: absolute;
  inset: 0 0 0 auto;
  width: 32%;
  pointer-events: none;
  background: color-mix(in srgb, var(--momo-tag-honey) 10%, var(--momo-surface-raised));
  opacity: 0.6;
  z-index: 1;
}

@media (max-width: 768px) {
  .home-hero { padding: 1.6rem 1.2rem; }
  .home-hero__lead { max-width: 100%; }
  .home-hero__decor { display: none; }
}

/* ---------- Function Cards ---------- */
.home-cards {
  margin-bottom: 0.4rem;
}

.fn-card {
  position: relative;
  height: 100%;
  background: var(--momo-surface);
  border: 1px solid var(--momo-border-strong);
  border-radius: 12px;
  box-shadow: var(--momo-shadow-soft);
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 220ms ease,
              border-color 220ms ease;
  overflow: hidden;
  /* 頂部 4px accent 條（用 ::before） */
}

.fn-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--fn-accent, var(--momo-page-accent));
}

.fn-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px color-mix(in srgb, var(--fn-accent, var(--momo-page-accent)) 18%, transparent);
  border-color: color-mix(in srgb, var(--fn-accent, var(--momo-page-accent)) 35%, var(--momo-border-strong));
}

.fn-card__body {
  padding: 2rem 1.6rem 1.8rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.fn-card__icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 1.3rem;
  background: color-mix(in srgb, var(--fn-accent, var(--momo-page-accent)) 12%, var(--momo-surface));
  border: 1px solid color-mix(in srgb, var(--fn-accent, var(--momo-page-accent)) 25%, var(--momo-border-subtle));
  transition: transform 300ms ease, background 300ms ease;
}

.fn-card:hover .fn-card__icon-wrap {
  transform: scale(1.05) rotate(-3deg);
  background: color-mix(in srgb, var(--fn-accent, var(--momo-page-accent)) 18%, var(--momo-surface));
}

.fn-card__icon-wrap i {
  font-size: 2.4rem;
  color: var(--fn-accent, var(--momo-page-accent));
}

.fn-card__title {
  font-family: var(--momo-font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--momo-text-strong);
  margin: 0 0 0.6rem;
  letter-spacing: 0;
}

.fn-card__desc {
  color: var(--momo-text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 1.4rem;
  flex: 1;
}

.fn-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem 0.65rem 1.2rem;
  border-radius: 999px;
  background: var(--fn-accent, var(--momo-page-accent));
  color: var(--momo-on-accent, var(--momo-on-accent, #fff8ef));
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--fn-accent, var(--momo-page-accent)) 80%, var(--momo-text-strong));
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.fn-card__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px color-mix(in srgb, var(--fn-accent, var(--momo-page-accent)) 35%, transparent);
  color: var(--momo-on-accent, var(--momo-on-accent, #fff8ef));
}

.fn-card__cta-arrow {
  margin-left: 0.2rem;
  font-size: 0.78rem;
  transition: transform 220ms ease;
}

.fn-card:hover .fn-card__cta-arrow {
  transform: translateX(3px);
}

/* variants：只覆寫 --fn-accent，所有元素自動跟上 */
.fn--list    { --fn-accent: var(--momo-tag-olive); }
.fn--vendor  { --fn-accent: var(--momo-tag-mahogany); }
.fn--history { --fn-accent: var(--momo-tag-honey); }
.fn--import  { --fn-accent: var(--momo-page-accent); }

/* ---------- Manual / Help ---------- */
.home-manual {
  background: var(--momo-surface);
  border: 1px solid var(--momo-border-strong);
  border-radius: 12px;
  padding: 1.8rem 1.8rem 1.6rem;
  box-shadow: var(--momo-shadow-soft);
}

.home-manual__head {
  border-bottom: 1px solid var(--momo-border-subtle);
  padding-bottom: 0.9rem;
  margin-bottom: 1.2rem;
}

.home-manual__title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--momo-font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--momo-text-strong);
}

.home-manual__title i {
  color: var(--momo-tag-mahogany);
}

.home-manual__subhead {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--momo-text-strong);
  margin: 0 0 0.7rem;
}

.home-manual__subhead i {
  color: var(--momo-page-accent);
  font-size: 0.85em;
}

.home-manual__subhead--alt i {
  color: var(--momo-tag-olive);
}

.home-manual__list {
  margin: 0;
  padding-left: 1.3rem;
  color: var(--momo-text-muted);
  font-size: 0.9rem;
  line-height: 1.85;
}

.home-manual__list li::marker {
  color: var(--momo-text-muted);
}

.home-manual__list--ordered li::marker {
  font-weight: 700;
  color: var(--momo-page-accent);
}
