/* =========================================
   グローバル変数
   ========================================= */
:root {
  --bg:        #f4f8fb;
  --bg-alt:    #eaf3f8;
  --ink:       #0d1f2d;
  --ink-mid:   #3d5a6e;
  --ink-light: #7a9aaa;
  --teal:      #0a8a7e;
  --teal-light:#12b5a7;
  --sky:       #a8d8ea;
  --orange:    #e8621a;
  --orange-light: #f5884e;
  --white:     #ffffff;
  --surface:   rgba(255,255,255,0.72);
}

*, *::before, *::after {
  box-sizing: border-box;
}

@media (hover: hover) {
  *, *::before, *::after {
    cursor: none !important;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background-color: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

.font-mincho {
  font-family: 'Shippori Mincho', serif;
}

/* =========================================
   ノイズオーバーレイ（ごく薄く質感を加える）
   ========================================= */
.noise-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0.018;
  pointer-events: none;
  z-index: 1000;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px;
}

/* =========================================
   カスタムカーソル
   ========================================= */
#cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 5px; height: 5px;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, border-color 0.25s ease, background-color 0.25s ease;
  will-change: left, top;
}

#cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 28px; height: 28px;
  border: 1.5px solid rgba(10, 138, 126, 0.45);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
  will-change: left, top;
}

#cursor-ripple-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 99990;
  overflow: hidden;
}

.cursor-ripple {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: rippleExpand 1.8s cubic-bezier(0.15, 0.5, 0.35, 1) forwards;
  pointer-events: none;
}

@keyframes rippleExpand {
  0% {
    width: 8px; height: 8px;
    opacity: 0.55;
    border: 1.5px solid rgba(10, 138, 126, 0.55);
  }
  100% {
    width: 160px; height: 160px;
    opacity: 0;
    border: 1px solid rgba(10, 138, 126, 0);
  }
}

/* =========================================
   ナビゲーション
   ========================================= */
#nav {
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

#nav.scrolled {
  background: rgba(244, 248, 251, 0.94) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(10, 138, 126, 0.12);
}

.nav-link {
  position: relative;
  color: var(--ink-mid);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--teal);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-tel {
  color: var(--teal);
  border: 1px solid rgba(10, 138, 126, 0.3);
  transition: background 0.3s ease, color 0.3s ease;
}

.nav-tel:hover {
  background: rgba(10, 138, 126, 0.08);
}

/* モバイルメニュー */
#mobileMenu {
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  background: rgba(244, 248, 251, 0.98);
}

#mobileMenu.open {
  transform: translateX(0);
}

.mobile-nav-link {
  color: var(--ink-mid);
  transition: color 0.3s ease;
}

.mobile-nav-link:hover {
  color: var(--teal);
}

/* =========================================
   ヒーローセクション
   ========================================= */
#hero {
  position: relative;
  background: linear-gradient(160deg, #e8f4fb 0%, #d4edf8 40%, #c8e8f4 100%);
}

#heroCanvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  filter: blur(0.6px);
  opacity: 0.9;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(232, 244, 251, 0.1) 0%,
    rgba(232, 244, 251, 0.05) 50%,
    rgba(232, 244, 251, 0.85) 90%,
    rgba(244, 248, 251, 1) 100%
  );
}

/* ヒーローテキストアニメーション */
.hero-sub {
  opacity: 0;
  animation: fadeInUp 0.9s ease 0.3s both;
  color: var(--teal);
  letter-spacing: 0.35em;
  font-size: 0.75rem;
}

.hero-title {
  opacity: 0;
  animation: fadeInUp 1s ease 0.55s both, shimmerText 6s linear 1.6s infinite;
  background: linear-gradient(135deg, var(--ink) 0%, var(--teal) 40%, var(--ink) 80%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  opacity: 0;
  animation: fadeInUp 0.9s ease 0.85s both;
  color: var(--ink-mid);
}

.hero-cta {
  opacity: 0;
  animation: fadeInUp 0.9s ease 1.05s both;
}

.hero-scroll {
  opacity: 0;
  animation: fadeInUp 0.9s ease 1.35s both;
}

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

@keyframes shimmerText {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.scroll-line {
  background: linear-gradient(to bottom, rgba(10, 138, 126, 0.6), transparent);
  animation: scrollBounce 2.2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50%       { transform: translateY(7px); opacity: 0.35; }
}

/* ボタン */
.btn-primary {
  display: inline-block;
  position: relative;
  overflow: hidden;
  background: var(--teal);
  color: #fff;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--teal-light);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}

.btn-primary:hover::before {
  transform: translateX(0);
}

.btn-primary span {
  position: relative;
  z-index: 1;
}

.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(10, 138, 126, 0.32);
}

.btn-secondary {
  display: inline-block;
  border: 1.5px solid rgba(13, 31, 45, 0.3);
  color: var(--ink);
  transition: border-color 0.3s ease, color 0.3s ease;
}

.btn-secondary:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* ウェーブ */
.wave-bottom {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  line-height: 0;
}

/* =========================================
   ウォーターデバイダー
   ========================================= */
.water-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal), var(--orange), var(--teal), transparent);
  position: relative;
  overflow: hidden;
}

