/*
Theme Name:  Kubota ya
Theme URI:   https://kubotaya-smith.co.jp
Author:      Kubota ya
Author URI:  https://kubotaya-smith.co.jp
Description: 株式会社Kubota ya コーポレートサイト用カスタムWordPressテーマ。NYCエディトリアルスタイル。
Version:     1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kubotaya
Tags:        custom-theme, corporate, editorial, nyc
*/

/* ==========================================================================
   CSS Custom Properties（デザイントークン）
   ========================================================================== */

:root {
  /* ── カラーパレット ── */
  --color-bg:           #FFFFFF;
  --color-bg-secondary: #F7F7F7;
  --color-bg-tertiary:  #EEEEEE;
  --color-surface:      #FFFFFF;
  --color-border:       #E0E0E0;
  --color-border-dark:  #222222;

  --color-text-primary:   #111111;
  --color-text-secondary: #444444;
  --color-text-muted:     #888888;
  --color-text-invert:    #FFFFFF;

  --color-accent:       #B71C1C;   /* ディープクリムゾン */
  --color-accent-hover: #D32F2F;
  --color-accent-dark:  #7F0000;
  --color-accent-light: #FFEBEE;

  /* ── フォント ── */
  --font-en-display: 'Bebas Neue', sans-serif;
  --font-en-body:    'Inter', sans-serif;
  --font-ja-display: 'Shippori Mincho B1', 'Noto Serif JP', serif;
  --font-ja-body:    'Noto Sans JP', sans-serif;

  /* ── タイポグラフィスケール ── */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-md:   1.125rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;
  --text-3xl:  2.75rem;
  --text-4xl:  3.5rem;
  --text-5xl:  5rem;
  --text-6xl:  7rem;

  /* ── スペーシング ── */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* ── レイアウト ── */
  --container-max:    1200px;
  --container-wide:   1440px;
  --container-narrow: 800px;

  /* ── ボーダー・シャドウ ── */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);

  /* ── アニメーション ── */
  --transition-fast: 150ms ease;
  --transition-base: 280ms ease;
  --transition-slow: 500ms ease;
}


/* ==========================================================================
   リセット & ベーススタイル
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-ja-body);
  font-size: var(--text-base);
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

ul, ol { list-style: none; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}


/* ==========================================================================
   タイポグラフィ
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-ja-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text-primary);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

strong { font-weight: 700; }

/* Bebas Neue（English大見出し）*/
.en-display {
  font-family: var(--font-en-display);
  letter-spacing: 0.04em;
  line-height: 1;
  font-weight: 400; /* Bebas Neueはweightが1種 */
}

/* Inter UI */
.en-ui {
  font-family: var(--font-en-body);
  letter-spacing: 0.02em;
}


/* ==========================================================================
   レイアウト ユーティリティ
   ========================================================================== */

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-8);
}

.container--wide {
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--space-8);
}

.container--narrow {
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: var(--space-8);
}

.section {
  padding-block: var(--space-20);
}

/* セクション背景バリエーション */
.section--white  { background: var(--color-bg); }
.section--gray   { background: var(--color-bg-secondary); }
.section--dark   { background: var(--color-text-primary); color: var(--color-text-invert); }
.section--accent { background: var(--color-accent); color: var(--color-text-invert); }


/* ==========================================================================
   セクション見出し（共通パーツ）
   ========================================================================== */

.section-header {
  margin-bottom: var(--space-12);
}

.section-header--center {
  text-align: center;
}

/* 赤いラベル（Bebas Neue 大文字） */
.section-header__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-en-display);
  font-size: var(--text-sm);
  letter-spacing: 0.25em;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.section-header__label::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--color-accent);
  flex-shrink: 0;
}

.section-header__title {
  font-family: var(--font-ja-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
}

/* セクションがdark背景の場合は白文字 */
.section--dark .section-header__title {
  color: var(--color-text-invert);
}

.section-header__subtitle {
  margin-top: var(--space-4);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 560px;
  line-height: 1.8;
}

.section-header--center .section-header__label {
  justify-content: center;
}

.section-header--center .section-header__label::before {
  display: none;
}

.section-header--center .section-header__label::after {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--color-accent);
  flex-shrink: 0;
}

