/*
 * Nouma service detail — shared tone & manner layer
 * The four Japanese service pages share this file so layout changes never
 * drift between individual services.
 */

:root {
  --tm-ink: var(--kachi);
  --tm-ink-soft: rgba(24, 27, 57, .68);
  --tm-paper: #fff;
  --tm-surface: #f4f6fb;
  --tm-white: #fff;
  --tm-line: rgba(24, 27, 57, .12);
  --tm-line-strong: rgba(24, 27, 57, .22);
  --tm-accent: var(--ajisai-dark);
  --tm-radius: var(--r-card);
  --tm-wrap: 1120px;
  --tm-service-index: "01  /";
  --tm-hero-image: url("/assets/img/34537567_m.jpg");
}

body.tm-standardization {
  --tm-service-index: "01  /";
  --tm-hero-image: url("/assets/img/34537567_m.jpg");
}

body.tm-ax {
  --tm-service-index: "02  /";
  --tm-hero-image: url("/assets/img/ai-implementation-card.jpg");
}

body.tm-bpo {
  --tm-service-index: "03  /";
  --tm-hero-image: url("/assets/img/bpo.jpg");
}

body.tm-incubation {
  --tm-service-index: "04  /";
  --tm-hero-image: url("/assets/img/incubation-card.jpg");
}

body.svc-page.service-brushup {
  color: var(--tm-ink);
  background: var(--tm-paper);
}

body.svc-page .proposal-motion-stage,
body.svc-page .sec-rail {
  display: none !important;
}

body.svc-page .cursor-glow {
  opacity: .35;
}

body.svc-page main.gb {
  overflow: clip;
  background: var(--tm-paper);
}

body.svc-page main.gb > section {
  position: relative;
  min-height: 0;
}

body.svc-page main.gb .container {
  width: min(var(--tm-wrap), calc(100% - 64px));
  max-width: none;
  margin-inline: auto;
  padding-inline: 0;
}

/* Hero — same calm, visual-first proportion used by Company and Services. */
body.svc-page .gb-cover {
  min-height: calc(100svh - 76px);
  height: auto;
  margin-top: 76px;
  display: grid;
  align-items: center;
  padding: clamp(96px, 12vh, 148px) 0 clamp(76px, 10vh, 118px);
  border-bottom: 0;
  overflow: hidden;
  color: var(--tm-ink);
  background: linear-gradient(180deg, #fff 0%, #f8faff 100%);
}

body.svc-page .gb-cover::before {
  position: absolute;
  z-index: 0;
  inset: 0 0 0 auto;
  width: min(58vw, 780px);
  content: "";
  background:
    linear-gradient(90deg, var(--tm-paper) 0%, rgba(255,255,255,.76) 24%, rgba(255,255,255,.08) 78%),
    linear-gradient(180deg, rgba(255,255,255,.7), transparent 35%, rgba(255,255,255,.45)),
    var(--tm-hero-image) center / cover no-repeat;
  opacity: .42;
  filter: grayscale(1) saturate(.65) contrast(.82);
  mask-image: linear-gradient(90deg, transparent 0, #000 27%, #000 100%);
  pointer-events: none;
}

body.svc-page .gb-cover::after {
  display: none;
}

body.svc-page .gb-cover .container {
  z-index: 1;
}

body.svc-page .gb-en {
  margin: 0 0 30px;
  color: var(--tm-ink-soft);
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}

body.svc-page .gb-en::before {
  margin-right: 14px;
  color: var(--tm-accent);
  content: var(--tm-service-index);
}

body.svc-page .gb-cover h1 {
  max-width: 850px;
  margin: 0;
  color: var(--tm-ink);
  font-family: "Noto Serif JP", serif;
  font-size: clamp(48px, 5.15vw, 68px);
  font-weight: 500;
  line-height: 1.38;
  letter-spacing: .025em;
  text-wrap: balance;
}

body.svc-page .gb-lead {
  max-width: 640px;
  margin: 34px 0 0;
  color: rgba(24,27,57,.78);
  font-size: 16px;
  line-height: 2;
  letter-spacing: .055em;
}

body.svc-page .gb-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}

body.svc-page .gb-btn,
body.svc-page .btn-glass {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  border: 1px solid var(--tm-line-strong);
  border-radius: var(--r-pill);
  color: var(--tm-ink);
  background: rgba(255,255,255,.72);
  box-shadow: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .07em;
  text-decoration: none;
  transition: color .25s ease, background .25s ease, border-color .25s ease, transform .25s ease;
}

body.svc-page .gb-btn::after,
body.svc-page .btn-glass::after {
  margin-left: 24px;
  content: "→";
  font-size: 14px;
}

body.svc-page .gb-btn.is-primary {
  border-color: var(--tm-ink);
  color: #fff;
  background: var(--tm-ink);
}

body.svc-page .gb-btn:hover,
body.svc-page .btn-glass:hover {
  color: #fff;
  border-color: var(--tm-ink);
  background: var(--tm-ink);
  transform: translateY(-2px);
}

/* Series navigation replaces the proposal-book table of contents. */
body.svc-page .gb-contents {
  min-height: 0;
  padding: 42px 0 48px;
  background: var(--tm-surface);
}

body.svc-page .gb-contents > .container > .gb-label,
body.svc-page .gb-toc {
  display: none;
}

body.svc-page .gb-series-nav {
  margin: 0;
  padding: 0;
  border: 0;
}

body.svc-page .gb-series-nav > .gb-label {
  display: block;
  margin: 0 0 14px;
  color: var(--tm-ink-soft);
  font-family: Inter, sans-serif;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

body.svc-page .gb-series-nav ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2.2vw, 30px);
  margin: 0;
  padding: 0;
  list-style: none;
}

