/*
Theme Name: tekot
Theme URI: https://tekot.jp
Description: 合同会社テコ 公式サイトのブロックテーマ。デザイントークンは theme.json に集約（根拠は docs/design/guidelines.md）。構造（投稿タイプ等）は mu-plugin tekot-core が担う（ADR-003）。
Author: 合同会社テコ
Version: 0.8.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tekot
Tags: full-site-editing, one-column, custom-colors, custom-logo

tekot WordPress Theme, (C) 2026 合同会社テコ
tekot is distributed under the terms of the GNU GPL.
*/

/*
 * theme.json で表現できないものだけをここに書く。追加は最小限（docs/design/quality-criteria.md §5）。
 */

/* 画面幅いっぱいの横スクロールを防ぐ */
html, body { overflow-x: hidden; }

/* フォーカスリング（quality-criteria.md §4: :focus-visible を消さない） */
:focus-visible { outline: 2px solid var(--wp--preset--color--accent-dark); outline-offset: 2px; }

/* 動きの抑制 */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ヘッダーの「お問い合わせ」ボタン風リンク（ナビ内の最後の項目） */
.wp-block-navigation .tekot-nav-cta a.wp-block-navigation-item__content { background: var(--wp--preset--color--primary); color: var(--wp--preset--color--base); padding: 0.5em 1.1em; border-radius: 4px; }
.wp-block-navigation .tekot-nav-cta a.wp-block-navigation-item__content:hover,
.wp-block-navigation .tekot-nav-cta a.wp-block-navigation-item__content:focus-visible { background: var(--wp--preset--color--primary-dark); color: var(--wp--preset--color--base); }

/* 記事カードの区切り */
.tekot-post-list .wp-block-post { padding-block: var(--wp--preset--spacing--40); border-bottom: 1px solid var(--wp--preset--color--neutral-light); }

/* ブランド ロックアップ（patterns/brand*.php、guidelines.md §2） */
.tekot-brand .tekot-brand__mark { margin: 0; flex: none; }
.tekot-brand .tekot-brand__mark img { display: block; }
.tekot-brand .wp-block-site-title { line-height: 1.2; }
.tekot-brand__en { margin: 0; letter-spacing: 0.06em; opacity: 0.8; }

/* フッター（ネイビー面）: 文字・リンクは白、フォーカスはティール */
.tekot-footer, .tekot-footer a, .tekot-footer .wp-block-site-title a { color: var(--wp--preset--color--base); }
.tekot-footer .wp-block-navigation a:hover { text-decoration: underline; }
.tekot-footer :focus-visible { outline-color: var(--wp--preset--color--accent); }

/* 強調区切り（名刺の縦線を踏襲） */
.tekot-rule-accent { border-left: 2px solid var(--wp--preset--color--accent); padding-left: var(--wp--preset--spacing--30); }

/* ヒーロー（wireframes.md §1）: SP ではロゴマーク大を出さない */
@media (max-width: 599px) {
	.tekot-hero .tekot-hero__mark { display: none; }
}
.tekot-hero__lead { max-width: 40em; }

/* 事業内容カード（ティールの縦線） */
.tekot-card { border-left: 2px solid var(--wp--preset--color--accent); padding-left: var(--wp--preset--spacing--30); }
.tekot-card h3 { margin-top: 0; }

/* 表: SP では 1 列に積む（会社概要の表、wireframes.md §2） */
.tekot-prose table { width: 100%; border-collapse: collapse; }
.tekot-prose th, .tekot-prose td { border-bottom: 1px solid var(--wp--preset--color--neutral-light); padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30); text-align: left; vertical-align: top; }
.tekot-prose th { color: var(--wp--preset--color--neutral); font-weight: 700; }
.tekot-prose tbody > tr > th:first-child:not(:only-child) { width: 200px; } /* 会社概要のような 2 列の項目表のみ。多列表（thead あり）は均等 */
.tekot-prose table { table-layout: auto; word-break: break-word; }
@media (max-width: 599px) {
	.tekot-prose tr, .tekot-prose th, .tekot-prose td { display: block; width: auto; }
	.tekot-prose thead th { border-bottom: 0; padding-bottom: 0; }
	.tekot-prose tbody > tr > th:first-child { border-bottom: 0; padding-bottom: 0; }
	.tekot-prose thead { display: none; }
}

