/* =========================================================
   Elite Trading Academy — Design tokens
   High-end private-wealth aesthetic: deep charcoal + gold
   ========================================================= */

:root {
  /* --- Base surfaces (logo-matched black + warm shadow) --- */
  --bg: #000000;             /* pure black — matches logo center */
  --bg-2: #080604;           /* warm near-black */
  --bg-3: #0F0B06;           /* card — warm charcoal */
  --bg-4: #17110A;           /* elevated, warm tint */
  --navy: #1A1108;           /* deep bronze-brown band */
  --navy-2: #120B05;

  /* --- Text — warm paper whites --- */
  --ink: #F3E9D4;            /* warm cream, matches logo type */
  --ink-2: #D6C7A7;
  --ink-3: #9A8A70;          /* muted */
  --ink-4: #5E5440;          /* very muted */
  --hair: rgba(231, 183, 83, 0.10);       /* warm hairlines */
  --hair-strong: rgba(231, 183, 83, 0.22);

  /* --- Accent — sampled directly from logo wings --- */
  --accent: #E7B753;         /* logo bright-gold highlight */
  --accent-2: #BA9048;       /* logo mid-gold body */
  --accent-3: #7F4128;       /* logo deep copper shadow */
  --accent-soft: rgba(231, 183, 83, 0.12);
  --accent-glow: rgba(231, 183, 83, 0.35);
  --accent-gradient: linear-gradient(135deg, #7F4128 0%, #BA9048 30%, #E7B753 55%, #D6A347 80%, #7F4128 100%);

  /* --- Market signal colors --- */
  --up: #3FB27F;
  --down: #E2524A;

  /* --- Type --- */
  --ff-serif: "Playfair Display", "Noto Serif TC", ui-serif, Georgia, serif;
  --ff-sans:  "Noto Sans TC", "Inter", ui-sans-serif, system-ui, sans-serif;
  --ff-mono:  "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;

  /* --- Radii + spacing rhythm --- */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-xl: 16px;

  /* --- Shadows --- */
  --shadow-card: 0 1px 0 rgba(255,255,255,0.02) inset, 0 20px 60px rgba(0,0,0,0.45);
  --shadow-lift: 0 30px 80px rgba(0,0,0,0.55), 0 0 0 1px var(--hair);
}

/* Accent palette swaps (Tweaks) */
[data-accent="silver"] {
  --accent: #D9D6CE;
  --accent-2: #B8B4AA;
  --accent-3: #5E5A52;
  --accent-soft: rgba(217, 214, 206, 0.12);
  --accent-glow: rgba(217, 214, 206, 0.35);
}
[data-accent="green"] {
  --accent: #3FB27F;
  --accent-2: #2E8C63;
  --accent-3: #1A5540;
  --accent-soft: rgba(63, 178, 127, 0.12);
  --accent-glow: rgba(63, 178, 127, 0.35);
}

/* =========================================================
   Resets + base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff-sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt" 1, "ss01" 1;
  overflow-x: hidden;
  max-width: 100vw;
}
body {
  min-height: 100vh;
  /* warm radial glow matching logo */
  background:
    radial-gradient(1200px 600px at 50% -100px, rgba(231, 183, 83, 0.06), transparent 70%),
    radial-gradient(800px 400px at 100% 100%, rgba(127, 65, 40, 0.25), transparent 70%),
    var(--bg);
}

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

h1, h2, h3, h4 {
  font-family: var(--ff-serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}
.chinese-heading {
  font-family: var(--ff-sans);
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* Utility */
.container {
  width: min(1280px, 92vw);
  margin-inline: auto;
}
.container-wide {
  width: min(1480px, 95vw);
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--ff-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.hair { height: 1px; background: var(--hair); width: 100%; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid var(--hair-strong);
  border-radius: 2px;
  font-family: var(--ff-sans);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink);
  transition: all 0.25s ease;
  white-space: nowrap;
}
.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-primary {
  background: var(--accent);
  color: #0A0A0F;
  border-color: var(--accent);
  font-weight: 600;
}
.btn-primary:hover {
  background: transparent;
  color: var(--accent);
}
.btn-ghost { border-color: var(--hair); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 9px 14px; font-size: 12px; }

/* =========================================================
   Top nav
   ========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(10, 10, 15, 0.72);
  border-bottom: 1px solid var(--hair);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--ff-serif);
  font-size: 20px;
  letter-spacing: 0.02em;
}
.logo-mark {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #000 url('../assets/logo-circle.jpg') center/cover no-repeat;
  border: 1px solid var(--accent-2);
  display: block;
  position: relative;
  flex-shrink: 0;
  font-size: 0;           /* hide any stray text content */
  color: transparent;
  text-indent: -9999px;
  overflow: hidden;
}
.logo-cn { font-weight: 500; }
.logo-en {
  font-family: var(--ff-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--ink-3);
  margin-top: 2px;
}
.logo-stack { display: flex; flex-direction: column; line-height: 1; }

.nav-links {
  display: flex;
  gap: 38px;
  font-size: 14px;
  color: var(--ink-2);
}
.nav-links a {
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a[aria-current="page"] { color: var(--accent); }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--accent);
}

