/* ============================================================
   優瑪設計 YOMA DESIGN — 前台樣式
   品牌色：深藍 Deep Navy   風格：優雅編輯感
   ============================================================ */

:root {
  /* 深藍：參考 yomadesign.pic-time.com/client 背景色 #141542 */
  --navy-900: #141542;
  --navy-800: #1b1d55;
  --navy-700: #242663;
  --navy-500: #3a3d82;
  --navy-300: #8a90bd;
  --gold: #b99a5b;
  --gold-soft: #c9b083;
  /* 標題金：pic-time YOMA DESIGN 標題色 */
  --title-gold: #e7dc9b;
  --title-gold-dark: #927424;
  --paper: #f4f2ec;
  --paper-2: #eceae1;
  --white: #ffffff;
  --ink: #1b2233;
  --ink-soft: #55607a;
  --line: rgba(22, 32, 58, 0.12);
  --serif: 'Noto Serif TC', 'Cormorant Garamond', serif;
  --sans: 'Noto Sans TC', system-ui, sans-serif;
  --en: 'Cormorant Garamond', 'Noto Serif TC', serif;
  --wrap: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { width: min(var(--wrap), 92vw); margin: 0 auto; }

/* ── 區塊標籤 ─────────────────────────────── */
.eyebrow {
  font-family: var(--en);
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.6rem;
}
.eyebrow::before {
  content: '';
  width: 34px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.3; letter-spacing: 0.02em; }

.section { padding: clamp(5rem, 11vw, 9rem) 0; }

/* ── 按鈕 ─────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 2.2rem;
  font-family: var(--sans);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  border: 1px solid var(--navy-800);
  color: var(--navy-800);
  background: transparent;
  cursor: pointer;
  transition: all 0.4s var(--ease);
}
.btn:hover { background: var(--navy-800); color: var(--paper); }
.btn-solid { background: var(--navy-800); color: var(--paper); }
.btn-solid:hover { background: var(--navy-700); border-color: var(--navy-700); }
.btn-light { border-color: rgba(255,255,255,0.6); color: #fff; }
.btn-light:hover { background: #fff; color: var(--navy-800); }
.link-arrow {
  font-family: var(--en);
  letter-spacing: 0.1em;
  color: var(--navy-700);
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: gap 0.35s var(--ease), color 0.35s var(--ease);
}
.link-arrow:hover { gap: 1rem; color: var(--gold); }

/* ── Header ───────────────────────────────── */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(244, 242, 236, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all 0.4s var(--ease);
}
.site-header.scrolled { border-color: var(--line); background: rgba(244, 242, 236, 0.95); }
.header-inner {
  width: min(var(--wrap), 92vw);
  margin: 0 auto;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 0.85rem; line-height: 1.1; }
.brand-logo { width: 48px; height: 48px; border-radius: 50%; display: block; box-shadow: 0 2px 10px rgba(20,21,66,0.18); }
.brand-wordmark { display: flex; flex-direction: column; }
.brand-name { font-family: var(--en); font-size: 1.4rem; letter-spacing: 0.14em; color: var(--navy-900); font-weight: 600; }
.brand-tagline { font-family: var(--en); font-size: 0.6rem; letter-spacing: 0.3em; color: var(--navy-300); text-transform: uppercase; margin-top: 2px; }
.site-nav { display: flex; gap: 2.4rem; }
.site-nav a {
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--navy-700);
  position: relative;
  padding: 4px 0;
  transition: color 0.3s;
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.35s var(--ease);
}
.site-nav a:hover, .site-nav a.active { color: var(--navy-900); }
.site-nav a:hover::after, .site-nav a.active::after { width: 100%; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--navy-800); transition: 0.3s; }

