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

:root {
  --bg: #0d0b09;
  --bg-2: #16120d;
  --ink: #f2ede4;
  --ink-dim: #bdb2a2;
  /* AA 確保: 対 --bg で約 6.2:1（旧 #7d7466 は 4.27:1 で未達だった） */
  --ink-faint: #9b917f;
  --gold: #d8b36a;
  --gold-bright: #edcd8f;
  --line: rgba(242, 237, 228, .13);
  --line-strong: rgba(242, 237, 228, .27);
  --glass: rgba(22, 18, 13, .55);
  /* 立体タイポの上に文字を置く区画で使う不透明面。3D と本文を面で分離する */
  --surface: rgba(11, 9, 7, .96);
  --radius: 14px;
  --serif-en: "Cormorant Garamond", "Times New Roman", serif;
  --serif: "BIZ UDPMincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --display: "Cormorant Garamond", "New Tegomin", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --fs-body: clamp(14.5px, 1.05vw, 17px);
  --fs-note: clamp(12px, .85vw, 13.5px);
  --fs-label: clamp(11.5px, .8vw, 13px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { 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: 1.95;
  -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: var(--fs-label); 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 .3s var(--ease), background .3s var(--ease);
}
.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); }

/* ── モバイルドロワー ──────────────────────
   旧実装は 700px 以下でリンクを display:none にしており、
   代替手段が無いままスマホから目次が消えていた。 */
.menu-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  gap: 6px; width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer; padding: 0;
}
.menu-toggle span {
  display: block; width: 22px; height: 2px; background: var(--ink);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
@media (max-width: 700px) {
  .menu-toggle { display: flex; }
  .links {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; gap: 6px;
    background: rgba(13, 11, 9, .95);
    -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    opacity: 0; visibility: hidden;
    transition: opacity .4s var(--ease), visibility 0s .4s;
  }
  .links.is-open { z-index: 9; opacity: 1; visibility: visible; transition: opacity .4s var(--ease); }
  .links a { font-size: 19px; padding: 14px 26px; letter-spacing: .16em; }
  .links .pill-btn { margin: 22px 0 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .menu-open, .menu-open body { overflow: hidden; }
}

/* ── ヒーロー ─────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex; align-items: center;
  padding: 0 clamp(20px, 5vw, 64px);
  position: relative;
}
/* スクリム: 巨大な立体タイポ(KOTODAMA)が見出しの真後ろを横切るため、
   左半分の背景を墨に戻して文字と 3D を面で分離する。
   text-shadow だけでは明朝の細い横画が金色の面に溶けて消える。 */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(96deg,
    rgba(13, 11, 9, 1) 0%, rgba(13, 11, 9, .88) 38%, rgba(13, 11, 9, .45) 56%, rgba(13, 11, 9, 0) 72%);
  background: linear-gradient(96deg,
    var(--bg) 0%,
    color-mix(in srgb, var(--bg) 88%, transparent) 38%,
    color-mix(in srgb, var(--bg) 45%, transparent) 56%,
    transparent 72%);
}
.hero > * { position: relative; z-index: 2; }
.hero-inner { max-width: 660px; }
.hero h1 {
  font-size: clamp(44px, 7.2vw, 90px);
  line-height: 1.22; font-weight: 500; letter-spacing: .03em;
  margin: 20px 0 24px;
  text-shadow: 0 4px 40px rgba(5, 4, 3, .9);
}
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lead {
  font-size: clamp(14.5px, 1.5vw, 17px); color: var(--ink-dim);
  text-shadow: 0 2px 18px rgba(5, 4, 3, .9);
  max-width: 30em;
}
/* ヒーロー直下の署名行。スタジオの立ち位置を 1 行で確定させる */
.hero-sign {
  margin-top: clamp(26px, 3.4vw, 40px); padding-top: clamp(18px, 2.4vw, 26px);
  border-top: 1px solid var(--line-strong);
  display: flex; flex-wrap: wrap; gap: 10px 26px;
  font-family: var(--sans); font-size: var(--fs-note);
  letter-spacing: .14em; color: var(--ink-faint);
}
.hero-sign b { font-weight: 500; color: var(--gold); }
.scroll-cue {
  position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%);
  font-family: var(--sans); font-size: 12px; letter-spacing: .34em; color: var(--ink-faint);
  animation: cueFloat 2.6s var(--ease) infinite;
  white-space: nowrap; z-index: 2;
}
@keyframes cueFloat {
  0%, 100% { transform: translate(-50%, 0); opacity: .85; }
  50% { transform: translate(-50%, 7px); opacity: .45; }
}

