/* ============================================================
   detail.css — Service / Works 詳細ページ共通レイアウト
   ============================================================ */

/* ============================ HERO (詳細用) ============================ */
.detail-hero {
  position: relative;
  padding: 70px 0 50px;
  overflow: hidden;
  background: linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
}
.detail-hero .crumbs {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #7a8290;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.detail-hero .crumbs a {
  color: #7a8290;
  transition: color 0.2s;
}
.detail-hero .crumbs a:hover {
  color: var(--pink);
}
.detail-hero .crumbs .sep {
  color: #cfd3df;
}
.detail-hero .eyebrow {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--pink);
  margin: 0 0 16px;
}
.detail-hero h1 {
  font-family: "Inter", sans-serif;
  font-weight: 900;
  font-size: clamp(40px, 6.5vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
}
.detail-hero h1 .accent {
  color: var(--pink);
}
.detail-hero .jp-title {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink-2);
  margin: 0 0 18px;
  letter-spacing: 0.04em;
}
.detail-hero .lead {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 14px;
  color: #3a4250;
  line-height: 1.95;
  max-width: 700px;
  margin: 0 0 22px;
}
.detail-hero .ph-deco {
  position: absolute;
  pointer-events: none;
}
.detail-hero .ph-deco.b1 {
  right: -90px;
  top: -60px;
  width: 340px;
  opacity: 0.55;
}
.detail-hero .ph-deco.b2 {
  right: 6%;
  bottom: 6%;
  width: 120px;
  opacity: 0.85;
}
.detail-hero .ph-deco.dots {
  right: 20%;
  top: 18%;
  width: 80px;
  opacity: 0.6;
}
.detail-hero .ph-deco.spark {
  left: 42%;
  top: 14%;
  width: 34px;
  opacity: 0.9;
}
.detail-hero .meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-top: 18px;
  font-family: "Noto Sans JP";
  font-size: 12px;
  color: #3a4250;
}
.detail-hero .meta-strip .m {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.detail-hero .meta-strip .m .lab {
  font-family: "Inter";
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--pink);
}

/* HERO art (work cover image) */
.detail-cover {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 16/7;
  margin-top: 30px;
  box-shadow: 0 30px 60px -30px rgba(20, 30, 80, 0.18);
}
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================ BODY GRID ============================ */
.detail-body {
  padding: 60px 0 70px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 60px;
  align-items: start;
}

/* TOC sidebar */
.detail-toc {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.detail-toc .label {
  font-family: "Inter";
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #7a8290;
  margin-bottom: 4px;
}
.detail-toc a {
  font-family: "Noto Sans JP";
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-2);
  padding: 8px 12px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s;
}
.detail-toc a:hover,
.detail-toc a.active {
  background: var(--paper-2);
  color: var(--ink);
}
.detail-toc a .num {
  font-family: "Inter";
  font-size: 11px;
  color: #7a8290;
  font-weight: 700;
}

.detail-toc.right-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.toc-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
}
.toc-card h5 {
  font-family: "Inter";
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #7a8290;
  margin: 0 0 14px;
}
.toc-card .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-family: "Noto Sans JP";
  font-size: 13px;
  color: var(--ink);
}
.toc-card .row:last-child {
  border-bottom: 0;
}
.toc-card .row .lab {
  font-size: 11px;
  color: #7a8290;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-family: "Inter";
}
.toc-card .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.toc-card .tag-list span {
  font-size: 10px;
  color: #5b6072;
  background: #f0f1f6;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: "Inter";
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Article content */
.article {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.95;
}
.article > section {
  padding: 14px 0 30px;
}
.article > section + section {
  border-top: 1px dashed var(--line);
}
.article h2 {
  font-family: "Inter", sans-serif;
  font-weight: 900;
  font-size: 32px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 6px;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.article h2 .num {
  font-family: "Inter";
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--pink);
}
.article h2 .jp {
  font-family: "Noto Sans JP";
  font-weight: 700;
  font-size: 13px;
  color: #7a8290;
  letter-spacing: 0.06em;
  margin-left: 6px;
}
.article h3 {
  font-family: "Noto Sans JP";
  font-weight: 700;
  font-size: 18px;
  margin: 30px 0 12px;
  color: var(--ink);
}
.article h3::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--yellow);
  margin-right: 10px;
  vertical-align: middle;
  box-shadow: 0 0 0 3px rgba(229, 255, 61, 0.3);
}
.article p {
  margin: 0 0 14px;
  font-size: 14.5px;
  color: #3a4250;
  line-height: 1.95;
}
.article p strong {
  color: var(--ink);
  font-weight: 700;
}
.article ul {
  margin: 6px 0 18px;
  padding: 0;
  list-style: none;
}
.article ul li {
  padding: 6px 0 6px 26px;
  position: relative;
  font-size: 14px;
  color: #3a4250;
  line-height: 1.85;
}
.article ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--indigo);
  transform: rotate(45deg);
}
.article ul.checks li {
  padding-left: 30px;
}
.article ul.checks li::before {
  content: "✓";
  color: var(--pink);
  background: none;
  font-family: "Inter";
  font-weight: 900;
  width: auto;
  height: auto;
  transform: none;
  top: 6px;
  font-size: 14px;
}
.article .lead {
  font-family: "Noto Sans JP";
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.85;
  margin: 14px 0 22px;
  padding: 18px 22px;
  border-left: 4px solid var(--pink);
  background: #fff5fa;
  border-radius: 6px;
}
.article .callout {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 28px;
  margin: 24px 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: flex-start;
}
.article .callout .ic {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-family: "Inter";
  font-weight: 900;
  font-size: 16px;
}
.article .callout h4 {
  font-family: "Noto Sans JP";
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 6px;
}
.article .callout p {
  margin: 0;
  font-size: 13.5px;
  color: #4b5161;
  line-height: 1.85;
}

