/* ============================================
   Atlas21 Corporate Site - Global Styles
   Design: Apple-inspired bright minimal
   Brand Color: #1a398f
   Font: Yu Gothic / system sans-serif
   ============================================ */

/* === RESET & BASE === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html { font-size: 16px; }
body {
  font-family: "Yu Gothic Medium", "游ゴシック Medium", "Yu Gothic", "游ゴシック", "Meiryo", "メイリオ", "Osaka", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN", Arial, Helvetica, "MS PGothic", "ＭＳ Ｐゴシック", sans-serif;
  color: #1a1a1a;
  background: #fff;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: #1a398f; text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .75; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.4; }

/* === UTILITY === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.text-red { color: #1a398f; }
.bg-light { background: #e1eaf9; }
.bg-dark { background: #1a1a1a; color: #fff; }
.bg-red { background: #1a398f; color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Skip link — visually hidden, visible on focus */
.skip-link {
  position: absolute; top: -100%; left: 50%; transform: translateX(-50%);
  z-index: 10000; padding: 12px 24px;
  background: #1a398f; color: #fff; font-size: 14px; font-weight: 600;
  text-decoration: none; border-radius: 0 0 8px 8px;
  transition: top .2s ease;
}
.skip-link:focus {
  top: 0;
}

/* === FOCUS-VISIBLE (Accessibility) === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #1a398f;
  outline-offset: 2px;
}
.form-input:focus-visible {
  outline: 2px solid #1a398f;
  outline-offset: 0;
}

.section-padding { padding: 100px 0; }
.section-padding-sm { padding: 60px 0; }

/* === HEADER / NAV === */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,.06);
  transition: transform .3s ease, box-shadow .3s ease;
}
.site-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.08); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1400px; margin: 0 auto; padding: 0 32px; height: 72px;
}
.header-logo img { height: 28px; width: auto; }
.header-logo svg { height: 28px; width: auto; }
.header-nav { display: flex; align-items: center; gap: 32px; }
.header-nav a {
  font-size: 13px; font-weight: 600; color: #1a1a1a;
  letter-spacing: .02em; transition: color .2s;
  position: relative; white-space: nowrap;
}
.header-nav a:hover { color: #1a398f; opacity: 1; }
.header-nav a.active { color: #1a398f; }
.header-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: #1a398f; color: #fff !important; font-size: 13px; font-weight: 600;
  padding: 10px 24px; border-radius: 6px; transition: all .25s;
}
.header-cta:hover { background: #0e1f4a; opacity: 1; transform: translateY(-1px); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; z-index: 1001; background: none; border: none; -webkit-appearance: none; appearance: none; }
.hamburger span { display: block; width: 22px; height: 2px; background: #1a1a1a; transition: all .3s; border-radius: 2px; transform-origin: center; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; width: 0; overflow: hidden; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Nav */
.mobile-nav {
  position: fixed; top: 0; right: -100%; width: 320px; height: 100vh;
  background: #fff; z-index: 999; padding: 96px 32px 32px;
  transition: right .35s ease; overflow-y: auto;
  box-shadow: -4px 0 40px rgba(0,0,0,.1);
}
.mobile-nav.open { right: 0; }
.mobile-nav a {
  display: block; padding: 14px 0; font-size: 15px; font-weight: 600;
  color: #1a1a1a; border-bottom: 1px solid #f0f0f0;
}
.mobile-nav a:hover { color: #1a398f; }
.mobile-nav .sub-link { padding-left: 16px; font-size: 13px; font-weight: 400; color: #1a1a1a; }
.mobile-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.4); z-index: 998;
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.mobile-overlay.active { opacity: 1; pointer-events: auto; }

/* Service dropdown */
.nav-dropdown { position: relative; display: flex; align-items: center; height: 72px; }
.nav-dropdown-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(8px);
  width: 340px;
  background: #fff; border-radius: 0 0 12px 12px; box-shadow: 0 8px 40px rgba(0,0,0,.12);
  padding: 8px;
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
}
.nav-dropdown-menu.is-open { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.nav-dropdown-menu a { font-size: 13px; padding: 8px 14px; border-radius: 8px; display: block; }
.nav-dropdown-menu a:hover { background: #f8f8f8; }
.dropdown-grid { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 4px; }

/* === HERO SECTION === */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden; background: #fff; cursor: pointer;
}
.hero-video-wrap {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
.hero-video-wrap video {
  width: 100%; height: 100%; object-fit: cover;
}
.hero .btn {
  box-shadow: 0 4px 24px rgba(0,0,0,.35);
}
.hero-buttons {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
}
.hero-buttons .btn { min-width: 220px; }
.hero-content {
  position: relative; z-index: 2; text-align: center; color: #fff;
  padding: 0 24px 145px;
}
.hero-content h1 {
  font-size: clamp(28px, 5vw, 56px); font-weight: 700;
  letter-spacing: .04em; line-height: 1.3; margin-bottom: 20px;
}
.hero-content p {
  font-size: clamp(16px, 1.8vw, 18px); opacity: .85; margin-bottom: 40px;
  letter-spacing: .03em; max-width: 680px; margin-left: auto; margin-right: auto;
}
.hero-scroll {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 12px; letter-spacing: .1em; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}
.hero-scroll::after {
  content: ''; width: 2px; height: 48px; background: #fff;
  animation: scrollLine 1.5s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(0,0,0,.4);
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Video switch indicators */
.hero-indicators {
  position: absolute; bottom: 120px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 12px; z-index: 3;
}
.hero-indicators button {
  width: 40px; height: 3px; background: rgba(255,255,255,.4);
  border: none; cursor: pointer; border-radius: 2px;
  transition: all .3s;
}
.hero-indicators button.active { background: #fff; width: 60px; }

/* Hero video controls wrapper */
.hero-video-controls {
  position: absolute; bottom: 100px; right: 24px;
  z-index: 3; display: flex; align-items: center; gap: 8px;
}

/* Hero sound toggle */
.hero-sound-toggle {
  position: relative; bottom: auto; right: auto;
  display: flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.15); border-radius: 24px;
  color: rgba(255,255,255,.8); padding: 8px 16px; font-size: 11px; letter-spacing: .02em;
  cursor: pointer; transition: all .3s ease;
}
.hero-sound-toggle i { font-size: 13px; transition: transform .3s; }
.hero-sound-toggle:hover {
  background: rgba(0,0,0,.55); border-color: rgba(255,255,255,.3);
  color: #fff;
}
.hero-sound-toggle.is-playing {
  padding: 8px 12px; border-radius: 50%;
  background: rgba(0,0,0,.3);
}
.hero-sound-toggle.is-playing span { display: none; }

/* Hero fullscreen button — mobile only */
.hero-fullscreen-btn {
  display: none; /* デスクトップ非表示 */
}

/* Hero pause button */
.hero-pause-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,.15); border-radius: 50%;
  background: rgba(0,0,0,.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: rgba(255,255,255,.8); font-size: 13px;
  cursor: pointer; transition: all .3s ease;
}
.hero-pause-btn:hover {
  background: rgba(0,0,0,.55); border-color: rgba(255,255,255,.3); color: #fff;
}

/* === HERO FULLSCREEN MODE === */
.hero-video-wrap:fullscreen,
.hero-video-wrap:-webkit-full-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  width: 100%;
  height: 100%;
}
.hero-video-wrap:fullscreen .vimeo-hero,
.hero-video-wrap:-webkit-full-screen .vimeo-hero {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  max-height: 100vh;
  inset: auto !important;
}
.hero-video-wrap:fullscreen .vimeo-hero > div,
.hero-video-wrap:-webkit-full-screen .vimeo-hero > div {
  position: relative !important;
  width: 100% !important;
  height: 0 !important;
  padding-top: 56.25% !important;
  inset: auto !important;
}
.hero-video-wrap:fullscreen .vimeo-hero iframe,
.hero-video-wrap:-webkit-full-screen .vimeo-hero iframe {
  position: absolute !important;
  top: 0 !important; left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  min-width: 0 !important;
  transform: none !important;
}
.hero-video-wrap:fullscreen .hero-video-controls,
.hero-video-wrap:-webkit-full-screen .hero-video-controls {
  position: fixed;
  bottom: 16px;
  right: 16px;
  top: auto;
  left: auto;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === TV CM BANNER === */
.cm-banner, .cm-banner-hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #0e1535 50%, #1a1a1a 100%);
  padding: 0;
  overflow: hidden;
}
/* PC: ヒーロー内バナーは非表示、外部バナーを表示 */
.cm-banner-hero { display: none; }
.cm-banner-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}
.cm-banner-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1a398f;
  color: #fff;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  white-space: nowrap;
  animation: cmPulse 2.5s ease-in-out infinite;
}
.cm-banner-badge i { font-size: 12px; }
@keyframes cmPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26,57,143,.4); }
  50% { box-shadow: 0 0 10px 3px rgba(26,57,143,.2); }
}
.cm-banner-title {
  color: rgba(255,255,255,.85);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
}

