/* ===== 前田智也 サイト共通スタイル ===== */
:root {
  --navy: #14213d;
  --navy-light: #1e3a5f;
  --navy-deep: #0d1626;
  --teal: #2dd4bf;
  --amber: #f6b352;
  --gray: #5b6472;
  --bg-soft: #f5f7fa;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Helvetica Neue", Arial, sans-serif;
  color: var(--navy);
  line-height: 1.8;
  background: #ffffff;
  font-feature-settings: "palt";
  text-rendering: optimizeLegibility;
}

a, button, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
}

/* ヘッダー */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e8ecf1;
  box-shadow: 0 8px 24px rgba(13, 22, 38, .04);
}
.nav-link {
  position: relative;
  color: var(--navy);
  font-weight: 500;
  transition: color .2s;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--teal);
  transition: width .25s;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--navy-light); }

/* ハンバーガー */
.hamburger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--navy);
  margin: 6px 0;
  transition: transform .3s, opacity .3s;
}
.hamburger.open span:nth-child(1){ transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2){ opacity: 0; }
.hamburger.open span:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.mobile-menu.open { max-height: 400px; }

/* ボタン */
.btn-primary {
  display: inline-block;
  background: var(--navy-light);
  color: #fff;
  padding: .85rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  line-height: 1.3;
  transition: transform .2s, box-shadow .2s, background .2s;
  box-shadow: 0 6px 18px rgba(20,33,61,.18);
}
.btn-primary:hover { background: var(--navy); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,33,61,.28); }
.btn-accent { background: var(--teal); color: var(--navy-deep); }
.btn-accent:hover { background: #25b3a1; }
.btn-ghost {
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.55);
  color: #fff;
  box-shadow: none;
}
.btn-ghost:hover { background: rgba(255,255,255,.14); border-color: #fff; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* セクション見出し */
.section-title { font-weight: 800; letter-spacing: .02em; line-height: 1.45; }
.section-eyebrow { color: var(--teal); font-weight: 700; letter-spacing: .18em; font-size: .76rem; line-height: 1.5; }

/* カード */
.card {
  background: #fff;
  border: 1px solid #eef1f5;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(20,33,61,.05);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(20,33,61,.10); border-color: rgba(45,212,191,.45); }

/* フェードイン */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ヒーローオーバーレイ */
.hero-overlay { background: linear-gradient(115deg, rgba(13,22,38,.90) 0%, rgba(13,22,38,.72) 43%, rgba(20,33,61,.34) 100%); }

.icon-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 700;
}
.icon-box svg {
  width: 26px;
  height: 26px;
  stroke: var(--navy-light);
}

.service-list li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: .65rem;
  border-radius: 999px;
  background: var(--teal);
  flex: 0 0 auto;
}

.stat-card {
  min-height: 112px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  background: rgba(255,255,255,.045);
  padding: 1.35rem 1rem;
}

.work-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eef1f5;
}

.work-image img,
.service-image img {
  transition: transform .45s ease;
}

.chatbot-work-image {
  aspect-ratio: 1 / 1;
  background: #edf3fb;
}

.chatbot-work-image img {
  object-fit: contain;
}

.chatbot-case-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.chatbot-case-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.card:hover .work-image img,
.card:hover .service-image img {
  transform: scale(1.035);
}

.cta-banner {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 0;
  overflow: hidden;
  background: var(--navy);
}

.cta-banner-image,
.cta-banner-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cta-banner-image {
  object-fit: cover;
}

.cta-banner-overlay {
  background:
    radial-gradient(circle at center, rgba(45,212,191,.20), transparent 34%),
    linear-gradient(90deg, rgba(13,22,38,.72), rgba(13,22,38,.54));
}

.cta-only-button {
  min-width: 220px;
  box-shadow: 0 18px 44px rgba(45,212,191,.24);
}

.flow-diagram {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.flow-diagram::before {
  content: "";
  position: absolute;
  top: 2.15rem;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, rgba(45,212,191,.25), rgba(45,212,191,.9), rgba(30,58,95,.25));
}

