/* 株式会社Ferris 会社紹介ページ（ja / en 共通） */

:root {
  color-scheme: light;
  --ink: #111;
  --link: #0645ad;
  --bg: #fff;

  /* 囲みの余白の段階（kokugo yohaku.md）。文字サイズに連動させるため em で持つ */
  --pad-s: 1em;
  --pad-m: 1.5em;

  --lh: 1.8;
  --gutter: max(1rem, 4vw);
}

html:lang(en) {
  --lh: 1.6;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 1rem;
  line-height: var(--lh);
  font-kerning: normal;
  letter-spacing: 0.02em;
}

body:lang(en) {
  letter-spacing: 0;
}

/* 禁則（kokugo kinsoku.md）。break-all は使わない */
:lang(ja) {
  line-break: strict;
  word-break: normal;
  word-break: auto-phrase;
  /* 行頭の括弧の全角アキを詰める（kerning.md） */
  text-spacing-trim: trim-start;
}

/* 分けない語のまとまり。この中では折り返さず、まとまりの間で折り返す */
.nw {
  display: inline-block;
  white-space: nowrap;
}

.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 5rem) var(--gutter) 2.5rem;
}

/* 社名と言語の切り替え */
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  column-gap: 2em;
  row-gap: 0.5em;
  margin-bottom: clamp(2rem, 6vw, 3.5rem);
}

.masthead h1 {
  margin: 0;
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.25rem);
  font-weight: 600;
  line-height: 1.3;
  font-feature-settings: "palt" 1;
  letter-spacing: -0.02em;
}

.lang-switch {
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
}

h2 {
  margin: 0 0 1em;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.5;
  font-feature-settings: "palt" 1;
  letter-spacing: -0.01em;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.06em;
}

/* 会社概要の表。左に項目名、右に値。罫線は横だけ */
.profile {
  width: 100%;
  border-collapse: collapse;
}

.profile tr {
  border-top: 1px solid var(--ink);
}

.profile tr:last-child {
  border-bottom: 1px solid var(--ink);
}

.profile th,
.profile td {
  /* 上下は行送りの余りを引き、見た目の余白を1.5文字分にする（yohaku.md 4節） */
  padding: calc(var(--pad-m) - (var(--lh) - 1) * 0.5em) var(--pad-s);
  vertical-align: top;
  text-align: left;
}

/* 罫線は横だけで、左右の端は開いている。端の文字は社名・見出しと頭をそろえる */
.profile th {
  padding-left: 0;
}

.profile td {
  padding-right: 0;
}

.profile th {
  width: 7em;
  font-weight: 600;
  white-space: nowrap;
}

.profile th:lang(en) {
  width: 10em;
}

.profile td {
  overflow-wrap: break-word;
}

.profile .line {
  display: block;
}

.apps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.apps li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em 0.875em;
}

/* 名前のまとまりが入らない幅では、名前をアイコンの下へ送る */
.apps li > span {
  flex: 1 1 0;
  min-width: min-content;
}

.apps li + li {
  margin-top: 1em;
}

.apps img {
  flex: none;
  width: 3em;
  height: 3em;
  border-radius: 22.5%;
  border: 1px solid rgb(0 0 0 / 0.08);
}

.copy-mark {
  /* ヒラギノの © は小さく描かれるため、ほかの文字の高さに合わせる */
  font-size: 1.3em;
  line-height: 1;
  vertical-align: -0.08em;
}

.mail {
  overflow-wrap: anywhere;
}

footer {
  margin-top: clamp(2.5rem, 8vw, 4rem);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

footer p {
  margin: 0;
}

/* 狭い幅では、項目名を値の上に置く */
@media (max-width: 36em) {
  .profile th,
  .profile td {
    display: block;
    width: auto;
    padding-inline: 0;
  }

  .profile th {
    padding-bottom: 0;
  }

  /* 2つのアプリで折り返しの位置をそろえる */
  .apps .release {
    display: block;
  }

  .profile td {
    padding-top: 0.25em;
  }
}
