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

:root {
  --off-white: #f5f7f3;
  --ink: #123b37;
  --teal: #157d6b;
  --teal-dark: #0f5c50;
  --pale-mint: #e8f5f0;
  --lime: #d6ed85;
  --white: #ffffff;
  --gray-100: #f0f0f0;
  --gray-200: #e0e0e0;
  --gray-400: #999999;
  --gray-600: #666666;
  --max-width: 1200px;
  --font-jp: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, -apple-system, sans-serif;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-jp);
  color: var(--ink);
  background-color: var(--off-white);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Skip Link === */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--ink);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 0 0 4px 4px;
  z-index: 1000;
  font-size: 14px;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* === Focus Visible === */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* === Header === */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 247, 243, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.brand-mark {
  color: var(--teal);
  flex-shrink: 0;
}

.brand-label {
  white-space: nowrap;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 24px;
  align-items: center;
  margin: 0;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 4px 0;
  position: relative;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--teal);
}

.nav-cta {
  background: var(--teal);
  color: var(--white) !important;
  padding: 6px 16px !important;
  border-radius: 4px;
  font-weight: 600;
}

.nav-cta:hover {
  background: var(--teal-dark);
  color: var(--white) !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s;
}

.nav-toggle-icon {
  position: relative;
  background: transparent;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-icon::before {
  top: -6px;
}

.nav-toggle-icon::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
  transform: rotate(45deg);
  top: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
  transform: rotate(-45deg);
  top: 0;
}

/* === Section Common === */
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px;
}

.section-number {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 16px;
}

.section-inner h2 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 24px;
  letter-spacing: 0.01em;
}

.section-body {
  font-size: 15px;
  line-height: 2;
  margin-bottom: 16px;
  color: var(--ink);
  max-width: 720px;
}

/* === Hero === */
.hero {
  background: var(--off-white);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 1px 1px, var(--gray-200) 1px, transparent 0);
  background-size: 40px 40px;
  opacity: 0.4;
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
}

.hero-text {
  position: relative;
}

.eyebrow {
  font-size: 14px;
  font-weight: 500;
  color: var(--teal);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.product-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gray-600);
  margin-bottom: 16px;
}

h1 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero-body {
  font-size: 15px;
  line-height: 2;
  margin-bottom: 12px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
  border: none;
  font-family: var(--font-jp);
}

.btn-primary {
  background: var(--teal);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--teal-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--teal);
  border: 1.5px solid var(--teal);
}

.btn-secondary:hover {
  background: var(--pale-mint);
}

/* Hero Illustration */
.hero-illustration {
  position: relative;
}

.city-container {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 16px;
}

#city-svg {
  width: 100%;
  height: auto;
  display: block;
}

.city-label {
  font-size: 12px;
  color: var(--gray-600);
  text-align: center;
  margin-top: 8px;
  font-weight: 500;
}

.city-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  list-style: none;
  margin-top: 12px;
  font-size: 12px;
  color: var(--gray-600);
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.legend-facilities { background: var(--teal); }
.legend-disaster { background: #e07a5f; }
.legend-roads { background: var(--lime); }
.legend-local { background: #81b29a; }

/* Hero Strip */
.hero-strip {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
  font-size: 13px;
  font-weight: 500;
  color: var(--teal);
  letter-spacing: 0.05em;
  text-align: center;
}

/* === About === */
.about {
  background: var(--white);
}

.flow-diagram {
  margin: 40px 0;
  padding: 24px 0;
}

.flow-diagram svg {
  width: 100%;
  max-width: 800px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.use-categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--gray-200);
}

.use-category {
  text-align: center;
}

.use-category svg {
  margin-bottom: 12px;
}

.use-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.use-desc {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.6;
}

/* === Demo === */
.demo {
  background: var(--off-white);
}

.demo-panel {
  margin: 40px 0;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 24px;
  align-items: start;
}

.demo-map {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 16px;
  position: relative;
}

#demo-svg {
  width: 100%;
  height: auto;
  display: block;
}

.demo-disclaimer {
  font-size: 11px;
  color: var(--gray-400);
  text-align: center;
  margin-top: 8px;
}

.demo-controls {
  padding: 16px 0;
}

