/* ===========================================================================
   MiraiNavi Corporate Site — Brand Common Styles
   ブランドカラー・タイポ・ベース・ヘッダー・フッター・ボタン・ニュースリスト
   定義の SSOT は ../../ブランドガイドライン.md
   =========================================================================== */

/* ===== Brand Colors ===== */
:root {
  --brand-blue: #0095D9;
  --brand-blue-dark: #006FA8;
  --navy: #14296B;
  --navy-darker: #0A1845;

  --sky-blue: #7DC8E5;
  --sky-blue-light: #B8DDF0;

  --brand-green: #5BB249;
  --brand-green-dark: #2E7D32;
  --brand-green-darker: #1B5E20;
  --brand-green-light: #A8D26A;

  --accent-yellow: #FFE082;

  --white: #FFFFFF;
  --bg-soft: #F0F7FB;
  --border: #DFE7EE;
  --text-dark: #1A2030;
  --text-body: #2C3441;
  --text-gray: #5A6477;
  --text-muted: #8C95A4;
  --shadow: 0 4px 16px rgba(20, 41, 107, 0.08);
}

/* ===== Skip link (WCAG 2.4.1 Bypass Blocks) ===== */
.skip-link {
  position: absolute;
  top: -48px;
  left: 8px;
  z-index: 1000;
  padding: 10px 18px;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
  transition: top .2s ease-out;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid var(--brand-green);
  outline-offset: 2px;
}
/* main へキーボードフォーカスを移したときのアウトラインを抑制 */
main:focus { outline: none; }

/* ===== Inline SVG icon ===== */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 28px; height: 28px; }
.icon-xl { width: 48px; height: 48px; }

/* ===== Utilities ===== */
.text-center { text-align: center; }
.bg-soft  { background: var(--bg-soft); }
.bg-white { background: var(--white); }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.mt-80 { margin-top: 80px; }

/* リードテキスト（中央寄せ・大きめ行間） */
.lead-center {
  font-size: 16px;
  line-height: 2;
  text-align: center;
  color: var(--text-body);
}

/* footer 内の白文字 mailto リンク */
.footer-email { color: rgba(255, 255, 255, 0.85); }
.footer-email:hover { color: var(--brand-green-light); }

/* ===== Reset / Base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  color: var(--text-dark);
  line-height: 1.8;
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ===== Header ===== */
header {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: box-shadow .25s ease-out;
}
header.scrolled { box-shadow: 0 2px 12px rgba(20, 41, 107, 0.08); }

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 6px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.logo img { display: block; width: auto; }
.logo .logo-icon { height: 48px; }
.logo .logo-wordmark { height: 30px; }

/* Header navigation */
.header-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.header-nav a {
  font-size: 14px;
  color: var(--text-body);
  text-decoration: none;
  font-weight: 600;
  transition: color .15s;
}
.header-nav a:hover { color: var(--brand-blue); }
.header-nav a.is-active { color: var(--brand-blue); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 10px 12px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--navy);
  align-items: center;
  justify-content: center;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: inline-block; }

@media (max-width: 768px) {
  .header-inner { padding: 12px 16px; gap: 12px; }
  .logo { gap: 6px; }
  .logo .logo-icon { height: 42px; }
  .logo .logo-wordmark { height: 26px; }

  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    box-shadow: 0 4px 16px rgba(20, 41, 107, 0.08);
  }
  .header-nav.is-open { display: flex; }
  .header-nav a {
    padding: 14px 24px;
    border-bottom: 1px solid var(--bg-soft);
    width: 100%;
  }
  .header-nav a:last-child { border-bottom: none; }
}

/* ===== Common Section ===== */
section { padding: 80px 20px; }
.container { max-width: 1100px; margin: 0 auto; }
.container-narrow { max-width: 760px; margin: 0 auto; }