body.svc-page .gb-series-nav li,
body.svc-page .gb-series-nav li a {
  min-height: 104px;
  height: 100%;
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 18px 4px;
  border: 0;
  border-radius: var(--r-input);
  color: var(--tm-ink);
  background: transparent;
  text-decoration: none;
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

body.svc-page.service-brushup .gb-series-nav.is-flow li::before {
  display: none;
}

body.svc-page .gb-series-nav li {
  padding: 0;
}

body.svc-page.service-brushup .gb-series-nav.is-flow li.is-current {
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 18px 18px 18px 22px;
  color: var(--tm-ink);
  border: 0;
  border-radius: var(--r-input);
  background: rgba(255,255,255,.86);
  box-shadow: inset 3px 0 0 var(--tm-accent);
}

body.svc-page.service-brushup .gb-series-nav.is-flow li.is-current > * {
  color: inherit !important;
}

body.svc-page .gb-series-nav li a:hover {
  background: rgba(255,255,255,.62);
  transform: translateY(-2px);
}

body.svc-page .gb-series-nav span,
body.svc-page .gb-series-nav small {
  display: block;
  color: inherit;
  font-size: 10px;
  letter-spacing: .12em;
  opacity: .66;
}

body.svc-page .gb-series-nav strong {
  display: block;
  color: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

/* Content system shared across service detail pages. */
body.svc-page main.gb > section:not(.gb-cover):not(.gb-contents) {
  padding: var(--sec-y) 0;
  color: var(--tm-ink);
  background: var(--tm-paper);
}

body.svc-page main.gb > section.surface,
body.svc-page main.gb > section:nth-of-type(2n + 3) {
  background: var(--tm-surface);
}

body.svc-page .sec-head {
  width: max-content;
  min-height: 0;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
}

body.svc-page .sec-head .idx,
body.svc-page .sec-head .en {
  color: var(--tm-ink-soft);
  font-family: Inter, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}

body.svc-page .sec-head .idx {
  color: var(--tm-accent);
}

body.svc-page .sec-head .idx::after {
  margin-left: 10px;
  color: var(--tm-line-strong);
  content: "/";
}

body.svc-page .sec-head .ln {
  display: none;
}

body.svc-page main.gb section h2 {
  max-width: 780px;
  margin: 0;
  color: var(--tm-ink);
  font-family: "Noto Serif JP", serif;
  font-size: clamp(34px, 3.55vw, 46px);
  font-weight: 500;
  line-height: 1.48;
  letter-spacing: .045em;
  text-wrap: balance;
}

body.svc-page .sec-lead {
  max-width: 700px;
  margin: 24px 0 0;
  color: var(--tm-ink-soft);
  font-size: 15px;
  line-height: 2;
  letter-spacing: .045em;
}

body.svc-page .gb-fig {
  margin: 54px 0 0;
  padding: clamp(24px, 3.5vw, 44px);
  overflow: hidden;
  border: 1px solid var(--tm-line);
  border-radius: var(--tm-radius);
  background: rgba(255,255,255,.76);
  box-shadow: 0 22px 70px rgba(28,33,64,.045);
}

body.svc-page .gb-fig svg {
  width: 100%;
  height: auto;
}

body.svc-page .gb-fig figcaption {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--tm-line);
  color: var(--tm-ink-soft);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .04em;
}

body.svc-page .deliver-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin-top: 30px;
}

