/* Editorial layouts for Service, Company, and Recruit.
   Kept separate from the homepage and game so those can evolve independently. */

.industries-grid > div:first-child { container-type: inline-size; }
html[lang="ja"] .service-industries h2 { font-size: clamp(28px, 10cqi, 54px); }
html[lang="ja"] .company-hero h1 { letter-spacing: -.035em; }
@media (max-width: 360px) {
  html[lang="ja"] body.service-page .service-row h3 { font-size: 25.5px; }
  html[lang="ja"] body.recruit-page .recruit-hero h1 { font-size: 32px; }
  html[lang="ja"] body.recruit-page .recruit-openings h2,
  html[lang="ja"] body.recruit-page .recruit-closing h2 { font-size: 29px; }
}

:is(.service-page, .company-page, .recruit-page) {
  --page-copy: #b9c3d5;
  --page-muted: #a0acc3;
  --page-rule: rgba(190, 198, 226, .17);
  --page-space: clamp(76px, 9vw, 132px);
}

:is(.service-hero-inner, .company-hero-inner, .recruit-hero-inner),
:is(.service-page, .company-page, .recruit-page) main .shell {
  width: min(calc(100% - var(--site-gutter, clamp(24px, 5vw, 80px)) * 2), var(--max));
}

:is(.service-page, .company-page, .recruit-page) main {
  overflow: clip;
}

:is(.service-page, .company-page, .recruit-page) main :is(h2, h3, p, dd),
:is(.service-hero-inner, .company-hero-inner, .recruit-hero-inner) :is(h1, p) {
  overflow-wrap: break-word;
}

:is(.service-page, .company-page, .recruit-page) main :is(h2, h3),
:is(.service-hero-inner, .company-hero-inner, .recruit-hero-inner) h1 {
  text-wrap: balance;
  letter-spacing: -.025em;
}

:is(.service-page, .company-page, .recruit-page) main .section-kicker,
:is(.service-hero-inner, .company-hero-inner, .recruit-hero-inner) .section-kicker {
  color: #b1a6ff;
  line-height: 1.6;
  font-size: 11px;
  letter-spacing: .17em;
}

/* Heroes keep their quiet architectural artwork behind a clear reading area. */
/* Keep the home link above the hero copy's transparent top padding. */
:is(.service-hero, .company-hero, .recruit-hero) .page-breadcrumb {
  z-index: 5;
}

.service-hero,
.company-hero,
.recruit-hero {
  min-height: 0;
  isolation: isolate;
  border-bottom: 1px solid var(--page-rule);
}

.service-hero-inner,
.company-hero-inner,
.recruit-hero-inner {
  padding-top: clamp(172px, 15vw, 208px);
  padding-bottom: clamp(88px, 9vw, 128px);
}

body.service-page .service-hero h1 {
  max-width: calc(100% - 390px);
  margin: 24px 0 32px;
  font-size: clamp(56px, 6.4vw, 90px);
  line-height: 1.17;
  letter-spacing: -.035em;
}

.service-hero h1 em {
  color: #ded8ff;
  text-shadow: none;
}

.service-hero-lead {
  max-width: min(650px, calc(100% - 390px));
  font-family: inherit;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.85;
  color: #d0d7e5;
}

/* Latin translations need a smaller display scale than the short Japanese copy.
   Limit this rule to larger screens so the shared mobile type scale stays intact. */
@media (min-width: 561px) {
  html:is([lang="en"], [lang="es"], [lang="fr"]) body.service-page .service-hero h1 {
    font-size: clamp(44px, 4.6vw, 66px);
    line-height: 1.18;
  }
}

.service-hero-lead br {
  display: none;
}

.service-hero-note {
  max-width: min(630px, calc(100% - 390px));
  color: var(--page-muted);
  line-height: 1.8;
  letter-spacing: .015em;
}

.service-years {
  max-width: 100%;
  margin-top: 46px;
  padding-top: 22px;
  gap: 22px;
  border-top-color: var(--page-rule);
}

.service-years-num {
  font-size: 64px;
  letter-spacing: -.055em;
}

.service-years-copy {
  min-width: 0;
  gap: 8px;
}

.service-years-copy b {
  font-size: 11px;
  line-height: 1.5;
}

.service-years-copy small {
  max-width: 300px;
  color: var(--page-muted);
  font-size: 12px;
  line-height: 1.7;
}

.data-constellation {
  top: 254px;
  right: max(30px, calc((100% - 1240px) / 2));
  width: 390px;
  height: 390px;
  transform: scale(.75);
  transform-origin: center;
  opacity: .78;
  pointer-events: none;
}

