/* Bunzo Web 試作：トップとコンタクトで共通の見た目（色・書体・ヘッダー・メニュー・フッター・読み込み画面）。
   ページだけの見た目は各 HTML の <style> にある。単一の見た目（ダーク切替なし） */
/* ---------- 書体（2026-09-30 決定・自前で持つ。top/fonts/、ライセンスは同じ場所の OFL-*.txt） ----------
   Jost＝本文・メニュー（可変書体。1つのファイルで 300〜400 を使う）／Syne＝大きな文字（500）。
   Google Fonts の latin と latin-ext の分だけ。日本語は Zen Kaku Gothic New（400）を Google Fonts から読む（各ページの <head>） */
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 300 400; font-display: swap; src: url(fonts/jost-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 300 400; font-display: swap; src: url(fonts/jost-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Jost の斜体（300・latin だけ）。ABOUT の Value の「hitotonari」に使う */
@font-face { font-family: 'Jost'; font-style: italic; font-weight: 300; font-display: swap; src: url(fonts/jost-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/syne-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Syne'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/syne-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* 色（ここを触れば全ページが変わる） */
  --smoke: #1E1F1F;          /* 暗い地＝スモークブラック */
  --on-dark: #DBD6D0;        /* 暗い地の上の文字＝少しだけ色の付いた白 */
  --paper: #F3F2EE;          /* 明るい地＝bg_a の地 */
  --ink: var(--smoke);       /* 明るい地の上の文字＝暗い地と同じ色 */
  --ink-soft: rgba(30, 31, 31, 0.58);
  --on-dark-soft: rgba(219, 214, 208, 0.62);   /* 暗い地の上で 4.5:1 以上（0.62 で約 5.1:1） */
  --rule-dark: rgba(219, 214, 208, 0.16);

  /* 書体（2026-09-30 に固定：本文・メニュー＝Jost、大きな文字＝Syne） */
  --font-text: 'Jost', 'Zen Kaku Gothic New', 'Hiragino Sans', 'Helvetica Neue', Arial, sans-serif;   /* 英字は Jost、日本語は Zen Kaku Gothic New */
  --text-track: 0.02em;
  --font-display: 'Syne', 'Zen Kaku Gothic New', 'Hiragino Sans', 'Helvetica Neue', Arial, sans-serif;
  --display-weight: 500;
  --display-scale: 0.8;      /* Syne は字幅が広いので、大きな文字の基準の大きさに掛ける倍率 */
  --display-track: -0.02em;

  /* 大きさ（スマホ基準で、広い画面では上限まで伸びる） */
  --gutter: clamp(16px, 5vw, 56px);
  --fs-xs: 11px;                                  /* 表記 */
  --fs-s: 12px;                                   /* メニュー・社名 */
  --fs-m: clamp(16px, 4.2vw, 20px);               /* 説明文 */
  --fs-l: clamp(20px, 5.6vw, 34px);               /* 宣言文・目標の文 */
  --fs-hero: clamp(46px, 13.5vw, 172px);          /* トップ中央の大きなコピー */
  --fs-menu: clamp(34px, 10vw, 56px);             /* 全面メニューの項目 */

  color-scheme: light;
}

html, body { margin: 0; background: var(--paper); color: var(--ink); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  font-family: var(--font-text); font-weight: 300; letter-spacing: var(--text-track);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

/* 暗い地のページ（コンタクト） */
.page-dark, .page-dark body { background: var(--smoke); color: var(--on-dark); }

/* ---------- 背景 bg_a の2枚の画面 ---------- */
canvas.layer { position: fixed; top: 0; left: 0; width: 100vw; height: 100lvh; display: block; pointer-events: none; }
#back { z-index: 0; }
#front { z-index: 2; }

/* ---------- 読み込み画面：家紋を枠線だけで ---------- */
.loader {
  position: fixed; inset: 0; z-index: 40; background: var(--smoke); color: var(--on-dark);
  display: grid; place-items: center;
  transition: opacity 1.2s ease, visibility 0s linear 1.2s;
}
.loader svg { width: 40px; height: 40px; overflow: visible; }
.loader path { fill: none; stroke: currentColor; stroke-width: 1px; vector-effect: non-scaling-stroke; stroke-linejoin: miter; }
.loader.done { opacity: 0; visibility: hidden; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) var(--gutter) 0;
  color: var(--ink); transition: color 0.5s ease; pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.site-header.on-dark, .menu-open .site-header, .page-dark .site-header { color: var(--on-dark); }
.brand { display: grid; gap: 5px; min-width: 0; }
.brand-name { font-size: var(--fs-s); font-weight: 400; letter-spacing: 0.32em; }
.brand-copy { font-size: var(--fs-xs); opacity: 0.7; letter-spacing: 0.04em; white-space: nowrap; }
.nav { display: none; text-transform: uppercase; align-items: baseline; gap: clamp(18px, 2.4vw, 34px); font-size: var(--fs-s); font-weight: 400; letter-spacing: 0.18em; }
.nav a, .lang { position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0.18em; bottom: -4px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 0.45s ease;
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.lang { font-size: var(--fs-xs); letter-spacing: 0.16em; opacity: 0.75; }
.menu-btn { font-size: var(--fs-s); font-weight: 400; letter-spacing: 0.22em; padding-block: 2px; }
@media (min-width: 860px) {
  .nav { display: flex; }
  .menu-btn { display: none; }
}

/* ---------- スマホの全面メニュー ---------- */
.menu {
  position: fixed; inset: 0; z-index: 15; background: var(--smoke); color: var(--on-dark);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 110px) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 28px);
  opacity: 0; visibility: hidden; transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}
.menu-open .menu { opacity: 1; visibility: visible; transition: opacity 0.6s ease; }
.menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.menu li a { text-transform: uppercase; font-size: var(--fs-menu); font-weight: 300; letter-spacing: 0.04em; line-height: 1.15; }
.menu li a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.menu-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: var(--fs-xs); letter-spacing: 0.12em; color: var(--on-dark-soft); }

/* ---------- 下線付きのリンク（VIEW WORK など） ---------- */
.cta {
  justify-self: start; display: inline-flex; align-items: center; gap: 14px;
  font-size: var(--fs-s); font-weight: 400; letter-spacing: 0.22em;
  padding-bottom: 6px; border-bottom: 1px solid currentColor;
}
.cta::after { content: "→"; letter-spacing: 0; transition: transform 0.45s ease; }
.cta:hover::after { transform: translateX(6px); }

/* ---------- 暗い地の区画とフッター ---------- */
main { position: relative; z-index: 1; }
.dark { position: relative; z-index: 3; background: var(--smoke); color: var(--on-dark); }
.footer {
  position: relative; z-index: 3;
  display: grid; gap: 40px; padding: 56px var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 28px);
  border-top: 1px solid var(--rule-dark); font-size: var(--fs-s); color: var(--on-dark);
}
.f-logo { width: 76px; height: auto; display: block; color: var(--on-dark); }
.f-logo path { fill: currentColor; }
.f-label { display: block; text-transform: uppercase; font-size: var(--fs-xs); letter-spacing: 0.2em; color: var(--on-dark-soft); margin-bottom: 12px; }
.f-contact .row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; }
.email { font-size: var(--fs-m); letter-spacing: 0.02em; user-select: all; }
.copy-btn { font-size: var(--fs-xs); letter-spacing: 0.2em; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.f-sns ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; letter-spacing: 0.08em; }
.f-sns a:hover, .credits:hover { color: var(--on-dark-soft); }
.f-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 24px;
  padding-top: 20px; border-top: 1px solid var(--rule-dark); font-size: var(--fs-xs); letter-spacing: 0.12em; color: var(--on-dark-soft);
}
.f-bottom .right { display: flex; gap: 24px; }
@media (min-width: 860px) {
  .footer { grid-template-columns: auto 1fr 1fr; align-items: end; column-gap: 64px; }
  .f-bottom { grid-column: 1 / -1; }
}

