/* わぜん合同会社 ウェブサイト（本公開）。見た目の正は仕様書 docs/site-spec.md の4章と試作 docs/wazen-site-mockup_2026-11-24.html。
   値は試作の CSS をそのまま移し、仕様書が試作と異なる値を定めた箇所だけを改めた（その箇所には仕様書の節を書いた）。 */

/* 書体：ページの文字だけを残したファイルを wazen.me から配信する（仕様書4.6節「書体」）。作り直しは tools/subset-fonts.py */
@font-face { font-family: "BIZ UDPGothic"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/biz-udpgothic-400.woff2") format("woff2"); }
@font-face { font-family: "BIZ UDPGothic"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/biz-udpgothic-700.woff2") format("woff2"); }
@font-face { font-family: "Shippori Mincho"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/shippori-mincho-600.woff2") format("woff2"); }

:root {
  /* 開くと左にナビだけ。本文の中央でロゴが書かれ、真ん中に落ちた水滴の波紋がロゴを消し、隠れていた3つの円を見せる。終わるとロゴは左上へ */
  color-scheme: light;
  --paper: #ffffff;
  --ink: #141414;
  --muted: #5e5e5e;
  --rule: #d4d4d4;
  --gold: #C7A64A;
  --f-display: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", serif;
  --f-body: "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans CJK JP", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font-family: var(--f-body); font-size: 16px; line-height: 1.75; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.frame { position: relative; margin-inline: auto; max-width: 1610px; }   /* 1610px を超える画面では、ページ全体をこの幅に収めて中央に置く（仕様書4.5節） */
.site { container-type: inline-size; container-name: site; }
.price { font-weight: 700; white-space: nowrap; }   /* 料金はひとまとまりで折り返さない */

/* ---------- スマホ ---------- */
.spbar { position: sticky; top: 0; height: 0; z-index: 6; }
.burger {
  position: absolute; top: 14px; right: calc(var(--gutter-sp, 24px) - 12px); width: 48px; height: 48px;
  display: grid; place-items: center; padding: 0; border: 0; background: rgba(255, 255, 255, 0.92); color: var(--ink); cursor: pointer;
}
.burger:focus-visible, .close:focus-visible, .nav a:focus-visible, .menu a:focus-visible, .mark:focus-visible, .sec h2:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.layout { position: relative; }
.side { display: none; }   /* スマホでは、ロゴはハンバーガーメニューの中に置く */
/* ロゴ：logo-v-on-light-trimmed.svg（仕様書4.3.7節）。.mark の四角は、描かれている部分（アートワーク 487.08×680.55pt）に合わせ、
   svg はその周囲の2pt の余白の分だけ大きく、外へはみ出して置く。幅はアートワークの幅（PC 136px、スマホ 120px） */
.mark { display: block; position: relative; width: 120px; aspect-ratio: 487.08 / 680.55; opacity: 0; }   /* 現れ方はスクリプトで */
.mark img { position: absolute; left: -0.41061%; top: -0.29388%; width: 100.82122%; height: 100.58776%; }
.nav { display: none; }


/* キービジュアル：PC は、3つの円を左（左端を本文の左端にそろえる）、キャッチコピー群を右に置く。上端は左上のロゴの上端にそろえる */
.kv { --f-en: "BIZ UDPGothic", sans-serif; --sw: 0.75px; position: relative; height: 420px; overflow-x: clip; }   /* 高さは中身に合わせる（スクリプトで）。円を見せる範囲の外側の余白（--vpad）が、幅430px 未満の画面で左右にはみ出し、ページが横にスクロールするため、キービジュアルの幅で切る */
#cv { position: absolute; z-index: 2; pointer-events: none; }
#fx { position: absolute; z-index: 3; pointer-events: none; display: block; }   /* 位置と大きさは、波紋の届く範囲に合わせてスクリプトで */
/* 3つの円：最初は隠れていて、波紋の広がりに合わせて、中心からフェードインする */
.venn { position: absolute; z-index: 1; opacity: 0; }   /* 大きさと位置、見え方はスクリプトで */
/* 円を見せる範囲（mask）は、要素の四角の内側にしか効かない。線の太さの外側半分や、円からはみ出す文字が切れないよう、四角を VPAD だけ外へ広げる */
.venn { --vpad: 48px; padding: var(--vpad); }
.venn svg { position: absolute; left: var(--vpad); top: var(--vpad); width: calc(100% - 2 * var(--vpad)); height: calc(100% - 2 * var(--vpad)); overflow: visible; }
.venn .ring { fill: none; stroke: var(--ink); stroke-width: var(--sw); vector-effect: non-scaling-stroke; }
.venn .copy { position: absolute; inset: var(--vpad); }
.pill { position: absolute; width: max-content; transform: translate(-50%, -50%); text-align: center; white-space: nowrap; }
/* 3本柱の英語名：書体は名刺と同じ BIZ UDPゴシック、すべて大文字、太さは Bold */
.kv .en { margin: 0; font-family: var(--f-en); font-weight: 700; color: var(--ink); line-height: 1.2; letter-spacing: 0.06em; }
.kv .en { text-transform: uppercase; letter-spacing: 0.14em; }
.pill .en { font-size: calc(var(--r) * 0.175); }
/* キャッチコピー群：ロゴのアニメーションが終わってから、左上のロゴと一緒にフェードインする */
.cg { position: absolute; z-index: 1; opacity: 0; }
.cg h1 { margin: 0; white-space: nowrap; font-family: var(--f-display); font-weight: 600; letter-spacing: 0.06em; line-height: 1.25; font-size: var(--hs, 40px); margin: -0.225em 0 0.8em -0.045em; }   /* 文字の上端をキャッチコピー群の上端にそろえる。下は3本柱との間の余白 */
.cg.stack h1 { width: var(--fw); margin-left: calc(-1 * var(--fl)); text-align: center; }   /* 円の下に並べるときは、見出しを左右の中央（3つの円と同じ中心）に置く */
.cg .cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: calc(var(--bs, 15px) * 1.75); }   /* 3本柱どうしの間は本文1行分（PC とスマホで同じ） */
/* 3本柱の英語名の左に、ロゴと同じ金色の縦線。本文にはかけない */
.cg .col .en { border-left: 2px solid var(--gold); padding-left: 0.75em; }
.cg .en { font-size: var(--es, 12.5px); }
.cg .col .en { margin-bottom: 0.5em; }
.cg .body { margin: 0; font-size: var(--bs, 15px); line-height: 1.75; line-break: strict; }   /* 改行は決め打ちせず、欄の右端で一律に折り返す。行頭に「ー」や小さい仮名を置かない */
/* ---------- 事業内容・会社概要・お問い合わせ：情報を1列で読ませる ---------- */
.sec, footer { --gutter: clamp(24px, 15.66px + 2.139cqi, 48px); padding-inline: max(var(--gutter), (100% - 800px) / 2); }   /* 列は800px まで、ナビを除いた範囲の左右中央。左右の余白は 24px→48px */
.sec { padding-top: clamp(96px, 73.75px + 5.704cqi, 160px); padding-bottom: 0; scroll-margin-top: 16px; }   /* 上の余白：96px→160px */
.sec h2 { margin: 0 0 42px; font-size: 24px; font-weight: 700; line-height: 1.4; letter-spacing: 0.06em; }
/* 事業の名前：3本柱の英語名と同じ、金色の縦線と太字 */
.sec h3 { margin: 56px 0 14px; padding-left: 12px; border-left: 2px solid var(--gold); font-size: 18px; font-weight: 700; line-height: 1.4; letter-spacing: 0.06em; }
.sec h2 + .biz h3 { margin-top: 0; }
.sec p.desc, .sec p.body { margin: 0; font-size: 16px; line-height: 1.75; line-break: strict; }
dl.rows { margin: 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: max-content minmax(0, 1fr); }
dl.rows > div { display: grid; padding: 14px 0; border-top: 1px solid var(--rule); grid-column: 1 / -1; grid-template-columns: subgrid; gap: 0 24px; align-items: baseline; line-break: strict; }   /* 会社概要の表にも line-break: strict（仕様書4.6節「行の高さと字間」） */
dl.rows dt { font-size: 16px; line-height: 1.75; color: var(--muted); letter-spacing: 0.06em; text-align: right; }   /* 項目名と値はどの幅でも横に並べ、項目名は右揃え */
dl.rows dd { margin: 0; font-size: 16px; line-height: 1.75; }
.nw { white-space: nowrap; }
.cta { margin: 28px 0 0; }
.cta a { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 28px; border: 1px solid var(--ink); font-size: 16px; font-weight: 700; letter-spacing: 0.06em; text-decoration: none; transition: background-color 0.2s, color 0.2s; }
.cta a:hover { background: var(--ink); color: var(--paper); }
.cta a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
footer { padding-top: clamp(96px, 73.75px + 5.704cqi, 160px); padding-bottom: 56px; }
footer p { margin: 0; font-size: 14px; line-height: 1.75; color: var(--muted); } footer p span { white-space: nowrap; }   /* 謝辞と © の間は通常の空白1つ、1行に収まらない幅では謝辞と © の切れ目で折り返す */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* スマホ：本文が3行ほどのまとまりになるため、柱どうしの間を本文1行分に、見出しの下をそれより広くとる */
@container site (max-width: 959.98px) {
  .cg .cols { gap: calc(var(--bs, 15px) * 1.75); }
  .cg h1 { margin-bottom: calc(var(--bs, 15px) * 2.625); }
}

/* メニュー（スマホ）。中身（ロゴとナビ）は、画面の上と左から30px 以上離す（仕様書4.3.7節） */
.menu { position: fixed; inset: 0; z-index: 20; background: var(--paper); padding: max(30px, var(--gutter-sp, 24px)); }
.menu[hidden] { display: none; }
.menu .close {
  position: absolute; top: 14px; right: calc(var(--gutter-sp, 24px) - 12px); width: 48px; height: 48px;
  display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer;
}
.menu ul { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 0; }   /* ロゴとの間はロゴの幅の25％以上。項目は上下14px と行の高さ28px で、1つ56px */
.menu a { display: block; padding: 14px 0; font-size: 16px; letter-spacing: 0.06em; text-decoration: none; }

/* ---------- PC：左の列にロゴとナビ。本文の左右中央にキービジュアル ---------- */
@container site (min-width: 960px) {
  .spbar { display: none; }
  .layout { display: grid; grid-template-columns: calc(clamp(48px, 4cqi, 72px) + 136px + 40px) minmax(0, 1fr); }
  .side { display: block; position: sticky; top: 0; left: auto; height: 100vh; padding: 34px 0 0 clamp(48px, 4cqi, 72px); }   /* ロゴの上は34px（仕様書4.3.7節） */
  .mark { width: 136px; }
  .nav { display: block; margin-top: 40px; }
  .nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
  .nav a { display: inline-block; padding: 4px 0; font-size: 16px; line-height: 1.75; letter-spacing: 0.06em; text-decoration: none; border-bottom: 2px solid transparent; }   /* 金色の下線は、3本柱の英語名の縦線と同じ2px */
  .nav a:hover { border-bottom-color: var(--gold); }   /* ロゴと同じ金色 */
}
.biz dl.rows { margin-top: 28px; }   /* 業務の表は会社概要と同じ形、リード文との間は本文1行分 */
@container site (max-width: 959.98px) { .biz dl.rows, .biz dl.rows > div { display: block; } .biz dl.rows dt { text-align: left; } }   /* スマホ表示では業務の表を縦積みに、項目名の見た目は PC と同じ */

/* ---------- スクリプトが動かないとき（閲覧者が無効にしている、ファイルを読み込めない） ----------
   site.js が <html> に js を付けたときだけ、上の動きのための指定が効く。付かないときは、見出しと3本柱を縦配置と同じ並びで表示し、
   左上のロゴも表示する。3つの円とスマホのメニューのボタンは出さない（仕様書4.2節） */
html:not(.js) .spbar, html:not(.js) .venn, html:not(.js) .kv canvas { display: none; }
html:not(.js) .mark { opacity: 1; }
html:not(.js) .kv { --g: clamp(24px, 15.66px + 2.139cqi, 48px); height: auto; padding: 32px var(--g) 0; }
html:not(.js) .cg {
  position: static; opacity: 1;
  --bs: 16px;
  --es: min(16px, 4.1cqi);   /* 円の中の英語名と同じ大きさ（幅390px 以上で16px、320px で約13px） */
  --hs: min(36px, (100cqi - 2 * var(--g)) * 0.07709);   /* 1行に収まる大きさの75%、上限36px（幅414px で約28px、320px で約21px）。0.07709 は 73.5 ÷ 見出しを100px で組んだ幅（953.4px） */
}
html:not(.js) .cg h1 { margin-left: 0; text-align: center; }
@container site (min-width: 960px) {
  html:not(.js) .kv { padding-top: 34px; }
  html:not(.js) .cg { --hs: 36px; }
}
