/* 匠総合事務所 ランディングページ CSS - 修正版 */

/* フォント読み込み */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300;400;500;600;700&display=swap');

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Serif JP', serif;
  color: #1a2332;
  line-height: 1.7;
  background-color: #ffffff;
  overflow-x: hidden;
}

.takumi-lp {
  width: 100%;
  position: relative;
}

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

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

/* ロゴアニメーション - その場でフェードイン版 */
@keyframes logoFadeInOnSpot {
  from {
    opacity: 0;
    filter: blur(5px);
  }
  to {
    opacity: 1;
    filter: blur(0px);
  }
}

@keyframes logoGlow {
  0%, 100% {
    filter: drop-shadow(0 4px 20px rgba(26, 35, 50, 0.1));
  }
  50% {
    filter: drop-shadow(0 8px 40px rgba(26, 35, 50, 0.3));
  }
}

@keyframes scrollFadeIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 0.7;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* アニメーションクラス */
.fade-in {
  animation: fadeIn 1.2s ease-out forwards;
  opacity: 0;
}

.fade-in-up {
  animation: fadeInUp 1.2s ease-out forwards;
  opacity: 0;
}

.delay-1 {
  animation-delay: 0.3s;
}

.delay-2 {
  animation-delay: 0.6s;
}

.delay-3 {
  animation-delay: 0.9s;
}

/* キービジュアル */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(26, 35, 50, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(26, 35, 50, 0.03) 0%, transparent 50%);
  z-index: 1;
}

.hero-container {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
}

/* ロゴコンテナ */
.logo-container {
  margin-bottom: 250px;
  position: relative;
  animation: logoFadeInOnSpot 3s ease-out forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.logo-jp {
  max-width: 100%;
  width: 500px;
  height: auto;
  filter: drop-shadow(0 4px 20px rgba(26, 35, 50, 0.1));
  transition: all 0.3s ease;
  animation: logoGlow 5s ease-in-out infinite 4s;
}

.logo-container:hover .logo-jp {
  transform: translateY(-10px) scale(1.05);
  filter: drop-shadow(0 15px 50px rgba(26, 35, 50, 0.4));
}

/* スクロールインジケーター */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: scrollFadeIn 1s ease-out 5s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, #1a2332, transparent);
  margin-bottom: 10px;
}

.scroll-text {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: #1a2332;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* お問い合わせセクション */
.contact-section {
  padding: 120px 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  position: relative;
}

.contact-container {
  max-width: 800px;
  width: 90%;
  margin: 0 auto;
}

.contact-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-title {
  position: relative;
  margin-bottom: 30px;
}

.title-en {
  display: block;
  font-family: 'Hoefler Text', 'Times New Roman', serif;
  font-size: 3rem;
  font-weight: 400;
  color: #1a2332;
  letter-spacing: 0.2em;
  opacity: 0.1;
  line-height: 1;
}

.section-title .title-jp {
  display: block;
  font-size: 2rem;
  font-weight: 500;
  color: #1a2332;
  letter-spacing: 0.1em;
  margin-top: -20px;
  position: relative;
  z-index: 2;
}

.section-subtitle {
  font-size: 1rem;
  color: #666;
  line-height: 1.8;
}

/* フォームスタイル */
.contact-form-wrapper {
  background: #ffffff;
  border-radius: 0;
  padding: 60px;
  box-shadow: 0 20px 60px rgba(26, 35, 50, 0.08);
  position: relative;
  overflow: hidden;
}

.contact-form-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1a2332, #4a5568, #1a2332);
}

.contact-form {
  position: relative;
  z-index: 2;
}

.form-group {
  margin-bottom: 40px;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1a2332;
  margin-bottom: 15px;
  letter-spacing: 0.05em;
}

.required {
  color: #e53e3e;
  margin-left: 4px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 15px 0;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  background: transparent;
  font-size: 1rem;
  font-family: inherit;
  color: #1a2332;
  transition: all 0.3s ease;
  outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-bottom-color: #1a2332;
}

.form-input:focus + .input-line,
.form-textarea:focus + .input-line,
.form-select:focus + .input-line {
  transform: scaleX(1);
}

