/* Chessnook marketing site — shared styles */

:root {
  --ink: #1B1B1B;
  --cream: #FAEAC6;
  --sun: #F5C246;
  --yellow: #FFDB6A;
  --helmet: #E97554;
  --pup: #7DB4DE;
  --blush: #FFB8B0;
  --paper: #FFFCF3;
  --mint: #88D9B6;
  --muted: #5a5648;
  --line: 2.5px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, "SF Pro Rounded", "Hiragino Sans", "PingFang TC", system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== Layout ===== */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ===== Nav ===== */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  max-width: 1100px;
  margin: 0 auto;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}
.brand img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  border: var(--line) solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.15s;
}
.nav-links a:hover { background: rgba(0,0,0,0.06); }

.lang-switch {
  display: inline-flex;
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 2px 2px 0 var(--ink);
}
.lang-switch a {
  padding: 6px 12px;
  font-weight: 800;
  font-size: 12px;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  border-radius: 0;
}
.lang-switch a + a { border-left: var(--line) solid var(--ink); }
.lang-switch a.active { background: var(--sun); }
.lang-switch a:hover { background: var(--yellow); }

/* ===== Hero ===== */
.hero {
  padding: 32px 0 56px;
  text-align: center;
}
.tagline {
  display: inline-block;
  background: var(--mint);
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 20px;
  box-shadow: 3px 3px 0 var(--ink);
}
h1.title {
  font-size: clamp(40px, 7vw, 68px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 18px;
}
h1.title em {
  font-style: normal;
  background: var(--sun);
  padding: 0 12px;
  border: var(--line) solid var(--ink);
  border-radius: 14px;
  display: inline-block;
  transform: rotate(-1.5deg);
  box-shadow: 4px 4px 0 var(--ink);
}
.hero p.lede {
  font-size: 18px;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 28px;
}
.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
  font-size: 16px;
  padding: 14px 22px;
  border-radius: 14px;
  text-decoration: none;
  border: var(--line) solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.12s, box-shadow 0.12s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.btn.secondary { background: var(--paper); color: var(--ink); }
.btn.coral { background: var(--helmet); color: var(--paper); }

.hero-icon {
  display: block;
  margin: 36px auto 0;
  width: 180px;
  height: 180px;
  border-radius: 36px;
  border: var(--line) solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(-2deg);
}

/* ===== Screenshot showcase ===== */
.showcase {
  padding: 24px 0 64px;
  text-align: center;
}
.showcase .frame {
  display: inline-block;
  padding: 14px;
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: 38px;
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(-1deg);
  max-width: 320px;
  width: 100%;
}
.showcase .frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 26px;
  border: var(--line) solid var(--ink);
}
@media (max-width: 640px) {
  .showcase .frame { max-width: 260px; padding: 10px; border-radius: 30px; }
  .showcase .frame img { border-radius: 20px; }
}

/* ===== Card grid ===== */
section { padding: 64px 0; }
section h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  text-align: center;
}
section .sub {
  text-align: center;
  color: var(--muted);
  margin-bottom: 40px;
  font-size: 16px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.card {
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 5px 5px 0 var(--ink);
}
.card .swatch {
  display: block;
  width: 44px;
  height: 8px;
  border-radius: 999px;
  margin-bottom: 14px;
  background: var(--yellow);
  border: var(--line) solid var(--ink);
}
.card:nth-child(2n) .swatch { background: var(--blush); }
.card:nth-child(3n) .swatch { background: var(--pup); }
.card:nth-child(4n) .swatch { background: var(--mint); }
.card:nth-child(5n) .swatch { background: var(--helmet); }
.card h3 { font-size: 19px; font-weight: 900; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 15px; }

/* ===== Mode strip ===== */
.modes {
  background: var(--paper);
  border-top: var(--line) solid var(--ink);
  border-bottom: var(--line) solid var(--ink);
}
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 720px) { .mode-grid { grid-template-columns: 1fr; } }
.mode {
  border: var(--line) solid var(--ink);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 5px 5px 0 var(--ink);
  position: relative;
}
.mode.xiangqi { background: var(--blush); }
.mode.banqi   { background: var(--pup); }
.mode .tag {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}
.mode h3 { font-size: 24px; font-weight: 900; margin-bottom: 8px; }
.mode p { color: rgba(0,0,0,0.7); }

/* ===== Document pages (support/privacy) ===== */
.doc-header {
  padding: 24px 0 12px;
  text-align: center;
}
.doc-header h1 {
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.doc-header .meta {
  color: var(--muted);
  font-size: 14px;
}
.doc {
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: 22px;
  padding: 36px;
  margin: 24px auto 64px;
  box-shadow: 6px 6px 0 var(--ink);
}
.doc h2 {
  font-size: 22px;
  font-weight: 900;
  margin-top: 28px;
  margin-bottom: 10px;
  text-align: left;
}
.doc h2:first-child { margin-top: 0; }
.doc h3 {
  font-size: 17px;
  font-weight: 800;
  margin-top: 18px;
  margin-bottom: 6px;
}
.doc p, .doc li { font-size: 15.5px; color: #2a2a2a; }
.doc p { margin-bottom: 12px; }
.doc ul, .doc ol { margin: 8px 0 14px 22px; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.doc strong { font-weight: 800; }
.doc .callout {
  background: var(--cream);
  border: var(--line) solid var(--ink);
  border-radius: 14px;
  padding: 14px 18px;
  margin: 14px 0;
  box-shadow: 3px 3px 0 var(--ink);
}
.doc .toc {
  background: var(--cream);
  border: var(--line) solid var(--ink);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
}
.doc .toc h3 { margin: 0 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; }
.doc .toc ol { margin: 0 0 0 18px; }
.doc .toc li { font-size: 14px; margin-bottom: 4px; }

/* FAQ disclosure */
.faq details {
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 14px;
  box-shadow: 4px 4px 0 var(--ink);
}
.faq summary {
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 24px;
  font-weight: 700;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  flex-shrink: 0;
}
.faq details[open] summary::after { content: "−"; background: var(--helmet); color: var(--paper); }
.faq details[open] summary { margin-bottom: 10px; }
.faq details p { color: var(--muted); font-size: 15px; }
.faq details ul { margin: 8px 0 0 20px; color: var(--muted); font-size: 15px; }

/* ===== Footer ===== */
footer {
  background: var(--ink);
  color: var(--paper);
  padding: 40px 24px 32px;
  margin-top: 64px;
}
footer .wrap-f {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}
footer .brand-f {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 20px;
}
footer .brand-f img { width: 36px; height: 36px; border-radius: 9px; }
footer p.small { color: #b7b3a4; font-size: 13px; margin-top: 8px; max-width: 320px; }
footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
footer nav a {
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}
footer nav a:hover { color: var(--yellow); }
footer .copy {
  border-top: 1px solid #333;
  margin-top: 28px;
  padding-top: 16px;
  text-align: center;
  color: #888;
  font-size: 12px;
}

/* ===== Misc ===== */
.muted { color: var(--muted); }
.center { text-align: center; }
.divider { height: 0; }

@media (max-width: 640px) {
  .nav { padding: 16px; }
  .doc { padding: 24px 20px; }
  .hero-icon { width: 140px; height: 140px; }
}
