/*
Theme Name: Corp Lite
Description: 小規模法人向けの軽量コーポレートテーマ（トップ＋お問い合わせの2ページ構成）。文言・会社情報は「外観 → カスタマイズ」から編集できます。
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: corp-lite
License: GPL-2.0-or-later
*/

/* ---------- Tokens ---------- */
:root {
  --ink: #1c2430;
  --ink-soft: #4a5563;
  --paper: #ffffff;
  --mist: #eef1f4;
  --line: #d5dbe2;
  --accent: #1f6f78; /* カスタマイザーで上書き */
  --accent-ink: #ffffff;
  --header-h: 72px;
  --wrap: 1120px;
  --font: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { text-decoration: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.4; margin: 0; font-weight: 700; word-break: auto-phrase; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
  clip: auto; width: auto; height: auto; z-index: 1000;
  top: 8px; left: 8px; padding: 8px 16px; background: var(--paper);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; }
.site-brand img { max-height: 40px; width: auto; }

.global-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 32px; }
.global-nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.global-nav a:hover { color: var(--accent); }
.global-nav .nav-contact a {
  display: inline-block; padding: 8px 20px;
  background: var(--accent); color: var(--accent-ink); border-radius: 2px;
}
.global-nav .nav-contact a:hover { color: var(--accent-ink); opacity: .88; }

