/* ============================================================
   SHITEN INC. — Corporate Website Styles
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --color-black: #1a1a1a;
  --color-dark: #2d2d2d;
  --color-mid: #555555;
  --color-light-gray: #888888;
  --color-border: #e0e0e0;
  --color-bg: #ffffff;
  --color-bg-light: #f8f8f8;
  --color-bg-dark: #1a1a1a;
  --color-accent: #444444;

  --font-sans: 'Inter', 'Noto Sans JP', sans-serif;
  --font-jp: 'Noto Sans JP', sans-serif;

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 7rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 2px 16px rgba(0,0,0,0.07);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.12);

  --max-width: 1140px;
  --nav-height: 72px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--color-dark);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-jp);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xl) 0;
}

.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--color-light-gray);
  text-transform: uppercase;
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-label::after {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--color-border);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--color-mid);
  margin-top: 0.75rem;
  font-weight: 300;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

#site-header.scrolled {
  border-color: var(--color-border);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

/* ナビロゴ：CSSテキスト表示 */
.nav-logo-text {
  font-family: 'Inter', sans-serif;
  font-size: 1.38rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  color: var(--color-dark);
}

.nav-logo-i {
  display: inline-block;
  font-size: 0;
  width: 7px;
  position: relative;
  vertical-align: baseline;
}

/* 縦棒 */
.nav-logo-i::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1.5px;
  height: 12px;
  background: var(--color-dark);
  border-radius: 1px;
}

/* ドット */
.nav-logo-i::after {
  content: '';
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 3.5px;
  height: 3.5px;
  background: var(--color-light-gray);
  border-radius: 50%;
}

.logo-icon {
  width: 44px;
  height: 32px;
  flex-shrink: 0;
}

.logo-text {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  color: var(--color-dark);
}

/*
  「i」のデザイン（ロゴ忠実再現）
  ─────────────────────────────
  ・文字「i」を font-size:0 で不可視化（横幅は確保しない）
  ・.logo-i-wrap 自体を適切な幅・高さのブロックとして扱う
  ・::before = 縦棒（小文字サイズ = 大文字の約65%、ベースラインから上）
  ・::after  = ドット（縦棒上端から隙間を空けてキャップライン付近に浮遊）
  ・vertical-align: baseline で周囲の文字とベースライン一致
*/
/*
  「i」のデザイン（ロゴ忠実再現）
  font-size:0 で「i」文字を消し、px 固定値で縦棒・ドットを描く。
  .logo-text の font-size = 1.15rem = 約18.4px を前提に計算。
    キャップハイト  ≒ 18.4 × 0.73 ≒ 13.4px
    小文字高さ(xH) ≒ 18.4 × 0.52 ≒  9.6px → 縦棒高さ 10px
    縦棒幅         ≒  1.2px（light weight）
    隙間           ≒  2px
    ドット径       ≒  3.2px
    ドット bottom  = 10 + 2 + 1.6 = 13.6px ≒ 14px
*/
.logo-i-wrap {
  display: inline-block;
  vertical-align: baseline;
  position: relative;
  /* 横幅：前後の文字との自然な間隔 */
  width: 7px;
  /* 縦方向の高さを確保（ドットが上にはみ出るので overflow:visible） */
  height: 0;
  overflow: visible;
  font-size: 0;             /* 「i」文字本体を非表示 */
}

/* 縦棒 */
.logo-i-wrap::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1.5px;
  height: 10px;
  background: var(--color-dark);
  border-radius: 1px;
}

/* ドット：縦棒上端(10px)＋隙間(2px)の位置 */
.logo-i-wrap::after {
  content: '';
  position: absolute;
  bottom: 14px;            /* 縦棒10px + 隙間2px + ドット半径1.6px ≒ 14 */
  left: 50%;
  transform: translateX(-50%);
  width: 3.2px;
  height: 3.2px;
  background: var(--color-light-gray);
  border-radius: 50%;
}

/* フッター内 */
.footer-logo .logo-i-wrap::before {
  background: #888;
}
.footer-logo .logo-i-wrap::after {
  background: #666;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;          /* タブ間隔を狭く */
  margin-left: auto;    /* 右寄せ */
}

