/* ===== GorillAId Common Site Styles ===== */
/* Used by /, /web/, /ai-ops/, /about/, /contact/  */
/* /chatbot/ overrides via .chatbot-page on <body> */

/* ===== Design Tokens ===== */
:root {
  --c-bg: #FAF7F2;          /* 生成り (body & 主セクション) */
  --c-bg-soft: #FFFDF8;     /* 和紙 (暖かい白・交互セクション用) */
  --c-bg-deep: #F3EEE5;     /* 濃い生成り (chatbotアクセント) */
  --c-text: #2A2826;
  --c-muted: #6B6764;
  --c-accent-primary: #C8322A;
  --c-accent-strong: #B8935A;
  --c-divider: rgba(184,147,90,0.35);
  --c-line: #D9D3C7;       /* 装飾横線 (section-title 等) */
  --c-text-dark: #1A1814;  /* 墨（index.html --text と同値） */
  --f-mincho: 'Zen Old Mincho', 'Noto Serif JP', 'Hiragino Mincho ProN', serif;
  --f-cormorant: 'Cormorant Garamond', Georgia, serif;
  --f-sans: -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --easing: cubic-bezier(0.16, 1, 0.3, 1);
  --section-padding: 110px;
}

/* ===== Reset ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-sans);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ===== 日本語テキストの孤立文字防止 ===== */
/* line-break: strict で日本語禁則処理を強化 (句読点が行頭に来ない等) */
/* h3〜h6 (カード見出し系) は text-wrap: balance で行幅均等化 (1文字ぶら下がり対策) */
/* h1/h2 は <br> による意図的な改行を持つことが多いため balance は使わず、pretty で末尾調整のみ */
/* word-break: keep-all は使わない (句読点が単独行に押し出される副作用が出るため) */
h1, h2 {
  text-wrap: pretty;
  line-break: strict;
}
h3, h4, h5, h6 {
  text-wrap: balance;
  line-break: strict;
}
p, li, dt, dd, figcaption, blockquote, .lead, .subtitle {
  text-wrap: pretty;
  line-break: strict;
}

/* ===== Skip Link ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--c-text-dark);
  color: #fff;
  padding: 12px 24px;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ===== Global Navigation ===== */
.site-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 0 40px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(250, 247, 242, 0.88);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid rgba(232, 230, 225, 0.6);
  transition: all 0.4s var(--easing);
}

.site-nav.scrolled {
  box-shadow: 0 4px 24px rgba(28, 25, 23, 0.06);
  height: 60px;
}

/* Logo */
.site-nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-nav__logo img {
  height: 34px;
  width: auto;
  transition: transform 0.3s;
}

.site-nav__logo:hover img {
  transform: scale(1.04);
}

/* Menu links */
.site-nav__menu {
  display: flex;
  gap: 24px;
  list-style: none;
}

.site-nav__menu a {
  color: var(--c-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.25s;
  position: relative;
}

.site-nav__menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--c-accent-primary);
  border-radius: 1px;
  transition: width 0.3s var(--easing);
}

.site-nav__menu a:hover {
  color: var(--c-text);
}

.site-nav__menu a:hover::after {
  width: 100%;
}

.site-nav__menu a[aria-current="page"] {
  color: var(--c-accent-primary);
  font-weight: 700;
}

/* CTA button */
.site-nav__cta {
  background: var(--c-accent-primary);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s var(--easing);
  white-space: nowrap;
  box-shadow: 0 6px 24px rgba(184, 147, 90, 0.28);
}

.site-nav__cta:hover {
  transform: translate(3px, -3px);
  box-shadow:
    0 14px 40px rgba(200, 50, 42, 0.45),
    0 0 0 4px rgba(200, 50, 42, 0.12);
}

.site-nav__cta:active {
  transform: translate(1px, 1px);
  box-shadow: 0 4px 12px rgba(200, 50, 42, 0.30);
  transition-duration: 0.1s;
}

