/* assets/css/styles.css — 統合スタイル */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;700&display=swap');

:root{
  --content-max:1100px;
  --accent:#0b6fb5;
  --muted:#666;
  --card-radius:12px;
  --gap:20px;
  --site-header-h:80px; /* ヘッダーを高く */
  --case-grid-gap:18px;
  --case-card-min-height:160px;
}

/* base */
*, *::before, *::after {
  box-sizing: border-box;
}
html,body{height:100%}
body{
  margin:0;
  font-family:"Noto Serif JP", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", serif;
  color:#222;
  -webkit-font-smoothing:antialiased;
  line-height:1.8; /* 読みやすくゆったりと */
  font-size: 16px;
  padding-top:var(--site-header-h);
  overflow-x: hidden; /* 横スクロール防止 */
  overscroll-behavior-y: none; /* バウンス・リロード演出を無効化 */
}
@media (min-width: 769px) {
  body {
    font-size: 17px; /* PCでは少し文字を大きく */
  }
}

/* Typography Defaults */
h1, h2, h3 {
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0;
}
h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem); /* レスポンシブな見出しサイズ */
  margin-bottom: 32px;
  color: #111;
}
p {
  margin-bottom: 1.5em;
}

/* モバイルでのヘッダーかぶり対策 & ヒーローデザイン調整 */
@media (max-width: 768px) {
  body {
    padding-top: var(--site-header-h);
  }
  .haru-fader {
    margin-top: 0;
    height: auto;
    aspect-ratio: 3/4; /* スマホでは縦長に見せる */
    min-height: auto;
    margin-bottom: 0; /* 下の余白を詰める */
  }
  .haru-fader img.haru-slide {
    object-fit: cover;
    object-position: center;
  }
  .haru-fader .overlay {
    padding: 0 16px;
    background: rgba(0,0,0,0.2);
  }
  
  /* スマホ用ヒーローテキスト調整 */
  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }
  .hero-title {
    font-size: 2.2rem !important;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    margin-bottom: 4px !important;
  }
  .hero-subtitle {
    display: block !important;
    font-size: 0.9rem;
    font-weight: normal;
    opacity: 0.95;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  }
  .hero-desc {
    display: none;
  }
  .hero-cta {
    display: block !important;
    margin-top: 8px !important;
  }
  .hero-cta .cta {
    font-size: 0.85rem;
    padding: 6px 12px;
    background: rgba(11, 111, 181, 0.9);
    backdrop-filter: blur(4px);
  }
}

a{color:var(--accent);text-decoration:none}
.container{max-width:var(--content-max);margin:0 auto;padding:0 16px;box-sizing:border-box}

/* header fixed */
#site-header, .site-header{
  position:fixed;top:0;left:0;right:0;width:100%;
  height:var(--site-header-h);z-index:12000;
  background:#fff;box-shadow:0 2px 8px rgba(0,0,0,0.06);
  box-sizing:border-box;
}
.site-inner{max-width:100%;margin:0 auto;padding:0 16px;box-sizing:border-box;height:100%}
.header-inner{height:100%;display:flex;align-items:center;padding:0 8px;gap:12px}

/* nav */
.main-nav .nav-list{display:flex;gap:24px;align-items:center;margin:0;padding:0;list-style:none}
.nav-link{
  display:inline-block;
  padding:8px 0;
  color:#111; /* 黒に変更 */
  font-weight:600;
  font-size:1rem;
  position:relative;
  transition:color 0.3s;
}
.nav-link:hover, .nav-link:focus{
  color:var(--accent);
  background:transparent;
}

@media (min-width: 769px) {
  .nav-link::after{
    content:'';
    position:absolute;
    bottom:0;
    left:0;
    width:0;
    height:2px;
    background:var(--accent);
    transition:width 0.3s;
  }
  .nav-link:hover::after,
  .nav-link.current::after { /* 現在位置も下線を表示 */
    width:100%;
  }
}

