/* ===== 憂 (Urei) — シンプル・余白多め・マットなラベンダー＋くすみの差し色 =====
 * イラストが主役なので、サイトは飾りを控えめにしています。
 * 色を変えたいときは、下の :root の数字を書き換えると全体に反映されます
 */
:root {
  --bg: #f8f7f9;
  --tint: #eeebf3;        /* うすいラベンダーグレー（カードの背景など） */
  --accent: #a497cf;      /* メインのマットなラベンダー（ボタン・リンク） */
  --accent-dark: #85789f;
  --sub: #86bcc0;         /* サブカラー：くすみ水色 */
  --pop: #dca3b4;         /* 差し色：くすみピンク（少しだけ） */
  --ink: #4a4558;
  --ink-soft: #8c879a;
  --line: #e3dfe8;
  --grid: rgba(164, 151, 207, .14);   /* 方眼の線の色（最後の数字を大きくすると濃くなる） */
  --white: #ffffff;
  --radius: 14px;
  --ja: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  --en: "Quicksand", "Zen Maru Gothic", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ja);
  color: var(--ink);
  line-height: 1.9;
  letter-spacing: .04em;
  /* 方眼（マス目の大きさは background-size の 24px を変える） */
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
  overflow-x: hidden;
}
/* マットな紙のような、ごくうすいざらつき（背景だけ。イラストには重なりません） */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: var(--accent-dark); }
svg { display: block; }

/* 画像の保存対策（長押しメニュー・選択を出さない） */
img, .protect { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.protect img { pointer-events: none; }
.lightbox img { pointer-events: auto; }

/* ===== キラキラの飾り（js/common.js の DECO で場所と大きさを決めます） ===== */
.deco { position: absolute; top: 0; left: 0; width: 100%; z-index: -1; pointer-events: none; overflow: hidden; }
.deco-star { position: absolute; overflow: visible; }
.deco-star.is-white { filter: drop-shadow(0 1px 2px rgba(132, 120, 159, .35)); }
.deco-star.is-white path { fill: #fff; }   /* 白（すけない） */
.deco-star.is-line path { fill: none; stroke: var(--accent); stroke-width: 1.6; vector-effect: non-scaling-stroke; }   /* アウトライン */

/* ===== ヘッダー ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(16px, 4vw, 44px);
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(248, 247, 249, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.logo { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); }
.logo-ja { font-size: 26px; font-weight: 700; line-height: 1; }
.logo-en { font-family: var(--en); font-weight: 600; font-size: 13px; letter-spacing: .15em; color: var(--accent); }
/* Home では左上のロゴを出さない（1画面目に大きく「憂」があるため） */
body[data-page="home"] .logo { visibility: hidden; }

.nav { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 32px); }
.nav > a { text-decoration: none; color: var(--ink); font-family: var(--en); font-weight: 600; font-size: 14px; letter-spacing: .08em; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav > a small { display: none; }
.nav > a:hover { color: var(--accent-dark); }
.nav > a.is-current { border-bottom-color: var(--accent); }
.nav > a:nth-child(2).is-current { border-bottom-color: var(--sub); }
.nav > a:nth-child(3).is-current { border-bottom-color: var(--pop); }
.nav-sns { display: flex; gap: 8px; }

.menu-toggle { display: none; }

@media (max-width: 760px) {
  .menu-toggle {
    display: grid; place-content: center; gap: 5px;
    width: 42px; height: 42px; border: 0; background: none; cursor: pointer; z-index: 2;
  }
  .menu-toggle span { display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--ink); transition: .3s; }
  .is-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .is-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .is-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 26px;
    background: var(--bg); opacity: 0; visibility: hidden; transition: .3s;
  }
  .is-open .nav { opacity: 1; visibility: visible; }
  .nav > a { font-size: 20px; text-align: center; }
  .nav > a small { display: block; font-family: var(--ja); font-weight: 400; font-size: 11px; color: var(--ink-soft); }
}

/* ===== SNS ボタン ===== */
.sns-btn {
  display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink);
  text-decoration: none; transition: border-color .2s, color .2s;
}
.sns-btn svg { width: 15px; height: 15px; }
.sns-btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.sns-text { font-family: var(--en); font-weight: 700; font-size: 12px; }

