/* ==============================================
   KADOMARU Codeworks - Main Stylesheet
   ============================================== */

/* --- Base Styles --- */
body {
  font-family: "Zen Maru Gothic", sans-serif;
  color: #1e293b;
  line-height: 1.8;
  letter-spacing: 0.05em;
  overflow-x: hidden;
  background-color: #f8fafc;
}

html {
  scroll-behavior: smooth;
}

/* ==============================================
   Splash Screen
   ============================================== */
#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

.splash-bg {
  position: absolute;
  inset: 0;
  background: #0a3a78;
  z-index: 1;
  overflow: hidden;
}

.splash-curtain {
  position: absolute;
  inset: 0;
  background-color: #f8fafc;
  transform: translateX(100%);
  z-index: 3;
}

.splash-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  opacity: 0;
}

/* スプラッシュ背景メッシュ */
.splash-mesh {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.splash-mesh-blob {
  display: none;
}

.splash-mesh-blob:nth-child(1) {
  width: 500px;
  height: 500px;
  background: rgba(36, 95, 160, 0.5);
  top: -100px;
  right: -100px;
  animation-delay: 0.1s;
}

.splash-mesh-blob:nth-child(2) {
  width: 400px;
  height: 400px;
  background: rgba(201, 164, 102, 0.3);
  bottom: -100px;
  left: -100px;
  animation-delay: 0.2s;
}

.splash-mesh-blob:nth-child(3) {
  width: 300px;
  height: 300px;
  background: rgba(59, 130, 246, 0.2);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 0.3s;
}

@keyframes splashBlobIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ロゴグロー - 非表示 */
.splash-logo-glow {
  display: none;
}

@keyframes logoGlow {
  0%,
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

/* スプラッシュロゴ画像 */
.splash-logo-img {
  height: auto;
  width: auto;
  max-height: 120px;
  max-width: 80vw;
  object-fit: contain;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
  position: relative;
  z-index: 1;
}

/* プログレスバー */
.splash-progress {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
  opacity: 1;
  z-index: 2;
}

.splash-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #c9a466, #e0c18c);
  width: 0;
  border-radius: 2px;
  transition: width 1.8s ease-out;
}

@keyframes logoIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

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

@keyframes curtainSlideIn {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(0%);
  }
}

@keyframes curtainFadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.animate-logo-in {
  animation: logoIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.animate-logo-pulse {
  opacity: 1; /* ゆらゆらアニメーション削除 */
}
.animate-curtain-slide {
  animation: curtainSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.animate-curtain-fade {
  animation: curtainFadeOut 0.5s ease-out forwards;
}

/* ==============================================
   Common Animations
   ============================================== */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* ==============================================
   Section Title
   ============================================== */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title span {
  display: block;
  font-weight: 300;
  color: #c9a466;
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  text-transform: uppercase;
}

.section-title h2 {
  font-size: 1.75rem;
  color: #0a3a78;
  font-weight: 700;
  display: inline-block;
  position: relative;
}

.section-title h2::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background-color: #c9a466;
  margin: 10px auto 0;
}

/* ==============================================
   Buttons
   ============================================== */
.btn-primary {
  background-color: #0a3a78;
  color: white;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.btn-primary:hover {
  background-color: #062952;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(10, 58, 120, 0.3);
}

/* ==============================================
   Skill Card
   ============================================== */
.skill-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s;
}

.skill-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(10, 58, 120, 0.1);
  border-color: #c9a466;
}

/* ==============================================
   Card Hover
   ============================================== */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(10, 58, 120, 0.1);
}

/* ==============================================
   Works Section
   ============================================== */
.works-tab {
  background: white;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.works-tab:hover {
  border-color: #0a3a78;
  color: #0a3a78;
}

.works-tab.active {
  background: #0a3a78;
  color: white;
  border-color: #0a3a78;
}

.works-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
}

.works-card:hover {
  box-shadow: 0 10px 40px rgba(10, 58, 120, 0.15);
}

.works-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 58, 120, 0.95) 0%, rgba(10, 58, 120, 0.7) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.works-card:hover .works-overlay {
  opacity: 1;
}

.works-category {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  transform: translateY(10px);
  transition: transform 0.4s ease;
}

.works-title {
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  transform: translateY(10px);
  transition: transform 0.4s ease 0.05s;
}