.nav-links a {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;   /* 少し小さく */
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--color-mid);
  text-transform: uppercase;
  transition: color var(--transition);
  position: relative;
  white-space: nowrap;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-dark);
  transition: width var(--transition);
}

.nav-links a:hover { color: var(--color-dark); }
.nav-links a:hover::after { width: 100%; }

/* お問い合わせボタン — リセットしてシンプルに */
.nav-cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-dark) !important;
  padding: 0.42em 1.0em !important;
  border-radius: var(--radius-sm);
  line-height: 1.4 !important;
  white-space: nowrap !important;
  transition: background var(--transition), color var(--transition) !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover {
  background: var(--color-dark) !important;
  color: white !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--color-dark);
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--nav-height) var(--spacing-md) 80px;
  background: #ffffff;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}

/* コンテンツ全体 — 縦中央・テキストセンター */
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 860px;
}

/* ── ロゴSVGラッパー ── */
.hero-logo-wrap {
  width: min(540px, 80vw);
  margin-bottom: 3rem;
}

.hero-logo-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* 棒・球・影：デフォルトは見える状態（モバイル用） */
.hero-bar    { opacity: 1; }
.hero-ball-big   { opacity: 1; }
.hero-ball-small { opacity: 1; }
.hero-shadow     { opacity: 1; }

/* ── テキストブロック：デフォルトは見える状態 ── */
.hero-text-block {
  opacity: 1;
  transform: none;
}

/* PCのみ：アニメーション定義 */
@media (min-width: 769px) {
  .hero-logo-wrap {
    animation: heroLogoIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
  .hero-bar {
    opacity: 0;
    animation: barAppear 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
  }
  .hero-ball-big {
    opacity: 0;
    animation: ballPop 0.9s cubic-bezier(0.34, 1.45, 0.64, 1) 0.6s both;
  }
  .hero-ball-small {
    opacity: 0;
    animation: ballPop 0.8s cubic-bezier(0.34, 1.45, 0.64, 1) 0.9s both;
  }
  .hero-shadow {
    opacity: 0;
    animation: fadeIn 0.8s ease 0.9s both;
  }
  .hero-text-block {
    animation: heroTextIn 1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
  }
}

@keyframes heroLogoIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes barAppear {
  from { opacity: 0; transform: scaleX(0.5); transform-origin: left center; }
  to   { opacity: 1; transform: scaleX(1); }
}
@keyframes ballPop {
  from { opacity: 0; transform: scale(0.55); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes heroTextIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-since {
  font-family: 'Inter', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.32em;
  color: var(--color-light-gray);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero-title {
  margin-bottom: 1.4rem;
  line-height: 1.15;
}

/* 日本語タイトルを主役に */
.hero-title-ja {
  display: block;
  font-family: var(--font-jp);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--color-black);
  margin-bottom: 0.35rem;
}

.hero-title-en {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.75rem, 1.8vw, 0.92rem);
  font-weight: 300;
  letter-spacing: 0.45em;
  color: var(--color-light-gray);
}

.hero-tagline {
  font-family: var(--font-jp);
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 300;
  color: var(--color-mid);
  letter-spacing: 0.05em;
  line-height: 1.6;
  min-height: 1.6em; /* タイプライター打鍵前も高さを確保 */
}

#hero-typewriter {
  transition: color 1.2s ease;
}


/* タイピングカーソル */
.typewriter-cursor {
  display: inline-block;
  color: var(--color-light-gray);
  font-weight: 300;
  margin-left: 1px;
  /* animation は JS で直接セット */
}

@keyframes cursorBlinkFast {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes cursorBlinkSlow {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scroll-line {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, transparent, #c0392b);
  animation: scrollAnim 2s ease-in-out infinite;
}

@keyframes scrollAnim {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.6); opacity: 0.4; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.85em 2em;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  border: 1.5px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-dark);
  color: white;
  border-color: var(--color-dark);
}
.btn-primary:hover {
  background: transparent;
  color: var(--color-dark);
}

.btn-outline {
  background: transparent;
  color: var(--color-dark);
  border-color: var(--color-dark);
}
.btn-outline:hover {
  background: var(--color-dark);
  color: white;
}

.btn-large {
  font-size: 0.88rem;
  padding: 1em 2.8em;
  border-radius: 999px;
}

/* ============================================================
   STATEMENT
   ============================================================ */
.statement-section {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}

.statement-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  align-items: start;
}