/* ── 思想 ─────────────────────────────────── */
.manifesto {
  min-height: 116svh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: clamp(80px, 14vh, 180px) clamp(20px, 5vw, 60px);
  position: relative;
}
/* 減光方式: マニフェストの背後だけ立体文字の輝度を落とす。
   面を敷くと 3D の見せ場が死ぬので、楕円のグラデーションで落とす。 */
.manifesto::before {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(1180px, 98%); height: min(600px, 74%); pointer-events: none;
  background: radial-gradient(ellipse at center,
    rgba(13, 11, 9, .93) 0%, rgba(13, 11, 9, .86) 44%, rgba(13, 11, 9, .5) 70%, rgba(13, 11, 9, 0) 100%);
}
.manifesto > * { position: relative; z-index: 1; }
/* 行送りを 1.9 → 1.42 に詰め、4 行を 1 つの塊として立たせる。
   「言葉が建つ」という主張を、組版そのもので実演する。 */
.manifesto .line {
  font-size: clamp(30px, 5.4vw, 58px);
  line-height: 1.42; font-weight: 500; letter-spacing: -.01em;
  text-shadow: 0 2px 30px rgba(5, 4, 3, .95), 0 0 70px rgba(5, 4, 3, .8);
}
.manifesto .line + .line { margin-top: .34em; }
.manifesto .line.small {
  font-size: clamp(14px, 1.7vw, 18px);
  color: var(--ink-dim); margin-top: 2.4em; letter-spacing: .06em;
  text-shadow: 0 2px 20px rgba(5, 4, 3, .95);
}
.gold { color: var(--gold); }

/* ── 仕事（罫線リスト） ────────────────────
   角丸カードをやめ、番号と本文を罫線で区切る組版主体のレイアウトにする。
   言葉のスタジオが「箱」で情報を出すのは筋が悪い。 */
.approach {
  min-height: 108svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(76px, 12vh, 160px) clamp(20px, 4vw, 52px);
  max-width: 1080px; margin: 0 auto; width: 100%;
}
.sec-head { text-align: center; }
/* 3D の明部に載る小さな文字は面が無いので影で守る */
.sec-head .eyebrow { text-shadow: 0 2px 16px rgba(5, 4, 3, .95), 0 0 30px rgba(5, 4, 3, .95); }
.sec-head h2 {
  font-size: clamp(28px, 3.8vw, 44px); font-weight: 500;
  line-height: 1.3; letter-spacing: .02em;
  margin-top: 14px; text-shadow: 0 2px 26px rgba(5, 4, 3, .92);
}
.sec-head .sec-lead {
  max-width: 38em; margin: 18px auto 0;
  font-size: var(--fs-body); color: var(--ink-dim);
  text-shadow: 0 2px 20px rgba(5, 4, 3, .9);
}
.verbs {
  margin-top: clamp(34px, 4.4vw, 56px);
  border-top: 1px solid var(--line-strong);
  background: var(--surface);
}
.verb {
  display: grid; grid-template-columns: minmax(150px, 220px) 1fr;
  gap: clamp(16px, 3vw, 48px);
  padding: clamp(26px, 3.2vw, 42px) clamp(18px, 2.6vw, 34px);
  border-bottom: 1px solid var(--line);
  transition: background .35s var(--ease);
}
.verb:hover { background: rgba(216, 179, 106, .05); }
.verb .num {
  font-family: var(--serif-en); font-size: var(--fs-label); letter-spacing: .32em;
  color: var(--gold);
}
.verb h3 {
  font-size: clamp(30px, 3.4vw, 44px); font-weight: 500;
  line-height: 1.2; letter-spacing: .04em; margin-top: 10px;
}
.verb h3 small {
  display: block; font-family: var(--serif-en); font-style: italic; font-weight: 400;
  font-size: var(--fs-note); color: var(--ink-faint); letter-spacing: .22em; margin-top: 8px;
}
/* 1 行 51〜54 字あり適正（35〜45 字）超え。palt が効いて 1 字あたり約 0.83em に
   詰まるため、38em でおよそ 45 字に収まる（2026-09-02 実測）。 */
.verb p { font-size: var(--fs-body); color: var(--ink-dim); max-width: 38em; }
.verb .deliv {
  margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px;
  font-family: var(--sans);
}
.verb .deliv i {
  font-style: normal; font-size: var(--fs-note); letter-spacing: .06em;
  border: 1px solid var(--line-strong); padding: 4px 12px; color: var(--gold);
}
@media (max-width: 700px) {
  .verb { grid-template-columns: 1fr; gap: 14px; }
}

/* ── 語彙集 ────────────────────────────────
   コピーライティング事務所の実体を見せる区画。
   用語と定義を 2 段組みで並べ、辞書の版面に寄せる。 */
