/*
Theme Name: 予晴影像 Yuching Photo
Theme URI: https://yuchingphoto.com
Author: Alice / Yuching Photo
Author URI: https://yuchingphoto.com
Description: 予晴影像官方網站主題。自然簡約、溫柔質感的攝影品牌風格，適用婚禮紀錄、婚紗寫真、孕婦寫真、家庭寫真。繁體中文昭源宋體，英文 Cormorant Garamond。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Private
Text Domain: yuching
Tags: photography, portfolio, custom-colors, custom-logo, full-width-template
*/

/* === DESIGN TOKENS === */
:root {
  --cream: #F8F4EF;
  --cream-dark: #EDE7DE;
  --cream-mid: #F2EDE6;
  --ink: #221E18;
  --ink-light: #6B6058;
  --ink-muted: #A09488;
  --accent: #C9A882;
  --accent-soft: #E8D8C4;
  --white: #FDFAF7;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: clip; width: 100%; max-width: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Chiron Sung HK', 'Chiron Sung HK WS', 'Georgia', serif;
  background: var(--cream);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.8;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.en { font-family: 'Cormorant Garamond', serif; }

/* === NAVIGATION === */
nav#mainNav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.6rem 6vw;
  transition: background .4s, padding .4s, border-color .4s;
  border-bottom: .5px solid transparent;
}
nav#mainNav.scrolled {
  background: rgba(248,244,239,.96);
  backdrop-filter: blur(16px);
  padding: 1rem 6vw;
  border-bottom-color: rgba(44,40,32,.08);
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif; font-weight: 300;
  font-size: 1.1rem; letter-spacing: .2em; color: #fff;
  text-decoration: none; line-height: 1.25; transition: color .4s;
}
nav#mainNav.scrolled .nav-logo { color: var(--ink); }
.nav-logo small { display: block; font-size: .5rem; letter-spacing: .45em; opacity: .7; margin-top: 3px; }
.nav-hamburger {
  display: flex; align-items: center; cursor: pointer; padding: 4px 0;
  background: none; border: none; z-index: 400;
  font-family: 'Cormorant Garamond', serif; font-size: .62rem;
  letter-spacing: .38em; color: #fff; transition: color .4s; text-transform: uppercase;
}
nav#mainNav.scrolled .nav-hamburger { color: var(--ink); }
.nav-hamburger.open { color: var(--ink) !important; }
.nav-hamburger span { display: none; }
.nav-overlay {
  position: fixed; inset: 0; background: rgba(34,30,24,0);
  pointer-events: none; z-index: 250; transition: background .45s;
}
.nav-overlay.open { background: rgba(34,30,24,.38); pointer-events: all; }
.nav-menu {
  position: fixed; top: 0; right: 0; width: min(380px,88vw); height: 100dvh;
  background: var(--white); display: flex; flex-direction: column;
  padding: 6rem 3.5rem 4rem;
  transform: translateX(100%);
  transition: transform .45s cubic-bezier(.16,1,.3,1);
  z-index: 280; overflow-y: auto; overflow-x: hidden;
}
.nav-menu.open { transform: translateX(0); }
.menu-cat {
  font-family: 'Cormorant Garamond', serif; font-size: .56rem;
  letter-spacing: .5em; color: var(--accent); text-transform: uppercase;
  margin-bottom: .7rem; padding-bottom: .55rem;
  border-bottom: .5px solid var(--cream-dark);
}
.menu-acc-btn {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: .3rem 0;
  font-family: 'Cormorant Garamond', serif; font-size: 1.5rem;
  font-weight: 300; color: var(--ink); letter-spacing: .04em;
  text-decoration: none; transition: color .2s;
}
.menu-acc-btn:hover { color: var(--accent); }
.menu-acc-arrow { display: inline-flex; align-items: center; flex-shrink: 0; transition: transform .3s; }
.menu-acc-arrow svg { width: 16px; height: 16px; stroke: var(--ink-muted); stroke-width: 1.5; fill: none; }
.menu-acc-btn[aria-expanded="true"] .menu-acc-arrow { transform: rotate(180deg); }
.menu-acc-body { overflow: hidden; max-height: 0; transition: max-height .35s ease; }
.menu-acc-body.open { max-height: 300px; }
.menu-sub {
  display: block;
  font-family: 'Chiron Sung HK', 'Chiron Sung HK WS', serif;
  font-size: .78rem; color: var(--ink-muted); text-decoration: none;
  padding: .38rem 0 .38rem 1rem;
  border-left: .5px solid var(--cream-dark); margin-left: .15rem;
  transition: color .2s, border-color .2s;
}
.menu-sub:hover { color: var(--ink); border-color: var(--accent); }
.menu-section { margin-bottom: 2.2rem; }
.menu-divider { height: .5px; background: var(--cream-dark); margin: .5rem 0 1.8rem; }
.menu-contact {
  margin-top: auto;
  font-family: 'Cormorant Garamond', serif; font-size: .72rem;
  letter-spacing: .28em; color: var(--ink-muted); text-decoration: none;
  transition: color .2s;
}
.menu-contact:hover { color: var(--accent); }