.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-login {
  font-size: 13px;
  color: var(--ink-2);
  transition: color 0.2s;
}
.nav-login:hover { color: var(--accent); }

/* ===== Topbar partner badge (OKX) ===== */
.partner-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px 7px 14px;
  border: 1px solid var(--hair-strong);
  background: linear-gradient(135deg, rgba(231,183,83,0.04), rgba(127,65,40,0.08));
  font-family: var(--ff-mono);
  margin-left: 6px;
  position: relative;
  transition: border-color 0.25s, background 0.25s;
}
.partner-badge::before {
  content: "";
  position: absolute; top: -1px; left: -1px;
  width: 6px; height: 6px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}
.partner-badge::after {
  content: "";
  position: absolute; bottom: -1px; right: -1px;
  width: 6px; height: 6px;
  border-bottom: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}
.partner-badge:hover {
  border-color: var(--accent-2);
  background: linear-gradient(135deg, rgba(231,183,83,0.08), rgba(127,65,40,0.14));
}
.partner-label {
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
}
.partner-divider {
  width: 1px; height: 14px;
  background: var(--hair-strong);
}
.partner-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
}
.partner-logo b {
  font-family: var(--ff-sans);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--ink);
}
@media (max-width: 1100px) {
  .partner-badge .partner-label { display: none; }
  .partner-badge .partner-divider { display: none; }
}
@media (max-width: 900px) {
  .partner-badge { display: none; }
  .nav-cta .auth-username { display: none; }
  .nav-cta .auth-avatar-mini { display: inline-flex !important; }
  .nav-cta { gap: 6px; }
  .nav-cta .btn-sm { padding: 4px 10px; font-size: 11px; }
  .nav-cta .auth-tier-tag { font-size: 9px; padding: 2px 6px; }
}

/* Ticker tape */
.ticker {
  background: var(--bg-2);
  border-bottom: 1px solid var(--hair);
  overflow: hidden;
  height: 34px;
  display: flex;
  align-items: center;
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--ink-3);
}
.ticker-track {
  display: inline-flex;
  gap: 56px;
  padding-left: 100%;
  white-space: nowrap;
  animation: tick 60s linear infinite;
}
.ticker-item { display: inline-flex; gap: 10px; align-items: center; }
.ticker-sym { color: var(--ink); letter-spacing: 0.08em; }
.ticker-up { color: var(--up); }
.ticker-down { color: var(--down); }
@keyframes tick {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  margin-top: 120px;
  padding-top: 80px;
  border-top: 1px solid var(--hair);
  background: linear-gradient(to bottom, var(--bg), var(--bg-2));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 60px;
}
.footer h4 {
  font-family: var(--ff-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 22px;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer a { color: var(--ink-2); font-size: 14px; transition: color 0.2s; }
.footer a:hover { color: var(--accent); }
.footer-brand p {
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.7;
  margin: 16px 0 0;
  max-width: 320px;
}
.footer-bottom {
  border-top: 1px solid var(--hair);
  padding: 28px 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--ink-4);
  font-family: var(--ff-mono);
}
/* ===== Footer partners row ===== */
.footer-partners {
  padding: 28px 0;
  border-top: 1px solid var(--hair);
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  align-items: center;
}
.fp-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--ink-4);
}
.fp-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.fp-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--hair);
  background: var(--bg-3);
  transition: border-color 0.25s, background 0.25s;
}
.fp-logo:hover {
  border-color: var(--hair-strong);
  background: var(--bg-4);
}
.fp-logo b {
  font-family: var(--ff-sans);
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: 0;
}
.fp-logo span {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.14em;
  margin-left: auto;
}
.fp-okx {
  color: var(--ink);
  border-color: var(--hair-strong);
  background: linear-gradient(135deg, rgba(231,183,83,0.05), rgba(127,65,40,0.1));
}
.fp-okx:hover {
  border-color: var(--accent-2);
}
.fp-ph-mark {
  width: 28px; height: 28px;
  border: 1px solid var(--hair-strong);
  position: relative;
  flex-shrink: 0;
}
.fp-ph-mark::after {
  content: "";
  position: absolute; inset: 6px;
  background: var(--ink-4);
  opacity: 0.3;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
@media (max-width: 900px) {
  .footer-partners { grid-template-columns: 1fr; }
  .fp-row { grid-template-columns: 1fr 1fr; }
}

.footer-risk {
  padding: 20px 0;
  border-top: 1px solid var(--hair);
  font-size: 11px;
  color: var(--ink-4);
  line-height: 1.7;
}
.socials { display: flex; gap: 14px; }
.socials a {
  width: 34px; height: 34px;
  border: 1px solid var(--hair);
  display: grid; place-items: center;
  color: var(--ink-3);
  transition: all 0.2s;
}
.socials a:hover { border-color: var(--accent); color: var(--accent); }

/* =========================================================
   Floating LINE button
   ========================================================= */
.fab-line {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 40;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #06C755;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 40px rgba(6, 199, 85, 0.4);
  transition: transform 0.3s ease;
  cursor: pointer;
}
.fab-line:hover { transform: scale(1.08); }
.fab-line::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid #06C755;
  opacity: 0.5;
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* =========================================================
   Section headers
   ========================================================= */
.section-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 40px;
  margin-bottom: 60px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hair);
}
.section-header .eyebrow { margin-bottom: 20px; }
.section-header h2 {
  font-size: clamp(36px, 5vw, 56px);
  max-width: 780px;
}
.section-header .lede {
  font-size: 16px;
  color: var(--ink-3);
  max-width: 480px;
  line-height: 1.7;
  margin: 0;
  text-align: right;
}

