/* ===== Global Typography ===== */
body {
  font-family: 'Noto Sans JP', sans-serif;
}

/* Hide default cursor on pointer devices */
@media (pointer: fine) {
  body {
    cursor: none;
  }
}

/* ===== Custom Cursor ===== */
#cursor-glow {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle,
      rgba(0, 169, 157, 0.15) 0%,
      rgba(0, 0, 0, 0) 70%);
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  z-index: 9999;
  -webkit-transition: opacity 0.3s;
  transition: opacity 0.3s;
}

#cursor-dot {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: #00A99D;
  border-radius: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  z-index: 10000;
  box-shadow: 0 0 10px #00A99D;
}

/* ===== Hero / Utility ===== */
.hero-gradient {
  background: linear-gradient(135deg, #0a0f0d 0%, #001a17 100%);
}

.text-shadow {
  text-shadow: 0 0 20px rgba(0, 169, 157, 0.3);
}

.fade-in-up {
  opacity: 0;
  -webkit-transform: translateY(20px);
  transform: translateY(20px);
  -webkit-transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    -webkit-transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in-up.visible {
  opacity: 1;
  -webkit-transform: translateY(0);
  transform: translateY(0);
}

.delay-100 {
  transition-delay: 0.1s;
}

.delay-200 {
  transition-delay: 0.2s;
}

.delay-300 {
  transition-delay: 0.3s;
}

/* Cyber grid background */
.cyber-grid {
  background-image:
    linear-gradient(rgba(0, 169, 157, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 169, 157, 0.25) 1px, transparent 1px);
  background-size: 50px 50px;
  -webkit-perspective: 500px;
  perspective: 500px;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  -webkit-animation: grid-move 20s linear infinite;
  animation: grid-move 20s linear infinite;
}

/* Typing effect container */
.typing-container {
  display: inline-block;
  overflow: hidden;
  border-right: 3px solid #00A99D;
  white-space: nowrap;
  margin: 0 auto;
  letter-spacing: 0.10em;
}

/* Smooth scroll padding for fixed header */
html {
  scroll-padding-top: 80px;
}

/* ▼▼ モバイルでのスクロールアンカー中央寄せ修正 ▼▼ */
@media (max-width: 768px) {
  .scroll-anchor-center-fix {
    width: 100% !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
  }
}

/* ▲▲ 修正ここまで ▲▲ */

/* ===== Reduced motion support ===== */
@media (prefers-reduced-motion: reduce) {
  #cursor-glow {
    -webkit-transition: none;
    transition: none;
    display: none;
  }

  #cursor-dot {
    -webkit-transition: none;
    transition: none;
    display: none;
  }
}

/* ===== Light Theme ===== */
body.theme-light {
  background-color: #f4f4f5;
  color: #0f172a;
}

/* ヒーロー背景を明るく */
body.theme-light .hero-gradient {
  background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
}

/* 全体のベース背景 */
body.theme-light header,
body.theme-light footer {
  background-color: #f9fafb !important;
}

/* Dark系背景を明るく（カード・セクション・フォーム） */
body.theme-light .bg-meme-dark,
body.theme-light .bg-meme-dark-lighter,
body.theme-light .bg-black {
  background-color: #ffffff !important;
}

/* セクション背景（TOP） */
body.theme-light section#about,
body.theme-light section#service,
body.theme-light section#works,
body.theme-light section#company {
  background-color: #f9fafb !important;
}

/* COMPANYページのヒーローも明るいグラデーションに */
body.theme-light .company-hero {
  background: linear-gradient(135deg, #5e7b6f 0%, #0a3731 100%) !important;
}

/* テキスト色の調整 */
body.theme-light .text-white {
  color: #111827 !important;
}

body.theme-light .text-gray-200,
body.theme-light .text-gray-300,
body.theme-light .text-gray-400,
body.theme-light .text-gray-500 {
  color: #4b5563 !important;
}

/* 枠線を明るく */
body.theme-light .border-gray-700,
body.theme-light .border-gray-800,
body.theme-light .border-gray-900 {
  border-color: #e5e7eb !important;
}

/* カードなどのダークグレー背景 */
body.theme-light .bg-gray-800 {
  background-color: #e5e7eb !important;
}

/* ロゴ背景 */
body.theme-light .logo-bg {
  background: rgba(255, 255, 255, 0.96) !important;
}

/* カーソルの光も少し明るめに */
body.theme-light #cursor-glow {
  background: radial-gradient(circle,
      rgba(0, 169, 157, 0.18) 0%,
      rgba(255, 255, 255, 0) 70%);
}

/* Light theme overrides for contact section on dark bg（TOPのCTA用） */
body.theme-light #contact .text-white {
  color: #f9fafb !important;
}

body.theme-light #contact .text-gray-300,
body.theme-light #contact .text-gray-400,
body.theme-light #contact .text-gray-500 {
  color: #e5e7eb !important;
}

/* 会社概要ページヒーローの文字色は白のまま */
body.theme-light .company-hero .text-white {
  color: #f9fafb !important;
}

body.theme-light .company-hero .text-gray-400,
body.theme-light .company-hero .text-gray-300,
body.theme-light .company-hero .text-gray-200 {
  color: #e5e7eb !important;
}