/* === SECTIONS === */
section { padding: 7rem 6vw; }
.section-eyebrow {
  font-family: 'Cormorant Garamond', serif; font-size: .58rem;
  letter-spacing: .55em; color: var(--accent); text-transform: uppercase;
  display: block; margin-bottom: .9rem;
}
.section-title {
  font-family: 'Cormorant Garamond', serif; font-weight: 300;
  font-size: clamp(2rem,4vw,3.6rem); line-height: 1.1;
  color: var(--ink); margin-bottom: 1.2rem;
}
.section-title em { font-style: italic; color: var(--ink-light); }
.section-desc {
  font-family: 'Chiron Sung HK', 'Chiron Sung HK WS', serif;
  font-size: .86rem; color: var(--ink-light); line-height: 2.1; max-width: 480px;
}
.divider { width: 28px; height: .5px; background: var(--accent); margin: 1.4rem 0; }

/* === HERO === */
#hero { position: relative; width: 100%; height: 100dvh; overflow: hidden; contain: strict; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; display: flex; align-items: center; justify-content: center; }
.slide.active { opacity: 1; }
.slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.06); transition: transform 8s ease; }
.slide.active .slide-bg { transform: scale(1); }
.slide:nth-child(1) .slide-bg { background-color: #D4C5B2; }
.slide:nth-child(2) .slide-bg { background-color: #C8BAA8; }
.slide:nth-child(3) .slide-bg { background-color: #BFB09E; }
.slide:nth-child(4) .slide-bg { background-color: #D9CCBB; }
.slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(34,30,24,.15) 0%, rgba(34,30,24,.05) 40%, rgba(34,30,24,.55) 100%); }
.slide-caption { position: relative; z-index: 2; text-align: center; color: #fff; padding: 0 8vw; }
.slide-caption-sub { font-family: 'Cormorant Garamond', serif; font-size: clamp(.6rem,.9vw,.72rem); letter-spacing: .55em; text-transform: uppercase; opacity: .75; margin-bottom: 1.2rem; display: block; }
.slide-caption-title { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: clamp(2.4rem,5.5vw,5.2rem); line-height: 1.08; letter-spacing: .04em; margin-bottom: 1.6rem; }
.slide-caption-title em { font-style: italic; }
.slide-caption-desc { font-family: 'Chiron Sung HK', 'Chiron Sung HK WS', serif; font-size: clamp(.75rem,1vw,.88rem); letter-spacing: .2em; opacity: .78; line-height: 2; }
.hero-cta { position: absolute; bottom: 3.5rem; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.hero-cta-btn { font-family: 'Cormorant Garamond', serif; font-size: .7rem; letter-spacing: .38em; color: #fff; text-decoration: none; border: .5px solid rgba(255,255,255,.55); padding: .75rem 2.8rem; transition: background .25s, border-color .25s; }
.hero-cta-btn:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.hero-scroll { display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: 'Cormorant Garamond', serif; font-size: .58rem; letter-spacing: .42em; color: rgba(255,255,255,.5); animation: breathe 2.5s ease infinite; }
.hero-scroll::after { content: ''; display: block; width: .5px; height: 36px; background: rgba(255,255,255,.38); }
@keyframes breathe { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
.slide-dots { position: absolute; bottom: 3rem; right: 5vw; z-index: 3; display: flex; flex-direction: column; gap: 8px; }
.dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.35); cursor: pointer; transition: background .3s, transform .3s; }
.dot.active { background: #fff; transform: scale(1.5); }
.slide-arrow { position: absolute; top: 50%; z-index: 3; transform: translateY(-50%); background: none; border: none; cursor: pointer; padding: 1rem; opacity: 0; transition: opacity .3s; }
#hero:hover .slide-arrow { opacity: 1; }
.slide-arrow svg { width: 18px; height: 18px; stroke: rgba(255,255,255,.8); stroke-width: 1; fill: none; }
.slide-arrow.prev { left: 2vw; } .slide-arrow.next { right: 2vw; }

/* === PORTFOLIO TABS === */
#portfolio { background: var(--white); padding-top: 6rem; }
.portfolio-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 2.8rem; flex-wrap: wrap; gap: 2rem; }
.portfolio-tabs { display: flex; border-bottom: .5px solid var(--cream-dark); flex-wrap: wrap; }
.tab-btn { background: none; border: none; border-bottom: 1px solid transparent; padding: .65rem 1.3rem; margin-bottom: -.5px; font-family: 'Chiron Sung HK', 'Chiron Sung HK WS', serif; font-size: .76rem; letter-spacing: .12em; color: var(--ink-muted); cursor: pointer; transition: all .2s; }
.tab-btn.active { color: var(--ink); border-bottom-color: var(--ink); }
.tab-panel { display: none; } .tab-panel.active { display: block; }
.pf-carousel { position: relative; width: 100%; aspect-ratio: 4/3; background: var(--cream-dark); overflow: hidden; }
@media(max-width:600px) { .pf-carousel { aspect-ratio: 3/4; } }
.pf-track { display: flex; height: 100%; transition: transform .7s cubic-bezier(.16,1,.3,1); }
.pf-slide { flex: 0 0 100%; height: 100%; position: relative; }
.pf-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-ph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem; background: var(--cream-dark); }
.pf-ph svg { width: 32px; height: 32px; stroke: rgba(160,148,136,.3); stroke-width: 1; fill: none; }
.pf-ph p { font-family: 'Cormorant Garamond', serif; font-size: .58rem; letter-spacing: .38em; color: var(--ink-muted); }
.pf-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; background: rgba(253,250,247,.82); backdrop-filter: blur(8px); border: none; cursor: pointer; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .3s, background .2s; }
.pf-carousel:hover .pf-arrow { opacity: 1; }
.pf-arrow:hover { background: var(--white); }
.pf-arrow svg { width: 15px; height: 15px; stroke: var(--ink); stroke-width: 1.5; fill: none; }
.pf-arrow.prev { left: 1.2rem; } .pf-arrow.next { right: 1.2rem; }
.pf-dots { display: flex; justify-content: center; gap: 8px; padding: 1.2rem 0 .4rem; }
.pf-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--cream-dark); border: .5px solid var(--ink-muted); cursor: pointer; transition: background .3s, transform .3s; }
.pf-dot.active { background: var(--ink); border-color: var(--ink); transform: scale(1.4); }
.pf-counter { font-family: 'Cormorant Garamond', serif; font-size: .6rem; letter-spacing: .3em; color: var(--ink-muted); text-align: center; padding-bottom: 1rem; }
.pf-viewall { display: block; text-align: right; padding: .6rem 0 0; font-family: 'Cormorant Garamond', serif; font-size: .62rem; letter-spacing: .3em; color: var(--ink-muted); text-decoration: none; transition: color .2s; }
.pf-viewall:hover { color: var(--accent); }

