/* ========================================================================
   WUZIQI — Gomoku · Marketing Site Stylesheet
   Extends the design system from /league/assets/styles.css
   Tokens map 1:1 to the app's ThemeTokens (mistWhite / iceFog / breezeBlue
   / roseAsh / citrusGold / nightMist / nightFog).
   ======================================================================== */

:root {
  color-scheme: light;
  --mist-white: #F0EEE9;
  --ice-fog: #D3E4F1;
  --breeze-blue: #B7D1EA;
  --rose-ash: #B5ACAB;
  --citrus-gold: #E3CC81;
  --night-mist: #1A1E23;
  --night-fog: #283742;
  --text-main: #1A1E23;
  --text-muted: #4B5A64;
  --glass-light: rgba(240, 238, 233, 0.68);
  --glass-strong: rgba(240, 238, 233, 0.82);
  --glass-nav: rgba(240, 238, 233, 0.48);
  --glass-border: rgba(181, 172, 171, 0.45);
  --shadow-soft: 0 20px 60px rgba(26, 30, 35, 0.12);
  --shadow-tight: 0 12px 30px rgba(26, 30, 35, 0.14);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-pill: 999px;
  --content-max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --text-main: #F4F7FA;
    --text-muted: #C2CBD3;
    --glass-light: rgba(26, 30, 35, 0.62);
    --glass-strong: rgba(26, 30, 35, 0.82);
    --glass-nav: rgba(26, 30, 35, 0.52);
    --glass-border: rgba(183, 209, 234, 0.18);
    --shadow-soft: 0 22px 70px rgba(6, 8, 10, 0.5);
    --shadow-tight: 0 14px 34px rgba(6, 8, 10, 0.5);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Helvetica Neue", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background: linear-gradient(150deg, var(--mist-white) 8%, var(--ice-fog) 50%, rgba(183, 209, 234, 0.32) 100%);
  position: relative;
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(227, 204, 129, 0.18), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(183, 209, 234, 0.3), transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(181, 172, 171, 0.22), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: 0;
}

@media (prefers-color-scheme: dark) {
  body {
    background:
      radial-gradient(circle at 20% 20%, rgba(40, 55, 66, 0.9), transparent 55%),
      radial-gradient(circle at 85% 0%, rgba(183, 209, 234, 0.16), transparent 45%),
      linear-gradient(160deg, var(--night-mist) 0%, var(--night-fog) 100%);
  }
}

main, header, footer { position: relative; z-index: 1; }

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

a { color: inherit; text-decoration: none; }

.container {
  width: min(100% - 32px, var(--content-max));
  margin: 0 auto;
}

/* ---- Glass surfaces ---- */
.glass {
  background: var(--glass-light);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
}

.glass-strong {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-tight);
  backdrop-filter: blur(28px) saturate(1.25);
  -webkit-backdrop-filter: blur(28px) saturate(1.25);
}

/* ---- Top bar ---- */
.topbar {
  position: sticky;
  top: 0;
  width: 100%;
  padding: 16px 0;
  z-index: 10;
  background-color: var(--glass-nav);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(28px) saturate(1.3);
  -webkit-backdrop-filter: blur(28px) saturate(1.3);
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 14px; }

/* App icon logo in header/footer.
   img.brand-mark is the production form (real app icon).
   span.brand-mark is a legacy fallback for places without the PNG. */
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(26, 30, 35, 0.12),
              inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

img.brand-mark {
  display: block;
  object-fit: cover;
  background: linear-gradient(135deg, var(--mist-white), var(--ice-fog));
}

span.brand-mark {
  /* legacy text mark — kept so old references don't visually break */
  border: 1px solid rgba(181, 172, 171, 0.4);
  background:
    radial-gradient(circle at 30% 30%, rgba(227, 204, 129, 0.75), rgba(227, 204, 129, 0.15) 60%),
    linear-gradient(135deg, var(--mist-white), var(--ice-fog));
  display: grid;
  place-items: center;
  font-family: "Marcellus", serif;
  font-size: 1.2rem;
  color: var(--night-mist);
}