.service-orb-a { right: 4%; opacity: .6; }
.service-orb-b { right: -2%; opacity: .5; }

body.company-page .company-hero h1 {
  max-width: 1100px;
  margin: 24px 0 32px;
  font-size: clamp(48px, 6.15vw, 88px);
  line-height: 1.2;
}

.company-hero-lead,
.recruit-hero-lead {
  margin: 28px 0 0;
  color: var(--page-copy);
  max-width: 700px;
  font-size: 17px;
  line-height: 2;
}

.company-symbol {
  top: auto;
  bottom: 26px;
  right: 6%;
  opacity: .14;
  pointer-events: none;
}

body.recruit-page .recruit-hero h1 {
  max-width: 980px;
  margin: 24px 0 28px;
  font-size: clamp(48px, 6.7vw, 94px);
  line-height: 1.2;
}

.recruit-hero h1 span,
.recruit-thinking h2 span,
.recruit-openings h2 span,
.recruit-closing h2 span,
.company-philosophy h2 span,
.company-closing h2 span,
.service-experience h2 span {
  white-space: normal;
}

.recruit-hero-en {
  max-width: 660px;
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: .1em;
}

.recruit-marker {
  top: 250px;
  right: 3%;
  opacity: .45;
  pointer-events: none;
}

.recruit-orbit { opacity: .55; pointer-events: none; }

/* Shared section rhythm and real min-widths protect long translations. */
.service-intro,
.service-industries,
.service-contact,
.company-intro,
.company-story,
.company-philosophy,
.company-info,
.company-closing,
.recruit-thinking,
.recruit-values,
.recruit-openings,
.recruit-closing {
  padding-block: var(--page-space);
}

.service-intro-grid,
.industries-grid,
.service-contact-inner,
.company-intro-grid,
.company-info-grid,
.recruit-thinking-grid,
.recruit-openings-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(40px, 7vw, 100px);
}

:is(.service-intro-grid, .industries-grid, .service-contact-inner,
    .company-intro-grid, .company-info-grid, .recruit-thinking-grid,
    .recruit-openings-grid) > * {
  min-width: 0;
}

.service-intro h2,
.service-industries h2,
.service-contact h2,
.company-intro h2,
.recruit-thinking h2,
.recruit-openings h2 {
  margin: 18px 0 0;
  font-size: clamp(36px, 4.2vw, 62px);
  line-height: 1.35;
}

.service-intro-copy,
.company-intro-copy,
.recruit-thinking-copy {
  padding-top: 6px;
}

.service-intro-copy > p,
.service-row-copy p,
.company-intro-copy p,
.company-philosophy p:not(.section-kicker),
.recruit-thinking-copy p,
.opening-status p:not(.opening-label),
.service-contact-inner > div:last-child p {
  color: var(--page-copy);
  font-size: 15px;
  line-height: 2;
}

.service-flow {
  gap: 11px 8px;
  margin-top: 32px;
  padding: 20px 0;
  color: #d5dbea;
  font-size: 10px;
  line-height: 1.65;
  letter-spacing: .05em;
  border-color: var(--page-rule);
}