body.svc-page .deliver-grid > *,
body.svc-page .bene > li,
body.svc-page .gb-flow > li {
  border: 1px solid var(--tm-line);
  border-radius: var(--r-card-sm);
  background: rgba(255,255,255,.7);
}

body.svc-page .bene {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

body.svc-page .bene > li {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 28px 28px;
  border: 0;
  border-radius: var(--r-input);
  background: rgba(201,213,238,.2);
}

body.svc-page .bene .b-who {
  color: var(--tm-accent);
  font-size: 10px;
  letter-spacing: .12em;
}

body.svc-page .bene h3 {
  margin: 0 0 12px;
  color: var(--tm-ink);
  font-family: "Noto Serif JP", serif;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.6;
}

body.svc-page .bene p,
body.svc-page .gb-flow p {
  margin: 0;
  color: var(--tm-ink-soft);
  font-size: 13px;
  line-height: 1.85;
}

body.svc-page .grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 52px;
}

body.svc-page .plan.glass {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--tm-line);
  border-radius: var(--tm-radius);
  color: var(--tm-ink);
  background: rgba(255,255,255,.8);
  box-shadow: none;
  backdrop-filter: none;
}

body.svc-page .plan-badge {
  width: max-content;
  margin-bottom: 24px;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  color: #fff;
  background: var(--tm-accent);
  font-size: 9px;
  letter-spacing: .1em;
}

body.svc-page .plan .for,
body.svc-page .plan .period {
  color: var(--tm-ink-soft);
  font-size: 11px;
  line-height: 1.7;
}

body.svc-page .plan h3 {
  min-height: 64px;
  margin: 10px 0 18px;
  color: var(--tm-ink);
  font-family: "Noto Serif JP", serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.5;
}

body.svc-page .plan .price {
  margin: 0;
  color: var(--tm-ink);
}

body.svc-page .plan .price > span {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 52px;
  font-weight: 500;
}

body.svc-page .plan > p:not(.for):not(.price):not(.period) {
  color: var(--tm-ink-soft);
  font-size: 13px;
  line-height: 1.8;
}

body.svc-page .plan .btn {
  margin-top: auto;
}

body.svc-page .stat-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--tm-line);
  border-radius: var(--tm-radius);
  background: var(--tm-ink);
}

body.svc-page .stat-band .sbn {
  padding: 26px;
  color: #fff;
}

body.svc-page .stat-band .sbn + .sbn {
  border-left: 1px solid rgba(255,255,255,.17);
}

body.svc-page .stat-band .kk,
body.svc-page .stat-band .k {
  color: inherit;
  opacity: .66;
  font-size: 9px;
  letter-spacing: .12em;
}

body.svc-page .stat-band .v {
  display: block;
  margin: 14px 0 8px;
}

body.svc-page .stat-band .v > span {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 44px;
}

body.svc-page .gb-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 34px 0 0;
  padding: 0;
  counter-reset: flow;
  list-style: none;
}

body.svc-page .gb-flow > li {
  min-height: 196px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px;
  counter-increment: flow;
}

body.svc-page .gb-flow > li::before {
  color: var(--tm-accent);
  content: "0" counter(flow);
  font: 500 10px/1 Inter, sans-serif;
  letter-spacing: .14em;
}

body.svc-page .gb-flow strong {
  color: var(--tm-ink);
  font-family: "Noto Serif JP", serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
}

body.svc-page .nf-faq {
  margin-top: 46px;
  border-top: 1px solid var(--tm-line);
}

body.svc-page .nf-faq details {
  border-bottom: 1px solid var(--tm-line);
  background: transparent;
}