.brand-title {
  font-family: "Marcellus", "Times New Roman", serif;
  font-size: 1.1rem;
  letter-spacing: 0.4px;
}

.brand-subtitle { font-size: 0.82rem; color: var(--text-muted); }

.nav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.nav a {
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  transition: border 0.2s ease, background 0.2s ease, transform 0.2s ease;
  font-size: 0.92rem;
}

.nav a:hover, .nav a:focus-visible {
  border-color: var(--glass-border);
  background: rgba(183, 209, 234, 0.14);
  transform: translateY(-1px);
}

.nav a.active {
  border-color: rgba(227, 204, 129, 0.6);
  background: rgba(227, 204, 129, 0.18);
}

.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: rgba(183, 209, 234, 0.1);
  margin-left: 8px;
}

.lang-switch a {
  padding: 5px 10px;
  font-size: 0.8rem;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
}

.lang-switch a.current {
  background: var(--glass-strong);
  color: var(--text-main);
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: "Marcellus", "Times New Roman", "PingFang SC", serif;
  font-weight: 400;
  margin: 0 0 14px;
  letter-spacing: 0.2px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2.4px;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* ---- Hero ---- */
.hero { padding: 64px 0 28px; }

.hero-card {
  border-radius: var(--radius-xl);
  padding: 44px 48px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 36px;
  align-items: center;
}

.hero h1 { font-size: clamp(2.2rem, 3.6vw, 3.2rem); line-height: 1.15; }

.hero .lede {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 22px;
}

.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(227, 204, 129, 0.7);
  background: rgba(227, 204, 129, 0.35);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: var(--text-main);
}

.cta:hover, .cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(227, 204, 129, 0.35);
}

.cta.ghost {
  background: transparent;
  border-color: var(--glass-border);
}

.cta.ghost:hover { box-shadow: 0 10px 20px rgba(26, 30, 35, 0.12); }

/* Hero visual — a mini Gomoku board */
.board-preview {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--mist-white), var(--ice-fog));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  padding: 18px;
  position: relative;
  max-width: 380px;
  margin-left: auto;
}