/* ---------- 紙のざらつき（bg_a と同じ） ---------- */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 30; pointer-events: none;
  opacity: 0.06; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.page-dark body::after { mix-blend-mode: screen; opacity: 0.035; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01s !important; animation-duration: 0.01s !important; }
}

/* =====================================================================
   暗い地のページ（コンタクト・WORK・ABOUT）の共通部品
   ===================================================================== */
:root {
  --bg-veil: 0.9;                          /* 背景 bg_a の見え方（0 で消える、1 でそのまま） */
  --page-title-size: 13vw;                 /* 大きな見出し（WORK・BUNZO）スマホ */
  --sec-head-size: clamp(22px, 5.6vw, 30px); /* 区画の見出し */
  --prose-size: 14px;                      /* 本文 */
  --small-size: 10px;                      /* ラベル・番号・小さなリンク */
  --clock-size: 12px;                      /* 大阪の時計 */
  --git-size: clamp(40px, 11vw, 132px);    /* ページ末の Contact */
}
@media (min-width: 860px) {
  :root { --page-title-size: min(10.5vw, 210px); --sec-head-size: clamp(26px, 2.4vw, 38px); }
}
.page-dark #back { opacity: var(--bg-veil); }

.page-main { display: grid; padding: calc(env(safe-area-inset-top, 0px) + 132px) var(--gutter) 0; }
.page-head { display: grid; gap: 18px; padding-bottom: clamp(56px, 10vw, 120px); }
.page-title {
  margin: 0; white-space: nowrap; text-transform: uppercase;
  font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-track);
  font-size: calc(var(--page-title-size) * var(--display-scale)); line-height: 0.86;
}
.page-sub { margin: 0; font-size: var(--fs-m); font-weight: 300; letter-spacing: 0.04em; color: var(--on-dark-soft); }

