/*
Theme Name: ThxPC Software
Theme URI: https://thx-pc.jp/
Author: ThxPC
Author URI: https://thx-pc.jp/
Description: サンクスPC ソフトウェア開発紹介サイト用 独自テーマ。396シリーズ製品の紹介とお問い合わせ機能を提供します。
Version: 1.2.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thx-pc-software
*/

:root {
  --bg: #F5F7FA;
  --fg: #0F1E3C;
  --sub: #6B7280;
  --faint: #9CA3AF;
  --accent: #2D8CFF;
  --card: rgba(255, 255, 255, 0.52);
  --line: rgba(15, 30, 60, 0.08);

  /* メインコンテンツの寸法（カスタマイザー「レイアウト設定」で上書き可） */
  --page-max-width: 720px;
  --page-margin: 0;
  --page-pad-top: 96px;
  --page-pad-right: 32px;
  --page-pad-bottom: 120px;
  --page-pad-left: 112px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background-color: var(--bg);
  background-image: url("assets/biwa.png");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: right center;
  background-size: auto 100vh;
  color: var(--fg);
  font-family: "Noto Sans JP", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

.en, time, .status, .meta, .eyebrow {
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-weight: 300;
  letter-spacing: 0.04em;
}

.page {
  max-width: var(--page-max-width);
  margin: var(--page-margin);
  padding: var(--page-pad-top) var(--page-pad-right) var(--page-pad-bottom) var(--page-pad-left);
}

/* ===== Full-bleed page layout (全画面 / page-full.php・per-page 設定) ===== */
.page-full {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}
/* フルブリード時もフッターは読みやすい余白を保ち、情報を維持する */
.page-full > .site-footer {
  max-width: 720px;
  margin-top: 120px;
  padding: 0 32px 80px 32px;
}
/* フルブリードの本文（ブロックエディタ出力）の既定の内側余白 */
.page-full .entry-content {
  margin: 0 auto;
}

/* ===== Block alignment (align-wide / align-full 対応) ===== */
.alignwide {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
.alignfull {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

/* ===== Accessibility: skip link ===== */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  width: auto;
  height: auto;
  clip: auto;
  margin: 0;
  padding: 10px 18px;
  background: var(--fg);
  color: #fff;
  border-radius: 6px;
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(15, 30, 60, 0.2);
}

/* ===== Header navigation (added for WordPress) ===== */
.site-header-nav {
  position: absolute;
  top: 32px;
  right: 32px;
  display: flex;
  gap: 24px;
  font-size: 12px;
  letter-spacing: 0.04em;
  z-index: 10;
}
.site-header-nav a {
  color: var(--sub);
  border-bottom: 1px solid transparent;
}
.site-header-nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ===== Cover ===== */
header.cover { margin-bottom: 104px; }

header.cover img {
  display: block;
  height: 112px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 56px;
}

.hero-copy { max-width: 580px; }

.eyebrow {
  margin: 0 0 18px 0;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.14em;
}

h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: 0.05em;
  color: var(--fg);
}

.lead {
  margin: 32px 0 0 0;
  color: var(--sub);
  font-size: 14px;
  line-height: 2.05;
}

.lead p { margin: 0; }
.lead p + p { margin-top: 24px; }

.hero-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 32px;
  font-size: 12px;
}

section { margin-bottom: 88px; }
.page > section:last-of-type { margin-bottom: 0; }

h2 {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.04em;
  margin: 0 0 28px 0;
  color: var(--fg);
}

