@charset "UTF-8";

/* =========================================
   Base & Common Styles
   ========================================= */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "BIZ UDPGothic", "Meiryo", sans-serif;
  color: #333333;
  line-height: 1.6;
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 4%;
  box-sizing: border-box;
}

/* 本文を制限するスリム幅 */
.container.narrow {
  max-width: 900px;
}

section {
  padding: 80px 0;
}

.section-header {
  margin-bottom: 40px;
}

.section-title {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0 0 16px 0;
  color: #333333;
}

.section-subtitle {
  font-size: 18px;
  font-weight: 500;
  color: rgba(51, 51, 51, 0.55);
  margin: 0;
  line-height: 1.5;
}

.section-eyebrow {
  font-size: 18px;
  font-weight: 600;
  color: rgba(51, 51, 51, 0.55);
  margin: 0 0 8px 0;
}


/* =========================================
   Header
   ========================================= */
.header {
  background-color: #2b2d42;
  padding: 20px 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 40px;
  font-weight: 900;
  color: #f77f00;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.navbar {
  display: flex;
  gap: 32px;
}

.navbar a {
  color: #f77f00;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.navbar a:hover {
  opacity: 0.7;
}


/* =========================================
   Hero
   ========================================= */
.hero {
  padding: 160px 0;
  background-image: url('images/heroーbackground/1.png');
  background-size: cover;
  background-position: center;
  background-color: #f5f5f5;
  text-align: center;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero-title {
  font-size: 56px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  color: #333333;
}

.hero-subtitle {
  font-size: 22px;
  font-weight: 500;
  color: rgba(51, 51, 51, 0.7);
  margin: 0;
  max-width: 800px;
}


/* =========================================
   History (私たちの想い)
   ========================================= */
.history-content p {
  font-size: 18px;
  font-weight: 500;
  color: rgba(51, 51, 51, 0.7);
  line-height: 1.8;
  margin: 0;
}


/* =========================================
   Services (事業内容)
   ========================================= */
.services .container.narrow {
  /* 元の 900px に戻します */
  max-width: 900px;
}

.service-cards {
  display: grid;
  /* 2カラム固定 */
  grid-template-columns: repeat(2, 380px);
  justify-content: space-between;
  gap: 40px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 380px;
}

/* 画像共通の設定 */
.card-image {
  width: 380px;
  height: 500px;
  object-fit: cover;
  /* 比率を保ってトリミング */
  border-radius: 12px;
}

/* ★ここが重要：2番目のカード（ロボットティーチング）の画像だけ設定を変更★ */
.services .card:nth-child(2) .card-image {
  /* フォーカスしたい位置を指定します。
       元の画像内で、男性がおそらく端に寄っていると想定されます。

       ・男性が【右側】にいる場合： right center
       ・男性が【左側】にいる場合： left center

       あるいは、より詳細にパーセンテージで指定することも可能です。
       例： 80% center (横方向80%、縦方向中央)
       実際の画像に合わせて調整してください。 */
  object-position: 80% center;
}

.card-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  color: #333333;
}

.card-desc {
  font-size: 16px;
  color: rgba(51, 51, 51, 0.7);
  margin: 0;
  line-height: 1.6;
}


/* =========================================
   Machines (モノづくりの相棒)
   ========================================= */
.machines-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
}

.machines .section-header {
  flex: 1;
  min-width: 300px;
  margin-bottom: 0;
}

.machine-list {
  flex: 2;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.machine-row {
  background-color: rgba(46, 196, 182, 0.15);
  border-radius: 12px;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.machine-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.machine-title h3 {
  font-size: 22px;
  margin: 0;
  color: #333;
}

.machine-desc {
  margin: 0;
  font-size: 16px;
  color: rgba(51, 51, 51, 0.7);
  line-height: 1.6;
}

.icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shape {
  width: 18px;
  height: 18px;
  background-color: rgba(46, 196, 182, 0.65);
  border-radius: 50%;
}

.shape-2 {
  width: 16px;
  height: 16px;
  background-color: rgba(46, 196, 182, 0.65);
  transform: rotate(45deg);
}

.shape-3 {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 18px solid rgba(46, 196, 182, 0.65);
}


/* =========================================
   Portfolio (カタチにしたもの) - 2・3・2 構成
   ========================================= */
.gallery {
  display: flex;
  gap: 24px;
  /* 上端を揃える */
  align-items: flex-start;
}

.gallery-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 共通の画像設定：枠に合わせて中央でトリミング */
.gallery-column img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  /* ここが重要：比率を無視して枠を埋め、中央を表示する */
  object-fit: cover;
  object-position: center;
}

/* --- 各列・各画像の高さを個別に指定して「バラバラ感」を出す --- */

/* 左カラム (2枚) */
.gallery-column:nth-child(1) img:nth-child(1) {
  height: 420px;
}

.gallery-column:nth-child(1) img:nth-child(2) {
  height: 280px;
}

/* 中央カラム (3枚) - 合計の高さが一番長くなるように設定 */
.gallery-column:nth-child(2) img:nth-child(1) {
  height: 240px;
}

.gallery-column:nth-child(2) img:nth-child(2) {
  height: 320px;
}

.gallery-column:nth-child(2) img:nth-child(3) {
  height: 380px;
}

/* 下に突き抜ける */

/* 右カラム (2枚) */
.gallery-column:nth-child(3) img:nth-child(1) {
  height: 480px;
}

.gallery-column:nth-child(3) img:nth-child(2) {
  height: 360px;
}

/* ここも中央でトリミングされます */

/* スマホ表示では縦に並べる（必要に応じて） */
@media (max-width: 768px) {
  .gallery {
    flex-direction: column;
  }

  .gallery-column img {
    height: 300px !important;
    /* スマホでは高さを揃えて見やすく */
  }
}


/* =========================================
   Contact (マップと連絡先)
   ========================================= */
.contact {
  background-color: #f77f00;
  color: #333;
}

.contact-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
}