@media (max-width: 768px) {
  body {
    font-family: "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN", "Hiragino Sans", "Meiryo", "メイリオ", "Osaka", "Yu Gothic Medium", "游ゴシック Medium", "Yu Gothic", "游ゴシック", Arial, Helvetica, "MS PGothic", "ＭＳ Ｐゴシック", sans-serif;
  }
  /* TV CM バナー: モバイルではヒーロー内を表示、外部を非表示 */
  .cm-banner-hero { display: block; }
  .cm-banner--pc { display: none; }
  .hero {
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
    padding-top: 72px; /* ヘッダー高さ分を確保 */
    background: #000;
  }
  .hero-video-wrap {
    position: relative;
    width: 100%;
    background: #000;
    line-height: 0;
  }
  .hero-video-wrap video {
    object-fit: contain;
    background: #000;
  }
  /* Vimeo iframe: モバイルでは動画全体を表示 */
  .hero-video-wrap .vimeo-hero {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    inset: auto !important;
    background: #000;
    margin: 0;
    padding: 0;
  }
  .hero-video-wrap .vimeo-hero > div {
    position: relative !important;
    width: 100% !important;
    height: 0 !important;
    padding-top: 56.25% !important;
    inset: auto !important;
    margin: 0;
    background: #000;
  }
  .hero-video-wrap .vimeo-hero iframe {
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    min-width: 0 !important;
    transform: none !important;
    border: none !important;
    display: block;
  }
  .hero-content {
    padding: 16px 20px 24px;
    background: #fff;
    /* モバイル: fade-upアニメーションを無効化し即時表示 */
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero-content .btn-lg {
    min-width: 0 !important;
    padding: 12px 20px;
    font-size: 14px;
  }
  .hero-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .hero-buttons .btn {
    min-width: 0;
    width: 100%;
    text-align: center;
  }
  .hero-scroll { display: none; }
  /* モバイル: カスタムUI表示（音声・一時停止）、全画面ボタンのみ非表示 */
  .hero-video-controls {
    position: absolute;
    bottom: 8px;
    right: 8px;
    top: auto;
    left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
  }
  .hero-sound-toggle {
    padding: 6px 12px;
    font-size: 10px;
    order: 1;
  }
  .hero-sound-toggle i { font-size: 12px; }
  .hero-pause-btn {
    order: 2;
    width: 32px; height: 32px; font-size: 12px;
  }
  .hero-fullscreen-btn {
    display: none !important;
  }
  .cm-banner-inner {
    gap: 10px;
    padding: 10px 0;
  }
  .cm-banner-badge { font-size: 10px; padding: 4px 8px; }
  .cm-banner-title { font-size: 11px; white-space: nowrap; }
}

/* === SECTION TITLES === */
.section-title {
  font-size: clamp(24px, 3.5vw, 40px); text-align: center; margin-bottom: 16px;
  letter-spacing: .02em;
}
@media (max-width: 768px) {
  .svc-content-title { font-size: 18px; }
}
.section-subtitle {
  text-align: center; font-size: 15px; color: #1a1a1a; max-width: 640px;
  margin: 0 auto 56px; line-height: 1.8;
}
.section-label {
  display: inline-block; font-size: 12px; letter-spacing: .15em; text-transform: uppercase;
  color: #1a398f; font-weight: 700; margin-bottom: 12px;
}

/* === WORKS SECTION (Top page) === */
.works-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin-top: 56px;
}
.works-data {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 48px;
}
.works-data-item {
  text-align: center;
}
.works-data-graph {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 0 auto 20px;
}
.works-ring {
  width: 100%;
  height: 100%;
}
.works-data-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.works-data-number em {
  font-style: normal;
  font-size: 64px;
  font-weight: 700;
  color: #1a398f;
  line-height: 1;
}
.works-data-number span {
  font-size: 28px;
  font-weight: 700;
  color: #1a398f;
}
.works-data-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  line-height: 1.6;
}
.works-data-caption {
  font-size: 13px;
  color: #888;
  margin-top: 4px;
}
.works-logos {
  display: flex;
  align-items: center;
  justify-content: center;
}
.works-logos img {
  width: 100%;
  height: auto;
}