.board-grid {
  width: 100%; height: 100%;
  background-image:
    linear-gradient(rgba(181, 172, 171, 0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(181, 172, 171, 0.55) 1px, transparent 1px);
  background-size: calc(100% / 14) calc(100% / 14);
  border: 1px solid rgba(181, 172, 171, 0.55);
  position: relative;
}

.stone {
  position: absolute;
  width: 6.2%; height: 6.2%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 3px 6px rgba(26, 30, 35, 0.28);
}

.stone.black { background: radial-gradient(circle at 32% 30%, #4a5763, #121418 70%); }
.stone.white { background: radial-gradient(circle at 32% 30%, #ffffff, #dfe6ec 70%); }
.stone.win { box-shadow: 0 0 0 2px rgba(227, 204, 129, 0.9), 0 3px 8px rgba(227, 204, 129, 0.45); }

/* ---- Sections ---- */
section { padding: 44px 0; position: relative; z-index: 1; }

.section-head { max-width: 720px; margin: 0 auto 28px; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 2.4vw, 2rem); }
.section-head p { color: var(--text-muted); margin: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.card {
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card h3 { font-size: 1.2rem; margin: 0; }
.card p { color: var(--text-muted); margin: 0; }

.card .icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(183, 209, 234, 0.3);
  display: grid; place-items: center;
  color: var(--night-fog);
  font-family: "Marcellus", serif;
}

/* ---- Answer block (GEO citable paragraphs) ---- */
.answer-block {
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  margin: 20px 0;
  border-left: 3px solid var(--citrus-gold);
}

.answer-block h3 { font-size: 1.1rem; margin-bottom: 10px; }
.answer-block p { margin: 0 0 10px; color: var(--text-main); }
.answer-block p:last-child { margin-bottom: 0; }

/* ---- Feature rows ---- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 28px 0;
}

.feature-row.reverse { grid-template-columns: 1fr 1fr; direction: rtl; }
.feature-row.reverse > * { direction: ltr; }

.feature-copy h2 { font-size: 1.6rem; }
.feature-copy p { color: var(--text-muted); }

.feature-visual {
  border-radius: var(--radius-lg);
  padding: 28px;
  min-height: 260px;
  display: grid;
  place-items: center;
  font-family: "Marcellus", serif;
  color: var(--text-muted);
  text-align: center;
  background: linear-gradient(145deg, rgba(183, 209, 234, 0.3), rgba(227, 204, 129, 0.14));
  border: 1px solid var(--glass-border);
}

/* ---- Tables ---- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  font-size: 0.95rem;
}

th, td {
  border: 1px solid rgba(181, 172, 171, 0.35);
  padding: 10px 12px;
  text-align: left;
}

th { background: rgba(183, 209, 234, 0.18); font-weight: 600; font-family: inherit; }

/* ---- Theme swatches ---- */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.theme-card {
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--glass-light);
}

.theme-swatch {
  height: 120px;
  display: grid; place-items: center;
  font-family: "Marcellus", serif;
  color: var(--night-mist);
  font-size: 1.1rem;
  border-bottom: 1px solid var(--glass-border);
}

.theme-card-body { padding: 16px 18px; }
.theme-card-body h4 { margin: 0 0 6px; font-size: 1rem; }
.theme-card-body p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

/* ---- FAQ ---- */
details.faq {
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--glass-light);
  padding: 14px 18px;
  margin-bottom: 10px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

details.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

details.faq summary::after {
  content: "+";
  font-family: "Marcellus", serif;
  font-size: 1.2rem;
  color: var(--citrus-gold);
}

details.faq[open] summary::after { content: "−"; }

details.faq p { color: var(--text-muted); margin: 12px 0 0; }

/* ---- Footer ---- */
.footer {
  padding: 40px 0 48px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 24px;
  border-top: 1px solid var(--glass-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 22px;
}

.footer-grid h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-grid a:hover { color: var(--text-main); }

.footer-bottom {
  padding-top: 18px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(181, 172, 171, 0.4);
  background: rgba(183, 209, 234, 0.12);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---- Utility ---- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-xl { margin-top: 40px; }
.prose p { color: var(--text-main); line-height: 1.7; margin: 0 0 14px; }
.prose ul, .prose ol { color: var(--text-main); line-height: 1.7; padding-left: 22px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

.divider {
  height: 1px;
  background: var(--glass-border);
  margin: 40px 0;
  border: none;
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .hero-card { grid-template-columns: 1fr; padding: 32px 28px; }
  .board-preview { max-width: 320px; margin: 10px auto 0; }
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; direction: ltr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .topbar .container { flex-direction: column; align-items: flex-start; gap: 12px; }
  .nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
  .nav a { flex: 0 0 auto; font-size: 0.88rem; }
  .hero-card { padding: 28px 22px; }
  .feature-visual { min-height: 200px; }
  .footer-grid { grid-template-columns: 1fr; }
  th, td { padding: 8px 10px; font-size: 0.88rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ===== Appended from league/styles.css: legal pages (privacy/terms) ===== */
.legal-content {
  padding-bottom: 60px;
}
.content-panel {
  border-radius: var(--radius-xl);
  padding: 34px 40px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.content-panel h2 {
  margin-top: 26px;
}
.content-panel h3 {
  margin-top: 18px;
}
.content-panel p,
.content-panel li {
  color: var(--text-main);
  line-height: 1.6;
}
.content-panel p strong {
  font-weight: 600;
}
.content-panel ul {
  padding-left: 20px;
}
.content-panel table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 0.95rem;
}
.content-panel th,
.content-panel td {
  border: 1px solid rgba(181, 172, 171, 0.35);
  padding: 10px 12px;
  text-align: left;
}
.content-panel th {
  background: rgba(183, 209, 234, 0.18);
  font-weight: 600;
}
.content-panel a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.contact-card {
  margin-top: 28px;
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
