/* ============================================================
   蔚禾身心診所 WayHeal Clinic — Global Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@300;400;500&family=Noto+Sans+TC:wght@300;400;500&display=swap');

/* ── Variables ── */
:root {
  --green:      #35553B;
  --green-mid:  #3B6C59;
  --green-light:#7A9E82;
  --bg:         #F3F2EB;
  --bg-warm:    #EDEAE3;
  --bg-dark:    #1A1C19;
  --text:       #1A1A18;
  --text-mid:   #4A4A46;
  --text-light: #8A8A84;
  --border:     #D8D5CE;
  --divider-gray: #DADADA;
  --white:      #FFFFFF;
  --serif:      'Noto Serif TC', serif;
  --sans:       'Noto Sans TC', sans-serif;
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ── Photo Placeholder ── */
.photo {
  background: linear-gradient(135deg, #C8C5BE 0%, #B8B5AE 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.photo::after {
  content: attr(data-label);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  font-family: var(--sans);
  font-weight: 300;
}
.photo-hero   { height: 100vh; min-height: 560px; }
.photo-tall   { height: 70vh;  min-height: 480px; }
.photo-med    { height: 400px; }
.photo-sm     { height: 240px; }
.photo-thumb  { height: 200px; }
.photo-card   { height: 200px; }
.photo-avatar { width: 64px; height: 64px; border-radius: 50%; }

/* ── Navigation ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
  transition: background 0.4s var(--ease), padding 0.3s var(--ease);
}
.site-nav.transparent { background: transparent; }
.site-nav.solid {
  background: rgba(247,245,240,0.96);
  backdrop-filter: blur(8px);
  padding: 16px 40px;
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--white);
  transition: color 0.3s;
}
.site-nav.solid .nav-logo { color: var(--green); }
.nav-logo a { color: inherit; }

/* ── Brand Logo (real <img>, white / green swap by context) ── */
.logo-img { display: block; width: auto; }
.nav-logo .logo-img    { height: 36px; }
.menu-logo .logo-img   { height: 34px; }
.footer-logo .logo-img { height: 46px; }
/* nav: single <img>, src swapped via updateNav() — white on transparent, green on solid */
.nav-logo a { display: inline-flex; align-items: center; }
/* keep white logo readable over a bright hero */
.site-nav.transparent .logo-img { filter: drop-shadow(0 1px 3px rgba(0,0,0,0.35)); }
.nav-hamburger {
  width: 32px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}
.nav-hamburger span {
  display: block;
  height: 1px;
  background: var(--white);
  transition: background 0.3s, transform 0.3s;
}
.site-nav.solid .nav-hamburger span { background: var(--text); }

/* ── Menu Overlay ── */
.menu-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  z-index: 200;
  background: var(--bg);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 28px 36px;
  transform: translateX(100%);
  transition: transform 0.45s var(--ease);
  box-shadow: -8px 0 32px rgba(0,0,0,0.06);
}
.menu-overlay.open { transform: translateX(0); }
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(26,26,24,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease);
}
.menu-backdrop.open { opacity: 1; pointer-events: auto; }
.menu-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
}
.menu-logo {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--green);
}
.menu-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-light);
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  transition: color 0.2s;
}
.menu-close:hover { color: var(--text); }
.menu-links { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; gap: 0; }
.menu-link {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 300;
  color: var(--text);
  letter-spacing: 0.06em;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s;
}
.menu-link:hover { color: var(--green); }
.menu-link span { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-light); font-family: var(--sans); font-weight: 300; }
.menu-bottom {
  margin-top: 40px;
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 0.08em;
}

/* ── Sections ── */
.section { padding: 96px 40px; }
.section-md { padding: 72px 40px; }
.section-sm { padding: 48px 40px; }
.section-tag {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 16px;
  font-family: var(--sans);
  font-weight: 300;
}
.section-tag-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.section-tag-line::after {
  content: '';
  flex: 1;
  max-width: 40px;
  height: 1px;
  background: var(--border);
}

/* ── Typography ── */
.h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 1.4;
  color: var(--text);
}
.h2 {
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 1.5;
  color: var(--text);
}
.h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text);
}
.body-text {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 2;
  letter-spacing: 0.04em;
  max-width: 560px;
}
.caption {
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 0.08em;
}