/* === ATLAS LAB BANNER === */
.atlas-lab-banner {
  display: flex; align-items: stretch;
  max-width: 1200px; margin: 0 auto;
  border-radius: 12px; overflow: hidden;
  text-decoration: none; color: inherit;
  border: 1px solid #e0e0e0;
  transition: transform .3s ease, box-shadow .3s ease;
}
.atlas-lab-banner:hover {
  transform: translateY(-3px); opacity: 1;
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
}
.atlas-lab-logo {
  flex: 0 0 320px; background: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; overflow: hidden;
}
.atlas-lab-logo img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  display: block;
}
.atlas-lab-body {
  flex: 1; background: #3a2f6b; color: #fff;
  padding: 28px 32px; display: flex; flex-direction: column; justify-content: center;
}
.atlas-lab-headline {
  font-size: 15px; font-weight: 700; line-height: 1.6; margin-bottom: 10px;
}
.atlas-lab-text {
  font-size: 13px; line-height: 1.8; color: #fff;
}

/* SP only utility */
.sp-only { display: none; }
/* PC only br — モバイルで非表示 */
.pc-br { display: inline; }
/* SP only br — デスクトップで非表示 */
.sp-br { display: none; }

/* === VIDEO SECTION === */
.video-embed {
  position: relative; width: 100%; max-width: 960px; margin: 0 auto;
  border-radius: 0; overflow: hidden;
}
.video-embed video { width: 100%; display: block; }
.video-embed iframe { width: 100%; aspect-ratio: 16/9; border: 0; display: block; }
.feature-media video { width: 100%; display: block; }
.feature-media iframe { width: 100%; aspect-ratio: 16/9; border: 0; display: block; }