/* ===== Hamburger ===== */
.hamburger {
  display: none;
  cursor: pointer;
  padding: 12px;
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  align-items: center;
  justify-content: center;
  color: var(--c-text);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== Mobile Menu ===== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  width: 100%;
  background: rgba(250, 250, 248, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(217, 211, 199, 1);
  padding: 28px 40px;
  flex-direction: column;
  gap: 20px;
  z-index: 99;
  box-shadow: 0 12px 40px rgba(26,24,20,0.08), 0 4px 12px rgba(26,24,20,0.04);
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  color: var(--c-text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
}

/* ===== Site Footer ===== */
.site-footer {
  background: var(--c-text);
  color: rgba(255, 255, 255, 0.85);
  padding: 56px 24px 28px;
}

.site-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(3, 1fr);
  gap: 40px 32px;
  align-items: start;
}

.site-footer h4 {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.site-footer__col {
  display: block;
}

.site-footer__col--logo {
  display: flex;
  align-items: flex-start;
}

.site-footer__logo-link {
  display: inline-block;
  background: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  line-height: 0;
}

.site-footer__logo {
  height: 56px;
  width: auto;
  display: block;
}

.site-footer__copy {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.03em;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 12px 0 0;
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  text-align: left;
}

.site-footer__links a:hover {
  color: #fff;
}

/* ===== Fade-in / Stagger Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--easing),
              transform 0.7s var(--easing);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in.stagger-1 { transition-delay: 0.05s; }
.fade-in.stagger-2 { transition-delay: 0.1s; }
.fade-in.stagger-3 { transition-delay: 0.15s; }
.fade-in.stagger-4 { transition-delay: 0.2s; }
.fade-in.stagger-5 { transition-delay: 0.25s; }
.fade-in.stagger-6 { transition-delay: 0.3s; }
.fade-in.stagger-7 { transition-delay: 0.35s; }

/* =====================================================================
 * Section Components (5/13-14 段階B 共通化 — chatbot寄せ + テーマ連動)
 * ---------------------------------------------------------------------
 * 方針: chatbotの装飾豪華なtypographyを共通基準にする
 *   - フォント: --f-cormorant / --f-mincho (site.css命名)
 *   - 色: var(--c-accent-primary) (chatbotは朱、他ページは金茶)
 *   - display(left/center) はページ固有差分として温存
 *   - 統合後はchatbot/index/web の `<style>` 該当ブロックを削除
 * ===================================================================== */

.section-label {
  display: block;
  text-align: center;
  font-family: var(--f-cormorant);
  font-size: 14px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.3em;
  color: var(--c-accent-primary);
  margin-bottom: 14px;
  text-transform: none;
}
.section-label::before { content: '— '; }
.section-label::after  { content: ' —'; }

.section-title {
  display: inline-block;
  position: relative;
  font-family: var(--f-mincho);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.08em;
  color: var(--c-text-dark);
  margin-bottom: 16px;
  padding: 0 4px;
}
.section-title::before,
.section-title::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 48px;
  height: 1px;
  background: var(--c-line);
}
.section-title::before { left: -72px; }
.section-title::after  { right: -72px; }

@media (max-width: 640px) {
  .section-title::before,
  .section-title::after { display: none; }
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-desc {
  font-size: 15px;
  color: var(--c-muted);
  max-width: 540px;
  line-height: 1.9;
}
.section-header .section-desc {
  margin: 0 auto;
}
.ai-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-cormorant);
  font-size: 13px;
  color: var(--c-muted);
  letter-spacing: 0.15em;
  margin-top: 24px;
  padding: 8px 16px;
  border: 1px solid var(--c-line);
  background: rgba(255,253,248,0.7);
  border-radius: 999px;
  animation: fadeUp 0.8s var(--easing) 0.6s both;
}
.ai-status .dot-pulse {
  width: 8px; height: 8px;
  background: #2ea043;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.ai-status .dot-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1.5px solid #2ea043;
  border-radius: 50%;
  animation: pulse-ring 2s ease-out infinite;
}
.ai-status code {
  font-family: 'SF Mono','Menlo',monospace;
  color: var(--c-accent-primary);
  font-size: 11px;
  letter-spacing: 0.05em;
}
@media (prefers-reduced-motion: reduce) {
  .ai-status .dot-pulse::after { display: none; }
}
.trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: 720px;
  margin: 56px auto 0;
  padding: 28px 0;
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  animation: fadeUp 0.8s var(--easing) 0.5s both;
}
.trust-item {
  text-align: center;
  color: var(--c-muted);
  font-family: var(--f-mincho);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.2em;
  border-right: 1px solid var(--c-line);
  padding: 0 12px;
}
.trust-item:last-child { border-right: none; }
.trust-item strong {
  display: block;
  font-family: var(--f-cormorant);
  font-size: 36px;
  font-weight: 600;
  color: var(--c-accent-primary);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 8px;
}
@media (max-width: 640px) {
  .trust-bar { grid-template-columns: repeat(2, 1fr); gap: 0; padding: 16px 0; }
  .trust-item {
    padding: 14px 8px;
    border-right: 1px solid var(--c-line);
    border-bottom: 1px solid var(--c-line);
  }
  .trust-item:nth-child(2n) { border-right: none; }
  .trust-item:nth-last-child(-n+2) { border-bottom: none; }
  .trust-item strong { font-size: 28px; }
}
/* ===== 信頼訴求コールアウト（医療広告校正など・3ページ共通） =====
 * chatbot は独自 :root（--red 等）で site トークン名を持たないため、
 * 全色プロパティに #ハードコードのフォールバック値を併記する。 */