.works-link {
  color: #c9a466;
  font-size: 0.875rem;
  font-weight: 700;
  transform: translateY(10px);
  transition: transform 0.4s ease 0.1s;
}

.works-card:hover .works-category,
.works-card:hover .works-title,
.works-card:hover .works-link {
  transform: translateY(0);
}

.works-item {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.works-item.hidden {
  opacity: 0;
  transform: scale(0.8);
  position: absolute;
  pointer-events: none;
}

/* ==============================================
   Works Modal
   ============================================== */
.works-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.works-modal-content {
  background: white;
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.works-modal-overlay.active .works-modal-content {
  transform: scale(1) translateY(0);
}

.works-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #475569;
  transition: all 0.3s ease;
  z-index: 10;
}

.works-modal-close:hover {
  background: #0a3a78;
  color: white;
}

.works-modal-body {
  padding: 0;
  overflow-y: auto;
  max-height: 90vh;
}

.works-modal-body::-webkit-scrollbar {
  width: 8px;
}

.works-modal-body::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 0 20px 20px 0;
}

.works-modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #0a3a78, #c9a466);
  border-radius: 4px;
}

.works-modal-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #062952, #b8935a);
}

.works-modal-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 20px 20px 0 0;
}

.works-modal-info {
  padding: 30px;
}

.works-modal-category {
  display: inline-block;
  background: #eff6ff;
  color: #0a3a78;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.works-modal-title {
  font-size: 24px;
  font-weight: bold;
  color: #1e293b;
  margin-bottom: 16px;
}

.works-modal-desc {
  color: #475569;
  line-height: 1.8;
  margin-bottom: 24px;
}

.works-modal-section {
  margin-bottom: 24px;
}

.works-modal-section h4 {
  font-size: 14px;
  font-weight: bold;
  color: #0a3a78;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.works-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.works-modal-tag {
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
}

.works-modal-points {
  background: #fffbeb;
  border-radius: 12px;
  padding: 20px;
}

.works-modal-points ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.works-modal-points li {
  color: #475569;
  font-size: 14px;
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
}

.works-modal-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #c9a466;
  font-weight: bold;
}

.works-modal-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0a3a78;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.works-modal-link:hover {
  background: #062952;
}

/* ==============================================
   Status Badge
   ============================================== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

.status-available {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

.status-available .status-dot {
  background: #4ade80;
}

.status-busy {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.status-busy .status-dot {
  background: #fbbf24;
}

.status-full {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.status-full .status-dot {
  background: #f87171;
  animation: none;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ==============================================
   Mobile Menu
   ============================================== */
.mobile-menu-trigger {
  width: 32px;
  height: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 60;
  padding: 4px;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: #0a3a78;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.mobile-menu-trigger.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: white;
}

.mobile-menu-trigger.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-trigger.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: white;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #0a3a78;
  background: linear-gradient(135deg, #0a3a78 0%, #062952 50%, #041a36 100%);
  z-index: 55;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

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

.mobile-menu-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px 40px 60px;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.4s ease;
  transition-delay: var(--delay);
}

.mobile-menu-overlay.active .mobile-nav-link {
  opacity: 1;
  transform: translateX(0);
}

.mobile-nav-number {
  font-size: 12px;
  color: #c9a466;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.mobile-nav-text {
  font-size: 28px;
  font-weight: 700;
  color: white;
  flex: 1;
}

.mobile-nav-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mobile-nav-link:hover .mobile-nav-text {
  color: #c9a466;
}

.mobile-nav-link:hover {
  border-bottom-color: rgba(201, 164, 102, 0.3);
}

.mobile-menu-footer {
  margin-top: auto;
  padding-top: 40px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease 0.35s;
}

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

.mobile-cta-btn {
  display: block;
  width: 100%;
  padding: 18px;
  background: white;
  color: #0a3a78;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  border-radius: 9999px;
  transition: all 0.3s ease;
}

.mobile-cta-btn:hover {
  background: #c9a466;
  color: white;
}

.mobile-social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
}

.mobile-social-link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  font-size: 18px;
  transition: all 0.3s ease;
}

.mobile-social-link:hover {
  background: white;
  color: #0a3a78;
  border-color: white;
}

body.menu-open {
  overflow: hidden;
}