/* 区画：縦に積むのが基本。組み方は区画ごとに変える（各ページの <style> と下の部品で）。
   taste-skill の点検（2026-09-30）により、全区画が「左にラベル＋見出し、右に本文、全行に線」の同じ形になるのをやめた */
.sec { display: grid; gap: clamp(20px, 3vw, 32px); padding-block: clamp(56px, 9vw, 112px); min-width: 0; }
/* 小さな大文字ラベル：1ページに3区画に1つまで */
.sec-label { margin: 0; font-size: var(--small-size); font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase; color: var(--on-dark-soft); }
.sec-head {
  margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-track);
  font-size: calc(var(--sec-head-size) * var(--display-scale)); line-height: 1.15; text-wrap: balance;
}
/* 全幅の大きな一文（見出しや宣言） */
.statement-head {
  margin: 0; max-width: 18ch; font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-track);
  font-size: calc(clamp(32px, 6.4vw, 88px) * var(--display-scale)); line-height: 1.05; text-wrap: balance;
}
.prose { display: grid; gap: 1.2em; min-width: 0; max-width: 62ch; font-size: var(--prose-size); font-weight: 300; line-height: 1.9; letter-spacing: 0.02em; }
.prose p { margin: 0; }
.prose h3 { margin: 0.6em 0 0; font-size: var(--small-size); font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase; color: var(--on-dark-soft); }
.prose h3:first-child { margin-top: 0; }
/* 本文を下に積んでから、PC では右へずらす */
@media (min-width: 860px) { .offset { margin-left: 33.333%; } }
/* 見出しの下を2列にする（中身が本当に2つあるときだけ） */
.two-col { display: grid; gap: 40px; min-width: 0; }
@media (min-width: 860px) { .two-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; } }
/* 区切りの線は、グループの上に1本だけ */
.group-rule { border-top: 1px solid var(--rule-dark); padding-top: clamp(24px, 3vw, 36px); }

/* 一覧：行ごとの線は引かず、余白で区切る */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(24px, 3vw, 36px); }
.list .num { font-size: var(--small-size); letter-spacing: 0.2em; color: var(--on-dark-soft); font-variant-numeric: tabular-nums; }
.list .name { margin: 0; font-size: calc(var(--prose-size) + 3px); font-weight: 400; letter-spacing: 0.03em; }
.list p { margin: 0; }

/* 小さな表（チーム） */
.facts { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 12px 32px; font-size: var(--prose-size); font-weight: 300; }
.facts dt { font-size: var(--small-size); letter-spacing: 0.2em; text-transform: uppercase; color: var(--on-dark-soft); padding-top: 0.35em; }
.facts dd { margin: 0; }

/* 住所・地図 */
.address { font-style: normal; }
.map-link { font-size: var(--small-size); letter-spacing: 0.18em; color: var(--on-dark-soft); }
.map-link:hover { color: var(--on-dark); }
.addr-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }

/* 大阪の時計（site.js が [data-clock] を毎秒書き換える） */
.clock { display: flex; align-items: center; gap: 10px; font-size: var(--clock-size); font-weight: 300; letter-spacing: 0.14em; }
.clock time { letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.clock .zone { color: var(--on-dark-soft); }
.tick { width: 5px; height: 5px; border-radius: 50%; background: var(--on-dark); flex: none; }

/* ページ末の、コンタクトへ誘う大きめの導線（文言は「Contact」にそろえる）。下線は transform で伸ばす */
.git { display: grid; padding-block: clamp(80px, 16vw, 200px); border-top: 1px solid var(--rule-dark); }
.git a {
  position: relative; justify-self: start; display: inline-flex; align-items: baseline; gap: 0.3em; text-transform: uppercase;
  font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-track);
  font-size: calc(var(--git-size) * var(--display-scale)); line-height: 1;
}
.git a::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: -0.06em; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 0.6s ease;
}
.git a:hover::before { transform: scaleX(1); transform-origin: left; }
.git a::after { content: "→"; font-size: 0.6em; transition: transform 0.45s ease; }
.git a:hover::after { transform: translateX(0.15em); }

/* 押した瞬間の手応え（transform だけ） */
.copy-btn, .c-copy, .mail-btn, .cta, .git a, .menu-btn { transition-property: transform, color, background-color; transition-duration: 0.15s; }
.copy-btn:active, .c-copy:active, .mail-btn:active, .cta:active, .git a:active, .menu-btn:active { transform: scale(0.97); }

