/* ==========================================================================
   GeoID — 共通スタイル / shared styles
   基調: ダークネイビー〜チャコール / アクセント: ブランドブルー(ロゴ準拠)
   警戒色(アンバー/レッド)はアクセントと明確に分離。本文は WCAG AA(4.5:1)以上。
   ========================================================================== */

:root {
  --bg:        #0B1017;   /* base darkest */
  --bg-2:      #121820;   /* panel */
  --bg-3:      #18212c;   /* raised */
  --line:      #24303d;   /* borders */
  --line-2:    #33424f;

  --text:      #EAF2F0;   /* primary text  (on --bg ≈ 15:1) */
  --text-2:    #AEBFC4;   /* secondary     (on --bg ≈ 8:1)  */
  --text-3:    #7C8B92;   /* muted         (on --bg ≈ 4.7:1)*/

  --accent:    #2BA8F2;   /* brand blue (bright) — text/glyphs/borders on dark */
  --accent-2:  #0E63DD;   /* brand blue (deep)   — solid CTA fills w/ white text */
  --accent-3:  #0B3FA8;   /* deepest — gradient end, matches logo "ID" base */
  --accent-rgb: 43,168,242;
  --accent-ink:#ffffff;   /* text on --accent-2 fills */

  --warn:      #F5A623;   /* amber — 注意 (アクセントと明確に分離) */
  --danger:    #E5484D;   /* red   — 危険 */

  --radius:    14px;
  --radius-sm: 10px;
  --maxw:      1120px;
  --ease:      cubic-bezier(.22,.61,.36,1);

  --font-jp: "Zen Kaku Gothic New","Noto Sans JP",system-ui,sans-serif;
  --font-en: "Inter","Jost",system-ui,sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-jp);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html[lang="en"] body { font-family: var(--font-en); }

img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- accessibility helpers ---------- */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--accent); color: #04121F;
  padding: 10px 16px; border-radius: 8px; font-weight: 700;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; text-decoration: none; }
.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;
}

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,16,23,.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 20px;
}
.brand { display: inline-flex; align-items: center; }
.brand svg { height: 26px; width: auto; }
.brand:hover { text-decoration: none; opacity: .9; }

.nav-links {
  display: flex; align-items: center; gap: 26px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  color: var(--text-2); font-size: 14.5px; font-weight: 500;
  transition: color .2s var(--ease);
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; font-weight: 700; font-size: 14.5px;
  border: 1px solid transparent; cursor: pointer; transition: all .2s var(--ease);
  font-family: inherit; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(180deg, #1E7BEA, var(--accent-2));
  color: #fff; box-shadow: 0 8px 22px -10px rgba(var(--accent-rgb), .7);
}
.btn-primary:hover { background: linear-gradient(180deg, #3A93F2, #1670EE); text-decoration: none; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* language toggle */
.lang-toggle {
  display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden;
}
.lang-toggle button {
  background: transparent; color: var(--text-3); border: 0; cursor: pointer;
  padding: 7px 11px; font-size: 12.5px; font-weight: 700; font-family: var(--font-en);
  letter-spacing: .04em; transition: all .18s var(--ease);
}
.lang-toggle button[aria-pressed="true"] { background: var(--accent-2); color: #fff; }

/* hamburger */
.hamburger {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line-2);
  border-radius: 10px; background: transparent; cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.hamburger span, .hamburger span::before, .hamburger span::after {
  content: ""; display: block; width: 18px; height: 2px; background: var(--text);
  border-radius: 2px; transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.hamburger span { position: relative; }
.hamburger span::before { position: absolute; top: -6px; }
.hamburger span::after  { position: absolute; top:  6px; }
.hamburger[aria-expanded="true"] span { background: transparent; }
.hamburger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.hamburger[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

/* ==========================================================================
   Sections & type
   ========================================================================== */
section { position: relative; }
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }

.eyebrow {
  display: inline-block; font-family: var(--font-en); font-size: 12.5px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
}
h1,h2,h3 { line-height: 1.28; letter-spacing: .01em; margin: 0; font-weight: 700; }
h2.section-title { font-size: clamp(1.5rem, 1rem + 2.2vw, 2.25rem); margin-bottom: 16px; }
.section-lead { color: var(--text-2); max-width: 62ch; font-size: 1.02rem; }

/* ---------- hero ---------- */
.hero { padding: 120px 0 96px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(58% 55% at 80% 4%, rgba(var(--accent-rgb), .18), transparent 60%),
    radial-gradient(50% 45% at 8% 92%, rgba(14,99,221, .16), transparent 62%);
}
/* subtle grid to reinforce the "map / 3D" tone */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(var(--accent-rgb), .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), .05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(80% 70% at 70% 20%, #000 30%, transparent 78%);
          mask-image: radial-gradient(80% 70% at 70% 20%, #000 30%, transparent 78%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}
.hero h1 { font-size: clamp(1.9rem, 1.2rem + 3.2vw, 3rem); }
.hero h1 .accent { color: var(--accent); }
.hero-sub { margin-top: 22px; color: var(--text-2); font-size: 1.1rem; max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-note { margin-top: 20px; font-size: 13px; color: var(--text-3); }

/* hero visual — stylized 3D map panel */
.hero-visual {
  position: relative; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--bg-3), var(--bg-2));
  padding: 18px; box-shadow: 0 30px 80px -40px rgba(0,0,0,.8);
  aspect-ratio: 4 / 3.2;
}
.hero-visual .badge {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  background: rgba(11,16,23,.7); border: 1px solid var(--line-2);
  color: var(--text-2); font-size: 11.5px; font-weight: 600;
  padding: 5px 10px; border-radius: 999px; font-family: var(--font-en); letter-spacing: .03em;
}
.map-svg { width: 100%; height: 100%; border-radius: 10px; overflow: hidden; }

/* ==========================================================================
   Cards & grids
   ========================================================================== */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2,1fr); }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }

.card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.card h3 { font-size: 1.16rem; margin-bottom: 10px; }
.card p { color: var(--text-2); font-size: .96rem; margin: 0; }

/* linked feature cards -> /1../4 */
a.card.feature { display: block; }
a.card.feature:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-3px); }
.feature .tagrow {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
}
.feature .tag {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-en);
  font-size: 11.5px; font-weight: 700; letter-spacing: .05em; color: var(--accent);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 10px;
}
.feature .ico { width: 40px; height: 40px; margin-bottom: 14px; color: var(--accent); }
.feature .go { margin-top: 16px; color: var(--accent); font-weight: 700; font-size: .9rem; }
.feature .soon {
  display: inline-block; font-size: 11px; font-weight: 700;
  color: var(--warn); border: 1px solid rgba(245,166,35,.4); border-radius: 999px;
  padding: 2px 8px; font-family: var(--font-en); letter-spacing: .04em;
}