section { padding: 100px 0; position: relative; }

/* =========================================================
   Cards
   ========================================================= */
.card {
  background: var(--bg-3);
  border: 1px solid var(--hair);
  padding: 32px;
  transition: all 0.3s ease;
  position: relative;
}
.card:hover { border-color: var(--hair-strong); }

.tag {
  display: inline-block;
  padding: 4px 10px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--hair-strong);
}
.tag-hot { color: var(--down); border-color: var(--down); }
.tag-new { color: var(--accent); border-color: var(--accent); }
.tag-soon { color: #E0A82E; border-color: #E0A82E; }

/* =========================================================
   Stat rows
   ========================================================= */
.stat-num {
  font-family: var(--ff-serif);
  font-weight: 500;
  color: var(--ink);
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-num .plus, .stat-num .pct, .stat-num .unit {
  color: var(--accent);
  font-size: 0.6em;
  margin-left: 4px;
}
.stat-label {
  font-family: var(--ff-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  margin-top: 12px;
}

/* =========================================================
   Newsletter popup
   ========================================================= */
.newsletter-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.newsletter-backdrop.show { opacity: 1; pointer-events: auto; }
.newsletter-modal {
  background: linear-gradient(145deg, var(--bg-3), var(--bg-4));
  border: 1px solid var(--hair-strong);
  padding: 56px;
  max-width: 540px;
  width: 92vw;
  position: relative;
  box-shadow: var(--shadow-lift);
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
}
.newsletter-backdrop.show .newsletter-modal { transform: translateY(0); }
.newsletter-modal::before {
  content: "";
  position: absolute; inset: 0;
  border: 1px solid var(--accent);
  opacity: 0.15;
  pointer-events: none;
}
.newsletter-close {
  position: absolute;
  top: 18px; right: 18px;
  color: var(--ink-3);
  font-size: 18px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
}
.newsletter-close:hover { color: var(--accent); }

/* =========================================================
   Auth modal (shared)
   ========================================================= */
.auth-backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 10, 15, 0.82);
  backdrop-filter: blur(8px);
  z-index: 90;
  display: none;
  place-items: center;
}
.auth-backdrop.show { display: grid; }
.auth-modal {
  background: linear-gradient(145deg, var(--bg-3), var(--bg-4));
  border: 1px solid var(--hair-strong);
  width: min(440px, 92vw);
  padding: 48px 44px;
  position: relative;
}
.auth-modal h3 {
  font-size: 28px;
  margin-bottom: 8px;
}
.auth-modal .lede { color: var(--ink-3); font-size: 14px; margin-bottom: 32px; }
.auth-field { margin-bottom: 18px; }
.auth-field label {
  display: block;
  font-family: var(--ff-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.auth-field input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hair-strong);
  padding: 10px 0;
  color: var(--ink);
  font-size: 15px;
  font-family: var(--ff-sans);
  transition: border-color 0.2s;
}
.auth-field input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.auth-oauth {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}
.auth-oauth button {
  padding: 12px;
  border: 1px solid var(--hair-strong);
  font-size: 12px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: border-color 0.2s;
}
.auth-oauth button:hover { border-color: var(--accent); color: var(--accent); }
.auth-divider {
  display: flex; align-items: center; gap: 16px;
  color: var(--ink-4);
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  margin: 24px 0;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--hair);
}

/* =========================================================
   Page entry animation
   ========================================================= */
.fade-up {
  animation: fadeUp 0.9s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .section-header { grid-template-columns: 1fr; }
  .section-header .lede { text-align: left; }
}
