/* =============================================
   common.css - Atlas Intelligence 共通スタイル
   レイアウト・見た目は Tailwind に委譲。アニメーション・JS連動のみ定義
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;0,9..40,900;1,9..40,400&family=Noto+Sans+JP:wght@400;500;600;700;800;900&display=swap');

:root {
  --brand-bg: #03060f;
  --font-sans: 'Noto Sans JP', 'DM Sans', sans-serif;
  --font-dmsans: 'DM Sans', sans-serif;
}

@layer base {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html {
    scroll-behavior: smooth;
  }

  body {
    font-family: var(--font-sans);
    background-color: var(--brand-bg);
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  body.page-light {
    background-color: #F1F5F9;
  }

  body.page-white {
    background-color: #ffffff;
  }

  img {
    max-width: 100%;
    height: auto;
    display: block;
  }

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

::selection {
  background-color: rgba(59, 130, 246, 0.3);
  color: #ffffff;
}

.font-dmsans {
  font-family: var(--font-dmsans);
}

/* SVG Icon Draw Animation */
@keyframes drawLine {
  from {
    stroke-dashoffset: 200;
    stroke-dasharray: 200;
  }
  to {
    stroke-dashoffset: 0;
    stroke-dasharray: 200;
  }
}

.icon-draw-animation svg path,
.icon-draw-animation svg circle,
.icon-draw-animation svg rect,
.icon-draw-animation svg line,
.icon-draw-animation svg polyline,
.icon-draw-animation svg polygon {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  opacity: 0;
}

.icon-draw-animation.in-view svg path,
.icon-draw-animation.in-view svg circle,
.icon-draw-animation.in-view svg rect,
.icon-draw-animation.in-view svg line,
.icon-draw-animation.in-view svg polyline,
.icon-draw-animation.in-view svg polygon {
  opacity: 1;
  animation: drawLine 3s ease-out forwards;
}

.icon-draw-animation.in-view svg > *:nth-child(1) { animation-delay: 0s; }
.icon-draw-animation.in-view svg > *:nth-child(2) { animation-delay: 0.15s; }
.icon-draw-animation.in-view svg > *:nth-child(3) { animation-delay: 0.3s; }
.icon-draw-animation.in-view svg > *:nth-child(4) { animation-delay: 0.45s; }
.icon-draw-animation.in-view svg > *:nth-child(5) { animation-delay: 0.6s; }
.icon-draw-animation.in-view svg > *:nth-child(6) { animation-delay: 0.75s; }

/* Header (JS連動) */
.site-header {
  border-bottom: none;
}

.site-header.header-transparent {
  background-color: transparent;
}

.site-header.header-solid {
  background-color: #ffffff;
}

.site-header.header-dark {
  background-color: #0f172a;
}

.site-header.header-dark .nav-link,
.site-header.header-dark .nav-item__chevron,
.site-header.header-dark .hamburger-btn {
  color: #ffffff;
}

.hamburger-btn {
  background: none;
  border: none;
  cursor: pointer;
}

.site-header__logo img.logo-inverted {
  filter: invert(1) brightness(2);
}

.mobile-menu {
  transform: translateY(-20px);
}

.mobile-menu.is-open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

.mobile-menu__section.is-expanded .mobile-menu__chevron {
  transform: rotate(180deg);
}

body.mobile-menu-open {
  overflow: hidden;
}

/* Wireframe Sphere */
.sphere-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: rotateSphere 120s linear infinite;
}

@keyframes rotateSphere {
  from {
    transform: rotateY(0deg) rotateX(0deg) rotateZ(0deg);
  }
  to {
    transform: rotateY(360deg) rotateX(360deg) rotateZ(360deg);
  }
}

.sphere-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.sphere-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* Scroll Animation */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }
.animate-on-scroll.delay-5 { transition-delay: 0.5s; }

.header-entrance {
  animation: headerSlideDown 0.3s ease-out;
}

@keyframes headerSlideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Floating Glow (ContactCTA) */
.glow-float-left {
  animation: glowFloatLeft 10s ease-in-out infinite alternate;
}

.glow-float-right {
  animation: glowFloatRight 12s ease-in-out infinite alternate;
}

@keyframes glowFloatLeft {
  from { transform: translateY(-50%) translate(0, 0); }
  to { transform: translateY(-50%) translate(50px, -50px); }
}

@keyframes glowFloatRight {
  from { transform: translateY(-50%) translate(0, 0); }
  to { transform: translateY(-50%) translate(-50px, 50px); }
}

/* Page Transition */
.page-transition {
  animation: pageIn 0.5s ease forwards;
}

@keyframes pageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* JS連動ユーティリティ */
.nav-active {
  color: #2563eb !important;
}

.nav-active::after {
  width: 100% !important;
}

.icon-close-hidden {
  display: none;
}

.is-hidden {
  display: none !important;
}

.recruit-job-panel {
  overflow: hidden;
}
