/* =========================================================
   こばち  —  モノトーンの猫と静かな違和感
   モノトーン × 手描き × 静かな違和感
   ========================================================= */

:root {
  --bg:        #f3f2ef;   /* 本紙のようなオフホワイト */
  --ink:       #16161a;   /* 墨に近い黒 */
  --ink-soft:  #4a4a4f;
  --line:      #d9d7d2;
  --accent:    #16161a;

  --font-jp:  "Zen Kurenaido", "Klee One", sans-serif;
  --font-en:  "Caveat", "Zen Kurenaido", cursive;

  --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(--font-jp);
  color: var(--ink);
  background-color: var(--bg);
  line-height: 1.9;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 画用紙テクスチャ（色味を保ったまま質感だけ、そっと重ねる） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("../assets/paper-texture.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  mix-blend-mode: multiply;
  opacity: 0.45;
}

img { display: block; max-width: 100%; }

/* =========================================================
   オープニング演出
   ========================================================= */
.opening {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 1.6s var(--ease), visibility 1.6s var(--ease);
}
.opening.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.opening__handwriting {
  width: auto;
  height: clamp(200px, 42vh, 360px);
  opacity: 0;
  filter: blur(14px);
  transform: scale(1.04);
  animation:
    hw-in  2.2s var(--ease) 0.3s forwards,
    hw-out 1.8s var(--ease) 2.9s forwards;
}
@keyframes hw-in {
  to { opacity: 1; filter: blur(0); transform: scale(1); }
}
@keyframes hw-out {
  to { opacity: 0; filter: blur(20px); transform: scale(1.02); }
}

/* =========================================================
   肉球（猫）メニュー
   ========================================================= */
.paw {
  position: fixed;
  top: clamp(16px, 3vw, 34px);
  right: clamp(16px, 3vw, 34px);
  z-index: 1200;
  width: clamp(52px, 7vw, 72px);
  height: clamp(52px, 7vw, 72px);
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transition: opacity 1s var(--ease), transform 0.5s var(--ease);
}
.paw.is-ready { opacity: 1; }
.paw:hover { transform: rotate(-4deg) scale(1.05); }
.paw:active { transform: scale(0.94); }

.paw__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.paw__img--open  { opacity: 0; transform: rotate(-8deg); }
.paw__img--closed{ opacity: 1; }

.paw.is-open .paw__img--closed { opacity: 0; transform: rotate(8deg); }
.paw.is-open .paw__img--open   { opacity: 1; transform: rotate(0); }

/* メニュー本体 */
.menu {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  background: rgba(243, 242, 239, 0.94);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}
.menu.is-open { opacity: 1; visibility: visible; }

.menu__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 3vh, 32px);
}
.menu__list { list-style: none; text-align: center; }
.menu__list li { overflow: hidden; }
.menu__link {
  display: inline-block;
  font-size: clamp(1.3rem, 3.2vw, 2rem);
  color: var(--ink);
  text-decoration: none;
  padding: 0.28em 0;
  letter-spacing: 0.12em;
  transform: translateY(120%);
  transition: transform 0.6s var(--ease), opacity 0.4s var(--ease);
  opacity: 0;
}
.menu.is-open .menu__link { transform: translateY(0); opacity: 1; }
.menu.is-open li:nth-child(1) .menu__link { transition-delay: 0.10s; }
.menu.is-open li:nth-child(2) .menu__link { transition-delay: 0.18s; }
.menu.is-open li:nth-child(3) .menu__link { transition-delay: 0.26s; }
.menu.is-open li:nth-child(4) .menu__link { transition-delay: 0.34s; }
.menu.is-open li:nth-child(5) .menu__link { transition-delay: 0.42s; }
.menu.is-open li:nth-child(6) .menu__link { transition-delay: 0.50s; }

.menu__link:hover { opacity: 0.5; }

/* メニューを開いたときに現れる手描きの猫（コーヒー） */
.menu__cat {
  width: auto;
  height: clamp(120px, 20vh, 220px);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease) 0.60s, transform 0.9s var(--ease) 0.60s;
}
.menu.is-open .menu__cat { opacity: 1; transform: translateY(0); }

/* =========================================================
   レイアウト共通
   ========================================================= */
.site { opacity: 0; transition: opacity 1.4s var(--ease); }
.site.is-visible { opacity: 1; }

.section {
  position: relative;
  padding: clamp(90px, 16vh, 180px) clamp(22px, 6vw, 80px);
}
.wrap { max-width: 960px; margin: 0 auto; }