.statement-heading h2 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.statement-lead {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--color-light-gray);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.statement-emphasis {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-black);
  padding-left: 1.2rem;
  border-left: 2px solid var(--color-dark);
  line-height: 1.6;
}

.statement-numbers {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--color-border);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: 120px;
}

.stat-num {
  font-family: 'Inter', sans-serif;
  font-size: 1.8rem;
  font-weight: 200;
  color: var(--color-border);
  line-height: 1;
  transition: color 0.25s ease;
}

/* スクロールで表示されたら通常色に */
.stat-num.stat-num-visible {
  color: var(--color-dark);
}

/* ホバーで数字だけ赤に */
.stat-item:hover .stat-num,
.stat-item.is-touched .stat-num {
  color: #c0392b;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-mid);
}

/* ============================================================
   APPROACH
   ============================================================ */
.approach-section {
  background: var(--color-bg-light);
}

.approach-header {
  margin-bottom: var(--spacing-lg);
}

.approach-body {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--spacing-lg);
  align-items: start;
}

.approach-text p {
  font-size: 1rem;
  color: var(--color-mid);
  line-height: 1.85;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1rem;
}
.approach-text p:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

/* Flow diagram */
.approach-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ── アクセントカラー: 起点のブルーグレー1色に統一 ── */
:root { --node-accent: #8fa8c8; }

.flow-node {
  width: 100%;
  background: white;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.4rem;
  position: relative;
  transition: box-shadow 0.25s ease, border-left-color 0.25s ease;
}

/* PCのみ: スクロールアニメーション初期状態 */
@media (min-width: 769px) {
  .flow-node {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.55s ease, transform 0.55s ease,
                box-shadow 0.25s ease, border-left-color 0.25s ease;
  }
}

/* スクロールで表示された状態 */
.flow-node.flow-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ホバー時のみ左ボーダーをブルーグレーで表示 */
.flow-node:hover,
.flow-node.is-touched {
  border-left-color: var(--node-accent);
  box-shadow: var(--shadow-hover);
}

.flow-label-en {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--color-light-gray);
  text-transform: uppercase;
  margin-bottom: 0.2rem;
  transition: color 0.25s ease;
}

/* ホバー時のみENラベルをアクセント色に */
.flow-node:hover .flow-label-en,
.flow-node.is-touched .flow-label-en {
  color: var(--node-accent);
}

.flow-label-ja {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-dark);
  margin-bottom: 0.4rem;
}

.flow-node p {
  font-size: 0.82rem;
  color: var(--color-mid);
  margin: 0;
  line-height: 1.5;
}

/* ── 矢印 ── */
.flow-arrow {
  width: 24px;
  height: 32px;
  flex-shrink: 0;
  color: #c4c9ce;
}

/* PCのみ: 矢印アニメーション */
@media (min-width: 769px) {
  .flow-arrow {
    opacity: 0;
    transition: opacity 0.4s ease;
  }
  .flow-node.flow-visible + .flow-arrow {
    opacity: 1;
  }
}

/* ============================================================
   SERVICES
   ============================================================ */
.services-section {
  background: var(--color-bg);
}

.services-header {
  margin-bottom: var(--spacing-lg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  background: white;
  position: relative; /* SVGオーバーレイの基準 */
}

.service-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

/* 時計回り罫線 SVG オーバーレイ */
.service-card-border-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: var(--radius-md);
  overflow: visible;
}

.service-card-border-svg rect {
  fill: none;
  stroke: #c0392b;
  stroke-width: 2;
  stroke-linecap: square;
  /* dasharray / dashoffset は JS で設定 */
}

.service-card:nth-child(4),
.service-card:nth-child(5) {
  /* Last 2 cards span more on 3-column grid */
}

.service-card-inner {
  padding: 2rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-num {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--color-border);
}

.service-title {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--color-black);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.service-title-en {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--color-light-gray);
  text-transform: uppercase;
}

.service-desc {
  font-size: 0.88rem;
  color: var(--color-mid);
  line-height: 1.75;
  flex: 1;
  margin: 0;
}