.service-flow b { color: #8b96b0; }

/* Each capability is one editorial row, with copy and illustration apart. */
.service-row {
  grid-template-columns: 38px minmax(0, 1.4fr) minmax(240px, .8fr);
  grid-template-rows: auto 1fr;
  gap: 24px clamp(28px, 4vw, 58px);
  align-items: start;
  min-height: 0;
  padding: 76px 0;
  border-top-color: var(--page-rule);
}

.service-row-no {
  grid-column: 1;
  grid-row: 1 / 3;
  padding-top: 5px;
  color: #aaa0ee;
  font-size: 12px;
}

.service-row-title { grid-column: 2; grid-row: 1; }
.service-row-title .section-kicker { margin-top: 0; }

.service-row h3 {
  max-width: 670px;
  margin: 18px 0 0;
  font-size: clamp(34px, 3.8vw, 52px);
  line-height: 1.35;
}

.service-row-copy {
  grid-column: 2;
  grid-row: 2;
  max-width: 630px;
  min-width: 0;
  margin-top: 0;
}

.service-row-copy p:last-child { margin-bottom: 0; }

.service-row > div:last-child {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  justify-self: center;
  width: 100%;
  height: 290px;
  max-width: 360px;
  min-width: 0;
}

.service-principle {
  font-size: 17px !important;
  line-height: 1.9 !important;
}

.crawler-page {
  left: 50%;
  transform: translateX(-50%);
  width: min(215px, 76%);
  top: 20px;
}

.transform-visual {
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
  gap: 20px;
}

.transform-core { width: 64px; height: 64px; }
.format-stack span, .media-stack span { letter-spacing: .05em; }
.smart-photo { display: grid; }
.optimize-visual { border-color: var(--page-rule); }

.industry-cloud {
  justify-content: flex-start;
  gap: 12px 10px;
}

.industry-cloud span {
  padding: 13px 15px;
  color: #c1cadc;
  background: transparent;
  font-size: 10px;
  letter-spacing: .08em;
  line-height: 1.5;
}

.industry-cloud span:nth-child(2n) { transform: none; }

.service-experience {
  min-height: 0;
  padding: var(--page-space) 0;
}

body.service-page .service-experience h2,
.company-philosophy h2,
.company-closing h2,
.recruit-closing h2 {
  max-width: 1100px;
  margin: 24px 0 34px;
  font-size: clamp(42px, 5.4vw, 78px);
  line-height: 1.28;
}

.service-experience p:not(.section-kicker):not(.experience-ghost) {
  color: var(--page-copy);
  font-size: 16px;
  line-height: 2;
}

.service-experience strong,
.company-closing strong,
.recruit-closing strong {
  display: block;
  max-width: 100%;
  margin-top: 36px;
  font-size: clamp(22px, 2.7vw, 36px);
  line-height: 1.5;
  letter-spacing: -.01em;
}

.experience-ghost {
  top: -70px;
  right: 0;
  font-size: clamp(260px, 35vw, 480px);
}

.service-contact-inner { align-items: start; }
.contact-button { line-height: 1.5; }

/* A legible timeline and a restrained, easy-to-scan company fact sheet. */
.company-story-head { margin-bottom: 54px; }
.company-story-head h2 { font-size: clamp(28px, 3.3vw, 46px); line-height: 1.4; }

.story-line {
  grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr) 40px minmax(0, 1fr);
  gap: 15px;
}

