/*
Theme Name: Okada Clone
Author: kurobapp
Version: 1.0
*/

/* =========================================================
   デザイントークン
   実サイトを DevTools で計測したら、まずここの数値を差し替える。
   色・フォント・余白・横幅を1箇所に集約してあるので全体に反映される。
   ========================================================= */
:root {
  --color-text: #1a2233;      /* 本文の濃紺グレー */
  --color-heading: #0f1626;   /* 見出し */
  --color-accent: #1f5fd6;    /* アクセント（リンク・ボタン） */
  --color-accent-dark: #164aa8;
  --color-muted: #6b7280;     /* 補助テキスト */
  --color-bg: #ffffff;
  --color-bg-alt: #f4f6fa;    /* セクション交互の薄い背景 */
  --color-border: #e2e6ee;

  --font-base: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP",
    system-ui, -apple-system, sans-serif;

  --container: 1120px;        /* コンテンツ最大幅 */
  --gutter: 24px;             /* 左右の余白 */
  --header-h: 72px;           /* ヘッダーの高さ */

  --bp-md: 768px;             /* この幅以下でスマホ表示（参考値・メディアクエリに直接は使えない） */
}

/* =========================================================
   リセット（最小限）
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--color-text);
  background: var(--color-bg);
  font-family: var(--font-base);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1, h2, h3, p, ul {
  margin: 0;
}

ul {
  list-style: none;
  padding: 0;
}

/* =========================================================
   共通レイアウト
   ========================================================= */
.container,
.site-header__inner,
.site-footer__inner,
.site-main > * {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-main {
  padding-block: 64px;
}

/* =========================================================
   ヘッダー / グローバルナビ
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
}
.site-logo a {
  color: var(--color-heading);
}
.site-logo a:hover {
  text-decoration: none;
  color: var(--color-accent);
}

.global-nav__list {
  display: flex;
  align-items: center;
  gap: 28px;
}
.global-nav__list a {
  color: var(--color-heading);
  font-size: 0.95rem;
  font-weight: 500;
}

/* ハンバーガーボタン: PC では隠す */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: var(--color-heading);
  transition: transform 0.25s, opacity 0.25s;
}

/* =========================================================
   レスポンシブ: 900px 以下でハンバーガー化
   日本語6項目は横並びだと窮屈なので、タブレット〜狭いPCで早めに切り替える
   ========================================================= */
@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  /* ナビをヘッダー下にドロップダウンさせ、初期状態は非表示 */
  .global-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .global-nav.is-open {
    max-height: 70vh;
  }

  .global-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 16px;
  }
  .global-nav__list a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
  }

  /* ボタンを×印に変形 */
  .nav-toggle.is-open .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle.is-open .nav-toggle__bar:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.is-open .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* =========================================================
   セクション共通
   ========================================================= */
.hero,
.home-news,
.home-services,
.home-works,
.home-cta {
  padding-block: 56px;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 28px;
  padding-left: 16px;
  position: relative;
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 4px;
  border-radius: 2px;
  background: var(--color-accent);
}

/* ボタン（ヒーロー・CTA で共用） */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
  transition: background 0.2s;
}
.btn:hover {
  background: var(--color-accent-dark);
  text-decoration: none;
}
.btn--ghost {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}
.btn--ghost:hover {
  background: var(--color-accent);
  color: #fff;
}

/* =========================================================
   ヒーロー
   ========================================================= */
