/* =========================================
   Base Settings & Variables
========================================= */
:root {
  --base-color: #FAFAFA;
  --main-color: #1E3A8A;
  --accent-color: #0EA5E9;
  --text-color: #333333;
  --font-family: 'Inter', 'Outfit', sans-serif;
  --border-radius: 12px;
  --transition-speed: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--base-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* =========================================
   Header & Navigation
========================================= */
.global-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--main-color);
  color: #FFFFFF;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 1px;
}

/* Wave Decoration */
.header-wave {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 40px;
  overflow: hidden;
  line-height: 0;
  transform: translateY(-1px);
}

.header-wave svg {
  display: block;
  width: calc(100% + 1.3px);
  height: 100%;
}

/* Hamburger Button */
.hamburger-btn {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1002;
}

.hamburger-btn span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  border-radius: 3px;
  transition: var(--transition-speed);
}

.hamburger-btn span:nth-child(1) { top: 0; }
.hamburger-btn span:nth-child(2) { top: 10px; }
.hamburger-btn span:nth-child(3) { top: 20px; }

.hamburger-btn.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
.hamburger-btn.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-btn.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* Navigation */
.global-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  max-width: 80vw;
  height: 100vh;
  background-color: var(--main-color);
  padding-top: 80px;
  transition: right 0.4s ease;
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
  z-index: 1001;
}

.global-nav.active {
  right: 0;
}

.global-nav .nav-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.global-nav .nav-list li {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.global-nav .nav-list a {
  display: block;
  padding: 1.5rem 2rem;
  font-weight: 600;
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

.global-nav .nav-list a:hover {
  background-color: rgba(255,255,255,0.1);
  color: var(--accent-color);
}

/* =========================================
   Main Content
========================================= */
.main-content {
  padding-top: 120px;
  min-height: 100vh;
}

.hero {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #e0f2fe 0%, var(--base-color) 100%);
  margin: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.hero h1 {
  font-size: 2.5rem;
  color: var(--main-color);
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background-color: var(--accent-color);
  color: #FFF;
  font-weight: 600;
  border-radius: 30px;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.content-section {
  max-width: 1200px;
  margin: 0 auto 4rem auto;
  padding: 0 2rem;
}

.content-section h2 {
  color: var(--main-color);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.content-section > p {
  text-align: center;
  margin-bottom: 2rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: #FFF;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: transform var(--transition-speed);
}

.card:hover {
  transform: translateY(-5px);
}

.card h3 {
  color: var(--main-color);
  margin-bottom: 1rem;
}

.placeholder-box {
  background: #e2e8f0;
  height: 300px;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.global-footer {
  background-color: var(--main-color);
  color: #FFF;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

/* =========================================
   Playful Elements & Animations
========================================= */

/* Fade-in floating animation (幽霊が浮かんでくるような) */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Back to Top Button (Dipper) */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #FFF;
  border: 2px solid var(--main-color);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s ease;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(30, 58, 138, 0.2);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: #f1f5f9;
  transform: translateY(-5px);
}

.back-to-top svg {
  width: 35px;
  height: 35px;
}

/* =========================================
   Loading Overlay
========================================= */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--base-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--main-color);
  -webkit-clip-path: inset(100% 0 0 0);
  clip-path: inset(100% 0 0 0);
  animation: fillScreenWater 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  z-index: 1;
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-text {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  color: var(--main-color);
  letter-spacing: 2px;
  position: absolute;
  z-index: 2;
  margin: 0;
}

.loading-text-white {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: 2px;
  position: absolute;
  z-index: 3;
  margin: 0;
  -webkit-clip-path: inset(100% 0 0 0);
  clip-path: inset(100% 0 0 0);
  animation: fillScreenWater 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fillScreenWater {
  0% { 
    -webkit-clip-path: inset(100% 0 0 0);
    clip-path: inset(100% 0 0 0); 
  }
  100% { 
    -webkit-clip-path: inset(0% 0 0 0);
    clip-path: inset(0% 0 0 0); 
  }
}

/* =========================================
   Mouse Ripple Effect
========================================= */
.ripple {
  position: fixed;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, rgba(14, 165, 233, 0) 70%);
  border: 1px solid rgba(14, 165, 233, 0.4);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: ripple-expand 1s ease-out forwards;
  z-index: 0;
}

@keyframes ripple-expand {
  0% {
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(3);
    opacity: 0;
  }
}

/* =========================================
   Responsive Design
========================================= */
/* No media queries needed since hamburger menu is global */
