/* リセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
}

/* ヘッダー */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
  border-bottom: 1px solid #e0e0e0;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2563eb;
  display: flex;
  align-items: center;
}

.logo-image {
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

/* ロゴ画像が読み込めない場合のフォールバック */
.logo-image:not([src]) {
  display: none;
}

.logo-image + .logo-text {
  display: none;
}

.logo:not(:has(.logo-image)) .logo-text,
.logo-image:not([src]) + .logo-text {
  display: inline;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #2563eb;
}

/* メインビジュアル */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8rem 2rem 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.profile-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeInUp 1s ease 0.2s forwards;
}

.cta-button {
  display: inline-block;
  background: white;
  color: #2563eb;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  animation: fadeInUp 1s ease 0.4s forwards;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* セクション共通 */
section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #2563eb;
}

.section-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 4rem;
  font-size: 1.1rem;
}

/* サービス */
.services {
  background: #f8fafc;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(45deg, #667eea, #764ba2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: white;
}

.service-card h3 {
  color: #2563eb;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

/* 実績 */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.portfolio-item {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.portfolio-item:hover {
  transform: translateY(-5px);
}

.portfolio-image {
  height: 200px;
  background: linear-gradient(45deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
}

.portfolio-content {
  padding: 1.5rem;
}

.portfolio-item h3 {
  color: #2563eb;
  margin-bottom: 0.5rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tech-tag {
  background: #e0e7ff;
  color: #2563eb;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
}

/* パートナー募集 */
.partner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
}

.partner .section-title {
  color: white;
}

.partner-form {
  max-width: 600px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 15px;
  backdrop-filter: blur(10px);
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e0e7ff;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 1rem;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
  background: white;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  height: 100px;
  resize: vertical;
}

/* パートナー募集フォーム用の特別スタイル */
.partner-form .form-group input,
.partner-form .form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.partner-form .form-group input:focus,
.partner-form .form-group textarea:focus {
  outline: none;
  border-color: white;
  background: white;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.submit-btn {
  background: white;
  color: #2563eb;
  padding: 1rem 2rem;
  border: none;
  border-radius: 50px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  font-size: 1rem;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* お問い合わせフォーム用のボタン（白背景用） */
.contact-form .submit-btn {
  background: #2563eb;
  color: white;
  box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
  display: block;
  margin: 0 auto;
}

.contact-form .submit-btn:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
}

/* 会社情報・お問い合わせ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.company-info {
  background: #f8fafc;
  padding: 2rem;
  border-radius: 15px;
}

.info-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.info-icon {
  width: 40px;
  height: 40px;
  background: #2563eb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-right: 1rem;
  font-size: 1.2rem;
}

.contact-form {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* フッター */
footer {
  background: #1f2937;
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-info {
  border-bottom: 1px solid #374151;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
}

.footer-section h4 {
  color: #d1d5db;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.legal-info p,
.privacy-info p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
  color: #e5e7eb;
}

.legal-info p:last-child,
.privacy-info p:last-child {
  margin-bottom: 0;
}

.footer-copyright {
  text-align: center;
}

.footer-copyright p {
  font-size: 0.9rem;
  color: #9ca3af;
  margin: 0;
}

/* フッター レスポンシブ */
@media (max-width: 768px) {
  footer {
    padding: 2rem 0 1rem;
  }

  .footer-content {
    padding: 0 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-section h4 {
    font-size: 1rem;
  }

  .legal-info p,
  .privacy-info p {
    font-size: 0.85rem;
  }
}

/* アニメーション */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* モバイルメニューボタン */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #2563eb;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block !important;
    position: relative;
  }

  .nav-links {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 100% !important;
    background: white !important;
    flex-direction: column !important;
    padding: 1rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-10px) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
    gap: 1rem !important;
    z-index: 1000 !important;
  }

  .nav-links.active {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .nav-links li {
    text-align: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .hero {
    padding: 6rem 1rem 4rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  section {
    padding: 4rem 1rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* 強制的にモバイルメニューを表示（デバッグ用） */
@media (max-width: 900px) {
  .mobile-menu-btn {
    display: block !important;
    background: #2563eb !important;
    color: white !important;
    border-radius: 4px !important;
  }

  .nav-links {
    display: none !important;
  }

  .nav-links.active {
    display: flex !important;
  }
}

/* スマートフォン対応 */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .profile-image {
    width: 120px;
    height: 120px;
    font-size: 2.5rem;
  }

  nav {
    padding: 0 1rem;
  }
}

/* プリント用スタイル */
@media print {
  header {
    position: static;
    background: white;
    box-shadow: none;
  }

  .hero {
    background: none;
    color: #333;
  }

  .cta-button {
    display: none;
  }

  .partner {
    background: none;
    color: #333;
  }

  .partner .section-title {
    color: #2563eb;
  }
}
