/* ================================================================
   KSC 会社概要ページ リデザイン — company_redesign.css
   TOP リデザイン（top_redesign.css）と同じデザイントークンを使用。
   header.php / footer.php の後に読み込み、カスケードで上書きする。
   ================================================================ */

/* ==============================
   CSS Variables（TOP と共通）
============================== */
:root {
  --bg:           #ffffff;
  --bg-soft:      #f5f7fa;
  --bg-mid:       #eef1f6;
  --bg-dark:      #061630;
  --bg-dark2:     #0a2040;
  --accent:       #0091c2;
  --accent-deep:  #006fa0;
  --accent-light: #e8f5fb;
  --accent-line:  rgba(0, 145, 194, 0.18);
  --warm:         #d4870a;
  --warm-light:   #fff8ed;
  --text-head:    #071830;
  --text-body:    #2d3d50;
  --text-mid:     #566880;
  --text-muted:   #8a9cb0;
  --border:       rgba(0, 0, 0, 0.08);
  --border-mid:   rgba(0, 0, 0, 0.13);
  --shadow-sm:    0 2px 12px rgba(0,0,0,0.06);
  --shadow-md:    0 6px 30px rgba(0,0,0,0.09);
  --shadow-lg:    0 16px 56px rgba(0,0,0,0.12);
  --radius:       10px;
  --radius-lg:    18px;
  --transition:   0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ==============================
   Base
============================== */
body {
  font-family: 'Noto Sans JP', 'Helvetica Neue', sans-serif !important;
  background-color: var(--bg) !important;
  color: var(--text-body) !important;
  overflow-x: hidden;
  line-height: 1.7;
  font-weight: 400;
}

.ksc-cp a { color: inherit; text-decoration: none; }
.ksc-cp *, .ksc-cp *::before, .ksc-cp *::after { box-sizing: border-box; }

.ksc-cp { counter-reset: kscsec; }

/* 全体に極薄のグレイン（ノイズ）テクスチャ — 奥行きを演出 */
.ksc-cp::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%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");
}

/* セクション共通 */
.ksc-cp-section {
  padding: 84px 24px;
  position: relative;
}
.ksc-cp-section { counter-increment: kscsec; }
.ksc-cp-section.is-soft { background: var(--bg-soft); }
.ksc-cp-inner { max-width: 1120px; margin: 0 auto; }

.ksc-cp-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 14px;
}
/* エディトリアルなセクション番号 */
.ksc-cp-label::before {
  content: counter(kscsec, decimal-leading-zero);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-head);
  background: var(--accent-light);
  border: 1px solid var(--accent-line);
  border-radius: 5px;
  padding: 3px 9px;
  letter-spacing: 0.05em;
}
/* 末尾の罫線 */
.ksc-cp-label::after {
  content: '';
  flex: 0 0 48px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.ksc-cp-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 600;
  color: var(--text-head);
  line-height: 1.35;
  margin: 0 0 16px;
}
.ksc-cp-title em { font-style: normal; color: var(--accent); }
.ksc-cp-sub {
  font-size: 15px;
  color: var(--text-mid);
  max-width: 620px;
  margin: 0 0 44px;
}

