@use '../../_global/styles/mixins' as *;
@use '../../_global/styles/vars' as *;

.intro {
  padding: 0;
  overflow: hidden;
  margin: calc(2vw + 20px) 0 calc(2vw + 30px);

  + #toclist > section:first-child {
    margin-top: 0;
  }

  @media(max-width: 767px) {
    padding: 0;
  }

  h1 {
    position: relative;
    padding-bottom: 0.7em;
    container-type: inline-size;

    &:first-child {
      margin-top: 0.1em;
    }

    &:last-child {
      margin-bottom: 0;
    }

    &:after {
      content: "";
      position: absolute;
      left: 0.05em;
      bottom: calc(0.15em - var(--border-width) / 2);
      height: var(--border-width);
      width: calc(50vw + 460px);
      @include gradient;
      
      @media(max-width: 999px) {
        width: calc(100% + 30px);
      }
    }
  }

  > p:first-of-type, > div.text:first-of-type {
    &::first-letter:not(.no-initial) {
      font-size: 3.3em;
      line-height: 1;
      margin: -0.03em 0.08em -0.2em -0.02em;
      font-weight: 400;
      display: inline-block;
      vertical-align: top;
      float: left;
    }
  }

  .detail-text > *:last-child {
    margin-bottom: 0;
  }
}

[data-browser="firefox"] {
  .intro > p:first-of-type::first-letter,
  .intro > .text:first-of-type::first-letter,
  .initial::first-letter {
    margin-top: 0.113em;
  }
}
