/* TradingZone TLS — landing page */
:root {
  --bg: #121212;
  --bg-alt: #171719;
  --surface: #1e1e21;
  --surface-2: #26262a;
  --line: rgba(255, 255, 255, .09);
  --text: #f4f4f5;
  --muted: #a8a8b3;
  --red: #d91f26;
  --red-hover: #ef2f36;
  --red-text: #ff5a60;
  --ok: #34d399;
  --radius: 16px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .35);
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.7rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--red-text); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.wrap--narrow { width: min(820px, 100% - 32px); }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: #000; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico--lg { width: 30px; height: 30px; color: var(--red-text); }
.muted { color: var(--muted); }
.accent { color: var(--red-text); }
.fine { color: var(--muted); font-size: .85rem; margin-top: 20px; max-width: 70ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent;
  font: 600 .95rem/1 var(--font); cursor: pointer; transition: background .2s, transform .15s, border-color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 6px 24px rgba(217, 31, 38, .35); }
.btn--primary:hover { background: var(--red-hover); }
.btn--ghost { background: transparent; border-color: rgba(255, 255, 255, .22); color: var(--text); }
.btn--ghost:hover { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .4); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: .88rem; }
.btn--lg { min-height: 54px; padding: 0 28px; font-size: 1rem; }
.btn--icon { padding: 0; width: 46px; }
.btn[data-pending] { opacity: .75; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); background: rgba(18, 18, 18, .8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.is-scrolled { border-color: var(--line); }
.nav__inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand__logo { width: 40px; height: 40px; border-radius: 10px; }
.brand__name b { color: var(--red-text); }
.nav__links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav__links a:not(.btn) { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: .92rem; transition: color .2s, background .2s; }
.nav__links a:not(.btn):hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav__cta-mobile { display: none; }
.nav__toggle { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; align-items: center; justify-content: center; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 8vw, 96px) 0 clamp(48px, 7vw, 88px); }
.hero__bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 380px at 82% 10%, rgba(217, 31, 38, .28), transparent 70%),
    radial-gradient(500px 320px at 5% 90%, rgba(217, 31, 38, .12), transparent 70%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent);
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--red-text); font-weight: 600; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(52, 211, 153, .18); }
.lead { margin-top: 20px; color: #d0d0d8; font-size: clamp(1rem, 1.6vw, 1.15rem); max-width: 56ch; }
.lead strong { color: #fff; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 28px; color: var(--muted); font-size: .9rem; }
.chips li { display: inline-flex; align-items: center; gap: 8px; }
.chips .ico { color: var(--ok); width: 18px; height: 18px; }
.stats { display: flex; gap: 32px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.stats[hidden] { display: none; }
.stats b { display: block; font-size: 1.5rem; }
.stats span { color: var(--muted); font-size: .85rem; }

.hero__visual { position: relative; padding: 24px 0; }
.card { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); }
.rebate-card { padding: 22px; box-shadow: var(--shadow); }
.rebate-card__head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .9rem; }
.rebate-card__amount { margin: 8px 0 2px; font-size: 2.6rem; font-weight: 800; color: var(--ok); letter-spacing: -.03em; }
.rebate-card__sub { color: var(--muted); font-size: .85rem; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 110px; margin-top: 22px; }
.bars i { flex: 1; height: var(--h); border-radius: 6px 6px 3px 3px; background: rgba(255, 255, 255, .12); transform-origin: bottom; }
.bars i.on { background: var(--red); }
.bars__labels { display: flex; gap: 10px; margin-top: 8px; color: var(--muted); font-size: .72rem; }
.bars__labels span { flex: 1; text-align: center; }
.float { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: .85rem; font-weight: 500; box-shadow: var(--shadow); }
.float .ico { color: var(--ok); width: 18px; height: 18px; }
.float--a { left: -22px; bottom: 6px; }
.float--b { right: -10px; top: 0; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .09); color: var(--muted); font-size: .72rem; font-weight: 600; }
.tag--red { background: rgba(217, 31, 38, .18); color: var(--red-text); }

/* ---------- Strip ---------- */
.strip { border-block: 1px solid var(--line); background: var(--bg-alt); }
.strip__inner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 36px; padding: 18px 0; color: var(--muted); font-size: .9rem; }
.strip__inner b { color: #d8d8de; font-size: 1.05rem; letter-spacing: .02em; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section__head { max-width: 760px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.section__head--left { margin-left: 0; text-align: left; }
.section__head p:not(.eyebrow) { margin-top: 14px; }
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.feature, .tool { padding: 26px; }
.feature h3, .tool h3 { margin: 16px 0 8px; }
.feature p, .tool p { color: var(--muted); font-size: .95rem; }
.tool .link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--red-text); font-weight: 600; font-size: .9rem; }
.tool .link:hover .ico { transform: translateX(3px); }
.tool .link .ico { transition: transform .2s; width: 16px; height: 16px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.step { padding: 26px; position: relative; }
.step__n { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--red); font-weight: 700; margin-bottom: 16px; }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .93rem; }
.note { margin-top: 24px; text-align: center; color: var(--muted); font-size: .92rem; }
.note a { color: var(--red-text); text-decoration: underline; text-underline-offset: 3px; }