.story-line article { padding-right: 0; min-width: 0; }
.story-line h3 { font-size: 24px; line-height: 1.4; }
.story-line p { color: var(--page-copy); line-height: 1.95; }
.story-year { color: #b1a6ff; line-height: 1.5; }
.company-philosophy-inner { max-width: var(--max); }
.company-info-title h2 { font-size: clamp(48px, 5.4vw, 76px); line-height: 1.2; }

.company-facts > div {
  grid-template-columns: minmax(90px, .42fr) minmax(0, 1fr);
  gap: 26px;
  padding: 25px 0;
}

.company-facts dt {
  color: var(--page-muted);
  font-size: 10px;
  line-height: 1.8;
  letter-spacing: .1em;
}

.company-facts dd { font-size: 15px; }
.company-facts small { color: var(--page-muted); line-height: 1.8; }
.company-facts a { text-underline-offset: 5px; }
.company-facts a:hover { text-decoration: underline; }
.company-closing p { max-width: 780px; color: var(--page-copy); font-size: 18px; line-height: 1.9; }

/* Recruiting values remain open columns with a clear, truthful status. */
.recruit-values-grid { margin-top: 34px; border-color: var(--page-rule); }
.recruit-values article { padding: 36px clamp(22px, 3vw, 42px) 40px; min-width: 0; }
.recruit-values article:first-child { padding-left: 0; }
.recruit-values article:last-child { padding-right: 0; }
.recruit-values article > span { color: #b1a6ff; }
.recruit-values h3 { margin-top: 38px; font-size: clamp(28px, 2.8vw, 38px); line-height: 1.3; }
.recruit-values p { color: var(--page-copy); line-height: 1.95; }
.recruit-openings-grid { align-items: center; }
.opening-status { padding: clamp(26px, 3.5vw, 44px); }
.opening-label { max-width: calc(100% - 24px); line-height: 1.7 !important; letter-spacing: .1em; vertical-align: top; }
.status-dot { margin-top: 5px; background: #a89eda; box-shadow: none; }
.opening-status p:nth-of-type(2) { color: #f1eff9; font-size: 17px; }

@media (max-width: 1100px) {
  body.service-page .service-hero h1 { max-width: 780px; }
  .service-hero-lead, .service-hero-note { max-width: 680px; }
  .data-constellation { right: -190px; top: 270px; opacity: .15; }
  .service-orb { opacity: .3; }
  .recruit-marker { right: -90px; opacity: .22; }
  .service-row { grid-template-columns: 30px minmax(0, 1fr) 240px; column-gap: 28px; }
  .service-row > div:last-child { grid-column: 3; }
  .transform-visual { gap: 13px; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); }
  .transform-core { width: 56px; height: 56px; }
}

@media (max-width: 850px) {
  .service-intro-grid,
  .industries-grid,
  .service-contact-inner,
  .company-intro-grid,
  .company-info-grid,
  .recruit-thinking-grid,
  .recruit-openings-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }

  .service-intro-copy, .company-intro-copy, .recruit-thinking-copy { padding-top: 0; }
  .service-row { grid-template-columns: 28px minmax(0, 1fr); gap: 24px; padding: 60px 0; }
  .service-row-no { grid-row: 1 / 4; }
  .service-row > div:last-child { grid-column: 2; grid-row: 3; max-width: 340px; height: 280px; }
  .service-row h3 { max-width: 100%; }
  .company-story-head { margin-bottom: 36px; }
  .story-line { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .story-line article { padding: 20px 0; }
  .story-line i { width: 1px; height: 35px; margin: 0 0 0 8px; }
  .company-symbol { right: -135px; opacity: .09; }
  .recruit-values-grid { grid-template-columns: minmax(0, 1fr); }
  .recruit-values article,
  .recruit-values article:first-child,
  .recruit-values article:last-child { padding: 30px 0; }
  .recruit-values h3 { margin-top: 20px; }
  .recruit-values p { max-width: 600px; }
}

@media (max-width: 560px) {
  .service-hero-inner,
  .company-hero-inner,
  .recruit-hero-inner { padding-top: 164px !important; padding-bottom: 76px; }

  body.service-page .service-hero h1,
  body.company-page .company-hero h1,
  body.recruit-page .recruit-hero h1 {
    max-width: 100%;
    font-size: clamp(37px, 9vw, 50px);
    line-height: 1.3;
    letter-spacing: -.025em;
  }

  html[lang="ja"] body.recruit-page .recruit-hero h1 {
    font-size: clamp(34px, 8.5vw, 48px);
  }

  .service-hero-lead,
  .company-hero-lead,
  .recruit-hero-lead { font-size: 15px; line-height: 2; }
  .service-hero-note { font-size: 12px; }
  .service-years { gap: 18px; margin-top: 32px; }
  .service-years-num { font-size: 54px; }
  .service-years-copy small { font-size: 11px; }
  .data-constellation { right: -270px; top: 260px; opacity: .1; }
  .service-orb, .recruit-orbit { opacity: .18; }
  .recruit-marker { right: -230px; top: 240px; opacity: .17; }

  .service-intro h2,
  .service-industries h2,
  .service-contact h2,
  .company-intro h2,
  .recruit-thinking h2,
  .recruit-openings h2 {
    font-size: clamp(31px, 8.2vw, 43px);
    line-height: 1.4;
  }

  .service-row { grid-template-columns: 22px minmax(0, 1fr); gap: 20px 12px; padding: 48px 0; }
  .service-row h3 { font-size: clamp(28px, 7.5vw, 38px); line-height: 1.4; }
  .service-row-copy p { font-size: 14px; }
  .service-row > div:last-child { grid-column: 1 / -1; max-width: 300px; height: 270px; }
  .service-row-title .section-kicker { font-size: 9px; letter-spacing: .12em; }
  .service-principle { font-size: 16px !important; }
  .service-flow { font-size: 9px; gap: 10px 7px; letter-spacing: 0; }
  .smart-card { width: 220px; height: 245px; }
  .smart-photo { height: 140px; }

  body.service-page .service-experience h2,
  .company-philosophy h2,
  .company-closing h2,
  .recruit-closing h2 {
    font-size: clamp(34px, 8.5vw, 46px);
    line-height: 1.35;
  }

  .company-story-head h2 { font-size: clamp(24px, 6.7vw, 34px); }
  .company-info-title h2 { font-size: 52px; }
  .company-facts > div { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 23px 0; }
  .company-facts dd { font-size: 14px; }
  .company-closing p { font-size: 16px; }
  .opening-status { padding: 24px; }
  .opening-label { font-size: 9px !important; letter-spacing: .06em; }
  .experience-ghost { top: -12px; right: -20px; }
}

@media (prefers-reduced-motion: reduce) {
  .data-constellation i,
  .crawler-beam,
  .opt-pulse { animation: none; }
  .contact-button { transition: none; }
  .contact-button:hover { transform: none; }
}
