/* ============================================================
   SPARK NOVA Inc. — 共通スタイル
   カラーパレット・タイポグラフィ・コンポーネント定義
   ============================================================ */

/* --- Google Fonts --- */
/* --- CSS カスタムプロパティ --- */
:root {
  /* カラー */
  --white:       #FFFFFF;
  --light-gray:  #F4F5F5;
  --deep-teal:   #006882;
  --teal:        #008080;
  --mint:        #86CAB6;
  --charcoal:    #1A1A1A;
  --mid-gray:    #6B7280;
  --border:      #D1D5DB;

  /* タイポグラフィ */
  --font-en-heading: 'Cormorant Garamond', Georgia, serif;
  --font-ja-heading: 'Noto Serif JP', serif;
  --font-body:       'Noto Sans JP', sans-serif;
  --font-ui:         'Inter', sans-serif;

  /* スペーシング */
  --section-gap:   120px;
  --content-max:   1100px;  /* Ignition Point 実測 xl=1140pxに準拠 → 1行の文字数を減らし大きく見せる */
  --gutter:        40px;    /* 左右余白を広げて本文屋を狭める */
}

/* --- リセット・ベース --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 18px; /* 50-60代の意思決定層向け可読性調整 */
}

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.78;        /* Ignition Point実測値 1.77に準拠 */
  letter-spacing: 0.01em;  /* 日本語はpalt指定で自動調整するのが最適 */
  font-feature-settings: "palt"; /* プロポーショナル文字間調整→日本語読みやすさ大幅UP */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ============================================================
   固定 Spark Canvas 背景
   ============================================================ */
#spark-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* サイトラッパー（canvas の上に乗る） */
#site-wrapper {
  position: relative;
  z-index: 1;
}

/* ============================================================
   SVG logo overlay - index.php animation
   opacity is controlled by spark.js
   ============================================================ */
#spark-logo-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.05s linear;
}

#spark-logo-svg {
  width: auto;
  height: auto;
  display: block;
  /* flame flicker via CSS - subtle vertical float + glow pulse */
  animation: spark-logo-flicker 3s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 18px rgba(134,202,181,0.55))
          drop-shadow(0 0 40px rgba(0,104,130,0.35));
}

@keyframes spark-logo-flicker {
  0%   { transform: translateY(0px)  scale(1.000);
         filter: drop-shadow(0 0 18px rgba(134,202,181,0.55)) drop-shadow(0 0 40px rgba(0,104,130,0.35)); }
  30%  { transform: translateY(-5px) scale(1.008);
         filter: drop-shadow(0 0 28px rgba(134,202,181,0.75)) drop-shadow(0 0 54px rgba(0,104,130,0.50)); }
  65%  { transform: translateY(-3px) scale(1.004);
         filter: drop-shadow(0 0 21px rgba(134,202,181,0.62)) drop-shadow(0 0 44px rgba(0,104,130,0.40)); }
  100% { transform: translateY(-7px) scale(1.013);
         filter: drop-shadow(0 0 32px rgba(134,202,181,0.85)) drop-shadow(0 0 60px rgba(0,104,130,0.55)); }
}

/* ============================================================
   ヘッダー / ナビゲーション
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: box-shadow 0.3s;
}
.site-header.scrolled {
  box-shadow: 0 1px 0 var(--border);
}

.header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 72px;
  display: flex;
  align-items: center;
  gap: 0;
}
/* ロゴだけ左寄せ、残りは右寄せ */
.header-inner .header-logo {
  margin-right: auto;
}

.header-logo {
  display: flex;
  align-items: center;
  line-height: 1;
  flex-shrink: 0;
}
.header-logo img {
  height: 26px;   /* 36px→ 26px へ小型化して上品な印象に */
  width: auto;
  display: block;
  opacity: 0.92;  /* 微妙な透明度で轻やかな印象に */
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--charcoal);
  text-transform: uppercase;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--teal);
  transition: width 0.3s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--teal);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* .nav-lang は削除（ENボタン不要） */