/* ==============================
   Hero
============================== */
.ksc-cp-hero {
  position: relative;
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg-dark);
  overflow: hidden;
}
.ksc-cp-hero-bg {
  position: absolute; inset: 0;
  background-image: url(/images/company/companybanner.webp), url(/images/company/companyBanner.jpg);
  background-size: cover;
  background-position: center 35%;
  transform: scale(1.06);
  animation: ksc-kenburns 20s ease-in-out infinite alternate;
}
@keyframes ksc-kenburns {
  from { transform: scale(1.06) translateY(0); }
  to   { transform: scale(1.16) translateY(-12px); }
}
.ksc-cp-hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(0,145,194,0.40), transparent 46%),
    radial-gradient(circle at 12% 88%, rgba(11,52,96,0.55), transparent 50%),
    linear-gradient(120deg, rgba(6,22,48,0.90) 0%, rgba(10,32,64,0.70) 58%, rgba(0,111,160,0.42) 100%);
}
/* 微細グリッドのテクスチャ */
.ksc-cp-hero::before {
  content: '';
  position: absolute; inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, #000 35%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, #000 35%, transparent 78%);
}
/* 縦組みの設立アクセント */
.ksc-cp-hero::after {
  content: 'EST. 1968 — TOKYO';
  position: absolute;
  right: 30px; top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.32em;
  color: rgba(255,255,255,0.32);
  z-index: 2;
}
.ksc-cp-hero-content {
  position: relative; z-index: 3;
  padding: 120px 24px 84px;
}
.ksc-cp-hero-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.36em;
  color: #8fd5ee;
  text-transform: uppercase;
  margin-bottom: 18px;
  animation: ksc-hero-up 0.9s cubic-bezier(0.22,0.61,0.36,1) 0.15s both;
}
.ksc-cp-hero-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(36px, 5.4vw, 60px);
  font-weight: 600;
  color: #fff;
  margin: 0;
  letter-spacing: 0.06em;
  text-shadow: 0 4px 40px rgba(0,0,0,0.4);
  animation: ksc-hero-up 0.9s cubic-bezier(0.22,0.61,0.36,1) 0.32s both;
}
.ksc-cp-hero-line {
  width: 64px; height: 3px;
  background: var(--accent);
  margin: 26px auto 0;
  transform-origin: center;
  animation: ksc-hero-line 0.8s cubic-bezier(0.22,0.61,0.36,1) 0.7s both;
}
@keyframes ksc-hero-up {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ksc-hero-line {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* パンくず */
.ksc-cp-breadcrumb {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-muted);
}
.ksc-cp-breadcrumb .ksc-cp-inner { padding: 14px 24px; }
.ksc-cp-breadcrumb a { color: var(--text-mid); }
.ksc-cp-breadcrumb a:hover { color: var(--accent); }
.ksc-cp-breadcrumb span { margin: 0 8px; color: var(--text-muted); }

/* ==============================
   Stats Strip
============================== */
.ksc-cp-stats {
  background: var(--bg-dark);
  padding: 56px 24px;
  position: relative;
  overflow: hidden;
}
/* 上端のアクセントライン */
.ksc-cp-stats::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent) 70%, transparent);
  opacity: 0.7;
}
/* 微細グリッド */
.ksc-cp-stats::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 120% at 50% 50%, #000 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 80% 120% at 50% 50%, #000 40%, transparent 85%);
  pointer-events: none;
}
.ksc-cp-stats-inner { position: relative; z-index: 1; }
.ksc-cp-stats-inner {
  max-width: 1000px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.ksc-cp-stat { text-align: center; color: #fff; }
.ksc-cp-stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #6f93b8;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.ksc-cp-stat-num {
  font-family: 'Playfair Display', serif;
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 600;
  line-height: 1;
  color: #fff;
}
.ksc-cp-stat-num .unit { font-size: 0.45em; margin-left: 4px; color: #b9d4e6; font-family: 'Noto Sans JP', sans-serif; }
.ksc-cp-stat-desc { font-size: 13px; color: #aebfd0; margin-top: 12px; }
.ksc-cp-stat + .ksc-cp-stat { border-left: 1px solid rgba(255,255,255,0.1); }

/* ==============================
   Profile（会社概要テーブル）
============================== */
.ksc-cp-profile-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: start;
}
.ksc-cp-company-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--text-head);
  margin: 0 0 4px;
}
.ksc-cp-company-en {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--accent-deep);
  margin: 0 0 26px;
}
.ksc-cp-dl { margin: 0; }
.ksc-cp-dl-row {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14.5px;
}
.ksc-cp-dl-row:first-child { border-top: 1px solid var(--border); }
.ksc-cp-dl dt {
  color: var(--text-mid);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.ksc-cp-dl dd { margin: 0; color: var(--text-head); }
.ksc-cp-dl dd .sub { color: var(--text-mid); font-size: 13px; }
.ksc-cp-people span { display: inline-block; margin-right: 14px; }

/* HQ ハイライトカード（右側） */
.ksc-cp-hq {
  background: linear-gradient(160deg, var(--bg-soft), #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}
.ksc-cp-hq h3 {
  font-size: 15px;
  color: var(--accent-deep);
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--accent-line);
  letter-spacing: 0.04em;
}
.ksc-cp-hq-map {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 6px;
  font-size: 13px; font-weight: 600;
  color: var(--accent);
}
.ksc-cp-hq-map svg { width: 15px; height: 15px; }
.ksc-cp-hq-map:hover { color: var(--accent-deep); }

/* ==============================
   Offices（拠点カード）
============================== */
.ksc-cp-offices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.ksc-cp-office {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 26px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex; flex-direction: column;
  overflow: hidden;
}
/* 上端のアクセントバー（ホバーで伸びる） */
.ksc-cp-office::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.ksc-cp-office:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--accent-line); }
.ksc-cp-office:hover::before { transform: scaleX(1); }
.ksc-cp-office-badge {
  align-self: flex-start;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent-line);
  border-radius: 4px;
  padding: 4px 10px;
  margin-bottom: 16px;
}
.ksc-cp-office h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-head);
  margin: 0 0 12px;
}
.ksc-cp-office address {
  font-style: normal;
  font-size: 13.5px;
  color: var(--text-body);
  line-height: 1.75;
  margin-bottom: 16px;
  flex: 1;
}
.ksc-cp-office-tel {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  color: var(--text-head);
  margin-bottom: 14px;
}
.ksc-cp-office-map {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  color: var(--accent);
  align-self: flex-start;
}
.ksc-cp-office-map svg { width: 15px; height: 15px; }
.ksc-cp-office-map:hover { color: var(--accent-deep); gap: 9px; }