/* ── Link / CTA ── */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-top: 24px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--green);
  transition: gap 0.2s;
}
.text-link:hover { gap: 14px; }
.text-link-light {
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.4);
}
.text-link-light:hover { color: var(--white); }

/* ── Two Column ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }
.two-col-text { padding: 24px 0; }

/* ── News Cards ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--white);
  overflow: hidden;
  transition: transform 0.3s var(--ease);
}
.card:hover { transform: translateY(-4px); }
.card-img { height: 200px; }
.card-body { padding: 20px; }
.card-date {
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.card-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.6;
  letter-spacing: 0.03em;
}

/* ── Article List ── */
.article-list { border-top: 1px solid var(--border); }
.article-item {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.article-item:hover { background: rgba(58,82,64,0.02); }
.article-thumb { width: 100px; height: 72px; flex-shrink: 0; }
.article-info { flex: 1; padding-top: 2px; }
.article-date { font-size: 11px; color: var(--text-light); letter-spacing: 0.1em; margin-bottom: 6px; }
.article-title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 8px;
}
.article-excerpt { font-size: 13px; color: var(--text-light); line-height: 1.7; }

/* ── Doctor Cards ── */
.doctors-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.doctor-card {
  padding: 32px;
  border: 1px solid var(--border);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--white);
}
.doctor-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
}
.doctor-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 4px;
}
.doctor-role {
  font-size: 12px;
  color: var(--green);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.doctor-bio { font-size: 13px; color: var(--text-mid); line-height: 1.8; }

/* ── History List ── */
.history-list { border-top: 1px solid var(--border); }
.history-item {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.history-date {
  width: 80px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 0.06em;
  padding-top: 2px;
}
.history-text { font-size: 14px; color: var(--text-mid); line-height: 1.7; }

/* ── Schedule Table ── */
.schedule-wrap { overflow-x: auto; }
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.schedule-table th {
  background: var(--green);
  color: rgba(255,255,255,0.9);
  padding: 12px 16px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-align: center;
  font-size: 12px;
}
.schedule-table td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  text-align: center;
  color: var(--text-mid);
}
.schedule-table tr:nth-child(even) td { background: var(--bg-warm); }
.dot-yes::before { content: '●'; color: var(--green); font-size: 12px; }
.dot-no::before  { content: '—'; color: var(--border); }

/* ── Map Placeholder ── */
.map-placeholder {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 32px;
}

/* ── Info Row ── */
.info-row { display: flex; gap: 48px; flex-wrap: wrap; }
.info-item { flex: 1; min-width: 120px; }
.info-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 6px;
}
.info-val {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.8;
  letter-spacing: 0.03em;
}

/* ── Contact Form ── */
.contact-form { max-width: 520px; }
.form-field { margin-bottom: 24px; }
.form-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  font-size: 14px;
  font-family: var(--sans);
  color: var(--text);
  background: transparent;
  letter-spacing: 0.04em;
  transition: border-color 0.2s;
  outline: none;
}
.form-input:focus { border-color: var(--green); }
.form-input::placeholder { color: var(--text-light); }
.form-textarea { height: 100px; resize: none; }
.form-btn {
  padding: 14px 40px;
  background: var(--green);
  color: var(--white);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--green);
  transition: background 0.2s, color 0.2s;
}
.form-btn:hover { background: transparent; color: var(--green); }

/* ── LINE Button ── */
.line-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 40px;
  border: 1px solid var(--text);
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--text);
  transition: background 0.2s, color 0.2s;
  margin-bottom: 48px;
}
.line-btn:hover { background: var(--text); color: var(--white); }
.line-icon {
  width: 24px;
  height: 24px;
  background: #06C755;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}

/* ── Divider ── */
.divider-text {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 0.12em;
  margin: 40px 0;
}
.divider-text::before, .divider-text::after {
  content: '';
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: var(--border);
}

/* ── Scroll hint ── */
.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.scroll-line {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.3);
  animation: scrollAnim 1.8s ease-in-out infinite;
}
@keyframes scrollAnim {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ── Text overlay (on hero) ── */
.hero-overlay-text {
  position: absolute;
  bottom: 80px;
  left: 40px;
  color: var(--white);
}

/* ── Footer ── */
.site-footer {
  background: var(--green);
  padding: 56px 40px 32px;
}
.footer-inner {
  display: flex;
  gap: 48px;
  justify-content: space-between;
  margin-bottom: 48px;
}
.footer-col { flex: 1; }
.footer-logo {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.8);
  margin-bottom: 16px;
}
.footer-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72); /* AA over --green (#35553B): 5.18:1 */
  margin-bottom: 8px;
}
.footer-val {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  line-height: 1.9;
}
.footer-sns { display: flex; gap: 12px; margin-top: 8px; }
.footer-sns a {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(255,255,255,0.65); /* AA over --green (#35553B): 4.62:1 */
  transition: border-color 0.2s, color 0.2s;
}
.footer-sns a:hover { border-color: rgba(255,255,255,0.6); color: rgba(255,255,255,0.85); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.06em;
}

