@charset "utf-8";

/* ========各ページ共通ここから======== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: "Lato", "Noto Sans JP", "Helvetica", "Helvetica Neue", "Yu Gothic", "Verdana", "Meiryo", sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 3px;
  color: #414141;
}

a {
  text-decoration: none;
  color: #414141;
}

img {
  width: 100%;
  height: auto;
}

h4 {
  font-size: 20px;
}

h5 {
  font-size: 17px;
}

p {
  font-size: 15px;
}

main {
  width: 90%;
  margin: 0 auto;
}

.large-category {
  font-size: 60px;
  margin: 200px 0 0px;
  text-align: center;
}

.large-category.red {
  color: #c30d23;
}

.large-category.ja {
  color: #c30d23;
  font-size: 52px;
  font-weight: 500;
  margin: 0;
}

.large-category::before {
  content: "エーアイ/ロボティクス";
  font-size: 12px;
  color: #333;
  display: block;
}

.description {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 80px;
}

/* ========AI/ROBOTICS======== */
.video-container {
  width: 100%;
  max-width: 1270px;
  margin: 0 auto 80px;
}

.video-container video {
  width: 100%;
  height: auto;
  display: block;
}

/* ===========セクション共通=========== */
h2 {
  text-align: center;
  font-size: 32px;
  font-weight: 300;
  margin: 80px 0;
  position: relative;
}

p {
  max-width: 976px;
  margin: 0 auto 100px;
  text-align: left;
  line-height: 1.8;
  font-size: 15px;
  font-weight: 400;
  padding: 0 20px;
  position: relative;
  letter-spacing: 0.05em;
}

#auto,
#ai-system,
#robo-system {
  max-width: 1270px;
  margin: 0 auto;
}

/* ========完全自動化へ向けて ======== */
#auto {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

#auto .sec01 {
  width: 100%;
}

#auto img {
  width: 49%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  height: auto;
  display: block;
  margin-bottom: 80px;
}

/* ========AIシステムセクション======== */
#ai-system img {
  max-width: 1270px;
  margin-bottom: 200px;
  height: auto;
  display: block;
}