/* ==============================
   Related Companies（関連会社）
============================== */
.ksc-cp-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.ksc-cp-related-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 38px 28px 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex; flex-direction: column; align-items: center;
}
/* コーナーブラケット装飾 */
.ksc-cp-related-card::before,
.ksc-cp-related-card::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid var(--accent);
  opacity: 0;
  transition: opacity var(--transition), inset var(--transition);
}
.ksc-cp-related-card::before { top: 12px; left: 12px; border-width: 2px 0 0 2px; }
.ksc-cp-related-card::after  { bottom: 12px; right: 12px; border-width: 0 2px 2px 0; }
.ksc-cp-related-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-line);
}
.ksc-cp-related-card:hover::before,
.ksc-cp-related-card:hover::after { opacity: 0.55; }
.ksc-cp-related-logo {
  height: 64px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.ksc-cp-related-logo img {
  max-height: 64px; max-width: 180px;
  object-fit: contain;
  transition: transform var(--transition);
}
.ksc-cp-related-card:hover .ksc-cp-related-logo img { transform: scale(1.06); }
.ksc-cp-related-name {
  font-size: 14.5px; font-weight: 600;
  color: var(--text-head); margin: 0 0 8px;
}
.ksc-cp-related-desc { font-size: 13px; color: var(--text-mid); margin: 0 0 16px; flex: 1; }
.ksc-cp-related-link {
  font-family: 'DM Mono', monospace;
  font-size: 12px; letter-spacing: 0.08em;
  color: var(--accent); font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
}
.ksc-cp-related-link svg { width: 13px; height: 13px; }
.ksc-cp-related-card:hover .ksc-cp-related-link { gap: 9px; }

/* ==============================
   Info cards（事業内容 / 認可・認定）
============================== */
.ksc-cp-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.ksc-cp-info-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 32px;
  box-shadow: var(--shadow-sm);
}
.ksc-cp-info-card h3 {
  font-family: 'Noto Serif JP', serif;
  font-size: 20px; font-weight: 600;
  color: var(--text-head);
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--accent-line);
}
.ksc-cp-info-list { list-style: none; margin: 0; padding: 0; }
.ksc-cp-info-list li {
  position: relative;
  padding: 10px 0 10px 26px;
  font-size: 14.5px;
  color: var(--text-body);
  line-height: 1.65;
  border-bottom: 1px dashed var(--border);
}
.ksc-cp-info-list li:last-child { border-bottom: none; }
.ksc-cp-info-list li::before {
  content: '';
  position: absolute; left: 4px; top: 18px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* ==============================
   Banks（取引銀行）
============================== */
.ksc-cp-banks { display: flex; flex-wrap: wrap; gap: 12px; }
.ksc-cp-bank-chip {
  background: var(--bg);
  border: 1px solid var(--border-mid);
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 14px;
  color: var(--text-head);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.ksc-cp-bank-chip:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
  background: var(--accent-light);
}

/* ==============================
   CTA
============================== */
.ksc-cp-cta {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark2) 55%, var(--accent-deep) 130%);
  padding: 72px 24px;
  text-align: center;
}
.ksc-cp-cta h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(24px, 3vw, 34px);
  color: #fff; margin: 0 0 14px; font-weight: 600;
}
.ksc-cp-cta p { color: #b9d0e2; font-size: 15px; margin: 0 0 30px; }
.ksc-cp-btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 600; font-size: 15px;
  padding: 15px 34px;
  border-radius: 999px;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 8px 28px rgba(0,145,194,0.35);
}
.ksc-cp-btn svg { width: 18px; height: 18px; }
.ksc-cp-btn:hover { background: #00a6dd; transform: translateY(-2px); gap: 13px; }

/* ==============================
   Scroll Reveal
============================== */
.ksc-reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.ksc-reveal.ksc-in-view { opacity: 1; transform: translateY(0); }
.ksc-reveal-delay-1 { transition-delay: 0.1s; }
.ksc-reveal-delay-2 { transition-delay: 0.2s; }
.ksc-reveal-delay-3 { transition-delay: 0.32s; }

/* JS無効時のフォールバック（必ず表示） */
.no-js .ksc-reveal { opacity: 1; transform: none; }

/* 動きを抑える設定のユーザーには最終状態を即時表示 */
@media (prefers-reduced-motion: reduce) {
  .ksc-cp *,
  .ksc-cp *::before,
  .ksc-cp *::after { animation: none !important; transition: none !important; }
  .ksc-reveal { opacity: 1 !important; transform: none !important; }
  .ksc-cp-hero-bg { animation: none !important; }
}

/* ==============================
   Responsive
============================== */
@media (max-width: 900px) {
  .ksc-cp-profile-grid { grid-template-columns: 1fr; gap: 32px; }
  .ksc-cp-offices-grid,
  .ksc-cp-related-grid { grid-template-columns: 1fr 1fr; }
  .ksc-cp-info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ksc-cp-section { padding: 56px 20px; }
  .ksc-cp-stats-inner { grid-template-columns: 1fr; gap: 28px; }
  .ksc-cp-stat + .ksc-cp-stat { border-left: none; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 28px; }
  .ksc-cp-offices-grid,
  .ksc-cp-related-grid { grid-template-columns: 1fr; }
  .ksc-cp-dl-row { grid-template-columns: 104px 1fr; gap: 12px; }
}
