/*
 * Blanky Studio – Japanese Typography Layer
 *
 * 和文（:lang(ja)）でのみ適用されるタイポグラフィ補正。
 *
 * このテーマのデザインは Newsreader / Noto Sans を前提としたラテン組みで、
 * 大きな負の字送り（-0.025em）・細いウエイト（300）・詰まった行送り（1.05）で
 * 成立している。和文はグリフが仮想ボディいっぱいに描かれ、ディセンダも無いため、
 * 同じ値をそのまま当てると字が潰れ、行が重なり、線が痩せて見える。
 *
 * ここでは以下の 4 点だけを補正する。フォントファミリー（和文フォールバック）には
 * 一切触れない。
 *
 *   1. 字送り  … 負の詰めを解除し、palt に合わせた正の値へ
 *   2. ウエイト … 300 → 400（和文システムフォントに 300 は実質存在しない）
 *   3. 行送り  … 見出し 1.05〜1.25 → 1.35〜1.55、本文 1.7 → 1.9 前後
 *   4. 級数    … ディスプレイ見出しを 25〜35% 縮小（和文は同一 font-size で大きく見える）
 *
 * !important について:
 * パターン側のブロック属性（"style":{"typography":{...}}）は、利用者がサイト
 * エディターでテンプレートを保存した時点でインラインスタイルとして書き出される。
 * また WordPress のフォントサイズプリセットクラス（.has-*-font-size）は
 * !important 付きで出力される。どちらもセレクタ特異性では上書きできないため、
 * この :lang(ja) スコープ内に限り !important を用いる。
 *
 * @package blanky-studio
 * @since 2.3.0
 */

/* ============================================================
   基礎: 和文の組版設定
   ============================================================ */

:lang(ja) {
	/* palt: 和文プロポーショナルメトリクス。約物（、。「」）の余白が詰まり、
	   大きな見出しでの間延びが解消される。和文組版で最も効く一手。 */
	font-feature-settings: "palt" 1;

	/* 禁則処理を厳格に（行頭に小書き仮名・長音符が来ないようにする） */
	line-break: strict;
	word-break: normal;
}

/* 本文の長文は palt を外す。
   約物が連続しない散文では、標準メトリクス + 字送りのほうが字面が均一になる。 */
:lang(ja) p,
:lang(ja) li,
:lang(ja) dd,
:lang(ja) blockquote {
	font-feature-settings: normal;
}

/* ============================================================
   ヒーロー
   ============================================================ */

:lang(ja) .studio-hero p.studio-hero-eyebrow {
	/* 0.3em は和文だと語として読めなくなる */
	letter-spacing: 0.16em !important;
	font-size: 0.8125rem;
}

:lang(ja) .studio-hero .studio-hero-title.wp-block-heading {
	/* 9rem の和文は画面を埋め尽くすため大幅に縮小 */
	font-size: clamp(2.5rem, 6.4vw, 5.5rem);
	font-weight: 400 !important;
	line-height: 1.4 !important;
	letter-spacing: 0.02em !important;
}

:lang(ja) .studio-hero p.studio-hero-desc {
	font-weight: 400 !important;
	line-height: 1.95 !important;
	letter-spacing: 0.04em !important;
	font-size: 1.0625rem;
	max-width: 34rem;
}

:lang(ja) .studio-hero-btn .wp-block-button__link {
	letter-spacing: 0.1em;
	font-size: 0.8125rem;
}

/* ============================================================
   共通: section eyebrow
   ============================================================ */

:lang(ja) .studio-section-eyebrow {
	letter-spacing: 0.12em !important;
	font-size: 0.8125rem !important;
}

/* ============================================================
   About
   ============================================================ */

:lang(ja) .studio-about-heading {
	font-size: clamp(1.625rem, 3.4vw, 2.625rem) !important;
	font-weight: 400 !important;
	line-height: 1.55 !important;
	letter-spacing: 0.01em !important;
}

:lang(ja) .studio-about-text {
	font-weight: 400 !important;
	line-height: 1.95 !important;
	letter-spacing: 0.03em !important;
	font-size: 1rem !important;
	max-width: 34rem;
}

