/* Private Play — marketing & legal site
   Domain-neutral static site for Cloudflare Pages.
   Design goals: Apple-flavored, privacy-first, light/dark, no external deps. */

:root {
  color-scheme: light dark;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans", "Noto Sans CJK SC",
    "Microsoft YaHei", sans-serif;

  --accent: #4f6bed;
  --accent-strong: #3b53c4;

  --bg: #ffffff;
  --bg-elevated: #f5f6fa;
  --bg-card: #ffffff;
  --text: #1a1c22;
  --text-secondary: #565a66;
  --text-tertiary: #868b98;
  --border: #e4e6ee;
  --shadow: 0 1px 2px rgba(20, 22, 30, 0.04), 0 12px 32px rgba(20, 22, 30, 0.06);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1080px;
  --content-w: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #7d92f5;
    --accent-strong: #93a4f7;
    --bg: #0e0f13;
    --bg-elevated: #16181f;
    --bg-card: #191b22;
    --text: #f2f3f7;
    --text-secondary: #b3b7c2;
    --text-tertiary: #7f8493;
    --border: #2a2d37;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin-top: 0; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  color: var(--text);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: #fff;
  flex: none;
}
.brand .logo svg { width: 18px; height: 18px; }
.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* Language selector */
.lang-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.lang-picker select {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 30px 7px 14px;
  cursor: pointer;
  max-width: 168px;
}
.lang-picker::after {
  content: "";
  position: absolute;
  right: 12px;
  width: 8px; height: 8px;
  border-right: 1.6px solid var(--text-tertiary);
  border-bottom: 1.6px solid var(--text-tertiary);
  transform: rotate(45deg) translateY(-2px);
  pointer-events: none;
}
.lang-picker svg { width: 15px; height: 15px; margin-right: -4px; color: var(--text-tertiary); }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: clamp(56px, 9vw, 104px) 0 clamp(40px, 6vw, 72px);
  background:
    radial-gradient(60% 60% at 50% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
}
.hero .app-mark {
  width: 84px; height: 84px;
  border-radius: 20px;
  margin: 0 auto 24px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: var(--shadow);
}
.hero .app-mark svg { width: 46px; height: 46px; }
.hero h1 { margin: 0 0 14px; }
.hero .tagline {
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  color: var(--text-secondary);
  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: 9px;
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border);
}
.btn svg { width: 20px; height: 20px; }

.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: #000;
  color: #fff;
  border-radius: 13px;
  padding: 11px 20px 11px 18px;
  border: 1px solid rgba(255,255,255,0.14);
}
.appstore-badge:hover { text-decoration: none; opacity: 0.9; }
.appstore-badge svg { width: 26px; height: 26px; }
.appstore-badge .txt { text-align: left; line-height: 1.15; }
.appstore-badge .txt small { display: block; font-size: 0.62rem; opacity: 0.85; letter-spacing: 0.02em; }
.appstore-badge .txt strong { font-size: 1.15rem; font-weight: 600; }
.coming-soon-note { color: var(--text-tertiary); font-size: 0.85rem; margin-top: 14px; }

/* ---------- Sections ---------- */
section { padding: clamp(48px, 7vw, 80px) 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}
.section-head p { color: var(--text-secondary); font-size: 1.08rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.feature-card .icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  margin-bottom: 16px;
}
.feature-card .icon svg { width: 24px; height: 24px; }
.feature-card h3 { margin: 0 0 6px; }
.feature-card p { color: var(--text-secondary); font-size: 0.96rem; margin: 0; }

.alt { background: var(--bg-elevated); }

/* Privacy pledge list */
.pledge {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px 32px;
  max-width: 860px;
  margin: 0 auto;
}
.pledge li {
  list-style: none;
  display: flex;
  gap: 13px;
  align-items: flex-start;
}
.pledge { padding: 0; margin: 0 auto; }
.pledge .check {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  display: grid; place-items: center;
  margin-top: 2px;
}
.pledge .check svg { width: 15px; height: 15px; }
.pledge strong { display: block; margin-bottom: 2px; }
.pledge span { color: var(--text-secondary); font-size: 0.95rem; }

/* Pricing */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}
.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  box-shadow: var(--shadow);
}
.price-card.best { border-color: var(--accent); }
.price-card .badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 5px 12px; border-radius: 999px;
  white-space: nowrap;
}
.price-card h3 { margin: 0 0 4px; }
.price-card .amount { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.price-card .period { color: var(--text-tertiary); font-size: 0.9rem; }
.price-card p { color: var(--text-secondary); font-size: 0.94rem; margin: 12px 0 0; }
.price-note { text-align: center; color: var(--text-tertiary); font-size: 0.85rem; margin-top: 22px; max-width: 620px; margin-left: auto; margin-right: auto; }

/* ---------- Legal / article pages ---------- */
.doc { padding: clamp(40px, 6vw, 64px) 0 72px; }
.doc .content { max-width: var(--content-w); margin: 0 auto; }
.doc h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 8px; }
.doc .updated { color: var(--text-tertiary); font-size: 0.92rem; margin-bottom: 8px; }
.doc .intro { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 8px; }
.doc h2 {
  font-size: 1.35rem;
  margin: 40px 0 12px;
  padding-top: 8px;
}
.doc h3 { font-size: 1.08rem; margin: 24px 0 8px; }
.doc p, .doc li { color: var(--text); }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 1rem; }
.doc li { margin-bottom: 8px; }
.doc .callout {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 20px 0;
}
.doc .callout p:last-child { margin-bottom: 0; }
.doc a { text-decoration: underline; text-underline-offset: 2px; }
.toc {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 24px 0 32px;
}
.toc strong { display: block; margin-bottom: 8px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary); }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 4px; }

/* FAQ */
.faq { max-width: var(--content-w); margin: 0 auto; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 20px;
  margin-bottom: 12px;
  background: var(--bg-card);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 0;
  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: 1.4rem;
  color: var(--text-tertiary);
  font-weight: 400;
  flex: none;
}
.faq details[open] summary::after { content: "\2013"; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq .answer { padding: 14px 0 6px; color: var(--text-secondary); }
.faq .answer p:last-child { margin-bottom: 0; }

/* Support contact card */
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  max-width: var(--content-w);
  margin: 0 auto 32px;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.contact-card .icon {
  width: 52px; height: 52px; border-radius: 14px; flex: none;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  display: grid; place-items: center;
}
.contact-card .icon svg { width: 27px; height: 27px; }
.contact-card .meta { flex: 1 1 220px; }
.contact-card .meta h3 { margin: 0 0 4px; }
.contact-card .meta p { margin: 0; color: var(--text-secondary); font-size: 0.95rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 44px 0 40px;
  margin-top: 40px;
}
.site-footer .cols {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer .brand { margin-bottom: 12px; }
.footer-tagline { color: var(--text-tertiary); font-size: 0.9rem; max-width: 280px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 40px; }
.footer-nav .group h4 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-tertiary); margin: 0 0 12px; font-weight: 700;
}
.footer-nav .group a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.94rem;
  margin-bottom: 8px;
}
.footer-nav .group a:hover { color: var(--text); text-decoration: none; }
.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--text-tertiary);
  font-size: 0.86rem;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Utilities ---------- */
.center { text-align: center; }
.mt-lg { margin-top: 40px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-links { gap: 14px; }
  .nav-links a.hide-sm { display: none; }
  .site-footer .cols { flex-direction: column; }
  .footer-bottom { flex-direction: column; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}
