/* ================================================
   UniGain - プロフェッショナルデザインシステム
   タイポグラフィ、スペーシング、ビジュアルの最適化
   ================================================ */

/* ================================================
   1. タイポグラフィの洗練
   ================================================ */

/* より読みやすい基本フォントサイズ */
html {
  font-size: 16px;
  line-height: 1.6;
}

body {
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: #2c3e50;
}

/* 見出しのタイポグラフィ最適化 */
h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0;
  margin-bottom: 1rem;
}

h4 {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  line-height: 1.5;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* 本文テキストの最適化 */
p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  color: #475569;
}

/* リンクの洗練 */
a {
  color: #17a0ce;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #1286ad;
  opacity: 0.9;
}

/* 英語フォントの最適化 */
.en-text {
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ================================================
   2. スペーシングシステムの洗練
   ================================================ */

/* セクション間の余白を最適化 */
.section {
  padding: clamp(4rem, 10vw, 7rem) 0;
}

.section-dark {
  padding: clamp(4rem, 10vw, 7rem) 0;
  background: linear-gradient(135deg, #0D1824 0%, #1a2a3a 100%);
}

.section-gray {
  padding: clamp(4rem, 10vw, 7rem) 0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* コンテナの余白最適化 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 2.5rem);
}

/* マージン・パディングユーティリティ */
.mb-small { margin-bottom: 1.5rem; }
.mb-medium { margin-bottom: 2.5rem; }
.mb-large { margin-bottom: 4rem; }

.mt-small { margin-top: 1.5rem; }
.mt-medium { margin-top: 2.5rem; }
.mt-large { margin-top: 4rem; }

.py-small { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-medium { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-large { padding-top: 4rem; padding-bottom: 4rem; }

/* ================================================
   3. Heroセクションの最適化
   ================================================ */

.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0D1824 0%, #17a0ce 100%);
  overflow: hidden;
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 2rem);
}

.hero-content h1 {
  color: #fff;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero-tagline {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 2rem;
  text-transform: uppercase;
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
}

.hero-accent-line {
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, transparent, #17a0ce, transparent);
  margin: 2rem auto;
  border-radius: 2px;
}

/* ================================================
   4. カードデザインの洗練
   ================================================ */

.card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.mission-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mission-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.mission-card h3 {
  color: #17a0ce;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.mission-card p {
  color: #475569;
  line-height: 1.8;
  font-size: 1rem;
}

/* ================================================
   5. ボタンの洗練
   ================================================ */

.btn {
  display: inline-block;
  padding: 1rem 2.25rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.btn-primary {
  background: linear-gradient(135deg, #17a0ce 0%, #1286ad 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(23, 160, 206, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1286ad 0%, #0f6a8d 100%);
  box-shadow: 0 6px 20px rgba(23, 160, 206, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: #fff;
  color: #17a0ce;
  border: 2px solid #17a0ce;
  box-shadow: 0 2px 10px rgba(23, 160, 206, 0.1);
}

.btn-secondary:hover {
  background: #17a0ce;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(23, 160, 206, 0.3);
}

/* ================================================
   6. グリッドレイアウトの最適化
   ================================================ */

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

.mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

/* ================================================
   7. サービスカードの洗練
   ================================================ */

.service-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border-color: #17a0ce;
}

.service-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  display: block;
}

.service-card h3 {
  font-size: 1.75rem;
  color: #0D1824;
  margin-bottom: 1rem;
  font-weight: 700;
}

.service-card p {
  color: #64748b;
  line-height: 1.8;
  font-size: 0.95rem;
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

/* ================================================
   8. テキスト配置の最適化
   ================================================ */

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

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* セクションタイトルの洗練 */
.section h2.text-center {
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 1.5rem;
}

.section h2.text-center::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #17a0ce, transparent);
  border-radius: 2px;
}

/* ================================================
   9. CTAセクションの最適化
   ================================================ */

.cta-section {
  padding: clamp(4rem, 10vw, 6rem) 0;
  background: linear-gradient(135deg, #0D1824 0%, #17a0ce 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section h2 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.cta-description {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

/* ================================================
   10. フッターの洗練
   ================================================ */

.footer {
  background: linear-gradient(135deg, #0D1824 0%, #1a2a3a 100%);
  color: #fff;
  padding: clamp(3rem, 8vw, 5rem) 0 2rem;
}

.footer h3, .footer h4 {
  color: #fff;
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.footer p, .footer a {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
  font-size: 0.95rem;
}

.footer a:hover {
  color: #17a0ce;
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ================================================
   11. アニメーションの追加
   ================================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* ================================================
   12. レスポンシブタイポグラフィの調整
   ================================================ */

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .hero {
    min-height: 70vh;
  }

  .hero-content h1 {
    font-size: clamp(2rem, 8vw, 2.75rem);
    margin-bottom: 1.25rem;
  }

  .hero-tagline {
    font-size: clamp(0.95rem, 3vw, 1.15rem);
    margin-bottom: 1.5rem;
  }

  .hero-description {
    font-size: clamp(0.9rem, 2.5vw, 1.05rem);
    line-height: 1.7;
  }

  .section {
    padding: clamp(3rem, 8vw, 5rem) 0;
  }

  .card, .mission-card, .service-card {
    padding: 2rem;
  }

  .btn {
    padding: 0.875rem 1.75rem;
    font-size: 0.95rem;
  }

  .feature-grid,
  .mission-grid,
  .service-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .hero-content h1 {
    font-size: clamp(1.75rem, 9vw, 2.25rem);
  }

  .card, .mission-card, .service-card {
    padding: 1.75rem;
  }

  .btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
  }
}

/* ================================================
   13. アクセシビリティの向上
   ================================================ */

/* フォーカス時の視認性向上 */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 3px solid #17a0ce;
  outline-offset: 2px;
}

/* アニメーション削減設定に対応 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ハイコントラストモード対応 */
@media (prefers-contrast: high) {
  .btn-primary {
    border: 2px solid #fff;
  }

  .card, .mission-card, .service-card {
    border-width: 2px;
  }
}

/* ================================================
   14. プリント最適化
   ================================================ */

@media print {
  .hero {
    min-height: auto;
    padding: 2rem 0;
  }

  .btn, .footer, .cta-section {
    display: none;
  }

  .card, .mission-card, .service-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
