/* ============================================================
   BELLA TECH — Components (Stripe / Apple 風 清潔モダン)
   ボタン / カード / タグ / セクションヘッダー / コンテナの規格
   tokens.css の変数に依存
   ============================================================ */

/* === Site-wide ambient background ============================
   背景色の上、コンテンツの下に固定で敷くグリッド + 微細ノイズ。
   全ページ共通でうっすら効かせる。
   body に z-index:0 でスタッキングコンテキストを確立し、
   ::before/::after を z-index:-1 で body の bg と children の間に挟む。 */
html { background: var(--bg); }

body {
  position: relative;
  z-index: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(196,163,90,0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(196,163,90,0.045) 1px, transparent 1px);
  background-size: 72px 72px, 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.85), rgba(0,0,0,0.35) 70%, rgba(0,0,0,0.15));
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.85), rgba(0,0,0,0.35) 70%, rgba(0,0,0,0.15));
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.025;
  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.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.theme-dark body::before {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
}

.theme-dark body::after { opacity: 0.04; }

@media (max-width: 600px) {
  body::before { background-size: 48px 48px, 48px 48px; opacity: 0.7; }
}

/* === 日本語タイトル改行最適化（全ページ共通）=================== */
/* 見出し類: 中途半端な改行禁止 (overflow-wrap: anywhere は使わない) */
.section-title,
.card-title,
.page-hero-title,
.blog-hero-title,
.hero-title,
.sec-heading,
.dx-banner-title,
.svc-hero-title,
.flow-step-title {
  word-break: auto-phrase;
  text-wrap: balance;
}

/* 本文・リード系: 折り返し許容 */
.section-lead,
.section-note,
.card-desc,
.page-hero-lead,
.hero-tagline,
.dx-banner-text,
.svc-hero-sub,
.contact-desc,
.flow-step-desc {
  word-break: auto-phrase;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

/* === Container ================================================= */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--sp-gutter);
  padding-right: var(--sp-gutter);
}
.container-narrow {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding-left: var(--sp-gutter);
  padding-right: var(--sp-gutter);
}

/* === Section ================================================== */
.section {
  padding-top: var(--sp-section-y);
  padding-bottom: var(--sp-section-y);
}
.section-panel {
  background: var(--bg-panel);
}
.section-eyebrow {
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 14px;
  display: inline-block;
}
.theme-dark .section-eyebrow { color: var(--text-muted); }

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  color: var(--text);
  font-weight: 500;
  margin: 0 0 20px;
}
.section-lead {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-muted);
  max-width: 58ch;
  margin: 0 0 48px;
}
.section-note {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--text-muted);
  max-width: 58ch;
  margin: 40px 0 0;
}

/* === Buttons ================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  font-weight: 600;
  letter-spacing: var(--ls-ui);
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Primary: ダーク半透明＋ゴールド枠＋光帯シマー（CODEX再現） */
.btn-primary {
  --button-glow: rgba(212, 165, 116, 0.48);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 14px 30px;
  border: 1px solid rgba(212, 165, 116, 0.5);
  background:
    linear-gradient(135deg, rgba(212, 165, 116, 0.22), rgba(255, 255, 255, 0.04)),
    rgba(13, 11, 9, 0.78);
  color: #f5f2ed;
  letter-spacing: 0.12em;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 16px 40px rgba(13, 11, 9, 0.24);
}
.btn-primary::before {
  content: "";
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: -45%;
  width: 38%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
  transition: left 620ms var(--ease-out);
  pointer-events: none;
  z-index: 1;
}
.btn-primary > * {
  position: relative;
  z-index: 2;
}
.btn-primary:hover {
  border-color: rgba(212, 165, 116, 0.88);
  background:
    linear-gradient(135deg, rgba(212, 165, 116, 0.32), rgba(255, 255, 255, 0.06)),
    rgba(13, 11, 9, 0.86);
  color: #f5f2ed;
  box-shadow:
    0 0 38px var(--button-glow),
    0 22px 60px rgba(13, 11, 9, 0.34);
  transform: translateY(-2px);
}
.btn-primary:hover::before { left: 115%; }
.theme-dark .btn-primary:hover {
  box-shadow:
    0 0 42px rgba(212, 165, 116, 0.6),
    0 22px 60px rgba(0, 0, 0, 0.5);
}
@media (prefers-reduced-motion: reduce) {
  .btn-primary::before { display: none; }
  .btn-primary:hover { transform: none; }
}

