/* TSUMUGI 紬 — 工芸アトリエ(架空)
   暗い蔵×行灯の金。背景のギャラリー空間は #bg の WebGL が全て描く。
   作品画像はコード生成プレースホルダ(assets/img/cut1〜4.jpg で差し替え可能)。 */

:root {
  --bg: #0d0c0a;
  --bg-2: #16130e;
  --ink: #f0eae0;
  --ink-dim: #b9ae9d;
  --ink-faint: #7c7364;
  --gold: #c8a45c;
  --gold-bright: #e2c184;
  --indigo: #8095c0;
  --line: rgba(240, 234, 224, .13);
  --line-strong: rgba(240, 234, 224, .27);
  --glass: rgba(20, 17, 12, .58);
  --radius: 14px;
  --serif-en: "Cormorant Garamond", "Times New Roman", serif;
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1000px 700px at 82% -10%, rgba(200, 164, 92, .09), transparent 58%),
    radial-gradient(900px 620px at 6% 110%, rgba(128, 149, 192, .06), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 2.0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* WebGL キャンバス。常に最背面に固定 */
#bg {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; display: block;
}
.no-webgl #bg { display: none; }

/* 周辺減光 */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 44%, transparent 48%, rgba(4, 3, 2, .6));
}

.content, .foot { position: relative; z-index: 1; }

::selection { background: rgba(200, 164, 92, .35); }

/* ── ガラスパネル共通 ─────────────────────── */
.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(15px) saturate(1.1);
  -webkit-backdrop-filter: blur(15px) saturate(1.1);
  box-shadow: 0 18px 50px rgba(3, 2, 1, .5);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 11px; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold);
}

/* ── ナビ ─────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 44px);
  transition: background .35s ease, backdrop-filter .35s ease;
}
.nav.scrolled {
  background: rgba(13, 12, 10, .62);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}
.brand {
  display: flex; align-items: center; gap: 11px;
  color: var(--ink); text-decoration: none;
}
.brand-mark {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 1px solid var(--gold); border-radius: 50%;
  color: var(--gold); font-size: 16px; line-height: 1;
}
.brand span:not(.brand-mark) {
  font-family: var(--serif-en); font-size: 20px; font-weight: 500;
  letter-spacing: .14em;
}
.brand em { font-style: normal; font-size: 12px; color: var(--ink-dim); margin-left: 4px; }
.links { display: flex; align-items: center; gap: 4px; }
.links a {
  font-family: var(--sans); font-size: 13.5px; letter-spacing: .12em;
  color: var(--ink-dim); text-decoration: none;
  padding: 8px 13px; border-radius: 999px;
  transition: color .2s, background .2s;
}
.links a:hover { color: var(--ink); background: rgba(240, 234, 224, .07); }
.links .pill-btn {
  color: #171204; background: var(--gold); font-weight: 600;
  margin-left: 6px;
}
.links .pill-btn:hover { color: #171204; background: var(--gold-bright); }
@media (max-width: 700px) {
  .links a:not(.pill-btn) { display: none; }
}

/* ── ヒーロー ─────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex; align-items: center;
  padding: 0 clamp(18px, 5vw, 64px);
  position: relative;
}
.hero-inner { max-width: 640px; }
.hero h1 {
  font-size: clamp(36px, 5.8vw, 68px);
  line-height: 1.5; font-weight: 500; letter-spacing: .02em;
  margin: 18px 0 22px;
  text-shadow: 0 4px 40px rgba(4, 3, 2, .9);
}
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lead {
  font-size: clamp(13.5px, 1.5vw, 15.5px); color: var(--ink-dim);
  text-shadow: 0 2px 18px rgba(4, 3, 2, .9);
  max-width: 33em;
}
.scroll-cue {
  position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%);
  font-family: var(--sans); font-size: 10.5px; letter-spacing: .34em; color: var(--ink-faint);
  animation: cueFloat 2.6s ease-in-out infinite;
  white-space: nowrap;
}
@keyframes cueFloat {
  0%, 100% { transform: translate(-50%, 0); opacity: .85; }
  50% { transform: translate(-50%, 7px); opacity: .45; }
}

/* ── 作品セクション ───────────────────────── */
.work {
  min-height: 165svh;
  display: flex; align-items: center;
  padding: 20vh clamp(18px, 5vw, 64px);
}
.work.w-right { justify-content: flex-end; }
.work.w-left { justify-content: flex-start; }
.w-panel {
  max-width: 440px;
  padding: clamp(28px, 4vw, 42px) clamp(24px, 4vw, 42px);
}
.w-panel .num {
  font-family: var(--sans); font-size: 11px; letter-spacing: .3em;
  color: var(--gold); text-transform: uppercase;
}
.w-panel h3 { font-size: clamp(22px, 2.7vw, 30px); font-weight: 500; line-height: 1.6; margin: 12px 0 12px; }
.w-panel h3 small {
  display: block; font-family: var(--serif-en); font-weight: 400;
  font-size: 13px; color: var(--ink-faint); letter-spacing: .26em; margin-top: 8px;
}
.w-panel p { font-size: 13.5px; color: var(--ink-dim); }
.w-panel .chips { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 7px; }
.w-panel .chips i {
  font-style: normal; font-family: var(--sans); font-size: 11px; letter-spacing: .08em;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
  color: var(--gold);
}

