@charset "UTF-8";

/* 3分でわかる泰明商会（src/pages/overview-3min/index.astro の <style>） */

  .subpage-mv-overview-3min{
    height: 75rem;
    position: relative;
    @media screen and (max-width: 768px) {
      height: auto;
    }
    &> picture{
      height: 100%;
      position: absolute;
      inset: 0;
      z-index: 0;
      img{
        height: 100%;
        object-fit: cover;
      }
    }
    .inner{
      position: relative;
      z-index: 2;
      height: 100%;
      display: flex;
      align-items: center;
    }
    .texts{
      padding-block: 8rem 12rem;
      @media screen and (max-width: 768px) {
        padding-block: 8rem 10rem;
      }
      .title{
        .en{
          font-size: 1.6rem;
          @media screen and (max-width: 768px) {
            font-size: 1.4rem;
          }
        }
        h1{
          font-size: 5.6rem;
          line-height: 1.25;
          margin-top: 0.2em;
          @media screen and (max-width: 768px) {
            font-size: 3rem;
          }
        }
      }
      .readText{
        margin-top: 5rem;
        @media screen and (max-width: 768px) {
          margin-top: 2.4rem;
        }
      }
    }
  }

  .page-overview-3min{
    /* intro */
    .intro{
      padding-block: 7rem 10rem;
      @media screen and (max-width: 768px) {
        padding-block: 4rem 4rem;
      }
      .texts{
        display: flex;
        justify-content: space-between;
        @media screen and (max-width: 768px) {
          flex-direction: column;
          gap: 2.4rem;
        }
        h2{
          font-size: 4.4rem;
          line-height: 1.5;
          font-feature-settings: "palt";
          margin-top: calc((1em - 1lh) / 2);
          @media screen and (max-width: 768px) {
            font-size: 2.4rem;
          }
        }
        .readText{
          width: 80rem;
          flex-shrink: 0;
          @media screen and (max-width: 768px) {
            width: 100%;
          }
        }
      }
      .image{
        margin-top: 6rem;
        @media screen and (max-width: 768px) {
          margin-top: 4rem;
          overflow-x: auto;
        }
        img{
          @media screen and (max-width: 768px) {
            width: 200%;
            max-width: none;
          }
        }
      }
    }
    /* business */
    .business{
      padding-block: 8rem 10rem;
      @media screen and (max-width: 768px) {
        padding-block: 4rem;
      }
      .business-figure{
        .section-hd{
          display: flex;
          align-items: center;
          gap: 0.25em;
        }
        .texts{
          display: flex;
          justify-content: space-between;
          margin-top: 3rem;
          @media screen and (max-width: 768px) {
            flex-direction: column;
            gap: 2.4rem;
            margin-top: 2rem;
          }
          h2{
            font-size: 4.4rem;
            line-height: 1.5;
            font-feature-settings: "palt";
            margin-top: calc((1em - 1lh) / 2);
            @media screen and (max-width: 768px) {
              font-size: 2.4rem;
            }
          }
          .readText{
            width: 80rem;
            flex-shrink: 0;
            @media screen and (max-width: 768px) {
              width: 100%;
            }
          }
        }
        /* 2つの事業部の図。装飾（帯・点線リング）だけ SVG で、円と文字は HTML。
           円・ロゴ・SVG はデザインの座標 × --u で置く（PC は viewBox の 1 = 0.1rem）。
           SP は中央部分（ロゴ・円・帯・リング）を縮小して残し、左右の業務を下に回す */
        .figure{
          --u: 0.1rem;
          --ox: 0;
          position: relative;
          height: calc(431.77 * var(--u));
          margin-top: 8rem;
          @media screen and (max-width: 768px) {
            /* 点線リングの外周（x 236.5〜1162.5 = 926）を左右パディング 2rem の内側（33.5rem）にちょうど収める */
            --u: calc(33.5rem / 926);
            --ox: 236.5;
            height: auto;
            margin-top: 4rem;
          }
          .figure-bg{
            position: absolute;
            top: 0;
            left: calc(var(--ox) * var(--u) * -1);
            width: calc(1399.28 * var(--u));
            height: calc(431.77 * var(--u));
            max-inline-size: none; /* リセットの max-inline-size: 100% で SP の図が縮むのを防ぐ */
            overflow: visible;
          }
          .lens{
            fill: var(--white);
            opacity: 0.4;
            transition: opacity 1s ease 0.5s;
            @media (prefers-reduced-motion: reduce) {
              transition: none;
            }
          }
          .ring{
            fill: none;
            stroke: var(--black);
            stroke-dasharray: 0 4;
            stroke-linecap: round;
            transition: opacity 1s ease 0.3s, rotate 1.6s var(--easing) 0.3s;
            /* 縮小すると点が細かく潰れるので、SP は線を太く・間隔を広くして見た目を揃える */
            @media screen and (max-width: 768px) {
              stroke-width: 2.5;
              stroke-dasharray: 0 10;
            }
            @media (prefers-reduced-motion: reduce) {
              transition: none;
            }
            &.is-social{
              transform-origin: 452.91px 215.88px;
            }
            &.is-industrial{
              transform-origin: 944.58px 215.88px;
            }
          }
          /* SP の業務は各円の真下に揃える。列幅を「図の左端〜円の中心」の2倍にして両端に寄せると、列の中心が円の中心と一致する */
          dl{
            @media screen and (max-width: 768px) {
              display: grid;
              grid-template-columns: repeat(2, calc((452.91 - var(--ox)) * 2 * var(--u)));
              justify-content: space-between;
              padding-top: calc(431.77 * var(--u) + 1.2rem);
            }
          }
          .unit{
            &.is-social{
              --x: 312.79;
              --tasks-inline: 0 auto;
              --outer: linear-gradient(147deg, #338cdd 30%, #2e65a6 77%);
              --inner: linear-gradient(342deg, #338cdd 14%, #2e65a6 91%);
              --arrow: polygon(0 0, 78.12% 0, 100% 50%, 78.12% 100%, 0 100%);
              --from: -3rem 0;
              --pl: 0;
              --pr: 3.6rem;
            }
            &.is-industrial{
              --x: 804.46;
              --tasks-inline: auto 0;
              --outer: linear-gradient(90deg, #338cdd, #2e65a6);
              --inner: linear-gradient(336deg, #338cdd 28%, #2e65a6 83%);
              --arrow: polygon(21.88% 0, 100% 0, 100% 100%, 21.88% 100%, 0 50%);
              --from: 3rem 0;
              --pl: 3.6rem;
              --pr: 0;
            }
          }
          .name{
            position: absolute;
            top: calc(75.76 * var(--u));
            left: calc((var(--x) - var(--ox)) * var(--u));
            width: calc(280.24 * var(--u));
            aspect-ratio: 1;
            border-radius: 50%;
            display: grid;
            place-content: center;
            gap: 1.8rem;
            isolation: isolate;
            text-align: center;
            color: var(--white);
            background: var(--outer);
            transition: opacity 0.8s ease, scale 1.2s var(--easing);
            @media screen and (max-width: 768px) {
              gap: 0.4rem;
            }
            @media (prefers-reduced-motion: reduce) {
              transition: none;
            }
            /* 内側の円（太さ 13.66 / 直径 280.24） */
            &::before{
              content: "";
              position: absolute;
              inset: 4.875%;
              z-index: -1;
              border-radius: 50%;
              background: var(--inner);
            }
            .en{
              font-size: 1.4rem;
              color: #eaedef;
              @media screen and (max-width: 768px) {
                font-size: 0.8rem;
              }
            }
            .ja{
              font-size: 3rem;
              line-height: 1.4;
              @media screen and (max-width: 768px) {
                font-size: 1.3rem;
              }
            }
          }
          .tasks{
            position: absolute;
            top: 5.897rem;
            inset-inline: var(--tasks-inline);
            display: grid;
            gap: 3.484rem;
            @media screen and (max-width: 768px) {
              position: static;
              gap: 0.8rem;
            }
            li{
              width: 30.095rem;
              height: 13.949rem;
              display: grid;
              place-content: center;
              padding-inline: var(--pl) var(--pr);
              font-size: 2rem;
              line-height: 1.5;
              font-feature-settings: "palt";
              letter-spacing: 0.04em;
              text-align: center;
              background-color: var(--white);
              clip-path: var(--arrow);
              transition: opacity 0.8s ease 0.55s, translate 1.2s var(--easing) 0.55s;
              @media screen and (max-width: 768px) {
                --pl: 0;
                --pr: 0;
                /* 円に向かう上向きの矢印。PC と同じ角度だと家形になるので先端は浅くする */
                --tip: 1.4rem;
                --arrow: polygon(0 var(--tip), 50% 0, 100% var(--tip), 100% 100%, 0 100%);
                --from: 0 2rem;
                width: auto;
                height: calc(7rem + var(--tip));
                padding-top: var(--tip);
                font-size: 1.2rem;
              }
              @media (prefers-reduced-motion: reduce) {
                transition: none;
              }
            }
          }
          .logo{
            position: absolute;
            top: calc(196.2 * var(--u));
            left: calc((625.3 - var(--ox)) * var(--u));
            width: calc(135.9 * var(--u));
            transition: opacity 0.8s ease, scale 1.2s var(--easing);
            @media (prefers-reduced-motion: reduce) {
              transition: none;
            }
          }
        }
      }

      .div-section{
        margin-top: 10rem;
        margin-left: 10rem;
        padding-bottom: 10rem;
        background-color: var(--white);
        @media screen and (max-width: 768px) {
          margin-top: 6rem;
          margin-left: 2rem;
          padding-bottom: 4rem;
        }
        .title{
          position: relative;
          /* 画像は背景扱いにして、高さは文字量に合わせる */
          &> img{
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
          }
          .texts{
            position: relative;
            padding-inline: 10rem;
            padding-block: 12rem 8rem;
            display: flex;
            flex-direction: column;
            gap: 8rem;
            @media screen and (max-width: 768px) {
              padding: 5rem 2rem 4rem;
              gap: 3rem;
            }
            .hd{
              h2{
                font-size: 4.6rem;
                margin-top: 0.25em;
                @media screen and (max-width: 768px) {
                  font-size: 2.4rem;
                }
              }
            }
            .readText{
              width: 54%;
              @media screen and (max-width: 768px) {
                width: 100%;
              }
            }
          }
        }
        .work{
          padding-top: 12rem;
          margin-inline: 10rem;
          @media screen and (max-width: 768px) {
            padding-top: 5rem;
            margin-inline: 2rem;
          }
          h3{
            font-size: 2.8rem;
            @media screen and (max-width: 768px) {
              font-size: 2rem;
            }
          }
          .image-wrap{
            margin-top: 4rem;
            display: grid;
            grid-template-columns: repeat(3,1fr);
            gap: 2rem;
            @media screen and (max-width: 768px) {
              grid-template-columns: repeat(2,1fr);
              margin-top: 2rem;
              gap: 0.8rem;
            }
          }
          .texts{
            display: flex;
            justify-content: space-between;
            margin-top: 5rem;
            @media screen and (max-width: 768px) {
              flex-direction: column;
              gap: 2.4rem;
              margin-top: 3rem;
            }
            .copy{
              font-size: 2rem;
              font-feature-settings: "palt";
              display: flex;
              flex-direction: column;
              @media screen and (max-width: 768px) {
                font-size: 1.6rem;
              }
              span{
                display: inline-block;
                width: fit-content;
                padding: 0.5em 0.5em;
                background-color: var(--bg-gray);
                &+ span{
                  padding-top: 0;
                }
              }
            }
            .readText{
              width: 86rem;
              flex-shrink: 0;
              margin-top: calc((1em - 1lh) / 2);
              @media screen and (max-width: 768px) {
                width: 100%;
                margin-top: 0;
              }
            }
          }
        }
        .flow{
          margin-top: 7rem;
          margin-inline: 10rem;
          padding-top: 3rem;
          border-top: 1px dotted var(--black);
          @media screen and (max-width: 768px) {
            margin-top: 4rem;
            margin-inline: 2rem;
            padding-top: 3rem;
          }
          h3{
            font-size: 2.8rem;
            @media screen and (max-width: 768px) {
              font-size: 2rem;
            }
          }
          ul{
            display: grid;
            grid-template-columns: repeat(5,1fr);
            gap: 4rem;
            margin-top: 5rem;
            &.social{
              grid-template-columns: repeat(6,1fr);
              @media screen and (max-width: 768px) {
                grid-template-columns: 1fr;
              }
            }
            @media screen and (max-width: 768px) {
              grid-template-columns: 1fr;
              gap: 2rem;
              margin-top: 2rem;
            }
            li{
              background-color: var(--bg-gray);
              padding: 1rem;
              position: relative;
              @media screen and (max-width: 768px) {
                display: grid;
                grid-template-columns: 12rem 1fr;
                align-items: center;
                padding: 0.8rem;
              }
              &+ li{
                &::after{
                  content: "";
                  width: 4rem;
                  height: 1px;
                  background-color: var(--black);
                  position: absolute;
                  right: 100%;
                  top: 48%;
                  @media screen and (max-width: 768px) {
                    width: 1px;
                    height: 2rem;
                    right: auto;
                    left: 6.8rem;
                    top: auto;
                    bottom: 100%;
                  }
                }
              }
              .image-wrap{
                background-color: var(--white);
                height: 14rem;
                position: relative;
                display: grid;
                place-content: center;
                @media screen and (max-width: 768px) {
                  height: 9rem;
                }
                .num{
                  position: absolute;
                  top: 1rem;
                  left: 1rem;
                  @media screen and (max-width: 768px) {
                    top: 0.6rem;
                    left: 0.8rem;
                  }
                }
                img{
                  @media screen and (max-width: 768px) {
                    scale: 0.6;
                  }
                }
              }
              &:nth-child(1){.social img{width: 7.8rem;}}
              &:nth-child(2){.social img{width: 6.9rem;}}
              &:nth-child(3){.social img{width: 4.6rem;}}
              &:nth-child(4){.social img{width: 6rem;}}
              &:nth-child(5){.social img{width: 7.2rem;}}
              &:nth-child(6){.social img{width: 5.2rem;}}
              &:nth-child(1){.industrial img{width: 8.2rem;}}
              &:nth-child(2){.industrial img{width: 6.6rem;}}
              &:nth-child(3){.industrial img{width: 8rem;}}
              &:nth-child(4){.industrial img{width: 6.9rem;}}
              &:nth-child(5){.industrial img{width: 9.4rem;}}
              h4{
                height: 10rem;
                display: grid;
                place-content: center;
                font-size: 2rem;
                text-align: center;
                line-height: 1.5;
                @media screen and (max-width: 768px) {
                  height: auto;
                  place-content: center start;
                  padding-inline: 2rem;
                  font-size: 1.6rem;
                  text-align: left;
                }
              }
            }
          }
        }
      }
    }
    .point{
      position: relative;
      padding-block: 7rem 10rem;
      @media screen and (max-width: 768px) {
        padding-block: 4rem 5rem;
      }
      &> img{
        position: absolute;
        z-index: 0;
        inset: 0;
        height: 100%;
        object-fit: cover;
      }
      .inner{
        position: relative;
        z-index: 1;
      }
      h2{
        font-size: 8.6rem;
        line-height: 1.25;
        @media screen and (max-width: 768px) {
          font-size: 3.2rem;
          line-height: 1.4;
        }
      }
      ul{
        margin-top: 16rem;
        @media screen and (max-width: 768px) {
          margin-top: 5rem;
        }
        li{
          display: flex;
          align-items: flex-end;
          justify-content: space-between;
          @media screen and (max-width: 768px) {
            flex-direction: column;
            align-items: flex-start;
            gap: 2rem;
          }
          &+ li{
            margin-top: 5rem;
            padding-top: 4rem;
            border-top: 1px dotted var(--white);
            @media screen and (max-width: 768px) {
              margin-top: 3rem;
              padding-top: 3rem;
            }
          }
          .title{
            .en{
              font-size: 1.4rem;
              padding: 0.35em 0.75em;
              background-color: var(--white);
              width: fit-content;
              @media screen and (max-width: 768px) {
                font-size: 1.2rem;
              }
            }
            h3{
              font-size: 4rem;
              line-height: 1.5;
              font-feature-settings: "palt";
              margin-top: 2rem;
              @media screen and (max-width: 768px) {
                font-size: 2rem;
                margin-top: 1.2rem;
              }
            }
          }
          .readText{
            width: 78rem;
            flex-shrink: 0;
            @media screen and (max-width: 768px) {
              width: 100%;
            }
          }
        }
      }
    }
  }
  /* 事業部の図の出現前。ロゴと円 → リング・帯 → 業務の順に出る。JS が動かず .js-reveal が外れた場合は最初から完成形を出す */
  .js-reveal .business-figure .figure:not(.is-revealed){
    .name{
      opacity: 0;
      scale: 0.7;
    }
    .ring{
      opacity: 0;
      &.is-social{
        rotate: -40deg;
      }
      &.is-industrial{
        rotate: 40deg;
      }
    }
    .lens{
      opacity: 0;
    }
    .logo{
      opacity: 0;
      scale: 0.8;
    }
    .tasks li{
      opacity: 0;
      translate: var(--from);
    }
  }