.water-divider::after {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.85), transparent);
  animation: waterShimmer 3.5s ease-in-out infinite;
}

@keyframes waterShimmer {
  0%   { left: -60%; }
  100% { left: 160%; }
}

/* =========================================
   スクロールアニメーション
   ========================================= */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }

/* =========================================
   アバウトセクション
   ========================================= */
#about {
  background: var(--white);
}

.stat-number {
  font-family: 'Shippori Mincho', serif;
  line-height: 1;
  background: linear-gradient(135deg, var(--teal-light), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.orb-container {
  position: relative;
}

.orb-glow {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 40%, rgba(10, 138, 126, 0.14) 0%, rgba(232, 98, 26, 0.07) 55%, transparent 75%);
  animation: pulseGlow 4.5s ease-in-out infinite;
}

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

.orbit-ring-1 {
  animation: spin 22s linear infinite;
  border-color: rgba(10, 138, 126, 0.2);
}

.orbit-ring-2 {
  animation: spinReverse 16s linear infinite;
  border-color: rgba(232, 98, 26, 0.15);
}

@keyframes spin        { from { transform: rotate(0deg); }   to { transform: rotate(360deg); } }
@keyframes spinReverse { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }

.orbit-dot-1 { position: absolute; inset: 0; animation: spin 11s linear infinite; }
.orbit-dot-2 { position: absolute; inset: 0; animation: spinReverse 8s linear infinite; }

.dot-glow-teal   { box-shadow: 0 0 10px rgba(10, 138, 126, 0.9); }
.dot-glow-orange { box-shadow: 0 0 8px rgba(232, 98, 26, 0.9); }

.da-logo {
  background: linear-gradient(135deg, var(--teal-light), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =========================================
   サービスセクション
   ========================================= */
#services {
  background: var(--bg-alt);
}

.service-card {
  position: relative;
  overflow: hidden;
  background: var(--white);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.7s ease, height 0.7s ease;
}

.service-card-teal::before {
  background: radial-gradient(circle, rgba(10, 138, 126, 0.07) 0%, transparent 70%);
}

.service-card-orange::before {
  background: radial-gradient(circle, rgba(232, 98, 26, 0.07) 0%, transparent 70%);
}

.service-card:hover::before {
  width: 450px; height: 450px;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(10, 138, 126, 0.12);
}

.svc-line {
  width: 2rem;
  height: 1px;
  transition: width 0.5s ease;
}

.svc-line-teal   { background: rgba(10, 138, 126, 0.5); }
.svc-line-orange { background: rgba(232, 98, 26, 0.5); }

.group:hover .svc-line {
  width: 100%;
}

/* =========================================
   プロセスセクション
   ========================================= */
#process {
  background: var(--white);
}

.step-num {
  font-family: 'Shippori Mincho', serif;
  font-size: 4rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--teal-light), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.25;
  transition: opacity 0.3s ease;
}

.group:hover .step-num {
  opacity: 0.7;
}

.step-connector {
  background: linear-gradient(to bottom, rgba(10, 138, 126, 0.3), transparent);
}

/* =========================================
   コンタクトセクション
   ========================================= */
#contact {
  background: var(--bg-alt);
}

.form-input {
  background: var(--white);
  border: 1.5px solid rgba(10, 138, 126, 0.2);
  color: var(--ink);
  font-family: 'Noto Sans JP', sans-serif;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(10, 138, 126, 0.1);
}

.form-input::placeholder {
  color: rgba(13, 31, 45, 0.28);
}

select.form-input option {
  background: var(--white);
  color: var(--ink);
}

.btn-submit {
  background: var(--teal);
  color: white;
  position: relative;
  overflow: hidden;
}

.btn-submit:hover {
  box-shadow: 0 8px 32px rgba(10, 138, 126, 0.35);
}

.btn-submit-hover {
  background: var(--teal-light);
  position: absolute;
  inset: 0;
  z-index: 0;
}

.phone-cta {
  border: 1.5px solid rgba(10, 138, 126, 0.3);
  transition: background 0.3s ease;
}

.phone-cta:hover {
  background: rgba(10, 138, 126, 0.06);
}

/* =========================================
   フッター
   ========================================= */
footer {
  background: var(--ink);
  color: rgba(255,255,255,0.85);
}

footer .footer-sub {
  color: rgba(255,255,255,0.35);
}

footer a {
  color: rgba(255,255,255,0.45);
  transition: color 0.3s ease;
}

footer a:hover {
  color: rgba(255,255,255,0.9);
}

/* =========================================
   レスポンシブ対応
   ========================================= */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.4rem;
    line-height: 1.35;
  }

  .step-num {
    font-size: 3rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.9rem;
  }
}

@media (hover: none) {
  #cursor-dot,
  #cursor-ring,
  #cursor-ripple-container {
    display: none;
  }
}