/* ==============================================
   Hero Animations
   ============================================== */
.hero-text-reveal {
  overflow: hidden;
}

.hero-text-reveal span {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  animation: textReveal 0.8s ease forwards;
}

.hero-text-reveal span:nth-child(1) {
  animation-delay: 0.3s;
}
.hero-text-reveal span:nth-child(2) {
  animation-delay: 0.5s;
}
.hero-text-reveal span:nth-child(3) {
  animation-delay: 0.7s;
}

@keyframes textReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-sub-fade {
  opacity: 0;
  animation: heroSubFade 1s ease forwards 1s;
}

@keyframes heroSubFade {
  to {
    opacity: 1;
  }
}

.hero-cta-slide {
  opacity: 0;
  transform: translateY(30px);
  animation: ctaSlide 0.8s ease forwards 1.2s;
}

@keyframes ctaSlide {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==============================================
   Floating Shapes
   ============================================== */
.floating-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  animation: float 20s ease-in-out infinite;
}

.floating-shape:nth-child(1) {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #0a3a78, #245fa0);
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.floating-shape:nth-child(2) {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #c9a466, #e0c18c);
  bottom: 10%;
  left: 5%;
  animation-delay: -5s;
}

.floating-shape:nth-child(3) {
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, #0a3a78, #245fa0);
  top: 40%;
  right: 10%;
  animation-delay: -10s;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(20px, -30px) rotate(5deg);
  }
  50% {
    transform: translate(-10px, 20px) rotate(-5deg);
  }
  75% {
    transform: translate(30px, 10px) rotate(3deg);
  }
}

/* ==============================================
   Pulse Ring
   ============================================== */
.pulse-ring {
  position: absolute;
  inset: -20px;
  border: 2px solid #0a3a78;
  border-radius: 50%;
  opacity: 0;
  animation: pulseRing 3s ease-out infinite;
}