/* ===== ボタン ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: #fff; font-family: var(--ja); font-weight: 500; font-size: 14px;
  text-decoration: none; letter-spacing: .08em; cursor: pointer; transition: background .2s, border-color .2s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--accent-dark); }
.btn-ghost:hover { background: var(--tint); }
.btn-small { padding: 8px 20px; font-size: 13px; }
.btn.is-disabled { background: #ebe9ee; border-color: #ebe9ee; color: #a6a2ae; cursor: default; }

/* ===== 見出し ===== */
.heading { text-align: center; margin: 0 0 40px; line-height: 1.3; }
.heading span { display: block; font-family: var(--en); font-weight: 600; font-size: clamp(26px, 3.6vw, 32px); letter-spacing: .14em; }
.heading small { display: inline-block; margin-top: 8px; padding: 0 12px; border-radius: 999px; font-size: 11px; color: #fff; background: var(--accent); letter-spacing: .2em; }
.section:nth-of-type(odd) .heading small { background: var(--sub); }
.heading-small span { font-size: 24px; }

/* ===== レイアウト ===== */
main { display: block; }
.page { max-width: 1080px; margin: 0 auto; padding: 130px clamp(18px, 4vw, 40px) 80px; }
.section { max-width: 1080px; margin: 0 auto; padding: 80px clamp(18px, 4vw, 40px); }
.center { text-align: center; margin-top: 40px; }
.section-lead { text-align: center; font-size: 14px; color: var(--ink-soft); margin: -16px 0 32px; }

/* ===== Hero（画面いっぱいの大きな絵） ===== */
.hero {
  --kv-pos: center 35%;     /* パソコンで絵のどこを中心に見せるか */
  --kv-pos-sp: 62% 35%;     /* スマホのとき（左の % を大きくすると絵の右側が見える） */
  position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden;
  display: flex; align-items: flex-end; background: var(--tint);
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--kv-pos); }
.hero-veil { /* 文字を読みやすくする、うすい白のにじみ（左下） */
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(248, 247, 249, .55), transparent 18%),
    radial-gradient(60% 55% at 0% 100%, rgba(248, 247, 249, .85), transparent 70%);
}
.hero-text { position: relative; padding: 0 clamp(22px, 6vw, 80px) clamp(60px, 11vh, 110px); }
.hero-hello { font-family: var(--en); font-weight: 600; letter-spacing: .3em; font-size: 11px; color: var(--sub); margin: 0 0 12px; text-transform: uppercase; }
.hero-name { margin: 0; line-height: 1; display: flex; align-items: baseline; gap: 16px; }
.hero-ja { font-size: clamp(64px, 9vw, 112px); font-weight: 700; }
.hero-en { font-family: var(--en); font-weight: 600; font-size: clamp(16px, 1.8vw, 20px); letter-spacing: .2em; color: var(--accent); }
.hero-copy { font-size: clamp(15px, 1.6vw, 18px); margin: 22px 0 0; color: var(--ink); }
.hero-scroll {
  position: absolute; right: clamp(20px, 4vw, 44px); bottom: 34px;
  font-family: var(--en); font-weight: 600; font-size: 11px; letter-spacing: .25em; color: var(--ink);
  text-decoration: none; writing-mode: vertical-rl; padding-bottom: 54px;
}
.hero-scroll::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: 44px; background: var(--accent);
  transform-origin: top; animation: scrollLine 2.2s ease-in-out infinite;
}
@keyframes scrollLine { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

@media (max-width: 760px) {
  .hero-img { object-position: var(--kv-pos-sp); }
  .hero-veil { background:
    linear-gradient(to bottom, rgba(248, 247, 249, .55), transparent 15%),
    linear-gradient(to top, rgba(248, 247, 249, .9), transparent 45%); }
  .hero-scroll { display: none; }
}

/* ===== 作品の並び ===== */
.works-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: clamp(12px, 2vw, 22px); }
.work { position: relative; padding: 0; border: 0; background: none; cursor: zoom-in; display: block; width: 100%; }
.work-frame { display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: var(--tint); }
.work-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s, opacity .3s; }
.work:hover img { transform: scale(1.03); opacity: .92; }
.tag {
  position: absolute; right: 10px; bottom: 10px; padding: 1px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .92); color: var(--accent-dark); font-family: var(--en); font-weight: 700; font-size: 11px;
}
@media (max-width: 520px) { .works-grid { grid-template-columns: repeat(2, 1fr); } }