/* === SERVICES === */
#services { background: var(--cream); padding: 8rem 6vw; }
.services-header { text-align: center; margin-bottom: 5rem; }
.services-header .section-title { margin-bottom: 0; }
.services-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; background: var(--cream-dark); }
.svc-card { background: var(--cream); padding: 3.2rem 3rem; position: relative; overflow: hidden; transition: background .4s; }
.svc-card::before { content: ''; position: absolute; top: 0; left: 0; width: 0; height: 1.5px; background: var(--accent); transition: width .55s cubic-bezier(.16,1,.3,1); }
.svc-card:hover::before { width: 100%; }
.svc-card:hover { background: var(--white); }
.svc-card-num { font-family: 'Cormorant Garamond', serif; font-size: .62rem; letter-spacing: .45em; color: var(--accent); margin-bottom: 1.8rem; display: block; opacity: .8; }
.svc-card-icon { width: 36px; height: 1px; background: var(--accent-soft); margin-bottom: 2rem; transition: width .4s; }
.svc-card:hover .svc-card-icon { width: 52px; }
.svc-card-name { font-family: 'Chiron Sung HK', 'Chiron Sung HK WS', serif; font-size: 1.05rem; color: var(--ink); letter-spacing: .1em; margin-bottom: .9rem; line-height: 1.5; }
.svc-card-en { font-family: 'Cormorant Garamond', serif; font-size: .6rem; letter-spacing: .38em; color: var(--ink-muted); text-transform: uppercase; margin-bottom: 1.5rem; display: block; }
.svc-card-desc { font-family: 'Chiron Sung HK', 'Chiron Sung HK WS', serif; font-size: .78rem; color: var(--ink-muted); line-height: 2.1; letter-spacing: .04em; }
.svc-card-link { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.8rem; font-family: 'Cormorant Garamond', serif; font-size: .62rem; letter-spacing: .3em; color: var(--ink-light); text-decoration: none; transition: color .2s, gap .3s; }
.svc-card-link:hover { color: var(--accent); gap: .8rem; }
.svc-card-link svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.5; fill: none; flex-shrink: 0; }
.services-note-bar { margin-top: 4rem; display: flex; align-items: center; gap: 2rem; justify-content: center; }
.services-note-bar::before, .services-note-bar::after { content: ''; flex: 1; max-width: 60px; height: .5px; background: var(--accent-soft); }
.services-note-bar p { font-family: 'Chiron Sung HK', 'Chiron Sung HK WS', serif; font-size: .76rem; color: var(--ink-muted); letter-spacing: .08em; text-align: center; line-height: 1.9; }