:lang(ja) .studio-skill-tag {
	/* 0.65rem（約10px）の漢字は判読できない */
	font-size: 0.75rem !important;
	letter-spacing: 0.06em;
	padding: 0.35rem 0.8rem;
}

:lang(ja) .studio-about-cta-label {
	letter-spacing: 0.08em;
	font-size: 0.8125rem;
}

/* ============================================================
   Selected Works
   ============================================================ */

:lang(ja) .studio-works-heading {
	font-size: clamp(1.625rem, 3vw, 2.375rem) !important;
	font-weight: 400 !important;
	letter-spacing: 0.02em !important;
	line-height: 1.45 !important;
}

:lang(ja) .studio-works-item-cat {
	letter-spacing: 0.08em;
	font-size: 0.8125rem;
}

:lang(ja) .studio-works-item-tag {
	letter-spacing: 0.06em;
	font-size: 0.75rem;
}

:lang(ja) .studio-works-item-title {
	font-size: 1.5rem;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0.02em;
}

:lang(ja) .studio-works-view-all-link {
	letter-spacing: 0.08em;
	font-size: 0.8125rem;
}

/* ベントーグリッド（studio-works-bento パターン） */
:lang(ja) .studio-bento-item-title {
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1.55;
	letter-spacing: 0.02em;
}

:lang(ja) .studio-bento-item-cat {
	letter-spacing: 0.08em;
	font-size: 0.8125rem !important;
}

/* ============================================================
   Experience
   ============================================================ */

:lang(ja) .studio-experience-heading {
	font-size: clamp(1.375rem, 2.4vw, 1.875rem) !important;
	font-weight: 400 !important;
	letter-spacing: 0.02em !important;
	line-height: 1.5 !important;
}

:lang(ja) .studio-experience-item-title {
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0.02em;
}

:lang(ja) p.studio-experience-item-role {
	font-size: 0.9375rem;
	letter-spacing: 0.03em;
	line-height: 1.7;
}

/* ============================================================
   Contact
   ============================================================ */

:lang(ja) .studio-contact-heading {
	font-size: clamp(1.875rem, 4.2vw, 3rem) !important;
	font-weight: 400 !important;
	letter-spacing: 0.02em !important;
	line-height: 1.5 !important;
}

:lang(ja) .studio-contact-desc {
	font-weight: 400 !important;
	line-height: 1.95 !important;
	letter-spacing: 0.03em !important;
	font-size: 1rem !important;
	max-width: 32rem;
}

:lang(ja) .studio-contact-cta,
:lang(ja) .studio-contact-btn .wp-block-button__link {
	letter-spacing: 0.1em;
	font-size: 0.8125rem;
	padding: 1rem 2.5rem;
}

/* ============================================================
   ヘッダー / フッター
   ============================================================ */

:lang(ja) .studio-header .wp-block-site-title,
:lang(ja) .studio-header .wp-block-site-title a {
	letter-spacing: 0.12em !important;
	font-weight: 600 !important;
}

:lang(ja) .studio-nav .wp-block-navigation-item a {
	letter-spacing: 0.08em !important;
	font-weight: 500 !important;
	font-size: 0.8125rem !important;
}

:lang(ja) .studio-footer .studio-footer-brand,
:lang(ja) .studio-footer .studio-footer-brand .wp-block-site-title,
:lang(ja) .studio-footer .studio-footer-brand .wp-block-site-title a {
	letter-spacing: 0.1em !important;
	font-weight: 600 !important;
}

:lang(ja) .studio-footer .studio-footer-copy,
:lang(ja) .studio-footer .studio-footer-copy p {
	font-size: 0.875rem !important;
	letter-spacing: 0.04em;
}

/* ============================================================
   投稿詳細（studio-single.css の補正）
   ============================================================ */

:lang(ja) .studio-project-hero-cat {
	letter-spacing: 0.14em;
	font-size: 0.8125rem;
}

:lang(ja) .studio-project-hero-title {
	font-size: clamp(1.75rem, 4.4vw, 3.25rem) !important;
	font-weight: 400 !important;
	line-height: 1.45 !important;
	letter-spacing: 0.02em !important;
}

:lang(ja) .studio-project-hero-date,
:lang(ja) .studio-project-hero-badge a {
	letter-spacing: 0.06em;
	font-size: 0.8125rem;
}

