/* KOTODAMA 言霊 — 言葉と体験のスタジオ(架空)
   ダーク×墨×金。背景の立体タイポは #bg の WebGL が全て描く。素材画像ゼロ。 */

:root {
  --bg: #0d0b09;
  --bg-2: #16120d;
  --ink: #f2ede4;
  --ink-dim: #bdb2a2;
  --ink-faint: #7d7466;
  --gold: #d8b36a;
  --gold-bright: #edcd8f;
  --line: rgba(242, 237, 228, .13);
  --line-strong: rgba(242, 237, 228, .27);
  --glass: rgba(22, 18, 13, .55);
  --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(1100px 720px at 78% -12%, rgba(216, 179, 106, .10), transparent 58%),
    radial-gradient(900px 620px at 8% 110%, rgba(120, 90, 50, .08), 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 50%, rgba(5, 4, 3, .58));
}

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

::selection { background: rgba(216, 179, 106, .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(4, 3, 2, .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, 11, 9, .6);
  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: 4px;
  color: var(--gold); font-size: 17px; 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: 6px; }
.links a {
  font-family: var(--sans); font-size: 13px; letter-spacing: .1em;
  color: var(--ink-dim); text-decoration: none;
  padding: 8px 14px; border-radius: 999px;
  transition: color .2s, background .2s;
}
.links a:hover { color: var(--ink); background: rgba(242, 237, 228, .07); }
.links .pill-btn {
  color: #14100a; background: var(--gold); font-weight: 600;
  margin-left: 6px;
}
.links .pill-btn:hover { color: #14100a; 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: 620px; }
.hero h1 {
  font-size: clamp(42px, 7vw, 86px);
  line-height: 1.28; font-weight: 500; letter-spacing: .02em;
  margin: 18px 0 22px;
  text-shadow: 0 4px 40px rgba(5, 4, 3, .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(5, 4, 3, .9);
  max-width: 32em;
}
.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; }
}

/* ── 思想 ─────────────────────────────────── */
.manifesto {
  min-height: 160svh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 22vh clamp(18px, 5vw, 60px);
}
.manifesto .line {
  font-size: clamp(26px, 4.6vw, 50px);
  line-height: 1.9; font-weight: 500;
  text-shadow: 0 2px 26px rgba(5, 4, 3, .85);
}
.manifesto .line.small {
  font-size: clamp(14px, 1.8vw, 19px);
  color: var(--ink-dim); margin-top: 36px; letter-spacing: .08em;
}
.gold { color: var(--gold); }

/* ── 仕事 ─────────────────────────────────── */
.approach {
  min-height: 150svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 18vh clamp(18px, 4vw, 52px);
  max-width: 1200px; margin: 0 auto;
}
.sec-head { text-align: center; }
.sec-head h2 {
  font-size: clamp(25px, 3.4vw, 38px); font-weight: 500;
  margin-top: 12px; text-shadow: 0 2px 20px rgba(5, 4, 3, .85);
}
.cards {
  display: grid; gap: 20px; margin-top: 48px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card { padding: 30px 28px 28px; transition: transform .3s ease, border-color .3s ease; }
.card:hover { transform: translateY(-6px); border-color: var(--line-strong); }
.card .num {
  font-family: var(--serif-en); font-size: 11px; letter-spacing: .32em;
  color: var(--gold);
}
.card h3 { font-size: clamp(26px, 2.6vw, 34px); font-weight: 500; margin: 14px 0 10px; }
.card h3 small {
  display: inline-block; font-family: var(--serif-en); font-style: italic; font-weight: 400;
  font-size: 13px; color: var(--ink-faint); letter-spacing: .22em; margin-left: 12px;
}
.card p { font-size: 13.5px; color: var(--ink-dim); }

/* ── 数字 ─────────────────────────────────── */
.proof {
  min-height: 140svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 18vh clamp(18px, 4vw, 52px);
  max-width: 1100px; margin: 0 auto;
}
.stats {
  display: grid; gap: 18px; margin-top: 46px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.stat { padding: 26px 22px 22px; text-align: center; }
.stat dt { font-family: var(--sans); font-size: 12px; letter-spacing: .2em; color: var(--ink-faint); }
.stat dd { margin-top: 8px; }
.stat b {
  font-family: var(--serif-en); font-weight: 500; font-size: clamp(38px, 4.6vw, 56px);
  color: var(--gold); font-variant-numeric: tabular-nums; line-height: 1.1;
}
.stat i { font-style: normal; font-size: 14px; color: var(--ink-dim); margin-left: 4px; }
.plan-note { margin-top: 26px; text-align: center; font-family: var(--sans); font-size: 11.5px; color: var(--ink-faint); }

/* ── CTA ──────────────────────────────────── */
.cta {
  min-height: 120svh;
  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: 6px;
  color: var(--gold); font-size: 25px; 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, 11, 9, .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: #14100a;
  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, 8, 6, .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; }
  .card { transition: 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;
}


/* ── 書体設計（見出し＝個性 / 本文＝可読性） ──────────────────────
   見出し: New Tegomin
   本文  : BIZ UDPMincho（Google Fonts の和文で palt が効く数少ない書体。
           読点のあとのアキが締まり、Mac / Windows で見え方が揃う）
   欧文は先頭に置いた書体から取り、和文だけが差し替わる。 */
h1, h2, h3, h4, .lede, .lead, .kicker, .statement, blockquote {
  font-family: "Cormorant Garamond", "New Tegomin", 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;
}
