/*
Theme Name: ChigiX Advisory & Insight
Theme URI: https://chigix.com
Description: 思いつきを、企画の芽に。和モダンな伴走型アドバイザリー専用テーマ
Version: 3.0.0
Author: ChigiX
Author URI: https://chigix.com
Text Domain: chigix-advin
*/

/* ============================================
   和モダン デザイントークン
   ============================================ */
:root {
  /* 和のカラーパレット */
  --sumi: #1a1714;
  --washi: #f5f0e8;
  --washi-dark: #ece5d8;
  --washi-warm: #f0e8da;
  
  --shu: #c03c2d;           /* 朱色 */
  --shu-bg: rgba(192, 60, 45, 0.06);
  
  --kin: #b8963e;           /* 金色 */
  --kin-bg: rgba(184, 150, 62, 0.06);
  
  --ai: #4a6670;            /* 藍色 */
  --ai-bg: rgba(74, 102, 112, 0.06);
  
  --fuji: #8b7baa;          /* 藤色 */
  
  --gray-warm: #756f66;
  --gray-mid: #3d3a35;
  
  --line: rgba(26, 23, 20, 0.10);
  --line-strong: rgba(26, 23, 20, 0.18);
  
  /* タイポグラフィ */
  --font-base: 'Zen Kaku Gothic New', sans-serif;
  --font-serif: 'Noto Serif JP', serif;
  --font-mincho: 'Shippori Mincho', serif;
  --font-old: 'Zen Old Mincho', serif;
  --line-height-base: 2;
  --line-height-heading: 1.7;
  
  /* レイアウト */
  --max: 1140px;
}

/* ============================================
   リセット & ベース
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-base);
  font-size: 16px;
  line-height: var(--line-height-base);
  color: var(--sumi);
  background: var(--washi);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  letter-spacing: 0.02em;
  word-break: auto-phrase;
}

/* 和紙テクスチャ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ブループリントグリッド（方眼紙風） */
.cxai-blueprint-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}

.cxai-blueprint-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
}

.cxai-blueprint-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(var(--line-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-strong) 1px, transparent 1px);
  background-size: 320px 320px;
}

/* 罫線アクセント */
.cxai-ruled-accent {
  position: fixed;
  left: 60px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--shu);
  opacity: 0.08;
  z-index: 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--sumi);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:focus-visible {
  outline: 2px solid var(--shu);
  outline-offset: 2px;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--shu);
  outline-offset: 2px;
}

/* ============================================
   タイポグラフィ
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  line-height: var(--line-height-heading);
  font-weight: 700;
  color: var(--sumi);
  font-family: var(--font-serif);
  letter-spacing: 0.04em;
}

h1 {
  font-size: clamp(1.875rem, 4vw, 3rem);
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  margin-bottom: 0.875rem;
}

h4 {
  font-size: 1.1875rem;
  margin-bottom: 0.625rem;
}

p {
  margin-bottom: 1.25rem;
  font-size: 16px;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 600;
  color: var(--sumi);
}

em {
  font-style: normal;
  color: var(--sumi);
  font-weight: 500;
}

/* ============================================
   ユーティリティ
   ============================================ */
.cxai-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cxai-text-center {
  text-align: center;
}

.cxai-text-muted {
  color: var(--gray-mid);
}

.cxai-mt-1 { margin-top: 0.5rem; }
.cxai-mt-2 { margin-top: 1rem; }
.cxai-mt-3 { margin-top: 1.5rem; }
.cxai-mt-4 { margin-top: 2rem; }
.cxai-mb-1 { margin-bottom: 0.5rem; }
.cxai-mb-2 { margin-bottom: 1rem; }
.cxai-mb-3 { margin-bottom: 1.5rem; }
.cxai-mb-4 { margin-bottom: 2rem; }

/* アクセントカラー */
.cxai-accent-shu { color: var(--shu); }
.cxai-accent-kin { color: var(--kin); }
.cxai-accent-ai { color: var(--ai); }
.cxai-accent-fuji { color: var(--fuji); }

.cxai-font-old { font-family: var(--font-old); }
.cxai-font-mincho { font-family: var(--font-mincho); }

/* ハイライト */
.cxai-highlight {
  background: linear-gradient(transparent 60%, var(--kin-bg) 60%);
  padding: 0 2px;
}

.cxai-highlight-shu {
  background: linear-gradient(transparent 60%, var(--shu-bg) 60%);
  padding: 0 2px;
}
