/* ============================================================
   浮月酒造 — デザインシステム (全ページ共通)
   配色: 墨黒の夜 + 和紙の生成り、アクセントは月白1色のみ。
   書体: 和 Shippori Mincho / 欧 Cormorant Garamond / UI Noto Sans JP。
   モーションの初期状態は html.js が付いた時だけ適用する
   (JS が無効な環境ではすべて静的に表示される)。
   ============================================================ */

:root {
  /* 夜(墨黒、わずかに青み) */
  --c-ink: #0e1116;
  --c-ink-2: #151a21;
  --c-ink-3: #1d242e;
  /* 和紙(生成り) */
  --c-washi: #f3f0e8;
  --c-washi-2: #eae6da;
  /* 文字色 */
  --c-text: #23272d;            /* 和紙上の墨 */
  --c-text-inv: #eae7de;        /* 夜の上の生成り */
  --c-mute: rgba(35, 39, 45, .62);
  --c-mute-inv: rgba(234, 231, 222, .55);
  /* 罫線 */
  --c-line: rgba(35, 39, 45, .16);
  --c-line-inv: rgba(234, 231, 222, .16);
  /* アクセント: 月白(青みがかった白)1色のみ */
  --c-moon: #c9d6e2;
  --c-moon-dim: rgba(201, 214, 226, .65);

  --f-serif: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --f-en: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --f-sans: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;

  --w-container: 1200px;
  --w-wide: 1480px;
  --pad-x: clamp(20px, 5vw, 56px);
  --sec-pad: clamp(96px, 13vw, 190px);

  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--f-serif);
  font-weight: 400;
  background: var(--c-ink);
  color: var(--c-text-inv);
  line-height: 2;
  letter-spacing: .06em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
ul, ol { list-style: none; }
::selection { background: var(--c-moon); color: var(--c-ink); }

/* ============================== 汎用 ============================== */

.container { max-width: var(--w-container); margin: 0 auto; padding: 0 var(--pad-x); }
.container--wide { max-width: var(--w-wide); }

.sec { padding: var(--sec-pad) 0; position: relative; }
.sec--washi { background: var(--c-washi); color: var(--c-text); }
.sec--washi2 { background: var(--c-washi-2); color: var(--c-text); }
.sec--ink { background: var(--c-ink); color: var(--c-text-inv); }
.sec--ink2 { background: var(--c-ink-2); color: var(--c-text-inv); }

/* 英字ラベル + 和ラベルの2段(セクション見出しの定石) */
.label-pair { display: flex; align-items: baseline; gap: 18px; margin-bottom: clamp(28px, 4vw, 48px); }
.label-pair__en {
  font-family: var(--f-en);
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--c-moon-dim);
}
.sec--washi .label-pair__en, .sec--washi2 .label-pair__en { color: rgba(35, 39, 45, .5); }
.label-pair__ja { font-family: var(--f-sans); font-weight: 400; font-size: 12px; letter-spacing: .3em; color: var(--c-mute-inv); }
.sec--washi .label-pair__ja, .sec--washi2 .label-pair__ja { color: var(--c-mute); }
.label-pair::after { content: ''; flex: 0 0 56px; height: 1px; background: currentColor; opacity: .25; align-self: center; }

/* 見出し */
.h-display {
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1.6;
  letter-spacing: .14em;
}
.h-sec {
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.7;
  letter-spacing: .16em;
}
.h-sub { font-family: var(--f-serif); font-weight: 500; font-size: clamp(19px, 2vw, 24px); letter-spacing: .18em; line-height: 1.9; }

.lead { font-size: clamp(14px, 1.3vw, 16px); line-height: 2.4; letter-spacing: .1em; }
.lead--mute { color: var(--c-mute-inv); }
.sec--washi .lead--mute, .sec--washi2 .lead--mute { color: var(--c-mute); }

.small { font-family: var(--f-sans); font-weight: 300; font-size: 12px; letter-spacing: .12em; }

/* 縦書き(和の記号。ヒーロー・章扉・銘柄名のアクセント使用に限定) */
.vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: .32em;
  line-height: 2.1;
}

