/* リセット・基本タイポグラフィ・フォーカス基底・スクロール連動フェードインのユーティリティ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
h1,
h2,
h3,
p,
figure,
figcaption,
dl,
dt,
dd,
ul,
ol,
li,
fieldset,
legend {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

img,
svg,
iframe {
  display: block;
  max-width: 100%;
}

/* hidden 属性のSVG（アイコン定義）は、上の display: block より優先して非表示にする */
svg[hidden] {
  display: none;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input,
textarea {
  font: inherit;
  color: inherit;
}

:root {
  color-scheme: light;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: var(--color-ink-blue);
  background-color: var(--color-surface);
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 768px) {
  body {
    font-size: 17px;
  }
}

h1,
h2,
h3 {
  font-family: var(--font-jp);
  font-weight: 700;
  color: var(--color-ink-blue);
  word-break: keep-all;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(1.75rem, 1.41667rem + 1.66667vw, 2.75rem);
  line-height: 1.4;
  letter-spacing: 0.02em;
}

h2 {
  font-size: clamp(1.375rem, 1.16667rem + 1.04167vw, 2rem);
  line-height: 1.4;
  letter-spacing: 0.02em;
}

h3 {
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

@media (min-width: 768px) {
  h3 {
    font-size: 20px;
  }
}

/* フォーカスリング基底（白地・alt地向け。帯の上は各ファイルで上書きする） */
:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--color-focus-ring-onlight);
  outline-offset: 2px;
}

/* アンカー遷移・フォーカス移動でヘッダーや追従電話バーに隠れないための補正 */
:is(#about, #business, #features, #recruit, #company, #contact) {
  scroll-margin-top: var(--header-h);
}

body {
  scroll-padding-top: var(--header-h);
  scroll-padding-bottom: 0;
}

/* 追従電話バーを表示する768〜1023pxだけ、フォーカスがバーに隠れないよう下側の余白を取る */
@media (min-width: 768px) {
  body {
    scroll-padding-bottom: var(--ctabar-h);
  }
}

@media (min-width: 1024px) {
  body {
    scroll-padding-bottom: 0;
  }
}

/* スクロール連動フェードインのユーティリティ */
.js-motion-ready .u-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur-fade) var(--ease-standard), transform var(--dur-fade) var(--ease-standard);
}

.js-motion-ready .u-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js-motion-ready .u-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* 意味のかたまり単位で折り返す（見出し・重要な短文に使う） */
.u-phrase {
  display: inline-block;
}

/* 本文は対応ブラウザで文節単位の折り返しにする（非対応ブラウザは通常の折り返し） */
p,
li,
dd {
  word-break: auto-phrase;
}