.input-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #1a2332;
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.form-select {
  appearance: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.select-arrow {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #666;
  pointer-events: none;
  z-index: 1;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* 送信ボタン */
.form-submit {
  text-align: center;
  margin-top: 60px;
}

.submit-button {
  position: relative;
  padding: 20px 60px;
  border: 2px solid #1a2332;
  background: transparent;
  color: #1a2332;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: 0.1em;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s ease;
  z-index: 1;
  min-width: 200px;
}

.button-text {
  position: relative;
  z-index: 3;
  transition: opacity 0.3s ease;
}

.submit-button .button-bg {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: #1a2332;
  transition: left 0.4s ease;
  z-index: 2;
}

.button-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.submit-button:hover .button-bg {
  left: 0;
}

.submit-button:hover {
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(26, 35, 50, 0.2);
}

.submit-button.loading .button-text {
  opacity: 0;
}

.submit-button.loading .button-loading {
  opacity: 1;
}

/* フッター */
.footer {
  background: #1a2332;
  color: #ffffff;
  padding: 40px 0;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
}

.footer-logo {
  margin-bottom: 20px;
}

.footer-logo-img {
  width: 200px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.footer-text {
  font-size: 0.9rem;
  opacity: 0.7;
  letter-spacing: 0.05em;
}

/* フォームメッセージスタイル */
.form-message {
  margin-bottom: 30px;
  padding: 20px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
}

.form-message.show {
  opacity: 1;
  transform: translateY(0);
}

.form-message.success {
  background: #f0fff4;
  border: 1px solid #68d391;
  color: #2f855a;
}

.form-message.error {
  background: #fff5f5;
  border: 1px solid #fc8181;
  color: #c53030;
}

.message-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.message-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: currentColor;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
}

.message-text {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* フィールドエラースタイル */
.field-error {
  color: #e53e3e;
  font-size: 0.85rem;
  margin-top: 8px;
  animation: fadeInUp 0.3s ease;
}

.form-input.error,
.form-textarea.error,
.form-select.error {
  border-bottom-color: #e53e3e;
}

.form-input.error + .input-line,
.form-textarea.error + .input-line,
.form-select.error + .input-line {
  background: #e53e3e;
  transform: scaleX(1);
}

/* アニメーション追加クラス */
.animate-in {
  animation-play-state: running !important;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .logo-jp {
    width: 350px;
    max-width: 85vw;
  }
  
  .logo-container {
    margin-bottom: 180px;
  }
  
  .hero-container {
    padding: 20px 15px;
  }
  
  .scroll-indicator {
    bottom: 30px;
  }
  
  .title-en {
    font-size: 2rem;
  }
  
  .section-title .title-jp {
    font-size: 1.6rem;
  }
  
  .contact-form-wrapper {
    padding: 40px 30px;
  }
  
  .contact-section {
    padding: 80px 0;
  }
}

@media (max-width: 480px) {
  .logo-jp {
    width: 280px;
    max-width: 80vw;
  }
  
  .logo-container {
    margin-bottom: 150px;
  }
  
  .hero-container {
    padding: 15px 10px;
  }
  
  .scroll-indicator {
    bottom: 25px;
  }
  
  .scroll-text {
    font-size: 0.7rem;
  }
  
  .contact-form-wrapper {
    padding: 30px 20px;
  }
  
  .hero-container {
    width: 95%;
  }
  
  .contact-container {
    width: 95%;
  }
}

/* 非常に小さい画面への対応 */
@media (max-width: 320px) {
  .logo-jp {
    width: 240px;
    max-width: 75vw;
  }
  
  .logo-container {
    margin-bottom: 120px;
  }
}

/* アニメーション強制実行 */
.logo-container.animate-start {
  animation: logoFadeInOnSpot 3s ease-out forwards !important;
}

.scroll-indicator.animate-start {
  animation: scrollFadeIn 1s ease-out 5s forwards !important;
}

/* Contact Form 7 デザイン調整用CSS */

/* フォーム全体のラッパー */
.wpcf7-form {
  position: relative;
  z-index: 2;
}

/* 各入力フィールドの余白調整 */
.wpcf7-form .form-group {
  margin-bottom: 40px;
}

/* 送信ボタンのラッパー */
.wpcf7-form .form-submit {
  text-align: center;
  margin-top: 60px;
}

/* エラーメッセージ（赤文字） */
.wpcf7-not-valid-tip {
  color: #e53e3e;
  font-size: 0.85rem;
  margin-top: 8px;
}

/* 送信後の完了・エラーメッセージ */
.wpcf7-response-output {
  margin: 2em 0.5em 1em;
  padding: 0.5em 1em;
  border: 2px solid #00a0d2; /* 色は適宜調整 */
}