.heading {
  font-family: var(--font-jp);
  font-weight: 400;
  font-size: clamp(1.3rem, 3.4vw, 1.9rem);
  letter-spacing: 0.22em;
  margin-bottom: clamp(38px, 6vw, 66px);
  padding-left: 0.1em;
  position: relative;
}
.heading::after {
  content: "";
  display: block;
  width: 46px;
  height: 1px;
  background: var(--ink);
  margin-top: 18px;
  opacity: 0.5;
}

/* =========================================================
   トップ（ヒーロー）
   ========================================================= */
.section--top {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding-top: 0;
  padding-bottom: 0;
}
.hero { text-align: center; }
.hero__copy {
  font-size: clamp(1.5rem, 5.2vw, 2.9rem);
  line-height: 1.8;
  letter-spacing: 0.14em;
  color: var(--ink);
}
.hero__name {
  margin-top: clamp(30px, 6vw, 56px);
}
.hero__sign {
  display: inline-block;
  width: clamp(150px, 30vw, 260px);
  height: auto;
}

/* =========================================================
   プロフィール
   ========================================================= */
.profile {
  display: grid;
  grid-template-columns: minmax(0, 260px) 1fr;
  gap: clamp(30px, 6vw, 66px);
  align-items: start;
}
.profile__figure { margin: 0; }
.profile__img { width: 100%; height: auto; }
.profile__body p { margin-bottom: 0.7em; }
.profile__line { margin-top: 1.4em; }
.profile__note { color: var(--ink-soft); font-size: 0.95em; }

.link {
  display: inline-block;
  margin-top: 0.6em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  letter-spacing: 0.1em;
  transition: opacity 0.3s var(--ease);
}
.link:hover { opacity: 0.5; }
.link__mark { font-size: 0.85em; }

/* =========================================================
   作品集
   ========================================================= */
.series { margin-bottom: clamp(48px, 8vw, 88px); }
.series:last-child { margin-bottom: 0; }
.series__title {
  font-size: 1.15rem;
  letter-spacing: 0.18em;
  color: var(--ink);
  margin-bottom: 0.7em;
}
.series__desc {
  margin: 0 0 clamp(22px, 4vw, 36px);
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.95;
  max-width: 40em;
}

/* ギャラリー（余白を活かしたマソンリー / モノトーン統一） */
.gallery {
  column-count: 3;
  column-gap: clamp(16px, 3vw, 28px);
}
.gallery__item {
  margin: 0 0 clamp(16px, 3vw, 28px);
  break-inside: avoid;
}
.gallery__item img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(1) contrast(1.03);
  transition: filter 0.6s var(--ease), opacity 0.6s var(--ease);
}
/* グッズはカラーのまま見せる */
.section--goods .gallery__item img { filter: none; }

/* 単独作品（クリームソーダなど）：1枚を控えめなサイズで表示 */
.gallery--single { column-count: 1; max-width: 340px; }
@media (max-width: 820px) { .gallery { column-count: 2; } }
@media (max-width: 480px) { .gallery { column-count: 1; } }

/* スマホ：作品集・グッズをアコーディオン開閉に（PCは常時展開のまま） */
@media (max-width: 680px) {
  .series { margin-bottom: 0; border-top: 1px solid var(--line); }
  .series:last-child { border-bottom: 1px solid var(--line); }

  .series__title[data-acc] {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 1em 1.7em 1em 0.1em;
    color: var(--ink);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  .series__title[data-acc]::after {
    content: "＋";
    position: absolute;
    right: 0.15em;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.05em;
    color: var(--ink-soft);
    line-height: 1;
    transition: transform 0.3s var(--ease);
  }
  .series__title[data-acc][aria-expanded="true"]::after { content: "−"; }
  .series__title[data-acc]:focus-visible { outline: 1px solid var(--ink-soft); outline-offset: 3px; }

  .acc-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.45s var(--ease);
  }
  .series__title[data-acc][aria-expanded="true"] + .acc-panel { grid-template-rows: 1fr; }
  .acc-inner { overflow: hidden; min-height: 0; }
  .acc-inner .series__desc { padding-top: 0.4em; }
  .acc-inner .gallery { padding-bottom: 1.6em; }

  /* セクション間の余白を詰める（畳んだ時に空きすぎないよう） */
  .section--works { padding-bottom: 0; }
  .section--works .series:last-child { border-bottom: none; }
  .section--goods { padding-top: 0; padding-bottom: clamp(40px, 8vh, 64px); }
  .section--exhibitions { padding-top: clamp(40px, 8vh, 64px); }
}

