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

:root {
  --bg-primary: #faf9f7;
  --bg-alt: #f3f1ee;
  --bg-card: #ffffff;
  --text-primary: #1a1a19;
  --text-secondary: #4a4843;
  --text-tertiary: #9c9891;
  --border: #e8e6e1;
  --border-strong: #d4d1cb;
  --accent: #0071BE;
  --accent-light: #e8f2fa;
  --accent-hover: #005a99;
  --challenge: #c4420a;
  --dark: #1a1a19;
  --font-sans: 'Noto Sans JP', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --rounded: 4px;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--accent-hover); }

/* ===== UTILITIES ===== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  padding: 14px 32px;
  border-radius: var(--rounded);
  cursor: pointer;
  border: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 113, 190, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-ghost:hover {
  background: var(--accent-light);
  border-color: var(--accent-hover);
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 32px;
  width: auto;
}

.header-powered {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  white-space: nowrap;
}

.header-powered-text {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-tertiary);
  letter-spacing: 0.03em;
}

.header-powered img {
  height: 32px;
  width: auto;
}

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

.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}
.nav a:hover { color: var(--text-primary); }

.nav .btn {
  font-size: 14px;
  padding: 10px 24px;
}

.nav .btn-primary {
  color: #fff;
}
.nav .btn-primary:hover {
  color: #fff;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

/* ===== FOOTER ===== */
.footer {
  background: #F5F5F4;
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 56px 0 40px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-logo img {
  height: 48px;
  width: auto;
}

.footer-logo .wao-logo {
  height: 56px;
}

.footer-logo-divider {
  width: 1px;
  height: 40px;
  background: rgba(0,0,0,0.12);
}

.footer-logo .waotech-logo {
  height: 36px;
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 14px;
  font-weight: 400;
  color: rgba(0,0,0,0.5);
  transition: color 0.15s ease;
}
.footer-links a:hover { color: rgba(0,0,0,0.8); }

.footer-copy {
  font-size: 13px;
  color: rgba(0,0,0,0.35);
  text-align: center;
  line-height: 1.7;
}

/* ===== MOBILE NAV ===== */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.98);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
}

.mobile-nav .btn-primary {
  color: #fff;
}

.mobile-nav-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

/* ===== RESPONSIVE (shared) ===== */
@media (max-width: 1280px) {
  .nav { gap: 20px; }
  .nav .btn { padding: 10px 20px; }
}

@media (max-width: 1052px) {
  .nav { display: none; }
  .mobile-toggle { display: block; }

  .header-powered img { height: 24px; }
  .logo img { height: 28px; }

  .footer-links { gap: 16px; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .header { padding: 0 16px; }
  .header-powered img { height: 20px; }
  .header-powered-text { font-size: 9px; }
  .logo img { height: 24px; }
}
