/* css/style.css */

/* リセット系 & 基本 */
* { box-sizing: border-box; }
html,body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", "YuGothic", sans-serif;
  color: #333;
  background: #f6f7fb;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}
.container { width: 92%; max-width: 1200px; margin: 0 auto; }

/* ヘッダー（グラデーション固定） */
.header {
  background: linear-gradient(125deg, #ffffff 34%, #290099 50%, #230354 93%, #700000 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}
/* PCでは非表示にする（崩れ防止） */
.menu-toggle {
  display: none; /* デフォルト非表示 */
}
.logo { display: inline-block; }
.logo img {
  display: block;
  max-height: 56px;    /* ヘッダーにおさめる */
  width: auto;
}

/* ナビゲーション */
nav.nav ul {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
nav.nav a {
  color: rgba(255,255,255,0.95);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.18s, color 0.18s;
  display: inline-block;
}
nav.nav a:hover { background: rgba(255,255,255,0.08); }
nav.nav a.active { background: rgba(255,255,255,0.12); }

/* ヒーロー */
.hero {
  height: 500px;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  position: relative;
  color: #fff;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.55) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 1000px;
  padding: 28px;
  border-radius: 10px;
}
.hero h1 {
  margin: 0 0 12px 0;
  font-size: 2.6rem;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.hero p { margin: 0 0 18px 0; font-size: 1.08rem; color: #f0f4ff; }
.hero .btn {
  display: inline-block;
  background: #fff;
  color: #4a00e0;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(74,0,224,0.12);
}

/* セクション基本 */
section { padding: 56px 0; }
section h2 {
  text-align: center;
  margin: 0 0 30px 0;
  font-size: 1.6rem;
  color: #3b0fae;
  display: inline-flex;
  gap: 10px;
  align-items: center;
}
.section-sub { text-align: center; color: #666; margin-top: 8px; }

/* カードグリッド */
.card-grid, .cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  align-items: stretch;
}
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(22,22,22,0.04);
  overflow: hidden;
  color: inherit; /* 色継承の乱れを防ぐ */
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 10px 28px rgba(22,22,22,0.08); }
.card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.card .card-body { padding: 16px; flex: 1 1 auto; display: flex; flex-direction: column; }
.card h3 { margin: 0 0 8px 0; font-size: 1.08rem; color: #222; }
.card p { margin: 0; color: #555; flex:1; }

/* 実績エリアの小見出し */
.portfolio .card p { font-size: .95rem; }

/* プロフィール画像 */
.profile-img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; float: left; margin: 0 18px 8px 0; box-shadow: 0 6px 16px rgba(0,0,0,0.08); }

/* タイムライン（沿革） */
.timeline { padding: 0; list-style: none; max-width: 760px; margin: 0 auto; }
.timeline li { padding: 14px 18px; margin-bottom: 10px; background: #fff; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.03); display:flex; gap:12px; align-items:center; }
.timeline li span { min-width: 120px; font-weight:700; color:#4a00e0; }

/* 会社情報テーブル */
.info-table { width: 100%; max-width: 840px; margin: 0 auto; border-collapse: collapse; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,0.04); }
.info-table th, .info-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #f1f1f1; vertical-align: top; }
.info-table th { width: 28%; background: rgba(74,0,224,0.03); color: #222; font-weight:700; }

/* フォーム */
.form-wrap { max-width: 720px; margin: 0 auto; background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,0.04); }
.form-wrap label { display: block; margin-bottom: 10px; font-weight:600; color:#333; }
.form-wrap input[type="text"], .form-wrap input[type="email"], .form-wrap textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e2e6ef;
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  color: #222;
  resize: vertical;
}
.form-wrap button {
  background: linear-gradient(90deg,#4a00e0,#8e2de2);
  color: #fff;
  padding: 12px 18px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.contact-form label {
  margin: 10px 0 5px;
  font-weight: bold;
}

.contact-form input,
.contact-form textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 15px;
}

.form-submit {
  text-align: center; /* ボタンを中央に配置 */
}

.contact-form button {
  background: linear-gradient(90deg, #6a11cb, #2575fc);
  color: #fff;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s;
}

.contact-form button:hover {
  opacity: 0.85;
}

/* CTA（お問い合わせセクション） */
.cta-section {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: #fff;
}

.cta-section h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.cta-section p {
  font-size: 1rem;
  margin-bottom: 25px;
  color: #eee;
}

/* お問い合わせリンクの中央寄せ */
#contact-link {
  text-align: center;
}

/* ボタン共通デザイン */
.btn {
  display: inline-block;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: #fff;
  padding: 12px 25px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 25px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn:hover {
  background: linear-gradient(135deg, #2575fc, #6a11cb);
  transform: scale(1.05);
}

/* お問い合わせボタン */
.cta-section a {
  display: inline-block;
  padding: 12px 30px;
  background: #fff; 
  color: #2575fc;   /* コーポレートカラー反映 */
  border-radius: 30px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.cta-section a:hover {
  background: #f1f1f1;
}

/* フッター全体 */
footer {
  background-color: #000; /* 黒で統一 */
  color: #fff; /* 白文字 */
  padding: 15px 30px;
}

.footer-content {
  display: flex;
  justify-content: space-between; /* 左右に配置 */
  align-items: center;
}

.footer-content p {
  margin: 0;
  font-size: 14px;
}

.footer-social a {
  color: #fff; /* アイコンも白 */
  margin-left: 15px;
  font-size: 18px;
  transition: color 0.3s ease;
}

.footer-social a:hover {
  color: #6a11cb; /* ホバーで紫に */
}

/* フェードイン（初期） */
.fade-in { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; will-change: opacity, transform; }
.fade-in.show { opacity: 1; transform: translateY(0); }

/* 小デバイス調整 */
@media (max-width: 900px) {
  .hero { height: 52vh; min-height: 320px; }
  .hero h1 { font-size: 2rem; }
  .card img { height: 140px; }
}
@media (max-width: 760px) {
  .header-container { padding: 10px 0; }
  nav.nav ul { flex-direction: column; gap: 8px; align-items: center; }
  .hero { height: 48vh; }
  .hero h1 { font-size: 1.6rem; }
  .logo img { max-height: 48px; }
  .cards, .card-grid { grid-template-columns: 1fr; }
  .profile-img { float: none; display:block; margin: 0 auto 12px auto; }
  .footer-container { flex-direction: column; align-items: center; }
}

/* アクセシビリティ/微調整 */
img { max-width: 100%; height: auto; display: block; }
a { cursor: pointer; }

/* 共通リンクスタイル */
a {
  text-decoration: none;
  color: inherit; /* 親要素の文字色を継承 */
}

a:hover {
  opacity: 0.8;
  transition: 0.3s;
}

/* --- モバイル対応改善CSS --- */

/* スマホ向け共通調整 */
@media (max-width: 768px) {

  section {
    padding: 32px 0;
  }

  .header {
    background: linear-gradient(125deg, #ffffff 50%, #290099 70%, #230354 90%, #700000 100%);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1200;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }

  /* ヘッダー */
  .header-container {
    flex-direction: row;
    justify-content: space-between;
  }

  /* ハンバーガーメニュー */
  .menu-toggle {
    display: block;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    margin-left: 16px;
  }

  .logo img {
    max-height: 42px;
  }

  /* ナビゲーション */
  nav.nav {
    display: none; /* デフォルト非表示 → ハンバーガーメニューで出す想定 */
    flex-direction: column;
    background: #111;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    padding: 12px;
  }

  nav.nav.show {
    display: flex;
  }

  nav.nav ul {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  nav.nav a {
    width: 100%;
    padding: 10px;
  }

  /* ヒーロー */
  .hero {
    height: 180px;
    min-height: 180px;
    padding: 20px;
  }
  .hero h1 {
    font-size: 1.8rem;
    line-height: 1.2;
  }
  .hero p {
    font-size: 0.95rem;
  }

  /* カード */
  .card-grid, .cards {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }
  .card img {
    height: 120px;
  }

  /* CTAボタン */
  #contact-link .btn {
    width: 100%;
    text-align: center;
  }

  /* フッター */
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
  }
  .footer-social a {
    font-size: 16px;
    margin-left: 10px;
  }
}

/* 超小型スマホ (iPhone SEなど) */
@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: 0.85rem; }
  .card img { height: 100px; }
  .footer-content { flex-direction: column; text-align: center; }
}
