/* =========================================================
   HIRAGANA — style.css
   色・フォント・余白はすべてこの下の :root で変更できます。
   ========================================================= */

:root {
  /* 色 */
  --paper: #F7F5F0;      /* 紙 KAMI：背景 */
  --ink: #141414;        /* 墨 SUMI：文字 */
  --gray: #77736C;       /* 灰 HAI：補助文字 */
  --line: #E4E0D8;       /* 砂 SUNA：罫線・画像の下地 */
  --white: #FFFFFF;
  --accent: #C8412B;     /* 朱 SHU：押された ♡ と導線ボタンだけ */

  /* フォント（site.json の googleFontsUrl と合わせて変更） */
  --font-latin: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-ja: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-display: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;

  /* 余白 */
  --gutter: 20px;
  --section: 96px;
  --max: 1280px;
  --header-h: 56px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (min-width: 900px) {
  :root { --gutter: 48px; --section: 160px; --header-h: 72px; }
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-latin), var(--font-ja);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body[data-lang="ja"] { font-family: var(--font-latin), var(--font-ja); line-height: 1.9; letter-spacing: .04em; }
@media (min-width: 900px) { body { font-size: 16px; } }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, figure { margin: 0; }
[lang="ja"] { font-family: var(--font-ja); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 12px; }
.skip:focus { left: 8px; }

.eyebrow {
  font-family: var(--font-latin);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gray);
}

/* ---------- header ---------- */

