/*
 * template.css — フォースネット 新テンプレート共通スタイル
 *
 * 抽出元: public/local-ai-box/index.html / public/voice-line/index.html の <style>
 * 目的: company / solutions / contact / news 4 ページが LP と地続きの体験を持てるよう、
 *       ヘッダー / フッター / セクション / グリッド / カード / バッジを共通化する。
 *
 * 命名: LP と同じクラス名（.fn-header / .section / .hero）を維持。
 *       旧 style.css と並列ロードしない前提（新 4 ページは template.css 単体読込）。
 */

:root {
  --primary: #1A2888;
  --primary-hover: #0e1b6d;
  --primary-dark: #0e1b3d;
  --primary-light: #2a3a9e;
  --accent: #3880FF;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --surface: #ffffff;
  --surface-muted: #f8f9fa;
  --surface-dark: #0e1b3d;
  --surface-darker: #0a0a0a;
  --footer-text: #999999;
  --footer-border: #222222;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --success: #15803d;
  --success-bg: #f0fdf4;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --container-max: 1100px;
  --header-h: 64px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-cta: 0 4px 20px rgba(0,0,0,0.2);
}

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

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ===== Container ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.fn-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}

.fn-header .container {
  display: flex;
  align-items: center;
  height: var(--header-h);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  text-decoration: none;
  min-width: 190px;
}

.header-logo img {
  display: block;
  width: 62px;
  height: 34px;
  object-fit: contain;
}

.header-logo-text {
  color: var(--primary);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
  font-size: 14px;
}

.header-nav a,
.header-nav-trigger {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
}

.header-nav a:hover,
.header-nav-trigger:hover { color: var(--primary); }

.header-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--header-h);
}

.header-nav-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--header-h);
}

.header-nav-trigger::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.header-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  min-width: 176px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.header-nav-item:hover .header-dropdown,
.header-nav-item:focus-within .header-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.header-dropdown a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  white-space: nowrap;
}

.header-dropdown a:hover {
  background: var(--surface-muted);
  color: var(--primary);
}

.header-cta {
  background: var(--primary);
  color: var(--surface) !important;
  padding: 8px 20px;
  border-radius: 4px;
  font-weight: 600;
  line-height: 20px;
}

.header-cta:hover { background: var(--primary-hover); }

/* ===== Hero ===== */
.hero {
  margin-top: var(--header-h);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  color: var(--surface);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 60px;
  position: relative;
  z-index: 1;
}

.hero-text { flex: 1; }

.hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}

.hero-tagline {
  font-size: 15px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.hero-lead {
  font-size: 18px;
  color: rgba(255,255,255,0.85);
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 640px;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-cta {
  display: inline-block;
  background: var(--surface);
  color: var(--primary);
  padding: 14px 36px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.hero-cta:hover {
  background: rgba(255,255,255,0.9);
  transform: translateY(-2px);
  box-shadow: var(--shadow-cta);
}

.hero-cta-secondary {
  display: inline-block;
  color: rgba(255,255,255,0.85);
  padding: 14px 28px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.hero-cta-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
  color: var(--surface);
}

/* ===== Section Common ===== */
.section {
  padding: 80px 0;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.section--gray { background: var(--surface-muted); }
.section--dark { background: var(--surface-dark); color: var(--surface); }

.section-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section--dark .section-eyebrow { color: rgba(255,255,255,0.5); }

.section-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.4;
}

.section-lead {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.8;
  margin-bottom: 48px;
}

.section--dark .section-lead { color: rgba(255,255,255,0.7); }

.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 28px;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section-divider span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.05em;
}

/* ===== Generic grids (replace Bootstrap row/col) ===== */
.grid {
  display: grid;
  gap: 24px;
}

.grid--2col { grid-template-columns: repeat(2, 1fr); }
.grid--3col { grid-template-columns: repeat(3, 1fr); }
.grid--4col { grid-template-columns: repeat(4, 1fr); }

/* ===== Generic cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
}

.card--feature {
  text-align: center;
}

.card--feature h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.card--feature p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.section--dark .card {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: var(--surface);
}

.section--dark .card h4 { color: var(--surface); }
.section--dark .card p { color: rgba(255,255,255,0.75); }

/* ===== Service tags (pill) ===== */
.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.service-tag {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--surface);
  font-weight: 500;
}

/* ===== Badges ===== */
.badge-ok,
.badge-ng,
.badge-warn {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-ok { background: var(--success-bg); color: var(--success); border: 1px solid var(--success); }
.badge-ng { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger); }
.badge-warn { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning); }