/* Secondary: モノトーンボーダー */
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--bg-panel);
  border-color: var(--text);
}
.theme-dark .btn-secondary {
  color: var(--text);
  border-color: var(--border-strong);
}
.theme-dark .btn-secondary:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--text);
}

/* Ghost: 文字のみ */
.btn-ghost {
  background: transparent;
  color: var(--text);
  padding: 10px 0;
  border-radius: 0;
}
.btn-ghost:hover {
  color: var(--text);
  opacity: 0.7;
}
.theme-dark .btn-ghost:hover {
  color: var(--text);
  opacity: 0.7;
}

.btn .btn-arrow {
  transition: transform var(--dur-fast) var(--ease-out);
}
.btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* === Card ===================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-card-pad);
  transition: border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card-link {
  color: inherit;
  text-decoration: none;
  display: block;
}
.card-eyebrow {
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 14px;
}
.card-icon {
  width: 40px;
  height: 40px;
  color: var(--text);
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.card-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card-title {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  line-height: var(--lh-heading);
  color: var(--text);
  margin: 0 0 12px;
  font-weight: 500;
}
.card-summary {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* News timeline (index.html お知らせ) */
.news-frame {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 48px 44px;
  background: #fff;
  border: 1px solid rgba(184, 150, 62, 0.45);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(184, 150, 62, 0.08), 0 4px 16px rgba(13, 11, 9, 0.04);
}
.news-bellabot {
  position: absolute;
  top: -108px;
  right: 24px;
  width: 100px;
  height: 130px;
  background-image: url('../images/bellabot-sit.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom center;
  animation: cta-bellabot-bob 3.2s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(184, 150, 62, 0.15));
}
.news-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.news-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  column-gap: 32px;
  padding: 22px 0 22px 28px;
  position: relative;
  align-items: baseline;
}
.news-item:not(:last-child) {
  border-bottom: 1px dashed rgba(184, 150, 62, 0.3);
}
.news-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 32px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px rgba(184, 150, 62, 0.25);
}
.news-date {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--accent);
  white-space: nowrap;
  line-height: 1.3;
}
.news-text {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
  margin: 0;
  font-weight: 500;
}
.news-empty {
  text-align: center;
  color: var(--text);
  font-size: 16px;
  padding: 40px 0 24px;
  margin: 0;
}
@media (max-width: 640px) {
  .news-frame {
    padding: 48px 22px 32px;
    border-radius: 14px;
  }
  .news-bellabot {
    width: 76px;
    height: 100px;
    top: -82px;
    right: 14px;
  }
  .news-item {
    grid-template-columns: 1fr;
    row-gap: 4px;
    padding: 20px 0 20px 22px;
  }
  .news-item::before {
    top: 28px;
    width: 9px;
    height: 9px;
  }
  .news-date {
    font-size: 22px;
  }
  .news-text {
    font-size: 15px;
    line-height: 1.8;
  }
}
.card-desc {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-muted);
  margin: 0 0 18px;
}

