/* Peca Bit — shared design system (light theme) */

:root {
  /* Brand */
  --brand-500: #3b6bff;
  --brand-600: #2a55e0;
  --brand-700: #1f42b8;
  --brand-050: #eef3ff;
  --mint-500: #12c8a0;
  --mint-050: #e6faf5;

  /* Semantic market colors */
  --up: #0aa06e;
  --up-bg: #e8f7f1;
  --down: #e0433f;
  --down-bg: #fdeceb;

  /* Neutrals */
  --ink-900: #0b1220;
  --ink-700: #2b3444;
  --ink-500: #5a6577;
  --ink-400: #8b95a7;
  --ink-200: #d8dee9;
  --ink-100: #eaeef5;
  --ink-050: #f5f7fb;
  --white: #ffffff;

  /* Tokens */
  --bg: var(--white);
  --bg-alt: var(--ink-050);
  --text: var(--ink-900);
  --text-muted: var(--ink-500);
  --border: var(--ink-100);
  --border-strong: var(--ink-200);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(11, 18, 32, .06), 0 1px 3px rgba(11, 18, 32, .04);
  --shadow: 0 8px 24px rgba(11, 18, 32, .07), 0 2px 6px rgba(11, 18, 32, .04);
  --shadow-lg: 0 24px 60px rgba(11, 18, 32, .12), 0 6px 16px rgba(11, 18, 32, .06);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --maxw: 1160px;
  --nav-h: 68px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.022em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 5.2vw, 3.85rem); letter-spacing: -.032em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); letter-spacing: -.028em; }
