/* AsiaBull Algo — algo platform site. Same tokens as the company site (asiabullalgo/styles.css); change colours in :root only. */

:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --border: #dde4ee;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #64748b;
  --accent: #0369a1;
  --accent-2: #0ea5e9;
  --accent-ink: #ffffff;
  --good: #047857;
  --glow: rgba(14, 165, 233, 0.16);
  --radius: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070c18;
    --surface: #0d1526;
    --surface-2: #111c31;
    --border: #1e2a40;
    --text: #e8eef8;
    --text-2: #a9b6ca;
    --muted: #7d8aa0;
    --accent: #38bdf8;
    --accent-2: #7dd3fc;
    --accent-ink: #04111f;
    --good: #34d399;
    --glow: rgba(56, 189, 248, 0.14);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---- header ---- */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.brand span b { color: var(--accent); }
.nav { display: flex; gap: 22px; font-size: 14px; }
.nav a { color: var(--text-2); }
@media (max-width: 640px) { .nav { display: none; } }

/* ---- hero ---- */
.hero { position: relative; overflow: hidden; padding: 88px 0 72px; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 520px;
  background: radial-gradient(closest-side, var(--glow), transparent 70%); pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding-top: 56px; } }

.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: 13px; font-weight: 600;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 22%, transparent); }

h1 { font-size: clamp(34px, 5.2vw, 56px); line-height: 1.08; letter-spacing: -0.02em; margin: 18px 0 16px; }
h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: 18px; color: var(--text-2); max-width: 560px; margin: 0 0 28px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border-radius: 12px; font-weight: 600; font-size: 15px; border: 1px solid var(--border); color: var(--text); background: var(--surface);
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.note { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* hero illustration: a small market chart drawn in SVG */
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: 0 24px 60px -30px rgba(2, 8, 23, 0.45); }
.chart-card .head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.chart-card .head b { color: var(--text); font-size: 15px; }
.chart-card .up { color: var(--good); font-weight: 700; }
.chart-card svg { display: block; width: 100%; height: auto; margin-top: 10px; }
.chart-card .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chart-card .tags span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }

/* ---- sections ---- */
section { padding: 64px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 12px; }
.sub { color: var(--text-2); max-width: 640px; margin: 0 0 32px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 880px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
section:not(.alt) .card { background: var(--surface); }
.card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); margin-bottom: 16px; }
.card h3 { margin: 0 0 6px; font-size: 19px; }
.card p { margin: 0 0 16px; color: var(--text-2); font-size: 15px; flex: 1; }
.card ul { margin: 0 0 18px; padding-left: 18px; color: var(--text-2); font-size: 14px; }
.card .status { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.card .link { margin-top: 6px; font-weight: 600; font-size: 14px; }

.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 880px) { .values { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .values { grid-template-columns: 1fr; } }
.value b { display: block; font-size: 16px; margin-bottom: 4px; }
.value span { color: var(--text-2); font-size: 14px; }

.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } }
.contact-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.contact-box dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 15px; }
.contact-box dt { color: var(--muted); }
.contact-box dd { margin: 0; }

/* ---- footer ---- */
footer { border-top: 1px solid var(--border); padding: 32px 0 40px; font-size: 13px; color: var(--muted); }
footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
footer .links { display: flex; gap: 18px; flex-wrap: wrap; }
footer .disclaimer { max-width: 900px; line-height: 1.6; }

@media (prefers-reduced-motion: no-preference) {
  .chart-line { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 2.4s ease-out 0.2s forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}

/* ---- algo site: how it will work ---- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
@media (max-width: 880px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.steps li { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 20px 20px; counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px; margin-bottom: 12px;
}
.steps b { display: block; font-size: 16px; margin-bottom: 4px; }
.steps span { color: var(--text-2); font-size: 14px; }

.terminal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.9; box-shadow: 0 24px 60px -30px rgba(2, 8, 23, 0.45); }
.terminal .bar { display: flex; gap: 6px; margin-bottom: 10px; }
.terminal .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); display: block; }
.terminal .t { color: var(--muted); }
.terminal .ok { color: var(--good); font-weight: 700; }
.terminal .acc { color: var(--accent); font-weight: 700; }
