/* =========================================================================
   Listing Toolkit Pro — site.css
   Static marketing site design system. No external fonts, no CDN, no tracking.
   ========================================================================= */

/* --- Design tokens -------------------------------------------------------- */
:root {
  /* Palette */
  --navy-950: #06182f;
  --navy-900: #0b2140;
  --navy-800: #123057;
  --navy-700: #1a3f70;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --sky-400: #38bdf8;
  --cyan-400: #22d3ee;
  --cyan-300: #67e8f9;

  --ink: #10243f;
  --ink-soft: #425774;
  --ink-muted: #6a7d99;

  --bg: #f5f7fb;
  --surface: #ffffff;
  --border: #e6ebf3;
  --border-strong: #d7dfec;

  /* Shape / elevation */
  --radius: 14px;
  --radius-lg: 18px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(13, 32, 64, 0.05);
  --shadow-md: 0 8px 24px rgba(13, 32, 64, 0.08);
  --shadow-lg: 0 20px 48px rgba(13, 32, 64, 0.13);

  /* Gradients */
  --grad: linear-gradient(135deg, #2563eb 0%, #22d3ee 100%);
  --grad-text: linear-gradient(120deg, #38bdf8 0%, #67e8f9 100%);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --maxw: 1160px;
  --header-h: 66px;
}

/* --- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.18; color: var(--navy-900); margin: 0 0 0.4em; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.3em; }
button { font-family: inherit; cursor: pointer; }

/* --- i18n: English default, Chinese toggled via <html lang="zh"> ---------- */
.zh { display: none; }
html[lang="zh"] .en { display: none; }
html[lang="zh"] .zh { display: revert; }

/* --- Layout -------------------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section.section--intro { padding: 48px 0 0; }
.section.section--intro .section-head { margin-bottom: 0; }
.section--alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); letter-spacing: -0.02em; }
.section-head p { font-size: 1.08rem; color: var(--ink-soft); margin: 0; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--blue-600);
  margin-bottom: 12px;
}
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* --- Skip link (a11y) ---------------------------------------------------- */
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--navy-900); color: #fff; padding: 10px 16px;
  border-radius: 0 0 8px 8px; transition: top 0.15s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; font-weight: 600; font-size: 0.95rem;
  line-height: 1; border: 1px solid transparent; transition: transform 0.12s ease,
  box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28); }
