/* ============================================================
   萬物城 WanWuCheng — Design System
   Deep navy-black + gold gaming marketplace
   ============================================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=Sora:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700&display=swap');

/* ============================================================
   TOKENS
   ============================================================ */
:root {
  /* Color — surfaces */
  --bg:          #07090F;
  --bg-2:        #0B0F18;
  --surface:     #111826;
  --surface-2:   #16202F;
  --surface-3:   #1C2738;

  /* Color — brand gold */
  --gold:        #F5B720;
  --gold-bright: #FFD24A;
  --gold-deep:   #E0930A;
  --grad-gold:   linear-gradient(135deg, #FFD66B 0%, #F5B720 45%, #E0930A 100%);

  /* Color — accents */
  --green:       #25D366;
  --ruby:        #E5484D;
  --sapphire:    #4C7DF0;

  /* Color — text */
  --text:        #F4EFE2;
  --text-soft:   #C7CCD8;
  --text-dim:    #8B93A4;
  --text-muted:  #5E677A;

  /* Borders / lines */
  --line:         rgba(245,183,32,0.12);
  --line-soft:    rgba(255,255,255,0.07);
  --line-strong:  rgba(245,183,32,0.34);

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Shadows / glow */
  --shadow:      0 18px 50px -22px rgba(0,0,0,0.85);
  --glow-gold:   0 0 0 1px rgba(245,183,32,0.30), 0 18px 48px -16px rgba(245,183,32,0.34);

  /* Spacing scale (8pt) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px;

  /* Layout */
  --container: 1200px;
  --gutter: 24px;
  --nav-h: 76px;

  /* Section rhythm — used by EVERY section for consistent vertical pace */
  --section-y: clamp(72px, 9vw, 128px);

  --ease: cubic-bezier(.22,.61,.36,1);

  /* Type families */
  --f-cn:      "Noto Sans SC", sans-serif;
  --f-display: "Sora", "Noto Sans SC", sans-serif;
  --f-body:    "Manrope", "Noto Sans SC", sans-serif;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient page backdrop: subtle radial gold + tech grid */
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(900px 600px at 14% -6%, rgba(245,183,32,0.10), transparent 60%),
    radial-gradient(820px 620px at 100% 0%, rgba(76,125,240,0.07), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  z-index: -2;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(245,183,32,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,183,32,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(circle at 50% 22%, #000 0%, transparent 72%);
          mask-image: radial-gradient(circle at 50% 22%, #000 0%, transparent 72%);
  z-index: -1;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

::selection { background: var(--gold); color: #1a1206; }

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }
.section + .section { padding-top: 0; } /* sections share rhythm; use inner spacing */

/* Standard section header — used identically everywhere for rhythm */
.sec-head { max-width: 760px; margin-bottom: var(--s-7); }
.sec-head.center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-display);
  font-size: 12px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s-4);
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px;
  background: var(--grad-gold);
}
.sec-head.center .eyebrow { justify-content: center; }

.sec-title {
  font-family: var(--f-cn);
  font-weight: 900;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--text);
}
.sec-title .hl { color: var(--gold); }

.sec-sub {
  margin-top: var(--s-4);
  color: var(--text-dim);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.7;
}

/* ============================================================
   BUTTONS  (one system everywhere)
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  font-family: var(--f-display);
  font-weight: 700; font-size: 15px;
  line-height: 1;
  padding: 15px 26px;
  border-radius: var(--r-pill);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background .25s var(--ease), border-color .25s var(--ease), color .2s;
  white-space: nowrap;
  cursor: pointer;
}
.btn svg { width: 18px; height: 18px; }

.btn-gold {
  background: var(--grad-gold);
  color: #1a1206;
  box-shadow: 0 12px 30px -12px rgba(245,183,32,0.6);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(245,183,32,0.75); }

.btn-ghost {
  background: rgba(255,255,255,0.02);
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--gold); background: rgba(245,183,32,0.07); }

.btn-wa {
  background: rgba(37,211,102,0.08);
  color: #b8f5cf;
  border: 1px solid rgba(37,211,102,0.4);
}
.btn-wa:hover { transform: translateY(-2px); background: rgba(37,211,102,0.16); border-color: var(--green); }

.btn-sm { padding: 11px 18px; font-size: 13.5px; }
.btn-lg { padding: 17px 32px; font-size: 16px; }

/* link with arrow */
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-display); font-weight: 600; font-size: 14px;
  color: var(--gold);
  transition: gap .2s var(--ease);
}
.link-arrow:hover { gap: 11px; }

/* ============================================================
   CARDS  (one base everywhere)
   ============================================================ */