.service-points {
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.service-points li {
  font-size: 0.8rem;
  color: var(--color-mid);
  padding-left: 1rem;
  position: relative;
}

.service-points li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--color-border);
  font-size: 0.75rem;
}

@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   HOW WE WORK / FLOW
   ============================================================ */
.flow-section {
  background: var(--color-bg-dark);
  color: white;
}

.flow-section .section-label {
  color: #666;
}
.flow-section .section-label::after {
  background: #333;
}

.flow-header {
  margin-bottom: var(--spacing-lg);
}

.flow-header h2 {
  color: white;
}

.flow-header .section-subtitle {
  color: #cccccc;
}

.work-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.work-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
}

.step-number {
  font-family: 'Inter', sans-serif;
  line-height: 1;
  margin-bottom: 1.2rem;
  width: 64px;
  height: 64px;
  border: 1px solid #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: #888;
  position: relative; /* SVGオーバーレイの基準 */
}

/* 時計回り赤線 SVG オーバーレイ */
.step-number-svg {
  position: absolute;
  inset: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  pointer-events: none;
  overflow: visible;
}

.step-number-svg circle {
  fill: none;
  stroke: #c0392b;
  stroke-width: 1;        /* 細く繊細に */
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.step-content h3 {
  color: white;
  font-size: 1rem;
  margin-bottom: 0.7rem;
}

.step-content p {
  font-size: 0.85rem;
  color: #cccccc;
  line-height: 1.7;
  margin: 0;
}

.step-connector {
  flex: 0 0 auto;
  width: 40px;
  height: 1px;
  background: #333;
  align-self: 80px;
  margin-top: 32px;
}

/* ============================================================
   NEWS / TOPICS
   ============================================================ */
.news-section {
  background: #fff;
}
.news-loading {
  text-align: center;
  padding: 2rem 0;
  color: var(--color-mid);
  font-size: 0.9rem;
}
.news-empty {
  text-align: center;
  padding: 2rem 0;
  color: var(--color-mid);
  font-size: 0.9rem;
}
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid #e8e8e8;
}
.news-item {
  border-bottom: 1px solid #e8e8e8;
  transition: background 0.18s;
}
.news-item:hover {
  background: #f8f8f6;
}
.news-item a,
.news-item-inner {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  padding: 1.1rem 0.4rem;
  text-decoration: none;
  color: inherit;
  cursor: default;
}
.news-item a {
  cursor: pointer;
}
.news-date {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--color-mid);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}
.news-badge {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 0.18em 0.7em;
  border: 1px solid currentColor;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
  color: var(--color-dark);
}
.news-badge.badge-news    { color: #c0392b; border-color: #c0392b; }
.news-badge.badge-topics  { color: #2471a3; border-color: #2471a3; }
.news-badge.badge-press   { color: #1e8449; border-color: #1e8449; }
.news-badge.badge-info    { color: #7d6608; border-color: #7d6608; }
.news-title {
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--color-dark);
  flex: 1;
}
.news-item a:hover .news-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.news-arrow {
  font-size: 0.85rem;
  color: var(--color-mid);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.news-item a:hover .news-arrow {
  transform: translateX(4px);
}

@media (max-width: 600px) {
  .news-item a,
  .news-item-inner {
    flex-wrap: wrap;
    gap: 0.4rem 0.8rem;
  }
  .news-title {
    width: 100%;
    font-size: 0.9rem;
  }
}

/* ============================================================
   COMPANY
   ============================================================ */
.company-section {
  background: var(--color-bg-light);
}

.company-section h2 {
  margin-bottom: var(--spacing-md);
}

.company-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--spacing-lg);
  align-items: start;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
}

.company-table th,
.company-table td {
  padding: 1rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.company-table th {
  font-weight: 500;
  color: var(--color-dark);
  white-space: nowrap;
  width: 160px;
  background: rgba(0,0,0,0.02);
}

.company-table td {
  color: var(--color-mid);
}

.company-message blockquote {
  padding: 2rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

/* 時計回り罫線 SVG オーバーレイ */
.company-border-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.company-border-svg rect {
  fill: none;
  stroke: #8fa8c8;   /* ブルーグレー */
  stroke-width: 1.5;
  stroke-linecap: square;
}

.company-message blockquote::before {
  content: '"';
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  font-size: 4rem;
  color: var(--color-border);
  line-height: 1;
  font-family: Georgia, serif;
}

.company-message blockquote p:first-child {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-dark);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.company-message blockquote p:last-of-type {
  font-size: 0.88rem;
  color: var(--color-mid);
}

.company-message blockquote footer {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: var(--color-light-gray);
  letter-spacing: 0.1em;
  margin-top: 1.2rem;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-section {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}

.contact-inner {
  max-width: 720px;
}

.contact-inner h2 {
  margin-bottom: 0.8rem;
}

.contact-sub {
  font-size: 0.95rem;
  color: var(--color-mid);
  margin-bottom: var(--spacing-md);
}

.contact-form { margin-top: var(--spacing-md); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.form-group:last-of-type { margin-bottom: 0; }

.form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-dark);
  letter-spacing: 0.03em;
}

.required {
  color: #c0392b;
  font-size: 0.75rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85em 1em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--color-dark);
  background: white;
  transition: border-color var(--transition);
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-dark);
}

.form-group textarea { resize: vertical; min-height: 120px; }

/* プライバシーポリシー チェックボックス */
.form-privacy {
  margin-bottom: 0 !important;
}

.privacy-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

/* ネイティブのチェックボックスを視覚的に非表示（クリックは有効のまま） */
.privacy-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

/* カスタムチェックボックス */
.privacy-custom-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--color-border);
  border-radius: 3px;
  background: white;
  position: relative;
  transition: border-color var(--transition), background var(--transition);
}