.pulse-ring:nth-child(2) {
  animation-delay: 1s;
}
.pulse-ring:nth-child(3) {
  animation-delay: 2s;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

/* ==============================================
   Scroll Reveal Animations
   ============================================== */
.reveal-up {
  opacity: 0;
  transform: translateY(60px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* ==============================================
   Stagger Animation
   ============================================== */
.stagger-children.revealed > * {
  opacity: 0;
  transform: translateY(30px);
  animation: staggerIn 0.6s ease forwards;
}

.stagger-children.revealed > *:nth-child(1) {
  animation-delay: 0.1s;
}
.stagger-children.revealed > *:nth-child(2) {
  animation-delay: 0.2s;
}
.stagger-children.revealed > *:nth-child(3) {
  animation-delay: 0.3s;
}
.stagger-children.revealed > *:nth-child(4) {
  animation-delay: 0.4s;
}
.stagger-children.revealed > *:nth-child(5) {
  animation-delay: 0.5s;
}
.stagger-children.revealed > *:nth-child(6) {
  animation-delay: 0.6s;
}

@keyframes staggerIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==============================================
   Count Up
   ============================================== */
.count-up {
  font-variant-numeric: tabular-nums;
}

/* ==============================================
   Glow Effect
   ============================================== */
.glow-effect {
  position: fixed;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(10, 58, 120, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  opacity: 0;
}

.glow-effect.active {
  opacity: 1;
}

/* ==============================================
   Button Shine
   ============================================== */
.btn-shine {
  position: relative;
  overflow: hidden;
}

.btn-shine::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn-shine:hover::after {
  left: 100%;
}

/* ==============================================
   Tilt Card
   ============================================== */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

.tilt-card:hover {
  transform: perspective(1000px) rotateX(var(--rotateX, 0deg)) rotateY(var(--rotateY, 0deg));
}

/* ==============================================
   Gradient Text
   ============================================== */
.gradient-text {
  background: linear-gradient(90deg, #0a3a78, #245fa0, #c9a466, #0a3a78);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ==============================================
   Underline Animation
   ============================================== */
.underline-animation {
  position: relative;
  display: inline-block;
}

.underline-animation::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 3px;
  background: #c9a466;
  transition: width 0.5s ease;
}

.underline-animation.revealed::after {
  width: 100%;
}

/* ==============================================
   Section Title Animation
   ============================================== */
.section-title.revealed span {
  animation: titleSpanIn 0.6s ease forwards;
}

.section-title.revealed h2 {
  animation: titleH2In 0.6s ease forwards 0.2s;
  opacity: 0;
}

@keyframes titleSpanIn {
  from {
    opacity: 0;
    letter-spacing: 0.5em;
  }
  to {
    opacity: 1;
    letter-spacing: 0.2em;
  }
}

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

/* ==============================================
   Scroll Indicator
   ============================================== */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-indicator span {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #475569;
}

.scroll-indicator i {
  color: #0a3a78;
  font-size: 20px;
}

@keyframes scrollBounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

/* ==============================================
   Spinner
   ============================================== */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #eff6ff;
  border-top-color: #0a3a78;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ==============================================
   Header Scroll
   ============================================== */
header {
  transition: all 0.3s ease;
}

header .header-inner {
  transition: height 0.3s ease;
  height: 80px;
}

header .header-logo {
  transition: all 0.3s ease;
}

header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(10, 58, 120, 0.1);
}

header.scrolled .header-inner {
  height: 64px;
}

header.scrolled .header-logo {
  height: 40px;
}

/* ==============================================
   Profile Section
   ============================================== */
.profile-stat-card {
  background: white;
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(10, 58, 120, 0.08);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.profile-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0a3a78, #c9a466);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.profile-stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(10, 58, 120, 0.15);
}

.profile-stat-card:hover::before {
  transform: scaleX(1);
}

.profile-stat-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: #0a3a78;
  font-size: 16px;
}

/* ==============================================
   Hero Visual
   ============================================== */
.hero-visual {
  position: relative;
  width: 320px;
  height: 320px;
}

@media (min-width: 768px) {
  .hero-visual {
    width: 400px;
    height: 400px;
  }
}

/* Rotating Text Ring */
.hero-rotating-text {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: rotateText 25s linear infinite;
}

.hero-circle-text {
  font-size: 11px;
  font-weight: 600;
  fill: #0a3a78;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

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

/* Gradient Ring */
.hero-gradient-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box, linear-gradient(135deg, #0a3a78, #c9a466, #0a3a78) border-box;
  animation: ringRotate 8s linear infinite;
}

.hero-gradient-ring-2 {
  width: 240px;
  height: 240px;
  border-width: 1px;
  opacity: 0.5;
  animation: ringRotate 12s linear infinite reverse;
}

@media (min-width: 768px) {
  .hero-gradient-ring {
    width: 260px;
    height: 260px;
  }
  .hero-gradient-ring-2 {
    width: 300px;
    height: 300px;
  }
}

@keyframes ringRotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Orbit Dots */
.hero-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 220px;
  transform: translate(-50%, -50%);
  animation: orbitSpin 6s linear infinite;
}

.hero-orbit-2 {
  width: 180px;
  height: 180px;
  animation: orbitSpin 4s linear infinite reverse;
}

@media (min-width: 768px) {
  .hero-orbit {
    width: 280px;
    height: 280px;
  }
  .hero-orbit-2 {
    width: 230px;
    height: 230px;
  }
}

.hero-orbit-dot {
  position: absolute;
  top: 0;
  left: 50%;
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, #0a3a78, #245fa0);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 20px rgba(10, 58, 120, 0.5);
}

.hero-orbit-2 .hero-orbit-dot {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #c9a466, #e0c18c);
  box-shadow: 0 0 15px rgba(201, 164, 102, 0.6);
}

@keyframes orbitSpin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Photo Circle Slideshow */
.hero-photo-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(10, 58, 120, 0.3), inset 0 0 30px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  .hero-photo-circle {
    width: 200px;
    height: 200px;
  }
}

.hero-photo-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-photo-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.hero-photo-slide.active {
  opacity: 1;
}

.hero-photo-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
  animation: photoZoom 8s ease-in-out infinite;
}

@keyframes photoZoom {
  0%,
  100% {
    transform: scale(1.1);
  }
  50% {
    transform: scale(1.2);
  }
}

.hero-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 58, 120, 0.3), rgba(6, 41, 82, 0.4));
  pointer-events: none;
}

/* ==============================================
   Gradient Mesh Background
   ============================================== */
.gradient-mesh {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.gradient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: blobMove 20s ease-in-out infinite;
}