.section-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--navy);
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.4;
}
.section-subtitle {
  text-align: center;
  font-size: 16px;
  color: var(--text-gray);
  margin-bottom: 56px;
}
.divider {
  width: 60px;
  height: 4px;
  background: var(--brand-green);
  margin: 0 auto 32px;
  border-radius: 2px;
}

/* ===== Buttons ===== */
/* 主 CTA: btn-primary（緑 pill）— btn-submit / email-btn の旧 class も継承 */
/* 文字色 #FFF on #2E7D32 = 5.36:1 (WCAG AA Pass) */
.btn-primary,
.btn-submit,
.email-btn {
  display: inline-block;
  background: var(--brand-green-dark);
  color: var(--white);
  padding: 18px 56px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(46, 125, 50, 0.35);
  transition: background .2s, transform .2s, box-shadow .2s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary:hover,
.btn-submit:hover:not(:disabled),
.email-btn:hover {
  background: var(--brand-green-darker);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(27, 94, 32, 0.45);
}
.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* テキストリンク（旧 btn-secondary を整理） */
.text-link,
.btn-secondary {
  display: inline-block;
  color: var(--brand-blue-dark);
  padding: 8px 0;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.text-link:hover,
.btn-secondary:hover { text-decoration: underline; }

.btn-outline {
  display: inline-block;
  color: var(--navy);
  padding: 14px 32px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid var(--navy);
  border-radius: 999px;
  background: var(--white);
  transition: all .2s;
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

/* ===== News List ===== */
.news-list {
  max-width: 900px;
  margin: 32px auto 0;
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--border);
}
.news-item {
  display: grid;
  grid-template-columns: 140px 110px 1fr;
  gap: 20px;
  align-items: center;
  padding: 18px 4px;
  border-bottom: 1px solid var(--border);
  transition: background .15s, padding-left .25s;
  position: relative;
}
.news-item:hover {
  background: var(--bg-soft);
  padding-left: 16px;
}
.news-item::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px; height: 60%;
  background: var(--brand-blue);
  border-radius: 2px;
  transition: transform .25s cubic-bezier(.2,.7,.3,1);
}
.news-item:hover::before { transform: translateY(-50%) scaleY(1); }

.news-date {
  font-size: 14px;
  color: var(--text-gray);
  font-weight: 600;
  font-feature-settings: "tnum";
}
.news-tag {
  display: inline-block;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
}
.news-tag--info {
  background: rgba(0, 149, 217, 0.12);
  color: var(--brand-blue-dark);
  border: 1px solid rgba(0, 149, 217, 0.3);
}
.news-tag--press {
  background: rgba(91, 178, 73, 0.12);
  color: var(--brand-green-dark);
  border: 1px solid rgba(91, 178, 73, 0.3);
}
.news-tag--media {
  background: rgba(91, 178, 73, 0.12);
  color: var(--brand-green-dark);
  border: 1px solid rgba(91, 178, 73, 0.3);
}
.news-tag--recruit {
  background: rgba(255, 224, 130, 0.3);
  color: #856404;
  border: 1px solid rgba(255, 224, 130, 0.6);
}
.news-body {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.7;
}
.news-body a {
  color: var(--brand-blue);
  text-decoration: none;
  margin-left: 6px;
  font-weight: 600;
}
.news-body a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .news-list { margin-top: 24px; }
  .news-item {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px 4px;
  }
  .news-date { font-size: 13px; }
  .news-tag { width: fit-content; padding: 3px 10px; font-size: 11px; }
  .news-body { font-size: 14px; }
}

/* ===== Footer ===== */
footer {
  background: var(--navy-darker);
  color: rgba(255,255,255,0.8);
  padding: 60px 20px 40px;
  font-size: 14px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.footer-company {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  line-height: 1.9;
}
.footer-company .name {
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-bottom: 24px;
}
.footer-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition: background-size .25s ease-out, color .15s;
}
.footer-links a:hover {
  color: var(--brand-green-light);
  background-size: 100% 1px;
}
.footer-links a.external::after {
  content: "↗";
  font-size: 12px;
  margin-left: 4px;
  opacity: 0.7;
}
.copyright {
  font-size: 12px;
  opacity: 0.6;
  margin-top: 16px;
}