/* チェック時のスタイル */
.privacy-label input[type="checkbox"]:checked + .privacy-custom-check {
  background: var(--color-dark);
  border-color: var(--color-dark);
}

/* チェックマーク（✓） */
.privacy-custom-check::after {
  content: '';
  position: absolute;
  display: none;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.privacy-label input[type="checkbox"]:checked + .privacy-custom-check::after {
  display: block;
}

/* フォーカス時のアウトライン */
.privacy-label input[type="checkbox"]:focus-visible + .privacy-custom-check {
  outline: 2px solid var(--color-dark);
  outline-offset: 2px;
}

.privacy-text {
  font-size: 0.85rem;
  color: var(--color-mid);
  line-height: 1.5;
}

.privacy-link {
  color: var(--color-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity var(--transition);
}
.privacy-link:hover {
  opacity: 0.6;
}

.form-submit {
  margin-top: 2rem;
}

.form-feedback {
  margin-top: 1rem;
  font-size: 0.88rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  display: none;
}

.form-feedback.success {
  display: block;
  background: #f0faf4;
  color: #1e7a47;
  border: 1px solid #a8d5b8;
}

.form-feedback.error {
  display: block;
  background: #fef2f0;
  color: #c0392b;
  border: 1px solid #f0afa5;
}

/* ============================================================
   SHITEN AX — ソリューションパッケージ 特設枠
   ============================================================ */
.ax-section {
  background: #ffffff;
  padding: var(--spacing-xl) 0;
  border-top: 1px solid var(--color-border);
}

/* 上部ラベル行 */
.ax-label-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.ax-label-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--color-light-gray);
  text-transform: uppercase;
  white-space: nowrap;
}
.ax-label-line {
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ── メインフレーム（クリッカブル大枠） ── */
.ax-frame {
  display: block;
  position: relative;
  background: #fafafa;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  /* ドットグリッド（濃いめ・くっきり） */
  background-image: radial-gradient(circle, #8c96a3 1.4px, transparent 1.4px);
  background-size: 20px 20px;
  transition: box-shadow 0.35s ease, border-color 0.35s ease, background-color 0.35s ease;
  cursor: pointer;
}
.ax-frame:hover {
  border-color: #c0392b;
  border-width: 1.5px;
  background-color: #f5f5f5;
  box-shadow: 0 12px 56px rgba(192,57,43,0.18), 0 4px 20px rgba(0,0,0,0.10);
}

/* ドットグリッドレイヤー（装飾） */
.ax-grid-bg { display: none; }

/* SVG罫線（時計回りアニメーション） */
.ax-border-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.ax-border-rect {
  fill: none;
  stroke: #c0392b;
  stroke-width: 1.5;
  stroke-linecap: square;
}

/* 四隅の装飾コーナー */
.ax-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  z-index: 2;
  transition: border-color 0.3s ease;
}
.ax-corner--tl { top: 12px;  left: 12px;  border-top: 1.5px solid #bdc5ce; border-left:  1.5px solid #bdc5ce; }
.ax-corner--tr { top: 12px;  right: 12px; border-top: 1.5px solid #bdc5ce; border-right: 1.5px solid #bdc5ce; }
.ax-corner--bl { bottom: 12px; left: 12px;  border-bottom: 1.5px solid #bdc5ce; border-left:  1.5px solid #bdc5ce; }
.ax-corner--br { bottom: 12px; right: 12px; border-bottom: 1.5px solid #bdc5ce; border-right: 1.5px solid #bdc5ce; }

.ax-frame:hover .ax-corner {
  border-color: #c0392b;
}

/* ── コンテンツ内部 ── */
.ax-content {
  position: relative;
  z-index: 1;
  padding: 3rem 3.5rem;
  /* コンテンツ背景：ドットを透かしつつ文字読みやすく */
  background: rgba(250,250,250,0.68);
  transition: background 0.35s ease;
}

/* 上段：バッジ + リンクボタン */
.ax-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.8rem;
}
.ax-badge {
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--color-light-gray);
  text-transform: uppercase;
}
.ax-arrow-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--color-mid);
  text-transform: uppercase;
  border: 1px solid var(--color-border);
  padding: 0.45em 1.1em;
  border-radius: 999px;
  transition: color 0.25s, border-color 0.25s, background 0.25s, transform 0.25s;
}
.ax-frame:hover .ax-arrow-icon {
  color: #c0392b;
  border-color: #c0392b;
  background: rgba(192,57,43,0.08);
  transform: translateX(2px);
}

/* 中段：メインコピー */
.ax-main {
  margin-bottom: 2.8rem;
}
.ax-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  font-weight: 200;
  letter-spacing: 0.2em;
  color: var(--color-black);
  line-height: 1;
  margin-bottom: 1.2rem;
}
.ax-catch {
  font-family: var(--font-jp);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 300;
  color: var(--color-mid);
  letter-spacing: 0.05em;
  line-height: 1.75;
  margin: 0;
  border-left: 2px solid #c0392b;
  padding-left: 1.2rem;
}