.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  position: relative;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.card-hover:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow), 0 0 34px -18px rgba(245,183,32,0.5);
}

/* small gold pill chip */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--f-display); font-weight: 600;
  font-size: 12.5px; letter-spacing: .02em;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(245,183,32,0.05);
  color: var(--text-soft);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* "Hot" tag */
.tag-hot {
  font-family: var(--f-display); font-weight: 800; font-size: 10.5px;
  letter-spacing: .12em; text-transform: uppercase;
  color: #1a1206; background: var(--grad-gold);
  padding: 4px 9px; border-radius: var(--r-pill);
}

/* ============================================================
   NAV  (injected by chrome.js)
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8,11,17,0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
}
.nav .container { display: flex; align-items: center; gap: var(--s-6); }

.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  overflow: hidden; flex: none;
  box-shadow: 0 0 22px -6px rgba(245,183,32,0.55);
}
.brand .mark img { width: 100%; height: 100%; object-fit: cover; }
.brand .name { font-family: var(--f-cn); font-weight: 900; font-size: 19px; letter-spacing: .04em; line-height: 1; }
.brand .name small {
  display: block; font-family: var(--f-display); font-weight: 600;
  font-size: 9.5px; letter-spacing: .35em; color: var(--gold);
  margin-top: 3px;
}

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: var(--s-4); }
.nav-links a {
  font-family: var(--f-body); font-weight: 600; font-size: 14.5px;
  color: var(--text-soft);
  padding: 9px 14px; border-radius: var(--r-pill);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-links a.active { color: var(--gold); }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav-right .login {
  font-family: var(--f-body); font-weight: 600; font-size: 14.5px; color: var(--text-soft);
  padding: 9px 6px; transition: color .2s;
}
.nav-right .login:hover { color: var(--gold); }

.nav-burger { display: none; width: 44px; height: 44px; border-radius: var(--r-md);
  border: 1px solid var(--line-soft); align-items: center; justify-content: center; }
.nav-burger span { display: block; width: 18px; height: 2px; background: var(--text); position: relative; }
.nav-burger span::before, .nav-burger span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--text); }
.nav-burger span::before { top: -6px; } .nav-burger span::after { top: 6px; }

/* mobile drawer */
.mobile-menu {
  position: fixed; inset: 0; z-index: 99;
  background: rgba(6,8,13,0.96); backdrop-filter: blur(8px);
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  padding: 0 var(--gutter);
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a {
  font-family: var(--f-cn); font-weight: 700; font-size: 26px;
  padding: 12px 0; border-bottom: 1px solid var(--line-soft);
  color: var(--text);
}
.mobile-menu a:active { color: var(--gold); }
.mobile-menu .m-cta { margin-top: 22px; }

/* ============================================================
   FLOATING WHATSAPP
   ============================================================ */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  display: flex; align-items: center; gap: 10px;
  background: var(--green); color: #053d1c;
  font-family: var(--f-display); font-weight: 700; font-size: 14px;
  padding: 13px 18px; border-radius: var(--r-pill);
  box-shadow: 0 14px 34px -10px rgba(37,211,102,0.6);
  transition: transform .25s var(--ease);
}
.wa-float:hover { transform: translateY(-3px) scale(1.03); }
.wa-float svg { width: 20px; height: 20px; }

/* ============================================================
   FOOTER  (injected by chrome.js)
   ============================================================ */
.footer { border-top: 1px solid var(--line-soft); padding-block: var(--s-8) var(--s-6); margin-top: var(--section-y); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--s-7); }
.footer .brand { margin-bottom: var(--s-4); }
.footer-blurb { color: var(--text-dim); font-size: 14px; max-width: 320px; line-height: 1.7; }
.footer-col h4 {
  font-family: var(--f-display); font-weight: 700; font-size: 12px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim);
  margin-bottom: var(--s-4);
}
.footer-col a { display: block; color: var(--text-soft); font-size: 14.5px; padding: 6px 0; transition: color .2s; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  color: var(--text-muted); font-size: 13px; flex-wrap: wrap;
}
.footer-socials { display: flex; gap: 10px; }
.footer-socials a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: center;
  color: var(--text-soft); transition: all .2s var(--ease);
}
.footer-socials a:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.footer-socials svg { width: 17px; height: 17px; }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 940px) {
  .nav-links, .nav-right .login, .nav-right .btn { display: none; }
  .nav-burger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-6); }
}
@media (max-width: 560px) {
  :root { --gutter: 18px; }
  .footer-grid { grid-template-columns: 1fr; }
  .wa-float span { display: none; }
  .wa-float { padding: 14px; }
}
