/* Chessboard Cam — the app's own look: walnut board, gold accent on near-black. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/IBMPlexSans.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --ground: #0d0e0c;
  --panel: #1a1c18;
  --panel-border: #2b2e28;
  --chip: #22241f;
  --text: #ecede8;
  --secondary: #9a9e94;
  --muted: #8a8f86;
  --accent: #e9b44c;
  --on-accent: #16130b;
  --light-square: #e8d3ae;
  --dark-square: #a97c55;
  --green: #5bd68a;
  --red: #ff5a47;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 16px;
  --page: 1080px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #f3c96f; }

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

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

/* Header */

.site-header { border-bottom: 1px solid var(--panel-border); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand:hover { color: var(--text); }
.nav { display: flex; gap: 20px; font-size: 15px; }
.nav a { color: var(--secondary); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav { align-items: center; }

/* Language menu: the globe in the header */
.lang-menu { position: relative; }
.lang-menu summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  color: var(--secondary);
  font-family: var(--mono);
  font-size: 13px;
  cursor: pointer;
  list-style: none;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--text); border-color: var(--muted); }
.lang-menu summary svg { width: 18px; height: 18px; }
.lang-menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.lang-menu > div a { padding: 9px 12px; border-radius: 8px; color: var(--secondary); }
.lang-menu > div a:hover { background: var(--chip); color: var(--text); }
.lang-menu > div a[aria-current] { color: var(--accent); }

/* Hero */

.hero { padding: 72px 0 56px; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  font-weight: 700;
}
.lead { font-size: 19px; color: var(--secondary); margin: 0 0 28px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.cta .badge img { height: 52px; width: auto; }
.cta .soon { font-size: 14px; color: var(--muted); }

/* The hero's board: a live-looking digital board with the last move lit. */
.board-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 80px rgba(233, 180, 76, 0.08);
}
.board-card .bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  margin-bottom: 12px;
}
.pill {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--red);
  color: #fff;
}
.board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
}
.board span {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(18px, 3.2vw, 30px);
  line-height: 1;
  font-family: "Apple Symbols", "Segoe UI Symbol", "DejaVu Sans", serif;
}
.board .l { background: var(--light-square); }
.board .d { background: var(--dark-square); }
.board .hl.l { background: #e6d27a; }
.board .hl.d { background: #c2a24a; }
.board .w { color: #fbf8f0; text-shadow: 0 0 1px #000, 0 1px 1px #000; }
.board .b { color: #1c1a16; }
.moves {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--secondary);
  margin-top: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.moves b { color: var(--text); font-weight: 600; }

/* Sections */

section { padding: 56px 0; }
section h2 {
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 12px;
}
.section-lead { color: var(--secondary); margin: 0 0 32px; max-width: 40em; }

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 22px;
}
.card svg { width: 26px; height: 26px; color: var(--accent); margin-bottom: 12px; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--secondary); font-size: 15px; }

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  border-top: 2px solid var(--panel-border);
  padding-top: 16px;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--mono);
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 8px;
}
.steps h3 { margin: 0 0 6px; font-size: 17px; }
.steps p { margin: 0; color: var(--secondary); font-size: 15px; }

.note {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 40px;
}
.note h3 { margin: 0 0 6px; font-size: 18px; }
.note p { margin: 0; color: var(--secondary); font-size: 15px; }

/* Text pages: privacy, support */

.doc { padding: 48px 0 64px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); line-height: 1.1; margin: 0 0 8px; letter-spacing: -0.01em; }
.doc .updated { color: var(--muted); font-size: 15px; margin: 0 0 32px; }
.doc h2 { font-size: 22px; margin: 36px 0 10px; }
.doc h3 { font-size: 18px; margin: 24px 0 6px; }
.doc p, .doc li { color: #d3d5ce; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0 8px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--panel-border); }
.doc th { color: var(--secondary); font-weight: 500; }
.table-scroll { overflow-x: auto; }

.contact {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 8px 0 24px;
}
.contact p { margin: 0 0 14px; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: #f3c96f; color: var(--on-accent); }
.address { font-family: var(--mono); font-size: 15px; color: var(--secondary); margin-left: 14px; }

details {
  border-bottom: 1px solid var(--panel-border);
  padding: 14px 0;
}
summary { cursor: pointer; font-weight: 600; font-size: 17px; }
details p { margin: 10px 0 0; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--panel-border);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14px;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--secondary); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer .languages { flex-basis: 100%; gap: 6px 16px; font-size: 13px; }
.site-footer .languages a[aria-current] { color: var(--text); }

/* A translated privacy policy says the English one applies */
.translation {
  font-size: 14px;
  color: var(--secondary);
  border-left: 2px solid var(--panel-border);
  padding-left: 12px;
}

/* The bundled fonts have no CJK glyphs: Japanese and Chinese use the system's */
:root:lang(ja) { --sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif; }
h1, h2, h3 { text-wrap: balance; }
:lang(ja) :is(h1, h2, h3), :lang(zh-Hans) :is(h1, h2, h3) { word-break: auto-phrase; }
:root:lang(zh-Hans) { --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }

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

@media (max-width: 860px) {
  .hero { padding: 40px 0 32px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; }
  .board-card { max-width: 440px; }
  .features { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .note { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .nav { gap: 14px; font-size: 14px; }
  /* No room for the name next to the links and the globe: the icon stays */
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .steps { grid-template-columns: 1fr; }
  .address { display: block; margin: 12px 0 0; }
}
