/*
 * Base
 * HTML要素の基本設定
 * ---------------------------------------- */
html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-base);
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-heavy);
  line-height: var(--line-height-title);
}

p {
  overflow-wrap: anywhere;
}

img,
video {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}

svg {
  vertical-align: bottom;
}

a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none;
}

/*
 * Focus
 * ---------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 4px;
}

/*
 * Screen reader text
 * ---------------------------------------- */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  white-space: nowrap;
  clip-path: inset(50%);
}

.screen-reader-text:focus {
  z-index: var(--z-modal);
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.5em 1em;
  overflow: visible;
  background-color: var(--color-white);
  clip-path: none;
}

/*
 * Reduced motion
 * ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