:lang(ja) .studio-project-meta-label {
	letter-spacing: 0.1em;
	font-size: 0.75rem;
}

:lang(ja) .studio-project-meta-value {
	font-weight: 400;
	font-size: 1rem;
	line-height: 1.8;
}

:lang(ja) .studio-project-lead {
	font-weight: 400;
	font-size: 1.0625rem;
	line-height: 2;
	letter-spacing: 0.03em;
}

:lang(ja) .studio-project-content-inner h2 {
	font-size: clamp(1.375rem, 2.4vw, 1.75rem);
	font-weight: 400;
	line-height: 1.55;
	letter-spacing: 0.02em;
}

:lang(ja) .studio-project-content-inner h3 {
	font-size: 0.875rem;
	letter-spacing: 0.1em;
}

:lang(ja) .studio-project-content-inner p {
	font-weight: 400;
	line-height: 2;
	letter-spacing: 0.03em;
}

:lang(ja) .studio-project-content-inner figcaption,
:lang(ja) .wp-block-image.is-style-studio-matted figcaption {
	letter-spacing: 0.04em;
	font-size: 0.8125rem;
	line-height: 1.8;
}

:lang(ja) .studio-project-share-label,
:lang(ja) .studio-share-btn {
	letter-spacing: 0.06em;
	font-size: 0.8125rem;
}

:lang(ja) .studio-project-nav-dir {
	letter-spacing: 0.1em;
	font-size: 0.75rem;
}

:lang(ja) .studio-project-nav-cat {
	letter-spacing: 0.08em;
	font-size: 0.75rem;
}

:lang(ja) .studio-project-nav-title {
	font-size: clamp(1rem, 2vw, 1.375rem);
	font-weight: 400;
	line-height: 1.6;
	letter-spacing: 0.02em;
}

:lang(ja) .studio-project-comments-title,
:lang(ja) .studio-project-comments .comment-reply-title {
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0.02em;
}

:lang(ja) .studio-project-comment-body .wp-block-comment-content p {
	line-height: 1.95;
	letter-spacing: 0.03em;
}

:lang(ja) .studio-project-comments .comment-form label {
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
}

/* ============================================================
   アーカイブ（studio-archive.css の補正）
   ============================================================ */

:lang(ja) .studio-page-hero-eyebrow {
	letter-spacing: 0.12em;
	font-size: 0.8125rem;
}

:lang(ja) .studio-page-hero-title {
	font-size: clamp(1.75rem, 4vw, 3rem);
	font-weight: 400;
	letter-spacing: 0.02em;
	line-height: 1.45;
}

:lang(ja) body.search .studio-page-hero-title,
body.search :lang(ja) .studio-page-hero-title {
	font-size: clamp(1.5rem, 3.2vw, 2.375rem);
}

:lang(ja) .studio-archive-filter-btn a {
	letter-spacing: 0.06em;
	font-size: 0.8125rem;
}

:lang(ja) .studio-archive-item-cat {
	letter-spacing: 0.08em;
	font-size: 0.8125rem;
}

:lang(ja) .studio-archive-item-title {
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1.55;
	letter-spacing: 0.02em;
}

:lang(ja) .studio-archive-no-results {
	letter-spacing: 0.06em;
	line-height: 1.9;
}

:lang(ja) .studio-archive-pagination .wp-block-query-pagination-next,
:lang(ja) .studio-archive-pagination .wp-block-query-pagination-numbers span {
	letter-spacing: 0.06em;
}

/* ============================================================
   汎用: 本文ブロック
   サイトエディターで利用者が置いた素の段落・見出しにも効かせる
   ============================================================ */

:lang(ja) .studio-page-body p,
:lang(ja) .wp-block-post-content p {
	line-height: 2;
	letter-spacing: 0.03em;
}

:lang(ja) .studio-page-body h1,
:lang(ja) .studio-page-body h2,
:lang(ja) .studio-page-body h3,
:lang(ja) .wp-block-post-content h1,
:lang(ja) .wp-block-post-content h2,
:lang(ja) .wp-block-post-content h3 {
	line-height: 1.55;
	letter-spacing: 0.02em;
}