/* metric cards */
.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 20px 0 8px;
}
.metric-row.col4 {
  grid-template-columns: repeat(4, 1fr);
}
.metric {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px;
  position: relative;
  overflow: hidden;
}
.metric::after {
  content: "";
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  right: -20px;
  top: -20px;
  opacity: 0.55;
}
.metric:nth-child(4n + 1)::after {
  background: var(--yellow);
}
.metric:nth-child(4n + 2)::after {
  background: #ffb6dd;
}
.metric:nth-child(4n + 3)::after {
  background: #a3b1ff;
}
.metric:nth-child(4n + 4)::after {
  background: #bff5ed;
}
.metric .num {
  font-family: "Inter";
  font-weight: 900;
  font-size: 34px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}
.metric .num small {
  font-size: 14px;
  font-weight: 700;
  margin-left: 2px;
  letter-spacing: 0;
  color: var(--ink-2);
}
.metric .lab {
  font-family: "Noto Sans JP";
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  position: relative;
  z-index: 1;
  margin-top: 6px;
}

/* tech stack table */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 14px 0 22px;
}
.tech-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
}
.tech-card .lab {
  font-family: "Inter";
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--pink);
  margin-bottom: 8px;
}
.tech-card .vals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tech-card .vals span {
  font-family: "Inter";
  font-size: 11px;
  font-weight: 600;
  color: #5b6072;
  background: #f0f1f6;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

/* article gallery / cards */
.feat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 14px 0 22px;
}
.feat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
}
.feat-card .num {
  font-family: "Inter";
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--pink);
  margin-bottom: 8px;
}
.feat-card h4 {
  font-family: "Noto Sans JP";
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 8px;
  line-height: 1.55;
}
.feat-card p {
  font-family: "Noto Sans JP";
  font-size: 12.5px;
  color: #4b5161;
  line-height: 1.85;
  margin: 0;
}

/* nda banner */
.nda-banner {
  background: #fff8e7;
  border: 1px dashed #d4a83c;
  border-radius: 14px;
  padding: 14px 18px;
  margin: 0 0 26px;
  font-family: "Noto Sans JP";
  font-size: 12.5px;
  color: #6b520f;
  line-height: 1.7;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.nda-banner .ic {
  font-family: "Inter";
  font-weight: 900;
  font-size: 13px;
  color: #fff;
  background: #d4a83c;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  flex: none;
}

/* prev/next nav */
.detail-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 30px 0 0;
}
.dn {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    border-color 0.15s;
}
.dn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -16px rgba(20, 30, 80, 0.18);
  border-color: #cfd3ff;
}
.dn .lab {
  font-family: "Inter";
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #7a8290;
}
.dn .title {
  font-family: "Noto Sans JP";
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
.dn.next {
  text-align: right;
}

/* ============== service-listing pieces (used in Service detail hero) ============== */
.service-list-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.svc-hero-art {
  position: relative;
  aspect-ratio: 1/1;
  display: grid;
  place-items: center;
}
.svc-hero-art .glow {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(122, 61, 255, 0.18),
    transparent 70%
  );
}
.svc-hero-art img.icon {
  position: relative;
  z-index: 2;
  max-width: 55%;
  max-height: 55%;
}
.svc-hero-art .deco-blob {
  position: absolute;
  width: 90%;
  height: 90%;
  left: 5%;
  top: 5%;
  opacity: 0.55;
  z-index: 0;
}
.svc-hero-art .deco-spark {
  position: absolute;
  width: 30px;
  z-index: 3;
}
.svc-hero-art .deco-dots {
  position: absolute;
  width: 70px;
  z-index: 1;
  opacity: 0.7;
}

@media (max-width: 980px) {
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .detail-toc {
    position: static;
  }
  .metric-row,
  .metric-row.col4,
  .tech-grid,
  .feat-row {
    grid-template-columns: 1fr 1fr;
  }
  .article h2 {
    font-size: 24px;
  }
  .service-list-hero {
    grid-template-columns: 1fr;
  }
  .detail-cover {
    aspect-ratio: 16/9;
    margin-top: 24px;
  }
}
@media (max-width: 640px) {
  .metric-row,
  .metric-row.col4,
  .tech-grid,
  .feat-row {
    grid-template-columns: 1fr;
  }
  .detail-nav {
    grid-template-columns: 1fr;
  }
  .article h2 {
    font-size: 22px;
    flex-wrap: wrap;
  }
  .detail-hero {
    padding: 40px 0 30px;
  }
  .detail-hero .ph-deco {
    display: none;
  }
  .detail-body {
    padding: 40px 0 50px;
  }
}
