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

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

  body,
  h1,
  h2,
  h3,
  h4,
  p,
  ul,
  ol,
  figure {
    margin: 0;
  }

  img,
  picture,
  svg,
  video,
  iframe {
    display: block;
    max-width: 100%;
    height: auto;
  }

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

@layer base {
  html {
    color: var(--ikuta-color-ink);
    background: var(--ikuta-color-white);
    scroll-behavior: smooth;
  }

  /* Body copy is gothic and headings are mincho, matching the current site. */
  body {
    min-width: 0;
    font-family: var(--ikuta-font-gothic);
    font-size: var(--ikuta-font-body);
    line-height: var(--ikuta-line-body);
    overflow-wrap: anywhere;
  }

  h1,
  h2,
  h3,
  h4 {
    font-family: var(--ikuta-font-mincho);
  }

  h1,
  h2,
  h3 {
    line-height: var(--ikuta-line-heading);
    text-wrap: balance;
  }

  h1 { font-size: var(--ikuta-font-h1); }
  h2 { font-size: var(--ikuta-font-h2); }
  h3 { font-size: var(--ikuta-font-h3); }

  p,
  li {
    max-width: var(--ikuta-reading);
  }

  a {
    color: var(--ikuta-color-purple);
    text-underline-offset: 0.2em;
  }

  a:hover {
    text-decoration-thickness: 2px;
  }

  :focus-visible {
    outline: 3px solid var(--ikuta-color-focus);
    outline-offset: 3px;
  }

  [hidden] {
    display: none;
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
      scroll-behavior: auto !important;
      transition-duration: 0.01ms !important;
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
    }
  }
}