/* ── CTA ──────────────────────────────────── */
.cta {
  min-height: 130svh;
  display: grid; place-items: center;
  padding: 16vh clamp(18px, 4vw, 52px);
}
.cta-panel {
  max-width: 540px; width: 100%; text-align: center;
  padding: clamp(34px, 5vw, 54px) clamp(26px, 5vw, 48px);
}
.cta-mark {
  width: 46px; height: 46px; margin: 0 auto;
  display: grid; place-items: center;
  border: 1px solid var(--gold); border-radius: 50%;
  color: var(--gold); font-size: 23px; line-height: 1;
}
.cta-panel h2 { font-size: clamp(23px, 2.8vw, 30px); font-weight: 500; line-height: 1.7; margin: 20px 0 12px; }
.cta-panel p { font-size: 13px; color: var(--ink-dim); }
#notify { display: grid; gap: 12px; margin-top: 26px; }
#notify input {
  font-family: var(--sans); font-size: 14px;
  background: rgba(13, 12, 10, .6); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; outline: none; text-align: center;
  transition: border-color .2s;
}
#notify input:focus { border-color: var(--gold); }
#notify input::placeholder { color: var(--ink-faint); }
#notify button {
  font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .2em;
  background: var(--gold); color: #171204;
  border: none; border-radius: 10px; padding: 15px 16px; cursor: pointer;
  transition: background .2s, transform .2s;
}
#notify button:hover { background: var(--gold-bright); transform: translateY(-1px); }
.cta-panel .done { margin-top: 22px; color: var(--gold); font-size: 15px; }

/* ── フッター ─────────────────────────────── */
.foot {
  padding: 40px clamp(18px, 4vw, 52px) 56px;
  border-top: 1px solid var(--line);
  background: rgba(10, 9, 7, .65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--sans); font-size: 12px; color: var(--ink-faint);
  display: grid; gap: 6px;
}

/* ── 出現アニメーション(JS 有効時のみ隠す)── */
.js [data-reveal] { opacity: 0; transform: translateY(30px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .scroll-cue { animation: none; }
}

/* ──────────────────────────────────────────────────────────────
   和文タイポグラフィ調整
   1. palt        … 句読点・括弧まわりの余分なアキを詰める
   2. auto-phrase … 文節単位で折り返す（「書」「く。」のような分断を防ぐ）
   3. balance     … 見出しの行長を揃え、1文字だけ落ちる行を作らない
   4. strict      … 禁則処理を厳密にし、行頭に 。 、 」 が来ないようにする
   auto-phrase / balance / pretty は非対応ブラウザでは無視されるだけで、
   崩れることはない（プログレッシブ・エンハンスメント）。
   ────────────────────────────────────────────────────────────── */
body {
  font-feature-settings: "palt" 1;
  font-kerning: normal;
  line-break: strict;
  word-break: normal;
}
h1, h2, h3, h4, h5, .kicker, dt {
  word-break: auto-phrase;
  text-wrap: balance;
}
p, li, dd, td, .note, .desc, .caption,
.lede, .lead, .statement, blockquote, figcaption {
  word-break: auto-phrase;
  text-wrap: pretty;
}
/* 手動改行は広い画面でのみ効かせ、狭い画面では自動折り返しに任せる */
@media (max-width: 640px) {
  h1 br, h2 br, h3 br,
  .lede br, .lead br, .statement br { display: none; }
}

/* 本文は palt の効く明朝を優先する。
   Google Fonts の Shippori Mincho は palt を含まないため、読点のあとに
   全角ぶんのアキが残ってしまう。見出しは意匠優先でそのまま、
   読点が多く出る本文だけシステム明朝に寄せて字面を締める。 */
p, li, dd, td, .lede, .lead, .note, .desc, figcaption, blockquote {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Shippori Mincho", serif;
}


/* ── 書体設計（見出し＝個性 / 本文＝可読性） ──────────────────────
   見出し: Zen Antique
   本文  : BIZ UDPMincho（Google Fonts の和文で palt が効く数少ない書体。
           読点のあとのアキが締まり、Mac / Windows で見え方が揃う）
   欧文は先頭に置いた書体から取り、和文だけが差し替わる。 */
h1, h2, h3, h4, .lede, .lead, .kicker, .statement, blockquote {
  font-family: "Cormorant Garamond", "Zen Antique", serif;
}
p, li, dd, td, .note, .desc, .caption, figcaption, small {
  font-family: "BIZ UDPMincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
}


/* ── 本文書体の適用を確実にする ──
   サイト側に .card p のような具体的な指定があると本文書体が上書きされてしまうため、
   html body を前置きして優先度を上げる。等幅を意図した要素は除外する。 */
html body :is(p, li, dd, td, .note, .desc, .caption, figcaption, .body, .txt, .text):not(code):not(pre):not([class*="mono"]):not([class*="code"]) {
  font-family: "BIZ UDPMincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
}
