/* ZeroCode.js - サイト共通CSS */

/* 基本リセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    'Inter',
    'Noto Sans JP',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'Roboto',
    'Oxygen',
    'Ubuntu',
    'Cantarell',
    'Fira Sans',
    'Droid Sans',
    'Helvetica Neue',
    sans-serif;
  line-height: 1.6;
  color: #2c3e50;
  background: #ffffff;
  min-height: 100vh;
  position: relative;
}

/* 背景アニメーション（画面全体） */
.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-particle {
  position: absolute;
  border-radius: 50%;
  animation: bgFloat 25s infinite ease-in-out;
  filter: blur(3px);
}

.bg-particle:nth-child(1) {
  width: 500px;
  height: 500px;
  top: -200px;
  left: -150px;
  background: rgba(52, 152, 219, 0.08);
}
.bg-particle:nth-child(2) {
  width: 400px;
  height: 400px;
  top: 25%;
  right: -150px;
  background: rgba(155, 89, 182, 0.06);
  animation-delay: -5s;
}
.bg-particle:nth-child(3) {
  width: 350px;
  height: 350px;
  bottom: 5%;
  left: 15%;
  background: rgba(46, 204, 113, 0.06);
  animation-delay: -10s;
}
.bg-particle:nth-child(4) {
  width: 280px;
  height: 280px;
  top: 45%;
  left: 5%;
  background: rgba(241, 196, 15, 0.05);
  animation-delay: -15s;
}
.bg-particle:nth-child(5) {
  width: 450px;
  height: 450px;
  bottom: -150px;
  right: 5%;
  background: rgba(231, 76, 60, 0.05);
  animation-delay: -8s;
}
.bg-particle:nth-child(6) {
  width: 300px;
  height: 300px;
  top: 10%;
  left: 35%;
  background: rgba(52, 73, 94, 0.04);
  animation-delay: -12s;
}

@keyframes bgFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(50px, -50px) scale(1.1);
  }
  50% {
    transform: translate(-40px, 40px) scale(0.9);
  }
  75% {
    transform: translate(30px, 20px) scale(1.05);
  }
}

/* コンテンツを前面に */
.header,
.hero,
.section,
.footer {
  position: relative;
  z-index: 1;
}

/* ヘッダー */
.header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid #e0e0e0;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

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

.header-logo {
  font-size: 22px;
  font-weight: 700;
  color: #2c3e50;
  text-decoration: none;
  text-shadow:
    1px 1px 0 rgba(255, 255, 255, 0.8),
    2px 2px 4px rgba(0, 0, 0, 0.15);
  letter-spacing: -0.5px;
}

.header-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.header-link {
  font-size: 15px;
  color: #2c3e50;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.header-link:hover {
  color: #3498db;
}

.header-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s;
}

.header-hamburger:hover {
  background: rgba(0, 0, 0, 0.04);
}

.header-hamburger:focus-visible {
  outline: 2px solid #3498db;
  outline-offset: 2px;
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #2c3e50;
  border-radius: 1px;
  transition:
    transform 0.2s,
    opacity 0.2s;
}

.header-overlay {
  display: none;
}

.header-drawer-top {
  display: none;
}

.header-drawer-close {
  display: none;
}

/* フッター */
.footer {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 40px 20px;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-sns {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 24px;
}

.footer-sns-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ecf0f1;
  transition: color 0.2s;
}

.footer-sns-link:hover {
  color: #3498db;
}

.footer-sns-icon {
  width: 24px;
  height: 24px;
}

.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-link {
  color: #ecf0f1;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: #3498db;
}

.footer-copyright {
  font-size: 14px;
  color: #95a5a6;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .header-hamburger {
    display: flex;
  }

  .header-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 98;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
  }

  .header.is-menu-open .header-overlay {
    opacity: 1;
    pointer-events: auto;
    touch-action: none;
  }

  .header.is-menu-open .header-content {
    position: relative;
    z-index: 100;
  }

  .header-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    max-height: 100vh;
    max-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 0 24px 24px;
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12);
    z-index: 99;
    transform: translateX(100%);
    transition: transform 0.25s ease-out;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .header.is-menu-open .header-nav {
    transform: translateX(0);
  }

  .header-drawer-top {
    display: flex;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 1;
    justify-content: flex-end;
    align-items: center;
    min-height: 56px;
    padding: 0 0 8px;
    margin-bottom: 8px;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
  }

  .header-drawer-close {
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
    color: #2c3e50;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
  }

  .header-drawer-close:hover {
    background: rgba(0, 0, 0, 0.06);
  }

  .header-drawer-close:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
  }

  .header-nav .header-link {
    flex-shrink: 0;
    display: block;
    font-size: 16px;
    padding: 12px 0;
    color: #2c3e50;
    border-bottom: 1px solid #e0e0e0;
  }

  .header-nav .lang-switch {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    margin-top: 16px;
    margin-left: 0;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
  }

  .header-nav .lang-switch button {
    padding: 8px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: transparent;
    color: #2c3e50;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
  }

  .header-nav .lang-switch button:hover {
    background: rgba(0, 0, 0, 0.04);
  }

  .header-nav .lang-switch button.active {
    background: rgba(52, 152, 219, 0.1);
    border-color: #3498db;
    color: #3498db;
  }

  .header.is-menu-open .header-hamburger .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .header.is-menu-open .header-hamburger .hamburger-bar:nth-child(2) {
    opacity: 0;
  }

  .header.is-menu-open .header-hamburger .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

html.header-menu-open,
body.header-menu-open {
  overflow-x: hidden;
}