/* qiuqiu marketing site — shared styles
 * Light-and-dark theme via CSS custom-property flip on prefers-color-scheme.
 * Pure CSS; no preprocessor, no Tailwind. */

:root {
  color-scheme: light dark;
  --brand: #3b82f6;
  --brand-dark: #1d4ed8;
  --brand-soft: rgba(59, 130, 246, 0.12);
  --ink: #0e1217;
  --ink-2: #2a3038;
  --muted: #6d7786;
  --line: #e6e9ee;
  --bg: #fafbfc;
  --card: #ffffff;
  --shadow: 0 30px 60px rgba(15, 30, 45, 0.18);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1f3f6;
    --ink-2: #cdd2da;
    --muted: #9aa3ad;
    --line: #262a31;
    --bg: #0c0f13;
    --card: #15181d;
    --brand-soft: rgba(59, 130, 246, 0.18);
    --shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

/* Visible focus ring for keyboard users — accessibility */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============ Header / Nav ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  /* color-mix lets the nav blend with whatever bg the theme picks */
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1180px; margin: 0 auto; padding: 14px 24px;
  gap: 16px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em;
  text-decoration: none; color: inherit;
}
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
  flex-shrink: 0;
}
.nav-links {
  display: flex; align-items: center; gap: 6px 22px; flex-wrap: wrap;
}
.nav-links a {
  color: var(--ink-2); text-decoration: none;
  font-size: 0.95rem; font-weight: 500;
  padding: 6px 4px;
}
.nav-links a:hover { color: var(--brand); }
.nav-links a.active { color: var(--brand); }

/* ============ Layout helpers ============ */
.container {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
}
.section { padding: 80px 0; }
.section-tight { padding: 48px 0; }
.eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--brand);
  margin: 0 0 12px;
}
h1, h2, h3 { letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.1; font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.2; font-weight: 800; }
h3 { font-size: 1.2rem; line-height: 1.3; font-weight: 700; }
p { margin: 0; }
.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--ink-2); line-height: 1.6;
}

/* ============ Hero ============ */
.hero {
  position: relative; overflow: hidden;
  padding: 80px 0 60px;
  background: radial-gradient(
    ellipse at 80% -20%,
    var(--brand-soft) 0%,
    transparent 60%
  );
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 60px; align-items: center;
}
.hero-copy h1 { margin-bottom: 18px; }
.hero-copy .lead { margin-bottom: 28px; max-width: 540px; }
.hero-shot {
  display: flex; justify-content: center; align-items: center;
}
.hero-shot img {
  max-width: 360px; width: 100%;
  border-radius: 32px;
  box-shadow: var(--shadow);
  background: var(--card);
}

/* ============ Buttons / CTA ============ */
.cta-row {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; padding: 14px 22px;
  border-radius: 999px; font-weight: 600;
  text-decoration: none; border: 1px solid transparent;
  font-size: 0.95rem; cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--brand); color: #fff;
}
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* Badge row used in hero + download page */
.badges {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
.badge {
  display: inline-flex; align-items: center;
  border-radius: 12px; overflow: hidden;
  transition: transform .12s ease;
}
.badge:hover { transform: translateY(-2px); }
.badge img { width: 180px; height: 60px; display: block; }
.badge.is-soon {
  /* "Coming soon" badges are visually dimmed but still focusable */
  opacity: 0.5; cursor: default;
  position: relative;
}
.badge.is-soon:hover { transform: none; }
.badge-note {
  display: block;
  font-size: 0.78rem; color: var(--muted);
  margin-top: 6px; text-align: center;
}
/* Per-download MD5 checksum. <details> so the page stays tidy by
   default; tap to expand the monospace hash for verification. */
.checksum {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
}
.checksum summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.checksum summary::-webkit-details-marker { display: none; }
.checksum summary::before { content: "▸ "; opacity: .55; }
.checksum[open] summary::before { content: "▾ "; opacity: .55; }
.checksum code {
  display: inline-block;
  margin-top: 3px;
  padding: 2px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  word-break: break-all;
  background: rgba(127,127,127,0.08);
  border-radius: 4px;
}

/* ============ Feature cards (Home) ============ */
.cards {
  display: grid; gap: 22px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 36px;
}
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 28px;
}
.card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-2); font-size: 0.97rem; }

/* ============ Features page sections ============ */
.feature-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: center;
  padding: 60px 0;
  border-top: 1px solid var(--line);
}
.feature-row:first-of-type { border-top: none; }
.feature-row.reverse .feature-shot { order: -1; }
.feature-shot {
  display: flex; justify-content: center;
}
.feature-shot img {
  max-width: 320px; width: 100%;
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.feature-copy h2 { margin-bottom: 14px; }
.feature-copy p { color: var(--ink-2); margin-bottom: 10px; }
.feature-list {
  margin: 14px 0 0; padding-left: 18px; color: var(--ink-2);
}
.feature-list li { margin-bottom: 6px; }

/* ============ Download page grid ============ */
.platform-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 36px;
}
.platform {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 28px;
  text-align: center;
}
.platform-icon {
  width: 56px; height: 56px; margin: 0 auto 14px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px; background: var(--brand-soft); color: var(--brand);
}
.platform-icon svg { width: 30px; height: 30px; }
.platform h3 { margin-bottom: 6px; }
.platform p { color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; }

.requirements {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 24px 28px;
  margin-top: 40px;
}
.requirements h3 { margin-bottom: 10px; }
.requirements ul { margin: 0; padding-left: 18px; color: var(--ink-2); }
.requirements li { margin-bottom: 4px; }

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 56px 0 32px;
  margin-top: 80px;
}
.footer-cols {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer h4 {
  font-size: 0.85rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted);
  margin: 0 0 14px; font-weight: 700;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer a {
  color: var(--ink-2); text-decoration: none; font-size: 0.95rem;
}
.footer a:hover { color: var(--brand); }
.footer-about p { color: var(--muted); font-size: 0.92rem; margin-top: 8px; }
.footer-bottom {
  border-top: 1px solid var(--line);
  margin-top: 40px; padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  color: var(--muted); font-size: 0.85rem;
}

/* Language switcher (pill group) */
.lang-switch {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 999px; padding: 2px;
  background: var(--bg);
}
.lang-switch button {
  background: transparent; border: none; cursor: pointer;
  padding: 6px 12px; font-size: 0.78rem; border-radius: 999px;
  color: var(--muted); font-weight: 600; font-family: inherit;
}
.lang-switch button:hover { color: var(--brand); }
.lang-switch button.active { background: var(--brand); color: #fff; }

/* Share row */
.share { display: flex; gap: 8px; margin-top: 10px; }
.share a {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); display: inline-flex;
  align-items: center; justify-content: center;
  color: var(--muted);
}
.share a:hover { color: var(--brand); border-color: var(--brand); }
.share svg { width: 16px; height: 16px; fill: currentColor; }

/* ============ Mobile ============ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-shot { order: -1; }
  .hero-shot img { max-width: 280px; }
  .cards { grid-template-columns: 1fr; }
  .feature-row {
    grid-template-columns: 1fr; gap: 32px; padding: 48px 0;
  }
  .feature-row.reverse .feature-shot { order: 0; }
  .platform-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .section { padding: 56px 0; }
  .hero { padding: 56px 0 40px; }
}
@media (max-width: 540px) {
  .nav-links { gap: 4px 14px; }
  .nav-links a { font-size: 0.88rem; }
  .footer-cols { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
