/* ============================================
   Hero: Scanline overlay (dark phase only)
   ============================================ */
.hero-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 2;
  transition: opacity 1.5s ease;
}

.hero-section.light-phase::after {
  opacity: 0;
}

/* Vignette (dark phase only) */
.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(10, 10, 10, 0.8) 100%);
  pointer-events: none;
  z-index: 3;
  transition: opacity 1.5s ease;
}

.hero-section.light-phase::before {
  opacity: 0;
}

/* ============================================
   Service section subtle decoration
   ============================================ */
.service-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Gradient dividers between sections */
.service-section + .service-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
}

/* ============================================
   CTA button ripple
   ============================================ */
.btn-cta {
  position: relative;
  overflow: hidden;
}

.btn-cta::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-cta:hover::after {
  width: 300px;
  height: 300px;
}

/* ============================================
   Glossary Term Links
   ============================================ */
.glossary-term {
  color: var(--color-accent-blue);
  cursor: pointer;
  border-bottom: 1px dotted var(--color-accent-blue);
  transition: color 0.2s, border-color 0.2s;
  text-decoration: none;
  display: inline;
}

.glossary-term:hover {
  color: var(--color-accent-cyan);
  border-color: var(--color-accent-cyan);
}

.glossary-term::after {
  content: ' ?';
  font-size: 0.7em;
  opacity: 0.5;
  vertical-align: super;
}

/* アクセント吹き出し内の用語リンク */
.chat-bubble.ai-accent .glossary-term {
  color: rgba(255, 255, 255, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

.chat-bubble.ai-accent .glossary-term:hover {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.chat-bubble.ai-accent .glossary-term::after {
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   Gemini Chat - Navigation & Contact Buttons
   ============================================ */
.chat-nav-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.chat-nav-btn {
  background: #ffffff;
  border: 1px solid var(--color-border);
  color: var(--color-accent);
  border-radius: 20px;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-nav-btn:hover {
  background: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 26, 46, 0.2);
}

.chat-contact-btn {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-blue));
  color: #ffffff;
  border: none;
  border-radius: 20px;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.chat-contact-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ============================================
   Gemini Chat - Thinking Dots
   ============================================ */
.thinking-dots {
  display: inline-block;
  letter-spacing: 3px;
  animation: thinkingPulse 1.4s ease-in-out infinite;
}

@keyframes thinkingPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ============================================
   Smooth scroll offset for fixed header
   ============================================ */
[id] {
  scroll-margin-top: 80px;
}

/* ============================================
   Contact Form 7 integration
   ============================================ */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form select,
.wpcf7-form textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.wpcf7-form input:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--color-accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.wpcf7-form .wpcf7-submit {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-blue));
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.wpcf7-form .wpcf7-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.25);
}

.wpcf7-not-valid-tip {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.wpcf7-response-output {
  border: none !important;
  padding: 1rem !important;
  text-align: center;
  font-size: 0.9rem;
}

/* ============================================
   Selection & Scrollbar
   ============================================ */
::selection {
  background: rgba(37, 99, 235, 0.15);
  color: var(--color-text-primary);
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-border-hover);
}
