:root {
  --bg: #fff8ec;
  --card-bg: #fffdf7;

  --main: #00bfa6;
  --main-dark: #008f80;
  --main-light: #b8eee4;

  --accent: #ff6b4a;
  --accent-light: #ffe0d7;

  --yellow: #ffd76a;
  --text: #263b38;
  --muted: #7a8a86;

  --cream-border: #f2dfbd;
  --shadow: rgba(0, 143, 128, 0.14);
}

/* 全域設定 */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;

  font-family: Arial, "Noto Sans TC", sans-serif;
  color: var(--text);

  /*
    粉彩紙材質背景：
    不是圖片，是用多層漸層模擬紙張纖維與柔霧色塊。
  */
  background:
    radial-gradient(circle at 18% 12%, rgba(230, 255, 248, 0.95) 0, transparent 32%),
    radial-gradient(circle at 82% 88%, rgba(255, 231, 220, 0.9) 0, transparent 34%),
    radial-gradient(circle at 70% 20%, rgba(255, 215, 106, 0.22) 0, transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.55) 25%, transparent 25%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.32) 25%, transparent 25%),
    var(--bg);

  background-size:
    auto,
    auto,
    auto,
    18px 18px,
    22px 22px,
    auto;
}

/* 整頁容器 */
.ecard-page {
  position: relative;

  min-height: 100vh;
  padding: 24px 18px;

  display: flex;
  justify-content: center;
  align-items: center;

  overflow: hidden;
}

/* 頁面紙張顆粒感 */
.ecard-page::before {
  content: "";
  position: absolute;
  inset: 0;

  background-image:
    radial-gradient(circle, rgba(38, 59, 56, 0.055) 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 107, 74, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 40%, rgba(0, 191, 166, 0.05));

  background-size:
    11px 11px,
    17px 17px,
    100% 100%;

  opacity: 0.45;
  pointer-events: none;
}

/* CSS-only 開關 */
.enter-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* 電子名片主體 */
.ecard {
  position: relative;
  z-index: 1;

  width: 100%;
  max-width: 430px;
  min-height: 640px;

  padding: 30px 22px 24px;

  border: 2px solid var(--main-light);
  border-radius: 36px;

  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.96), rgba(255, 249, 235, 0.94)),
    var(--card-bg);

  box-shadow:
    0 24px 60px var(--shadow),
    inset 0 0 0 1px rgba(255, 255, 255, 0.65);

  text-align: center;
  overflow: hidden;
}

/* eCard 內部紙張紋理 */
.ecard::before {
  content: "";
  position: absolute;
  inset: 0;

  background-image:
    radial-gradient(circle, rgba(0, 143, 128, 0.06) 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 107, 74, 0.055) 1px, transparent 1px),
    linear-gradient(115deg, rgba(255, 255, 255, 0.28), transparent 48%, rgba(242, 223, 189, 0.22));

  background-size:
    13px 13px,
    19px 19px,
    100% 100%;

  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

/* 內容層級 */
.brand,
.enter-button,
.portal-list,
.footer,
.star,
.circle,
.paper-dots {
  position: relative;
  z-index: 2;
}

/* 品牌區 */
.brand {
  margin-bottom: 20px;
}

.brand-logo {
  width: 190px;
  max-width: 80%;

  display: block;
  margin: 0 auto 16px;
}

