@charset "utf-8";

:root {
  --main-bg: #f9f9f9;
  --main-color: #1a2c37;
  --accent: #d4a76a;
  --accent-light: #f0e6d8;
  --accent-dark: #b78946;
  --text-color: #333;
  --light-gray: #eaeaea;
  --white: #ffffff;
  --fade-time: 0.8s;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


body {
  margin: 0;
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--main-bg);
  color: var(--text-color);
  line-height: 1.8;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%; /* iOSでの自動フォントサイズ調整を防止 */
  -webkit-font-smoothing: antialiased; /* フォントレンダリングを改善 */
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: 'Noto Serif JP', serif;
  color: var(--main-color);
  line-height: 1.4;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

h2:after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent);
}


a {
  color: var(--main-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.container {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Video Background */
#video-bg {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

#video-area {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#video-area video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay-text {
  position: absolute;
  font-family: 'Noto Serif JP', serif;
  top: 70%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--white);
  font-size: 2.5rem;
  font-weight: bold;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  z-index: 2;
  animation: fadeInUp 1s ease forwards;
}



/* CTA Button */
.cta-button {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 15px 40px;
  border-radius: 50px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease forwards 1.1s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  -webkit-tap-highlight-color: transparent; /* タップ時のハイライトを削除 */
  min-width: 160px; /* スマホでタップしやすいサイズに */
  text-align: center; /* テキストを中央寄せ */
}

.cta-button:hover,
.cta-button:active { /* スマホでのアクティブ状態 */
  background: var(--accent-dark);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Top Navigation Bar */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: transparent;
  z-index: 1000;
  transition: all 0.5s ease;
  padding: 20px 0;
  backdrop-filter: blur(0); /* スクロール時に背景にブラーをかける */
  -webkit-backdrop-filter: blur(0);
}

.top-bar.scrolled {
  background: rgba(255, 255, 255, 0.95); /* 少し透明に */
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  padding: 12px 0;
  backdrop-filter: blur(10px); /* スクロール時に背景にブラーをかける */
  -webkit-backdrop-filter: blur(10px);
}

.top-bar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo img {
  height: 60px;
  transition: all 0.3s ease;
}

.top-bar.scrolled .logo img {
  height: 40px;
}

.logo-text {
  font-family: 'Noto Serif JP', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  transition: all 0.3s ease;
}

.top-bar.scrolled .logo-text {
  color: var(--main-color);
}

/* Navigation Menu */
.nav-menu {
  display: flex;
  gap: 40px;
}

.nav-menu a {
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 500;
  position: relative;
  padding: 5px 0;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent; /* タップ時のハイライトを削除 */
}

.top-bar.scrolled .nav-menu a {
  color: var(--main-color);
}

.nav-menu a:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a:active { /* スマホでのアクティブ状態 */
  color: var(--accent);
}

.nav-menu a:hover:after,
.nav-menu a:active:after { /* スマホでのアクティブ状態 */
  transform: scaleX(1);
  transform-origin: left;
}

.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent; /* タップ時のハイライトを削除 */
  width: 44px; /* タップしやすいサイズに */
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top-bar.scrolled .hamburger {
  color: var(--main-color);
}

/* Section Layout */
section {
  padding: 100px 0;
  position: relative;
}

section:nth-child(even) {
  background: var(--white);
}

.section-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
}

/* Mission Section */
.mission {
  position: relative;
  overflow: hidden;
}

.mission-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mission-image {
  width: 120px;
  margin-bottom: 30px;
}