.demo-toggle-group {
  display: flex;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.toggle-btn {
  flex: 1;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  background: var(--white);
  border: none;
  cursor: pointer;
  font-family: var(--font-jp);
  color: var(--gray-600);
  transition: background 0.2s, color 0.2s;
}

.toggle-btn.active {
  background: var(--teal);
  color: var(--white);
}

.toggle-btn:not(:last-child) {
  border-right: 1px solid var(--gray-200);
}

.demo-toggle-label {
  font-size: 12px;
  color: var(--gray-600);
  margin-bottom: 16px;
}

.demo-layers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.layer-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-jp);
  color: var(--ink);
  transition: background 0.2s, border-color 0.2s;
}

.layer-btn.active {
  border-color: var(--teal);
  background: var(--pale-mint);
}

.layer-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.layer-facilities { background: var(--teal); }
.layer-disaster { background: #e07a5f; }
.layer-roads { background: var(--lime); }

.demo-status {
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--pale-mint);
  border-radius: 4px;
  font-size: 14px;
  color: var(--teal);
  font-weight: 500;
}

/* === Contact === */
.contact {
  background: var(--ink);
  color: var(--white);
  position: relative;
}

.contact::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.contact .section-inner {
  position: relative;
}

.contact .section-number {
  color: var(--lime);
}

.contact .section-inner h2 {
  color: var(--white);
}

.contact .section-body {
  color: rgba(255, 255, 255, 0.85);
}

.contact-bold {
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  margin: 24px 0 16px;
  line-height: 1.7;
}

.contact-disclaimer {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 24px;
  line-height: 1.8;
}

.contact-status {
  margin-top: 24px;
  padding: 16px 20px;
  background: rgba(21, 125, 107, 0.3);
  border: 1px solid rgba(21, 125, 107, 0.5);
  border-radius: 4px;
  font-size: 14px;
  color: var(--lime);
  font-weight: 500;
}

/* === Footer === */
footer {
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
}

.footer-brand .brand-mark {
  color: var(--teal);
}

.footer-company {
  font-size: 13px;
  margin-bottom: 4px;
}

.footer-copy {
  font-size: 12px;
  margin-bottom: 16px;
}

.back-to-top {
  color: var(--teal);
  font-size: 12px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.back-to-top:hover {
  border-bottom-color: var(--teal);
}

/* === Responsive === */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 24px 32px;
  }

  h1 {
    font-size: 28px;
  }

  .hero-illustration {
    order: -1;
  }

  .use-categories {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .demo-panel {
    grid-template-columns: 1fr;
  }

  .section-inner {
    padding: 60px 24px;
  }

  .section-inner h2 {
    font-size: 24px;
  }
}