.hero {
  padding-block: 80px;
}
.hero__catch {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.35;
  font-weight: 800;
  color: var(--color-heading);
}
.hero__sub {
  margin-top: 20px;
  font-size: 1.05rem;
  color: var(--color-muted);
}
.hero__actions {
  margin-top: 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* =========================================================
   ニュース一覧（front-page の抜粋 / archive-news 共用）
   ========================================================= */
.news-list {
  border-top: 1px solid var(--color-border);
}
.news-list__item {
  border-bottom: 1px solid var(--color-border);
}
.news-list__item a {
  display: flex;
  gap: 20px;
  align-items: baseline;
  padding: 18px 8px;
  color: var(--color-heading);
}
.news-list__item a:hover {
  text-decoration: none;
  color: var(--color-accent);
  background: var(--color-bg-alt);
}
.news-list__date {
  flex-shrink: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.news-list__title {
  font-weight: 500;
}
.home-news__more {
  margin-top: 24px;
}
.home-news__more a {
  font-weight: 600;
}

@media (max-width: 768px) {
  /* ニュース: 日付とタイトルを縦積みに */
  .news-list__item a {
    flex-direction: column;
    gap: 4px;
  }
  /* ヒーローのボタンを横いっぱいに */
  .hero__actions .btn {
    flex: 1 1 auto;
    text-align: center;
  }
}

/* =========================================================
   カードグリッド（サービス / 実績で共用）
   auto-fit + minmax で、画面幅に応じて列数が自動で変わる（メディアクエリ不要）
   ========================================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 28px 24px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: 0 8px 24px rgba(15, 22, 38, 0.08);
  transform: translateY(-2px);
}
.card__title {
  font-size: 1.15rem;
  color: var(--color-heading);
  margin-bottom: 10px;
}
.card__text {
  color: var(--color-muted);
  font-size: 0.95rem;
}
.section-more {
  margin-top: 28px;
}
.section-more a {
  font-weight: 600;
}

/* =========================================================
   CTA パネル
   ========================================================= */
.cta-panel {
  background: var(--color-accent);
  border-radius: 16px;
  padding: 48px 32px;
  text-align: center;
  color: #fff;
}
.cta-panel__text {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 24px;
}
/* パネル上ではボタンを白地・アクセント文字に反転 */
.cta-panel .btn {
  background: #fff;
  color: var(--color-accent);
}
.cta-panel .btn:hover {
  background: var(--color-bg-alt);
}

/* =========================================================
   下層ページ / 記事の見出し（page / single-news / archive-news 共用）
   ========================================================= */
.page__header,
.news-single__header,
.news-archive__header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--color-border);
}
.page__title,
.news-single__title,
.news-archive__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.4;
  color: var(--color-heading);
}
.news-single__date {
  display: block;
  margin-bottom: 8px;
  color: var(--color-muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.news-single__thumbnail {
  margin-bottom: 28px;
}
.news-single__thumbnail img {
  border-radius: 12px;
}

/* =========================================================
   本文（the_content の出力）の体裁
   reset で list-style を消しているので、本文内リストはここで復活させる
   ========================================================= */
.page__content,
.news-single__content {
  font-size: 1rem;
}
/* 隣り合う要素の間隔をまとめて空ける（いわゆる owl selector） */
.page__content > * + *,
.news-single__content > * + * {
  margin-top: 1.2em;
}
.page__content h2,
.news-single__content h2 {
  margin-top: 2em;
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--color-heading);
}
.page__content h3,
.news-single__content h3 {
  margin-top: 1.6em;
  font-size: 1.2rem;
  color: var(--color-heading);
}
.page__content ul,
.news-single__content ul,
.page__content ol,
.news-single__content ol {
  padding-left: 1.4em;
}
.page__content ul,
.news-single__content ul {
  list-style: disc;
}
.page__content ol,
.news-single__content ol {
  list-style: decimal;
}
.page__content img,
.news-single__content img {
  border-radius: 8px;
}

.news-single__back {
  margin-top: 40px;
}
.news-single__back a {
  font-weight: 600;
}

/* =========================================================
   ページネーション（the_posts_pagination の出力）
   ========================================================= */
.pagination {
  margin-top: 40px;
}
.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-heading);
  font-weight: 500;
}
.pagination .page-numbers:hover {
  text-decoration: none;
  background: var(--color-bg-alt);
}
.pagination .page-numbers.current {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* =========================================================
   フェードイン
   .js は main.js が付ける印。JS 無効環境では初期非表示にしない(内容が消えるのを防ぐ)
   ========================================================= */
.js .fadein {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .fadein.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* OS 側で「視差効果を減らす」設定の人にはアニメーションを出さない */
@media (prefers-reduced-motion: reduce) {
  .js .fadein {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =========================================================
   フッター
   ========================================================= */
.site-footer {
  background: var(--color-heading);
  color: #cbd2de;
  margin-top: 64px;
  padding-block: 48px 32px;
}
.site-footer__top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.site-footer__logo {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.site-footer__logo a {
  color: #fff;
}
.site-footer__logo a:hover {
  text-decoration: none;
  opacity: 0.85;
}
.site-footer__desc {
  font-size: 0.9rem;
  max-width: 36em;
}
.footer-nav__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-nav__list a {
  color: #cbd2de;
  font-size: 0.95rem;
}
.footer-nav__list a:hover {
  color: #fff;
}
.site-footer__bottom {
  padding-top: 24px;
  font-size: 0.85rem;
}
.site-footer__copyright {
  color: #fff;
}
.site-footer__notice {
  margin-top: 8px;
  color: #98a1b3;
}

@media (max-width: 768px) {
  .site-footer__top {
    flex-direction: column;
    gap: 28px;
  }
}

/* =========================================================
   お問い合わせフォーム
   ========================================================= */
.contact-form {
  max-width: 640px;
  margin-top: 32px;
}
/* honeypot: ボット対策の罠フィールド。画面外に飛ばして人間には見せない */
.contact-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form__row {
  margin-bottom: 24px;
}
.contact-form__row label {
  display: block;
  font-weight: 600;
  color: var(--color-heading);
  margin-bottom: 8px;
}
.contact-form__row .required {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 4px;
  background: #d64545;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
}
.contact-form__row input,
.contact-form__row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
}
.contact-form__row input:focus,
.contact-form__row textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
  border-color: var(--color-accent);
}
.contact-form__submit .btn {
  min-width: 200px;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}

/* 送信結果の通知 */
.form-notice {
  margin: 24px 0;
  padding: 16px 20px;
  border-radius: 8px;
  font-weight: 500;
}
.form-notice ul {
  list-style: none;
  padding: 0;
}
.form-notice--success {
  background: #e8f5ec;
  border: 1px solid #57a773;
  color: #1e5631;
}
.form-notice--error {
  background: #fdecec;
  border: 1px solid #d64545;
  color: #8f1f1f;
}

/* =========================================================
   404
   ========================================================= */
.error-404 {
  text-align: center;
  padding-block: 48px;
}
.error-404__code {
  font-size: 5rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
}
.error-404__title {
  margin-top: 16px;
  font-size: 1.5rem;
  color: var(--color-heading);
}
.error-404__text {
  margin-top: 12px;
  color: var(--color-muted);
}
.error-404__actions {
  margin-top: 32px;
}

