/*
Theme Name: Hairline
Author: sbcc
Description: sbcc公式サイト用のオリジナルのクラシックテーマです。細い罫線・明朝体・余白で構成するエディトリアルなデザイン言語を採用しています。
Version: 1.0.2
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
Text Domain: hairline
*/

/* ================================================================
   1. デザイントークン
   ================================================================ */
:root {
  --color-ink: #0a2a50; /* 紺（見出し・アクセント） */
  --color-text: #1c2730; /* 本文色 */
  --color-background: #ffffff;
  --color-hairline: #e3e6e9; /* 細い区切り線 */
  --color-line: #a9b0b6; /* リストの区切り線 */
  --color-accent: #c9a45e; /* ゴールド */
  --font-serif:
    "Noto Serif JP", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro",
    "MS PMincho", serif;

  --content-width: 90rem; /* 1440px（通常ボディの基準幅） */
  --gutter-desktop: 72px;
  --gutter-tablet: 42px;
  --gutter-mobile: 23px;
}

/* ================================================================
   2. リセット・ベース
   ================================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-text);
  background: var(--color-background);
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.9;
  letter-spacing: 0.03em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

/* ================================================================
   3. サイトヘッダー
   ================================================================ */
.site-header {
  width: 100%;
  border-bottom: 1px solid var(--color-hairline);
  background: var(--color-background);
}

.site-header__inner {
  width: min(100%, var(--content-width));
  min-height: 54px;
  margin-inline: auto;
  padding-inline: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--color-ink);
}

.site-logo {
  display: inline-block;
  color: var(--color-ink);
  font-family: Georgia, "Times New Roman", var(--font-serif);
  font-size: 23.5px;
  line-height: 1;
  letter-spacing: -0.055em;
}

.site-logo--footer {
  font-size: 17.5px;
}

/* --- グローバルナビ（外観→メニューから出力） --- */
.global-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* メニュー項目の間に区切り記号「/」を挿入 */
.global-nav li + li::before {
  content: "/";
  margin-right: 13px;
  color: var(--color-ink);
  opacity: 0.5;
}

.global-nav li {
  display: flex;
  align-items: center;
}

.global-nav a {
  transition: opacity 160ms ease;
}

.global-nav a:hover,
.global-nav .current-menu-item > a {
  opacity: 0.55;
}

/* --- モバイル用メニューボタン --- */
.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 11px 7px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-button span {
  height: 1px;
  display: block;
  background: var(--color-ink);
  transition: transform 180ms ease;
}

/* ================================================================
   4. サイト本体
   ================================================================ */
.site-main {
  min-height: 60vh;
}

/* 固定ページ・投稿の標準幅 */
.entry-content {
  width: min(100%, var(--content-width));
  margin-inline: auto;
  padding: 32px var(--gutter-desktop);
}

.entry-title {
  color: var(--color-ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.06em;
}

.post + .post {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--color-hairline);
}

/* ================================================================
   5. ヒーローセクション（基準スタイル）
   ================================================================ */
.hero {
  background-color: #f4f1ea;
}

/* ================================================================
   6. サイトフッター
   ================================================================ */
.site-footer {
  width: min(100%, var(--content-width));
  margin: 23px auto 0;
  padding: 33px 45px 18px;
  border-top: 3px solid rgba(10, 42, 80, 0.73);
  color: var(--color-ink);
}

.site-footer__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 50px;
}

.site-footer__address {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.footer-nav ul {
  margin: 0;
  padding: 12px 0 0;
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 13px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.footer-nav li {
  display: flex;
  align-items: center;
}

.footer-nav li + li::before {
  content: "/";
  margin-right: 13px;
  color: var(--color-ink);
  opacity: 0.5;
}

.footer-nav a {
  transition: opacity 160ms ease;
}

.footer-nav a:hover {
  opacity: 0.55;
}

.site-copyright {
  margin: 30px 0 0;
  text-align: center;
  font-size: 12px;
}

/* ================================================================
   7. アクセシビリティ用
   ================================================================ */
.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;
}

.screen-reader-text:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100000;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  clip: auto;
  color: #000000;
  background: #ffffff;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* ================================================================
   8. レスポンシブ
   ================================================================ */
@media (max-width: 1080px) {
  .site-header__inner {
    padding-inline: 28px;
  }

  .global-nav ul {
    gap: 8px;
    font-size: 11px;
  }

  .global-nav li + li::before {
    margin-right: 8px;
  }

  .entry-content {
    padding-inline: var(--gutter-tablet);
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .site-header {
    position: sticky;
    z-index: 20;
    top: 0;
    background: rgba(255, 255, 255, 0.96);
  }

  .site-header__inner {
    min-height: 36px;
    padding-inline: 20px;
  }

  .site-logo {
    font-size: 17.5px;
  }

  .menu-button {
    display: grid;
    align-content: center;
    gap: 7px;
  }

  .menu-button[aria-expanded="true"] span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .menu-button[aria-expanded="true"] span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  .global-nav {
    position: absolute;
    top: 36px;
    right: 0;
    left: 0;
    display: none;
    padding: 21px 24px 24px;
    background: #fff;
    border-bottom: 1px solid var(--color-hairline);
  }

  .global-nav.is-open {
    display: block;
  }

  .global-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
  }

  /* モバイルの縦並びメニューでは区切り記号を消す */
  .global-nav li + li::before {
    content: none;
  }

  .entry-content {
    padding: 17px var(--gutter-mobile);
  }

  .entry-title {
    font-size: 12px;
  }

  .site-footer {
    margin: 18px 8px 0;
    padding: 27px 16px 18px;
    border-top-width: 2px;
  }

  .site-footer__inner {
    flex-direction: column;
    gap: 26px;
  }

  .footer-nav ul {
    gap: 5px 8px;
    font-size: 11px;
  }

  .footer-nav li + li::before {
    margin-right: 8px;
  }

  .site-copyright {
    margin-top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