.btn-contact-header {
  font-family: var(--font-ui);
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--teal);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 4px;
  transition: background 0.2s;
}
.btn-contact-header:hover {
  background: var(--deep-teal);
}

/* ハンバーガーボタン — PC・スマホ共通で常時表示 */
.hamburger {
  display: flex;             /* 常時表示（PC/SP共通） */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background 0.2s;
  z-index: 1001;             /* mobile-menu(1000)より上 */
  flex-shrink: 0;
  position: relative;
  margin-left: 12px;         /* CONTACTボタンとの間隔 */
}
.hamburger:hover { background: rgba(0,128,128,0.08); }
/* open時は白背景の上に乗るのでそのまま */
.hamburger.open { background: transparent; }
.hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: transform 0.36s cubic-bezier(0.23,1,0.32,1), opacity 0.2s, width 0.25s;
  transform-origin: center;
}
/* open時 — 中バーは短く右寄せにして動きに変化をつける */
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* フルスクリーンオーバーレイメニュー */
.mobile-menu {
  visibility: hidden;
  opacity: 0;
  position: fixed;
  inset: 0;
  background: #F2F5F4;  /* footerと揃えた極薄ミントグレー */
  z-index: 1000;
  display: grid;
  grid-template-rows: auto 1fr auto;
  transition: opacity 0.38s cubic-bezier(0.4,0,0.2,1),
              visibility 0.38s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}
.mobile-menu.open {
  visibility: visible;
  opacity: 1;
}

/* スルーインアニメ — 各リンクが順番に現れる */
.mobile-menu.open .mm-link {
  animation: mmSlideIn 0.45s cubic-bezier(0.22,1,0.36,1) both;
}
.mobile-menu.open .mm-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-menu.open .mm-link:nth-child(2) { animation-delay: 0.10s; }
.mobile-menu.open .mm-link:nth-child(3) { animation-delay: 0.15s; }
.mobile-menu.open .mm-link:nth-child(4) { animation-delay: 0.20s; }
.mobile-menu.open .mm-link:nth-child(5) { animation-delay: 0.25s; }
.mobile-menu.open .mm-link:nth-child(6) { animation-delay: 0.30s; }
@keyframes mmSlideIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ヘッダーバー */
.mm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  height: 72px;
  border-bottom: 1px solid rgba(26,26,26,0.1);
}
.mm-logo img {
  height: 22px;
  width: auto;
  display: block;
  /* charcoal背景にPNGロゴをそのまま表示 */
}
.mm-close {
  background: none;
  border: 1px solid rgba(26,26,26,0.2);
  border-radius: 50%;
  width: 40px; height: 40px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: rgba(26,26,26,0.6);
  transition: border-color 0.2s, color 0.2s;
  font-size: 18px;
  line-height: 1;
}
.mm-close:hover { border-color: var(--teal); color: var(--teal); }

/* ナビゲーションリスト */
.mm-nav {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--gutter);
  gap: 0;
}
.mm-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-ja-heading);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 300;
  color: rgba(26,26,26,0.75);
  letter-spacing: 0.06em;
  padding: 22px 0;
  border-bottom: 1px solid rgba(26,26,26,0.08);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}
.mm-link:first-child { border-top: 1px solid rgba(26,26,26,0.08); }
.mm-link:hover { color: var(--teal); }
.mm-link-en {
  font-family: var(--font-en-heading);
  font-size: 15px;
  font-style: italic;
  color: var(--teal);
  letter-spacing: 0.12em;
  margin-left: auto;
  padding-left: 20px;
  opacity: 0.7;
}
/* ホバー時の矢印 */
.mm-link::after {
  content: '→';
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--teal);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.2s, transform 0.2s;
  margin-left: 16px;
  flex-shrink: 0;
}
.mm-link:hover::after { opacity: 1; transform: none; }

