:root,
[data-theme="white"] {
  --bg: #e8ecf4;
  --bg2: #f4f6fb;
  --bg3: #dde3ef;
  --accent: #1d4ed8;
  --accent2: #3b82f6;
  --accent-glow: rgba(29,78,216,0.12);
  --accent-line: rgba(29,78,216,0.22);
  --text: #0f172a;
  --text2: #475569;
  --text3: #94a3b8;
  --border: rgba(0,0,0,0.11);
  --grid-color: rgba(29,78,216,0.06);
  --shadow: rgba(0,0,0,0.1);
}
[data-theme="navy"] {
  --bg: #060c18;
  --bg2: #0a1628;
  --bg3: #0f1f3d;
  --accent: #2563eb;
  --accent2: #60a5fa;
  --accent-glow: rgba(37,99,235,0.25);
  --accent-line: rgba(37,99,235,0.18);
  --text: #e8edf7;
  --text2: #94a3b8;
  --text3: #475569;
  --border: rgba(255,255,255,0.07);
  --grid-color: rgba(37,99,235,0.08);
  --shadow: rgba(0,0,0,0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg); color: var(--text);
  overflow-x: hidden; line-height: 1.6;
  transition: background 0.4s, color 0.4s;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.grid-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridScroll 30s linear infinite;
}
@keyframes gridScroll { to { background-position: 60px 60px; } }

header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 48px; height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
header.scrolled {
  background: rgba(232,236,244,0.95);
  backdrop-filter: blur(16px);
  border-color: var(--border);
  box-shadow: 0 1px 20px rgba(0,0,0,0.08);
}
[data-theme="navy"] header.scrolled { background: rgba(6,12,24,0.93); }

.logo-wrap { display: flex; align-items: center; gap: 12px; }
.logo-img { height: 36px; width: auto; }
.logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--text2); line-height: 1.4;
}
nav { display: flex; align-items: center; gap: 32px; }
nav a {
  font-size: 13px; font-weight: 500; color: var(--text2);
  letter-spacing: 0.04em; transition: color 0.2s; position: relative;
}
nav a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transition: transform 0.2s;
}
nav a:hover, nav a.active { color: var(--text); }
nav a:hover::after, nav a.active::after { transform: scaleX(1); }
.nav-cta {
  background: var(--accent); color: #fff !important;
  padding: 8px 20px; border-radius: 4px;
  font-size: 13px !important; font-weight: 700 !important;
  transition: opacity 0.2s !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { opacity: 0.85 !important; }

.section-inner { max-width: 1200px; margin: 0 auto; padding: 0 48px; }
.section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: 0.2em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 12px;
}
.section-title { font-size: clamp(26px, 2.8vw, 40px); font-weight: 900; letter-spacing: -0.02em; line-height: 1.25; }
.section-sub { font-size: 15px; color: var(--text2); margin-top: 14px; line-height: 1.85; }
.divider { width: 40px; height: 2px; background: var(--accent); margin-top: 20px; }

.btn-primary {
  background: var(--accent); color: #fff;
  padding: 14px 32px; border-radius: 4px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.06em;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 20px var(--accent-glow); display: inline-block;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-2px); }
.btn-secondary {
  border: 1px solid var(--accent-line); color: var(--text2);
  padding: 14px 32px; border-radius: 4px;
  font-size: 14px; font-weight: 500;
  transition: border-color 0.2s, color 0.2s; display: inline-block;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--text); }

footer {
  background: var(--bg3); border-top: 1px solid var(--border);
  padding: 40px 0; position: relative; z-index: 1;
}
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 48px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { font-size: 12px; color: var(--text3); letter-spacing: 0.04em; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.65s, transform 0.65s; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  header { padding: 0 20px; }
  nav { display: none; }
  .section-inner { padding: 0 20px; }
}