/* ── Hero ─────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: var(--navy-900);
  color: var(--paper);
  overflow: hidden;
}
.hero-photo {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.05);
  animation: heroZoom 14s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 75% 30%, rgba(185,154,91,0.18), transparent 55%),
    linear-gradient(135deg, var(--navy-900), var(--navy-700) 60%, var(--navy-800));
}
.hero.has-image .hero-bg {
  background:
    linear-gradient(90deg, rgba(20,21,66,0.92) 0%, rgba(20,21,66,0.7) 45%, rgba(20,21,66,0.35) 100%),
    linear-gradient(0deg, rgba(20,21,66,0.6), transparent 40%);
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 46px);
  opacity: 0.5;
}
.hero-inner { position: relative; z-index: 2; width: min(var(--wrap), 92vw); margin: 0 auto; padding-top: 84px; }
.hero .eyebrow { color: var(--gold-soft); }
.hero .eyebrow::before { background: var(--gold-soft); }
.hero h1 {
  font-size: clamp(2.6rem, 6.6vw, 5.4rem);
  font-weight: 500;
  line-height: 1.18;
  color: var(--title-gold);
  margin-bottom: 2rem;
}
.hero-sub { max-width: 40rem; color: rgba(255,255,255,0.78); font-size: 1.05rem; margin-bottom: 2.8rem; font-weight: 300; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.scroll-hint {
  position: absolute; left: 50%; bottom: 2.2rem; transform: translateX(-50%);
  font-family: var(--en); letter-spacing: 0.3em; font-size: 0.7rem;
  color: rgba(255,255,255,0.55); text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem; z-index: 2;
}
.scroll-hint::after { content: ''; width: 1px; height: 46px; background: linear-gradient(rgba(255,255,255,0.6), transparent); animation: scrollLine 2.2s var(--ease) infinite; }
@keyframes scrollLine { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ── About（首頁）─────────────────────────── */
.about-home { background: var(--paper); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.about-visual { aspect-ratio: 4/5; background: linear-gradient(160deg, var(--navy-700), var(--navy-900)); position: relative; overflow: hidden; }
.about-visual::after {
  content: 'YOMA';
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--en); font-size: 4rem; letter-spacing: 0.3em; color: rgba(255,255,255,0.08);
}
.about-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about-home h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); margin-bottom: 1.8rem; white-space: pre-line; color: var(--title-gold-dark); }
.about-home p { color: var(--ink-soft); white-space: pre-line; margin-bottom: 1.6rem; }

/* ── Services ─────────────────────────────── */
.services-section { background: var(--navy-900); color: var(--paper); }
.services-head { text-align: center; margin-bottom: 4.5rem; }
.services-head .eyebrow { color: var(--gold-soft); }
.services-head .eyebrow::before { background: var(--gold-soft); }
.services-head h2 { font-size: clamp(1.9rem, 4vw, 3rem); color: var(--title-gold); }
.services-head .eyebrow { justify-content: center; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.1); }
.service-card { background: var(--navy-900); padding: 3rem 2.4rem; transition: background 0.45s var(--ease); }
.service-card:hover { background: var(--navy-800); }
.service-num { font-family: var(--en); color: var(--gold-soft); letter-spacing: 0.2em; font-size: 0.9rem; }
.service-card h3 { color: var(--title-gold); font-size: 1.5rem; margin: 1.4rem 0 0.4rem; }
.service-sub { font-family: var(--en); letter-spacing: 0.2em; font-size: 0.78rem; color: var(--navy-300); text-transform: uppercase; margin-bottom: 1.2rem; }
.service-card p { color: rgba(255,255,255,0.72); font-weight: 300; font-size: 0.96rem; }

/* ── Works / Portfolio ────────────────────── */
.works-section { background: var(--paper); }
.works-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 3.5rem; flex-wrap: wrap; gap: 1.5rem; }
.works-head h2 { font-size: clamp(1.9rem, 4vw, 3rem); color: var(--title-gold-dark); }
.works-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.5rem, 3vw, 2.6rem); }
.work-card { display: block; group: card; position: relative; }
.work-media {
  aspect-ratio: 3/2; overflow: hidden; background: var(--navy-800); position: relative;
}
.work-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.work-card:hover .work-media img { transform: scale(1.05); }
.work-media .ba-badge {
  position: absolute; top: 1rem; left: 1rem; z-index: 2;
  background: rgba(20,21,66,0.8); color: #fff; font-family: var(--en);
  letter-spacing: 0.15em; font-size: 0.7rem; padding: 0.4rem 0.8rem; text-transform: uppercase;
}
.work-info { padding: 1.4rem 0.2rem; }
.work-cat { font-family: var(--en); letter-spacing: 0.2em; font-size: 0.75rem; color: var(--gold); text-transform: uppercase; }
.work-info h3 { font-size: 1.4rem; margin: 0.5rem 0; color: var(--title-gold-dark); }
.work-info p { color: var(--ink-soft); font-size: 0.95rem; }

/* 分類篩選 */
.filter-bar { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 3rem; }
.filter-btn {
  background: none; border: none; cursor: pointer; font-family: var(--sans);
  font-size: 0.95rem; letter-spacing: 0.05em; color: var(--ink-soft);
  padding-bottom: 4px; border-bottom: 1px solid transparent; transition: 0.3s;
}
.filter-btn.active, .filter-btn:hover { color: var(--navy-900); border-color: var(--gold); }