@media (max-width: 600px) {
  .header-inner {
    height: 52px;
    gap: 16px;
  }

  .nav-toggle {
    display: block;
  }

  nav {
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: var(--off-white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  nav[aria-expanded="true"] {
    max-height: 300px;
    padding: 16px 24px;
  }

  nav ul {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .hero-inner {
    padding: 32px 16px 24px;
  }

  h1 {
    font-size: 24px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    text-align: center;
  }

  .use-categories {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .section-inner {
    padding: 48px 16px;
  }

  .section-inner h2 {
    font-size: 20px;
  }

  .city-legend {
    flex-wrap: wrap;
    gap: 12px;
  }

  .flow-diagram svg {
    font-size: 10px;
  }
}

.product-boundary {
  margin-top: 28px;
  padding: 14px 18px;
  border-left: 3px solid var(--teal);
  background: var(--pale-mint);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.demo-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 36px 0 28px;
}

.demo-screenshot {
  min-width: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
}

.demo-screenshot img {
  display: block;
  width: 100%;
  height: auto;
  background: #e8efeb;
}

.demo-screenshot figcaption {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px 16px;
  color: var(--ink);
}

.demo-screenshot figcaption strong { font-size: 16px; }
.demo-screenshot figcaption span { font-size: 13px; }
.demo-screenshot figcaption small { margin-top: 4px; color: var(--gray-600); font-size: 11px; }

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.demo-deployment-note {
  margin-top: 12px;
  color: var(--gray-600);
  font-size: 12px;
}

@media (max-width: 800px) {
  .demo-gallery { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .demo-actions { flex-direction: column; }
  .demo-actions .btn { width: 100%; text-align: center; }
  .demo-screenshot figcaption { padding: 12px; }
}

/* Presentation refinements for the static concept page. */
:root { --gray-400: #58645f; --gray-600: #4c5954; }
.header-inner nav { margin-left: auto; }
h1 { font-size: 48px; }
.hero-emphasis {
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-decoration-thickness: 0.22em;
  text-underline-offset: -0.08em;
  text-decoration-skip-ink: none;
}
.btn, .toggle-btn, .layer-btn { min-height: 44px; }
.city-container { padding: 0; background: transparent; border: 0; }
.map-heading {
  display: flex; align-items: center; gap: 9px; padding: 0 0 12px;
  border-bottom: 1px solid var(--gray-200); color: var(--ink);
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
}
.map-heading > span:last-child { margin-left: auto; font-size: 12px; letter-spacing: 0; font-weight: 500; }
.map-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); flex: 0 0 auto; }
.connection-flow {
  display: grid; grid-template-columns: 1.2fr auto 0.9fr auto 1fr;
  align-items: stretch; gap: 20px; margin: 40px 0 24px; padding: 24px;
  background: var(--off-white); border: 1px solid var(--gray-200); border-radius: 8px;
}
.connection-flow > div { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; }
.flow-caption { color: var(--gray-600); font-size: 12px; font-weight: 600; }
.flow-input, .flow-output { padding: 8px 12px; border-left: 3px solid #bed8ca; }
.flow-input strong, .flow-output strong { font-size: 15px; }
.flow-plus { color: var(--teal); font-weight: 700; }
.flow-arrow { color: var(--teal); font-size: 24px; font-weight: 700; }
.flow-core { padding: 16px 20px; background: var(--ink); color: var(--white); border-radius: 6px; }
.flow-core .flow-caption { color: var(--lime); }
.flow-core strong { font-size: 24px; }
.flow-core > span:last-child { font-size: 12px; color: #e2ece7; }
.demo-disclaimer { color: var(--gray-600); font-size: 13px; }
.contact-disclaimer { color: rgba(255, 255, 255, 0.78); }
.btn-contact {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--lime); color: var(--ink);
}
.btn-contact:hover { background: #e5f5ae; }
.contact-note { margin-top: 8px; color: #e2ece7; }
.official-reference a, .text-link { color: #bfe8db; text-underline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.illustration-fallback { padding: 48px 16px; color: var(--gray-600); text-align: center; background: #e9efea; border-radius: 6px; }
section[id] { scroll-margin-top: 76px; }

@media (max-width: 900px) {
  h1 { font-size: 36px; }
  .hero-illustration { order: 0; }
}

@media (max-width: 600px) {
  h1 { font-size: 32px; line-height: 1.45; }
  body.js-enabled .nav-toggle { display: block; min-width: 44px; min-height: 44px; }
  body:not(.js-enabled) .nav-toggle { display: none; }
  body.js-enabled nav { visibility: hidden; }
  body.js-enabled nav[aria-expanded="true"] { visibility: visible; }
  body:not(.js-enabled) nav {
    position: static; max-height: none; overflow: visible; padding: 0; margin-left: auto;
    visibility: visible; border: 0; background: transparent;
  }
  body:not(.js-enabled) nav ul { flex-direction: row; flex-wrap: wrap; gap: 8px 14px; }
  body:not(.js-enabled) nav a { font-size: 12px; }
  body:not(.js-enabled) .nav-cta { display: none; }
  .map-heading { flex-wrap: wrap; }
  .map-heading > span:last-child { margin-left: 0; width: 100%; }
  .connection-flow { grid-template-columns: 1fr; justify-items: stretch; gap: 12px; padding: 20px; }
  .flow-arrow { transform: rotate(90deg); text-align: center; line-height: 1; }
  .flow-core { align-items: flex-start !important; }
  .hero-actions { gap: 10px; }
  .btn { width: 100%; }
  .demo-toggle-group { max-width: 240px; }
}

footer { color: rgba(255, 255, 255, 0.82); }
.back-to-top { color: var(--lime); }

.demo-status .text-link { color: var(--ink); }
.nav-toggle { margin-left: auto; }
