/* ========== RESET & BASE ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #06060e;
  --bg2: #0c0c1a;
  --bg3: #111128;
  --surface: #161630;
  --surface2: #1c1c40;
  --border: rgba(255,255,255,0.06);
  --blue: #3b82f6;
  --blue2: #60a5fa;
  --purple: #8b5cf6;
  --cyan: #06b6d4;
  --grad1: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --grad2: linear-gradient(135deg, #06b6d4, #3b82f6);
  --grad3: linear-gradient(135deg, #8b5cf6, #ec4899);
  --text1: #ffffff;
  --text2: rgba(255,255,255,0.7);
  --text3: rgba(255,255,255,0.4);
  --r: 16px;
  --r2: 24px;
  --r3: 32px;
  --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', 'Noto Sans JP', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text1);
  overflow-x: hidden;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; }

/* ========== LOADING ========== */
.loader {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
.loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-content {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.loader-text {
  font-size: 1.5rem; font-weight: 800; letter-spacing: 0.3em;
  background: var(--grad1); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.loader-progress {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.loader-bar {
  width: 160px; height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px; overflow: hidden;
}
.loader-bar-fill {
  width: 0%; height: 100%;
  background: var(--grad1);
  border-radius: 2px;
  transition: width 0.1s ease;
}
.loader-percent {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em;
  color: var(--text3);
}

/* ========== HEADER ========== */
.header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  padding: 20px 48px;
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.4s, box-shadow 0.4s, padding 0.4s;
}
.header.scrolled {
  background: rgba(6,6,14,0.85);
  backdrop-filter: blur(24px) saturate(1.2);
  box-shadow: 0 1px 0 var(--border);
  padding-top: 14px; padding-bottom: 14px;
}
.header-logo {
  font-size: 1.3rem; font-weight: 800; letter-spacing: 0.08em;
  background: var(--grad1); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.header-nav { display: flex; align-items: center; gap: 32px; }
.header-nav a {
  font-size: 0.8rem; font-weight: 500; color: var(--text2);
  letter-spacing: 0.08em; transition: color 0.3s;
  position: relative;
}
.header-nav a:hover { color: var(--text1); }
.header-nav a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--grad1);
  transition: width 0.3s ease;
}
.header-nav a:hover::after { width: 100%; }
.header-nav .nav-cta {
  background: var(--grad1); color: var(--text1) !important;
  padding: 10px 28px; border-radius: 50px;
  font-weight: 600; font-size: 0.8rem;
  transition: transform 0.3s, box-shadow 0.3s;
}
.header-nav .nav-cta::after { display: none; }
.header-nav .nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59,130,246,0.3);
}

/* Mobile menu */
.menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 32px; height: 24px; position: relative; z-index: 1001;
}
.menu-toggle span {
  display: block; width: 100%; height: 2px; background: var(--text1);
  position: absolute; left: 0; transition: 0.3s ease;
}
.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.menu-toggle span:nth-child(3) { bottom: 0; }
.menu-toggle.active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; background: rgba(6,6,14,0.98);
  backdrop-filter: blur(40px);
  z-index: 999; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 32px;
  opacity: 0; visibility: hidden; transition: 0.4s ease;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu a {
  font-size: 1.5rem; font-weight: 700; color: var(--text2);
  transition: color 0.3s;
}
.mobile-menu a:hover { color: var(--text1); }