/* フォーム系（問い合わせページなど）を明るく */
body.theme-light input[type="text"],
body.theme-light input[type="email"],
body.theme-light input[type="tel"],
body.theme-light input[type="url"],
body.theme-light input[type="password"],
body.theme-light textarea,
body.theme-light select {
  background-color: #ffffff !important;
  color: #111827 !important;
  border-color: #d1d5db !important;
}

body.theme-light input::placeholder,
body.theme-light textarea::placeholder {
  color: #9ca3af !important;
}

/* Hero Section Description: Fixed color for BOTH Dark and Light modes as requested */
.hero-gradient .text-gray-300 {
  color: #4b5563 !important;
}

/* ===== Animations (for Tailwind's custom keyframes) ===== */

/* Webkit Keyframes for Blob */
@-webkit-keyframes blob {
  0% {
    -webkit-transform: translate(0px, 0px) scale(1) translateZ(0);
  }

  33% {
    -webkit-transform: translate(30px, -50px) scale(1.1) translateZ(0);
  }

  66% {
    -webkit-transform: translate(-20px, 20px) scale(0.9) translateZ(0);
  }

  100% {
    -webkit-transform: translate(0px, 0px) scale(1) translateZ(0);
  }
}

@keyframes blob {
  0% {
    transform: translate(0px, 0px) scale(1) translateZ(0);
  }

  33% {
    transform: translate(30px, -50px) scale(1.1) translateZ(0);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.9) translateZ(0);
  }

  100% {
    transform: translate(0px, 0px) scale(1) translateZ(0);
  }
}

/* Webkit Keyframes for Typing */
@-webkit-keyframes typing {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

@keyframes typing {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

/* Webkit Keyframes for Blink Caret */
@-webkit-keyframes blink-caret {

  from,
  to {
    border-color: transparent;
  }

  50% {
    border-color: #00A99D;
  }
}

@keyframes blink-caret {

  from,
  to {
    border-color: transparent;
  }

  50% {
    border-color: #00A99D;
  }
}

/* Webkit Keyframes for Grid Move */
@-webkit-keyframes grid-move {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 0 50px;
  }
}

@keyframes grid-move {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 0 50px;
  }
}

/* Utility class to attach typing animation when desired */
.animate-typing {
  -webkit-animation: typing 3.5s steps(40, end),
    blink-caret 0.75s step-end infinite;
  animation: typing 3.5s steps(40, end),
    blink-caret 0.75s step-end infinite;
}

/* ===== Contact Form 7 Custom Styles ===== */

/* CF7 フォーム全体 */
.wpcf7 {
  font-family: 'Noto Sans JP', sans-serif;
}

.wpcf7 p {
  margin-bottom: 1.25rem;
}

/* ラベル */
.wpcf7 label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 0.5rem;
}

/* 必須バッジ */
.wpcf7 .required-badge {
  font-size: 0.75rem;
  color: #00A99D;
  margin-left: 0.25rem;
}

/* テキスト入力・テキストエリア */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 textarea,
.wpcf7 select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background-color: #121212;
  border: 1px solid #374151;
  color: #f3f4f6;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="url"]:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
  border-color: #00A99D;
  box-shadow: 0 0 0 2px rgba(0, 169, 157, 0.3);
}

.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder {
  color: #6b7280;
}

.wpcf7 textarea {
  min-height: 150px;
  resize: vertical;
}

/* 送信ボタンの親要素を中央寄せ */
.wpcf7 p:last-of-type {
  text-align: center;
}

/* 送信ボタン */
.wpcf7 input[type="submit"] {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  background: linear-gradient(to right, #00A99D, #008F85);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 169, 157, 0.25);
  transition: box-shadow 0.3s, transform 0.3s;
}

.wpcf7 input[type="submit"]:hover {
  box-shadow: 0 0 20px rgba(0, 169, 157, 0.5);
  transform: translateY(-2px);
}

/* バリデーションエラー */
.wpcf7-not-valid-tip {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #f87171;
}

.wpcf7 .wpcf7-not-valid {
  border-color: #ef4444 !important;
}

/* 送信完了メッセージ */
.wpcf7-response-output {
  margin-top: 1.5rem !important;
  padding: 0.75rem 1rem !important;
  border-radius: 0.5rem !important;
  font-size: 0.875rem;
}

/* 送信成功 */
.wpcf7 form.sent .wpcf7-response-output {
  border-color: #00A99D !important;
  background-color: rgba(0, 169, 157, 0.1) !important;
  color: #00A99D !important;
}

/* 送信失敗 */
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output {
  border-color: #ef4444 !important;
  background-color: rgba(239, 68, 68, 0.1) !important;
  color: #f87171 !important;
}

/* バリデーションエラー時 */
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output {
  border-color: #f59e0b !important;
  background-color: rgba(245, 158, 11, 0.1) !important;
  color: #fbbf24 !important;
}

/* スピナー */
.wpcf7-spinner {
  display: inline-block;
  margin-left: 0.5rem;
}

/* Light Theme の CF7 上書き */
body.theme-light .wpcf7 label {
  color: #374151;
}

body.theme-light .wpcf7 input[type="text"],
body.theme-light .wpcf7 input[type="email"],
body.theme-light .wpcf7 input[type="tel"],
body.theme-light .wpcf7 input[type="url"],
body.theme-light .wpcf7 textarea,
body.theme-light .wpcf7 select {
  background-color: #ffffff;
  border-color: #d1d5db;
  color: #111827;
}

body.theme-light .wpcf7 input::placeholder,
body.theme-light .wpcf7 textarea::placeholder {
  color: #9ca3af;
}