/*
Theme Name: OWL DIGITAL
Theme URI: https://example.com
Author: Honey Holon
Author URI: https://example.com
Description: OWL DIGITAL 自社サイト用テーマ - Three.js イマーシブ体験
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: owl-digital
*/

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

html {
  scroll-behavior: auto;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: #0a0a0a;
  color: #e8e8e8;
  line-height: 1.8;
  overflow-x: hidden;
}

/* ============================================================
   ヘッダー
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 2rem;
  z-index: 50;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-logo {
  display: inline-block;
  pointer-events: auto;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.header-logo:hover {
  opacity: 1;
}

.header-logo img {
  height: 44px;
  width: auto;
}

/* サブページ用ヘッダー */
.site-header.subpage {
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.site-header.subpage .header-logo img {
  height: 36px;
}

/* ============================================================
   ハンバーガーメニュー
   ============================================================ */
.menu-toggle {
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  pointer-events: auto;
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  z-index: 100;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #e8e8e8;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.menu-toggle span:nth-child(1) { transform: translateY(-6px); }
.menu-toggle span:nth-child(3) { transform: translateY(6px); }

.menu-toggle.active span:nth-child(1) { transform: translateY(0) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }

/* ============================================================
   フルスクリーンナビゲーション
   ============================================================ */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.nav-menu {
  list-style: none;
  text-align: center;
}

.nav-menu li {
  margin: 1.5rem 0;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.nav-overlay.active .nav-menu li {
  opacity: 1;
  transform: translateY(0);
}

.nav-overlay.active .nav-menu li:nth-child(1) { transition-delay: 0.1s; }
.nav-overlay.active .nav-menu li:nth-child(2) { transition-delay: 0.15s; }
.nav-overlay.active .nav-menu li:nth-child(3) { transition-delay: 0.2s; }
.nav-overlay.active .nav-menu li:nth-child(4) { transition-delay: 0.25s; }

.nav-menu a {
  color: #e8e8e8;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: #8B5CF6;
}

/* ============================================================
   フッター
   ============================================================ */
.site-footer {
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: #666;
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #8B5CF6;
}

.copyright {
  font-size: 0.75rem;
  color: #444;
}

@media (max-width: 768px) {
  .footer-nav {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* ============================================================
   スクロールトップボタン
   ============================================================ */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 50%;
  cursor: pointer;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.scroll-top-btn.visible {
  opacity: 0.5;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  opacity: 1;
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.1);
  transform: translateY(-2px);
}

.scroll-top-btn::before {
  content: '';
  width: 8px;
  height: 8px;
  border-left: 1.5px solid rgba(139, 92, 246, 0.6);
  border-top: 1.5px solid rgba(139, 92, 246, 0.6);
  transform: rotate(45deg) translateY(2px);
  transition: border-color 0.3s ease;
}

.scroll-top-btn:hover::before {
  border-color: #8B5CF6;
}

@media (max-width: 768px) {
  .scroll-top-btn {
    width: 40px;
    height: 40px;
    bottom: 1.5rem;
    right: 1.5rem;
  }
}

/* ============================================================
   サブページ共通
   ============================================================ */
.subpage-main {
  max-width: 700px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
}

.page-title {
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.3);
}

/* ============================================================
   運営者情報ページ
   ============================================================ */
.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-table th {
  text-align: left;
  padding: 1rem 0;
  font-weight: 400;
  color: #888;
  width: 30%;
  font-size: 0.9rem;
}

.info-table td {
  padding: 1rem 0;
  color: #ccc;
  font-size: 0.95rem;
}

/* ============================================================
   プライバシーポリシーページ
   ============================================================ */
.policy-section {
  margin-bottom: 2.5rem;
}

.policy-section h2 {
  font-size: 1.1rem;
  font-weight: 500;
  color: #e8e8e8;
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 2px solid #8B5CF6;
}

.policy-section p,
.policy-section li {
  color: #aaa;
  font-size: 0.9rem;
  line-height: 1.9;
}

.policy-section ul {
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}

.policy-section li {
  margin-bottom: 0.5rem;
}

.last-updated {
  text-align: right;
  font-size: 0.8rem;
  color: #666;
  margin-top: 3rem;
}

/* ============================================================
   お問い合わせページ
   ============================================================ */
.contact-main {
  max-width: 600px;
}

.page-description {
  color: #888;
  font-size: 0.95rem;
  margin-bottom: 3rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.85rem;
  color: #aaa;
}

.form-group label .required {
  color: #8B5CF6;
  margin-left: 0.3rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0.9rem 1rem;
  color: #e8e8e8;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.5);
}

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

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.submit-button {
  display: inline-block;
  padding: 1.2rem 3rem;
  background: transparent;
  border: 1px solid #8B5CF6;
  color: #8B5CF6;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.submit-button:hover {
  background: #8B5CF6;
  color: #fff;
}

.field-error {
  display: block;
  color: #ff6b6b;
  font-size: 0.8rem;
  min-height: 1.2em;
  margin-top: 0.2rem;
}

.field-error:empty {
  display: none;
}

.form-note {
  font-size: 0.8rem;
  color: #666;
  margin-top: 1rem;
}

.form-note a {
  color: #8B5CF6;
  text-decoration: none;
}

.form-note a:hover {
  text-decoration: underline;
}

.alternative-contact {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.alternative-contact h2 {
  font-size: 1rem;
  font-weight: 400;
  color: #888;
  margin-bottom: 1rem;
}

.email-link {
  display: inline-block;
  color: #8B5CF6;
  text-decoration: none;
  font-size: 1rem;
  transition: opacity 0.3s ease;
}

.email-link:hover {
  opacity: 0.8;
}

/* ============================================================
   横スクロールモード（高さ超過時）
   ============================================================ */
/* コンテナ全体：横方向へのレイアウトを強制 */
.section-overlay.horizontal-scroll-mode .panel-inner {
  width: 100%;
  max-width: none; /* 幅制限を解除 */
  padding-left: 2rem;
  padding-right: 2rem;
  /* 左端揃えを保証 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

/* スクロール対象のコンテナ（グリッドなど） */
.section-overlay.horizontal-scroll-mode .services-grid,
.section-overlay.horizontal-scroll-mode .step-cases {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap; /* 縦に積みきれない場合は右へ折り返し */
  align-content: flex-start; /* 左詰め */
  
  /* 高さ制限：画面高さ - ヘッダーなどの余白 */
  height: 70vh; 
  max-height: 800px;
  
  width: max-content; /* 中身に合わせて幅を確保 */
  gap: 2rem; /* カラム間の隙間 */
  
  /* スクロールバー非表示でスクロール可能に（JSで制御するが念のため） */
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  
  /* 初期位置 */
  transform: translateX(0);
  transition: transform 0.1s ease-out; /* スムーズな移動 */
}

.section-overlay.horizontal-scroll-mode .services-grid::-webkit-scrollbar,
.section-overlay.horizontal-scroll-mode .step-cases::-webkit-scrollbar {
  display: none;
}

/* アイテムごとのスタイル調整 */
.section-overlay.horizontal-scroll-mode .service-card,
.section-overlay.horizontal-scroll-mode .step-case {
  width: 85vw; /* モバイル画面幅の大部分を使う */
  max-width: 350px;
  flex-shrink: 0; /* 縮小させない */
  margin-right: 2rem; /* 右側のマージン（gapが効かない場合の保険） */
  margin-bottom: 0; /* 縦マージンはgapで制御 */
}

/* スクロールインジケーター（スタイル修正） */
.scroll-indicator {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(139, 92, 246, 0.9);
  color: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-size: 0.8rem;
  z-index: 100;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.scroll-indicator.visible {
  opacity: 1;
}

.scroll-indicator.complete {
  background: rgba(34, 197, 94, 0.9);
}

.scroll-indicator svg {
  width: 16px;
  height: 16px;
}