.glossary {
  min-height: 104svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(76px, 12vh, 160px) clamp(20px, 4vw, 52px);
  max-width: 1080px; margin: 0 auto; width: 100%;
}
.gloss-list {
  margin-top: clamp(34px, 4.4vw, 56px);
  display: grid; gap: 0 clamp(28px, 4vw, 64px);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  background: var(--surface);
  padding: clamp(20px, 3vw, 38px) clamp(20px, 3vw, 38px) clamp(6px, 1vw, 12px);
  border-top: 1px solid var(--line-strong);
}
.gloss-list div { padding: clamp(16px, 1.8vw, 22px) 0; border-bottom: 1px solid var(--line); }
.gloss-list dt {
  font-family: var(--display); font-size: clamp(19px, 1.9vw, 24px);
  letter-spacing: .04em; color: var(--ink);
}
.gloss-list dt span {
  font-family: var(--serif-en); font-style: italic; font-size: .62em;
  color: var(--gold); margin-left: 12px; letter-spacing: .12em;
}
.gloss-list dd { margin-top: 8px; font-size: var(--fs-note); color: var(--ink-dim); line-height: 1.95; }

/* ── 数字 ─────────────────────────────────── */
.proof {
  min-height: 104svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(76px, 12vh, 160px) clamp(20px, 4vw, 52px);
  max-width: 1080px; margin: 0 auto; width: 100%;
}
/* 立体タイポ PROOF の真上に数値が来るため、ガラスではなく不透明面で受ける */
.stats {
  display: grid; gap: 0; margin-top: clamp(34px, 4.4vw, 56px);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  background: var(--surface);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.stat {
  padding: clamp(26px, 3vw, 38px) clamp(18px, 2vw, 26px);
  text-align: center; border: 0; border-right: 1px solid var(--line);
  background: none; box-shadow: none; border-radius: 0;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.stat:last-child { border-right: 0; }
.stat dt { font-family: var(--sans); font-size: var(--fs-note); letter-spacing: .2em; color: var(--ink-faint); }
.stat dd { margin-top: 10px; }
.stat b {
  font-family: var(--serif-en); font-weight: 500; font-size: clamp(40px, 4.8vw, 60px);
  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: 22px; text-align: center; font-family: var(--sans);
  font-size: var(--fs-note); color: var(--ink-faint);
  text-shadow: 0 2px 18px rgba(5, 4, 3, .95);
}

/* ── CTA ──────────────────────────────────── */
.cta {
  min-height: 100svh;
  display: grid; place-items: center;
  padding: clamp(76px, 12vh, 150px) clamp(20px, 4vw, 52px);
}
.cta-panel {
  max-width: 560px; width: 100%; text-align: center;
  padding: clamp(34px, 5vw, 56px) clamp(26px, 5vw, 48px);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.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(26px, 3.2vw, 36px); font-weight: 500;
  line-height: 1.34; letter-spacing: .03em; margin: 20px 0 14px;
}
.cta-panel p { font-size: var(--fs-body); 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, .7); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 14px 16px; outline: none; text-align: center;
  transition: border-color .3s var(--ease);
}
#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 .3s var(--ease), transform .3s var(--ease);
}
#notify button:hover { background: var(--gold-bright); transform: translateY(-2px); }
.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;
}

@media (max-width: 700px) {
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
}

/* ── 出現アニメーション(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; }
}

/* ── 書体設計（1 箇所に集約。以前は矛盾する 3 ブロックが積まれていた） ──
   見出し: 欧文 Cormorant Garamond / 和文 New Tegomin（版画的な骨格を意匠に使う）
   本文  : BIZ UDPMincho（Google Fonts の和文で palt が効く数少ない書体。
           読点のあとのアキが締まり、Mac / Windows で見え方が揃う）
   Shippori Mincho はどこにも当たらない死に読み込みだったので HTML 側から除去した。 */
h1, h2, h3, h4, .lede, .lead, .kicker, .statement, blockquote, .gloss-list dt {
  font-family: var(--display);
}
html body :is(p, li, dd, dt, td, .note, .desc, .caption, figcaption, .body, .txt, .text, small):not(code):not(pre):not([class*="mono"]):not([class*="code"]) {
  font-family: var(--serif);
}
/* ラベル・数値・UI は明示的にゴシック／欧文セリフへ戻す */
html body :is(.eyebrow, .links a, .stat dt, .plan-note, .foot, .scroll-cue, .hero-sign, .verb .deliv i, #notify input, #notify button) {
  font-family: var(--sans);
}
html body :is(.stat b, .verb .num, .brand span, .gloss-list dt span, .verb h3 small, .card h3 small) {
  font-family: var(--serif-en);
}
html body .gloss-list dt { font-family: var(--display); }