.brand-subtitle {
  margin: 0 0 10px;

  color: var(--main-dark);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.main-title {
  margin: 0 0 12px;

  color: var(--accent);
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: 1.2px;
}

.brand-description {
  margin: 0;

  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}


/* TAP TO ENTER */
.enter-button {
  width: 210px;
  min-height: 52px;

  margin: 0 auto;

  display: flex;
  justify-content: center;
  align-items: center;

  border: 2px solid var(--accent);
  border-radius: 999px;

  background: var(--accent);
  color: #ffffff;

  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.5px;

  cursor: pointer;

  box-shadow: 0 12px 24px rgba(255, 107, 74, 0.22);
}

/* 入口清單：預設不顯示 */
.portal-list {
  display: none;

  margin-top: 24px;
  flex-direction: column;
  gap: 12px;
}

/* 點擊 enter 後 */
.enter-toggle:checked ~ .ecard .enter-button {
  display: none;
}

.enter-toggle:checked ~ .ecard .portal-list {
  display: flex;
}

/* 入口按鈕 */
.portal {
  width: 100%;
  min-height: 64px;

  padding: 12px 18px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;

  border: 2px solid var(--main);
  border-radius: 24px;

  background: rgba(255, 255, 255, 0.86);
  color: var(--text);

  text-decoration: none;
  text-align: left;

  box-shadow: 0 8px 20px rgba(0, 191, 166, 0.08);
}

.portal:hover {
  background: #ffffff;
}

.portal-title {
  margin-bottom: 4px;

  color: var(--main-dark);
  font-size: 16px;
  font-weight: 800;
}

.portal-text {
  color: var(--muted);
  font-size: 13px;
}

/* 各入口顏色 */
.portal-line {
  border-color: var(--accent);
}

.portal-line .portal-title {
  color: var(--accent);
}

.portal-fb {
  border-color: var(--cream-border);
}

.portal-fb .portal-title {
  color: #8a7653;
}

/* Contact 展開卡片 */
.contact-box {
  border: 2px solid var(--yellow);
  border-radius: 24px;

  background: rgba(255, 250, 240, 0.9);

  text-align: left;
}

.contact-box summary {
  min-height: 60px;
  padding: 18px;

  color: #9a6a00;
  font-size: 16px;
  font-weight: 800;

  cursor: pointer;
  list-style: none;
}

.contact-box summary::-webkit-details-marker {
  display: none;
}

.contact-box summary::after {
  content: "＋";
  float: right;
}

.contact-box[open] summary::after {
  content: "－";
}

.contact-content {
  padding: 0 18px 18px;

  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.contact-content p {
  margin: 0 0 8px;
}

/* 底部 */
.footer {
  margin-top: 22px;

  color: #a5aaa4;
  font-size: 12px;
}

.footer p {
  margin: 0;
}

/* 靜態小裝飾 */
.star,
.circle {
  position: absolute;
  pointer-events: none;
}

.star {
  color: var(--accent);
  font-size: 22px;
  opacity: 0.7;
}

.star-1 {
  top: 92px;
  left: 28px;
}

.star-2 {
  top: 170px;
  right: 34px;
}

.star-3 {
  bottom: 132px;
  left: 30px;
}

.circle {
  width: 14px;
  height: 14px;

  border-radius: 50%;
  background: var(--main-light);
  opacity: 0.8;
}

.circle-1 {
  top: 250px;
  left: 36px;
}

.circle-2 {
  right: 38px;
  bottom: 220px;

  background: var(--accent-light);
}

/* 小手機調整 */
@media (max-width: 380px) {
  .ecard-page {
    padding: 16px 12px;
  }

  .ecard {
    min-height: 610px;
    padding: 26px 18px 22px;
    border-radius: 30px;
  }

  .brand-logo {
    width: 160px;
  }

  .main-title {
    font-size: 24px;
  }

 
  .enter-button {
    width: 190px;
    min-height: 50px;

    font-size: 13px;
  }

  .portal {
    min-height: 60px;
  }
}
/* 背景小裝飾：緩慢漂浮與閃爍 */
.star {
  color: var(--accent);
  font-size: 22px;
  opacity: 0.7;

  animation: starFloat 4s ease-in-out infinite;
}

.star-1 {
  top: 92px;
  left: 28px;
  animation-delay: 0s;
}

.star-2 {
  top: 170px;
  right: 34px;
  animation-delay: 0.8s;
}

.star-3 {
  bottom: 132px;
  left: 30px;
  animation-delay: 1.4s;
}

.circle {
  width: 14px;
  height: 14px;

  border-radius: 50%;
  background: var(--main-light);
  opacity: 0.8;

  animation: circleFloat 5s ease-in-out infinite;
}

.circle-1 {
  top: 250px;
  left: 36px;
  animation-delay: 0.4s;
}

.circle-2 {
  right: 38px;
  bottom: 220px;

  background: var(--accent-light);
  animation-delay: 1.2s;
}

@keyframes starFloat {
  0% {
    opacity: 0.35;
    transform: translateY(0) scale(0.95);
  }

  50% {
    opacity: 0.95;
    transform: translateY(-8px) scale(1.08);
  }

  100% {
    opacity: 0.35;
    transform: translateY(0) scale(0.95);
  }
}

@keyframes circleFloat {
  0% {
    opacity: 0.45;
    transform: translateY(0);
  }

  50% {
    opacity: 0.9;
    transform: translateY(-10px);
  }

  100% {
    opacity: 0.45;
    transform: translateY(0);
  }
}
/* 入口按鈕：左到右填滿動畫 */
.portal {
  position: relative;
  overflow: hidden;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

/* 填滿色塊 */
.portal::before {
  content: "";
  position: absolute;
  inset: 0;

  width: 0%;
  height: 100%;

  background: var(--portal-fill);
  border-radius: inherit;

  transition: width 0.42s ease;

  z-index: 0;
}

/* 讓文字壓在填滿色塊上面 */
.portal-title,
.portal-text {
  position: relative;
  z-index: 1;

  transition: color 0.25s ease;
}

/* hover / 點擊時填滿 */
.portal:hover::before,
.portal:active::before {
  width: 100%;
}

.portal:hover,
.portal:active {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0, 191, 166, 0.16);
}

/* IG 填滿色 */
.portal-ig {
  --portal-fill: var(--main);
}

.portal-ig:hover .portal-title,
.portal-ig:hover .portal-text,
.portal-ig:active .portal-title,
.portal-ig:active .portal-text {
  color: #ffffff;
}

/* FB 填滿色 */
.portal-fb {
  --portal-fill: #f8e7c6;
}

.portal-fb:hover .portal-title,
.portal-fb:hover .portal-text,
.portal-fb:active .portal-title,
.portal-fb:active .portal-text {
  color: #5b4b31;
}

/* LINE 填滿色 */
.portal-line {
  --portal-fill: var(--accent);
}

.portal-line:hover .portal-title,
.portal-line:hover .portal-text,
.portal-line:active .portal-title,
.portal-line:active .portal-text {
  color: #ffffff;
}