/* 区切り線 */
.ax-divider {
  width: 100%;
  height: 1px;
  background: var(--color-border);
  margin-bottom: 2.2rem;
}

/* 下段：3列フィーチャー */
.ax-features {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: start;
}
.ax-feature-sep {
  width: 1px;
  background: var(--color-border);
  align-self: stretch;
  margin: 0 2rem;
}
.ax-feature { padding: 0.2rem 0; }

.ax-feature-num {
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #c0392b;
  display: block;
  margin-bottom: 0.6rem;
}
.ax-feature-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-dark);
  margin-bottom: 0.45rem;
  line-height: 1.3;
}
.ax-feature-title span {
  display: block;
  font-size: 0.61rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--color-light-gray);
  margin-top: 0.2rem;
  text-transform: uppercase;
}
.ax-feature-desc {
  font-size: 0.81rem;
  color: var(--color-mid);
  line-height: 1.78;
  margin: 0;
}

/* レスポンシブ */
@media (max-width: 900px) {
  .ax-content { padding: 2.5rem 2rem; }
  .ax-features {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }
  .ax-feature-sep { display: none; }
}
@media (max-width: 768px) {
  .ax-content { padding: 2rem 1.4rem; }
  .ax-top-row { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .ax-title   { letter-spacing: 0.1em; }
}

/* ============================================================
   NOTE / BLOG
   ============================================================ */
.note-section {
  background: var(--color-bg-light);
  border-top: 1px solid var(--color-border);
}

.note-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: var(--spacing-lg);
}

.note-header h2 { margin: 0; }

.note-external-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--color-mid);
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 2px;
  transition: color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}
.note-external-link:hover {
  color: var(--color-dark);
  border-color: var(--color-dark);
}

/* カードグリッド */
.note-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  min-height: 200px;
}

/* 記事カード */
.note-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--transition), transform var(--transition);
}
.note-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

/* サムネイル */
.note-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--color-bg-light);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.note-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.note-card:hover .note-card-thumb img { transform: scale(1.04); }