/* 罫線テキストリンク(ボタン) */
.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--f-serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .3em;
  padding-bottom: 12px;
  position: relative;
}
.btn-line::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  opacity: .4;
  transform-origin: left;
  transition: opacity .5s var(--ease-out);
}
.btn-line::before {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .7s var(--ease-out);
}
.btn-line:hover::before { transform: scaleX(1); transform-origin: left; }
.btn-line:hover::after { opacity: 0; }
.btn-line .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-moon);
  transition: transform .5s var(--ease-out);
}
.btn-line:hover .dot { transform: translateX(6px); }
.sec--washi .btn-line .dot, .sec--washi2 .btn-line .dot { background: var(--c-text); }

/* 写真の上に敷く墨ベール(filter の代わりに opacity で減彩する) */
.veil { position: absolute; inset: 0; background: var(--c-ink); opacity: .35; pointer-events: none; }

/* パララックス枠: 内側の img を main.js が上下に動かす */
.parallax { overflow: hidden; position: relative; }
.parallax > img, .parallax > .parallax__inner {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.15);
  will-change: transform;
}

/* ============================== ヘッダー ============================== */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(18px, 3vw, 30px) clamp(20px, 4vw, 48px);
  /* 白文字 + difference 合成: 和紙セクションの上では自動で墨色に反転する */
  mix-blend-mode: difference;
  color: #fff;
  transition: transform .6s var(--ease-out);
}
.header.is-hidden { transform: translateY(-110%); }

.header__logo { display: flex; flex-direction: column; gap: 2px; }
.header__logo-ja { font-family: var(--f-serif); font-weight: 500; font-size: 19px; letter-spacing: .34em; }
.header__logo-en { font-family: var(--f-en); font-size: 10px; letter-spacing: .38em; text-transform: uppercase; opacity: .65; }

.header__nav { display: flex; gap: clamp(20px, 2.6vw, 38px); align-items: center; }
.header__nav a {
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: 12.5px;
  letter-spacing: .26em;
  position: relative;
  padding-bottom: 6px;
}
.header__nav a::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease-out);
}
.header__nav a:hover::after, .header__nav a.is-active::after { transform: scaleX(1); transform-origin: left; }

.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 44px; height: 44px;
  padding: 10px 6px;
}
.burger span { display: block; width: 100%; height: 1px; background: currentColor; transition: transform .5s var(--ease-out), opacity .4s; }
.burger.is-open span:nth-child(1) { transform: translateY(4px) rotate(20deg); }
.burger.is-open span:nth-child(2) { transform: translateY(-4px) rotate(-20deg); }

@media (max-width: 880px) {
  .header__nav { display: none; }
}

/* ============================== 全画面メニュー ============================== */

