/* ── CSS 設計變數 ── */
:root {
  --color-bg:        #f0f9f7;
  --color-surface:   #ffffff;
  --color-accent:    #1aafa8;   /* 藍綠主色 */
  --color-accent-2:  #56cfc2;   /* 淺藍綠強調 */
  --color-accent-3: #f5a623;   /* 橘色強調 */
  --color-explanation: 	#7AD6B6;   /* 說明文字 */
  --color-text:      #2c2c2c;
  --color-muted:     #7a8e8c;
  --color-border:    #d4e8e5;

  --font-sans:  'Noto Sans TC', system-ui, sans-serif;
  --font-serif: 'Noto Serif TC', Georgia, serif;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;

  --shadow-card: 0 4px 20px rgba(0,0,0,0.10);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.18);

  --transition: 0.28s ease;

  --nav-height: 64px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── 版型輔助 ── */
.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

/* ════════════════════════════
   導覽列
════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(240, 249, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
}
.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 100%;
  width: min(1200px, 92%);
  margin-inline: auto;
}
.nav__logo {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-right: auto;
  white-space: nowrap;
}
.nav__links {
  display: flex;
  gap: 1.8rem;
}
.nav__links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  transition: color var(--transition);
}
.nav__links a:hover { color: var(--color-accent); }

/* 漢堡按鈕（行動裝置） */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* 漢堡展開動畫 */
.nav--open .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav--open .nav__burger span:nth-child(2) { opacity: 0; }
.nav--open .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ════════════════════════════
   自我介紹
════════════════════════════ */
.intro { padding: 4rem 0 3rem; }
.intro__layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: center;
}
.intro__photo-wrap {
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--color-accent);
  box-shadow: 0 6px 30px rgba(26,175,168,0.25);
}
.intro__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.intro__name {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 0.3rem;
}
.intro__tagline {
  color: var(--color-accent);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}
.intro__bio {
  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  max-width: 560px;
}
.intro__links {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

/* ── 按鈕 ── */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.btn--sm {
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
}
.btn--primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(26,175,168,0.45);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(26,175,168,0.55);
}
.btn--outline {
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  background: transparent;
}
.btn--outline:hover {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-2px);
}

/* ════════════════════════════
   通用 Section
════════════════════════════ */
.section {
  padding: 5rem 0;
}
.section__title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  text-align: center;
  margin-bottom: 0.5rem;
}
.section__subtitle {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}

/* ════════════════════════════
   注意事項
════════════════════════════ */
.notice {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  margin-bottom: 2.5rem;
  overflow: hidden;
  border-left: 4px solid var(--color-accent);
}
.notice__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}
.notice__heading {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
}
.notice__arrow {
  font-size: 1.2rem;
  color: var(--color-muted);
  transition: transform var(--transition);
}
.notice__toggle[aria-expanded="false"] .notice__arrow {
  transform: rotate(-90deg);
}
.notice__body {
  padding: 0 1.5rem 1.5rem;
}
.notice__body[hidden] {
  display: none;
}
.notice__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
.notice__block {
  padding: 1rem;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
}
.notice__block h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}
.notice__block ul {
  list-style: disc;
  padding-left: 1.2rem;
}
.notice__block li {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}
.notice__block--highlight {
  background: rgba(26,175,168,0.08);
  border: 1px dashed var(--color-accent);
}

/* ════════════════════════════
   價目表 Grid
════════════════════════════ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.price-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.8rem 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.price-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.price-card__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}
.price-card__icon { font-size: 1.8rem; }
.price-card__title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
}
.price-card__list {
  flex: 1;
  margin-bottom: 1.2rem;
}
.price-card__list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--color-border);
  font-size: 0.9rem;
}
.price-card__list li:last-child { border-bottom: none; }
.price-card__price {
  font-weight: 700;
  color: var(--color-accent);
  white-space: nowrap;
}
.price-card__browse {
  margin-top: auto;
  align-self: center;
}

/* 小標籤 */
.badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15em 0.55em;
  border-radius: 999px;
  vertical-align: middle;
  letter-spacing: 0.03em;
}
.badge--quick {
  background: var(--color-accent-3);
  color: #fff;
}
.badge--paused {
  background: #ccc;
  color: #666;
}

/* 暫停接單卡片 */
.price-card.is-paused {
  opacity: 0.55;
  filter: grayscale(40%);
}
.price-card.is-paused:hover {
  transform: none;
  box-shadow: var(--shadow-card);
}
.price-card__explanation {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--color-explanation);
  text-align: left;
}