/* Calculator */
.calc { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: start; }
.calc .fine { grid-column: 1 / -1; margin-top: 0; }
.calc__panel { display: grid; grid-template-columns: 1fr 1fr; gap: 0; overflow: hidden; }
.calc__controls { padding: 26px; display: grid; gap: 22px; align-content: start; }
.field { display: grid; gap: 10px; }
.field > span { display: flex; justify-content: space-between; color: var(--muted); font-size: .88rem; font-weight: 500; }
.field output { color: var(--text); font-weight: 700; }
select {
  min-height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18);
  background: #121214; color: var(--text); font: 500 1rem var(--font);
}
input[type=range] { width: 100%; height: 32px; background: transparent; accent-color: var(--red); cursor: pointer; }
.calc__result { padding: 26px; background: rgba(217, 31, 38, .07); border-left: 1px solid var(--line); display: grid; gap: 14px; align-content: start; }
.result { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: .92rem; }
.result b { font-size: 1.15rem; color: var(--text); }
.result--main { flex-direction: column; align-items: flex-start; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.result--main b { font-size: clamp(2.2rem, 5vw, 3rem); color: var(--ok); letter-spacing: -.03em; line-height: 1.1; }
.calc__basis { color: var(--muted); font-size: .82rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.calc__basis b { color: var(--text); }

/* Brokers */
.broker { padding: 26px; display: flex; flex-direction: column; }
.broker__top { display: flex; justify-content: space-between; align-items: center; }
.broker__top h3 { font-size: 1.4rem; }
.broker__rate { margin: 18px 0 14px; display: flex; align-items: baseline; gap: 8px; }
.broker__rate b { font-size: 2.2rem; letter-spacing: -.03em; color: var(--ok); }
.broker__rate span { color: var(--muted); font-size: .85rem; }
.ticks { display: grid; gap: 10px; margin-bottom: 20px; }
.ticks li { position: relative; padding-left: 26px; color: #cfcfd6; font-size: .93rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 16px; height: 16px; border-radius: 50%; background: rgba(52, 211, 153, .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 10px no-repeat; }
.code { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 16px; border: 1px dashed rgba(255,255,255,.22); border-radius: 10px; font-size: .88rem; color: var(--muted); }
.code[hidden] { display: none; }
.code b { color: var(--text); letter-spacing: .04em; }
.code button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: rgba(255,255,255,.08); color: var(--text); cursor: pointer; }
.code button:hover { background: rgba(255,255,255,.16); }
.broker__cta { margin-top: auto; display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }

/* IB */
.ib { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.ib h2 { margin-bottom: 14px; }
.ib .btn { margin-top: 26px; }
.ib__list { padding: 8px 24px; }
.ib__list li { display: flex; gap: 14px; padding: 18px 0; }
.ib__list li + li { border-top: 1px solid var(--line); }
.ib__list .ico { color: var(--ok); margin-top: 3px; }
.ib__list b { display: block; }
.ib__list span { color: var(--muted); font-size: .92rem; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico { transition: transform .2s; color: var(--muted); }
.faq details[open] summary .ico { transform: rotate(180deg); }
.faq details[open] { border-color: rgba(255, 255, 255, .18); }
.faq p { padding: 0 20px 20px; color: var(--muted); }

/* Final CTA */
.cta { padding: clamp(56px, 8vw, 96px) 0; background: radial-gradient(700px 320px at 50% 0, rgba(217, 31, 38, .3), transparent 70%), var(--bg-alt); border-top: 1px solid var(--line); text-align: center; }
.cta__inner p { margin: 14px auto 0; color: var(--muted); max-width: 52ch; }
.cta__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }

/* Footer */
.footer { padding: 48px 0 110px; border-top: 1px solid var(--line); }
.footer__inner { display: grid; gap: 28px; }
.footer__brand p { margin-top: 10px; color: var(--muted); font-size: .9rem; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); font-size: .92rem; }
.footer__nav a:hover { color: var(--text); }
.risk { color: var(--muted); font-size: .8rem; line-height: 1.7; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); max-width: 90ch; }
.risk b { color: #d8d8de; }
.copy { color: var(--muted); font-size: .8rem; }

/* Sticky mobile bar + toast */
.stickybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: none; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(18,18,18,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .3s; }
.stickybar .btn:first-child { flex: 1; }
.stickybar.is-visible { transform: none; }
.toast { position: fixed; left: 50%; bottom: 92px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 80; padding: 12px 18px; border-radius: 12px; background: #fff; color: #111; font-size: .9rem; font-weight: 500; box-shadow: var(--shadow); transition: .25s; max-width: calc(100% - 32px); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Reveal (chỉ khi JS chạy) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .bars i { transform: scaleY(0); transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.js .hero.is-in .bars i { transform: none; }
.js .hero.is-in .bars i:nth-child(2) { transition-delay: .05s; } .js .hero.is-in .bars i:nth-child(3) { transition-delay: .1s; }
.js .hero.is-in .bars i:nth-child(4) { transition-delay: .15s; } .js .hero.is-in .bars i:nth-child(5) { transition-delay: .2s; }
.js .hero.is-in .bars i:nth-child(6) { transition-delay: .25s; } .js .hero.is-in .bars i:nth-child(7) { transition-delay: .3s; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__grid, .calc, .ib { grid-template-columns: 1fr; }
  .hero__visual { max-width: 460px; margin-inline: auto; width: 100%; }
  .float--a { left: -8px; } .float--b { right: -4px; }
  .grid--4, .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__cta { display: none; }
  .nav__links {
    position: absolute; top: var(--nav-h); left: 0; right: 0; margin: 0; padding: 12px 16px 20px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: rgba(18,18,18,.98); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .2s;
  }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a:not(.btn) { padding: 14px 12px; font-size: 1rem; }
  .nav__cta-mobile { display: inline-flex; margin-top: 10px; }
}
@media (max-width: 720px) {
  .grid--3, .grid--4, .steps { grid-template-columns: 1fr; }
  .calc__panel { grid-template-columns: 1fr; }
  .calc__result { border-left: 0; border-top: 1px solid var(--line); }
  .hero__cta .btn { flex: 1 1 100%; }
  .stickybar { display: flex; }
  .section__head { text-align: left; margin-left: 0; }
  .stats { gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal, .js .bars i { opacity: 1; transform: none; }
}