/* Video Hover Play (共通) */
.video-hover-wrap {
  position: relative;
  cursor: pointer;
}
.video-hover-wrap video {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
}

/* === VIMEO PLAYER WRAPPER === */
.vimeo-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #fff;
  border-radius: 0;
}
/* iframeを1pxずつ拡大してサブピクセル隙間を解消 */
.vimeo-wrap iframe {
  position: absolute !important;
  top: -1px !important; left: -1px !important;
  width: calc(100% + 2px) !important; height: calc(100% + 2px) !important;
  border: none !important;
  outline: none !important;
  display: block;
}
/* video-embed内のVimeo */
.video-embed .vimeo-wrap {
  border-radius: 0;
}
/* feature-media内のVimeo */
.feature-media .vimeo-wrap {
  border-radius: 0;
}
/* ヒーロー動画用Vimeoラッパー（デスクトップ: 全画面カバー） */
@media (min-width: 769px) {
  .hero-video-wrap .vimeo-wrap,
  .hero-video-wrap .vimeo-hero {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    border-radius: 0;
    overflow: hidden;
  }
  .hero-video-wrap .vimeo-hero > div {
    padding: 0 !important;
    position: absolute !important;
    inset: 0;
    width: 100%; height: 100%;
  }
  .hero-video-wrap .vimeo-hero iframe {
    width: 100vw !important;
    height: 56.25vw !important;
    min-height: 100vh !important;
    min-width: 177.78vh !important;
    position: absolute !important;
    top: 50% !important; left: 50% !important;
    transform: translate(-50%, -50%) !important;
  }
}
/* サービスページヒーロー動画用 */
.svc-hero-media .vimeo-wrap {
  border-radius: 0;
  box-shadow: none;
}

