/* Shared styles for the Joyme public pages (home, privacy, support). */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #5b6470;
  --border: #e3e6ea;
  --accent: #3b5bdb;
  --accent-soft: #eef1fd;
  --brand: #e3121d;
  --header-bg: rgba(255, 255, 255, 0.86);
  --logo-light: block;
  --logo-dark: none;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121416;
    --surface: #1a1d20;
    --text: #eceff2;
    --muted: #9aa3ad;
    --border: #2b3036;
    --accent: #8ea2f5;
    --accent-soft: #232a45;
    --brand: #ff4d55;
    --header-bg: rgba(18, 20, 22, 0.86);
    --logo-light: none;
    --logo-dark: block;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
[hidden] { display: none !important; }

/* ── header ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .bar {
  max-width: 1040px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 18px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border); }
.brand .logo-light { display: var(--logo-light); }
.brand .logo-dark { display: var(--logo-dark); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a {
  text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500;
  padding: 6px 10px; border-radius: 8px;
}
.site-nav a:hover { color: var(--text); background: var(--accent-soft); }
.site-nav a[aria-current="page"] { color: var(--accent); }
.lang { display: flex; gap: 4px; margin-left: 6px; }
.lang button {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
}
.lang button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── document pages (privacy, support) ──────────────────── */
.doc { max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; }
.doc h1 { font-size: 28px; line-height: 1.25; margin: 0 0 6px; }
.doc .sub { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.doc article {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 8px 24px 24px;
}
.doc h2 { font-size: 19px; margin: 28px 0 8px; }
.doc ul, .doc ol { padding-left: 22px; margin: 8px 0; }
.doc li { margin: 4px 0; }
.doc p { margin: 8px 0; }
.note { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; }

/* ── footer ─────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); }
.site-footer .bar {
  max-width: 1040px; margin: 0 auto; padding: 20px 16px 28px;
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
  color: var(--muted); font-size: 14px;
}
.site-footer nav { margin-left: auto; display: flex; gap: 16px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

@media (max-width: 560px) {
  .brand span { display: none; }
  .site-nav a { padding: 6px 8px; font-size: 14px; }
  .doc article { padding: 4px 16px 20px; }
  .doc h1 { font-size: 24px; }
  .site-footer nav { margin-left: 0; }
}