body.svc-page .nf-faq summary {
  min-height: 80px;
  display: flex;
  align-items: center;
  padding: 20px 52px 20px 0;
  color: var(--tm-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.7;
}

body.svc-page .nf-faq details p {
  max-width: 780px;
  margin: 0;
  padding: 0 0 28px;
  color: var(--tm-ink-soft);
  font-size: 13px;
  line-height: 1.9;
}

/* Closing CTA follows the shared photographic treatment from Services. */
body.svc-page main.gb > #contact {
  min-height: 610px;
  display: grid;
  align-items: center;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(20,25,48,.94) 0%, rgba(20,25,48,.82) 55%, rgba(20,25,48,.52) 100%),
    url("/assets/img/office.jpg") center / cover no-repeat;
}

body.svc-page #contact .sec-head .idx,
body.svc-page #contact .sec-head .en,
body.svc-page #contact h2,
body.svc-page #contact .sec-lead {
  color: #fff;
}

body.svc-page #contact .sec-head .ln {
  background: rgba(255,255,255,.25);
}

body.svc-page #contact .sec-lead {
  opacity: .74;
}

body.svc-page #contact .gb-btn {
  color: #fff;
  border-color: rgba(255,255,255,.42);
  background: transparent;
}

body.svc-page #contact .gb-btn.is-primary {
  color: var(--tm-ink);
  border-color: #fff;
  background: #fff;
}

body.svc-page .gb-next {
  max-width: 620px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 20px;
  margin-top: 52px;
  padding: 22px 0;
  border-top: 1px solid rgba(255,255,255,.25);
  border-bottom: 1px solid rgba(255,255,255,.25);
  color: #fff;
  text-decoration: none;
}

body.svc-page .gb-next .l,
body.svc-page .gb-next small {
  color: inherit;
  font-size: 10px;
  letter-spacing: .09em;
  opacity: .64;
}

body.svc-page .gb-next strong {
  color: inherit;
  font-family: "Noto Serif JP", serif;
  font-size: 17px;
  font-weight: 500;
}

body.svc-page .gb-next::after {
  grid-row: 1 / 4;
  grid-column: 2;
  align-self: center;
  content: "↗";
  font-size: 22px;
}

@media (max-width: 900px) {
  body.svc-page main.gb .container {
    width: min(var(--tm-wrap), calc(100% - 40px));
  }

  body.svc-page .gb-cover {
    margin-top: 64px;
    min-height: calc(100svh - 64px);
    padding: 92px 0 72px;
  }

  body.svc-page .gb-cover::before {
    width: 100%;
    opacity: .22;
    mask-image: linear-gradient(180deg, transparent 0, #000 28%, #000 100%);
  }

  body.svc-page .gb-cover h1 {
    font-size: clamp(38px, 9.8vw, 55px);
    line-height: 1.45;
  }

  body.svc-page .gb-lead {
    font-size: 14px;
    line-height: 1.9;
  }

  body.svc-page .gb-series-nav ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.svc-page .bene,
  body.svc-page .grid3,
  body.svc-page .deliver-grid {
    grid-template-columns: 1fr;
  }

  body.svc-page .plan.glass {
    min-height: 390px;
  }

  body.svc-page .gb-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  body.svc-page main.gb .container {
    width: calc(100% - 40px);
  }

  body.svc-page .gb-cover h1 br:not(.sp-br) {
    display: none;
  }

  body.svc-page .gb-cta {
    display: grid;
  }

  body.svc-page .gb-btn,
  body.svc-page .btn-glass {
    width: 100%;
    justify-content: space-between;
  }

  body.svc-page .gb-flow,
  body.svc-page .stat-band {
    grid-template-columns: 1fr;
  }

  body.svc-page .gb-series-nav ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
  }

  body.svc-page .gb-series-nav li,
  body.svc-page .gb-series-nav li a {
    min-height: 96px;
  }

  body.svc-page .stat-band .sbn + .sbn {
    border-top: 1px solid rgba(255,255,255,.17);
    border-left: 0;
  }

  body.svc-page .gb-flow > li,
  body.svc-page .bene > li {
    min-height: 0;
  }

  body.svc-page .gb-fig {
    margin-inline: -6px;
    padding: 18px;
    border-radius: var(--r-card-sm);
  }

  body.svc-page .gb-fig svg {
    min-width: 690px;
    transform-origin: left top;
  }

  body.svc-page .gb-fig {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.svc-page *,
  body.svc-page *::before,
  body.svc-page *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
