:root {
  color-scheme: light dark;
  --canvas: #f8f9ff;
  --surface: #fff;
  --ink: #24242d;
  --muted: #666674;
  --outline: #e1e5ee;
  --brand: #275ddb;
  --on-brand: #fff;
  --brand-soft: #e8eeff;
  --on-brand-soft: #173b82;
  --radius: 12px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans CJK JP", sans-serif;
  line-height: 1.65;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #111318;
    --surface: #191b20;
    --ink: #e3e2e9;
    --muted: #c3c6d0;
    --outline: #44474f;
    --brand: #afc6ff;
    --on-brand: #002d69;
    --brand-soft: #173b82;
    --on-brand-soft: #d9e2ff;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
}

a {
  color: var(--brand);
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
}

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

h1, h2, h3 {
  line-height: 1.25;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
p + p { margin-top: 12px; }

.wrap {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 1;
  transform: translateY(-200%);
  padding: 8px 12px;
  background: var(--surface);
}

.skip:focus { transform: none; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--outline);
}

.header-inner, nav, .brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.header-inner {
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 12px;
}

nav { gap: 4px 16px; }

.brand {
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.brand img { border-radius: 8px; }

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-size: 0.875rem;
  text-decoration: none;
}

nav a:hover, nav a[aria-current="page"] {
  color: var(--brand);
  text-decoration: underline;
}

nav .language { color: var(--brand); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  align-items: center;
  gap: clamp(24px, 6vw, 80px);
  padding-block: clamp(40px, 8vw, 96px) 32px;
}

h1 { font-size: clamp(2rem, 5.5vw, 4.25rem); }

.hero .lead {
  margin-block: 16px 12px;
  color: var(--on-brand-soft);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  text-wrap: balance;
}

.hero p:not(.lead) {
  max-width: 46ch;
  color: var(--muted);
}

.hero-art {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: clamp(24px, 6vw, 72px);
  border-radius: var(--radius);
  background: var(--brand-soft);
}

.hero-art img, .language-picker img {
  width: min(100%, 240px);
  border-radius: 22%;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 650;
  text-decoration: none;
}

.button:hover { color: var(--on-brand); text-decoration: underline; }
.button.secondary { background: var(--surface); color: var(--brand); border-color: var(--outline); }
.hero .button, .contact .button { margin-top: 24px; }
.long-link { overflow-wrap: anywhere; max-width: 100%; }

.features { padding-block: 32px 64px; }

h2 { font-size: clamp(1.25rem, 3.5vw, 1.75rem); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.feature-grid section, .contact {
  padding: 24px;
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  background: var(--surface);
}

h3 { font-size: 1.1rem; }

.feature-grid p { margin-top: 8px; color: var(--muted); }

.document {
  max-width: 720px;
  padding-block: clamp(32px, 7vw, 72px);
  overflow-wrap: anywhere;
}

.document h1 { font-size: clamp(1.75rem, 5vw, 3.25rem); }
.document > :where(p, section) { margin-top: 32px; }
.document section > :where(p, dl, ul) { margin-top: 12px; }
.policy li + li { margin-top: 8px; }

.faq dl { margin-bottom: 0; }
.faq dt { font-weight: 700; }
.faq dd { margin: 4px 0 16px; }

.site-footer {
  padding-block: 24px;
  border-top: 1px solid var(--outline);
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer a { color: inherit; }

.language-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.language-picker {
  display: grid;
  justify-items: center;
  gap: 24px;
  padding-block: 40px;
  text-align: center;
}

.language-picker img { width: 96px; }
.language-picker h1 span { display: block; margin-top: 8px; font-size: 0.52em; color: var(--muted); }
.language-picker nav { justify-content: center; }

@media (max-width: 700px) {
  .hero, .feature-grid { grid-template-columns: 1fr; }
  .hero-art { min-height: 0; }
  .hero-art img { width: min(42vw, 200px); }
}

@media (max-width: 420px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { align-items: flex-start; flex-direction: column; }
  .feature-grid section, .contact { padding: 16px; }
}
