/* Tailwind config */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom styles */
:root {
  --section-spacing: 4rem;
  --container-padding: 2rem;
  --primary-color: #10B981;
  --secondary-color: #3B82F6;
  --header-height: 72px;
}

/* モバイル用変数 */
@media (max-width: 640px) {
  :root {
    --section-spacing: 2rem;
    --container-padding: 1rem;
    --header-height: 60px;
  }
}

html {
  scroll-behavior: auto;
}

/* 基本スタイル */
body { 
  font-family: 'Noto Sans JP', sans-serif;
  color: #333;
  font-size: 16px;
  overflow-x: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  min-height: 100vh;
  scroll-behavior: auto;
}

/* モバイル用フォントサイズ調整 */
@media (max-width: 640px) {
  body {
    font-size: 14px;
  }
}

/* レイアウトスタイル */
section {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* ヒーローセクションの特別な処理 */
.hero-section {
  padding: 0;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* スクロールインジケーターの位置調整 */
.hero-section .scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

/* インデックスページのセクションスタイル */
[id^="index-"] {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  padding: 0;
  margin-top: 0;
  margin-bottom: 0;
  position: relative;
}

/* インデックスページのセクション内部のコンテナ */
[id^="index-"] > .container {
  padding-top: var(--section-spacing); /* 通常のセクション余白のみ */
  padding-bottom: var(--section-spacing);
}

/* ヒーローセクションの直後のセクション */
.hero-section + [id^="index-"] {
  margin-top: 0;
}

/* インデックスページのセクション間の余白 */
[id^="index-"] + [id^="index-"] {
  margin-top: 0;
}

/* 通常ページのセクションスタイル */
section:not(.hero-section):not([id^="index-"]) {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
  padding: var(--section-spacing) 0;
}

/* コンテナの設定 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
  position: relative;
  z-index: 2;
}

/* ヘッダーのスタイル */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 50;
  border-bottom: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ロゴのスタイル */
.logo {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: 24px;
  color: #1a1a1a;
  margin-right: 2rem;
  transition: color 0.3s ease;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  text-decoration: none;
}

.logo:hover {
  color: var(--primary-color);
}

/* ナビゲーションのスタイル */
.nav-link {
  position: relative;
  color: #1a1a1a;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.375rem 0.25rem;
  transition: color 0.3s ease;
  white-space: nowrap;
  text-decoration: none;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

/* モバイルメニュー */
.mobile-menu-button {
  display: none;
}

@media (max-width: 768px) {
  .mobile-menu-button {
    display: block;
  }

  .nav-links {
    display: none;
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
  }
}

/* セクションヘッダー */
.section-header {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  line-height: 1.2;
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

/* カードスタイル */
.card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(229, 231, 235, 0.5);
  border-radius: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ボタンスタイル */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* フォームスタイル */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #4B5563;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
  background: #F9FAFB;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* アニメーション */
.fade-in-up {
  opacity: 0;
  animation: slideInFromBottom 0.6s ease-out forwards;
}

.stagger-fade-in > * {
  opacity: 0;
  animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.stagger-fade-in > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-fade-in > *:nth-child(2) { animation-delay: 0.3s; }
.stagger-fade-in > *:nth-child(3) { animation-delay: 0.5s; }
.stagger-fade-in > *:nth-child(4) { animation-delay: 0.7s; }

@keyframes slideInFromBottom {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  :root {
    --section-spacing: 4rem;
    --container-padding: 1rem;
  }

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

  .container {
    padding: 0 1rem;
  }
}

/* フッタースタイル */
footer {
  background: #1a1a1a;
  color: #fff;
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #fff;
}

.footer-link {
  color: #9CA3AF;
  transition: color 0.3s ease;
  text-decoration: none;
}

.footer-link:hover {
  color: #fff;
}

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

/* 360px幅対応のモバイル専用スタイル */
@media (max-width: 480px) {
  /* コンテナの調整 */
  .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    max-width: 100% !important;
  }
  
  /* ヘッダーの調整 */
  header {
    height: 60px !important;
  }
  
  header .max-w-7xl {
    padding: 0.5rem 0.75rem !important;
  }
  
  /* ロゴサイズの調整 */
  .logo {
    font-size: 18px !important;
    letter-spacing: 1.5px !important;
    margin-right: 1rem !important;
  }
  
  /* ナビゲーションリンクの調整 */
  .nav-link {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.125rem !important;
  }
  
  /* ナビゲーションボタンの調整 */
  .nav-button {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.75rem !important;
    border-radius: 0.375rem !important;
  }
  
  /* モバイルメニューボタンの調整 */
  .mobile-menu-button {
    width: 2rem !important;
    height: 2rem !important;
  }
  
  .mobile-menu-button svg {
    width: 1.25rem !important;
    height: 1.25rem !important;
  }
  
  /* モバイルメニューの調整 */
  .nav-links.active {
    top: 60px !important;
    padding: 0.75rem !important;
  }
  
  .nav-links.active .nav-link {
    padding: 0.75rem 0 !important;
    font-size: 0.875rem !important;
  }
  
  .nav-links.active .nav-button {
    padding: 0.75rem 1rem !important;
    font-size: 0.875rem !important;
    margin-top: 0.5rem !important;
  }
  
  /* テキストサイズの調整 */
  h1, .text-6xl {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }
  
  h2, .text-4xl {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
  }
  
  h3, .text-2xl {
    font-size: 1.25rem !important;
    line-height: 1.4 !important;
  }
  
  .text-xl {
    font-size: 1rem !important;
  }
  
  .text-lg {
    font-size: 0.95rem !important;
  }
  
  /* セクションヘッダーの調整 */
  .section-header {
    font-size: 1.75rem !important;
    margin-bottom: 1.5rem !important;
  }
  
  .section-header::after {
    width: 40px !important;
    height: 3px !important;
  }
  
  /* パディングとマージンの調整 */
  .py-20 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  .py-12 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .py-8 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
  
  .px-8 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .px-6 {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  
  .px-4 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
  
  /* グリッドレイアウトの調整 */
  .grid-cols-2 {
    grid-template-columns: 1fr !important;
  }
  
  .grid-cols-3 {
    grid-template-columns: 1fr !important;
  }
  
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  /* ギャップの調整 */
  .gap-8 {
    gap: 1rem !important;
  }
  
  .gap-6 {
    gap: 0.75rem !important;
  }
  
  .gap-4 {
    gap: 0.5rem !important;
  }
  
  /* ボタンサイズの調整 */
  .btn {
    padding: 0.75rem 1.25rem !important;
    font-size: 0.875rem !important;
    border-radius: 0.5rem !important;
  }
  
  .px-8.py-4 {
    padding: 0.75rem 1.25rem !important;
  }
  
  .px-6.py-3 {
    padding: 0.5rem 1rem !important;
  }
  
  /* フォーム要素の調整 */
  input, textarea, select {
    font-size: 14px !important;
    padding: 0.75rem !important;
  }
  
  .form-input {
    padding: 0.75rem !important;
    font-size: 14px !important;
  }
  
  /* カードとボックスの調整 */
  .card {
    border-radius: 1rem !important;
  }
  
  .rounded-2xl {
    border-radius: 1rem !important;
  }
  
  .rounded-xl {
    border-radius: 0.75rem !important;
  }
  
  /* シャドウの調整 */
  .shadow-lg {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
  }
} 