h3 { font-size: 1.12rem; }
p  { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.section { padding: 88px 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.muted { color: var(--text-muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--brand-600); background: var(--brand-050);
  border: 1px solid #dbe5ff; border-radius: var(--radius-pill);
  padding: 6px 14px; margin-bottom: 20px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--mint-500);
  box-shadow: 0 0 0 3px rgba(18, 200, 160, .18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .35 } }

.section-head { max-width: 660px; margin-bottom: 44px; }
.section-head p { color: var(--text-muted); font-size: 1.06rem; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .95rem;
  padding: 12px 22px; border-radius: var(--radius-pill);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand-500); color: #fff; box-shadow: 0 6px 18px rgba(59, 107, 255, .28); }
.btn--primary:hover { background: var(--brand-600); color: #fff; box-shadow: 0 10px 24px rgba(59, 107, 255, .34); }
.btn--ghost { background: var(--white); color: var(--ink-900); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { color: var(--ink-900); border-color: var(--ink-400); }
.btn--sm { padding: 9px 16px; font-size: .87rem; }
.btn--block { width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  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);
}
.nav__inner { height: var(--nav-h); display: flex; align-items: center; gap: 26px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.08rem; color: var(--ink-900); letter-spacing: -.02em; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.brand:hover { color: var(--ink-900); }
.nav__links { display: flex; gap: 4px; margin-left: 8px; }
.nav__links a {
  color: var(--ink-700); font-size: .92rem; font-weight: 500;
  padding: 8px 12px; border-radius: var(--radius-sm);
}
.nav__links a:hover { background: var(--ink-050); color: var(--ink-900); }
.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav__toggle {
  display: none; background: none; border: 1px solid var(--border-strong);
  border-radius: 10px; width: 40px; height: 38px; cursor: pointer; padding: 0;
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  display: block; width: 17px; height: 2px; background: var(--ink-900); border-radius: 2px; margin-inline: auto; position: relative;
}
.nav__toggle span::before, .nav__toggle span::after { content: ""; position: absolute; }
.nav__toggle span::before { top: -5px; } .nav__toggle span::after { top: 5px; }

/* ---------- Ticker ---------- */
.ticker {
  background: var(--ink-900); color: #fff; overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.ticker__track { display: flex; gap: 40px; padding: 11px 0; width: max-content; animation: slide 42s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes slide { from { transform: translateX(0) } to { transform: translateX(-50%) } }
.ticker__item { display: inline-flex; align-items: baseline; gap: 9px; font-size: .84rem; white-space: nowrap; }
.ticker__sym { font-weight: 600; opacity: .72; letter-spacing: .02em; }
.ticker__px { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ticker__chg { font-family: var(--mono); font-size: .79rem; }
.up { color: #2fd39c; } .down { color: #ff7b74; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 78px 0 72px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -220px 0 auto -10%; height: 620px; z-index: -1;
  background:
    radial-gradient(520px 340px at 22% 42%, rgba(59, 107, 255, .13), transparent 70%),
    radial-gradient(480px 320px at 78% 20%, rgba(18, 200, 160, .13), transparent 70%);
}
.hero__grid { display: grid; grid-template-columns: 1.06fr .94fr; gap: 56px; align-items: center; }
.hero__lede { font-size: 1.13rem; color: var(--text-muted); max-width: 50ch; margin-bottom: 30px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.hero__stats { display: flex; gap: 34px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--border); }
.hero__stat b { display: block; font-size: 1.5rem; font-family: var(--mono); letter-spacing: -.02em; }
.hero__stat span { font-size: .8rem; color: var(--text-muted); }

.notice {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--ink-050); border: 1px solid var(--border);
  border-left: 3px solid var(--brand-500);
  border-radius: var(--radius); padding: 15px 18px;
  font-size: .88rem; color: var(--text-muted); margin-top: 28px;
}
.notice strong { color: var(--ink-900); }

/* ---------- Phone mockup ---------- */
.phone {
  width: 302px; margin-inline: auto; background: var(--ink-900);
  border-radius: 42px; padding: 11px; box-shadow: var(--shadow-lg);
  position: relative;
}
.phone::after {
  content: ""; position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 24px; background: var(--ink-900); border-radius: var(--radius-pill); z-index: 3;
}
.phone__screen {
  background: var(--white); border-radius: 32px; overflow: hidden; height: 618px;
  display: flex; flex-direction: column;
}
.phone__status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 15px 22px 8px; font-size: .7rem; font-weight: 600; color: var(--ink-500);
}
.phone__body { flex: 1; overflow: hidden; padding: 8px 16px 0; }
.phone__title { font-size: 1.28rem; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 2px; }
.phone__sub { font-size: .76rem; color: var(--text-muted); margin-bottom: 14px; }
.phone__card {
  border: 1px solid var(--border); border-radius: 16px; padding: 13px 14px; margin-bottom: 9px;
  display: flex; align-items: center; gap: 11px;
}
.coin {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: .68rem; font-weight: 700; color: #fff; flex: none;
}
.phone__card .meta { flex: 1; min-width: 0; }
.phone__card .meta b { display: block; font-size: .84rem; }
.phone__card .meta span { font-size: .7rem; color: var(--text-muted); }
.phone__card .px { text-align: right; font-family: var(--mono); }
.phone__card .px b { display: block; font-size: .84rem; font-weight: 600; }
.phone__card .px span { font-size: .7rem; }
.phone__tabs {
  display: flex; justify-content: space-around; padding: 10px 8px 20px;
  border-top: 1px solid var(--border); background: var(--white);
}
.phone__tab { display: grid; justify-items: center; gap: 3px; font-size: .6rem; color: var(--ink-400); }
.phone__tab.is-active { color: var(--brand-500); }
.phone__tab i { width: 19px; height: 19px; border-radius: 6px; background: currentColor; opacity: .85; display: block; }

/* ---------- Feature grid ---------- */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px;
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: .93rem; margin: 0; }
.card__icon {
  width: 44px; height: 44px; border-radius: 13px; margin-bottom: 18px;
  display: grid; place-items: center; background: var(--brand-050); color: var(--brand-600);
}
.card__icon--mint { background: var(--mint-050); color: #0a9a7c; }

/* ---------- Screens preview ---------- */
.screens { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.screen {
  display: block; border: 1px solid var(--border); border-radius: 18px;
  padding: 18px 16px 20px; background: var(--white); color: inherit;
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
}
.screen:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand-500); color: inherit; }
.screen__n {
  width: 26px; height: 26px; border-radius: 8px; background: var(--ink-900); color: #fff;
  display: grid; place-items: center; font-size: .72rem; font-weight: 700; margin-bottom: 14px;
}
.screen h3 { font-size: .97rem; margin-bottom: 6px; }
.screen p { font-size: .82rem; color: var(--text-muted); margin: 0; }

/* ---------- Table ---------- */
.table-wrap {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--white); box-shadow: var(--shadow-sm);
}
.table-tools {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--ink-050);
}
.input {
  font: inherit; font-size: .9rem; padding: 9px 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  background: var(--white); color: var(--text); min-width: 220px;
}
.input:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(59, 107, 255, .14); }
.chips { display: flex; gap: 6px; }
.chip {
  font: inherit; font-size: .82rem; font-weight: 500; padding: 7px 14px; cursor: pointer;
  border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: var(--white); color: var(--ink-700);
}
.chip.is-active { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }
.table-status { margin-left: auto; font-size: .8rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 7px; }
.table-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint-500); animation: pulse 2s infinite; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 18px; text-align: right; font-size: .91rem; border-bottom: 1px solid var(--border); }
th:first-child, td:first-child { text-align: left; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 600; background: var(--white); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--ink-050); }
.pair-cell { display: flex; align-items: center; gap: 11px; }
.pair-cell b { font-weight: 600; }
.pair-cell small { display: block; color: var(--text-muted); font-weight: 400; font-size: .75rem; }
.pill {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill);
  font-family: var(--mono); font-size: .8rem; font-weight: 600;
}
.pill--up { background: var(--up-bg); color: var(--up); }
.pill--down { background: var(--down-bg); color: var(--down); }

