@import url('_normalize.css');
@import url('_reset.css');

/* 変数
================================ */
:root {
  /* レイアウト */
  --inner-side-padding: 16px;

  /* font-family */
  --font-family-primary: 'Noto Sans JP', sans-serif;

  /* line height */
  --line-height-xl: 2;
  --line-height-lg: 1.8;
  --line-height-heading: 1.5;
  --line-height-body: 1.75;

  /* letter spacing */
  --letter-spacing-body: 0.05em;
  --letter-spacing-lg: 0.1em;

  /* color */
  --color-white: #ffffff;
  --color-primary: #009cde;
  --color-primary2: #7ccbee;
  --color-secondary: #26466d;
  --color-body: #222222;
  --color-surface: #fafafa;
  --color-surface2: #eee4bb;
  --color-background: var(--color-white);
  --color-background2: #fffae5;
  --color-background3: #ebf8ff;
  --color-background4: #bfe6f7;
  --color-on-primary: var(--color-white);
  --color-on-secondary: var(--color-white);

  /* opacity */
  --opacity-hover: 0.8;
}

/* ユーティリティ
================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pc-only {
  display: none;
  @media screen and (min-width: 768px) {
    display: block;
  }
}

.sp-only {
  display: block;
  @media screen and (min-width: 768px) {
    display: none;
  }
}

/* ベース
================================ */
body {
  min-width: 320px;
  font-family: var(--font-family-primary);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.75;
  color: var(--color-body);
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-all;
  background-color: #ffffff;
  position: relative;
}

:where(*) {
  letter-spacing: var(--letter-spacing-body);
}

/* レイアウト
================================ */
.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
}

main {
  flex: 1;
}

.inner {
  width: min(1200px, calc(100% - var(--inner-side-padding) * 2));
  margin-inline: auto;
}

.sectionContainer {
  padding-block: 40px;
  @media screen and (min-width: 768px) {
    padding-block: 96px;
  }

  &:nth-of-type(odd) {
    background-color: var(--color-background3);
  }

  &:nth-of-type(even) {
    background-color: var(--color-background2);
  }
}

.sectionItem:not(:last-of-type) {
  border-bottom: 1px solid var(--color-surface2);
  padding-bottom: 40px;
  margin-bottom: 40px;
  @media screen and (min-width: 768px) {
    padding-bottom: 48px;
    margin-bottom: 48px;
  }
}

.sectionItem {
  .subHeading {
    @media screen and (min-width: 768px) {
      text-align: center;
    }
  }
}

/* コンポーネント
================================ */

/* サブ見出し */
.subHeading {
  font-size: 18px;
  font-weight: bold;
  line-height: 1.5;
  color: var(--color-secondary);
  @media screen and (min-width: 768px) {
    font-size: 24px;
  }
}

.subHeading + * {
  margin-top: 16px;
}

/* 下線見出し */
.decoHeading {
  font-size: 20px;
  font-weight: bold;
  line-height: var(--line-height-body);
  color: var(--color-secondary);
  text-align: center;
  @media screen and (min-width: 768px) {
    font-size: 32px;
    line-height: var(--line-height-heading);
  }

  .large {
    font-size: 28px;
    @media screen and (min-width: 768px) {
      font-size: 42px;
    }
  }

  &::after {
    content: '';
    display: block;
    width: 120px;
    aspect-ratio: 120 / 7;
    background-image: url('../img/deco_heading.svg');
    background-size: contain;
    background-repeat: no-repeat;
    margin-inline: auto;
    margin-top: 13px;
    @media screen and (min-width: 768px) {
      width: 182px;
      margin-top: 24px;
    }
  }

  & + * {
    margin-top: 24px;
    @media screen and (min-width: 768px) {
      margin-top: 48px;
    }
  }
}

.decoHeading + .description + * {
   margin-top: 40px;
    @media screen and (min-width: 768px) {
      margin-top: 32px;
    }
}