.flow-step {
  position: relative;
  display: grid;
  gap: 1rem;
  align-content: start;
}

.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1.78rem;
  right: -.55rem;
  width: .72rem;
  height: .72rem;
  border-top: 2px solid rgba(30,58,95,.35);
  border-right: 2px solid rgba(30,58,95,.35);
  transform: rotate(45deg);
}

.flow-number {
  position: relative;
  z-index: 1;
  width: 4.3rem;
  height: 4.3rem;
  margin: 0 auto;
  border: 1px solid rgba(45,212,191,.35);
  border-radius: 999px;
  background: #fff;
  color: var(--teal);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: 0 14px 34px rgba(20,33,61,.08);
}

.flow-content {
  min-height: 146px;
  padding: 1.4rem 1.25rem;
  border: 1px solid #e8ecf1;
  border-radius: 12px;
  background: #fff;
  text-align: center;
  box-shadow: 0 14px 34px rgba(20,33,61,.06);
}

.flow-label {
  margin-bottom: .45rem;
  color: var(--navy);
  font-weight: 700;
}

.flow-content p:not(.flow-label) {
  color: #667085;
  font-size: .82rem;
  line-height: 1.75;
}

.profile-list {
  border: 1px solid #e8ecf1;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 14px 36px rgba(20,33,61,.06);
}

.profile-list > div {
  padding: 1.35rem 1.5rem;
}

.profile-list > div:nth-child(even) {
  background: #fbfcfd;
}

@media (max-width: 767px) {
  .chatbot-case-card {
    grid-template-columns: 1fr;
  }

  .nav-link::after {
    display: none;
  }

  .btn-primary {
    text-align: center;
  }

  .hero-overlay {
    background: linear-gradient(120deg, rgba(13,22,38,.94) 0%, rgba(20,33,61,.70) 100%);
  }

  .site-header {
    box-shadow: 0 6px 18px rgba(13, 22, 38, .05);
  }

  .cta-banner {
    min-height: 170px;
  }

  .flow-diagram {
    grid-template-columns: 1fr;
    gap: .9rem;
  }

  .flow-diagram::before {
    top: 2rem;
    bottom: 2rem;
    left: 2.15rem;
    right: auto;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, rgba(45,212,191,.25), rgba(45,212,191,.9), rgba(30,58,95,.25));
  }

  .flow-step {
    grid-template-columns: 4.3rem 1fr;
    align-items: stretch;
  }

  .flow-step:not(:last-child)::after {
    top: auto;
    right: auto;
    left: 1.83rem;
    bottom: -.48rem;
    transform: rotate(135deg);
  }

  .flow-number {
    margin: 0;
  }

  .flow-content {
    min-height: auto;
    text-align: left;
  }
}

/* ===== Blog ===== */
.blog-hero {
  padding: 5.25rem 0 4.5rem;
  background: linear-gradient(180deg, #fff 0%, #f6f8fb 100%);
  border-bottom: 1px solid #e8ecf1;
}

.blog-hero h1 {
  color: var(--navy);
  font-size: clamp(2.25rem, 4.25vw, 3.4rem);
  font-weight: 800;
  line-height: 1.18;
}

.blog-hero p {
  max-width: 44rem;
  color: #667085;
  line-height: 1.9;
}

.blog-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.blog-filter {
  min-height: 2.75rem;
  padding: .65rem 1rem;
  border: 1px solid #d9e0e8;
  border-radius: 6px;
  background: #fff;
  color: #475467;
  font-size: .86rem;
  font-weight: 700;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.blog-filter:hover,
.blog-filter[aria-pressed="true"] {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.blog-search {
  position: relative;
  flex: 0 1 21rem;
}

.blog-search svg {
  position: absolute;
  top: 50%;
  left: 1rem;
  width: 1.1rem;
  height: 1.1rem;
  color: #98a2b3;
  transform: translateY(-50%);
  pointer-events: none;
}

.blog-search input {
  width: 100%;
  min-height: 2.75rem;
  padding: .65rem 1rem .65rem 2.75rem;
  border: 1px solid #d9e0e8;
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
  font-size: .9rem;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.blog-search input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, .16);
}

.blog-count {
  margin-bottom: 1.75rem;
  color: #667085;
  font-size: .85rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.blog-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e8ecf1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(20, 33, 61, .06);
  transition: transform .25s ease, box-shadow .25s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(20, 33, 61, .12);
}

.blog-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eef2f6;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.035);
}