.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  transition: background .3s var(--ease), color .3s var(--ease);
}
.header.is-solid, .header.is-open { background: rgba(247, 245, 240, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.page-home .header:not(.is-solid):not(.is-open) { color: var(--paper); }

.header__logo { font-family: var(--font-latin); font-weight: 600; font-size: 14px; letter-spacing: .32em; margin-right: auto; }
.header__nav { display: none; }
.header__tools { display: flex; align-items: center; gap: 14px; }
.lang { font-size: 12px; letter-spacing: .06em; padding: 8px 2px; }

.menu-btn { width: 44px; height: 44px; display: grid; place-content: center; gap: 6px; margin-right: -12px; }
.menu-btn span:not(.sr) { display: block; width: 20px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
.is-open .menu-btn span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.is-open .menu-btn span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

@media (max-width: 899px) {
  .header.is-open .header__nav {
    display: flex; flex-direction: column; gap: 4px;
    position: fixed; inset: var(--header-h) 0 auto 0; height: calc(100svh - var(--header-h));
    padding: 32px var(--gutter);
    background: var(--paper); color: var(--ink);
  }
  .header__nav a { font-size: 28px; font-weight: 500; letter-spacing: .02em; padding: 8px 0; }
}
@media (min-width: 900px) {
  .header__nav { display: flex; gap: 32px; font-size: 13px; letter-spacing: .08em; }
  .header__nav a { position: relative; padding: 6px 0; }
  .header__nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; }
  .menu-btn { display: none; }
  .header__logo { margin-right: 0; }
  .header { justify-content: flex-start; gap: 48px; }
  .header__tools { margin-left: auto; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  height: 100svh; min-height: 560px; max-height: 1100px;
  overflow: hidden;
  color: var(--paper);
  background: #B9B1A3;
}
.hero__media, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 55%, rgba(0,0,0,.42) 100%); }
.hero__glyph {
  position: absolute; z-index: 1;
  right: -.18em; top: 50%; transform: translateY(-58%);
  font-family: var(--font-display);
  font-size: min(118vw, 92svh);
  line-height: 1;
  color: var(--paper);
  opacity: .82;
  mix-blend-mode: overlay;
  pointer-events: none;
  user-select: none;
}
.hero__text { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: 72px; }
.hero__message { font-family: var(--font-latin), var(--font-ja); font-weight: 500; font-size: clamp(26px, 7.4vw, 56px); line-height: 1.2; letter-spacing: .01em; }
.hero__sub { margin-top: 10px; font-size: 13px; letter-spacing: .12em; opacity: .9; }
.hero__notice { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: 24px; font-size: 10.5px; letter-spacing: .08em; opacity: .75; }
@media (min-width: 900px) {
  .hero__glyph { font-size: min(64vw, 110svh); right: 2vw; }
  .hero__text { bottom: 96px; max-width: 760px; }
}

/* ---------- sections ---------- */

.section { padding: var(--section) var(--gutter) 0; max-width: var(--max); margin: 0 auto; }
.section__head { margin-bottom: 40px; max-width: 640px; }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.section__title { margin-top: 12px; font-size: 18px; font-weight: 500; line-height: 1.6; }
.section__lead { margin-top: 8px; color: var(--gray); font-size: 14px; }
@media (min-width: 900px) { .section__title { font-size: 22px; } .section__head { margin-bottom: 56px; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 28px;
  border: 1px solid var(--ink); border-radius: 999px;
  font-size: 13px; letter-spacing: .08em;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--accent { border-color: var(--accent); background: var(--accent); color: var(--white); }
.btn--accent:hover { background: #A93522; border-color: #A93522; color: var(--white); }
.section > .btn { margin-top: 40px; }

.textlink { font-size: 13px; letter-spacing: .06em; border-bottom: 1px solid currentColor; padding-bottom: 2px; white-space: nowrap; }
.textlink--back { border: 0; color: var(--gray); }

.badge {
  position: absolute; left: 10px; top: 10px; z-index: 2;
  font-family: var(--font-latin); font-size: 9.5px; font-weight: 500; letter-spacing: .18em;
  color: var(--gray); background: rgba(247, 245, 240, .88);
  padding: 3px 7px; border-radius: 2px;
}
.badge--inline { position: static; background: none; padding: 0; }

/* ---------- like ♡ ---------- */

.like {
  display: inline-flex; align-items: center; gap: 6px;
  min-width: 44px; min-height: 44px; padding: 0 10px;
  margin-right: -10px;
  color: var(--ink);
  font-size: 13px; letter-spacing: .04em;
  -webkit-tap-highlight-color: transparent;
}
.like__icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.4; transition: fill .2s, stroke .2s; flex: none; }
.like__count { font-variant-numeric: tabular-nums; min-width: 1ch; }
.like__count:empty { display: none; }
.like[aria-pressed="true"] .like__icon { fill: var(--accent); stroke: var(--accent); }
.like.is-pop .like__icon { animation: pop .45s var(--ease); }
@keyframes pop { 0% { transform: scale(1); } 35% { transform: scale(1.32); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .like.is-pop .like__icon { animation: none; } }

.like--labeled {
  margin: 0; padding: 0 20px 0 16px; min-height: 48px;
  border: 1px solid var(--ink); border-radius: 999px;
}
.like--labeled[aria-pressed="true"] { border-color: var(--accent); }
.like--labeled .like__count:not(:empty)::before { content: "·"; margin-right: 6px; color: var(--gray); }

/* ---------- philosophy (home) ---------- */

.philo { max-width: 880px; }
.philo__keyword { margin-top: 24px; font-family: var(--font-display); font-size: clamp(72px, 24vw, 168px); line-height: 1.05; letter-spacing: 0; }
.philo__keyword--xl { font-size: clamp(96px, 32vw, 240px); }
.philo__reading { margin-top: 4px; font-size: 12px; letter-spacing: .14em; color: var(--gray); }
.philo__lead { margin-top: 40px; font-size: clamp(20px, 5.4vw, 32px); font-weight: 500; line-height: 1.55; }
.philo__summary { margin-top: 20px; color: #3A3835; max-width: 34em; }
.philo__actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; }
.philo__actions--center { justify-content: center; margin: 56px 0 0; }
.philo__closing { margin-top: 56px; text-align: center; font-family: var(--font-display); font-size: clamp(18px, 4.8vw, 26px); line-height: 1.7; }

/* ---------- collection grid & card ---------- */

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 12px; }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px 24px; } }
@media (min-width: 1200px) { .grid--full { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid .card[hidden] { display: none; }

.card { position: relative; min-width: 0; }
.card__media { position: relative; aspect-ratio: 4 / 5; background: var(--white); overflow: hidden; }
.card__track {
  display: flex; height: 100%;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.card__track::-webkit-scrollbar { display: none; }
.card__track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.card__dots { display: flex; justify-content: center; gap: 5px; margin-top: 8px; height: 4px; }
.card__dots span { width: 4px; height: 4px; border-radius: 50%; background: var(--line); transition: background .2s; }
.card__dots span.is-active { background: var(--ink); }

@media (hover: hover) and (pointer: fine) {
  .card__track { overflow: hidden; position: relative; display: block; }
  .card__track img { position: absolute; inset: 0; transition: opacity .5s var(--ease), transform 1.2s var(--ease); }
  .card__track img:nth-child(2) { opacity: 0; }
  .card__media--multi:hover .card__track img:nth-child(2) { opacity: 1; }
  .card__media:hover .card__track img { transform: scale(1.02); }
  .card__dots { display: none; }
}

.card__body { display: flex; justify-content: space-between; align-items: flex-start; gap: 4px; margin-top: 10px; }
.card__meta { min-width: 0; }
.card__no { font-size: 10.5px; letter-spacing: .12em; color: var(--gray); }
.card__title a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; margin-top: 2px; }
.card__glyph { font-family: var(--font-display); font-size: 20px; font-weight: 400; line-height: 1.3; letter-spacing: .02em; }
.card__reading { font-size: 11px; font-weight: 500; letter-spacing: .16em; color: var(--gray); }
.card .like { margin-top: -8px; }
@media (min-width: 900px) { .card__glyph { font-size: 24px; } }

.filters { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(var(--gutter) * -1) 32px; padding: 0 var(--gutter) 4px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 36px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; letter-spacing: .06em; white-space: nowrap; }
.chip.is-active { border-color: var(--ink); background: var(--ink); color: var(--paper); }

/* ---------- journal ---------- */

.hscroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter);
  scroll-padding: 0 var(--gutter);
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }
@media (min-width: 900px) { .hscroll { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; margin: 0; padding: 0; gap: 24px; } }

.jgrid { display: grid; gap: 48px; }
@media (min-width: 700px) { .jgrid { grid-template-columns: repeat(2, 1fr); gap: 56px 24px; } }
@media (min-width: 1100px) { .jgrid { grid-template-columns: repeat(3, 1fr); } }

.jcard__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--line); margin-bottom: 14px; }
.jcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.jcard a:hover .jcard__media img { transform: scale(1.03); }
.jcard__date { font-size: 11px; letter-spacing: .12em; color: var(--gray); }
.jcard__title { margin-top: 4px; font-size: 16px; font-weight: 500; line-height: 1.5; }
.jcard__excerpt { margin-top: 6px; font-size: 13px; color: var(--gray); }