/* フッターの方針のリンク */
.policy-links { letter-spacing: 0.06em; }
.policy-links a:hover { color: var(--on-dark); }
@media (max-width: 599px) { .f-bottom .right { flex-wrap: wrap; gap: 10px 20px; } }

/* =====================================================================
   方針のページ（privacy.html・security.html）：長い日本語の文を読むための組み
   ===================================================================== */
:root {
  --legal-size: 15px;         /* 本文の大きさ（スマホ 15px・PC 16px） */
  --legal-leading: 2;         /* 行間 */
  --legal-measure: 40em;      /* 1行の長さの上限 */
}
@media (min-width: 860px) { :root { --legal-size: 16px; } }
.legal {
  font-family: 'Jost', 'Zen Kaku Gothic New', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif;   /* 英字は Jost、日本語は Zen Kaku Gothic New */
  font-weight: 400; letter-spacing: 0.04em; font-feature-settings: "palt" 0;
  padding-bottom: clamp(80px, 14vw, 160px);
}
.legal-head { display: grid; gap: 6px; padding-bottom: clamp(40px, 7vw, 72px); margin-bottom: clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--rule-dark); }
.legal-title {
  margin: 0 0 14px; text-transform: uppercase; text-wrap: balance;
  font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-track);
  font-size: calc(var(--page-title-size) * var(--display-scale) * 0.5); line-height: 0.95;
}
.legal-kana { margin: 0; font-size: 12px; letter-spacing: 0.2em; color: var(--on-dark-soft); }
.legal-name { margin: 0; font-size: calc(var(--legal-size) + 5px); letter-spacing: 0.08em; }
.legal-meta { margin: 14px 0 0; font-size: 13px; line-height: 1.9; color: var(--on-dark-soft); }
.legal-body { display: grid; gap: 1em; max-width: var(--legal-measure); font-size: var(--legal-size); line-height: var(--legal-leading); }
.legal-body p, .legal-body ol, .legal-body ul { margin: 0; }
.legal-body ol, .legal-body ul { padding-left: 1.6em; display: grid; gap: 0.5em; }
.legal-body h2 {
  margin: 2.2em 0 0.2em; padding-top: 1.4em; border-top: 1px solid var(--rule-dark);
  font-size: calc(var(--legal-size) + 2px); font-weight: 400; line-height: 1.6; letter-spacing: 0.06em;
}
.legal-body h2 + h2 { margin-top: 0.8em; }
.legal-body h3 { margin: 1em 0 0; font-size: var(--legal-size); font-weight: 400; color: var(--on-dark-soft); letter-spacing: 0.06em; }
.legal-body a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; color: var(--on-dark); }
.legal-body a:hover { color: var(--on-dark-soft); }
.legal-body strong { font-weight: 400; color: var(--on-dark); }
.table-wrap { overflow-x: auto; margin-block: 0.4em; }
.legal-body table { width: 100%; min-width: 30em; border-collapse: collapse; font-size: calc(var(--legal-size) - 1px); line-height: 1.8; }
.legal-body th, .legal-body td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-top: 1px solid var(--rule-dark); }
.legal-body thead th { font-size: 12px; letter-spacing: 0.16em; color: var(--on-dark-soft); font-weight: 400; }
.legal-body tbody th { width: 34%; font-weight: 400; }
.legal-body tbody tr:last-child > * { border-bottom: 1px solid var(--rule-dark); }

/* =====================================================================
   日本語の組み（日本語版のページと、英語版の中の日本語）
   ===================================================================== */
/* 句読点・閉じ括弧・小さな仮名を行頭に置かない（禁則） */
:lang(ja) { line-break: strict; word-break: normal; overflow-wrap: break-word; }
/* 日本語の本文：Zen Kaku Gothic New は 400 だけ読むので太さは 400。字間を少し空け、行間を広めに */
html:lang(ja) .prose, html:lang(ja) .desc, html:lang(ja) .vision-sub, html:lang(ja) .lead,
html:lang(ja) .goal-text, html:lang(ja) .min-lead, html:lang(ja) .c-cols, html:lang(ja) .address {
  font-weight: 400; letter-spacing: 0.05em; line-height: 2;
}
/* 日本語の大きめの文（宣言文・説明の一文）：行間をとり、字間は詰めない */
html:lang(ja) .statement, html:lang(ja) .lead-xl { font-weight: 400; letter-spacing: 0.04em; line-height: 1.6; }
html:lang(ja) .lead-xl { font-family: var(--font-text); font-size: clamp(22px, 3.4vw, 40px); max-width: 24em; }
html:lang(ja) .statement { font-size: clamp(18px, 4.6vw, 28px); }