/* ========== SECTION COMMON ========== */
.section { padding: 140px 48px; max-width: 1400px; margin: 0 auto; }
.section-full { padding: 140px 48px; }
.section-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; margin-bottom: 20px;
}
.section-label::before {
  content: ''; width: 28px; height: 2px; background: var(--grad1);
}
.section-label.blue { color: var(--blue2); }
.section-label.purple { color: var(--purple); }
.section-label.cyan { color: var(--cyan); }
.section-heading {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 900; line-height: 1.1; letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.section-heading .grad {
  background: var(--grad1); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.section-sub {
  color: var(--text2); font-size: 1rem; line-height: 1.9; max-width: 600px;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 36px; border-radius: 50px;
  font-size: 0.9rem; font-weight: 600; letter-spacing: 0.03em;
  transition: transform 0.3s, box-shadow 0.3s;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary {
  background: var(--grad1); color: var(--text1);
}
.btn-primary:hover { box-shadow: 0 12px 40px rgba(59,130,246,0.35); }
.btn-outline {
  background: transparent; color: var(--text1);
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-outline:hover { border-color: rgba(255,255,255,0.5); box-shadow: 0 12px 40px rgba(255,255,255,0.05); }
.btn-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.06); color: var(--text2);
  font-size: 1.2rem; transition: 0.3s ease;
}
.btn-arrow:hover { background: var(--blue); color: var(--text1); transform: rotate(-45deg); }

/* ========== FOOTER ========== */
.footer {
  padding: 80px 48px 40px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px;
}
.footer-brand .header-logo { margin-bottom: 16px; }
.footer-brand p { color: var(--text3); font-size: 0.85rem; line-height: 1.8; max-width: 280px; }
.footer-col h4 {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text3); margin-bottom: 20px;
}
.footer-col a {
  display: block; color: var(--text2); font-size: 0.9rem;
  padding: 6px 0; transition: color 0.3s;
}
.footer-col a:hover { color: var(--text1); }
.footer-bottom {
  max-width: 1400px; margin: 48px auto 0;
  padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.footer-copy { color: var(--text3); font-size: 0.75rem; }

/* ========== SCROLL ANIMATIONS ========== */
[data-anim] {
  opacity: 0; transition: opacity 0.8s ease, transform 0.8s ease;
}
[data-anim="fade-up"] { transform: translateY(60px); }
[data-anim="fade-left"] { transform: translateX(-60px); }
[data-anim="fade-right"] { transform: translateX(60px); }
[data-anim="fade-scale"] { transform: scale(0.9); }
[data-anim].is-visible {
  opacity: 1; transform: none;
}
[data-anim-delay="1"] { transition-delay: 0.1s; }
[data-anim-delay="2"] { transition-delay: 0.2s; }
[data-anim-delay="3"] { transition-delay: 0.3s; }
[data-anim-delay="4"] { transition-delay: 0.4s; }
[data-anim-delay="5"] { transition-delay: 0.5s; }

/* Stagger children */
.stagger > * { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.stagger.is-visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger.is-visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger.is-visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger.is-visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger.is-visible > *:nth-child(6) { transition-delay: 0.3s; }
.stagger.is-visible > *:nth-child(7) { transition-delay: 0.35s; }
.stagger.is-visible > *:nth-child(8) { transition-delay: 0.4s; }
.stagger.is-visible > *:nth-child(9) { transition-delay: 0.45s; }
.stagger.is-visible > *:nth-child(10) { transition-delay: 0.5s; }
.stagger.is-visible > *:nth-child(11) { transition-delay: 0.55s; }
.stagger.is-visible > *:nth-child(12) { transition-delay: 0.6s; }
.stagger.is-visible > * { opacity: 1; transform: none; }

/* ========== MARQUEE ========== */
.marquee { padding: 32px 0; overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.marquee-track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }
.marquee-item {
  display: flex; align-items: center; gap: 40px; padding: 0 40px; white-space: nowrap;
}
.marquee-item span {
  font-size: clamp(1.5rem, 3vw, 3rem); font-weight: 900;
  color: var(--text3); letter-spacing: -0.02em;
  transition: color 0.3s; cursor: default;
}
.marquee-item span:hover { color: var(--text1); }
.marquee-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }
@keyframes marquee { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* ========== GLOW ORB BACKGROUND ========== */
.glow-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
}
.glow-orb {
  position: absolute; border-radius: 50%;
  filter: blur(120px); opacity: 0.12;
  animation: glowFloat 25s ease-in-out infinite;
}
.glow-orb:nth-child(1) { width: 600px; height: 600px; background: var(--blue); top: -200px; left: -100px; animation-delay: 0s; }
.glow-orb:nth-child(2) { width: 500px; height: 500px; background: var(--purple); bottom: -150px; right: -100px; animation-delay: -8s; }
.glow-orb:nth-child(3) { width: 400px; height: 400px; background: var(--cyan); top: 50%; left: 60%; animation-delay: -16s; }
@keyframes glowFloat {
  0%,100% { transform: translate(0,0); }
  33% { transform: translate(50px,-40px); }
  66% { transform: translate(-30px,30px); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .section, .section-full { padding: 100px 32px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .header { padding: 16px 24px; }
  .header-nav { display: none; }
  .menu-toggle { display: block; }
  .section, .section-full { padding: 80px 20px; }
  .section-heading { font-size: clamp(2rem, 8vw, 3rem); }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