h2 .en {
  display: block;
  font-size: 11px;
  font-weight: 300;
  color: var(--faint);
  margin-top: 4px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.statement p,
.org p {
  margin: 0;
  line-height: 2.05;
  color: var(--sub);
}

.statement p + p,
.org p + p { margin-top: 24px; }

.items {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ===== Item: transparent link wrapping (whole row clickable) ===== */
.item {
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 16px;
  align-items: start;
  text-decoration: none;
  color: inherit;
  border-bottom: none;
  padding: 0;
  border-radius: 4px;
  transition: background-color 160ms ease, transform 160ms ease;
}

a.item:hover {
  background-color: rgba(45, 140, 255, 0.04);
  border-bottom: none;
}

a.item:hover .name {
  color: var(--accent);
}

.item .icon {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  background: rgba(15, 30, 60, 0.04);
  display: block;
  overflow: hidden;
  flex-shrink: 0;
}

.item .icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.item .body { min-width: 0; }

.item .name {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  margin: 0;
  line-height: 1.7;
  transition: color 160ms ease;
}

.item .name .en { font-weight: 400; }

.item .desc {
  font-size: 13px;
  font-weight: 400;
  color: var(--sub);
  margin: 0;
  line-height: 1.85;
}

.item .meta-row {
  margin: 8px 0 0 0;
  font-size: 11px;
  color: var(--faint);
  line-height: 1.7;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.item .status { color: var(--faint); }

.org .name {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
}

details.org-details {
  margin-top: 32px;
  color: var(--sub);
  font-size: 13px;
}

details.org-details summary {
  cursor: pointer;
  color: var(--accent);
  list-style: none;
  display: inline-block;
  border-bottom: 1px solid transparent;
}

details.org-details summary::-webkit-details-marker { display: none; }
details.org-details summary:hover { border-bottom-color: var(--accent); }

.org .meta {
  font-size: 13px;
  color: var(--sub);
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.org .meta .row { display: block; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 160ms ease;
}
a:hover { border-bottom-color: var(--accent); }

footer.site-footer {
  margin-top: 104px;
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.06em;
}

.site-footer-nav {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.site-footer-nav a {
  color: var(--sub);
  font-size: 11px;
  border-bottom: 1px solid transparent;
}
.site-footer-nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* フッター：トップへのリンク（サイト名） */
.site-footer .footer-home-link {
  color: var(--sub);
  border-bottom: 1px solid transparent;
}
.site-footer .footer-home-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* フッター：ウィジェット／事業者情報 */
.footer-widgets {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 20px;
}
.footer-widget {
  font-size: 12px;
  color: var(--sub);
  line-height: 1.9;
}
.footer-widget-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg);
  margin: 0 0 8px 0;
}
.footer-info {
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--sub);
  line-height: 1.9;
}
.site-footer-bottom {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

/* ===== Generic page (privacy / tokushoho / contact) ===== */
.page-generic h1 {
  font-size: 22px;
  margin-bottom: 48px;
}
.page-generic .page-content {
  color: var(--sub);
  font-size: 14px;
  line-height: 2.05;
  max-width: 580px;
}
.page-generic .page-content h2 {
  font-size: 14px;
  margin: 56px 0 20px 0;
  color: var(--fg);
}
.page-generic .page-content p {
  margin: 0 0 22px 0;
}

/* ===== Software detail page placeholder ===== */
.software-detail h1 {
  font-size: 26px;
  margin-bottom: 18px;
}
.software-detail .eyebrow {
  margin-bottom: 12px;
}
.software-detail .page-content {
  color: var(--sub);
  font-size: 14px;
  line-height: 2.05;
  max-width: 580px;
  margin-top: 48px;
}
.software-related-pages {
  max-width: 580px;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.software-related-pages h2 {
  margin-bottom: 18px;
}
.software-related-pages ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}

/* ===== News / Blog (archive・single・search) ===== */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 580px;
}
.post-list-item {
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
}
.post-list-item:last-child {
  border-bottom: none;
}
.post-list-item .post-date {
  display: block;
  font-size: 11px;
  color: var(--faint);
  margin-bottom: 6px;
}
.post-list-item .post-title {
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 8px 0;
  line-height: 1.7;
}
.post-list-item .post-title a {
  color: var(--fg);
  border-bottom: 1px solid transparent;
}
.post-list-item .post-title a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.post-list-item .post-excerpt {
  font-size: 13px;
  color: var(--sub);
  line-height: 1.9;
  margin: 0;
}
.single-post .post-date {
  display: block;
  font-size: 11px;
  color: var(--faint);
  margin-bottom: 10px;
}
.single-post h1 {
  font-size: 24px;
  margin-bottom: 32px;
}
.single-post .page-content {
  color: var(--sub);
  font-size: 14px;
  line-height: 2.05;
  max-width: 580px;
}
.pagination {
  margin-top: 64px;
  font-size: 12px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.pagination .page-numbers {
  color: var(--sub);
}
.pagination .page-numbers.current {
  color: var(--accent);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  body {
    background-size: auto 60vh;
    background-position: right -20% center;
  }
  .page {
    padding: 64px 28px 96px 28px;
    max-width: 100%;
  }
  .site-header-nav {
    top: 20px;
    right: 20px;
    gap: 16px;
    font-size: 11px;
  }
  header.cover { margin-bottom: 80px; }
  header.cover img {
    height: 84px;
    margin-bottom: 40px;
  }
  h1 { font-size: 23px; }
  section { margin-bottom: 72px; }
  h2 { margin-bottom: 24px; }
  footer.site-footer { margin-top: 80px; }
}

@media (max-width: 420px) {
  .page { padding: 48px 24px 80px 24px; }
  header.cover img { height: 72px; }
  header.cover { margin-bottom: 72px; }
  h1 { font-size: 21px; }
  .item {
    grid-template-columns: 32px 1fr;
    column-gap: 14px;
  }
  .item .icon { width: 32px; height: 32px; }
  .site-header-nav {
    position: static;
    margin-bottom: 24px;
    justify-content: flex-start;
  }
}