/*========ロボットグリッド======== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 313px);
  justify-content: space-between;
  align-content: start;
}

.card img {
  width: 313px;
  height: 313px;
  object-fit: cover;
  display: block;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.caption {
  margin-top: 15px;
  font-size: 13px;
  font-weight: 400;
  text-align: center;
}

/* ========次のページへ======== */
.frame {
  display: flex;
  flex-direction: row;
  margin-top: 80px;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.element {
  order: 1;
  width: 90px;
  height: auto;
  animation: float 3s ease-in-out infinite;
}

.text-wrapper {
  order: 2;
  font-size: 12px;
  color: #333;
}

/*========robot紹介ページ========*/

.header-group {
  position: relative;
  margin: 200px auto 0;
  width: 350px;
  height: 180px;
}

.katakata-blue-robo {
  position: absolute;
  top: 22px;
  right: 440px;
  width: 120px;
  height: auto;
  animation: katakata 0.2s infinite;
  transition:
    opacity 0.5s ease,
    visibility 0.5s;
}

@keyframes katakata {
  75% {
    transform: translate(3px, 3px);
  }
}

.green-robo {
  position: absolute;
  display: inline-block;
  top: 6px;
  right: 356px;
  width: 120px;
  height: auto;
  animation: moveBackAndForth 0.5s ease-in-out infinite alternate;
  transition:
    opacity 0.5s ease,
    visibility 0.5s;
}

@keyframes moveBackAndForth {
  0% {
    transform: translateX(10px);
  }
}

.title-icon {
  position: absolute;
  top: 15px;
  left: 336px;
  width: 60px;
  height: auto;
  animation: rotateY 3s linear infinite;
}

@keyframes rotateY {
  100% {
    transform: rotateY(360deg);
  }
}

.purple-robo-r {
  position: absolute;
  top: 22px;
  left: 400px;
  width: 55px;
  height: auto;
  animation: float 3s ease-in-out infinite;
  transition:
    opacity 0.5s ease,
    visibility 0.5s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.robot-card {
  width: 960px;
  height: 400px;
  border: 1px solid #999;
  background-color: #ffffff;
  margin: 0 auto 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border-radius: 3px;
}

.robot-card:last-child {
  margin-bottom: 0;
}

.card-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 40px;
  box-sizing: border-box;
}

.robot-image {
  flex: 0 0 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.robot-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.robot-info {
  flex: 1;
  padding-left: 80px;
  text-align: center;
}

.robot-info h2 {
  font-size: 16px;
  color: #333;
  font-weight: 500;
  margin: 0 0 40px;
  letter-spacing: 0.1em;
}

.robot-info p {
  font-size: 13px;
  color: #333;
  line-height: 1.8;
  text-align: left;
  margin: 0 auto;
  max-width: 540px;
  word-break: break-all;
}

/* ========AI/ROBOTICSページへもどる======== */
.frame-r {
  display: flex;
  flex-direction: row;
  margin-top: 80px;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.element-r {
  order: 2;
  width: 40px;
  height: auto;
  animation: float 3s ease-in-out infinite;
}

/* .text-wrapper は .frame と共通 (order のみ異なる) */
.frame-r .text-wrapper {
  order: 1;
}

/* ========フッター======== */
footer {
  background-color: #f5f5f5;
  margin-top: 100px;
  padding-top: 70px;
}

footer .copywrite {
  text-align: center;
  color: #fff;
  padding: 10px;
  background-color: #414141;
  font-size: 10px;
}

/* ========レスポンシブ (?1000px)======== */
@media screen and (max-width: 1000px) {
  h2 {
    font-size: 32px;
    font-weight: 400;
    margin-top: 50px;
    margin-bottom: 50px;
  }

  p {
    max-width: 80%;
    margin-bottom: 50px;
  }

  #auto img {
    width: 100%;
    margin-right: 0 !important;
    margin-bottom: 20px;
  }

  #ai-system img {
    margin-bottom: 100px;
  }

  .container {
    margin-top: 0;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    justify-content: center;
  }

  .card img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    margin-bottom: 1%;
  }

  .caption {
    margin-bottom: 2%;
  }

  /* ロボット紹介レスポンシブ */

  .header-group {
    width: 350px;
    height: 180px;
  }

  .robot-card {
    width: 100%;
    height: auto;
    margin: 0 auto 40px;
    padding: 20px 0;
  }

  .card-inner {
    flex-direction: column;
    padding: 0 20px;
  }

  .robot-image {
    flex: 0 0 auto;
    width: 280px;
    height: 280px;
    margin-bottom: 30px;
  }

  .robot-info {
    padding-left: 0;
    text-align: center;
    width: 100%;
  }

  .robot-info h2 {
    margin-bottom: 20px;
  }

  .robot-info p {
    text-align: left;
    max-width: 100%;
  }

  .frame-r {
    max-width: 90%;
    text-align: center;
    margin-top: 40px;
  }
}

@media screen and (max-width: 768px) {
  #auto img {
    width: 100%;
    margin-bottom: 15px;
  }

  h2 {
    font-size: 26px;
    font-weight: 400;
  }

  .katakata-blue-robo,
  .purple-robo-r {
    display: none;
  }

  .large-category {
    font-size: 40px;
    margin-top: 150px;
    text-align: center;
  }

  .large-category.ja {
    font-size: 40px;
    text-align: center;
    display: block;
  }

  .header-group {
    margin-top: 150px;
  }
}

@media screen and (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }

  h2 {
    font-size: 22px;
    font-weight: 400;
  }

  p {
    max-width: 88%;
    margin-bottom: 30px;
    font-size: 14px;
  }
}

@media screen and (max-width: 500px) {
  .green-robo,
  .title-icon {
    display: none;
  }
}

@media screen and (max-width: 480px) {
  .robot-card {
    margin: 0 auto 40px;
  }

  .robot-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .robot-info h2 {
    font-size: 16px;
  }

  .robot-info p {
    font-size: 13px;
  }
}

@media screen and (max-width: 390px) {
  .large-category {
    font-size: 36px;
  }

  h2 {
    font-size: 21px;
    font-weight: 400;
    max-width: 230px;
    margin: 30px auto 40px;
  }
}