.btn--primary:hover { color: #fff; box-shadow: 0 10px 26px rgba(37, 99, 235, 0.36); }
.btn--ghost { background: transparent; color: var(--navy-900); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--blue-500); color: var(--blue-700); }
.btn--on-dark { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.btn--on-dark:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.btn--solid-light { background: #fff; color: var(--navy-900); }
.btn--sm { padding: 8px 14px; font-size: 0.85rem; }
.btn--lg { padding: 14px 26px; font-size: 1.02rem; border-radius: 12px; }

/* --- Header -------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; height: 100%; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy-900); font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.brand .brand-name { white-space: nowrap; }
.brand .brand-name small { display: block; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.06em; color: var(--ink-muted); text-transform: uppercase; }

.nav-menu { display: flex; align-items: center; gap: 2px; margin-left: 6px; }
.nav-menu a {
  color: var(--ink-soft); font-size: 0.94rem; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; transition: color 0.12s ease, background 0.12s ease;
}
.nav-menu a:hover { color: var(--navy-900); background: var(--bg); text-decoration: none; }
.nav-menu a.is-active { color: var(--blue-700); background: rgba(37, 99, 235, 0.08); font-weight: 600; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.lang-switch { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 9px; overflow: hidden; }
.lang-switch button {
  border: 0; background: transparent; color: var(--ink-muted);
  font-size: 0.82rem; font-weight: 600; padding: 6px 11px;
}
.lang-switch button.is-active { background: var(--navy-900); color: #fff; }

.nav-toggle {
  display: none; border: 1px solid var(--border-strong); background: transparent;
  width: 40px; height: 40px; border-radius: 9px; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.site-header.is-open .nav-toggle .icon-open { display: none; }
.site-header.is-open .nav-toggle .icon-close { display: block; }

/* --- Hero ---------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 460px at 12% -8%, rgba(37, 99, 235, 0.55), transparent 60%),
    radial-gradient(760px 420px at 100% 0%, rgba(34, 211, 238, 0.28), transparent 55%),
    linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 45%, var(--navy-800) 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, #000 40%, transparent 100%);
}
.hero .container { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; padding-top: 76px; padding-bottom: 88px; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -0.025em; margin-bottom: 18px; }
.hero .lede { color: rgba(255, 255, 255, 0.82); font-size: 1.13rem; max-width: 34em; margin-bottom: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.hero-note { color: rgba(255, 255, 255, 0.55); font-size: 0.86rem; }

/* --- Dashboard mockup card (pure HTML/CSS, fictional data) --------------- */
.mockup {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.mockup-bar { display: flex; align-items: center; gap: 8px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.mockup-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.3); }
.mockup-dot:nth-child(1) { background: #f87171; }
.mockup-dot:nth-child(2) { background: #fbbf24; }
.mockup-dot:nth-child(3) { background: #34d399; }
.mockup-title { margin-left: 6px; color: rgba(255, 255, 255, 0.6); font-size: 0.78rem; font-weight: 600; }
.mockup-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 14px 16px; }
.kpi .kpi-label { color: rgba(255, 255, 255, 0.55); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.kpi .kpi-value { color: #fff; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; margin-top: 2px; }
.kpi .kpi-sub { font-size: 0.72rem; color: rgba(255, 255, 255, 0.55); margin-top: 2px; }
.kpi .chip { display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.chip--ok { background: rgba(52, 211, 153, 0.18); color: #6ee7b7; }
.chip--warn { background: rgba(251, 191, 36, 0.18); color: #fcd34d; }
.mockup-rows { display: grid; gap: 8px; }
.mockup-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 10px; }
.mockup-row .mr-name { color: rgba(255, 255, 255, 0.85); font-size: 0.85rem; font-weight: 600; }
.mockup-row .mr-val { color: #fff; font-size: 0.85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.mockup-row .mr-muted { color: rgba(255, 255, 255, 0.5); font-size: 0.78rem; }
.mockup-faint { color: rgba(255, 255, 255, 0.35); font-size: 0.72rem; margin-top: 12px; text-align: center; }

/* --- Cards --------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-strong); }
.card .icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(34, 211, 238, 0.1));
  color: var(--blue-600); margin-bottom: 16px;
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.card h2 { font-size: 1.12rem; margin-bottom: 16px; }
.card p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }
.card--link { display: block; color: inherit; }
.card--link:hover { text-decoration: none; }

.principle { border-left: 3px solid transparent; }
.principle:nth-child(1) { border-left-color: #3b82f6; }
.principle:nth-child(2) { border-left-color: #22d3ee; }
.principle:nth-child(3) { border-left-color: #6366f1; }
.principle:nth-child(4) { border-left-color: #10b981; }

/* --- Feature list (features page) --------------------------------------- */
.feature-block { padding: 34px 0; border-bottom: 1px solid var(--border); }
.feature-block:last-child { border-bottom: 0; }
.feature-block .fb-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 12px; }
.feature-block .icon { flex: 0 0 auto; }
.feature-block h2 { margin: 0; }
.feature-block .fb-desc { color: var(--ink-soft); max-width: 62em; margin-bottom: 14px; }
.fb-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.fb-points li { position: relative; padding-left: 26px; color: var(--ink); }
.fb-points li::before {
  content: ""; position: absolute; left: 0; top: 0.55em; width: 9px; height: 9px;
  border-radius: 3px; background: var(--grad);
}

/* --- Callout / notice ---------------------------------------------------- */
.notice {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; background: var(--surface);
}
.notice--info { border-left: 3px solid var(--blue-500); }
.notice--amber { border-left: 3px solid #f59e0b; background: #fffaf0; }
.notice--green { border-left: 3px solid #10b981; background: #f0fdf7; }
.notice strong { display: block; margin-bottom: 4px; }

/* --- Legal / prose ------------------------------------------------------- */
.prose { max-width: 780px; margin: 0 auto; }
.prose h2 { font-size: 1.5rem; margin-top: 2em; padding-top: 0.4em; }
.prose h3 { font-size: 1.12rem; margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink-soft); }
.prose .updated { color: var(--ink-muted); font-size: 0.9rem; margin-bottom: 2em; }
.prose .toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 2em; }
.prose .toc ol { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 32px; }
.prose .toc a { color: var(--ink-soft); }
.prose .toc li { margin-bottom: 6px; break-inside: avoid; }

/* --- Contact ------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-soft); }
.contact-list .cl-label { font-weight: 700; color: var(--navy-900); min-width: 130px; }
.contact-cta { margin-top: 20px; }

/* --- Footer -------------------------------------------------------------- */
.site-footer { background: var(--navy-950); color: rgba(255, 255, 255, 0.72); padding: 64px 0 40px; font-size: 0.92rem; }
.site-footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-brand .brand { color: #fff; margin-bottom: 12px; }
.footer-brand p { color: rgba(255, 255, 255, 0.55); max-width: 30em; margin-bottom: 6px; }
.site-footer h3 { color: #fff; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer-links a { color: rgba(255, 255, 255, 0.72); }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 44px; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: rgba(255, 255, 255, 0.45); font-size: 0.84rem; }
.footer-disclaimer { max-width: 60em; color: rgba(255, 255, 255, 0.45); font-size: 0.82rem; margin-top: 6px; }

/* --- Misc ----------------------------------------------------------------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--ink-muted); }
.small { font-size: 0.86rem; }
.text-balance { text-wrap: balance; }

/* --- Check lists (Amazon Integration) ------------------------------------ */
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.check-list li {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 15px 16px;
  color: var(--ink); font-weight: 500; box-shadow: var(--shadow-sm);
}
.check-list .icon { width: 32px; height: 32px; border-radius: 9px; margin: 0; flex: 0 0 auto; }
.check-list .icon svg { width: 17px; height: 17px; }

/* --- Notices -------------------------------------------------------------- */
.notice p:last-child { margin-bottom: 0; }

/* --- 404 ------------------------------------------------------------------ */
.error-code { font-size: clamp(4rem, 16vw, 8rem); font-weight: 800; letter-spacing: -0.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.error-page { min-height: 62vh; display: grid; place-items: center; }
.error-page .error-message { max-width: 34em; margin: 0 auto 24px; }

/* --- Accessibility -------------------------------------------------------- */
[id] { scroll-margin-top: calc(var(--header-h) + 20px); }
:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 980px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 10px 16px 16px;
    background: #fff; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .site-header.is-open .nav-menu { display: flex; }
  .nav-menu a { padding: 12px 10px; border-radius: 8px; font-size: 1rem; }
  .header-actions .btn--primary { display: none; } /* keep header clean on mobile */
  .header-actions .btn--primary-mobile { display: inline-flex; }
  .hero .container { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 64px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .site-footer .container { grid-template-columns: 1fr 1fr; }
  .prose .toc ol { columns: 1; }
}
@media (max-width: 640px) {
  .section { padding: 52px 0; }
  .container { padding: 0 18px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .hero .lede { font-size: 1.03rem; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .mockup-kpis { grid-template-columns: 1fr; }
  .site-footer .container { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; }
  .lang-switch button { padding: 6px 9px; }
}

/* Prevent horizontal scroll */
html, body { overflow-x: hidden; }