.section-header--center .section-header__subtitle {
  margin-inline: auto;
}


/* ==========================================================================
   ボタン
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  font-family: var(--font-en-display);
  font-size: var(--text-base);
  letter-spacing: 0.12em;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  cursor: pointer;
  line-height: 1;
}

/* プライマリ：赤 */
.btn--primary {
  background: var(--color-accent);
  color: #fff;
  border: 2px solid var(--color-accent);
}

.btn--primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: #fff;
}

/* セカンダリ：黒アウトライン */
.btn--secondary {
  background: transparent;
  color: var(--color-text-primary);
  border: 2px solid var(--color-text-primary);
}

.btn--secondary:hover {
  background: var(--color-text-primary);
  color: var(--color-text-invert);
}

/* 白アウトライン（dark背景上で使用） */
.btn--outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.btn--outline-white:hover {
  background: #fff;
  color: var(--color-text-primary);
}

/* 白塗り（dark背景上で使用） */
.btn--white {
  background: #fff;
  color: var(--color-text-primary);
  border: 2px solid #fff;
}

.btn--white:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.btn--lg {
  padding: var(--space-4) var(--space-12);
  font-size: var(--text-lg);
}


/* ==========================================================================
   スクロールアニメーション（Intersection Observer）
   ========================================================================== */

[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-animate="fade-left"] { transform: translateX(-24px); }
[data-animate="fade-left"].is-visible { transform: translateX(0); }

[data-animate="fade-right"] { transform: translateX(24px); }
[data-animate="fade-right"].is-visible { transform: translateX(0); }

[data-animate="scale"] { transform: scale(0.94); opacity: 0; }
[data-animate="scale"].is-visible { transform: scale(1); opacity: 1; }

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }


/* ==========================================================================
   ページヒーロー（固定ページ用）
   ========================================================================== */

.page-hero {
  padding-block: var(--space-16) var(--space-12);
  background: var(--color-text-primary);
  color: var(--color-text-invert);
  position: relative;
  overflow: hidden;
}

/* 装飾：大きな背景テキスト */
.page-hero::before {
  content: attr(data-label);
  position: absolute;
  right: var(--space-8);
  bottom: -0.15em;
  font-family: var(--font-en-display);
  font-size: clamp(80px, 12vw, 160px);
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.05);
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
}

.page-hero__inner {
  position: relative;
  z-index: 1;
}

.page-hero__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-en-display);
  font-size: var(--text-sm);
  letter-spacing: 0.3em;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.page-hero__label::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--color-accent);
}

.page-hero__title {
  font-family: var(--font-ja-display);
  font-size: clamp(2rem, 5vw, var(--text-4xl));
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

/* パンくず */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-en-body);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.45);
  margin-top: var(--space-5);
  letter-spacing: 0.05em;
}

.breadcrumb a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb a:hover { color: #fff; }

.breadcrumb__sep { color: rgba(255,255,255,0.25); }


/* ==========================================================================
   区切り線
   ========================================================================== */

.divider {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin-block: var(--space-8);
}

.divider--heavy {
  height: 3px;
  background: var(--color-text-primary);
}

.divider--red {
  height: 2px;
  background: var(--color-accent);
}


/* ==========================================================================
   no-posts
   ========================================================================== */

.no-posts {
  text-align: center;
  padding: var(--space-16);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  border: 1px solid var(--color-border);
}


/* ==========================================================================
   レスポンシブ
   ========================================================================== */

@media (max-width: 1024px) {
  :root {
    --text-4xl: 2.75rem;
    --text-3xl: 2.2rem;
    --text-6xl: 5rem;
  }
}

@media (max-width: 768px) {
  :root {
    --text-5xl: 3rem;
    --text-4xl: 2.25rem;
    --text-3xl: 1.875rem;
    --text-2xl: 1.5rem;
  }

  .container,
  .container--wide,
  .container--narrow {
    padding-inline: var(--space-5);
  }

  .section { padding-block: var(--space-12); }
}

@media (max-width: 480px) {
  :root {
    --text-4xl: 1.875rem;
    --text-3xl: 1.5rem;
  }
}