/* ── Before / After 滑桿 ──────────────────── */
.ba-slider {
  position: relative; width: 100%; aspect-ratio: 3/2; overflow: hidden;
  user-select: none; touch-action: none; background: var(--navy-900); cursor: ew-resize;
}
.ba-slider.tall { aspect-ratio: 4/3; }
.ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-after { clip-path: inset(0 0 0 50%); }
.ba-label {
  position: absolute; bottom: 1.1rem; z-index: 3; font-family: var(--en);
  letter-spacing: 0.18em; font-size: 0.72rem; text-transform: uppercase;
  color: #fff; background: rgba(20,21,66,0.7); padding: 0.35rem 0.85rem; pointer-events: none;
}
.ba-label.before { left: 1.1rem; }
.ba-label.after { right: 1.1rem; }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff;
  transform: translateX(-50%); z-index: 4; pointer-events: none;
}
.ba-handle::after {
  content: '⇄'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%; background: #fff; color: var(--navy-800);
  display: grid; place-items: center; font-size: 1.1rem; box-shadow: 0 4px 18px rgba(0,0,0,0.25);
}

/* ── Journal ──────────────────────────────── */
.journal-section { background: var(--paper); }
.journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.6rem); }
.journal-card { display: block; }
.journal-media { aspect-ratio: 16/10; overflow: hidden; background: var(--navy-800); }
.journal-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.journal-card:hover .journal-media img { transform: scale(1.05); }
.journal-info { padding: 1.4rem 0; }
.journal-date { font-family: var(--en); letter-spacing: 0.15em; font-size: 0.8rem; color: var(--gold); }
.journal-info h3 { font-size: 1.35rem; margin: 0.6rem 0; color: var(--title-gold-dark); }
.journal-info p { color: var(--ink-soft); font-size: 0.95rem; }

/* ── CTA / Contact ────────────────────────── */
.cta-section { background: var(--navy-900); color: #fff; text-align: center; }
.cta-section .eyebrow { justify-content: center; color: var(--gold-soft); }
.cta-section .eyebrow::before { background: var(--gold-soft); }
.cta-section h2 { font-size: clamp(2rem, 5vw, 3.6rem); color: var(--title-gold); margin-bottom: 1.4rem; max-width: 22ch; margin-inline: auto; }
.cta-section p { color: rgba(255,255,255,0.72); margin-bottom: 2.6rem; font-weight: 300; }

/* ── 內頁 hero ────────────────────────────── */
.page-hero { background: var(--navy-900); color: #fff; padding: calc(84px + 5rem) 0 4.5rem; }
.page-hero .eyebrow { color: var(--gold-soft); }
.page-hero .eyebrow::before { background: var(--gold-soft); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); color: var(--title-gold); }
.page-hero p { color: rgba(255,255,255,0.7); max-width: 42rem; margin-top: 1.2rem; font-weight: 300; }

/* ── 作品詳情 ─────────────────────────────── */
.work-detail { background: var(--paper); }
.work-detail-head { max-width: 46rem; margin-bottom: 3rem; }
.work-detail-head h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin: 0.5rem 0 1.2rem; color: var(--title-gold-dark); }
.work-detail-head p { color: var(--ink-soft); }
.ba-caption { text-align: center; color: var(--ink-soft); font-size: 0.9rem; margin-top: 1.2rem; font-style: italic; }
.work-body { max-width: 46rem; margin: 3.5rem auto 0; color: var(--ink-soft); white-space: pre-line; }

/* ── 作品相本 Gallery ─────────────────────── */
.album-head { margin: 4rem 0 1.6rem; text-align: center; }
.album-head .eyebrow { justify-content: center; }
.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.album-item { display: block; overflow: hidden; aspect-ratio: 3/2; background: var(--navy-800); cursor: zoom-in; }
.album-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.album-item:hover img { transform: scale(1.06); }

/* 燈箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 2000; background: rgba(14, 15, 40, 0.94);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lb-img { max-width: 88vw; max-height: 86vh; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: none; border: none; color: rgba(255,255,255,0.75);
  cursor: pointer; transition: color 0.25s; user-select: none;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: #fff; }
.lb-close { top: 1.6rem; right: 2rem; font-size: 2.6rem; line-height: 1; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 4rem; padding: 0 1.4rem; }
.lb-prev { left: 1rem; } .lb-next { right: 1rem; }
.lb-count { position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.7); font-family: var(--en); letter-spacing: 0.15em; }

/* ── 文章內文插入的媒體 ───────────────────── */
.article-content img, .article-content video, .article-content iframe {
  max-width: 100%; height: auto; display: block; margin: 1.6rem auto; border-radius: 4px;
}
.article-content iframe { width: 100%; aspect-ratio: 16/9; }
.article-content a { color: var(--title-gold-dark); text-decoration: underline; }