/* フッター沖 */
.mm-footer {
  padding: 28px var(--gutter);
  border-top: 1px solid rgba(26,26,26,0.1);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.mm-footer-copy {
  font-family: var(--font-ui);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: rgba(26,26,26,0.35);
}
.mm-footer-contact {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid rgba(0,128,128,0.35);
  border-radius: 4px;
  padding: 9px 20px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  margin-left: auto;
}
.mm-footer-contact:hover {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

/* ============================================================
   レイアウト共通
   ============================================================ */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* セクション */
.section {
  padding: var(--section-gap) 0;
  position: relative;
}
.section--gray { background: var(--light-gray); }
.section--mint { background: rgba(134, 202, 182, 0.08); }
.section--teal {
  background: var(--teal);
  color: var(--white);
}

/* セクションラベル */
.section-label {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--teal);
}
.section--teal .section-label {
  color: rgba(255,255,255,0.7);
}
.section--teal .section-label::before {
  background: rgba(255,255,255,0.5);
}

/* 見出し */
.section-title {
  font-family: var(--font-ja-heading);
  font-size: clamp(28px, 2.8vw, 40px);
  font-weight: 500;  /* Ignition Point実測値 → mediumにするだけで大幅読みやすくなる */
  line-height: 1.5;
  color: var(--charcoal);
  margin-bottom: 28px;
}
.section-title--white { color: var(--white); }

.section-title .en {
  display: block;
  font-family: var(--font-en-heading);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--mid-gray);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--mid-gray);
  line-height: 1.85;
  max-width: 640px; /* 1行あたりの文字数を絞り「大きく見える」読み幅に */
}

.company-cta .section-subtitle {
  text-align: center;
  margin: 0 auto;
}

/* ============================================================
   ボタン
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 14px 32px;
  border-radius: 4px;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
  text-transform: uppercase;
}
.btn-primary {
  background: var(--teal);
  color: var(--white);
}
.btn-primary:hover { background: var(--deep-teal); }

.btn-ghost {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--teal);
}
.btn-ghost:hover {
  background: rgba(134,202,182,0.15);
}

.btn-white {
  background: var(--white);
  color: var(--teal);
}
.btn-white:hover {
  background: rgba(255,255,255,0.9);
  color: var(--deep-teal);
}

.btn svg {
  width: 16px; height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ============================================================
   カード
   ============================================================ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.card:hover {
  border-color: var(--teal);
  transform: translateY(-4px);
}

.card-tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(134,202,182,0.2);
  padding: 3px 8px;
  border-radius: 2px;
}

/* ============================================================
   フッター
   ============================================================ */
.site-footer {
  background: #F2F5F4;  /* 極薄ミントグレー: ロゴのtealが映える軽やかな背景 */
  color: var(--charcoal);
  padding: 64px 0 40px;
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.footer-logo {
  font-family: var(--font-en-heading);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--white);
  margin-bottom: 16px;
}

/* フッターロゴエリア */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* フッターSVGロゴ（暗背景用インラインSVG） */
.footer-logo-svg {
  height: 28px;
  width: auto;
  display: block;
  margin-bottom: 20px;
}

/* フッターPNGロゴ */
.footer-logo-img {
  height: 26px;
  width: auto;
  display: block;
  margin-bottom: 20px;
  /* filterなし – SVGロゴに切り替えたため不要 */
}

.footer-brand .footer-tagline {
  font-size: 15px;
  color: rgba(26,26,26,0.6);
  line-height: 1.85;
  margin-bottom: 28px;
  max-width: 260px;
  font-family: var(--font-ja-heading);
  font-weight: 300;
  letter-spacing: 0.04em;
}

.footer-brand .footer-copy {
  font-size: 15px;
  color: rgba(26,26,26,0.4);
  letter-spacing: 0.06em;
  font-family: var(--font-ui);
}

