/*
Theme Name: KOF Theme
Theme URI: https://kof-net.co.jp/
Author: 株式会社オーエフ
Description: 株式会社オーエフ向けのオリジナルテーマ。信頼感のあるネイビー基調と、余白を活かしたカード型の現代的なデザイン。外部テーマ・専用プラグインに依存しません。
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: kof-theme
Requires PHP: 7.4
*/

/* ===== デザイントークン ===== */
:root {
  --navy: #0b2545;
  --navy-2: #13315c;
  --primary: #0b6bcb;
  --accent: #03a9f4;
  --ink: #1f2937;
  --muted: #5b6676;
  --bg: #ffffff;
  --bg-soft: #f4f8fc;
  --line: #e3eaf2;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(11, 37, 69, .08);
  --shadow-lg: 0 18px 44px rgba(11, 37, 69, .16);
  --container: 1120px;
  --font: "Noto Sans JP", "Open Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

/* ===== ベース ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.85; font-size: 16px; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.4; color: var(--navy); margin: 0 0 .6em; font-weight: 700; }
p { margin: 0 0 1.2em; }
.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.screen-reader-text { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 999; }

/* ===== ボタン ===== */
.btn {
  display: inline-block; padding: 14px 32px; border-radius: 999px; font-weight: 700;
  border: 2px solid transparent; transition: transform .2s, box-shadow .2s, background .2s; cursor: pointer;
  font-family: inherit; font-size: 15px; line-height: 1.4;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(3,169,244,.35); }
.btn-primary:hover { color: #fff; background: #0396d8; }
.btn-ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--navy); }

