/*
  株式会社X の会社サイト。
  方針：明るいグレーの地に黒い文字。細めの文字と大きな英字の見出し、細い罫線で組み、
  色はトップのうっすらした光だけに使う。
  外部フォントは使わない（プライバシーポリシーの「アクセス解析と Cookie」と合わせる）。
*/
:root {
  color-scheme: light;
  --paper: #efefef;
  --ink: #26292c;
  --muted: #6c7075;
  --rule: #d2d3d4;
  --band: #d9d9d3;
  --band-rule: #a9aaa3;
  --night: #222426;

  --step-0: 1rem;
  --step-1: 1.5rem;
  --display: clamp(2.25rem, 4.6vw, 3.75rem);
  --giant: clamp(3.25rem, 8.5vw, 6.5rem);

  --measure: 38rem;
  --gutter: clamp(1.25rem, 4.5vw, 3.75rem);

  --latin: "Avenir Next", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Yu Gothic", "YuGothic", Meiryo, sans-serif;
  font-feature-settings: "palt";
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: var(--step-0);
  font-weight: 500;
  line-height: 1.9;
  letter-spacing: 0.04em;
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3,
.lead {
  word-break: auto-phrase;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.wrap {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* 小さな見出し：先頭に灰色の点 */
.label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.08em;
}

.label::before {
  content: "";
  flex: none;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

/* ヘッダー */
.site-header {
  position: relative;
  z-index: 1;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  min-height: 5.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.brand img {
  width: 1.5rem;
  height: 1.5rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
}

.nav-cta,
.button {
  display: inline-block;
  font-weight: 700;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transition: background-color 0.2s;
}

.site-nav .nav-cta {
  padding: 0.6rem 1.4rem;
}

.nav-cta:hover,
.button:hover {
  background: #000;
}

.site-nav .nav-cta:hover {
  text-decoration: none;
}

/* ヒーロー：グレーの地に、うっすらした色の光。大きく細い一文 */
.hero {
  position: relative;
  overflow: hidden;
  margin-top: -5.5rem;
}

.glow {
  position: absolute;
  inset: -20% -10% -10% 20%;
  background:
    radial-gradient(closest-side at 30% 40%, rgba(255, 214, 190, 0.75), transparent),
    radial-gradient(closest-side at 70% 60%, rgba(206, 236, 228, 0.8), transparent),
    radial-gradient(closest-side at 55% 25%, rgba(214, 228, 255, 0.8), transparent);
  filter: blur(40px);
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 85%);
  mask-image: linear-gradient(to bottom, #000 45%, transparent 85%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
  min-height: min(50rem, 86vh);
  padding-top: 8rem;
  padding-bottom: 4rem;
}

.hero .lead {
  margin: 1.75rem 0 0;
  font-size: var(--display);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.hero .lead:lang(en) {
  font-family: var(--latin);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero .lead:lang(en) br {
  display: none;
}

/* 事業の図：オリパのカード、OFCeed の盤面を映したスマホ、サーバー */
.hero-art {
  position: relative;
  height: clamp(20rem, 38vw, 32rem);
}

.art {
  position: absolute;
  height: auto;
}

.art-cards {
  left: 0;
  top: 4%;
  width: 46%;
}

.art-phone {
  right: 2%;
  top: 0;
  width: 36%;
}

.art-server {
  left: 26%;
  bottom: 0;
  width: 50%;
}

/* 流れる英字の帯 */
.marquee {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  padding: 1.1rem 0;
  font-family: var(--latin);
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.marquee-track span {
  padding: 0 2rem;
}

.sep {
  width: 0.8em;
  height: 0.8em;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2.5rem;
  margin-top: 3rem;
}

.button {
  padding: 0.95rem 2rem;
  font-size: 0.9375rem;
}

/* 文字と丸い矢印のリンク */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9375rem;
  text-decoration: none;
}

.arrow {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: #fff;
  transition: background-color 0.2s, color 0.2s;
}

.arrow svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.link-arrow:hover .arrow {
  background: var(--ink);
  color: #fff;
}

/* ページを開いたときの一度だけの動き：光がゆっくり灯る（動かない環境でも内容は欠けない） */
@media (prefers-reduced-motion: no-preference) {
  .glow {
    animation: glow-in 2.4s ease-out backwards, drift 18s ease-in-out 2.4s infinite alternate;
  }

  .art {
    animation: float 7s ease-in-out infinite alternate;
  }

  .art-phone {
    animation-duration: 8s;
    animation-delay: -3s;
  }

  .art-server {
    animation-duration: 9s;
    animation-delay: -5s;
  }

  .marquee-track {
    animation: marquee 40s linear infinite;
  }
}

@keyframes glow-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
}

@keyframes drift {
  to {
    transform: translate(-6%, 4%) scale(1.08);
  }
}

@keyframes float {
  from {
    transform: translateY(0) rotate(0deg);
  }
  to {
    transform: translateY(-14px) rotate(1.5deg);
  }
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* セクション */
.section > .wrap {
  padding-top: clamp(5rem, 11vw, 9rem);
  padding-bottom: clamp(5rem, 11vw, 9rem);
}

.section-head {
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.section-head .en {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--latin);
  font-size: var(--giant);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}

.section-head p {
  max-width: var(--measure);
  margin: 2rem 0 0;
  color: var(--muted);
}

/* 事業内容：細い縦線で区切った3列 */
.business {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.business li {
  display: flex;
  flex-direction: column;
  min-height: 30rem;
  padding: 2.5rem 2.5rem 2.75rem;
}

.business li:first-child {
  padding-left: 0;
}

.business li + li {
  border-left: 1px solid var(--rule);
}

.business .icon {
  width: 2.25rem;
  height: 2.25rem;
  stroke-width: 1.8;
}

.business h3 {
  margin: 3.5rem 0 0;
  font-size: var(--step-1);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.business h3:lang(en) {
  font-family: var(--latin);
  font-weight: 600;
  letter-spacing: 0;
}

.business p {
  margin: auto 0 0;
  padding-top: 2.5rem;
  font-size: 0.875rem;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.status::before {
  content: "";
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: currentColor;
}

/* 会社概要：左に見出し、右に表 */
.split > .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 40rem);
  align-items: start;
  gap: 2.5rem 4rem;
}

.split .section-head {
  margin: 0;
}

.profile {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  margin: 0;
  border-top: 1px solid var(--ink);
}

.profile dt,
.profile dd {
  margin: 0;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.profile dt {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 2.2;
}

.profile dd ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 所在地の下の「詳しい所在地は求めに応じて」の一文 */
.profile dd small {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* お問い合わせ：くすんだグレーの帯。左に大きな英字、縦線の右に本文 */
.contact {
  background: var(--band);
}

.contact > .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
  align-items: center;
  gap: 2.5rem 4rem;
}

.contact .section-head {
  margin: 0;
}

.contact-body {
  padding: 0.5rem 0 0.5rem 3rem;
  border-left: 1px solid var(--band-rule);
}

.contact-body p {
  margin: 0;
  font-size: 0.9375rem;
}

.contact-body .mail-line {
  margin: 1.5rem 0;
  font-family: var(--latin);
  font-size: clamp(1.375rem, 2.6vw, 1.75rem);
  letter-spacing: 0.01em;
  line-height: 1.5;
  word-break: break-all;
}

.contact .note {
  color: var(--muted);
  font-size: 0.8125rem;
}

/* 下層ページの頭（受託開発など）：見出しの点・大きな英字・一文 */
.page-head {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}

.page-head .glow {
  inset: -40% -10% -10% 45%;
}

.page-head .wrap {
  position: relative;
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(4rem, 9vw, 7rem);
}

.page-head .en {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--latin);
  font-size: var(--giant);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}

.page-head .lead {
  margin: 2.5rem 0 0;
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

.page-head .lead:lang(en) {
  font-family: var(--latin);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.page-intro {
  max-width: var(--measure);
  margin: 1.75rem 0 0;
  color: var(--muted);
}

.text-link {
  display: inline-block;
  align-self: flex-start;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 700;
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
}

/* できること：細い罫線で区切った並び */
.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}

.services li {
  padding: 2rem 2.5rem 2.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.services h3,
.flow h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.5;
}

.services h3:lang(en),
.flow h3:lang(en) {
  font-family: var(--latin);
  font-weight: 600;
  letter-spacing: 0;
}

.services p,
.flow p {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
}

.services-note {
  max-width: var(--measure);
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

/* 料金と納期：くすんだグレーの帯に表 */
.price-section {
  background: var(--band);
}

.price {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--ink);
  font-size: 0.875rem;
}

.price th,
.price td {
  padding: 1.25rem 1.5rem 1.25rem 0;
  border-bottom: 1px solid var(--band-rule);
  text-align: left;
  vertical-align: top;
}

.price thead th {
  white-space: nowrap;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.price tbody th {
  width: 22%;
  font-size: 1rem;
  font-weight: 700;
}

.price td:nth-child(3) {
  white-space: nowrap;
}

.price .yen {
  padding-right: 0;
  font-size: 1.125rem;
  font-weight: 700;
  white-space: nowrap;
}

.price .yen small {
  display: block;
  max-width: 16rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: normal;
}

.price-notes {
  max-width: 48rem;
  margin: 2rem 0 0;
  padding-left: 1.2em;
  color: var(--muted);
  font-size: 0.8125rem;
}

.price-notes li + li {
  margin-top: 0.4rem;
}

/* 進め方：番号つきの段 */
.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  border-top: 1px solid var(--ink);
}

.flow li {
  counter-increment: step;
  padding: 1.75rem 2rem 2rem 0;
  border-bottom: 1px solid var(--rule);
}

.flow li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-family: var(--latin);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1;
}

/* 文書ページ（プライバシーポリシーなど） */
.doc-head .wrap,
.doc .wrap {
  max-width: calc(var(--measure) + 2 * var(--gutter));
}

.doc-head .wrap {
  padding-top: clamp(3rem, 8vw, 5.5rem);
}

.doc-head h1,
.doc h1 {
  margin: 0;
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.06em;
}

.doc .wrap {
  padding-top: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: clamp(4rem, 9vw, 7rem);
}

.doc h1 {
  margin-bottom: 2rem;
}

.doc h2 {
  margin: 3rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.5;
}

.doc ol,
.doc ul {
  padding-left: 1.4em;
}

.doc .dates {
  margin-top: 3rem;
  color: var(--muted);
  text-align: right;
}

/* フッター */
.site-footer {
  background: var(--night);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8125rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer small {
  font-size: inherit;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 2;
  padding: 0.5rem 1rem;
  background: #fff;
}

@media (max-width: 960px) {
  .business {
    grid-template-columns: minmax(0, 1fr);
  }

  .business li,
  .business li:first-child {
    min-height: 0;
    padding: 2.25rem 0;
  }

  .business li + li {
    border-left: 0;
    border-top: 1px solid var(--rule);
  }

  .business h3 {
    margin-top: 1.5rem;
  }

  .business p {
    padding-top: 1rem;
  }

  .contact > .wrap,
  .split > .wrap,
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero .wrap {
    min-height: 0;
  }

  .hero-art {
    width: min(100%, 30rem);
    height: 18rem;
    justify-self: center;
  }

  .contact-body {
    padding: 2rem 0 0;
    border-left: 0;
    border-top: 1px solid var(--band-rule);
  }

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

  /* 料金表は1行ずつの組に崩す */
  .price thead {
    position: absolute;
    left: -9999px;
  }

  .price,
  .price tbody,
  .price tr,
  .price th,
  .price td {
    display: block;
  }

  .price tr {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--band-rule);
  }

  .price tbody th,
  .price td {
    width: auto;
    padding: 0;
    border: 0;
  }

  .price td {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    gap: 0 1rem;
    margin-top: 0.4rem;
  }

  .price td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.8125rem;
    font-weight: 500;
  }

  .price td:nth-child(3),
  .price .yen {
    white-space: normal;
  }

  .price .yen small {
    grid-column: 2;
  }

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

@media (max-width: 680px) {
  .site-header .wrap {
    flex-wrap: wrap;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .site-nav ul {
    gap: 0.5rem 1.25rem;
  }

  .hero {
    margin-top: 0;
  }

  .hero .wrap {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .hero .lead br {
    display: none;
  }

  .glow {
    inset: -10% -40% 0 0;
  }

  .profile {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile dt {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .profile dd {
    padding-top: 0.25rem;
  }

  .page-head .lead br {
    display: none;
  }

  .flow,
  .services {
    grid-template-columns: minmax(0, 1fr);
  }

  .services li,
  .flow li {
    padding-right: 0;
  }

  .price td {
    grid-template-columns: 5.5rem minmax(0, 1fr);
  }
}