.menu {
  position: fixed; inset: 0;
  z-index: 800;
  background: var(--c-ink-2);
  color: var(--c-text-inv);
  display: flex;
  align-items: center;
  visibility: hidden;
  opacity: 0;
}
.menu.is-open { visibility: visible; }
.menu__inner {
  width: 100%;
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
}
.menu__list { display: flex; flex-direction: column; gap: clamp(10px, 2.4vh, 22px); }
.menu__list a {
  display: inline-flex;
  align-items: baseline;
  gap: 22px;
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: clamp(26px, 4.6vh, 42px);
  letter-spacing: .22em;
  opacity: .85;
  transition: opacity .4s, letter-spacing .6s var(--ease-out);
}
.menu__list a:hover { opacity: 1; letter-spacing: .3em; }
.menu__list .en { font-family: var(--f-en); font-style: italic; font-size: 13px; letter-spacing: .34em; text-transform: uppercase; color: var(--c-moon-dim); }
.menu__side { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.menu__moon { width: clamp(140px, 18vw, 230px); height: clamp(140px, 18vw, 230px); border-radius: 50%; overflow: hidden; }
.menu__moon img { width: 100%; height: 100%; object-fit: cover; }
.menu__addr { font-family: var(--f-sans); font-weight: 300; font-size: 11px; letter-spacing: .2em; line-height: 2.2; color: var(--c-mute-inv); text-align: center; }

@media (max-width: 880px) {
  .menu__inner { grid-template-columns: 1fr; }
  .menu__side { display: none; }
}

/* ============================== 章扉(下層ページ共通ヒーロー) ============================== */

.ph {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  background: var(--c-ink);
  overflow: hidden;
}
.ph__bg { position: absolute; inset: 0; }
.ph__bg img { width: 100%; height: 115%; object-fit: cover; transform: scale(1.12); will-change: transform; }
.ph__veil {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(14,17,22,.42) 0%, rgba(14,17,22,.18) 45%, rgba(14,17,22,.86) 100%);
}
.ph__inner { position: relative; width: 100%; max-width: var(--w-wide); margin: 0 auto; padding: 160px var(--pad-x) clamp(56px, 9vh, 96px); }
.ph__en {
  font-family: var(--f-en);
  font-style: italic;
  font-size: clamp(15px, 1.6vw, 19px);
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--c-moon-dim);
  margin-bottom: 18px;
}
.ph__title { font-weight: 500; font-size: clamp(38px, 6vw, 76px); letter-spacing: .2em; line-height: 1.4; }
.ph__lead { margin-top: 26px; max-width: 560px; font-size: clamp(13px, 1.2vw, 15px); line-height: 2.4; letter-spacing: .12em; color: var(--c-mute-inv); }

/* ============================== 次ページ誘導(下層ページ末尾共通) ============================== */

.next-nav { background: var(--c-ink-2); }
.next-nav__link {
  display: block;
  position: relative;
  padding: clamp(80px, 11vw, 150px) 0;
  text-align: center;
  overflow: hidden;
}
.next-nav__en { font-family: var(--f-en); font-style: italic; font-size: 14px; letter-spacing: .42em; text-transform: uppercase; color: var(--c-moon-dim); display: block; margin-bottom: 20px; }
.next-nav__title { font-weight: 500; font-size: clamp(30px, 4.4vw, 52px); letter-spacing: .24em; transition: letter-spacing .8s var(--ease-out); }
.next-nav__link:hover .next-nav__title { letter-spacing: .34em; }
.next-nav__bg { position: absolute; inset: 0; opacity: 0; transition: opacity .8s; }
.next-nav__bg img { width: 100%; height: 100%; object-fit: cover; }
.next-nav__bg::after { content: ''; position: absolute; inset: 0; background: rgba(14,17,22,.78); }
.next-nav__link:hover .next-nav__bg { opacity: 1; }
.next-nav__inner { position: relative; }

/* ============================== CTA帯(蔵見学・問い合わせ誘導) ============================== */

.cta-band { position: relative; background: var(--c-ink-3); overflow: hidden; }
.cta-band__bg { position: absolute; inset: 0; }
.cta-band__bg img { width: 100%; height: 115%; object-fit: cover; transform: scale(1.12); }
.cta-band__bg::after { content: ''; position: absolute; inset: 0; background: rgba(14,17,22,.7); }
.cta-band__inner { position: relative; padding: clamp(90px, 12vw, 170px) var(--pad-x); text-align: center; }
.cta-band__title { font-weight: 500; font-size: clamp(24px, 3vw, 38px); letter-spacing: .22em; line-height: 2; margin-bottom: 18px; }
.cta-band__lead { font-size: 14px; letter-spacing: .14em; line-height: 2.4; color: var(--c-mute-inv); margin-bottom: 44px; }
.cta-band__actions { display: flex; gap: clamp(32px, 5vw, 64px); justify-content: center; flex-wrap: wrap; }

/* ============================== フッター ============================== */