/* 説明文 */
.description {
  line-height: var(--line-height-body);
  @media screen and (min-width: 768px) {
    font-size: 18px;
    line-height: var(--line-height-heading);
    text-align: center;
  }

  & + * {
    margin-top: 24px;
    @media screen and (min-width: 768px) {
      margin-top: 32px;
    }
  }
}

/* 動画 */
.video {
  display: block;
  position: relative;
  opacity: 1;
  transition: opacity 0.3s;
  @media (any-hover: hover) {
    &:hover,
    &:focus-visible {
      opacity: var(--opacity-hover);
    }
  }

  &::after {
    content: '';
    display: block;
    position: absolute;
    inset: 0;
    background-image: url('../img/cover_video.png');
    background-size: cover;
  }

  img {
    width: 100%;
  }
}

/* ビデオアイテム */
.videos {
  --videos-column-gap: calc(24 / 1200 * 100%);

  display: flex;
  flex-wrap: wrap;
  gap: 40px var(--videos-column-gap);

  li {
    @media screen and (min-width: 768px) {
      width: calc((100% - var(--videos-column-gap)) / 2);
    }
  }

  .subHeading {
    text-align: center;
  }

  .content {
    margin-top: 16px;
  }
}

/* ゴールリスト */
.goalList {
  --goalList-column-gap: calc(24 / 1200 * 100%);

  display: grid;
  gap: 24px var(--goalList-column-gap);
  counter-reset: goalList;
  @media screen and (min-width: 768px) {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px var(--goalList-column-gap);
  }

  li {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 3;
    gap: 0;
    background-color: var(--color-white);
    counter-increment: goalList;
    padding: 24px 16px;
    @media screen and (min-width: 768px) {
      padding: 24px;
    }
  }

  .heading {
    font-size: 24px;
    font-weight: bold;
    line-height: var(--line-height-lg);
    color: var(--color-primary);
    letter-spacing: var(--letter-spacing-lg); 
    text-align: center;
    background-image: linear-gradient(to right, var(--color-primary) 50%, var(--color-primary2) 50%);
    background-size: 100% 4px;
    background-position: bottom;
    padding-bottom: 4px;
    margin-bottom: 20px;
    @media screen and (min-width: 768px) {
      font-size: 32px;
      padding-bottom: 8px;
      margin-bottom: 24px;
    }
  }

  .heading::before {
    content: '#' counter(goalList);
    display: inline-block;
    font-size: 18px;
    font-weight: bold;
    line-height: var(--line-height-lg);
    color: var(--color-primary2);
    margin-right: 6px;
    @media screen and (min-width: 768px) {
      font-size: 24px;
    }
  }

  .subHeading {
    align-self: center;
    line-height: var(--line-height-body);
    text-align: left;
    @media screen and (min-width: 768px) {
      line-height: var(--line-height-heading);
      text-align: center;
    }
  }

  .subHeading + * {
    margin-top: 8px;
    @media screen and (min-width: 768px) {
      margin-top: 16px;
    }
  }
}

/* ビデオリスト */
.videoList {
  --videoLIst-column-gap: calc(24 / 1200 * 100%);

  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 40px;
  @media screen and (min-width: 768px) {
    row-gap: 32px;
    column-gap: var(--videoLIst-column-gap);
  }

  li {
    @media screen and (min-width: 768px) {
      width: calc((100% - (var(--videoLIst-column-gap) * 2)) / 3);
      margin: 0;
    }
  }

  .heading {
    display: block;
    font-size: 18px;
    font-weight: bold;
    line-height: var(--line-height-heading);
    color: var(--color-on-primary);
    text-align: center;
    background-color: var(--color-primary);
    padding: 8px 12px;
  }

  p {
    margin-top: 16px;
  }
}

/* モーダル */
.mfp-bg {
  background: rgba(34, 34, 34, 0.75);
}