.blog-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.4rem;
}

.blog-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem;
  margin-bottom: .85rem;
  color: #667085;
  font-size: .76rem;
}

.blog-category {
  color: #138f82;
  font-weight: 800;
}

.blog-card h2 {
  margin-bottom: .75rem;
  color: var(--navy);
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.55;
}

.blog-card-description {
  margin-bottom: 1.2rem;
  color: #667085;
  font-size: .88rem;
  line-height: 1.8;
}

.blog-read-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: auto;
  color: var(--navy-light);
  font-size: .85rem;
  font-weight: 800;
}

.blog-empty {
  padding: 4rem 1rem;
  border: 1px solid #e8ecf1;
  border-radius: 8px;
  background: #fff;
  color: #667085;
  text-align: center;
}

.article-page {
  padding: 4.5rem 0 5.5rem;
  background: #fff;
}

.article-shell {
  max-width: 54rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.article-back {
  display: inline-flex;
  margin-bottom: 2rem;
  color: var(--navy-light);
  font-size: .88rem;
  font-weight: 800;
}

.article-header {
  margin-bottom: 2.25rem;
}

.article-header h1 {
  margin: .9rem 0 1rem;
  color: var(--navy);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.35;
}

.article-lead {
  color: #667085;
  font-size: 1.03rem;
  line-height: 1.9;
}

.article-cover {
  aspect-ratio: 16 / 9;
  margin-bottom: 3rem;
  overflow: hidden;
  border-radius: 8px;
  background: #eef2f6;
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body {
  color: #344054;
  font-size: 1rem;
  line-height: 2;
}

.article-body h2 {
  margin: 3rem 0 1.1rem;
  padding-left: 1rem;
  border-left: 4px solid var(--teal);
  color: var(--navy);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.55;
}

.article-body p,
.article-body ul {
  margin-bottom: 1.35rem;
}

.article-body ul {
  padding-left: 1.4rem;
  list-style: disc;
}

.article-body li + li {
  margin-top: .55rem;
}

.article-note {
  margin: 2rem 0;
  padding: 1.4rem 1.5rem;
  border-left: 4px solid var(--teal);
  border-radius: 0 6px 6px 0;
  background: #effcf9;
  color: #27435c;
}

.article-footer {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid #e8ecf1;
}

.article-footer p {
  margin-bottom: 1.25rem;
  color: #667085;
  line-height: 1.8;
}

.related-section {
  padding: 4.5rem 0;
  background: var(--bg-soft);
}

.blog-grid-related {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.blog-not-found {
  padding: 5rem 1rem;
  color: #667085;
  text-align: center;
}

.blog-not-found h1 {
  margin: .75rem 0 1.75rem;
  color: var(--navy);
  font-size: 1.8rem;
  font-weight: 800;
}

@media (max-width: 1023px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .blog-hero {
    padding: 3.75rem 0 3.25rem;
  }

  .blog-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .blog-search {
    flex-basis: auto;
    width: 100%;
  }

  .blog-grid,
  .blog-grid-related {
    grid-template-columns: 1fr;
  }

  .article-page {
    padding: 3rem 0 4rem;
  }

  .article-header h1 {
    font-size: 1.9rem;
  }

  .article-cover {
    margin-bottom: 2.25rem;
  }

  .article-body h2 {
    margin-top: 2.4rem;
    font-size: 1.3rem;
  }
}