/* Mobile Nav & Responsive Header */
.mobile-only { display: none; }
.desktop-only { display: block; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 12002;
  flex-direction: column;
  gap: 5px;
}
.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #333;
  transition: all 0.3s ease;
}
.nav-toggle.is-active .hamburger-line:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.is-active .hamburger-line:nth-child(2) { opacity: 0; }
.nav-toggle.is-active .hamburger-line:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(255, 255, 255, 0.98);
  z-index: 12001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.mobile-nav.is-active {
  opacity: 1;
  visibility: visible;
}
.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}
.mobile-nav-link {
  display: block;
  padding: 16px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #111; /* 黒に変更 */
  text-decoration: none;
  position: relative; /* 下線のために追加 */
}
.mobile-nav-link.current {
  color: var(--accent); /* 現在地はアクセントカラーに */
}
.mobile-nav-link.current::after {
  content: '';
  display: block;
  width: 40px; /* 短い下線 */
  height: 3px;
  background: var(--accent);
  margin: 4px auto 0; /* 中央寄せ */
}

@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: flex; }
  .nav-toggle { display: flex; }
}

/* hero */
.haru-fader{
  position:relative;
  width:100%;
  overflow:hidden;
  aspect-ratio:16/9;
  background:#fff; /* 黒背景をやめて白に */
  margin-bottom: 24px;
}
.haru-fader img.haru-slide{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:0;
  visibility:hidden;
  transition:opacity 2.5s ease-in-out; /* ゆっくりクロスフェード */
  z-index: 1;
}
.haru-fader img.haru-slide.is-active{
  opacity:1;
  visibility:visible;
  z-index: 2;
}
.haru-fader .overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:20}

/* concept icons */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px; /* 少し広げる */
  margin-top: 24px;
}
.icon-card {
  text-align: center;
  margin: 0;
  padding: 32px 20px;
  background: #fff;
  border: 1px solid #eee; /* 薄い枠線で上品に */
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.icon-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}
.concept-keyword {
  font-family: 'Noto Serif JP', serif;
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 12px;
  font-weight: 700;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
}
.concept-keyword::after {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--accent);
  margin: 6px auto 0;
}
.icon-card figcaption {
  font-weight: 700;
  margin: 0 0 12px;
  font-size: 1.3rem;
  color: #111;
}
.icon-card .description {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.8;
  margin: 0;
}
/* .icon-card .media img は削除されたため不要 */

@media (max-width: 768px) {
  .haru-fader {
    aspect-ratio: 3/2; /* スマホで高さを約1.2倍に */
  }
  .icon-grid {
    grid-template-columns: 1fr; /* スマホで縦並び */
    gap: 16px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* services scroller */
.services-wrap{max-width:100%;margin:0 auto;padding:24px 16px 8px}
.services-scroller{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap:24px;
  justify-content: center;
}
.service-card{
  position: relative;
  border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,0.06);
  min-height:300px;
  transition: transform 0.3s ease;
  overflow: hidden;
  background: #333;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.service-card .card-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

/* 画像を全面に */
.service-card .media {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}
.service-card .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: block;
  margin: 0;
  max-width: none;
}
.service-card:hover .media img {
  transform: scale(1.05);
}

/* コンテンツオーバーレイ */
.service-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 80px 24px 24px;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.85) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none; /* ホバー効果などを邪魔しないように */
}

.service-card figcaption {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  letter-spacing: 0.05em;
}
.service-card .description {
  font-size: 0.95rem;
  margin: 0;
  color: rgba(255,255,255,0.95);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .services-scroller {
    display: flex; /* 横スクロール */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 24px;
    justify-content: flex-start;
  }
  .service-card {
    flex: 0 0 80vw; /* 画面幅の80% */
    width: 80vw;
    min-height: 280px;
    scroll-snap-align: center;
  }
  /* 画像やテキストのスタイルは共通設定を引き継ぐ */
}

@media(max-width:700px){ 
  /* .service-cardのスタイルは上で定義済みのため削除 */
  .container-pad { padding: 20px 16px; }
  h1 { font-size: 1.8rem; }
}