/* ── Page Hero (inner pages) ── */
.page-hero {
  position: relative;
  height: 280px;
  display: flex;
  align-items: flex-end;
  padding: 0 40px 40px;
  background: linear-gradient(135deg, #3A5240 0%, #2A3E30 100%);
  overflow: hidden;
}
.page-hero-title {
  font-family: var(--serif);
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 300;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.9);
  position: relative;
  z-index: 1;
}
.page-hero-en {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 8px;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.15;
}

/* ── Utilities ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 40px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.bg-warm { background: var(--bg-warm); }
.bg-white { background: var(--white); }

/* ── Fade-in animation ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Sitemap page ── */
.sitemap-header {
  background: linear-gradient(135deg, var(--green), #2A3E30);
  color: var(--white);
  padding: 48px 40px 36px;
}
.sitemap-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; padding: 40px; }
.sitemap-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-light);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.sitemap-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text);
  border-radius: 2px;
  transition: border-color 0.15s, color 0.15s;
}
.sitemap-link:hover { border-color: var(--green); color: var(--green); }
.sitemap-url { font-size: 11px; color: var(--text-light); font-family: monospace; }

/* ── Responsive (basic) ── */
@media (max-width: 768px) {
  .site-nav { padding: 20px 24px; }
  .section, .section-md { padding: 64px 24px; }
  .section-sm { padding: 40px 24px; }
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .cards-grid { grid-template-columns: 1fr; }
  .doctors-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .info-row { gap: 28px; }
  .menu-overlay { padding: 24px; }
}

/* ── Tag Filter Bar (news.html) ── */
.tag-filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 32px 24px 0;
  max-width: 900px;
  margin: 0 auto;
}
.tag-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-light);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.tag-btn:hover { color: var(--text-mid); }
.tag-btn.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

/* ── Appointment CTA (home.html) ── */
.appt-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  margin-top: 56px;
  padding: 52px 64px;
  background: var(--green);
}
.appt-cta-en {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
  font-family: var(--sans);
}
.appt-cta-title {
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.appt-cta-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.06em;
  line-height: 1.9;
  margin: 0;
}
.appt-cta-btn {
  flex-shrink: 0;
  display: inline-block;
  padding: 16px 36px;
  border: 1px solid rgba(255,255,255,0.45);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--white);
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s;
  white-space: nowrap;
}
.appt-cta-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.8);
}
@media (max-width: 768px) {
  .appt-cta { flex-direction: column; align-items: flex-start; padding: 40px 24px; gap: 32px; }
}

