/* グリッドレイアウト */
.post {
  display: grid;
  grid-template-columns: 20px 1fr 20px;
  grid-auto-flow: column;
  /* row-gap: 20px; column-gap: 0px; と同じ */
  gap: 20px 0;
  padding-block: 1rem;

  @media (width >= 768px) {
    /* grid-template-rows:    repeat(12, 1fr);
       grid-template-columns: repeat(5, 1fr); と同じ */
    grid-template: repeat(12, 1fr) / repeat(5, 1fr);
    gap: 0 40px;
    padding-block: 0;
    padding-inline: 30px;
  }

  /* 最大幅を設定、最大幅より画面幅が大きい場合は余白を入れる */
  max-width: 1024px;
  margin-inline: auto;

  /* 書体の指定 */
  font-family: "Noto Sans JP", sans-serif; /* Noto Sans JP 書体 */
  font-optical-sizing: auto;               /* 表示最適化の為に書体の形を変更 */
  font-weight: normal;                     /* 書体の太さ */
  font-style: normal;                      /* 通常normal または 斜体italic */

  /* 錨マーク画像 */
  &::after {
    content: url(images/anchor.svg);
    opacity: 0.15;
    width:  150px;
    height: 150px;
    /* grid-row: 1;
       grid-column: 2; と同じ */
    grid-area: 1 / 2;

    /* align-self: center;
       justify-self: end; と同じ */
    place-self: center end;
  }
}

/* 錨マーク画像 */
@media (width >= 768px) {
  .post::after {
    /* grid-row:    4 / 6;
       grid-column: 3 / 5; と同じ */
    grid-area: 4 / 2 / 6 / 4;
    place-self: center;
  }
}

/* タイトル */
.title {
  grid-area: 1 / 2;
  @media (width >= 768px) {
    grid-area: 1 / 1 / 3 / -1;
    z-index: 10;
    font-size: 3rem;
  }
  align-self: center;

  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1.2;
  /* テキストが親要素幅を超えた際、折り返ししてレイアウト崩れを防ぐ。 */
  word-break: keep-all;
}

/* サブタイトル */
.sub-title {
  grid-area: 2 / 2;
  font-size: 1.5rem;
  @media (width >= 768px) {
    grid-area: 1 / 1 / 3 / -1;
    font-size: 2.75rem;
    place-self: center start;
    margin-block-start: 4rem;
  }
  font-size: 3.75rem;
  color: #ddd;
  font-family: "Montserrat", sans-serif;
  font-weight: 900;
  letter-spacing: 0.5rem;
  line-height: 1;
}

/* 日付 */
.date {
  grid-area:  2 / 2;
  place-self: end;
  margin-block-start: 2rem;
  @media (width >= 768px) {
    grid-area: 1 / 5 / 3 / 5;
    place-self: center end;
  }

  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
}

/* リード文, 文章01, 02 */
.text {
  font-size: 15px;
  @media (width >= 768px) {
    /* 可変フォントサイズ */
    /* 幅が768px以下なら 12px */
    /* 幅が100vw(横幅一杯を1024pxにしたい時) 15px */
    /*
                16px              -------
                   |             /|
               4px |            / |
                   |           /  |
                12px  --------/---+------
                          768px  100vw(=1024px)
                              <-->
                              256px
    */
    /*              最小値                                  最大値 */
    font-size: clamp(12px, 12px + 4 * (100vw - 768px) / 256, 16px);
  }
  line-height: 1.75;
  text-indent: 1rem;
  text-align: justify;
  /* 行を、漢字や句読点の後など、適切な位置で折り返す。 */
  line-break: strict;
}

/* リード文 */
.lead {
  grid-area: 3 / 2;
  @media (width >= 768px) {
    grid-area: 3 / 1 / 5 / 3;
    place-self: center center;
  }
  font-size: larger;
  font-weight: bold;
}

/* 画像01 */
.fig01 {
  grid-area: 4 / 1 / 4 / -1;
  @media (width >= 768px) {
    grid-area: 3 / 3 / 7 / 6;
    img {
      height: 100%;
      width: 100%;
      object-fit: cover;
    }
    margin-inline-end: -30px;
  }
}

/* キャッチコピー */
.catch {
  grid-area: 5 / 2;
  place-self: start end;
  margin-block-start: -2rem;

  @media (width >= 768px) {
    grid-area: 7 / 3 / 7 / -1;
    place-self: center;
    font-size: 1.5rem;
  }
  background: #fff9;
  box-shadow: 0 0 10px 10px #fff9;
  border-radius: 10px;

  line-height: 1.5;
  text-align: center;
  display: grid;
  grid-auto-flow: column;
  column-gap: 5px;

  /* 前後のクォーテーション */
  quotes: "“" "”";
  &::before { content: open-quote; }
  &::after  { content: close-quote; }
  &::before,
  &::after {
    color: #aaa;
    font-size: 3rem;
    font-weight: bold;
  }
}

/* 文章01 */
.text01 {
  grid-area: 6 / 2;
  @media (width >= 768px) {
    grid-area: 5 / 1 / 9 / 3;
  }
}

/* 画像02 */
.fig02 {
  grid-area: 7 / 2;
  @media (width >= 768px) {
    grid-area: 9 / 1 / -1 / 3;
    align-self: center;
  }

  figcaption {
    font-size: smaller;
    font-weight: normal;
  }
}

/* 文章01 */
.text02 {
  grid-area: 8 / 2;
  @media (width >= 768px) {
    grid-area: 8 / 3 / -1 / 5;
  }
}

/* SNSメニュー */
.sns {
  grid-area: 9 / 2;
  justify-self: center;

  @media (width >= 768px) {
    grid-area: 8 / 5 / -1 / 5;
    place-self: center end;
  }

  ul {
    display: grid;
    grid-auto-flow: column;
    column-gap: 20px;
    @media (width >= 768px) {
      grid-auto-flow: row;
      row-gap: 20px;
    }

	  a {
	    font-size: 1.5rem;
	    color: #aaa;
	    text-decoration: none;
	    text-align: center;
      border: 1px solid #aaa;
	    border-radius: 50%;
	    display: block;
      width: 2.5rem;
      height: 2.5rem;
      line-height: 2.5rem;
	  }
	}
}
