:root {
  --bg: #f7f7f4;
  --fg: #16181d;
  --muted: #5b6170;
  --accent: #0f766e;
  --line: #dcdcd4;
  --card: #ffffff;
  --pin: #0f766e;
  --pin-bg: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115;
    --fg: #e9eaee;
    --muted: #9aa0ad;
    --accent: #2dd4bf;
    --line: #262a33;
    --card: #161920;
    --pin: #99f6e4;
    --pin-bg: rgba(7, 16, 26, .85);
  }
}
:root[data-theme="dark"] {
  --bg: #0f1115;
  --fg: #e9eaee;
  --muted: #9aa0ad;
  --accent: #2dd4bf;
  --line: #262a33;
  --card: #161920;
  --pin: #99f6e4;
  --pin-bg: rgba(7, 16, 26, .85);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 16px 48px;
}
.wrap { width: 100%; max-width: 640px; }
.mark {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 20px;
}
h1 {
  font-size: clamp(40px, 9vw, 64px);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0 0 12px;
}
.tagline {
  font-size: clamp(20px, 4.5vw, 26px);
  color: var(--muted);
  margin: 0 0 36px;
}
.tagline strong { color: var(--fg); font-weight: 600; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
}
.card p { margin: 0 0 12px; }
.card p:last-child { margin: 0; }
.layers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 18px;
  padding: 0;
  list-style: none;
}
.layers li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}
/* Legend icons: the same pictograms as in the illustration. */
.layers svg { width: 15px; height: 15px; flex: none; color: var(--accent); }
.hero {
  position: relative;
  max-width: 440px;
  margin: 0 auto 36px;
}
.hero img { display: block; width: 100%; height: auto; }
/* One drawing per theme: dark lines on the light page, glowing lines on the dark page. */
.hero .on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero .on-light { display: none; }
  :root:not([data-theme="light"]) .hero .on-dark { display: block; }
}
:root[data-theme="dark"] .hero .on-light { display: none; }
:root[data-theme="dark"] .hero .on-dark { display: block; }
/* Label pinned to the glass cube; positions follow the illustration's 600x600 geometry. */
.hero-pin {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--pin);
  stroke: var(--pin);
  stroke-width: 1.5;
}
.hero-label {
  position: absolute;
  left: 4.5%;
  top: 6.5%;
  padding: 3px 10px;
  border: 1px solid var(--pin);
  border-radius: 999px;
  background: var(--pin-bg);
  color: var(--pin);
  font: 600 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .04em;
}
:lang(zh) .hero-label, :lang(ja) .hero-label, :lang(ko) .hero-label, :lang(hi) .hero-label, :lang(ru) .hero-label { font-family: inherit; }
.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  font-weight: 600;
}
.dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }
footer {
  padding: 20px 16px 28px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.controls {
  position: fixed;
  top: 14px; right: 14px;
  display: flex;
  gap: 8px;
}
.toggle, .lang {
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.lang { padding-right: 8px; }
.toggle:focus-visible, .lang:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Line breaking: even out headline lines, avoid a lone last word in paragraphs. */
h1, .tagline { text-wrap: balance; }
.card p { text-wrap: pretty; }

/* Chinese, Japanese, Korean, Hindi: native font stacks, roomier lines, no tight tracking, chips in the text font. */
:lang(zh) body {
  font-family: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  line-height: 1.75;
}
:lang(ja) body {
  font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, "Noto Sans JP", sans-serif;
  line-height: 1.75;
}
:lang(hi) body {
  font-family: system-ui, -apple-system, "Noto Sans Devanagari", "Nirmala UI", "Kohinoor Devanagari", Mangal, sans-serif;
  line-height: 1.75;
}
:lang(zh) h1, :lang(ja) h1, :lang(ko) h1 { letter-spacing: 0; line-height: 1.25; }
/* Devanagari vowel signs sit above and below the line: give the headline more room. */
:lang(hi) h1 { letter-spacing: 0; line-height: 1.35; }
:lang(zh) .layers li, :lang(ja) .layers li, :lang(ko) .layers li, :lang(hi) .layers li { font-family: inherit; }

/* Break lines only between words or phrases (spaces, <wbr>), never inside them. */
:lang(zh) h1, :lang(zh) .tagline, :lang(ja) h1, :lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }
:lang(ja) .tagline, :lang(ja) .card p { word-break: auto-phrase; }

/* French: the headline is half again as long as the English, so set it a little smaller. */
:lang(fr) h1 { font-size: clamp(34px, 8vw, 56px); }

/* German: hyphenate long compounds on narrow screens. */
:lang(de) .tagline, :lang(de) .card p { hyphens: auto; }
