/* siesidestudio — 共通スタイル
   色・書体・モーションの根拠は siesidestudio-v2/HANDOFF.md を正とする。数値を変える時はそちらも直す。 */

:root {
  --ground: #E3EEED;
  --ink: #203232;
  --sub: #517070;
  --dim: #7B9494;
  --rule: rgba(32, 50, 50, 0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ground);
  color: var(--ink);
}

body {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 300;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

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

.cg { font-family: 'Cormorant Garamond', serif; font-weight: 300; }
.hg { font-family: 'Hanken Grotesk', sans-serif; font-weight: 300; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 84px;
}
@media (max-width: 900px) { .wrap { padding: 0 40px; } }
@media (max-width: 560px) { .wrap { padding: 0 22px; } }

/* ---- 読み込み時の段差フェード（erimiura実測値。消さない） ---- */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.r  { animation: rise 1.5s cubic-bezier(0.4, 0.4, 0, 1) both; }
.r2 { animation-delay: 0.14s; }
.r3 { animation-delay: 0.28s; }
.r4 { animation-delay: 0.42s; }
.r5 { animation-delay: 0.56s; }

/* 名前・見出しだけの横スライド（erimiura.comの実測: translateX(-100px)開始、
   約0.6〜0.9秒の間を置いてから1.6秒ほどかけてイーズアウトで着地） */
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-48px); }
  to   { opacity: 1; transform: translateX(0); }
}
.slide { animation: slideIn 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both; }
.slide2 { animation: slideIn 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both; }

.w   { transition: opacity 0.45s cubic-bezier(0.4, 0.4, 0, 1); }
.w:hover, .w:focus-visible { opacity: 0.78; }
.lnk { transition: color 0.3s cubic-bezier(0.4, 0.4, 0, 1); }
.lnk:hover, .lnk:focus-visible { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .r, .slide, .slide2 { animation: none; }
  .w, .lnk { transition: none; }
}

/* ---- ヘッダー（Sie🍀 + ILLUST / TOOLS / ABOUT） ---- */
.hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 4vw, 48px);
  padding-top: 44px;
}
.hd-logo {
  font-size: 17px;
  letter-spacing: 0.16em;
  white-space: nowrap;
}
.hd-nav {
  display: flex;
  gap: clamp(18px, 4vw, 48px);
  color: var(--sub);
}
.hd-nav a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.hd-nav .ja {
  font-size: 12px;
  letter-spacing: 0.14em;
  line-height: 1;
}
.hd-nav .en {
  font-size: 9px;
  letter-spacing: clamp(0.18em, 1.6vw, 0.3em);
  line-height: 1;
}
.hd-nav .on {
  color: var(--ink);
  padding-bottom: 7px;
  border-bottom: 1px solid var(--ink);
}
/* トップページはロゴを本文側の見出しで見せるため、ヘッダーはナビのみ右寄せ */
.hd.hd-noLogo { justify-content: flex-end; }

/* ---- セクション見出し（ラベル + 大見出し + 右のメタ情報） ---- */
.shead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 96px 0 40px;
}
.shead .label {
  font-size: 10px;
  letter-spacing: 0.44em;
  color: var(--sub);
  margin-bottom: 18px;
  width: 100%;
}
.shead .big {
  font-size: clamp(28px, 6vw, 38px);
  letter-spacing: 0.24em;
  line-height: 1;
}
.shead .meta {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--sub);
}

/* ---- フッター ---- */
.ft {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin-top: 120px;
  padding: 40px 0 64px;
}
.ft-name {
  font-size: 15px;
  letter-spacing: 0.3em;
  color: var(--sub);
}
.ft-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--sub);
}

/* ---- ページ罫（現在地表示用の帯には使わず、区切り線として使う） ---- */
.rule { height: 1px; background: var(--rule); border: none; margin: 0; }

/* ---- ライトボックス（作品をクリックして原寸表示・前後送り） ---- */
.lb-trigger {
  display: block; width: 100%; padding: 0; margin: 0;
  background: none; border: none; cursor: pointer; font: inherit; color: inherit;
}
.lb-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(32, 50, 50, 0.92);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0.4, 0, 1);
}
.lb-overlay.open { opacity: 1; pointer-events: auto; }
.lb-img {
  max-width: min(90vw, 1100px); max-height: 86vh; width: auto;
  object-fit: contain; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.lb-img--out { opacity: 0; transform: translateX(calc(var(--lb-dir, 1) * -28px)) scale(0.97); }
.lb-img--in  { opacity: 0; transform: translateX(calc(var(--lb-dir, 1) * 28px)) scale(0.97); }
.lb-btn {
  position: absolute; background: none; border: none; color: var(--ground);
  font-size: 34px; line-height: 1; cursor: pointer; padding: 14px;
  transition: opacity 0.3s cubic-bezier(0.4, 0.4, 0, 1);
}
.lb-btn:hover, .lb-btn:focus-visible { opacity: 0.7; }
.lb-close { top: 8px; right: 12px; font-size: 28px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.lb-count {
  position: absolute; left: 0; right: 0; bottom: 20px; text-align: center;
  color: var(--ground); font-size: 11px; letter-spacing: 0.3em;
  font-family: 'Hanken Grotesk', sans-serif; font-weight: 300; opacity: 0.7;
}
@media (prefers-reduced-motion: reduce) {
  .lb-overlay, .lb-btn, .lb-img { transition: none; }
}