/* Card Tier Block (services.html 月額プラン) */
.tier-block {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-strong);
}
.tier-block-label {
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 14px;
  display: inline-block;
}
.tier-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.tier {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name price"
    "includes includes";
  gap: 6px 16px;
  align-items: baseline;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  transition: border-color var(--dur-fast) var(--ease-out);
}
.tier:hover { border-color: var(--accent); }
.tier-name {
  grid-area: name;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.tier-price {
  grid-area: price;
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  letter-spacing: var(--ls-ui);
  color: var(--accent-dark);
  font-weight: 600;
  white-space: nowrap;
}
.tier-includes {
  grid-area: includes;
  font-size: var(--fs-small);
  color: var(--text-muted);
  line-height: 1.5;
}
.tier-featured {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.tier-featured .tier-name { color: var(--accent-dark); }
@media (max-width: 600px) {
  .tier {
    grid-template-columns: 1fr;
    grid-template-areas:
      "name"
      "price"
      "includes";
    gap: 4px;
  }
}

/* Service Card Head (services-* 詳細ページのカード視覚ヘッダー) */
.svc-card-head {
  margin: calc(var(--sp-card-pad) * -1) calc(var(--sp-card-pad) * -1) var(--sp-card-pad);
  padding: 28px 28px 22px;
  min-height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  background: #e8ded0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  position: relative;
  overflow: hidden;
}
.svc-card-head::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 88px;
  height: 88px;
  background: #1a1714;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
  z-index: 1;
}
.svc-card-head-num {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 58px);
  font-weight: 500;
  line-height: 1;
  color: rgba(13,11,9,0.62);
  letter-spacing: -0.02em;
  position: relative;
  z-index: 2;
}
.svc-card-head-icon {
  width: 38px;
  height: 38px;
  color: rgba(13,11,9,0.72);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.svc-card-head-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.svc-card-head[data-tone="warm"]  { background: #ede2cc; }
.svc-card-head[data-tone="sage"]  { background: #d8dcc4; }
.svc-card-head[data-tone="blush"] { background: #e6d5cc; }
.svc-card-head[data-tone="cream"] { background: #f0e6d4; }
.svc-card-head[data-tone="dusk"]  { background: #d8d0c8; }
.svc-card-head[data-tone="sand"]  { background: #e8ded0; }
.svc-card-head::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  background-image: url('../logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 2;
}

/* Flow Timeline (services-* の導入の流れ図解) */
.flow-timeline {
  list-style: none;
  padding: 0;
  margin: 48px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  position: relative;
}
.flow-timeline::before {
  content: "";
  position: absolute;
  top: 50px;
  left: calc((100% / 8));
  right: calc((100% / 8));
  height: 0;
  border-top: 2px dashed var(--border-strong);
  z-index: 0;
}
.flow-step {
  position: relative;
  text-align: center;
  z-index: 1;
}
.flow-step-tag {
  display: block;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}
.flow-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--text);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 22px;
  position: relative;
  z-index: 2;
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.flow-step:hover .flow-step-num {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.flow-step-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--text);
  line-height: 1.4;
}
.flow-step-desc {
  font-size: var(--fs-small);
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
  max-width: 22ch;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 768px) {
  .flow-timeline {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-top: 32px;
  }
  .flow-timeline::before {
    top: 36px;
    bottom: 36px;
    left: 36px;
    right: auto;
    width: 0;
    height: auto;
    border-top: 0;
    border-left: 2px dashed var(--border-strong);
  }
  .flow-step {
    text-align: left;
    padding-left: 96px;
    min-height: 72px;
  }
  .flow-step-num {
    position: absolute;
    left: 0;
    top: 0;
    margin-bottom: 0;
    width: 64px;
    height: 64px;
    font-size: 20px;
  }
  .flow-step-tag {
    margin-top: 4px;
  }
  .flow-step-desc {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
}

/* Card Thumb (ブログ用カラー帯サムネ) */
.card-thumb {
  margin: calc(var(--sp-card-pad) * -1) calc(var(--sp-card-pad) * -1) var(--sp-card-pad);
  padding: 28px 28px 24px;
  min-height: 130px;
  display: flex;
  align-items: flex-end;
  background: #e8ded0;
  color: rgba(13,11,9,0.5);
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
  position: relative;
}
.card-thumb::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 72px;
  height: 72px;
  background: #1a1714;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
  z-index: 1;
}
.card-thumb::before {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  background-image: url('../logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 2;
}
.card-link:hover .card-thumb { filter: brightness(0.97); }
.card-thumb[data-category="AI活用"] { background: #e7dec3; }
.card-thumb[data-category="ストーリー"] { background: #dcd3e0; }
.card-thumb[data-category="開発記録"] { background: #cddfd7; }
.card-thumb[data-category="実績・改善事例"] { background: #d8dcc4; }
.card-thumb[data-category="学び"] { background: #e1d4c2; }

/* Blog Card Read装飾 (card-title 下にゴールド線＋Read →) */
.card-link[data-category] .card-title {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.55;
}
.card-link[data-category] .card-eyebrow {
  margin-bottom: 12px;
}
.card-link[data-category] .card-title::after {
  content: "";
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent);
  margin-top: 14px;
}
.card-link[data-category]::after {
  content: "Read →";
  display: block;
  margin-top: 14px;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent-dark);
  text-transform: uppercase;
  font-weight: 600;
}

/* Service Overview List (services.html 概要カードを縦に並べる横長レイアウト) */
.svc-overview-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 920px;
  margin: 0 auto;
}
.svc-overview {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px 36px;
  align-items: start;
  padding: 36px 44px 36px 44px;
}
.svc-overview .card-icon {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
  margin: 0;
  width: 48px;
  height: 48px;
}
.svc-overview .card-eyebrow {
  grid-column: 2;
  grid-row: 1;
  margin: 0 0 4px;
}
.svc-overview .card-title {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.4;
}
.svc-overview .card-desc {
  grid-column: 2;
  grid-row: 3;
  margin: 8px 0 0;
}
.svc-overview .card-cta {
  grid-column: 3;
  grid-row: 3;
  margin: 0 !important;
  align-self: end;
  white-space: nowrap;
  flex-shrink: 0;
  padding-right: 60px;
  padding-bottom: 4px;
}
.svc-overview::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: #1a1714;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
  z-index: 1;
  pointer-events: none;
}
.svc-overview::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  background-image: url('../logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 2;
  pointer-events: none;
}
@media (max-width: 768px) {
  .svc-overview {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 28px 28px 28px 28px;
  }
  .svc-overview .card-icon { grid-column: 1; grid-row: 1; align-self: start; }
  .svc-overview .card-eyebrow { grid-column: 1; grid-row: 2; margin: 14px 0 4px; }
  .svc-overview .card-title { grid-column: 1; grid-row: 3; }
  .svc-overview .card-desc { grid-column: 1; grid-row: 4; }
  .svc-overview .card-cta { grid-column: 1; grid-row: 5; align-self: start; padding-right: 0; margin-top: 14px !important; }
}

/* === Tag / Chip =============================================== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-panel);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  letter-spacing: var(--ls-ui);
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  line-height: 1;
  border: 1px solid var(--border);
}
.tag-accent {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-color: transparent;
}
.theme-dark .tag {
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  border-color: rgba(255,255,255,0.08);
}

/* Chip (クリック可能なフィルタ用) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  letter-spacing: var(--ls-ui);
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  line-height: 1;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.chip:hover {
  border-color: var(--accent);
  color: var(--text);
}
.chip.is-active {
  background: var(--text);
  color: var(--text-inverse);
  border-color: var(--text);
}

/* === Prose (ブログ本文・プライバシー本文用) ==================== */
.prose {
  max-width: 68ch;
  margin: 0 auto;
  color: var(--text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}
.prose h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  margin: 64px 0 20px;
  font-weight: 500;
  padding-left: 20px;
  border-left: 2px solid var(--text);
}
.prose h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-heading);
  margin: 40px 0 16px;
  font-weight: 600;
}
.prose p { margin: 0 0 24px; }
.prose a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur-fast);
}
.prose a:hover {
  text-decoration-color: var(--text);
}
.prose ul, .prose ol {
  margin: 0 0 24px;
  padding-left: 24px;
}
.prose li { margin-bottom: 8px; }
.prose img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 32px 0;
}

/* Callout */
.callout {
  background: var(--bg-panel);
  border-left: 2px solid var(--text);
  padding: 20px 24px;
  border-radius: var(--radius-sm);
  margin: 32px 0;
  color: var(--text);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

/* === Grid utility ============================================ */
.grid {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

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

/* === Divider ================================================= */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--sp-block-y) 0;
  border: 0;
}

/* === Stack (縦並びの余白ユーティリティ) ===================== */
.stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 24px; }

/* === Page Hero (サブページ共通のヒーロー) ==================== */
.page-hero {
  padding: clamp(120px, 14vw, 180px) 0 clamp(40px, 5vw, 72px);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.page-hero-ghost {
  position: absolute;
  bottom: -10%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-ui);
  font-weight: 200;
  font-size: 28vw;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(196,163,90,0.11);
  letter-spacing: 0.02em;
  line-height: 0.85;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 0;
}
.page-hero .container,
.page-hero .container-narrow {
  position: relative;
  z-index: 1;
}
@media (max-width: 768px) {
  .page-hero-ghost { font-size: 42vw; bottom: -6%; }
}
.page-hero-title {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-heading);
  color: var(--text);
  margin: 0 0 24px;
  font-weight: 500;
}
.page-hero-title em {
  color: var(--accent-dark);
  font-style: italic;
  font-weight: 600;
}
.page-hero-lead {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-muted);
  max-width: 58ch;
  margin: 0;
}