.nav-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink);
}
.nav-toggle-bar { display: block; width: 24px; height: 2px; background: currentColor; margin: 5px 0; transition: transform .2s, opacity .2s; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .global-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    display: none;
  }
  .admin-bar .global-nav { top: calc(var(--header-h) + 46px); }
  .global-nav.is-open { display: block; }
  .global-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 24px; }
  .global-nav li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .global-nav .nav-contact { margin-top: 16px; }
  .global-nav .nav-contact a { text-align: center; border-bottom: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

.site-main { padding-top: var(--header-h); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 16px 40px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; text-decoration: none; border-radius: 2px;
  transition: opacity .2s;
}
.btn:hover { opacity: .88; color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn-ghost:hover { color: var(--ink); background: var(--mist); opacity: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(78vh, 720px);
  display: flex; align-items: center;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero.has-image { color: #fff; border-bottom: 0; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: rgba(16, 22, 30, .55); }
.hero-inner { padding-top: 80px; padding-bottom: 80px; }
.hero-rule { width: 64px; height: 4px; background: var(--accent); margin-bottom: 32px; }
.hero.has-image .hero-rule { background: #fff; }
.hero-title {
  font-size: clamp(32px, 5.6vw, 64px);
  line-height: 1.35;
  letter-spacing: 0.04em;
  max-width: 16em;
}
.hero-lead {
  margin-top: 28px; max-width: 34em;
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--ink-soft);
}
.hero.has-image .hero-lead { color: rgba(255,255,255,.9); }
.hero-actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 16px; }
.hero.has-image .btn-ghost { color: #fff; box-shadow: inset 0 0 0 1px #fff; }
.hero.has-image .btn-ghost:hover { background: rgba(255,255,255,.12); }

/* 唯一のページ読み込み演出 */
@media (prefers-reduced-motion: no-preference) {
  .hero-rule { animation: rule-in .7s ease-out both; transform-origin: left; }
  .hero-title, .hero-lead, .hero-actions { animation: rise-in .8s ease-out both; }
  .hero-title { animation-delay: .15s; }
  .hero-lead { animation-delay: .3s; }
  .hero-actions { animation-delay: .45s; }
}
@keyframes rule-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.section { padding: 112px 0; }
.section.is-mist { background: var(--mist); }
.section-head { margin-bottom: 56px; display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: end; }
.section-title { font-size: clamp(26px, 3vw, 34px); letter-spacing: .06em; padding-left: 20px; border-left: 4px solid var(--accent); }
.section-desc { color: var(--ink-soft); max-width: 40em; }
@media (max-width: 860px) {
  .section { padding: 80px 0; }
  .section-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 40px; }
}

/* 事業内容：カードではなく行で並べる */
.service-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.service-item {
  display: grid; grid-template-columns: 280px 1fr; gap: 40px;
  padding: 40px 0; border-bottom: 1px solid var(--line);
}
.service-title { font-size: 22px; }
.service-text { color: var(--ink-soft); max-width: 40em; }
@media (max-width: 860px) {
  .service-item { grid-template-columns: 1fr; gap: 12px; padding: 28px 0; }
  .service-title { font-size: 19px; }
}

/* 強み：縦線で区切る3カラム */
.strength-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.strength-item { padding: 8px 32px; border-left: 1px solid var(--line); }
.strength-item:first-child { padding-left: 0; border-left: 0; }
.strength-title { font-size: 19px; margin-bottom: 16px; color: var(--accent); }
.strength-text { color: var(--ink-soft); font-size: 15px; }
@media (max-width: 860px) {
  .strength-list { grid-template-columns: 1fr; }
  .strength-item, .strength-item:first-child { padding: 24px 0; border-left: 0; border-top: 1px solid var(--line); }
  .strength-item:first-child { border-top: 0; padding-top: 0; }
}

/* 代表挨拶 */
.message { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: start; }
.message.no-photo { grid-template-columns: 1fr; max-width: 46em; }
.message-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.message-body { max-width: 40em; }
.message-sign { margin-top: 32px; text-align: right; }
.message-sign-role { display: block; font-size: 14px; color: var(--ink-soft); }
.message-sign-name { font-size: 20px; font-weight: 700; letter-spacing: .1em; }
@media (max-width: 860px) {
  .message { grid-template-columns: 1fr; gap: 32px; }
  .message-photo { max-width: 240px; }
}

/* 会社概要 */
.company-table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--ink); }
.company-table th, .company-table td { padding: 24px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.company-table th { width: 280px; font-weight: 700; padding-right: 24px; }
.company-table td { color: var(--ink-soft); }
@media (max-width: 860px) {
  .company-table th, .company-table td { display: block; width: auto; }
  .company-table th { padding: 20px 0 4px; border-bottom: 0; }
  .company-table td { padding: 0 0 20px; }
}

/* お知らせ */
.news-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news-item a {
  display: grid; grid-template-columns: 140px 1fr; gap: 24px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
}
.news-item a:hover .news-title { color: var(--accent); }
.news-date { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .news-item a { grid-template-columns: 1fr; gap: 4px; } }

/* CTA */
.cta { background: var(--ink); color: #fff; padding: 96px 0; }
.cta .wrap { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.cta-title { font-size: clamp(24px, 3vw, 32px); letter-spacing: .06em; }
.cta-text { margin-top: 12px; color: rgba(255,255,255,.8); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0; font-size: 14px; color: var(--ink-soft); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-name { font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-soft); }
.copyright { width: 100%; margin-top: 24px; font-size: 13px; }

/* ---------- 下層ページ ---------- */
.page-head { padding: 72px 0 48px; border-bottom: 1px solid var(--line); }
.page-title { font-size: clamp(28px, 4vw, 40px); letter-spacing: .06em; }
.page-lead { margin-top: 16px; color: var(--ink-soft); max-width: 40em; }
.page-body { padding: 64px 0 112px; }
.page-body .wrap { max-width: 800px; }
.entry-content h2 { font-size: 24px; margin: 2.4em 0 .8em; padding-left: 16px; border-left: 4px solid var(--accent); }
.entry-content h3 { font-size: 19px; margin: 2em 0 .6em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1em; }

/* プライバシーポリシー */
.privacy { margin-top: 96px; padding-top: 56px; border-top: 1px solid var(--ink); }
.privacy-title { font-size: 26px; margin-bottom: 24px; }
.privacy h3 { font-size: 17px; margin: 32px 0 8px; }
.privacy p, .privacy li { font-size: 15px; color: var(--ink-soft); }
.privacy ul { padding-left: 1.4em; }

/* ---------- Contact Form 7 ---------- */
.cf-row { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cf-row:first-child { border-top: 1px solid var(--line); }
.cf-label { font-weight: 700; padding-top: 10px; }
.cf-req, .cf-opt { display: inline-block; margin-left: 8px; padding: 0 8px; font-size: 12px; line-height: 1.8; border-radius: 2px; vertical-align: 2px; }
.cf-req { background: var(--accent); color: var(--accent-ink); }
.cf-opt { background: var(--mist); color: var(--ink-soft); }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 select, .wpcf7 textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 2px;
}
.wpcf7 textarea { min-height: 200px; resize: vertical; }
.wpcf7 input:focus, .wpcf7 textarea:focus, .wpcf7 select:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; }
.cf-turnstile-row { margin-top: 32px; display: flex; justify-content: center; }
.cf-accept { margin: 32px 0 24px; text-align: center; }
.cf-submit { text-align: center; }
.wpcf7 input[type="submit"] {
  padding: 16px 64px; font: inherit; font-weight: 700; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 2px;
}
.wpcf7 input[type="submit"]:hover { opacity: .88; }
.wpcf7 input[type="submit"]:disabled { opacity: .4; cursor: not-allowed; }
.wpcf7-not-valid-tip { font-size: 14px; margin-top: 4px; }
.wpcf7 form .wpcf7-response-output { margin: 24px 0 0; padding: 12px 16px; border-radius: 2px; }
@media (max-width: 700px) {
  .cf-row { grid-template-columns: 1fr; gap: 8px; }
  .cf-label { padding-top: 0; }
}
.admin-notice { padding: 16px 20px; background: #fff8e1; border-left: 4px solid #e0a800; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