/* === INSTAGRAM === */
#instagram { background: var(--white); padding: 6rem 6vw; text-align: center; border-top: .5px solid var(--cream-dark); }
.ig-caption { font-size: .78rem; color: var(--ink-muted); margin-top: .8rem; margin-bottom: 2.8rem; letter-spacing: .06em; }
.ig-handle { display: inline-flex; align-items: center; gap: .6rem; font-family: 'Cormorant Garamond', serif; font-size: .72rem; letter-spacing: .38em; color: var(--ink-muted); margin-bottom: 1.2rem; text-decoration: none; transition: color .2s; }
.ig-handle:hover { color: var(--accent); }
.ig-handle svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.ig-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 3px; margin-bottom: 2.5rem; }
.ig-cell { aspect-ratio: 1; background: var(--cream-dark); overflow: hidden; position: relative; cursor: pointer; }
.ig-cell img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .55s ease; }
.ig-cell:hover img { transform: scale(1.06); }
.ig-cell-overlay { position: absolute; inset: 0; background: rgba(34,30,24,0); transition: background .3s; display: flex; align-items: center; justify-content: center; }
.ig-cell:hover .ig-cell-overlay { background: rgba(34,30,24,.18); }
.ig-follow-btn { display: inline-flex; align-items: center; gap: .7rem; font-family: 'Cormorant Garamond', serif; font-size: .7rem; letter-spacing: .38em; color: var(--ink); border: .5px solid var(--ink-muted); padding: .85rem 2.8rem; text-decoration: none; transition: border-color .25s, color .25s, background .25s; }
.ig-follow-btn:hover { border-color: var(--ink); background: var(--ink); color: var(--white); }
.ig-follow-btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.5; fill: none; }

/* === CONTACT / CTA === */
#contact { background: var(--ink); color: var(--cream); }
#contact .section-title { color: var(--cream); }
#contact .section-eyebrow { color: var(--accent); }
#contact .divider { background: var(--accent); margin-left: auto; margin-right: auto; }
.line-btn { display: inline-flex; align-items: center; gap: .8rem; padding: .95rem 2.6rem; background: transparent; border: .5px solid rgba(201,168,130,.5); color: rgba(201,168,130,.9); text-decoration: none; font-family: 'Cormorant Garamond', serif; font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; transition: background .3s, color .3s, border-color .3s; margin-top: 2rem; }
.line-btn:hover { background: var(--accent); color: var(--ink); border-color: var(--accent); }

/* === FOOTER === */
footer, .site-footer { background: var(--ink); border-top: .5px solid rgba(255,255,255,.06); padding: 2.5rem 6vw; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-logo { font-family: 'Cormorant Garamond', serif; font-size: .95rem; letter-spacing: .25em; color: rgba(248,244,239,.45); font-weight: 300; }
.footer-copy { font-family: 'Cormorant Garamond', serif; font-size: .6rem; letter-spacing: .15em; color: rgba(248,244,239,.22); }

/* === FADE-UP ANIMATION === */
.fade-up { opacity: 0; transform: translateY(28px); transition: opacity .85s ease, transform .85s ease; }
.fade-up.visible { opacity: 1; transform: none; }

/* === DESKTOP ADJUSTMENTS === */
@media(min-width:901px) {
  #portfolio .section-title, #services .section-title, #contact .section-title { font-size: 2.0rem; }
  .tab-btn { font-size: 1.3rem; letter-spacing: .08em; padding: .65rem 1.6rem; }
  .svc-card-name { font-size: 1.5rem; }
  .svc-card-desc { font-size: 1.2rem; line-height: 2; }
  .services-note-bar p { font-size: 1.2rem; }
  .ig-caption { font-size: .88rem; }
}

/* === RESPONSIVE === */
@media(max-width:900px) {
  .ig-grid { grid-template-columns: repeat(3,1fr); }
  .svc-card { padding: 2.4rem 2rem; }
}
@media(max-width:600px) {
  section { padding: 5rem 5vw; }
  footer, .site-footer { flex-direction: column; align-items: flex-start; }
  .hero-cta { bottom: 4.5rem; }
  .services-grid { grid-template-columns: 1fr; }
  .ig-grid { grid-template-columns: repeat(2,1fr); }
}

/* === WORDPRESS SPECIFICS === */
.alignleft { float: left; margin-right: 1.5em; }
.alignright { float: right; margin-left: 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-block-image { margin: 1.5rem 0; }
.screen-reader-text { clip: rect(1px,1px,1px,1px); position: absolute; height: 1px; width: 1px; overflow: hidden; }