/* 被選中的價目卡 */
.price-card.is-active {
  border: 2px solid var(--color-accent);
}

/* ════════════════════════════
   內嵌作品快速瀏覽
════════════════════════════ */
.gallery-backdrop {
  display: none;
}

.inline-gallery {
  display: none;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  animation: fadeUp 0.35s ease both;
}
.inline-gallery.is-open { display: block; }

.inline-gallery__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}
.inline-gallery__title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
}
.inline-gallery__close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--color-muted);
  padding: 0.3rem;
  transition: color var(--transition);
}
.inline-gallery__close:hover { color: var(--color-accent); }

.inline-gallery__track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1.2rem 1.5rem 1.5rem;
}

/* Gallery 卡片 */
.gallery-card {
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.gallery-card[hidden] { display: none; }
.gallery-card__img-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.gallery-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}
.gallery-card:hover .gallery-card__img-wrap img {
  transform: scale(1.06);
}
.gallery-card__info {
  padding: 0.6rem 0.8rem 0.7rem;
}
.gallery-card__info h4 {
  font-size: 0.88rem;
  font-weight: 600;
}

/* ════════════════════════════
   Lightbox
════════════════════════════ */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 201;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.lightbox.is-open,
.lightbox-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox__figure {
  max-width: min(90vw, 960px);
  max-height: 90svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}
.lightbox__img {
  max-height: 80svh;
  max-width: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.lightbox__caption {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
}
.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: fixed;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  display: grid;
  place-items: center;
  transition: background var(--transition);
  backdrop-filter: blur(4px);
}
.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(255,255,255,0.30);
}
.lightbox__close { top: 1.2rem; right: 1.2rem; }
.lightbox__prev  { left: 1.2rem;  top: 50%; transform: translateY(-50%); }
.lightbox__next  { right: 1.2rem; top: 50%; transform: translateY(-50%); }

/* ════════════════════════════
   頁尾
════════════════════════════ */
.site-footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.85rem;
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
}

/* ════════════════════════════
   動畫
════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);    }
}
@keyframes twinkle {
  0%, 100% { 
    opacity: 0.1; 
    transform: scale(0.8); 
    filter: blur(0.5px);
  }
  50% { 
    opacity: 1.0; 
    transform: scale(1.2); 
    filter: blur(0px);
  }
}

/* ── 星空背景 ── */
.starfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.starfield__star {
  position: absolute;
  border-radius: 50%;
  background: var(--color-accent);
  animation: twinkle var(--dur) ease-in-out infinite;
  animation-delay: var(--delay);
}

/* ════════════════════════════
   RWD — Tablet（< 900px）
════════════════════════════ */
@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .intro__layout {
    grid-template-columns: 200px 1fr;
    gap: 2rem;
  }
  .notice__grid {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════
   RWD — Mobile（< 600px）
════════════════════════════ */
@media (max-width: 600px) {
  /* 導覽：漢堡選單 */
  .nav__burger { display: flex; }
  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 1rem;
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    transform: translateY(-110%);
    visibility: hidden;
    transition: transform var(--transition), visibility var(--transition);
    z-index: 99;
  }
  .nav--open .nav__links { transform: translateY(0); visibility: visible; }
  .nav__links li { padding: 0; }
  .nav__links a {
    display: block;
    padding: 0.85rem 1.5rem;
    font-size: 1.05rem;
  }

  /* 自我介紹：垂直堆疊 */
  .intro__layout {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }
  .intro__photo-wrap {
    width: 180px;
    margin-inline: auto;
  }
  .intro__bio { max-width: none; }
  .intro__links { justify-content: center; }

  /* 價目表：單欄 */
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* 內嵌畫廊 → 底部滑出面板 */
  .gallery-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 140;
  }
  .gallery-backdrop.is-open { display: block; }

  .inline-gallery {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    max-height: 70svh;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.20);
    transform: translateY(100%);
    transition: transform 0.32s ease;
    overflow: hidden;
    animation: none;
  }
  .inline-gallery.is-open {
    transform: translateY(0);
  }
  .inline-gallery__body {
    overflow-y: auto;
    max-height: calc(70svh - 52px);
    -webkit-overflow-scrolling: touch;
  }
  .inline-gallery__track {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    padding: 1rem;
    gap: 0.8rem;
  }

  /* Lightbox 箭頭移至底部 */
  .lightbox__prev { top: auto; bottom: 1.2rem; left: 1.5rem; transform: none; }
  .lightbox__next { top: auto; bottom: 1.2rem; right: 1.5rem; transform: none; }

  .section { padding: 3.5rem 0; }
}