/* ===== Required mark (form) ===== */
.required-mark {
  display: inline-block;
  margin-left: 4px;
  color: var(--danger);
  font-weight: 600;
}

/* ===== Info-grid (dl 形式の会社概要等) ===== */
.info-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
  border-top: 1px solid var(--border);
}

.info-grid dt,
.info-grid dd {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.info-grid dt {
  font-weight: 600;
  color: var(--primary);
  background: var(--surface-muted);
}

.info-grid dd {
  color: var(--text-primary);
}

/* ===== Timeline (沿革) ===== */
.timeline {
  border-left: 2px solid var(--border);
  padding-left: 24px;
  margin-left: 12px;
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--surface);
}

.timeline-year {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.timeline-text {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.7;
}

/* ===== CTA Section ===== */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  text-align: center;
  color: var(--surface);
}

.cta-section h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 16px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 32px;
  line-height: 1.8;
}

.cta-button {
  display: inline-block;
  background: var(--surface);
  color: var(--primary);
  padding: 16px 48px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.cta-button:hover {
  background: rgba(255,255,255,0.9);
  transform: translateY(-2px);
  box-shadow: var(--shadow-cta);
}

/* ===== Company page content ===== */
.media-block {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 40px;
  align-items: center;
}

.media-block img,
.achievement-logo img,
.profile-book img {
  display: block;
  max-width: 100%;
  height: auto;
}

.lead-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.text-stack {
  display: grid;
  gap: 16px;
}

.partner-list {
  margin: 0;
  color: var(--text-primary);
  line-height: 1.9;
}

.achievement-logo {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.profile-row {
  display: grid;
  grid-template-columns: 130px 260px 1fr;
  gap: 0;
  border-top: 1px solid var(--border);
}

.profile-row > * {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.profile-year,
.profile-org {
  background: var(--surface-muted);
  color: var(--primary);
  font-weight: 700;
}

.profile-detail ul {
  margin: 0;
  padding-left: 1.2em;
}

.profile-detail li + li { margin-top: 4px; }

.profile-book {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-top: 12px;
}

.profile-book img {
  width: 100px;
  flex: 0 0 auto;
}

.map-frame {
  width: 100%;
  min-height: 360px;
  border: 0;
  border-radius: var(--radius-lg);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--surface-darker);
  color: var(--footer-text);
  padding: 48px 0 24px;
  font-size: 14px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-section h4 {
  color: var(--surface);
  font-size: 14px;
  margin-bottom: 16px;
}

.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 8px; }
.footer-section ul li a { color: var(--footer-text); text-decoration: none; }
.footer-section ul li a:hover { color: var(--surface); }

.footer-bottom {
  border-top: 1px solid var(--footer-border);
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero { padding: 80px 0 60px; }
  .hero-content { flex-direction: column; gap: 32px; }
  .hero h1 { font-size: 30px; }

  .section { padding: 56px 0; }
  .section-title { font-size: 24px; }
  .section-lead { font-size: 15px; margin-bottom: 32px; }

  .grid--2col,
  .grid--3col,
  .grid--4col { grid-template-columns: 1fr; }

  .info-grid { grid-template-columns: 1fr; }
  .info-grid dt {
    background: var(--surface-muted);
    border-bottom: none;
    padding-bottom: 4px;
  }

  .footer-content { grid-template-columns: 1fr; }

  .header-nav { display: none; }

  .media-block,
  .profile-row {
    grid-template-columns: 1fr;
  }

  .profile-row > * { padding: 14px 16px; }
  .profile-org { background: var(--surface); }
  .profile-book { flex-direction: column; }

  .cta-section { padding: 60px 0; }
  .cta-section h2 { font-size: 24px; }
}
