:root {
  --blue: #0b5fff;
  --blue-light: #4c8bff;
  --navy: #030f2c;
  --navy-2: #0a1e54;
  --bg: #ffffff;
  --bg-alt: #f3f6fd;
  --surface: #ffffff;
  --text: #1c2233;
  --muted: #5b6478;
  --border: #e1e6f2;
  --shadow: 0 1px 2px rgba(3, 15, 44, .06), 0 8px 24px rgba(3, 15, 44, .06);
  --radius: 14px;
  --max: 1120px;
  --font: "Source Sans 3", "Source Sans Pro", "Segoe UI", Helvetica, Arial, sans-serif;
}
:root[lang="ja"] {
  --font: "Source Sans 3", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
}
:root[lang="zh-CN"] {
  --font: "Source Sans 3", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070d1f;
    --bg-alt: #0c1430;
    --surface: #111a3a;
    --text: #e8edf9;
    --muted: #a3aec8;
    --border: #1f2b52;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); }
img, svg { display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(3, 15, 44, .92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .2px; }
.brand-logo { height: 28px; width: auto; }
.brand small { font-weight: 400; color: #9fc0ff; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .25); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: #d6e3ff; text-decoration: none; font-size: 15px; }
.nav a:hover { color: #fff; }
.lang { display: flex; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; overflow: hidden; font-size: 13px; }
.lang a, .lang span { padding: 4px 12px; color: #d6e3ff; text-decoration: none; }
.lang [aria-current] { background: var(--blue); color: #fff; }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 58%, var(--blue) 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0 0 0 55%;
  background-image: radial-gradient(rgba(255, 255, 255, .12) 1.4px, transparent 1.4px);
  background-size: 22px 22px; pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; padding-top: 96px; padding-bottom: 104px; }
.eyebrow { margin: 0 0 14px; font-size: 14px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: #9fc0ff; }
.hero h1 { margin: 0 0 18px; font-size: clamp(40px, 6vw, 64px); line-height: 1.08; font-weight: 700; }
.hero p.lead { margin: 0 0 32px; max-width: 34em; font-size: 20px; color: #d6e3ff; }
.tiles { display: grid; grid-template-columns: repeat(3, 96px); grid-auto-rows: 96px; gap: 16px; justify-content: end; }
.tiles span { border-radius: 16px; background: rgba(255, 255, 255, .12); }
.tiles span:nth-child(1) { background: var(--blue); }
.tiles span:nth-child(3) { background: rgba(76, 139, 255, .7); }
.tiles span:nth-child(4) { background: rgba(255, 255, 255, .07); }
.tiles span:nth-child(5) { background: #fff; }
.tiles span:nth-child(6) { background: rgba(11, 95, 255, .6); }
.tiles span:nth-child(7), .tiles span:nth-child(9) { visibility: hidden; }
.tiles span:nth-child(8) { height: 40px; background: rgba(76, 139, 255, .45); }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px;
  font-weight: 600; font-size: 16px; text-decoration: none;
  background: var(--blue); color: #fff; border: 1px solid var(--blue);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: #0047d6; transform: translateY(-1px); }
.btn.ghost { background: transparent; border-color: rgba(255, 255, 255, .4); }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.btn svg { width: 18px; height: 18px; }

/* Sections */
section { padding: 88px 0; scroll-margin-top: 64px; }
section.alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head h2 { margin: 0 0 10px; font-size: clamp(28px, 3.6vw, 38px); line-height: 1.2; }
.section-head p { margin: 0; color: var(--muted); font-size: 18px; }
.kicker { display: inline-block; margin-bottom: 10px; font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--blue); }

/* Concepts */
.concepts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; list-style: none; margin: 0; padding: 0; }
.concepts li { grid-column: span 2; }
.concepts li:nth-child(4) { grid-column: 2 / span 2; }
.card {
  height: 100%; padding: 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.icon { width: 52px; height: 52px; border-radius: 12px; background: var(--blue); display: grid; place-items: center; margin-bottom: 18px; }
.icon svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.card .num { font-size: 13px; font-weight: 700; color: var(--blue); letter-spacing: .12em; }
.card h3 { margin: 4px 0 10px; font-size: 21px; line-height: 1.3; }
.card p { margin: 0; color: var(--muted); }

/* Resources */
.resources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.resource { display: flex; flex-direction: column; }
.resource .tag { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: rgba(11, 95, 255, .1); color: var(--blue); margin-bottom: 14px; }
.resource.soon .tag { background: var(--bg-alt); color: var(--muted); border: 1px solid var(--border); }
.resource p { flex: 1; }
.resource .meta { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--muted); }
.resource a.more { margin-top: 18px; font-weight: 600; text-decoration: none; }
.resource a.more:hover { text-decoration: underline; }

/* Subscribe steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; margin: 0 0 36px; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; }
.steps .card::before {
  content: counter(step); display: grid; place-items: center;
  width: 36px; height: 36px; margin-bottom: 14px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 700;
}
@media (prefers-color-scheme: dark) { .steps .card::before { background: var(--blue); } }
.steps h3 { margin: 0 0 6px; font-size: 19px; }
.steps code { font-family: inherit; font-weight: 600; color: var(--text); background: var(--bg-alt); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--border); }

/* Contact CTA */
.cta {
  color: #fff; border-radius: 20px; padding: 56px;
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 50%, var(--blue) 100%);
  display: grid; grid-template-columns: 1.4fr auto; gap: 32px; align-items: center;
}
.cta h2 { margin: 0 0 8px; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.2; }
.cta p { margin: 0; color: #d6e3ff; font-size: 18px; }
.cta .btn { background: #fff; color: var(--navy); border-color: #fff; }
.cta .btn:hover { background: #e6eeff; }

/* Footer */
.site-footer { padding: 36px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-brand img { height: 32px; width: auto; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--blue); }

/* Disclaimer */
:root { --warn-bg: #fff6e0; --warn-border: #f0a202; --warn-text: #6b4100; }
@media (prefers-color-scheme: dark) { :root { --warn-bg: #2b2210; --warn-border: #f0a202; --warn-text: #ffd98a; } }
.notice {
  display: flex; gap: 16px; align-items: flex-start;
  margin: -12px 0 32px; padding: 18px 22px;
  background: var(--warn-bg); color: var(--warn-text);
  border: 1px solid var(--warn-border); border-left-width: 6px; border-radius: 12px;
}
.notice svg { flex: none; width: 28px; height: 28px; margin-top: 2px; fill: none; stroke: var(--warn-border); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.notice strong { display: block; font-size: 18px; margin-bottom: 4px; }
.notice p { margin: 0; font-size: 16px; }
.disclaimer { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* User groups and events */
.subhead { margin: 56px 0 20px; }
.subhead h3 { margin: 0 0 6px; font-size: 24px; }
.subhead p { margin: 0; color: var(--muted); }
.groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card.group { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); transition: border-color .15s ease, transform .15s ease; }
.card.group:hover { border-color: var(--blue); transform: translateY(-2px); }
.group .region { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.group strong { font-size: 18px; line-height: 1.35; flex: 1; }
.group .more { margin-top: 8px; font-weight: 600; color: var(--blue); }
.card.events { display: flex; align-items: center; gap: 20px; margin-top: 20px; }
.card.events .icon { flex: none; margin: 0; }
.card.events h3 { margin: 0 0 4px; font-size: 20px; }
.card.events p { margin: 0; color: var(--muted); }
.card.events > div:nth-child(2) { flex: 1; }
@media (max-width: 960px) { .groups { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .groups { grid-template-columns: 1fr; } .card.events { flex-direction: column; align-items: flex-start; } }

/* Responsive */
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 64px; padding-bottom: 72px; }
  .tiles { display: none; }
  .concepts { grid-template-columns: repeat(2, 1fr); }
  .concepts li, .concepts li:nth-child(4) { grid-column: auto; }
  .concepts li:nth-child(5) { grid-column: 1 / -1; }
  .resources, .steps { grid-template-columns: 1fr; }
  .cta { grid-template-columns: 1fr; padding: 36px; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .lang { margin-left: auto; }
  .brand small { display: none; }
  .concepts { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
  .wrap { padding: 0 16px; }
  .cta { padding: 28px 22px; }
}
:root[lang="ja"] .hero h1, :root[lang="zh-CN"] .hero h1 { font-size: clamp(32px, 6vw, 60px); }
.not-found { min-height: calc(100vh - 64px); display: flex; align-items: center; }
.not-found .wrap { width: 100%; grid-template-columns: 1fr; }
:root[lang="ja"] .hero h1 { word-break: keep-all; overflow-wrap: anywhere; }