.contact-info {
  flex: 1;
  min-width: 320px;
}

.contact-title {
  color: #333333;
}

.contact-address {
  font-size: 18px;
  line-height: 1.8;
  margin: 0 0 32px 0;
  color: rgba(51, 51, 51, 0.8);
}

.button {
  display: inline-block;
  background-color: #333333;
  color: #f5f5f5;
  padding: 16px 32px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s;
}

.button:hover {
  background-color: #1a1a1a;
}

.contact-map {
  flex: 1;
  min-width: 320px;
  border-radius: 0;
  overflow: hidden;
}

.contact-map iframe {
  display: block;
  border: 0;
  /* インラインスタイルの border:0 と合わせて念のため */
}


/* =========================================
   Company (会社概要)
   ========================================= */
.company {
  background-color: #2ec4b6;
}

.company .section-title {
  color: #333333;
}

.company-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
}

.company-block h3 {
  font-size: 22px;
  color: #191919;
  margin: 0 0 16px 0;
}

.company-block p {
  font-size: 16px;
  color: rgba(51, 51, 51, 0.7);
  margin: 0;
  line-height: 1.6;
}


/* =========================================
   Company Table Styles
   ========================================= */
.company-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.company-table th,
.company-table td {
  padding: 12px 0;
  border-bottom: 1px solid rgba(51, 51, 51, 0.1);
  text-align: left;
  font-size: 15px;
  vertical-align: top;
}

.company-table th {
  width: 35%;
  /* 見出しの幅を固定 */
  font-weight: 700;
  color: #191919;
}

.company-table td {
  color: rgba(51, 51, 51, 0.8);
  padding-left: 10px;
}

/* 最後の行の線は消す */
.company-table tr:last-child th,
.company-table tr:last-child td {
  border-bottom: none;
}


/* =========================================
   Footer
   ========================================= */
.footer {
  background-color: #2b2d42;
  padding: 60px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-logo {
  font-size: 24px;
  font-weight: 700;
  color: #f77f00;
  margin-bottom: 8px;
}

.copyright {
  color: rgba(247, 127, 0, 0.55);
  font-size: 14px;
  margin: 0;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-link img {
  width: 24px;
  height: 24px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-nav a {
  color: rgba(247, 127, 0, 0.55);
  font-size: 16px;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-nav a:hover {
  color: #f77f00;
}


/* 1. 最初は完全に透明。位置は動かさない（transformを消す） */
.reveal {
  opacity: 0;
  /* じわ〜っと0.8秒かけて不透明にする設定 */
  transition: opacity 0.8s ease-out;
}

/* 2. "active" クラスがついたら、不透明にするだけ */
.reveal.active {
  opacity: 1;
}

/* 3. Heroセクション（メインビジュアル）だけは、少しゆっくり優雅に（1.2秒） */
.hero.reveal {
  transition: opacity 1.2s ease-out;
}

/* --- machine-row 専用：右からインする設定 --- */
.machine-row.reveal {
  opacity: 0;
  /* 最初は右側に 80px ズラしておく */
  transform: translateX(80px);
  /* 透明度と位置の両方を 0.8秒かけて変化させる */
  transition: opacity 1.0s ease-out, transform 1.0s ease-out;
}

/* 画面に入った（activeがついた）ら元の位置（0）に戻る */
.machine-row.reveal.active {
  opacity: 1;
  transform: translateX(0);
}

/* ギャラリー内の画像も reveal 対象にする */
.gallery-column img.reveal {
  opacity: 0;
  /* transform は書かないので「その場」でフェードします */
  transition: opacity 1.0s ease-out;
}

/* 表示された時 */
.gallery-column img.reveal.active {
  opacity: 1;
}

/* --- 時間差（ディレイ）の設定 --- */
/* 2番目に現れる画像（0.2秒遅れ） */
.gallery-column img.reveal:nth-child(2) {
  transition-delay: 0.2s;
}

/* 3番目に現れる画像（0.4秒遅れ） */
.gallery-column img.reveal:nth-child(3) {
  transition-delay: 0.4s;
}