.mfp-iframe-scaler iframe {
  box-shadow: none;
}

.mfp-iframe-holder {
  padding-top: 64px;
  padding-bottom: 64px;
}

.mfp-container {
  padding-left: 0;
  padding-right: 0;
}

.mfp-iframe-holder .mfp-close {
  width: 40px;
  height: 40px;
  border: 2px solid var(--color-white);
  background-image: url('../img/icon_close.svg');
  background-size: 17px 17px;
  background-repeat: no-repeat;
  background-position: center center;
  top: -48px;
  right: 16px;
  opacity: 1;
  transition: opacity 0.3s;
  @media (any-hover: hover) {
    &:hover,
    &:focus-visible {
      opacity: var(--opacity-hover);
    }
  }

  @media screen and (min-width: 768px) {
    right: 0;
  }
}

/* ヘッダー
================================ */
header {
  width: 100%;
  padding-block: 20px;
  @media screen and (min-width: 768px) {
    padding-block: 25px 29px;
  }

  .inner {
    display: flex;
    justify-content: center;
    align-items: end;
    @media screen and (min-width: 768px) {
      justify-content: space-between;
    }
  }

  .companyLogo {
    display: block;
    width: 226px;
    opacity: 1;
    transition: opacity 0.3s;
    @media (any-hover: hover) {
      &:hover,
      &:focus-visible {
        opacity: var(--opacity-hover);
      }
    }
    @media screen and (min-width: 768px) {
      width: 305px;
    }
  }

  .groupLogo {
    display: none;
    opacity: 1;
    transition: opacity 0.3s;
    @media (any-hover: hover) {
      &:hover,
      &:focus-visible {
        opacity: var(--opacity-hover);
      }
    }
    @media screen and (min-width: 768px) {
      display: block;
    }
  }
}

/* メインビジュアル
================================ */
.mv {
  @media screen and (min-width: 1440px) {
    background: linear-gradient(to bottom, #7dd0fc 179px, transparent 179px);
  }

  picture {
    display: block;
    max-width: 1440px;
    background-color: var(--color-background);
    margin-inline: auto;
  }

  picture img {
    width: 100%;
  }
}

/* リード
================================ */
.lead {
  padding-block: 40px;
  @media screen and (min-width: 768px) {
    padding-block: 72px;
  }

  strong {
    display: block;
    font-size: 20px;
    font-weight: bold;
    line-height: var(--line-height-body);
    letter-spacing: var(--letter-spacing-lg);
    color: var(--color-secondary);
    text-align: center;
    margin-bottom: 20px;
    @media screen and (min-width: 768px) {
      font-size: 32px;
      line-height: 1.8;
      margin-bottom: 24px;
    }
  }

  p {
    display: block;
    font-size: 16px;
    font-weight: bold;
    @media screen and (min-width: 768px) {
      font-size: 20px;
      text-align: center;
    }
  }
}

.logoArea {
  display: flex;
  background-color: var(--color-surface);
  padding: 12px var(--inner-side-padding);

  @media screen and (min-width: 768px) {
    display: none;
  }

  a {
    margin-left: auto;
    opacity: 1;
    transition: opacity 0.3s;
    @media (any-hover: hover) {
      &:hover,
      &:focus-visible {
        opacity: var(--opacity-hover);
      }
    }
  }

  img {
    width: 180px;
    margin-left: auto;
  }
}

/* 日本電子計算が2030年度に向けて目指す4つの姿
================================ */
#goal {
  background-color: var(--color-background4);
}

#attempt {
  .videoList {
    p {
      text-align: center;
    }
  }
}

/* フッター
================================ */
footer {
  background-color: var(--color-secondary);
  padding-block: 32px;

  .inner {
    display: flex;
    justify-content: center;
  }

  .copyright {
    display: block;
    font-size: 13px;
    color: var(--color-on-secondary);
  }
}