/* ---------- instagram ---------- */

.ig { text-align: left; }
.ig__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
@media (min-width: 900px) { .ig__grid { grid-template-columns: repeat(6, 1fr); gap: 8px; } }
.ig__tile { aspect-ratio: 1; overflow: hidden; background: var(--line); }
.ig__tile img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s; }
.ig__tile:hover img { opacity: .85; }
.ig .btn { margin-top: 28px; }

/* ---------- pages ---------- */

.page { max-width: var(--max); margin: 0 auto; padding: calc(var(--header-h) + 56px) var(--gutter) 0; }
.page__head { max-width: 760px; margin-bottom: 48px; }
.page__head .textlink--back { display: inline-block; margin-bottom: 32px; }
.page__title { margin-top: 16px; font-size: clamp(24px, 6.4vw, 44px); font-weight: 500; line-height: 1.45; }
.page__title--sm { font-size: clamp(18px, 4.6vw, 26px); line-height: 1.6; }
.page__foot { margin-top: 72px; text-align: center; }

.prose { max-width: 34em; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 1.4em; }
.prose h2 { margin: 2.2em 0 .6em; font-size: 18px; font-weight: 500; }
.prose h3 { margin: 1.8em 0 .5em; font-size: 16px; font-weight: 500; }
.prose a { border-bottom: 1px solid currentColor; }
.prose figure { margin: 2em 0; }
.prose ul { padding-left: 1.2em; }

.philo-page { max-width: 880px; }
.philo-page .prose { margin-top: 8px; font-size: 16px; }
.future { margin-top: var(--section); padding-top: 48px; border-top: 1px solid var(--line); }
.future__title { font-size: 18px; font-weight: 500; margin-bottom: 24px; }

.article { max-width: 760px; }
.article__hero { aspect-ratio: 3 / 2; overflow: hidden; margin-bottom: 40px; background: var(--line); }
.article__hero img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- design detail ---------- */

.design { max-width: var(--max); margin: 0 auto; padding: calc(var(--header-h) + 24px) var(--gutter) 0; }
.design__head { margin-bottom: 24px; }
.design__head .textlink--back { display: inline-block; margin-bottom: 24px; }
.design__no { font-size: 11px; letter-spacing: .12em; color: var(--gray); }
.design__title { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; font-weight: 400; }
.design__glyph { font-family: var(--font-display); font-size: clamp(48px, 15vw, 96px); line-height: 1.1; }
.design__reading { font-size: 12px; font-weight: 500; letter-spacing: .2em; color: var(--gray); }