.trust-callout-section {
  padding: 56px 24px;
  background: var(--c-bg, #FAF7F2);
}
.trust-callout {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  background: var(--c-bg-soft, #FFFDF8);
  border: 2px solid var(--c-accent-primary, #C8322A);
  border-radius: 6px;
  padding: 36px 28px;
}
.trust-callout-title {
  margin: 0 0 12px;
  font-family: var(--f-mincho, 'Zen Old Mincho', 'Noto Serif JP', serif);
  font-size: clamp(20px, 3.4vw, 24px);
  font-weight: 700;
  line-height: 1.5;
  color: var(--c-accent-primary, #C8322A);
}
.trust-callout-body {
  margin: 0;
  font-size: 15px;
  line-height: 1.9;
  color: var(--c-text-dark, #1A1814);
}
@media (max-width: 640px) {
  .trust-callout-section { padding: 40px 18px; }
  .trust-callout { padding: 28px 20px; }
}
/* B-12〜B-16 は段階C送り (chatbot 全リライト時に整理):
 *   .problem-item / .solution-card / .strength-card hover
 *   .comparison-table / .mid-cta
 * 理由: chatbot独自変数 (--card / --border-light / --shadow-* / --text / --text2 /
 *       --muted / --font-display 等 20+) への依存度が高く、段階C で chatbot HTML
 *       自体を 800-1100行に圧縮する際に CSS+変数をまとめて再整理するのが効率的。
 */

/* ===== Animations (B-18: chatbot由来共通化) ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-ring {
  0%   { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .site-nav {
    padding: 0 20px;
  }

  .site-nav__menu,
  .site-nav__cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Mobile dropdown menu (when hamburger toggled) */
  .site-nav__menu.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 68px;
    left: 0;
    width: 100%;
    background: rgba(250, 247, 242, 0.98);
    backdrop-filter: blur(20px) saturate(1.2);
    border-bottom: 1px solid rgba(217, 211, 199, 1);
    padding: 24px 24px;
    gap: 8px;
    z-index: 99;
    box-shadow: 0 12px 40px rgba(26, 24, 20, 0.08);
  }

  .site-nav__menu.is-open li {
    list-style: none;
  }

  .site-nav__menu.is-open a {
    display: block;
    color: var(--c-text);
    font-size: 16px;
    font-weight: 600;
    padding: 12px 4px;
    border-bottom: 1px solid var(--c-divider);
  }

  .site-nav__menu.is-open a::after {
    display: none;
  }

  /* Footer responsive */
  .site-footer {
    padding-bottom: 70px;
  }
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .site-footer__col--logo {
    justify-content: center;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =====================================================================
 * CTA Hover Effects (5/07 段階D — 全ページCTA統一)
 * ---------------------------------------------------------------------
 * 強CTA: .cta / .cta-btn / .btn-primary 共通 hover
 *   A: 矢印擬似スライド (右上シフト)
 *   C: 影伸び+浮上
 *   D: 朱グロー (外周に薄い朱の輪)
 * 中CTA: .site-nav__cta は別途L173-176で定義(色変化+微浮上)
 * ===================================================================== */

.cta,
.cta-btn,
.btn-primary,
.cta-secondary,
.btn-outline,
.btn-submit,
button[type="submit"] {
  transition: transform 0.3s var(--easing),
              box-shadow 0.3s var(--easing),
              background 0.3s var(--easing);
}

.cta:hover,
.cta-btn:hover,
.btn-primary:hover,
.cta-secondary:hover,
.btn-outline:hover,
.btn-submit:hover,
button[type="submit"]:hover {
  transform: translate(3px, -3px);
  box-shadow:
    0 14px 40px rgba(200, 50, 42, 0.45),
    0 0 0 4px rgba(200, 50, 42, 0.12);
}

.cta:active,
.cta-btn:active,
.btn-primary:active,
.cta-secondary:active,
.btn-outline:active,
.btn-submit:active,
button[type="submit"]:active {
  transform: translate(1px, 1px);
  box-shadow:
    0 4px 12px rgba(200, 50, 42, 0.30);
  transition-duration: 0.1s;
}

/* .cta-secondary 専用上書き — 強CTAではないので影は白系・控えめに */
.cta-secondary:hover {
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.35),
    0 0 0 4px rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 1);
}

.cta-secondary:active {
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.30);
}