/* ── 文章內文 ─────────────────────────────── */
.article-body { max-width: 44rem; margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) 0; }
.article-body .cover { aspect-ratio: 16/9; overflow: hidden; margin-bottom: 2.6rem; background: var(--navy-800); }
.article-body .cover img { width: 100%; height: 100%; object-fit: cover; }
.article-meta { font-family: var(--en); letter-spacing: 0.12em; color: var(--gold); margin-bottom: 0.6rem; }
.article-body h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 1.6rem; color: var(--title-gold-dark); }
.article-content { color: var(--ink); white-space: pre-line; font-size: 1.08rem; line-height: 2; }

/* ── 聯絡表單 ─────────────────────────────── */
.contact-section { background: var(--paper); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); }
.contact-info h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 1.4rem; color: var(--title-gold-dark); }
.contact-info p { color: var(--ink-soft); margin-bottom: 2.4rem; }
.contact-detail { margin-bottom: 1.3rem; }
.contact-detail .lbl { font-family: var(--en); letter-spacing: 0.2em; font-size: 0.72rem; text-transform: uppercase; color: var(--gold); display: block; margin-bottom: 0.2rem; }
.contact-detail .val { color: var(--ink); }
.form-field { margin-bottom: 1.5rem; }
.form-field label { display: block; font-size: 0.85rem; letter-spacing: 0.05em; color: var(--ink-soft); margin-bottom: 0.5rem; }
.form-field input, .form-field textarea {
  width: 100%; padding: 0.9rem 1rem; border: 1px solid var(--line); background: #fff;
  font-family: var(--sans); font-size: 1rem; color: var(--ink); transition: border 0.3s;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--navy-500); }
.form-field textarea { resize: vertical; min-height: 140px; }
.form-success { background: var(--navy-800); color: #fff; padding: 1.2rem 1.5rem; margin-bottom: 2rem; }

/* ── Footer ───────────────────────────────── */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.7); padding: clamp(3.5rem, 7vw, 5.5rem) 0 0; }
.footer-inner { width: min(var(--wrap), 92vw); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; padding-bottom: 3.5rem; }
.footer-name { font-family: var(--en); font-size: 1.6rem; letter-spacing: 0.12em; color: #fff; }
.footer-logo { width: 72px; height: 72px; border-radius: 50%; display: block; margin-bottom: 0.9rem; box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
.footer-tagline { font-family: var(--en); letter-spacing: 0.28em; font-size: 0.72rem; text-transform: uppercase; color: var(--navy-300); margin-top: 0.4rem; }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.footer-col h4 { color: #fff; font-size: 0.9rem; letter-spacing: 0.1em; margin-bottom: 1.2rem; font-family: var(--sans); font-weight: 500; }
.footer-col a, .footer-col span { display: block; font-size: 0.92rem; color: rgba(255,255,255,0.6); margin-bottom: 0.6rem; transition: color 0.3s; }
.footer-col a:hover { color: var(--gold-soft); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 1.6rem 0; }
.footer-bottom { width: min(var(--wrap), 92vw); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; color: rgba(255,255,255,0.45); }
.footer-admin { color: rgba(255,255,255,0.45); transition: color 0.3s; }
.footer-admin:hover { color: var(--gold-soft); }

/* ── 404 ──────────────────────────────────── */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 8rem 0; }
.notfound h1 { font-family: var(--en); font-size: 6rem; color: var(--navy-800); }

/* ── 進場動畫 ─────────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ── RWD ──────────────────────────────────── */
@media (max-width: 900px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .works-grid, .journal-grid { grid-template-columns: 1fr; }
  .album-grid { grid-template-columns: repeat(2, 1fr); }
  .lb-prev, .lb-next { font-size: 2.6rem; padding: 0 0.6rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; inset: 84px 0 auto 0; background: rgba(244,242,236,0.98);
    flex-direction: column; gap: 0; padding: 1rem 0; border-bottom: 1px solid var(--line);
    transform: translateY(-120%); transition: transform 0.4s var(--ease); backdrop-filter: blur(12px);
  }
  .site-nav.open { transform: translateY(0); }
  .site-nav a { padding: 1rem 6vw; }
}