.mission-text {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.9;
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.service-card {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  height: 100%; /* カード高さを均一に */
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-image {
  height: 200px;
  overflow: hidden;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card:hover .service-image img {
  transform: scale(1.1);
}

.service-content {
  text-align: left;
  padding: 25px;
  flex-grow: 1; /* 内容の高さに合わせて伸縮 */
  display: flex;
  flex-direction: column;
}

.service-content h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 15px;
}

.service-content h3:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
}

/* Company Info Section */
.company-info-container {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border-radius: 15px;
  overflow: hidden;
}

.company-table th,
.company-table td {
  padding: 20px;
  text-align: left;
  border-bottom: 1px solid var(--light-gray);
}

.company-table th {
  background: rgba(212, 167, 106, 0.1);
  font-weight: 500;
  width: 30%;
  color: var(--main-color);
}

.company-map {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.company-map iframe {
  width: 100%;
  height: 500px;
  border: 0;
  display: block;
}

.submit-button {
  background: var(--main-color);
  color: var(--white);
  border: none;
  padding: 15px 40px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  text-align: center;
  -webkit-appearance: none; /* iOSのデフォルトスタイルを削除 */
  appearance: none;
  -webkit-tap-highlight-color: transparent; /* タップ時のハイライトを削除 */
}

.submit-button:hover,
.submit-button:active { /* スマホでのアクティブ状態 */
  background: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
  background: var(--main-color);
  color: var(--white);
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.footer-logo img {
  height: 40px;
}

.footer-logo-text {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
}

.footer-about p {
  margin-bottom: 20px;
  line-height: 1.6;
  font-size: 0.95rem;
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-radius: 50%;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent; /* タップ時のハイライトを削除 */
}

.footer-social a:hover,
.footer-social a:active { /* スマホでのアクティブ状態 */
  background: var(--accent);
  transform: translateY(-3px);
}

.footer-links h4,
.footer-contact h4 {
  color: var(--white);
  margin-bottom: 20px;
  font-size: 1.1rem;
  position: relative;
  padding-bottom: 10px;
}

.footer-links h4:after,
.footer-contact h4:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
  padding: 5px 0; /* タップ領域を広げる */
  display: inline-block;
}

.footer-links a:hover,
.footer-links a:active { /* スマホでのアクティブ状態 */
  color: var(--accent);
  padding-left: 5px;
}

.footer-contact p {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-contact i {
  color: var(--accent);
  font-size: 1rem;
  margin-top: 5px;
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--fade-time) ease-out, transform var(--fade-time) ease-out;
  will-change: opacity, transform; /* パフォーマンス向上 */
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Menu (Hamburger) */
.overlay-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
  -webkit-backdrop-filter: blur(5px); /* 背景をぼかす */
  backdrop-filter: blur(5px);
}

.overlay-menu.active {
  display: block;
}

/* スクロールバーの非表示（スマホでの見た目改善） */
.nav-menu::-webkit-scrollbar {
  display: none;
}

.nav-menu {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* モバイルメニューの閉じるボタン */
.close-menu {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--main-color);
  cursor: pointer;
  z-index: 1002;
  -webkit-tap-highlight-color: transparent;
}

/* Responsive Styles */
@media (min-width: 993px) {
  /* PCとタブレット向けの追加スタイル */
  .nav-menu {
    display: flex; /* PCでは常に表示 */
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    flex-direction: row;
    box-shadow: none;
    padding: 0;
  }
  
  .hamburger {
    display: none; /* PCではハンバーガーメニュー非表示 */
  }
  
  .close-menu {
    display: none; /* PCでは閉じるボタン非表示 */
  }

}

@media (max-width: 992px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 300px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 0;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
    z-index: 1001;
    gap: 30px;
    overflow-y: auto; /* コンテンツが多い場合にスクロール可能に */
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu a {
    color: var(--main-color);
    padding: 10px 0; /* タップ領域を広げる */
    width: 100%;
    text-align: center;
  }

  .hamburger {
    display: flex; /* flexboxに変更 */
    z-index: 1002;
  }
  
  /* ナビメニュー表示時にロゴのテキストが文字化けしないように修正 */
  .logo-text {
    font-size: 2rem; /* スマホでのロゴテキストサイズ調整 */
    /* スマホでもロゴが文字化けしないようにフォントを調整 */
    font-synthesis: none; /* 合成フォントを使わない */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility; /* テキストレンダリングを最適化 */
  }
  
  .service-card {
    margin-bottom: 20px;
  }

  .overlay-text {
    font-size: 1.8rem;
    padding: 0 30px; /* テキストが画面に収まるように */
    text-align: center;
  }
}

@media (max-width: 768px) {
  h2 {
    font-size: 2rem;
  }
  
  .logo-text {
    font-size: 1.8rem;
    /* ロゴテキストが文字化けしないように追加 */
    white-space: nowrap; /* テキストを1行に */
  }

  section {
    padding: 70px 0;
  }
  
  
  .cta-button {
    padding: 12px 30px;
    min-width: 200px; /* タップしやすい幅に */
  }

  .overlay-text {
    font-size: 1.8rem;
    padding: 0 20px; /* スマホでのテキストが画面に収まるように */
  }
  
  .company-table th,
  .company-table td {
    padding: 15px;
  }

  .company-table th {
    width: 40%;
  }
  
  .contact-form {
    padding: 30px;
  }
  
  .company-map iframe {
    height: 350px;
  }
  
  /* サービスカードを1列表示に */
  .services-grid {
    grid-template-columns: 1fr;
  }
  

  
  h2 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
  }
}

@media (max-width: 576px) {
  body {
    overflow-x: hidden; /* 横スクロールのみ防止 */
    font-size: 15px; /* 読みやすいサイズに調整 */
  }
  
  h2 {
    font-size: 1.8rem;
    /* セクションタイトルが画面に収まるように */
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .logo-text {
    font-size: 1.5rem;
    /* ロゴテキストが文字化けしないように追加 */
    white-space: nowrap; /* テキストを1行に */
  }
  
  .cta-button {
    padding: 12px 25px;
    font-size: 0.9rem;
  }

  .overlay-text {
    font-size: 1.3rem;
    left: 30%;
    padding: 0 15px; /* スマホでのテキストが画面に収まるように */
  }
  
  .company-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch; /* iOSでのスクロールを滑らかに */
  }
  
  .company-table th,
  .company-table td {
    padding: 12px;
    font-size: 0.9rem;
  }
  
  .company-map iframe {
    height: 300px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .contact-form {
    padding: 20px;
  }
  
  .service-content {
    padding: 20px;
  }
  
  .service-content h3 {
    font-size: 1.2rem;
  }
  
  section {
    padding: 50px 0; /* さらに余白を減らす */
  }
  
  .container {
    padding: 0 15px; /* 左右の余白を調整 */
  }
  
  /* フォーム要素のサイズを大きく */
  .form-control {
    padding: 12px;
  }
  
  .submit-button {
    width: 100%; /* スマホでは幅いっぱいに */
    padding: 15px;
  }
}

/* iPhone SE など小さい画面向け */
@media (max-width: 380px) {
  body {
    font-size: 14px;
  }
  
  h2 {
    font-size: 1.6rem;
  }
  
  .logo img {
    height: 40px;
  }
  
  .top-bar.scrolled .logo img {
    height: 30px;
  }
  
  /* ロゴの文字化け対策 */
  .logo-text {
    font-size: 1.2rem;
    white-space: nowrap;
    letter-spacing: -0.5px; /* 文字間を少し詰める */
  }
  
  .overlay-text {
    font-size: 1.2rem;
    padding: 0 10px; /* スマホでのテキストが画面に収まるように */
  }
  
  .company-table th,
  .company-table td {
    padding: 10px;
    font-size: 0.85rem;
  }
  
  /* ナビメニュー内でもロゴが文字化けしないように */
  .nav-menu.active + .top-bar-container .logo-text {
    color: var(--main-color);
  }
}

/* 縦向き/横向き対応 */
@media (orientation: landscape) and (max-height: 600px) {
  #video-bg {
    height: 100vh;
  }
  
  .section-title {
    top: 50%;
  }
  
  .nav-menu {
    padding: 20px 0;
    justify-content: flex-start;
    padding-top: 60px;
  }
  
  .nav-menu a {
    margin: 5px 0;
  }
}

/* 高DPI画面対応 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Retinaなどの高解像度ディスプレイ向け調整 */
  body {
    font-weight: 400; /* 細いフォントを少し太くして読みやすく */
  }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
  /* システムがダークモードの場合の対応 */
  /* 必要に応じて有効化 */
  /*
  :root {
    --main-bg: #121212;
    --main-color: #e0e0e0;
    --accent: #d4a76a;
    --accent-light: #34322e;
    --accent-dark: #f0c288;
    --text-color: #e0e0e0;
    --light-gray: #333;
    --white: #1e1e1e;
  }
  
  .top-bar.scrolled {
    background: rgba(30, 30, 30, 0.95);
  }
  
  .service-card,
  .company-table,
  .contact-form {
    background: #1e1e1e;
  }
  */
}

/* 低速接続対応 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}