/* ---------- Live pair detail modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 120; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(11, 18, 32, .5);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.modal.is-on { display: flex; }
.modal__card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); width: 100%; max-width: 560px;
  max-height: calc(100dvh - 48px); overflow-y: auto;
  animation: pop .2s ease;
}
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: .5 } to { transform: none; opacity: 1 } }
.modal__head {
  display: flex; align-items: center; gap: 13px;
  padding: 22px 24px 16px; border-bottom: 1px solid var(--border);
}
.modal__head .coin { width: 42px; height: 42px; font-size: .72rem; }
.modal__head h3 { margin: 0; font-size: 1.15rem; }
.modal__head p { margin: 0; font-size: .78rem; color: var(--text-muted); }
.modal__close {
  margin-left: auto; flex: none; width: 34px; height: 34px; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--white); color: var(--ink-700); display: grid; place-items: center;
}
.modal__close:hover { background: var(--ink-050); }
.modal__body { padding: 20px 24px 24px; }
.modal__eyebrow {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 8px;
}
.modal__price { font-family: var(--mono); font-size: 2.1rem; font-weight: 600; letter-spacing: -.03em; margin: 0; }
.modal__meta { display: flex; align-items: center; gap: 10px; margin: 6px 0 20px; font-size: .8rem; color: var(--text-muted); }
.modal__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.modal__stat { background: var(--ink-050); border: 1px solid var(--border); border-radius: 12px; padding: 11px 12px; }
.modal__stat span { display: block; font-size: .64rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.modal__stat b { font-family: var(--mono); font-size: .85rem; font-weight: 600; }
.modal__chart {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 18px;
}
.modal__chart b { font-size: .8rem; }
#miniCandles { width: 100%; height: 180px; display: block; margin-top: 8px; }
.modal__actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 520px) {
  .modal { padding: 0; align-items: flex-end; }
  .modal__card { max-width: none; border-radius: 22px 22px 0 0; max-height: 88dvh; }
  .modal__stats { grid-template-columns: repeat(2, 1fr); }
  .modal__actions .btn { width: 100%; }
}

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
.facts { display: grid; gap: 12px; }
.fact {
  display: flex; gap: 13px; align-items: flex-start;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px;
}
.fact svg { flex: none; margin-top: 2px; color: var(--brand-500); }
.fact b { display: block; font-size: .92rem; }
.fact span { font-size: .85rem; color: var(--text-muted); }

/* ---------- Support ---------- */
.support { display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px; align-items: start; }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .84rem; font-weight: 600; }
.field input, .field textarea, .field select {
  font: inherit; font-size: .93rem; padding: 11px 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--white); color: var(--text); width: 100%;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(59, 107, 255, .14);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-msg { font-size: .87rem; padding: 11px 14px; border-radius: var(--radius-sm); display: none; }
.form-msg.is-ok { display: block; background: var(--up-bg); color: var(--up); }
.contact-box {
  background: var(--ink-900); color: #fff; border-radius: var(--radius-lg); padding: 28px;
}
.contact-box h3 { color: #fff; }
.contact-box dl { margin: 18px 0 0; display: grid; gap: 14px; }
.contact-box dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: rgba(255, 255, 255, .5); }
.contact-box dd { margin: 3px 0 0; font-size: .93rem; }
.contact-box a { color: #8fb0ff; }

/* ---------- Footer ---------- */
.footer { background: var(--ink-900); color: rgba(255, 255, 255, .7); padding: 60px 0 32px; font-size: .89rem; }
.footer a { color: rgba(255, 255, 255, .7); }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 34px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.footer .brand { color: #fff; margin-bottom: 14px; }
.footer .brand:hover { color: #fff; }
.footer h4 { color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer address { font-style: normal; line-height: 1.75; font-size: .85rem; }
.footer__reg { margin-top: 20px; font-size: .85rem; line-height: 1.8; }
.footer__reg h4 { margin-bottom: 8px; }
.footer__reg .val { color: rgba(255, 255, 255, .38); font-family: var(--mono); font-size: .8rem; }
.reg-pending {
  display: inline-block; margin-top: 12px;
  font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: 5px 12px; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .72);
}
.footer__legal { padding-top: 24px; display: grid; gap: 10px; font-size: .79rem; color: rgba(255, 255, 255, .45); }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 14px; }

/* ---------- Legal pages ---------- */
.doc { max-width: 780px; }
.doc h2 { margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--border); }
.doc h2:first-of-type { margin-top: 0; border-top: none; padding-top: 0; }
.doc h3 { margin-top: 28px; }
.doc p, .doc li { color: var(--ink-700); font-size: .97rem; }
.doc ul { padding-left: 20px; display: grid; gap: 8px; }
.toc {
  background: var(--ink-050); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px; margin-bottom: 40px;
}
.toc h4 { margin: 0 0 10px; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); }
.toc ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__grid, .about, .support { grid-template-columns: 1fr; }
  .grid--3, .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .screens { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .nav__links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; background: #fff; border-bottom: 1px solid var(--border);
    padding: 12px 22px 18px; gap: 2px; box-shadow: var(--shadow);
  }
  .nav__links.is-open { display: flex; }
  .nav__toggle { display: grid; place-items: center; }
  .nav__actions .btn--ghost { display: none; }
}
@media (max-width: 620px) {
  .section { padding: 60px 0; }
  .grid--3, .grid--2, .screens { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  th:nth-child(4), td:nth-child(4) { display: none; }
  .hero__stats { gap: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