/* =========================================================
   プレースホルダー（画像差し替え用）
   ========================================================= */
.ph {
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(
      -45deg,
      transparent, transparent 9px,
      rgba(22,22,26,0.03) 9px, rgba(22,22,26,0.03) 10px
    );
  display: grid;
  place-items: center;
  transition: border-color 0.4s var(--ease);
}
.ph:hover { border-color: var(--ink-soft); }
.ph__note {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  opacity: 0.55;
}

/* =========================================================
   お問い合わせ（ミニマルなフォーム）
   ========================================================= */
.wrap--narrow { max-width: 560px; }

.contact__lead {
  margin-bottom: clamp(36px, 6vw, 56px);
  color: var(--ink-soft);
  letter-spacing: 0.08em;
}

.form { margin-top: 4px; }
.form__hp { position: absolute; left: -9999px; }

.field { margin-bottom: clamp(26px, 4vw, 36px); }
.field__label {
  display: block;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  margin-bottom: 0.6em;
}
.field__input {
  width: 100%;
  font-family: var(--font-jp);
  font-size: 1.05rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 0.5em 0.1em;
  letter-spacing: 0.04em;
  transition: border-color 0.4s var(--ease);
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}
.field__input:focus {
  outline: none;
  border-bottom-color: var(--ink);
}
.field__textarea { resize: vertical; min-height: 130px; line-height: 1.8; }

.form__submit {
  margin-top: 0.5em;
  font-family: var(--font-jp);
  font-size: 1rem;
  letter-spacing: 0.18em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  padding: 0.8em 2.4em;
  cursor: pointer;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.form__submit:hover { background: var(--ink); color: var(--bg); }
.form__submit:disabled { opacity: 0.4; cursor: default; }

.form__error {
  margin-top: 1.2em;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.form__done { padding: 0.5em 0; }
.form__done-title {
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  letter-spacing: 0.14em;
  color: var(--ink);
}
.form__done-sub {
  margin-top: 1em;
  font-size: 0.95rem;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
}
.form__done-back { margin-top: 2em; }

/* =========================================================
   個展・実績
   ========================================================= */
.records { list-style: none; }
.records__item {
  display: grid;
  grid-template-columns: 5.4em 1fr;
  gap: 1.4em;
  padding: 1.1em 0;
  border-bottom: 1px solid var(--line);
}
.records__item:first-child { border-top: 1px solid var(--line); }
.records__year {
  font-family: var(--font-en);
  font-size: 1.3rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  padding-top: 0.05em;
}
.records__body { padding-top: 0.1em; }
.records__title { display: block; }
.records__place {
  display: block;
  margin-top: 0.35em;
  font-size: 0.85rem;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
}
.records__caption {
  margin-top: 2em;
  font-size: 0.82rem;
  color: var(--ink-soft);
  opacity: 0.7;
}

/* =========================================================
   フッター
   ========================================================= */
.footer {
  text-align: center;
  padding: clamp(60px, 12vh, 120px) 20px clamp(40px, 8vh, 70px);
}
.footer__mark {
  line-height: 0;
}
.footer__sign {
  display: inline-block;
  width: clamp(110px, 22vw, 160px);
  height: auto;
}
.footer__link {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s var(--ease);
}
.footer__link:hover { opacity: 0.5; }
.footer__copy {
  margin-top: 1em;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  opacity: 0.6;
}

/* =========================================================
   スクロール・リビール
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }

/* =========================================================
   レスポンシブ
   ========================================================= */
.sp-only { display: none; }
.pc-only { display: inline; }

@media (max-width: 680px) {
  .sp-only { display: inline; }
  .pc-only { display: none; }
  .profile {
    grid-template-columns: 1fr;
    gap: clamp(24px, 8vw, 40px);
  }
  .profile__figure {
    max-width: 220px;
    margin: 0 auto;
  }
  .records__item {
    grid-template-columns: 4.6em 1fr;
    gap: 1em;
  }
  .records__year { font-size: 1.15rem; }
}

/* 背の低い画面（横向きなど）でメニューが窮屈にならないよう調整 */
@media (max-height: 620px) {
  .menu { overflow-y: auto; }
  .menu__inner { gap: clamp(14px, 3vh, 28px); padding: 8vh 0; }
  .menu__cat { height: clamp(110px, 22vh, 200px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