.empty { grid-column: 1 / -1; text-align: center; color: var(--ink-soft); padding: 40px 0; }

/* ===== Gallery の絞り込み ===== */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 16px; }
.filter {
  font-family: var(--ja); font-size: 13px; color: var(--ink);
  padding: 6px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); cursor: pointer; transition: .2s;
}
.filter:hover { border-color: var(--accent); }
.filter.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.filter-desc { text-align: center; font-size: 13px; color: var(--ink-soft); margin: 0 0 26px; }
.filters + .filter-desc[hidden] + .works-grid { margin-top: 26px; }

.follow { max-width: 560px; margin: 0 auto; text-align: center; }
.follow-title { font-family: var(--en); font-weight: 600; font-size: 22px; letter-spacing: .12em; margin: 0; }
.follow p { margin: 4px 0 16px; font-size: 13px; color: var(--ink-soft); }
.follow-sns, .profile-sns { display: flex; justify-content: center; gap: 10px; }

/* ===== 注意書き ===== */
.notes { max-width: 720px; margin: 70px auto 0; padding: 22px 26px; border-radius: var(--radius); background: var(--tint); }
.notes h2 { font-size: 14px; margin: 0 0 6px; }
.notes ul { margin: 0; padding-left: 1.3em; font-size: 13px; }
.notes li { margin: 4px 0; }

/* ===== Profile ===== */
.profile { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: 180px 1fr; gap: 40px; align-items: center; }
.profile-icon img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; }
.profile-name { font-size: 26px; font-weight: 700; margin: 0 0 10px; line-height: 1.2; }
.profile-name span { font-family: var(--en); font-weight: 600; color: var(--accent); font-size: 14px; letter-spacing: .2em; margin-left: 10px; }
.profile-body p { margin: 0 0 18px; font-size: 14px; }
.profile-sns { justify-content: flex-start; }
@media (max-width: 640px) {
  .profile { grid-template-columns: 1fr; text-align: center; gap: 20px; }
  .profile-icon { width: 150px; margin: 0 auto; }
  .profile-sns { justify-content: center; }
}
.activity { max-width: 720px; margin: 80px auto 0; }
.activity dl { margin: 0; }
.activity dl > div { display: grid; grid-template-columns: 170px 1fr; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.activity dl > div:first-child { border-top: 1px solid var(--line); }
.activity dt { font-weight: 500; }
.activity dd { margin: 0; font-size: 14px; color: var(--ink-soft); }
@media (max-width: 560px) { .activity dl > div { grid-template-columns: 1fr; gap: 2px; } }

/* ===== 拡大表示 ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(248, 247, 249, .97); opacity: 0; visibility: hidden; transition: .25s; padding: 20px 64px;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lb-figure { margin: 0; max-width: 100%; display: flex; flex-direction: column; align-items: center; }
.lb-frame { border-radius: 10px; overflow: hidden; }
.lb-frame img { max-height: 78vh; max-width: min(84vw, 900px); width: auto; }
#lb-caption { margin-top: 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; }
#lb-caption strong { font-size: 15px; font-weight: 500; }
#lb-caption span { color: var(--ink-soft); }
#lb-caption .lb-tag { font-family: var(--en); font-weight: 700; font-size: 11px; color: var(--sub); }
#lb-caption .btn { margin-top: 10px; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; border: 1px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer;
  width: 42px; height: 42px; border-radius: 50%; font-size: 22px; line-height: 1;
}
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lightbox { padding: 20px 10px 80px; }
  .lb-prev, .lb-next { top: auto; bottom: 18px; transform: none; }
  .lb-prev { left: calc(50% - 56px); } .lb-next { right: calc(50% - 56px); }
  .lb-frame img { max-width: 92vw; max-height: 64vh; }
}

/* ===== フッター ===== */
.site-footer { text-align: center; padding: 50px 20px 36px; margin-top: 40px; border-top: 1px solid var(--line); }
.footer-logo { margin: 0 0 14px; font-size: 20px; font-weight: 700; }
.footer-sns { display: flex; justify-content: center; gap: 10px; margin-bottom: 18px; }
.footer-note { font-size: 11px; color: var(--ink-soft); margin: 0 0 10px; line-height: 1.8; }
.site-footer small { font-family: var(--en); font-size: 12px; color: var(--ink-soft); }

/* ===== ふわっと表示（控えめ） ===== */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