/* how it works steps */
.step { display: flex; gap: 18px; align-items: flex-start; }
.step .n {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; font-family: var(--font-en); font-weight: 800;
  color: var(--accent); background: rgba(var(--accent-rgb), .10); border: 1px solid var(--line-2);
}
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { color: var(--text-2); font-size: .95rem; margin: 0; }

/* audience chips */
.aud { display: flex; flex-wrap: wrap; gap: 12px; }
.aud .chip {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 18px; color: var(--text); font-size: .95rem; font-weight: 500;
}

/* problem callout list */
.prob { display: grid; gap: 14px; }
.prob li {
  list-style: none; padding: 18px 20px 18px 52px; position: relative;
  background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--warn);
  border-radius: var(--radius-sm); color: var(--text-2);
}
.prob li::before {
  content: "!"; position: absolute; left: 20px; top: 18px;
  width: 20px; height: 20px; border-radius: 50%; background: rgba(245,166,35,.14);
  color: var(--warn); font-weight: 800; font-family: var(--font-en);
  display: grid; place-items: center; font-size: 12px;
}
.prob li strong { color: var(--text); font-weight: 700; }

/* dev org / about */
.about {
  background: linear-gradient(160deg, var(--bg-2), var(--bg));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 40px;
}

/* ==========================================================================
   Contact form (Netlify Forms)
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .9rem; font-weight: 600; color: var(--text-2); }
.field label .req { color: var(--accent); margin-left: 4px; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px;
  color: var(--text); padding: 13px 15px; font-size: 15px; font-family: inherit;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .18);
}
.field textarea { resize: vertical; min-height: 130px; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form .btn-primary { width: 100%; padding: 15px; font-size: 15px; }
.form-note { font-size: 12.5px; color: var(--text-3); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; background: var(--bg-2); }
.footer-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-brand svg { height: 24px; margin-bottom: 14px; }
.footer-brand p { color: var(--text-3); font-size: .88rem; max-width: 34ch; margin: 0; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin: 0 0 14px; font-family: var(--font-en); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--text-2); font-size: .92rem; }
.footer-col a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--text-3); font-size: .82rem;
}
.footer-bottom .src { max-width: 60ch; }

/* ==========================================================================
   "準備中" placeholder page
   ========================================================================== */
.soon-page { min-height: calc(100vh - 64px); display: grid; place-items: center; text-align: center; padding: 60px 24px; }
.soon-inner { max-width: 640px; }
.soon-inner .eyebrow { margin-bottom: 20px; }
.soon-inner h1 { font-size: clamp(1.8rem, 1.2rem + 3vw, 2.8rem); margin-bottom: 18px; }
.soon-inner p { color: var(--text-2); font-size: 1.05rem; margin: 0 auto 14px; max-width: 54ch; }
.soon-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px;
  background: rgba(245,166,35,.1); border: 1px solid rgba(245,166,35,.35);
  color: var(--warn); font-weight: 700; font-size: .82rem; letter-spacing: .04em;
  padding: 7px 15px; border-radius: 999px; font-family: var(--font-en);
}
.soon-inner .btn { margin-top: 30px; }
.soon-map { width: 100%; max-width: 380px; margin: 34px auto 0; opacity: .5; }

/* thanks page reuse */
.thanks-check {
  width: 72px; height: 72px; margin: 0 auto 24px; border-radius: 50%;
  background: rgba(var(--accent-rgb), .12); border: 1px solid var(--accent);
  display: grid; place-items: center; color: var(--accent);
}

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */
/* JSが動く時だけ隠す。JS無効/失敗時は常に表示（防災サイトのため内容欠落を許さない） */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive — モバイル対応(初回から)
   ========================================================================== */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; max-width: 520px; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 720px) {
  .section { padding: 68px 0; }
  .hero { padding: 84px 0 68px; }
  .wrap { padding: 0 18px; }

  .hamburger { display: inline-flex; }
  .nav-links {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 8px 0; transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
    max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 15px 24px; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav-links li:last-child a { border-bottom: 0; }
  .nav .btn-primary { display: none; }         /* keep header light on mobile */

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; }
  .footer-cols { gap: 32px; }
  .about { padding: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