.footer-tagline {
  font-size: 15px;
  color: rgba(26,26,26,0.6);
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 340px;
}

.footer-copy {
  font-size: 15px;
  color: rgba(26,26,26,0.45);
  letter-spacing: 0.04em;
}

.footer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.footer-nav-col h4 {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(26,26,26,0.45);
  margin-bottom: 16px;
}

.footer-nav-col a {
  display: block;
  font-size: 15px;
  color: rgba(26,26,26,0.8);
  margin-bottom: 12px;
  transition: color 0.2s;
}
.footer-nav-col a:hover { color: var(--teal); }

/* フッター最下部：コピーライト＋法的リンク */
.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(26,26,26,0.1);
  margin-top: 8px;
}

.footer-legal-links {
  display: flex;
  gap: 20px;
}

.footer-legal-links a {
  font-size: 15px;
  color: rgba(26,26,26,0.45);
  letter-spacing: 0.04em;
  font-family: var(--font-ui);
  transition: color 0.2s;
}
.footer-legal-links a:hover { color: var(--teal); }

/* ============================================================
   スクロールアニメーション
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal-left.visible {
  opacity: 1;
  transform: none;
}
.reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal-right.visible {
  opacity: 1;
  transform: none;
}

/* stagger delay */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ============================================================
   ページヒーロー（内部ページ共通）
   ============================================================ */
.page-hero {
  padding: 180px 0 100px;
  position: relative;
  overflow: hidden;
  background: transparent;
}
.page-hero-label {
  font-family: var(--font-ui);
  font-size: 15px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 20px;
}
.page-hero-title {
  font-family: var(--font-ja-heading);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 400;
  line-height: 1.3;
  color: var(--charcoal);
  margin-bottom: 24px;
}
.page-hero-title em {
  font-style: italic;
  font-family: var(--font-en-heading);
  color: var(--teal);
}
.page-hero-sub {
  font-size: 18px;
  color: var(--mid-gray);
  line-height: 1.85;
  max-width: 600px;
}

/* ============================================================
   レスポンシブ
   ============================================================ */
@media (max-width: 1024px) {
  :root { --section-gap: 80px; --gutter: 40px; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-nav { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  :root { --section-gap: 64px; --gutter: 20px; }
  .nav-links, .btn-contact-header { display: none; }
  /* .hamburger は常時 flex なのでここでは不要 */
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-nav { grid-template-columns: 1fr 1fr; gap: 24px; }
  .page-hero { padding: 140px 0 64px; }
}


/* ===== Refactor additions ===== */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.c-site-header, .site-header {}
.c-site-header__inner, .header-inner {}
.c-site-header__logo, .header-logo {}
.c-site-header__nav, .header-nav {}
.c-site-header__links, .nav-links {}
.c-site-header__contact, .btn-contact-header {}
.c-site-header__toggle, .hamburger {}
.c-mobile-menu, .mobile-menu {}
.c-mobile-menu__header, .mm-header {}
.c-mobile-menu__logo, .mm-logo {}
.c-mobile-menu__close, .mm-close {}
.c-mobile-menu__nav, .mm-nav {}
.c-mobile-menu__link, .mm-link {}
.c-mobile-menu__link-en, .mm-link-en {}
.c-site-footer, .site-footer {}
.c-site-footer__inner, .footer-inner {}
.c-site-footer__brand, .footer-brand {}
.c-site-footer__logo, .footer-logo-img {}
.c-site-footer__nav, .footer-nav {}
.c-site-footer__col, .footer-nav-col {}

/* ============================================================
   改行制御ユーティリティ
   ============================================================ */
/* PCのみ表示する改行 */
.pc-only { display: inline; }
/* SPのみ表示する改行 */
.sp-only { display: none; }

@media (max-width: 767px) {
  .pc-only { display: none; }
  .sp-only { display: inline; }
}