/* フォーム要素（Contact Form 7 を含む）: 枠 1px、フォーカスは accent-dark。ラベルは入力の上 */
.tekot-prose input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.tekot-prose select, .tekot-prose textarea {
	width: 100%; max-width: 640px; padding: 0.6em 0.8em; border: 1px solid var(--wp--preset--color--neutral); border-radius: 4px; background: var(--wp--preset--color--base); font: inherit;
}
.tekot-prose label { display: block; font-weight: 700; margin-bottom: var(--wp--preset--spacing--10); }
.tekot-prose input[type="submit"] { display: inline-block; min-width: 200px; }
@media (max-width: 599px) { .tekot-prose input[type="submit"] { width: 100%; } }

/* お問い合わせフォーム（Contact Form 7、#144）。CF7 のクラスに最小限だけ当てる */
.tekot-form p { margin-block: 0 var(--wp--preset--spacing--40); }
.tekot-form label { display: block; font-weight: 700; margin-bottom: var(--wp--preset--spacing--10); }
.tekot-req { margin-left: .5em; padding: .15em .5em; border-radius: 4px; background: var(--wp--preset--color--accent-dark); color: var(--wp--preset--color--base); font-size: var(--wp--preset--font-size--small); font-weight: 700; }
.tekot-form .wpcf7-form-control:not(.wpcf7-submit):not(.wpcf7-acceptance) { width: 100%; max-width: 640px; padding: .6em .8em; border: 1px solid var(--wp--preset--color--neutral); border-radius: 4px; background: var(--wp--preset--color--base); font: inherit; }
.tekot-form textarea { min-height: 12em; }
.tekot-form .wpcf7-submit { display: inline-block; min-width: 200px; padding: .8em 1.6em; border: 0; border-radius: 4px; background: var(--wp--preset--color--primary); color: var(--wp--preset--color--base); font-weight: 700; cursor: pointer; }
.tekot-form .wpcf7-submit:hover, .tekot-form .wpcf7-submit:focus-visible { background: var(--wp--preset--color--primary-dark); }
.tekot-form__consent { display: flex; gap: var(--wp--preset--spacing--20); align-items: baseline; }
.tekot-form__consent .wpcf7-list-item { margin: 0; }
/* エラー・完了メッセージ: 色だけに頼らず枠と文言で示す（quality-criteria §4） */
.tekot-form .wpcf7-not-valid-tip { display: block; margin-top: var(--wp--preset--spacing--10); color: #b3261e; font-size: var(--wp--preset--font-size--small); font-weight: 700; }
.tekot-form .wpcf7-form-control.wpcf7-not-valid { border-color: #b3261e; border-width: 2px; }
.wpcf7-response-output { margin: var(--wp--preset--spacing--40) 0 0; padding: var(--wp--preset--spacing--30); border: 1px solid var(--wp--preset--color--neutral-light); border-left-width: 4px; border-radius: 4px; background: var(--wp--preset--color--surface); }
.wpcf7 form.sent .wpcf7-response-output { border-left-color: var(--wp--preset--color--accent-dark); }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output, .wpcf7 form.spam .wpcf7-response-output { border-left-color: #b3261e; }
@media (max-width: 599px) { .tekot-form .wpcf7-submit { width: 100%; } }

/* ichipen の新着情報（ADR-011・#198）。お知らせ一覧と同じ見え方に揃える */
.tekot-feed__list { list-style: none; margin: 0; padding: 0; }
.tekot-feed__item { padding-block: var(--wp--preset--spacing--40); border-bottom: 1px solid var(--wp--preset--color--neutral-light); }
.tekot-feed__date { display: block; font-size: var(--wp--preset--font-size--small); opacity: 0.8; }

/*
 * 代表者の氏名（画像。ショートコード [tekot_rep_name]。functions.php）
 * 字形の輪郭だけの SVG を mask にし、文字色で塗る。高さ 1em、ベースラインは字形の descent（0.23em）に合わせる。
 * 幅は字形の送り幅 ÷ 高さ（SVG の viewBox）。
 */
.tekot-mark {
	display: inline-block;
	height: 1em;
	vertical-align: -0.23em;
	background-color: currentColor;
	-webkit-mask: no-repeat 0 0 / 100% 100%;
	mask: no-repeat 0 0 / 100% 100%;
}
.tekot-mark--ja {
	width: 4.278em;
	-webkit-mask-image: url("assets/img/mark/rep-ja.svg");
	mask-image: url("assets/img/mark/rep-ja.svg");
}
.tekot-mark--en {
	width: 7.838em;
	-webkit-mask-image: url("assets/img/mark/rep-en.svg");
	mask-image: url("assets/img/mark/rep-en.svg");
}