@media (max-width: 768px) {
  footer { padding: 40px 20px 60px; }
  .footer-links { gap: 12px 20px; font-size: 13px; }
}

/* ===== Reveal Animation ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transition: opacity .75s ease-out, transform .75s cubic-bezier(.2,.7,.3,1);
    will-change: opacity, transform;
  }
  .reveal--up    { transform: translateY(28px); }
  .reveal--scale { transform: scale(.94); }
  .reveal.is-visible { opacity: 1; transform: none; }

  /* Scroll progress bar — 読み物ページ (.has-progress) のみ表示 */
  body.has-progress::after {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: var(--scroll-progress, 0%);
    height: 2px;
    background: linear-gradient(90deg, var(--brand-green), var(--brand-blue));
    z-index: 999;
    transition: width .05s linear;
    pointer-events: none;
    opacity: 0.7;
  }

  /* CTA glow 呼吸（控えめ） */
  @keyframes ctaGlow {
    0%, 100% { box-shadow: 0 6px 20px rgba(46, 125, 50, 0.30); }
    50%      { box-shadow: 0 10px 28px rgba(46, 125, 50, 0.45); }
  }
  .btn-primary,
  .btn-submit,
  .email-btn { animation: ctaGlow 3.2s ease-in-out infinite; }
  .btn-primary:hover,
  .btn-submit:hover,
  .email-btn:hover { animation-play-state: paused; }

  /* ロゴ hover で揺らす */
  .logo .logo-icon { transition: transform .4s cubic-bezier(.2,.7,.3,1); }
  .logo:hover .logo-icon { transform: rotate(-8deg) scale(1.08); }
  .logo .logo-wordmark { transition: opacity .25s ease-out; }
  .logo:hover .logo-wordmark { opacity: 0.85; }

  /* ヘッダー nav: 下線スライド */
  .header-nav a { position: relative; padding: 4px 0; }
  .header-nav a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -2px;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, var(--brand-blue), var(--brand-green));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s cubic-bezier(.2,.7,.3,1);
  }
  .header-nav a:hover::after,
  .header-nav a.is-active::after { transform: scaleX(1); }

  /* ニュースタグの淡い pulse */
  .news-item:hover .news-tag { transform: scale(1.05); }
  .news-tag { transition: transform .2s ease-out; }

  /* フッターリンクの矢印フォロー (external) */
  .footer-links a.external { transition: color .15s, padding-left .2s; }
  .footer-links a.external:hover { padding-left: 4px; }

  /* btn-outline: 内側を埋めるスライド */
  .btn-outline {
    position: relative;
    overflow: hidden;
    z-index: 1;
  }
  .btn-outline::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--navy);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .35s cubic-bezier(.2,.7,.3,1);
    z-index: -1;
  }
  .btn-outline:hover { color: var(--white); }
  .btn-outline:hover::before { transform: scaleX(1); transform-origin: left; }
}
/* prefers-reduced-motion: reduce — 全アニメ無効化 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  body.has-progress::after { display: none !important; }
}

/* ===== Tablet ===== */
@media (max-width: 1024px) {
  section { padding: 70px 20px; }
  .section-title { font-size: 28px; }
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  body { line-height: 1.7; }
  section { padding: 56px 20px; }
  .section-title { font-size: 22px; line-height: 1.4; }
  .section-subtitle { font-size: 14px; }
  .btn-primary,
  .btn-submit,
  .email-btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    font-size: 17px;
    text-align: center;
  }
  .text-link,
  .btn-secondary {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
  }
  .btn-outline {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 20px;
  }
}

/* ===== Small ===== */
@media (max-width: 480px) {
  section { padding: 44px 16px; }
  .section-title { font-size: 20px; }
}