/* === CTA SECTION === */
.cta-section {
  background: linear-gradient(135deg, #1a398f, #0e1f4a);
  color: #fff; text-align: center; padding: 80px 24px;
}
.cta-section h2 { font-size: clamp(22px, 3vw, 36px); margin-bottom: 16px; }
.cta-section p { font-size: 15px; opacity: .9; margin-bottom: 36px; }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; font-weight: 600; padding: 14px 32px; border-radius: 8px;
  border: 2px solid transparent; cursor: pointer; transition: all .25s; text-decoration: none;
  white-space: nowrap; box-sizing: border-box;
}
.btn-primary { background: #1a398f; color: #fff; border-color: #1a398f; }
.btn-primary:hover { background: #0e1f4a; border-color: #0e1f4a; opacity: 1; transform: translateY(-1px); }
.btn-shadow { box-shadow: 0 4px 20px rgba(0,0,0,.3); }
.btn-shadow:hover { box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.btn-outline { background: transparent; color: #1a398f; border: 2px solid #1a398f; }
.btn-outline:hover { background: #1a398f; color: #fff; opacity: 1; }
.btn-white { background: #fff; color: #1a398f; border-color: #fff; }
.btn-white:hover { background: #f0f0f0; border-color: #f0f0f0; opacity: 1; }
.btn-dark { background: #1a1a1a; color: #fff; }
.btn-dark:hover { background: #333; opacity: 1; }
.btn-lg { padding: 18px 48px; font-size: 16px; border-radius: 10px; }

/* === FOOTER === */
.site-footer { background: #f5f5f5; color: #333; padding: 56px 0 28px; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1.4fr 1fr 1fr 1fr; gap: 40px;
  margin-bottom: 48px;
}
.footer-brand p { font-size: 13px; color: #666; line-height: 1.8; margin-top: 16px; }
.footer-brand img { height: 28px; filter: none; }
.footer-tel { font-size: 21px; font-weight: 700; color: #333; text-decoration: none; letter-spacing: .02em; margin-top: 4px; margin-bottom: -4px; display: inline-block; pointer-events: none; line-height: 1; }
.footer-hours { font-size: 11px; color: #666; line-height: 1; }
@media (max-width: 768px) { .footer-tel { pointer-events: auto; } }
.footer-links .footer-heading { font-size: 13px; font-weight: 700; margin-bottom: 16px; letter-spacing: .05em; color: #333; margin-top: 0; }
.footer-links .footer-heading a { color: #333; text-decoration: none; padding: 0; font-size: inherit; font-weight: inherit; display: inline; }
.footer-links .footer-heading a:hover { color: #1a398f; }
.footer-links a { display: block; font-size: 13px; color: #666; padding: 4px 0; transition: color .2s; white-space: nowrap; }
.footer-links a:hover { color: #1a398f; opacity: 1; }
.footer-bottom {
  border-top: 1px solid #ddd; padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom p { font-size: 12px; color: #999; }
.footer-bottom-links a { font-size: 12px; color: #999; margin-left: 24px; }
.footer-bottom-links a:hover { color: #1a398f; }

/* === External Link Icon === */
.external-icon { font-size: 0.75em; margin-left: 4px; vertical-align: baseline; opacity: 0.7; }
.header-nav .external-icon { font-size: 10px; }
.mobile-nav .external-icon { font-size: 11px; }
.footer-links .external-icon { font-size: 10px; }

/* === PAGE HERO (sub pages) === */
.page-hero {
  padding: 160px 0 80px; text-align: center;
  background: linear-gradient(180deg, #e1eaf9, #fff);
}
.page-hero h1 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 16px; }
.page-hero p { font-size: 16px; color: #1a1a1a; max-width: 640px; margin: 0 auto; }
.page-hero .breadcrumb {
  display: flex; justify-content: center; gap: 8px; font-size: 13px; color: #1a1a1a;
  margin-top: 24px;
}
.page-hero .breadcrumb a { color: #1a1a1a; }
.page-hero .breadcrumb a:hover { color: #1a398f; }

/* page-hero → コンテンツ間の余白を半分にするユーティリティ */
.page-hero.compact-gap { padding-bottom: 20px; }
.page-hero.compact-gap + .section-padding { padding-top: 25px; }

/* === SERVICE HERO (video right-bleed layout) === */
.svc-hero {
  padding-top: 100px; padding-bottom: 0;
  background: linear-gradient(180deg, #f0f3f8, #fff);
  overflow-x: clip;
}
.svc-hero-inner {
  display: grid; grid-template-columns: 1fr 1.21fr; align-items: center;
  max-width: 1400px; margin: 0 auto; padding-left: 32px;
  padding-bottom: 40px;
}
.svc-hero-text {
  padding-right: 48px;
}
.svc-hero-text h1 {
  font-size: clamp(28px, 4vw, 42px); font-weight: 800; line-height: 1.3; margin-bottom: 16px;
}
.svc-hero-text h1 small { font-size: .55em; color: #1a1a1a; font-weight: 400; }
.svc-hero-text > p {
  font-size: clamp(13px, 1.15vw, 16px); color: #1a1a1a; line-height: 1.8; margin-bottom: 16px;
}
.svc-hero-text .breadcrumb {
  display: flex; gap: 8px; font-size: 13px; color: #1a1a1a;
}
.svc-hero-text .breadcrumb a { color: #1a1a1a; }
.svc-hero-text .breadcrumb a:hover { color: #1a398f; }
.svc-hero-media {
  position: relative; align-self: stretch; display: flex; align-items: stretch;
}
.svc-hero-media .video-embed {
  width: 100%; display: flex;
}
.svc-hero-media video,
.svc-hero-media .new-video-placeholder {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: 12px 0 0 12px;
}
.page-hero.compact-gap + .section-padding-sm { padding-top: 30px; }



/* === COMPANY INFO TABLE === */
.info-table { width: 100%; border-collapse: collapse; }
.info-table tr { border-bottom: 1px solid #eee; }
.info-table tr:first-child { border-top: 1px solid #eee; }
.info-table th {
  padding: 16px 24px; font-size: 16px; font-weight: 600; width: 180px;
  vertical-align: top; color: #333; background: #fafafa; white-space: nowrap;
}
.info-table td { padding: 16px 24px; font-size: 16px; color: #1a1a1a; }

/* === FORM === */
.form-group { margin-bottom: 24px; }
.form-group label { display: block; font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.form-group .required { color: #1a398f; font-size: 12px; margin-left: 4px; }
.form-input {
  width: 100%; padding: 14px 16px; font-size: 16px; border: 1px solid #ddd;
  border-radius: 8px; background: #fff; transition: border-color .2s;
  font-family: inherit;
}
.form-input:focus { outline: none; }
/* ブラウザ自動入力時の青いハイライトを無効化 */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-text-fill-color: #1a1a1a !important;
  border-color: #ddd !important;
  transition: background-color 5000s ease-in-out 0s;
}
.form-input.is-error { border-color: #d70c1e; }
.field-error { display: none; font-size: 12px; color: #d70c1e; margin-top: 4px; }
.field-error.is-visible { display: block; }

/* === STEP FLOW === */
.step-flow {
  display: flex; align-items: flex-start; justify-content: center;
  margin: 0; padding: 0 0 40px;
  position: relative;
  max-width: 480px; margin-left: auto; margin-right: auto;
}
/* 水平接続線（円の中心を通る：最初の円中心～最後の円中心） */
.step-flow::before {
  content: ''; position: absolute;
  top: 16px; /* 円の半径(32/2) */
  left: calc(100% / 6); right: calc(100% / 6);
  height: 2px; background: #c0c8d0;
  z-index: 0;
}
.step-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  position: relative; z-index: 1;
  flex: 1;
  box-shadow: none; border: none; background: none;
}
.step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: #fff; color: #aab4c0;
  border: 2px solid #c0c8d0;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background .3s, border-color .3s, color .3s;
}
.step-label {
  font-size: 13px; font-weight: 500; color: #888;
  white-space: nowrap; line-height: 1;
  transition: color .3s;
}
.step-item.is-active .step-num { background: #1a398f; border-color: #1a398f; color: #fff; }
.step-item.is-active .step-label { color: #333; font-weight: 600; }
.step-item.is-done .step-num { background: #8ea3d2; border-color: #8ea3d2; color: #fff; }
.step-item.is-done .step-label { color: #666; }
@media (max-width: 768px) {
  .step-flow { padding: 0 0 16px; max-width: 360px; }
  .step-flow::before { top: 14px; left: calc(100% / 6); right: calc(100% / 6); }
  .step-num { width: 28px; height: 28px; font-size: 12px; }
  .step-label { font-size: 11px; }
}

textarea.form-input { min-height: 160px; resize: vertical; }

/* === SCROLL ANIMATIONS === */
.fade-up {
  opacity: 0; transform: translateY(40px);
  transition: opacity .7s ease, transform .7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up-delay1 { transition-delay: .1s; }
.fade-up-delay2 { transition-delay: .2s; }
.fade-up-delay3 { transition-delay: .3s; }

/* === SUB NAV (sticky anchor links) === */
.sub-nav-wrap {
  padding: 12px 0;
  background: #fff;
  position: sticky;
  top: 72px;
  z-index: 50;
  border-bottom: 1px solid #f0f0f0;
}
.sub-nav {
  display: flex; flex-wrap: nowrap; justify-content: center; gap: 8px;
}
.sub-nav a {
  padding: 7px 18px; border-radius: 100px; font-size: 12px; font-weight: 600;
  background: #f0f0f0; color: #333; transition: all .2s; white-space: nowrap;
}
.sub-nav a:hover, .sub-nav a.active { background: #1a398f; color: #fff; opacity: 1; }

/* Anchor offset for sticky header + sub-nav */
[id="approach"], [id="renewal"], [id="diagnosis"], [id="cms"] {
  scroll-margin-top: 140px;
}
[id="services"] {
  scroll-margin-top: 80px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .header-nav { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; order: 99; margin-top: 8px; }
  .dropdown-grid { grid-template-columns: 1fr; }
  .works-split { grid-template-columns: 1fr; gap: 40px; }
  .works-data { flex-direction: row; justify-content: center; gap: 40px; }
  .works-data-graph { width: 200px; height: 200px; }
  .works-data-number em { font-size: 52px; }
  .works-data-number span { font-size: 22px; }
}
@media (max-width: 768px) {
  .svc-hero-inner {
    grid-template-columns: 1fr; padding: 0; min-height: auto;
    gap: 0;
  }
  .svc-hero { padding-top: 120px; }
  .svc-hero--fullvideo { padding-top: 120px; }
  /* モバイル並び順: h1→動画→リード文→パンくず */
  .svc-hero-text { padding-right: 0; padding-bottom: 0; display: contents; }
  .svc-hero-text h1 { order: 1; margin-bottom: 16px; text-align: center; padding: 0 24px; }
  .svc-hero-media { order: 2; border-radius: 0; overflow: hidden; margin-bottom: 20px; width: 100%; }
  .svc-hero-text > p { order: 3; text-align: left; margin-bottom: 16px; padding: 0 24px; }
  .svc-hero-text .breadcrumb { display: none !important; }
  .page-hero .breadcrumb { display: none !important; }
  .svc-hero-media video,
  .svc-hero-media .new-video-placeholder {
    border-radius: 0; aspect-ratio: 16/9; height: auto;
  }
  .section-padding { padding: 64px 0; }
  /* モバイル：CTAセクション左寄せ */
  .cta-section { text-align: left; }
  /* モバイル：section-subtitle / page-hero p 左寄せ */
  .section-subtitle { text-align: left; }
  .page-hero p { text-align: left; margin-left: 0; }
  /* モバイル：リンクボタンを100%幅・中央配置 */
  .btn { display: flex; width: 100%; margin-left: auto; margin-right: auto; white-space: normal; }
  .hero-buttons .btn { width: 100%; margin-left: 0; margin-right: 0; }
  .atlas-lab-banner { flex-direction: column; }
  .atlas-lab-logo { flex: 0 0 auto; max-height: 120px; }
  .atlas-lab-body { padding: 20px; }
  .atlas-lab-headline { font-size: 14px; }
  .atlas-lab-text { font-size: 12px; }
  .sub-nav-wrap { padding: 8px 0; top: 64px; }
  .sub-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 0;
  }
  .sub-nav a {
    padding: 6px 0;
    font-size: 11px;
    text-align: center;
    border-radius: 6px;
    white-space: normal;
  }

  .site-footer { padding: 40px 0 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px 16px; margin-bottom: 28px; }
  .footer-brand { grid-column: 1 / -1; order: 99; margin-top: 8px; }
  .footer-brand p { margin-top: 8px; }
  .footer-links .footer-heading { margin-bottom: 8px; font-size: 12px; }
  .footer-links a { font-size: 12px; padding: 3px 0; white-space: normal; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; padding-top: 16px; }
  .footer-bottom-links a { margin-left: 0; margin-right: 16px; }
  .header-inner { padding: 0 16px; }
  .info-table th { width: 100px; padding: 12px 10px; font-size: 12px; white-space: normal; }
  .info-table td { padding: 12px 10px; font-size: 13px; }
  .page-hero { padding: 120px 0 60px; }
  .page-hero.compact-gap { padding-bottom: 30px; }
  .page-hero.compact-gap + .section-padding { padding-top: 32px; }
  .page-hero.compact-gap + .section-padding-sm { padding-top: 30px; }
  .sp-only { display: inline; }
  .pc-br { display: none; }
  .sp-br { display: inline; }
  .works-data { flex-direction: column; gap: 32px; align-items: center; }
  .works-data-graph { width: 180px; height: 180px; }
  .works-data-number em { font-size: 48px; }
  .works-data-number span { font-size: 20px; }
}

/* === BACK TO TOP === */
.back-to-top {
  position: fixed; bottom: 32px; right: 32px; width: 48px; height: 48px;
  background: #1a398f; color: #fff; border: none; border-radius: 50%;
  cursor: pointer; font-size: 20px; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(20px); transition: all .3s; z-index: 900;
  box-shadow: 0 4px 16px rgba(26,57,143,.3);
}
.back-to-top.show { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: #0e1f4a; }

/* === SUB-SERVICE NAV === */
/* === SUB NAV (sticky anchor links) === */

/* === WORKS LOGO GRID (制作実績) === */
.works-logo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.works-logo-card {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: all .35s cubic-bezier(.25,.46,.45,.94);
  text-decoration: none;
  color: inherit;
}
.works-logo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
}
.works-logo-card img {
  width: 100%;
  aspect-ratio: 480/340;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.works-logo-card:hover img { transform: scale(1.03); }
.works-logo-name {
  display: block;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #333;
}

/* === WORKS SLIDER (mobile) === */
.works-slider-wrap { position: relative; }
.works-slider-controls { display: none; }
.works-slider-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid #ddd;
  background: #fff; color: #333; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.works-slider-btn:hover { background: #1a398f; color: #fff; border-color: #1a398f; }
.works-slider-counter { font-size: 13px; color: #888; font-weight: 600; }

/* === EVALUATION GRID (第三者評価実績) === */
.eval-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.eval-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.eval-card-title {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  line-height: 1.5;
  margin-bottom: 12px;
  color: #222;
}
.eval-card-source {
  display: block;
  text-align: center;
  font-size: 12px;
  color: #1a398f;
  text-decoration: none;
  margin-bottom: 16px;
  font-weight: 600;
}
.eval-card-source:hover { text-decoration: underline; }
.eval-card-source i { margin-left: 4px; font-size: 10px; }
.eval-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.eval-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 13px;
  color: #1a1a1a;
  border-bottom: 1px solid #f5f5f5;
}
.eval-list li:last-child { border-bottom: none; }
.eval-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 52px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.eval-badge--gold { background: #fff3cd; color: #856404; }
.eval-badge--silver { background: #e8eaed; color: #495057; }
.eval-badge--rank { background: #1a398f; color: #fff; }
.eval-list-etc {
  font-size: 12px;
  color: #888;
  padding-top: 8px;
  justify-content: flex-end;
}
.eval-sub-group { margin-bottom: 16px; }
.eval-sub-group:last-child { margin-bottom: 0; }
.eval-sub-label {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 2px solid #1a398f;
  display: inline-block;
}

/* Evaluation Logo Grid Mode */
.eval-card-header { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid #f0f0f0; }
.eval-card-header h3 { font-size: 17px; font-weight: 700; line-height: 1.5; margin: 0 0 8px; color: #1a1a1a; }
.eval-card-header .eval-card-source { text-align: left; margin-bottom: 0; }
.eval-logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.eval-logo-item {
  background: #fff; border: none; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px 8px 8px; gap: 0;
}
.eval-logo-item:hover { box-shadow: none; }
.eval-logo-thumb {
  flex: 1; display: flex; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 3/2; min-height: 0;
}
.eval-logo-thumb img { max-width: 85%; max-height: 65%; object-fit: contain; }
.eval-logo-award {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 10px; border-radius: 4px;
  font-size: 16.5px; font-weight: 700; white-space: nowrap; margin-top: 4px;
  line-height: 1.4;
}
.eval-logo-award--gold { background: #fef3cd; color: #856404; }
.eval-logo-award--silver { background: #e8eaed; color: #495057; }
.eval-logo-award--top { background: #1a398f; color: #fff; }
.eval-logo-award--excellent { background: #e8f0fe; color: #1a398f; }
.eval-logo-award--rank { background: #f0f0f0; color: #333; }
.eval-card-note { font-size: 13px; color: #888; margin-top: 12px; text-align: right; }
.eval-sub-title {
  font-size: 13px; font-weight: 700; color: #1a1a1a;
  margin: 16px 0 8px; padding-bottom: 6px;
  border-bottom: 2px solid #1a398f; display: inline-block;
}

/* === WORKS / EVAL RESPONSIVE (must be AFTER global definitions) === */
@media (max-width: 768px) {
  .works-logo-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .eval-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .eval-card { padding: 24px; }
}
@media (max-width: 768px) {
  .works-logo-grid {
    display: flex;
    grid-template-columns: none;
    overflow: visible;
    gap: 0;
    transition: transform .35s ease;
  }
  .works-slider-wrap { overflow: hidden; }
  .works-logo-card {
    min-width: 100%;
    flex-shrink: 0;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
  }
  .works-logo-card:hover { transform: none; }
  .works-logo-card img { aspect-ratio: 480/340; }
  .works-logo-name { font-size: 14px; padding: 12px; white-space: normal; }
  .works-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
  }
  .eval-grid { grid-template-columns: 1fr; gap: 16px; }
  .eval-card { padding: 20px; }
  .eval-card-title { font-size: 14px; }
  .eval-card-header h3 { font-size: 15px; }
  .eval-logo-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
  .eval-logo-item { padding: 8px 6px 6px; }
  .eval-logo-award { font-size: 15px; padding: 2px 8px; }
  .eval-list li { font-size: 12px; gap: 8px; }
  .eval-badge { font-size: 10px; min-width: 44px; padding: 2px 6px; }
}

/* =============================================
   Scroll Fade Indicator — 横スクロール誘導UI
   テーブル右端にグラデーションオーバーレイを表示。
   モバイル（max-width: 1000px）でのみ有効。
   スクロールで右端に近づくとフェードアウト。
   表の fade-up.visible と同時に表示される。
   ============================================= */
.scroll-fade-wrap {
  position: relative;
}
/* グラデーションオーバーレイ（右端） */
.scroll-fade-wrap::after {
  content: '';
  position: absolute;
  top: var(--fade-top, 0px);
  right: 0;
  height: var(--fade-height, 100%);
  width: 48px;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,.85) 100%);
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity .5s;
}
/* モバイルでのみ表示：has-overflow かつ表が visible になったら */
@media (max-width: 1000px) {
  .scroll-fade-wrap.has-overflow.fade-visible::after {
    opacity: 1;
  }
  /* スクロール済み（右端到達）で非表示 */
  .scroll-fade-wrap.has-overflow.fade-visible.scrolled-end::after {
    opacity: 0;
  }
}

/* === Works Industry Pages — Shared Styles === */

/* Filter Section */
.filter-section { margin-top: 16px; margin-bottom: 32px; }
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-label { font-size: 14px; font-weight: 700; color: #333; min-width: 72px; flex-shrink: 0; }
.filter-btn { font-size: 13px; padding: 7px 14px; border: 1px solid #ddd; border-radius: 6px; background: #fff; color: #1a1a1a; cursor: pointer; transition: all .2s; white-space: nowrap; }
.filter-btn:hover { border-color: #1a398f; color: #1a398f; }
.filter-btn.active { background: #1a398f; color: #fff; border-color: #1a398f; }
.filter-result-count { font-size: 14px; color: #888; margin-top: 8px; }

/* Logo Grid */
.logo-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 24px; }
.logo-item { aspect-ratio: 4/3; background: #fff; border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; border: none; cursor: default; padding: 12px; }
.logo-item img { max-width: 80%; max-height: 60%; object-fit: contain; }
.logo-item .logo-fallback { font-size: 12px; color: #888; text-align: center; line-height: 1.4; word-break: break-all; }

/* Logo Grid Responsive */
@media (max-width: 1199px) {
  .logo-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .logo-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .filter-label { min-width: 56px; font-size: 13px; }
  .filter-btn { font-size: 12px; padding: 6px 12px; }
  .filter-row { gap: 6px; }
}