/* note-card-cover（既存JS互換：cover_image_urlを使う場合）*/
.note-card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.note-card:hover .note-card-cover { transform: scale(1.04); }

.note-card-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f4f8 0%, #e8edf2 100%);
}

/* noteカード用SVGボーダー（サービスカードと同仕様） */
.note-card-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: var(--radius-md);
  overflow: visible;
}
.note-card-svg rect {
  fill: none;
  stroke: #c0392b;
  stroke-width: 1.5;
  stroke-linecap: square;
}

/* サムネイルなし時のプレースホルダー */
.note-card-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f0f4f8 0%, #e8edf2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.note-card-thumb-placeholder svg {
  opacity: 0.25;
}

/* カテゴリバッジ */
.note-card-category {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #8fa8c8;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  padding: 0.22em 0.65em;
  border-radius: 3px;
  text-transform: uppercase;
  border: 1px solid rgba(143,168,200,0.3);
}

/* カード本文 */
.note-card-body {
  padding: 1.4rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.note-card-date {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  color: var(--color-light-gray);
  letter-spacing: 0.08em;
}

.note-card-title {
  font-size: 0.97rem;
  font-weight: 500;
  color: var(--color-dark);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-card-summary {
  font-size: 0.82rem;
  color: var(--color-mid);
  line-height: 1.7;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.note-card-read {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--color-mid);
  text-transform: uppercase;
  margin-top: 0.4rem;
  transition: color var(--transition);
}
.note-card:hover .note-card-read { color: var(--color-dark); }

/* ローディング */
.note-loading {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
}
.note-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-dark);
  border-radius: 50%;
  animation: spinNote 0.8s linear infinite;
}
@keyframes spinNote { to { transform: rotate(360deg); } }

/* 空状態 */
.note-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-light-gray);
  font-size: 0.9rem;
  line-height: 1.8;
}

/* もっと見るフッター */
.note-footer {
  margin-top: 2.5rem;
  text-align: center;
}

/* レスポンシブ */
@media (max-width: 900px) {
  .note-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .note-header { flex-direction: column; align-items: flex-start; }
  .note-grid   { grid-template-columns: 1fr; }
}

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  background: var(--color-bg-dark);
  color: #888;
  padding: var(--spacing-lg) 0;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.footer-logo:hover {
  opacity: 0.7;
}

/* フッターロゴ：CSSテキストで確実に白グレー表示 */
.footer-logo-text {
  font-family: 'Inter', sans-serif;
  font-size: 1.38rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  color: #aaaaaa;
}

.footer-logo-i {
  display: inline-block;
  font-size: 0;
  width: 7px;
  position: relative;
  vertical-align: baseline;
}

/* 縦棒 */
.footer-logo-i::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1.5px;
  height: 12px;
  background: #aaaaaa;
  border-radius: 1px;
}

/* ドット */
.footer-logo-i::after {
  content: '';
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 3.5px;
  height: 3.5px;
  background: #888888;
  border-radius: 50%;
}

.footer-nav {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: #555;
  text-transform: uppercase;
  transition: color var(--transition);
}

.footer-nav a:hover { color: #aaa; }

.footer-copy {
  font-size: 0.75rem;
  color: #444;
  letter-spacing: 0.05em;
  margin: 0;
}

/* ============================================================
   ANIMATIONS / SCROLL REVEAL
   PC(769px以上)のみ opacity:0 から始めるアニメーションを適用
   モバイルはデフォルトで見える状態
   ============================================================ */
@media (min-width: 769px) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
  .reveal-delay-4 { transition-delay: 0.4s; }
}

/* ============================================================
   NOTE SECTION
   ============================================================ */
.note-section {
  background: var(--color-bg-light);
}

.note-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 2.8rem;
}

.note-header h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--color-black);
  margin-bottom: 0.3rem;
}

.note-header .section-subtitle {
  color: var(--color-light-gray);
  font-size: 0.88rem;
  margin-top: 0.5rem;
}

.note-external-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-mid);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.15rem;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.note-external-link:hover {
  color: #c0392b;
  border-color: #c0392b;
}

/* Grid */
.note-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  min-height: 200px;
  position: relative;
}

/* Loading spinner */
.note-loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