.gradient-blob-1 {
  width: 600px;
  height: 600px;
  background: linear-gradient(135deg, rgba(10, 58, 120, 0.4), rgba(36, 95, 160, 0.3));
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.gradient-blob-2 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, rgba(201, 164, 102, 0.3), rgba(224, 193, 140, 0.2));
  bottom: -150px;
  left: -100px;
  animation-delay: -5s;
}

.gradient-blob-3 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 197, 253, 0.15));
  top: 40%;
  left: 30%;
  animation-delay: -10s;
}

.gradient-blob-4 {
  width: 350px;
  height: 350px;
  background: linear-gradient(135deg, rgba(10, 58, 120, 0.25), rgba(201, 164, 102, 0.2));
  bottom: 20%;
  right: 20%;
  animation-delay: -15s;
}

@keyframes blobMove {
  0%,
  100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  25% {
    transform: translate(30px, -50px) scale(1.1) rotate(5deg);
  }
  50% {
    transform: translate(-20px, 30px) scale(0.95) rotate(-5deg);
  }
  75% {
    transform: translate(50px, 20px) scale(1.05) rotate(3deg);
  }
}

@media (max-width: 768px) {
  .gradient-blob-1 {
    width: 350px;
    height: 350px;
  }
  .gradient-blob-2 {
    width: 300px;
    height: 300px;
  }
  .gradient-blob-3 {
    width: 250px;
    height: 250px;
  }
  .gradient-blob-4 {
    width: 200px;
    height: 200px;
  }
  .gradient-blob {
    filter: blur(60px);
  }
}

/* ===================================
   WORKFLOW SECTION
   =================================== */

.workflow-container {
  position: relative;
  margin-top: 3rem;
}

/* グリッドレイアウト */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}

/* 接続線 */
.workflow-line {
  display: none;
}

@media (min-width: 1024px) {
  .workflow-line {
    display: block;
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, #0a3a78, #c9a466);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
  }

  /* 1行目の接続線 */
  .workflow-line-1 {
    top: calc(25% - 10px);
    left: 5%;
    width: 90%;
  }

  /* 2行目の接続線 */
  .workflow-line-2 {
    top: calc(75% - 10px);
    left: 5%;
    width: 90%;
  }

  .workflow-line.revealed {
    transform: scaleX(1);
  }
}

/* カードスタイル - デフォルトで表示（JSが動かなくても表示される） */
.workflow-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  /* デフォルトで表示 */
  opacity: 1;
  transform: translateY(0);
}

/* JSが有効な場合のみ非表示にする */
.js-enabled .workflow-card {
  opacity: 0;
  transform: translateY(20px);
}

/* revealedクラスで表示 */
.js-enabled .workflow-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* CSS変数のフォールバック（nth-childで確実に適用） */
.js-enabled .workflow-card.revealed:nth-child(1) { transition-delay: 0s; }
.js-enabled .workflow-card.revealed:nth-child(2) { transition-delay: 0.1s; }
.js-enabled .workflow-card.revealed:nth-child(3) { transition-delay: 0.2s; }
.js-enabled .workflow-card.revealed:nth-child(4) { transition-delay: 0.3s; }
.js-enabled .workflow-card.revealed:nth-child(5) { transition-delay: 0.4s; }
.js-enabled .workflow-card.revealed:nth-child(6) { transition-delay: 0.5s; }
.js-enabled .workflow-card.revealed:nth-child(7) { transition-delay: 0.6s; }
.js-enabled .workflow-card.revealed:nth-child(8) { transition-delay: 0.7s; }

.workflow-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(10, 58, 120, 0.1);
  border-color: #c9a466;
}

/* ステップ番号 */
.workflow-step-number {
  width: 32px;
  height: 32px;
  background: #0a3a78;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  margin: 0 auto 0.75rem;
}