/* ===== トップバー ===== */
.topbar { background: var(--navy); color: #cbd8ea; font-size: 13px; }
.topbar .container { display: flex; flex-wrap: wrap; gap: 6px 28px; padding: 8px 0; }
.topbar a { color: #cbd8ea; }
.topbar a:hover { color: #fff; }

/* ===== ヘッダー ===== */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.site-logo img { height: 48px; width: auto; }
.site-logo .site-title { font-size: 20px; font-weight: 800; color: var(--navy); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.main-nav a {
  display: block; padding: 10px 16px; color: var(--navy); font-weight: 700; font-size: 14px;
  border-radius: 999px; position: relative;
}
.main-nav a:hover, .main-nav .current-menu-item > a { background: var(--bg-soft); color: var(--primary); }
.main-nav li:last-child a { background: var(--primary); color: #fff; }
.main-nav li:last-child a:hover { background: var(--navy); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--navy); margin: 6px 0; transition: .3s; }

/* ===== ヒーロー ===== */
.hero {
  position: relative; color: #fff; text-align: center; padding: 130px 0 150px; overflow: hidden;
  background:
    radial-gradient(circle at 80% 10%, rgba(3,169,244,.35), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(11,107,203,.4), transparent 45%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
}
.hero::after { /* 下端の斜めカット */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 70px; background: #fff;
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
}
.hero-eyebrow { letter-spacing: .3em; font-size: 13px; color: var(--accent); font-weight: 700; margin-bottom: 18px; }
.hero h1 { color: #fff; font-size: clamp(30px, 5.2vw, 54px); letter-spacing: .04em; margin-bottom: 22px; }
.hero p.lead { color: #cbd8ea; max-width: 640px; margin: 0 auto 38px; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

/* ===== セクション共通 ===== */
.section { padding: 96px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { text-align: center; margin-bottom: 56px; }
.section-head .en { display: block; color: var(--accent); font-weight: 800; letter-spacing: .25em; font-size: 12px; margin-bottom: 8px; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 34px); margin: 0; }
.section-head h2::after { content: ""; display: block; width: 48px; height: 4px; border-radius: 2px; background: var(--accent); margin: 18px auto 0; }

/* ===== サービスカード ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: -90px; position: relative; z-index: 2; }
.card {
  background: #fff; border-radius: var(--radius); padding: 40px 28px; box-shadow: var(--shadow);
  border: 1px solid var(--line); text-align: center; transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card .icon {
  width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 20px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff;
}
.card .icon svg { width: 36px; height: 36px; }
.card h3 { font-size: 19px; }
.card p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* ===== 2カラム ===== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split .eyebrow { color: var(--accent); font-weight: 800; letter-spacing: .12em; font-size: 14px; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.photos img { border-radius: 14px; aspect-ratio: 3/4; object-fit: cover; width: 100%; box-shadow: var(--shadow); }
.photos img:nth-child(2) { transform: translateY(24px); }

/* ===== 電子化の提案 ===== */
.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.point { background: #fff; border-radius: var(--radius); padding: 30px 26px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.point .num { font-size: 40px; font-weight: 800; color: var(--accent); line-height: 1; opacity: .85; }
.point h4 { margin: 12px 0 8px; font-size: 17px; }
.point p { margin: 0; color: var(--muted); font-size: 14.5px; }
.cta-line { text-align: center; margin-top: 44px; }

/* ===== お知らせ(カード) ===== */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.post-card { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); transition: .25s; display: flex; flex-direction: column; }
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.post-card .thumb img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.post-card .body { padding: 22px 24px 26px; }
.post-card time { color: var(--accent); font-size: 13px; font-weight: 700; }
.post-card h3 { font-size: 18px; margin: 6px 0 10px; }
.post-card h3 a { color: var(--navy); }
.post-card p { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.more-link { font-weight: 700; font-size: 14px; }
.more-link::after { content: " →"; }

/* ===== お問合せ ===== */
.contact { color: #fff; position: relative; background: linear-gradient(135deg, var(--navy), var(--navy-2)); overflow: hidden; }
.contact::before { content: ""; position: absolute; inset: 0; background: url("assets/images/mockup-863469.jpg") center/cover; opacity: .12; }
.contact .container { position: relative; }
.contact .section-head h2 { color: #fff; }
.contact .section-head .en { color: var(--accent); }
.form-card { background: #fff; color: var(--ink); max-width: 720px; margin: 0 auto; border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow-lg); }
.form-card label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 16px; color: var(--navy); }
.form-card input[type=text], .form-card input[type=email], .form-card input[type=tel], .form-card textarea, .form-card select {
  width: 100%; margin-top: 6px; padding: 12px 14px; border: 1px solid #cfd9e6; border-radius: 10px; font: inherit; background: #fbfdff;
}
.form-card input:focus, .form-card textarea:focus { outline: 3px solid rgba(3,169,244,.25); border-color: var(--accent); }
.form-card input[type=submit], .form-card button[type=submit] { background: var(--primary); color: #fff; border: 0; padding: 14px 44px; border-radius: 999px; font-weight: 700; font-size: 15px; cursor: pointer; font-family: inherit; }
.form-card input[type=submit]:hover { background: var(--navy); }
.form-card .wpcf7-response-output { border-radius: 10px; }

/* ===== 下層ページ ===== */
.page-hero { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; padding: 64px 0; text-align: center; }
.page-hero h1 { color: #fff; margin: 0; font-size: clamp(24px, 4vw, 36px); }
.page-hero .meta { color: #9fb6d3; font-size: 14px; margin-top: 8px; }
.entry { max-width: 820px; margin: 0 auto; padding: 64px 0 88px; }
.entry h2 { border-left: 5px solid var(--accent); padding-left: 14px; margin-top: 2em; font-size: 24px; }
.entry h3 { font-size: 20px; margin-top: 1.8em; }
.entry table { border-collapse: collapse; width: 100%; margin-bottom: 1.6em; }
.entry th, .entry td { border: 1px solid var(--line); padding: 12px 16px; text-align: left; }
.entry th { background: var(--bg-soft); color: var(--navy); width: 30%; }
.entry img { border-radius: 12px; }
.pagination { text-align: center; margin-top: 40px; }
.pagination .page-numbers { display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); margin: 0 3px; }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; font-weight: 700; }

/* ===== フッター ===== */
.site-footer { background: var(--navy); color: #b8c9e0; padding: 64px 0 0; font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; padding-bottom: 40px; }
.site-footer h4 { color: #fff; font-size: 18px; margin-bottom: 14px; }
.site-footer a { color: #b8c9e0; }
.site-footer a:hover { color: #fff; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; columns: 2; }
.footer-nav li { margin-bottom: 8px; }
.copyright { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; text-align: center; font-size: 13px; color: #8aa0bf; }

/* ===== アニメーション ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ===== レスポンシブ ===== */
@media (max-width: 900px) {
  .cards, .points, .split, .footer-grid { grid-template-columns: 1fr; }
  .cards { margin-top: -70px; }
  .section { padding: 72px 0; }
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 14px 20px 20px; }
  .hero { padding: 90px 0 120px; }
  .form-card { padding: 28px 20px; }
}

/* ===== お問合せフォーム（Contact Form 7）===== */
.entry .wpcf7 {
  background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--accent);
  border-radius: var(--radius); padding: 44px 44px 36px; box-shadow: var(--shadow-lg);
}
.wpcf7-form p { margin: 0 0 22px; }
.wpcf7-form label { display: block; font-weight: 700; font-size: 14px; color: var(--navy); letter-spacing: .03em; }
.wpcf7-form .wpcf7-form-control-wrap { display: block; margin-top: 8px; }
.wpcf7-form input[type=text], .wpcf7-form input[type=email], .wpcf7-form input[type=tel],
.wpcf7-form textarea {
  width: 100%; padding: 14px 16px; font: inherit; font-weight: 400; color: var(--ink);
  background: var(--bg-soft); border: 1.5px solid transparent; border-radius: 12px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.wpcf7-form textarea { min-height: 180px; resize: vertical; }
.wpcf7-form input::placeholder, .wpcf7-form textarea::placeholder { color: #9aa8ba; }
.wpcf7-form input:hover, .wpcf7-form textarea:hover { border-color: #c9d6e6; }
.wpcf7-form input:focus, .wpcf7-form textarea:focus {
  outline: 0; background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(3,169,244,.18);
}
/* 必須ラベル(JSで付与) */
.req-badge { display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; vertical-align: 1px; }
/* 送信ボタン */
.wpcf7-form input[type=submit] {
  display: block; width: 100%; max-width: 320px; margin: 10px auto 0; padding: 16px 32px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font: inherit; font-weight: 700; font-size: 16px; letter-spacing: .08em;
  box-shadow: 0 10px 24px rgba(3,169,244,.35); transition: transform .2s, box-shadow .2s;
}
.wpcf7-form input[type=submit]:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(3,169,244,.45); }
.wpcf7-form input[type=submit]:disabled { opacity: .6; cursor: wait; transform: none; }
.wpcf7-spinner { display: block; margin: 12px auto 0; }
/* 入力エラー・送信結果 */
.wpcf7-not-valid { border-color: #e5484d !important; background: #fff6f6 !important; }
.wpcf7-not-valid-tip { color: #e5484d; font-size: 13px; margin-top: 6px; }
.wpcf7 form .wpcf7-response-output { margin: 24px 0 0; padding: 14px 18px; border-width: 1px; border-radius: 12px; font-size: 14px; text-align: center; }
.wpcf7 form.sent .wpcf7-response-output { border-color: #1aa86b; background: #eefaf4; color: #12714a; }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output { border-color: #e5484d; background: #fff6f6; color: #b32a30; }
@media (max-width: 900px) { .entry .wpcf7 { padding: 28px 20px 24px; } }
.wpcf7-form .hidden-fields-container { display: none; border: 0; }
.wpcf7-form label br { display: none; }