/* === Page Hero Divider (◆ ゴールド装飾線) =================== */
.page-hero-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 28px 0 0;
  position: relative;
  z-index: 1;
}
.page-hero-divider-line {
  width: 60px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}
.page-hero-divider-dot {
  color: var(--accent);
  font-size: 6px;
  line-height: 1;
  flex-shrink: 0;
}
.blog-hero .page-hero-divider {
  justify-content: center;
  margin: 24px auto 0;
}

/* === Page Hero Illust slot (画像差し込み用、現状は空) =========== */
.page-hero-illust {
  position: absolute;
  bottom: 0;
  right: 5%;
  width: clamp(120px, 18vw, 240px);
  aspect-ratio: 1;
  z-index: 0;
  pointer-events: none;
}
.page-hero-illust > img,
.page-hero-illust > picture,
.page-hero-illust > picture > img,
.page-hero-illust > svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
@media (max-width: 768px) {
  .page-hero-illust { width: 90px; right: 6%; bottom: 4px; }
}

/* === Button row (ボタン横並び) =============================== */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.btn-row-center { justify-content: center; }

/* === Section Inverse (暗反転セクション) ====================== */
.section-inverse {
  background: #0d0b09;
  color: #f0ebe3;
}
.section-inverse .section-eyebrow { color: #8a847a; }
.section-inverse .section-title { color: #f0ebe3; }
.section-inverse .section-lead { color: #8a847a; }
.section-inverse .card {
  background: #1a1714;
  border-color: #262220;
}
.section-inverse .card:hover {
  border-color: #3a3530;
  box-shadow: 0 16px 48px rgba(0,0,0,0.35);
}
.section-inverse .card-eyebrow { color: #8a847a; }
.section-inverse .card-title { color: #f0ebe3; }
.section-inverse .card-desc { color: #8a847a; }
.section-inverse .card-icon { color: var(--accent); }
.section-inverse .plain-list li { color: #f0ebe3; }
.section-inverse .plain-list li::before { background: #8a847a; }

/* === Section CTA (ページ末尾のCTAブロック) =================== */
.section-cta {
  background: var(--bg-panel);
  text-align: center;
}
.section-cta .section-lead {
  margin-left: auto;
  margin-right: auto;
}

/* === Plain list (アイコン無しのリスト、スキル等) ============= */
.plain-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.plain-list li {
  font-size: var(--fs-body);
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
  color: var(--text);
}
.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 1px;
  background: var(--text-muted);
}

/* === Quote / Testimonial (お客様の声用、Phase D で使う) ======= */
.quote {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 30px);
  line-height: 1.4;
  color: var(--text);
  font-weight: 400;
  margin: 0 0 24px;
  position: relative;
  padding-left: 24px;
  border-left: 2px solid var(--text);
}

/* === Nav CTA (CODEX再現: ダーク半透明＋ゴールド枠) ============ */
.nav-cta {
  --button-glow: rgba(212, 165, 116, 0.48);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  border: 1px solid rgba(212, 165, 116, 0.5);
  border-radius: var(--radius-full);
  background:
    linear-gradient(135deg, rgba(212, 165, 116, 0.22), rgba(255, 255, 255, 0.04)),
    rgba(13, 11, 9, 0.78);
  color: #f5f2ed !important;
  font-family: var(--font-ui);
  font-weight: 600 !important;
  letter-spacing: 1.8px !important;
  font-size: 12px !important;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 10px 26px rgba(13, 11, 9, 0.22);
  transition: border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}
.nav-cta::before {
  content: "";
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: -45%;
  width: 38%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
  transition: left 620ms var(--ease-out);
  pointer-events: none;
  z-index: 1;
}
.nav-cta > *,
.nav-cta {
  z-index: auto;
}
.nav-cta:hover {
  border-color: rgba(212, 165, 116, 0.88);
  background:
    linear-gradient(135deg, rgba(212, 165, 116, 0.32), rgba(255, 255, 255, 0.06)),
    rgba(13, 11, 9, 0.86);
  color: #f5f2ed !important;
  transform: translateY(-2px);
  box-shadow:
    0 0 32px var(--button-glow),
    0 14px 36px rgba(13, 11, 9, 0.3);
}
.nav-cta:hover::before { left: 115%; }
@media (prefers-reduced-motion: reduce) {
  .nav-cta::before { display: none; }
  .nav-cta:hover { transform: none; }
}
/* underline 装飾を無効化（他の nav a と違い塗りボタン） */
.nav-links .nav-cta::after,
.nav-cta::after {
  display: none !important;
  content: none !important;
}
/* Mobile menu 内 — 塗りボタンだがサイズはモバイル大きめ */
#mobileMenu .menu-links .nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 14px 32px !important;
  font-size: 16px !important;
  letter-spacing: 4px !important;
  border: none !important;
  border-radius: var(--radius-full);
  transform: none !important;
}
#mobileMenu .menu-links .nav-cta::before { display: none !important; }
#mobileMenu .menu-links .nav-cta:hover,
#mobileMenu .menu-links .nav-cta:active {
  background: var(--accent-hover);
  color: #fff !important;
  letter-spacing: 4px !important;
  transform: translateX(6px) !important;
}

/* === FAQ Accordion (<details> / <summary>) =================== */
.faq-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 28px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-sans);
  font-size: var(--fs-h4);
  font-weight: 500;
  line-height: 1.5;
  color: var(--text);
  transition: color var(--dur-fast) var(--ease-out);
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary:hover { color: var(--text-muted); }
.faq-item > summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform var(--dur-base) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}
.faq-item[open] > summary::after {
  transform: rotate(45deg);
  color: var(--text);
}
.faq-item[open] > summary { color: var(--text); }
.faq-answer {
  padding: 0 0 28px 0;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-muted);
  max-width: 68ch;
}
.faq-answer a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}
.faq-answer a:hover { text-decoration-color: var(--text); }

/* === CTA Bellabot (btn-row の直後に置いてボタンを下から支える) === */
.cta-bellabot-after {
  display: flex;
  justify-content: center;
  margin-top: -22px;
  pointer-events: none;
}
.cta-bellabot {
  width: 100px;
  height: 125px;
  background-image: url('../images/bellabot-mini.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: top center;
  flex-shrink: 0;
  pointer-events: none;
  animation: cta-bellabot-bob 3.2s ease-in-out infinite;
}
@keyframes cta-bellabot-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
@media (max-width: 600px) {
  .cta-bellabot-after { margin-top: -18px; }
  .cta-bellabot { width: 84px; height: 105px; }
}

/* .btn-glow は .btn-primary 本体に統合されたため撤去。 */