.footer { background: var(--c-ink); color: var(--c-text-inv); padding: clamp(80px, 10vw, 140px) 0 0; border-top: 1px solid var(--c-line-inv); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  padding-bottom: clamp(60px, 8vw, 100px);
}
.footer__brand-ja { font-weight: 500; font-size: 26px; letter-spacing: .34em; margin-bottom: 8px; }
.footer__brand-en { font-family: var(--f-en); font-size: 11px; letter-spacing: .4em; text-transform: uppercase; color: var(--c-mute-inv); margin-bottom: 28px; }
.footer__copy-line { font-size: 13px; letter-spacing: .18em; line-height: 2.4; color: var(--c-mute-inv); }
.footer__head { font-family: var(--f-sans); font-size: 11px; letter-spacing: .34em; color: var(--c-moon-dim); margin-bottom: 22px; }
.footer__nav { display: flex; flex-direction: column; gap: 14px; }
.footer__nav a { font-family: var(--f-sans); font-weight: 300; font-size: 13px; letter-spacing: .22em; opacity: .8; transition: opacity .4s, transform .5s var(--ease-out); }
.footer__nav a:hover { opacity: 1; transform: translateX(6px); }
.footer__addr { font-family: var(--f-sans); font-weight: 300; font-size: 12.5px; letter-spacing: .16em; line-height: 2.4; color: var(--c-mute-inv); font-style: normal; }
.footer__note {
  border-top: 1px solid var(--c-line-inv);
  padding: 28px var(--pad-x) 22px;
  text-align: center;
}
.footer__law { font-family: var(--f-sans); font-weight: 300; font-size: 11px; letter-spacing: .14em; line-height: 2.2; color: var(--c-mute-inv); margin-bottom: 14px; }
.footer__fiction { font-family: var(--f-sans); font-weight: 300; font-size: 10.5px; letter-spacing: .12em; color: rgba(234,231,222,.38); margin-bottom: 10px; }
.footer__copyright { font-family: var(--f-en); font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: rgba(234,231,222,.38); }

@media (max-width: 880px) {
  .footer__grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ============================== ローダー / ページ遷移幕 ============================== */

/* ローダー: 初期表示は CSS で出しておく(JS 適用前のチラ見え防止) */
.loader {
  position: fixed; inset: 0;
  z-index: 1000;
  background: var(--c-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 26px;
}
.loader.is-done { display: none; }
.loader__moon {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(201, 214, 226, .35);
  position: relative;
  overflow: hidden;
  opacity: 0;
}
.loader__moon-fill {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--c-moon);
  transform: translateY(100%);
}
.loader__name { font-family: var(--f-serif); font-weight: 500; font-size: 17px; letter-spacing: .5em; text-indent: .5em; color: var(--c-text-inv); opacity: 0; }

/* 遷移幕(View Transitions 非対応ブラウザ用フォールバック) */
.curtain {
  position: fixed; inset: 0;
  z-index: 990;
  background: var(--c-ink);
  transform: translateY(101%);
  pointer-events: none;
}

/* View Transitions API(対応ブラウザはこちらが効く) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .4s ease both; }
::view-transition-new(root) { animation: vt-in .65s ease both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-2vh); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(2vh); } }

/* ============================== モーション初期状態(html.js の時だけ) ============================== */

.js [data-reveal] { opacity: 0; transform: translateY(40px); }
.js [data-reveal="fade"] { transform: none; }
.js [data-clip] { clip-path: inset(14% 9% 14% 9%); }
.js [data-clip="left"] { clip-path: inset(0% 100% 0% 0%); }
.js [data-clip="up"] { clip-path: inset(100% 0% 0% 0%); }
.js [data-batch] > * { opacity: 0; transform: translateY(36px); }

/* 文字分割(main.js が span を生成する) */
.char-mask { display: inline-block; overflow: hidden; vertical-align: top; }
.char { display: inline-block; transform: translateY(112%); will-change: transform; }

/* reduced-motion: 全初期状態を解除して静的表示 */
.js.reduced [data-reveal],
.js.reduced [data-batch] > * { opacity: 1; transform: none; }
.js.reduced [data-clip] { clip-path: none; }
.js.reduced .char { transform: none; }

@media (max-width: 768px) {
  :root { --sec-pad: clamp(72px, 18vw, 110px); }
  body { line-height: 1.9; }
}