.gallery { display: grid; gap: 12px; margin: 0 calc(var(--gutter) * -1); }
.gallery__item { aspect-ratio: 4 / 5; background: var(--white); overflow: hidden; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; }
.design__text { padding: 40px var(--gutter); max-width: 34em; }
.design__label { font-size: 11px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--gray); margin-bottom: 12px; }
.design__meaning { font-size: 18px; line-height: 1.6; }
@media (min-width: 900px) {
  .gallery { margin: 0; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
  .gallery__item--first { grid-column: 1 / -1; aspect-ratio: auto; height: min(88svh, 1000px); }
  .gallery__item--first img { object-fit: contain; }
  .design__text { padding: 40px; }
}
.design__note { margin-top: 32px; font-size: 12px; color: var(--gray); letter-spacing: .04em; }

.likebar {
  position: sticky; bottom: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  margin: 24px calc(var(--gutter) * -1) 0;
  padding: 6px var(--gutter) calc(6px + env(safe-area-inset-bottom));
  background: rgba(247, 245, 240, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.likebar .like { margin: 0; padding-left: 0; font-size: 14px; }
.likebar .like__icon { width: 26px; height: 26px; }
.share { min-height: 44px; padding: 0 4px; font-size: 13px; letter-spacing: .06em; border-bottom: 1px solid currentColor; }
@media (min-width: 900px) { .likebar { margin: 32px 0 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: none; backdrop-filter: none; position: static; } }

.design__next { margin-top: 72px; border-top: 1px solid var(--line); }
.design__next a { display: flex; flex-direction: column; gap: 4px; padding: 32px 0; }
.design__next-glyph { font-family: var(--font-display); font-size: 40px; line-height: 1.2; }
.coll--others { padding-top: 48px; }

/* ---------- footer ---------- */

.footer { margin-top: var(--section); padding: 56px var(--gutter) calc(32px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.footer__brand { font-weight: 600; font-size: 14px; letter-spacing: .32em; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 24px; font-size: 13px; }
.footer__nav a { padding: 8px 0; }
.footer__note { margin-top: 24px; font-size: 11px; color: var(--gray); }
.footer__copy { margin-top: 8px; font-size: 11px; color: var(--gray); }

/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 12px); opacity: 0;
  width: min(92vw, 420px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px; border-radius: 10px;
  background: var(--ink); color: var(--paper); font-size: 13px; line-height: 1.5;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast a { flex: none; color: var(--paper); border-bottom: 1px solid currentColor; padding: 6px 0; }

/* ---------- 404 ---------- */

.notfound { text-align: center; }
.notfound__glyph { font-family: var(--font-display); font-size: 160px; line-height: 1; color: var(--line); }
.notfound .btn { margin: 24px 4px 0; }

/* ---------- reveal on scroll ---------- */

.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* 詳細ページ下の「他のデザイン」：スマホは2点、PCは3点 */
@media (max-width: 899px) { .coll--others .grid > .card:nth-child(3) { display: none; } }

/* 5文字以上のデザイン名は1行に収まる大きさにする */
.design__glyph--long { font-size: clamp(36px, 10.5vw, 80px); white-space: nowrap; }
.gallery__item--wide { aspect-ratio: auto; }
.gallery__item--wide img { height: auto; }
@media (min-width: 900px) { .gallery__item--wide { grid-column: 1 / -1; } }

/* トップ：ひらがなを薄く並べた背景 */
.hero--kana { background: var(--paper); color: var(--ink); }
.hero--kana::after { background: linear-gradient(180deg, rgba(247,245,240,0) 50%, var(--paper) 90%); }
.hero__kana {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
  font-family: var(--font-display); font-size: clamp(34px, 9vw, 72px); line-height: 1;
  color: var(--ink);
  pointer-events: none; user-select: none;
}
.hero__kana span { position: absolute; white-space: nowrap; }
.card__track img.is-wide { object-fit: contain; }
.page-home:has(.hero--kana) .header:not(.is-solid):not(.is-open) { color: var(--ink); }

/* 写真を切らずに全体を表示する（着用写真は2:3） */
.card__media { aspect-ratio: 2 / 3; }
.card__track img { object-fit: contain; }
.gallery__item { aspect-ratio: auto; }
.gallery__item img { height: auto; object-fit: contain; }
