/* ============================================================================
   GoTrade1 — shared design system
   ----------------------------------------------------------------------------
   Single source of truth for tokens, base typography and the shared shell
   (nav / footer / buttons / containers). Loaded by every page on the site:
     /              public/index.html
     /buyers/.../   generated by gen_pages.py
     /thanks/       public/thanks/index.html
     /calendar/     public/calendar/ (index, book, manage)

   WHY A SEPARATE FILE
   The homepage used to carry every token inline in its own style block. The SEO
   landing pages then re-declared the same colours with slightly different
   values (#003366 vs #104085 vs #21406F), so a visitor clicking through from
   the blog saw a visibly different brand. Tokens now live here once.

   CHANGING THE BRAND
   Edit the :root block below. Do not re-declare --navy/--accent etc. in a
   page's own style block — that is how the drift started.

   Fonts are self-hosted (see /fonts/inter.css). Do not add a Google Fonts
   link: fonts.googleapis.com is slow or blocked from mainland China, and
   this site's audience includes Chinese exporters.
   ============================================================================ */

/* ===================== Tokens ===================== */
:root {
    --navy-900: #061a33;
    --navy-800: #0b2748;
    --navy: #103f6f;
    --navy-600: #1b5490;
    --navy-soft: #eaf1f9;
    --navy-soft-2: #dce8f5;

    --accent: #0ea896;
    --accent-dark: #0b8779;
    --accent-soft: #e6f7f4;

    --ink: #0f1c2e;
    --ink-2: #35485e;
    --muted: #61748b;
    --muted-2: #8b9aad;

    --surface: #ffffff;
    --surface-2: #f7f9fb;
    --surface-3: #eef2f6;
    --border: #e2e8ef;
    --border-strong: #cdd7e1;

    --gold: #b45309;
    --gold-bg: #fff4e5;
    --danger: #c0392b;
    --ok: #15803d;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 26px;

    --shadow-sm: 0 1px 2px rgba(15, 28, 46, .05), 0 2px 8px rgba(15, 28, 46, .04);
    --shadow-md: 0 4px 12px rgba(15, 28, 46, .07), 0 12px 32px rgba(15, 28, 46, .06);
    --shadow-lg: 0 8px 24px rgba(15, 28, 46, .09), 0 28px 64px rgba(15, 28, 46, .10);
    --shadow-xl: 0 12px 32px rgba(15, 28, 46, .12), 0 40px 90px rgba(15, 28, 46, .16);

    --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
    --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
    --sp-12: 48px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;

    --ease: cubic-bezier(.4, 0, .2, 1);
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --header-h: 68px;
}

/* ===================== Base ===================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
                 'Noto Sans CJK SC', sans-serif;
    line-height: 1.6;
    color: var(--ink);
    background-color: var(--surface);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'tnum';
}
a { color: var(--navy); text-decoration: none; }
::selection { background: var(--navy-soft-2); color: var(--navy-900); }

h1, h2, h3, h4 { color: var(--navy-900); letter-spacing: -.025em; }

/* ===================== Bilingual switching ===================== */
.zh { display: none; }
body.lang-zh .zh { display: inline; }
body.lang-zh .en { display: none; }
body.lang-zh .block-zh { display: block; }
body.lang-zh .block-en { display: none; }
.block-zh { display: none; }
.block-en { display: block; }

/* ===================== Layout ===================== */
.container { max-width: 1180px; margin: 0 auto; padding: 0 var(--sp-6); }
.container-narrow { max-width: 860px; margin: 0 auto; padding: 0 var(--sp-6); }

.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--accent-dark);
    margin-bottom: var(--sp-3);
}
.eyebrow.on-dark { color: #7fe3d6; }

/* ===================== Buttons ===================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.2;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
    text-align: center;
    font-family: inherit;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 6px 18px rgba(14, 168, 150, .22);
}
.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(14, 168, 150, .30);
}
.btn-navy {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}
.btn-navy:hover { background: var(--navy-800); border-color: var(--navy-800); transform: translateY(-2px); }
.btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-secondary:hover { background: rgba(255,255,255,.14); border-color: #fff; transform: translateY(-2px); }
.btn-secondary-dark { background: transparent; color: var(--navy); border-color: var(--border-strong); }
.btn-secondary-dark:hover { background: var(--navy); color: #fff; border-color: var(--navy); transform: translateY(-2px); }

/* ===================== Site nav ===================== */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: var(--sp-6);
    padding: 0 var(--sp-6);
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
}
.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -.02em;
    color: var(--navy-900);
    white-space: nowrap;
}
.site-brand:hover { color: var(--navy); }
.site-brand .brand-mark { width: 28px; height: 28px; display: block; flex: none; }
.site-links {
    display: flex;
    align-items: center;
    gap: var(--sp-6);
    margin-left: auto;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-2);
}
.site-links a { color: var(--ink-2); transition: color .18s var(--ease); }
.site-links a:hover { color: var(--navy); }
.site-nav-right { display: flex; align-items: center; gap: var(--sp-4); }
.site-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 999px;
    background: var(--navy);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--navy);
    transition: background .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.site-cta:hover { background: var(--navy-800); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* Segmented EN/中文 toggle */
.lang-switch {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    gap: 2px;
    background: var(--surface-3);
    border-radius: 999px;
    border: 1px solid var(--border);
}
.lang-toggle {
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: var(--muted);
    padding: 5px 12px;
    border-radius: 999px;
    transition: background .18s var(--ease), color .18s var(--ease);
    user-select: none;
    white-space: nowrap;
}
body.lang-en .lang-toggle[data-lang="en"],
body.lang-zh .lang-toggle[data-lang="zh"] {
    background: var(--surface);
    color: var(--navy);
    box-shadow: var(--shadow-sm);
}
@media (max-width: 900px) { .site-links { display: none; } }
@media (max-width: 560px) { .site-brand span.brand-name { display: none; } }

/* ===================== Site footer ===================== */
.site-footer {
    background: var(--navy-900);
    color: rgba(255,255,255,.55);
    font-size: 14px;
    padding: var(--sp-16) 0 var(--sp-10);
    border-top: 1px solid rgba(255,255,255,.08);
}
.site-footer .footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    gap: var(--sp-10);
    margin-bottom: var(--sp-10);
}
@media (max-width: 860px) { .site-footer .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-8); } }
@media (max-width: 520px) { .site-footer .footer-grid { grid-template-columns: minmax(0, 1fr); } }
.site-footer .footer-brand .brand-lockup {
    display: inline-flex; align-items: center; gap: 10px;
    color: #fff; font-weight: 700; font-size: 16px;
    letter-spacing: -.02em; margin-bottom: var(--sp-3);
}
.site-footer .footer-brand .brand-lockup svg { width: 24px; height: 24px; }
.site-footer .footer-brand p {
    margin: 0; font-size: 13.5px; line-height: 1.7;
    max-width: 320px; color: rgba(255,255,255,.5);
}
.site-footer h4 {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
    margin: 0 0 var(--sp-4);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer li a { color: rgba(255,255,255,.58); font-size: 13.5px; transition: color .18s var(--ease); }
.site-footer li a:hover { color: #fff; }
.site-footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,.09);
    padding-top: var(--sp-5);
    display: flex;
    justify-content: space-between;
    gap: var(--sp-4);
    flex-wrap: wrap;
    font-size: 12.5px;
    color: rgba(255,255,255,.42);
}
.site-footer .footer-bottom a { color: rgba(255,255,255,.58); }
.site-footer .footer-bottom a:hover { color: #fff; }