.note-spinner {
  display: block;
  width: 36px;
  height: 36px;
  border: 2px solid var(--color-border);
  border-top-color: #8fa8c8;
  border-radius: 50%;
  animation: noteSpin 0.8s linear infinite;
}

@keyframes noteSpin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.note-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-light-gray);
  font-size: 0.9rem;
  line-height: 1.8;
}

/* Article Card */
.note-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: box-shadow var(--transition), transform var(--transition);
}
.note-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

/* SVG border overlay */
.note-card-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: var(--radius-md);
  overflow: visible;
}
.note-card-svg rect {
  fill: none;
  stroke: #c0392b;
  stroke-width: 2;
  stroke-linecap: square;
}

/* Cover image */
.note-card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: var(--color-bg-light);
}

/* Cover placeholder */
.note-card-cover-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #f0f4f8 0%, #dce6f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.note-card-cover-placeholder svg {
  opacity: 0.28;
}

.note-card-body {
  padding: 1.4rem 1.4rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.note-card-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.note-card-category {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #8fa8c8;
  text-transform: uppercase;
}

.note-card-date {
  font-size: 0.72rem;
  color: var(--color-light-gray);
  font-family: 'Inter', sans-serif;
}

.note-card-title {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--color-black);
  letter-spacing: 0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-card-summary {
  font-size: 0.8rem;
  color: var(--color-mid);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-card-read {
  margin-top: auto;
  padding-top: 0.8rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--color-mid);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color var(--transition);
}
.note-card:hover .note-card-read {
  color: #c0392b;
}
.note-card-read svg {
  flex-shrink: 0;
  transition: transform var(--transition);
}
.note-card:hover .note-card-read svg {
  transform: translateX(3px);
}

/* Footer "もっと読む" button */
.note-footer {
  text-align: center;
  margin-top: 2.5rem;
}
.note-footer .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border: 1.5px solid var(--color-border);
  border-radius: 2px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--color-mid);
  text-decoration: none;
  background: transparent;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.note-footer .btn-outline:hover {
  border-color: #c0392b;
  color: #c0392b;
  background: rgba(192,57,43,0.04);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
.sp-br { display: none; }

@media (max-width: 1024px) {
  :root { --spacing-xl: 5rem; }
  .work-steps { flex-direction: column; align-items: stretch; gap: 1.5rem; }
  .step-connector { display: none; }
  .work-step { flex-direction: row; align-items: flex-start; text-align: left; gap: 1.2rem; }
  .step-number { flex-shrink: 0; margin-bottom: 0; }
}

@media (max-width: 768px) {
  :root {
    --spacing-xl: 4rem;
    --spacing-lg: 2.5rem;
    --spacing-md: 1.5rem;
    --nav-height: 64px;
  }

  .sp-br { display: inline; }

  /* Nav */
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    gap: 0;
    padding: 1rem 0 2rem;
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 0.9rem 2rem;
    font-size: 0.8rem;
  }
  .nav-cta { margin: 0.5rem 2rem 0 !important; display: block !important; text-align: center !important; }

  /* Hero */
  .hero-logo-wrap { width: min(88vw, 420px); margin-bottom: 2rem; }
  .hero-title-ja  { font-size: clamp(1.9rem, 6vw, 2.8rem); }
  .hero-tagline   {
    font-size: clamp(0.88rem, 4vw, 1.05rem);
    min-height: 1.6em;
  }

  /* Statement */
  .statement-layout { grid-template-columns: 1fr; gap: var(--spacing-md); }

  /* Approach */
  .approach-body { grid-template-columns: 1fr; }

  /* Services */
  .services-grid { grid-template-columns: 1fr; }

  /* Company */
  .company-layout { grid-template-columns: 1fr; }

  /* Form */
  .form-row { grid-template-columns: 1fr; }

  /* Statement numbers */
  .statement-numbers { gap: 1rem; }

  /* Note */
  .note-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .note-header { flex-direction: column; align-items: flex-start; }
  .note-external-link { margin-top: 0.3rem; }
}

@media (max-width: 480px) {
  .hero-tagline { font-size: 1rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 200px; }
  .company-table th { width: 100px; font-size: 0.82rem; }
  .company-table td { font-size: 0.82rem; }
}