/* ── Nav Links (desktop horizontal nav) ── */
.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}
.nav-link {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--green); }
@media (min-width: 769px) {
  .nav-hamburger { display: none; }
  .nav-links { display: flex; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

/* ── Footer pages col (hide on desktop) ── */
@media (min-width: 769px) { .footer-col-pages { display: none; } }

/* ── Space Grid (4-col photo layout; shared by home + about) ── */
.space-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  max-width: 100%;
}
/* home-only 3-photo variant (about keeps 4-col base above) */
.space-grid--3 { grid-template-columns: repeat(3, 1fr); }
.space-photo {
  height: 320px;
  cursor: pointer;
  transition: opacity 0.2s;
  position: relative;
}
.space-photo:hover { opacity: 0.85; }
.space-photo-expand {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  border-radius: 2px;
}
.space-photo:hover .space-photo-expand { opacity: 1; }
@media (max-width: 768px) {
  .space-grid { grid-template-columns: repeat(2, 1fr); }
  .space-photo { height: 200px; }
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(17,19,16,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.lightbox.open { display: flex; }
.lb-content {
  width: min(80vw, 960px);
  height: min(80vh, 640px);
}
.lb-photo {
  width: 100%;
  height: 100%;
  border-radius: 0;
}
.lb-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 28px;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s;
  line-height: 1;
}
.lb-close:hover { color: #fff; }
.lb-prev, .lb-next {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
  font-size: 24px;
  width: 48px;
  height: 48px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.lb-prev:hover, .lb-next:hover {
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}

/* ── Intro Page (multi-photo layout) ── */
.intro-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 80px 40px 40px;
  min-height: 100vh;
  background: #1A1C19;
}
.intro-photo-item {
  position: relative;
  height: 60vh;
  min-height: 300px;
  cursor: pointer;
  overflow: hidden;
}
.intro-photo-item:hover .space-photo-expand { opacity: 1; }
.intro-slide-bg {
  width: 100%;
  height: 100%;
  transition: transform 0.3s var(--ease);
}
.intro-photo-item:hover .intro-slide-bg { transform: scale(1.02); }
.intro-enter-btn {
  display: block;
  width: fit-content;
  margin: 0 auto 64px;
  padding: 14px 48px;
  border: 1px solid rgba(255,255,255,0.45);
  color: rgba(255,255,255,0.8);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  background: transparent;
}
.intro-enter-btn:hover {
  border-color: rgba(255,255,255,0.8);
  color: #fff;
  background: rgba(255,255,255,0.06);
}
/* 手機版 intro：單欄 + 箭頭切換 */
.intro-mobile-slider {
  display: none;
  position: relative;
  background: #1A1C19;
  padding-top: 72px;
}
.intro-mobile-slide {
  display: none;
  width: 100%;
  height: 100vw;
  min-height: 300px;
}
.intro-mobile-slide.active { display: block; }
.intro-mobile-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.6);
  font-size: 22px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.intro-mobile-arrow:hover { border-color: rgba(255,255,255,0.6); color: #fff; }
.intro-mobile-arrow.prev { left: 16px; }
.intro-mobile-arrow.next { right: 16px; }
@media (max-width: 768px) {
  .intro-photo-grid { display: none; }
  .intro-mobile-slider { display: block; }
}
@media (min-width: 769px) {
  .intro-mobile-slider { display: none; }
  .intro-photo-grid { display: grid; }
}

/* ── What You Get (about.html) ── */
.what-you-get-list { display: flex; flex-direction: column; gap: 0; }
.wyg-item {
  display: flex;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.wyg-item:first-child { border-top: 1px solid var(--border); }
.wyg-num {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-light);
  padding-top: 4px;
  min-width: 28px;
}
.wyg-title {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--text);
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.wyg-desc {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 2;
  letter-spacing: 0.04em;
  margin: 0;
}

/* ============================================================
   Intro Landing (B-faithful rewrite) — 全部 scoped 在 .intro-b
   原生重現 B 版 approved 進場：平滑捲動 + 視差 + 模式切換 morph。
   B 配色與 V3 既有 token 不同（B 米白 cream，V3 是 --bg #F3F2EB），
   故新增 intro 專屬 token；--green / --green-mid 與 B 森林綠相符則重用。
   ============================================================ */
.intro-b {
  /* 配色（精確抽自 B main-D2Hw2uRp.css / index-DfBPFAi8.css） */
  --ib-cream:        #F7F4EC; /* bg-cream / 根畫布 */
  --ib-cream-50:     #FBF9F4; /* 側欄底、文字反白 */
  --ib-cream-200:    #EDE8DD; /* ph-reveal 底 */
  --ib-forest:       var(--green-mid); /* #3B6C59 — 與 V3 token 相符，重用 */
  --ib-forest-deep:  #2F5446; /* lightbox 深綠底 / enter hover */
  --ib-ink:          #2A2E2C; /* 主文字 */
  --ib-ink-soft:     #4A4F4D;
  --ib-ink-mute:     #7B807E;
  --ib-grain:        #D3D3A2; /* callout 底 */
  --ib-forest-700:   #2F5446; /* label 字色 */
  /* 動態（精確抽自 index-DfBPFAi8.css / index-B9tfUenr.js） */
  --ib-ease-out-back: cubic-bezier(.22, 1, .36, 1);
  --ib-ease-panel:    cubic-bezier(.7, 0, .2, 1);
  --ib-ease-enter:    cubic-bezier(.62, .04, .2, 1);

  background-color: var(--ib-cream);
  color: var(--ib-ink);
  font-family: 'Noto Sans TC', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100dvh;
  overscroll-behavior: none;
}
.intro-b[data-fade-on-load] { opacity: 0; transition: opacity .7s ease-out; }
.intro-b[data-fade-on-load].is-loaded { opacity: 1; }

/* ── Logo（左上小方標，連回 home.html）── */
.intro-b .ib-logo {
  position: fixed; top: 1rem; left: 1rem;
  width: 2.75rem; height: 2.75rem;
  display: grid; place-items: center;
  text-decoration: none; z-index: 60;
  transition: opacity .4s ease-out;
}
.intro-b .ib-logo:hover { opacity: .7; }
.intro-b .ib-logo:focus-visible {
  outline: 2px solid rgba(59, 108, 89, .4); outline-offset: 4px; border-radius: 4px;
}
.intro-b .ib-logo img {
  width: 2rem; height: 2rem; display: block;
}
@media (min-width: 1024px) {
  .intro-b .ib-logo { top: 1.5rem; left: 1.5rem; width: 3rem; height: 3rem; }
  .intro-b .ib-logo img { width: 2.5rem; height: 2.5rem; }
}

/* ── 進入主站 CTA（右上，素淨 serif + 箭頭右移） ── */
.intro-b .ib-enter {
  position: fixed; top: 1.25rem; right: 1.25rem; z-index: 60;
  display: inline-flex; align-items: baseline; gap: .45rem;
  padding: .35rem .15rem;
  font-family: 'Cormorant Garamond', 'Noto Serif TC', serif;
  font-size: .9375rem; letter-spacing: .14em;
  color: var(--ib-forest-700, #3B6C59);
  text-decoration: none;
  transition: color .35s ease, opacity .35s ease;
}
@media (min-width: 1024px) {
  .intro-b .ib-enter { top: 1.5rem; right: 1.75rem; font-size: 1rem; letter-spacing: .18em; }
}
.intro-b .ib-enter__label {
  position: relative;
}
.intro-b .ib-enter__label::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.2em;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right center;
  transition: transform .45s var(--ib-ease-out-back, cubic-bezier(.16,.84,.36,1));
}
.intro-b .ib-enter__arrow {
  display: inline-block; line-height: 1;
  transition: transform .45s var(--ib-ease-out-back, cubic-bezier(.16,.84,.36,1));
}
.intro-b .ib-enter:hover,
.intro-b .ib-enter:focus-visible { color: var(--ib-forest-deep, #2A5043); }
.intro-b .ib-enter:hover .ib-enter__label::after,
.intro-b .ib-enter:focus-visible .ib-enter__label::after { transform: scaleX(1); transform-origin: left center; }
.intro-b .ib-enter:hover .ib-enter__arrow,
.intro-b .ib-enter:focus-visible .ib-enter__arrow { transform: translateX(4px); }
.intro-b .ib-enter:focus-visible { outline: 2px solid rgba(59,108,89,.4); outline-offset: 4px; border-radius: 2px; }

/* ── 溶接層（進站時米白頁面溶接，「走進蔚禾」跳頁用）── */
.intro-b .ib-page-dissolve {
  position: fixed; inset: 0; background: var(--ib-cream);
  opacity: 0; pointer-events: none; transition: opacity .7s ease; z-index: 200;
}
.intro-b .ib-page-dissolve.is-active { opacity: 1; pointer-events: auto; }

/* ── 平滑捲動畫布 ── */
.intro-b .ib-smooth-wrapper {
  position: fixed; inset: 0; overflow: hidden;
  touch-action: none; overscroll-behavior: none; cursor: default;
  user-select: none; -webkit-user-select: none;
}
.intro-b .ib-smooth-wrapper.dragging { cursor: grabbing; }
.intro-b .ib-smooth-wrapper img { -webkit-user-drag: none; user-drag: none; }
.intro-b .ib-smooth-content { width: 100%; will-change: transform; }
.intro-b .ib-main { padding: 7.5rem 0; }
@media (min-width: 1024px) { .intro-b .ib-main { padding: 10rem 0; } }
.intro-b .ib-photo-list { margin: 0; padding: 0; list-style: none; }
.intro-b .ib-photo-list > li {
  padding: 0 1.5rem;
  transition: padding .5s var(--ib-ease-out-back), margin-bottom .5s var(--ib-ease-out-back);
}
@media (min-width: 768px)  { .intro-b .ib-photo-list > li { padding: 0 3rem; } }
@media (min-width: 1024px) { .intro-b .ib-photo-list > li { padding: 0 5rem; } }
@media (min-width: 1280px) { .intro-b .ib-photo-list > li { padding: 0 7.5rem; } }
.intro-b .ib-photo-list > li:not(:last-child) { margin-bottom: 1rem; }
@media (min-width: 1024px) { .intro-b .ib-photo-list > li:not(:last-child) { margin-bottom: 2rem; } }

/* 照片框 */
.intro-b .ib-figure { max-width: 88rem; margin: 0 auto; transition: max-width .5s var(--ib-ease-out-back); }
.intro-b .ib-photo-frame {
  width: 100%; cursor: pointer; opacity: var(--op, 1);
  transition: width .5s var(--ib-ease-out-back), transform .5s var(--ib-ease-out-back),
              opacity .5s ease;
  will-change: transform, width;
  animation: ib-float-up-y 2.4s var(--ib-ease-out-back) both,
             ib-float-up-fade 2.4s ease-in both;
  animation-delay: calc(var(--idx, 0) * .18s);
}
@media (min-width: 1024px) {
  .intro-b .ib-photo-frame { width: 65%; margin-right: auto; }
}
@keyframes ib-float-up-y {
  0%   { transform: translateY(80vh) scale(.96); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes ib-float-up-fade {
  0%   { opacity: 0; filter: blur(8px); }
  100% { opacity: 1; filter: blur(0); }
}
.intro-b .ib-slot {
  position: relative; width: 100%;
  aspect-ratio: var(--ar, 14 / 3);
  transition: aspect-ratio .6s var(--ib-ease-out-back);
}
.intro-b .ib-reveal {
  position: absolute; inset: 0; overflow: hidden;
  background: linear-gradient(135deg, rgba(59,108,89,.07), rgba(95,140,146,.04) 50%, rgba(211,211,162,.05)), var(--ib-cream-200);
  transition: transform .5s var(--ib-ease-out-back), background .5s ease;
}
.intro-b .ib-bg { position: absolute; inset: 0; }
.intro-b .ib-bg img {
  position: absolute; inset-inline: 0; top: -30%;
  width: 100%; height: 160%; object-fit: cover; will-change: transform;
}
@media (min-width: 1024px) {
  .intro-b .ib-photo-frame:hover .ib-reveal { transform: translateX(2%); }
}

/* ── 點圖原地撐高（用戶要求偏離 B）：14:3 ribbon → 4:3，在直欄 flow 裡原地撐高，
     露出更多畫面、平順推開下方照片。維持米白底，無黑屏 / 無整屏接管。── */
.intro-b .ib-photo-list > li.is-expanded .ib-slot {
  aspect-ratio: 4 / 3;
}

/* 照片標題暫移除（用戶 2026-05-28 要求）：
   撐高態僅露出 4:3 照片，不再渲染編號 / 攝影師 / 地點 caption。
   JS 已停止生成 .ib-caption DOM，相關 styles 一併移除，避免 dead code。
   若未來恢復 caption，PHOTOS 陣列 place / photographer 仍可消費。 */

/* ── Reduced motion fallback：關閉平滑捲動，回退原生捲動 ── */
@media (prefers-reduced-motion: reduce) {
  .intro-b { overflow: visible !important; height: auto !important; }
  .intro-b .ib-smooth-wrapper {
    position: static; overflow: visible; touch-action: auto;
  }
  .intro-b .ib-smooth-content { transform: none !important; }
  .intro-b .ib-photo-list > li { transform: none !important; }
  .intro-b .ib-slot { aspect-ratio: 14 / 3 !important; transition: none !important; }
  .intro-b .ib-photo-frame {
    opacity: 1 !important; animation: none !important;
    transition: none !important; transform: none !important;
  }
  .intro-b .ib-reveal, .intro-b .ib-bg, .intro-b .ib-figure { transition: none !important; }
  .intro-b .ib-enter,
  .intro-b .ib-enter__label::after,
  .intro-b .ib-enter__arrow { transition: none !important; }
}