/* cases grid */
.cases-section{padding:48px 0}
.cases-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:var(--case-grid-gap);align-items:start}
@media(max-width:1100px){.cases-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:800px){.cases-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:520px){
  .cases-grid{
    grid-template-columns:repeat(2,1fr); /* スマホでも2列にしてコンパクトに */
    gap: 10px; /* 隙間も少し詰める */
  }
  .case-body { padding: 10px 12px; } /* 余白も調整 */
  .case-title { font-size: 0.9rem; margin-bottom: 4px; } /* 文字サイズ調整 */
  .case-meta { font-size: 0.8rem; }
}

.case-card{
  background:#fff;
  border-radius:10px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  box-shadow:0 6px 20px rgba(0,0,0,0.06);
  min-height:var(--case-card-min-height);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  height: 100%; /* グリッド内で高さを揃える */
}
.case-card:hover {
  box-shadow: 0 12px 30px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.case-media{
  aspect-ratio: 4/3; /* 画像のアスペクト比を固定 */
  overflow:hidden;
  background:#f6f7f8;
  position: relative;
}
.case-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition: transform 0.5s ease;
}
.case-card:hover .case-media img {
  transform: scale(1.05);
}
.case-body{padding:16px 18px 20px;display:flex;flex-direction:column;justify-content:space-between;flex-grow: 1;}
.case-title{
  font-size:1.1rem;
  font-weight:700;
  margin:0 0 8px;
  line-height:1.5;
  color: #111; /* 黒に変更 */
}
.case-meta { font-size: 0.9rem; color: var(--muted); margin-top: auto; }

/* Form Elements Enhancement */
input[type="search"], select, button {
  font-family: inherit;
  font-size: 1rem;
}
input[type="search"]:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}
button { cursor: pointer; }
button:active { transform: translateY(1px); }

/* posts */
.posts-list{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
@media(max-width:1100px){.posts-list{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.posts-list{grid-template-columns:1fr}}
.post-card{background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 6px 18px rgba(0,0,0,0.06)}
.post-thumb{height:140px;overflow:hidden;background:#f3f4f5}
.post-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.post-body{padding:12px}

/* utilities */
.kv-row{display:flex;gap:12px;align-items:center}
.muted{color:var(--muted);font-size:.95rem}
.cta{display:inline-block;padding:10px 14px;border-radius:8px;background:var(--accent);color:#fff;font-weight:700;text-decoration:none}
.container-pad{padding:28px 16px}

/* footer */
.site-footer{background:transparent;padding:28px 0;color:#111;text-align:center}

/* accessibility tweaks */
a:focus-visible{outline:3px solid rgba(11,111,181,.18);outline-offset:3px}

/* responsive */
@media(max-width:700px){ 
  /* .service-cardのスタイルは上で定義済みのため削除 */
  .container-pad { padding: 20px 16px; }
  h1 { font-size: 1.8rem; }
}

/* Desktop Hero Text */
@media (min-width: 769px) {
  .hero-title {
    font-size: clamp(40px, 5vw, 64px) !important; /* デスクトップでより大きく */
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
  }
  .hero-subtitle {
    font-size: clamp(1.2rem, 1.5vw, 1.8rem);
    margin-top: 8px;
    display: block;
  }
  .hero-desc {
    font-size: 1.2rem;
    margin-top: 16px;
  }
  .hero-cta {
    margin-top: 24px !important;
  }
  .hero-cta .cta {
    font-size: 1.1rem;
    padding: 14px 24px;
  }
}

/* Prevent Dragging */
img, a {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
}

/* Responsive Break Utilities */
.sp-br { display: none; }
.pc-inline { display: inline; }
@media (max-width: 768px) {
  .sp-br { display: block; }
  .pc-inline { display: none; }
}
/* Company Table */
.company-table {
  width: 100%;
  border-collapse: collapse;
}
.company-table th,
.company-table td {
  text-align: left;
  padding: 15px 12px;
  border-bottom: 1px solid #ccc;
}
.company-table th {
  width: 180px;
  vertical-align: top;
}
@media (max-width: 768px) {
  .company-table th {
    width: auto;
    white-space: nowrap;
    word-break: keep-all;
    padding-right: 12px;
    min-width: 110px;
  }
}