/* 英語ラベル */
.workflow-label {
  display: block;
  color: #c9a466;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

/* 日本語タイトル */
.workflow-title {
  color: #062952;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* 説明文 */
.workflow-desc {
  color: #475569;
  font-size: 13px;
  line-height: 1.6;
}

/* タブレット: 2列 */
@media (max-width: 1023px) and (min-width: 640px) {
  .workflow-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* モバイル: 1列 */
@media (max-width: 639px) {
  .workflow-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .workflow-card {
    padding: 1.25rem;
  }
}

/* ===================================
   DARK THEME SECTIONS
   =================================== */

/* Profile Section - Dark Theme */
#profile .profile-stat-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

#profile .profile-stat-card::before {
  background: linear-gradient(90deg, #c9a466, #e0c18c);
}

#profile .profile-stat-card:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

#profile .profile-stat-icon {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

#profile .profile-stat-card p.text-3xl {
  color: white;
}

#profile .profile-stat-card p.text-xs {
  color: rgba(255, 255, 255, 0.7);
}

/* Contact Section - Light Theme (Pale Gold) */
#contact {
  background: #fffbeb;
}

#contact .section-title h2 {
  color: #0a3a78;
}

#contact .section-title p {
  color: #475569;
}

/* こんな方へ タグ */
#contact .contact-tag {
  background: white;
  color: #062952;
  border: 1px solid rgba(10, 58, 120, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* プライバシーポリシー */
#contact .privacy-text {
  color: #475569;
}

#contact .privacy-link {
  color: #0a3a78;
}

/* サイドバーカード */
#contact .sidebar-card {
  background: white;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#contact .sidebar-card h3 {
  color: #062952;
}

#contact .sidebar-card p {
  color: #475569;
}

#contact .sidebar-card .question-text {
  color: #062952;
}

#contact .sidebar-card i {
  color: #c9a466;
}

/* 送信ボタン - ネイビー */
#contact .btn-submit {
  background: #0a3a78;
}

#contact .btn-submit:hover {
  background: #062952;
}

/* ===================================
   HERO STROKE ANIMATION
   =================================== */

.hero-strokes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.hero-stroke {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  will-change: transform;
}

.hero-stroke-1 {
  opacity: 0.12;
}

.hero-stroke-2 {
  opacity: 0.08;
}

.hero-stroke-3 {
  opacity: 0.06;
}

/* ストロークパスの基本設定 */
.stroke-path {
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  animation: strokeDraw 3s ease forwards, strokeFlow 25s ease-in-out infinite;
  animation-delay: 0.5s, 3.5s;
}

.hero-stroke-2 .stroke-path {
  stroke-dasharray: 1800;
  stroke-dashoffset: 1800;
  animation: strokeDraw 3.5s ease forwards, strokeFlow 30s ease-in-out infinite;
  animation-delay: 1s, 4.5s;
}

.hero-stroke-3 .stroke-path {
  stroke-dasharray: 1600;
  stroke-dashoffset: 1600;
  animation: strokeDraw 4s ease forwards, strokeFlowReverse 35s ease-in-out infinite;
  animation-delay: 1.5s, 5.5s;
}

/* 描画アニメーション */
@keyframes strokeDraw {
  to {
    stroke-dashoffset: 0;
  }
}

/* ゆらゆら流れるアニメーション */
@keyframes strokeFlow {
  0%,
  100% {
    transform: translateX(0) translateY(0);
  }
  25% {
    transform: translateX(30px) translateY(-20px);
  }
  50% {
    transform: translateX(-20px) translateY(30px);
  }
  75% {
    transform: translateX(40px) translateY(10px);
  }
}

@keyframes strokeFlowReverse {
  0%,
  100% {
    transform: translateX(0) translateY(0);
  }
  25% {
    transform: translateX(-30px) translateY(20px);
  }
  50% {
    transform: translateX(20px) translateY(-30px);
  }
  75% {
    transform: translateX(-40px) translateY(-10px);
  }
}

/* モバイル対応 */
@media (max-width: 768px) {
  .hero-stroke-1 {
    opacity: 0.08;
  }

  .hero-stroke-2 {
    opacity: 0.05;
  }

  .hero-stroke-3 {
    display: none;
  }

  .stroke-path {
    stroke-width: 3px;
  }

  .hero-stroke-2 .stroke-path {
    stroke-width: 2px;
  }
}

/* prefers-reduced-motion 対応 */
@media (prefers-reduced-motion: reduce) {
  .stroke-path {
    animation: strokeDraw 3s ease forwards;
    animation-delay: 0.5s;
  }

  .hero-stroke-2 .stroke-path,
  .hero-stroke-3 .stroke-path {
    animation: strokeDraw 3s ease forwards;
  }
}
