/* ==========================================================================
   ZigZag Trader — company landing
   Single committed visual world: dark "instrument panel".
   Every colour is painted explicitly so the page holds on any host ground.
   ========================================================================== */

:root {
  /* ground + surfaces — navy-biased, derived from the ZT4 brand navy #0A2540 */
  --ink:        #0A1420;
  --ink-soft:   #0D1B2B;
  --panel:      #102134;
  --panel-hi:   #16293F;
  --rule:       #1C3149;
  --rule-soft:  #152840;

  /* type */
  --text:       #E9F0F8;
  --text-2:     #BACBDD;
  --muted:      #7F99B4;

  /* accent — brand blue, lifted for a dark ground */
  --accent:     #4C8BFF;
  --accent-2:   #85B2FF;
  --accent-deep:#1B4FB0;

  /* semantic: market direction + delivery status (never decoration) */
  --up:         #2ED47A;
  --down:       #FF5B6B;
  --roadmap:    #D9A441;

  --measure:    1200px;
  --pad:        clamp(20px, 4vw, 40px);
  --sect:       clamp(72px, 9vw, 128px);

  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
/* clip, not hidden: `overflow-x: hidden` on body turns it into a scroll
   container and breaks programmatic scrolling of the document */
html { overflow-x: clip; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.022em; text-wrap: balance; line-height: 1.12; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
/* height:auto is required, not cosmetic — the markup carries width/height
   attributes, and a definite height would make aspect-ratio inert */
img { max-width: 100%; height: auto; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 700; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ── layout primitives ─────────────────────────────────────────────────── */

.wrap { width: 100%; max-width: var(--measure); margin: 0 auto; padding-inline: var(--pad); }

.sect { padding-block: var(--sect); position: relative; }
.sect + .sect { padding-top: 0; }
.sect-tint { background: var(--ink-soft); border-block: 1px solid var(--rule-soft); padding-top: var(--sect) !important; }

.head { max-width: 760px; display: flex; flex-direction: column; gap: 16px; margin-bottom: 46px; }
.head.center { max-width: 720px; margin-inline: auto; text-align: center; align-items: center; }

.eyebrow {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 6px; flex: none;
  background: linear-gradient(135deg, transparent 45%, var(--accent) 45%, var(--accent) 55%, transparent 55%),
              linear-gradient(45deg,  transparent 45%, var(--accent) 45%, var(--accent) 55%, transparent 55%);
  background-size: 11px 6px; background-repeat: repeat-x;
}
.head.center .eyebrow { justify-content: center; }

.h2 { font-size: clamp(1.9rem, 3.6vw, 2.85rem); }
.lede { color: var(--text-2); font-size: clamp(1rem, 1.4vw, 1.13rem); line-height: 1.62; max-width: 68ch; }

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(224px, 1fr)); }

/* ── buttons ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px; border-radius: 5px;
  font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: -.01em;
  background: var(--accent); color: #04101F; border: 1px solid var(--accent);
  cursor: pointer; transition: background .18s ease, transform .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); color: #04101F; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--rule); }
.btn-ghost:hover { background: var(--panel-hi); border-color: var(--accent); color: var(--text); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }

/* ── nav ───────────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule-soft);
}
.nav-in { display: flex; align-items: center; gap: 26px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); flex: none; }
.brand:hover { color: var(--text); }
.brand svg { width: 30px; height: 18px; flex: none; }
.brand-name {
  font-family: var(--sans); font-weight: 800; font-size: 16px;
  font-stretch: 112%; letter-spacing: .06em; text-transform: uppercase;
}
.brand-name em { font-style: normal; color: var(--muted); font-weight: 500; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { color: var(--text-2); font-size: 14.5px; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 940px) { .nav-links { display: none; } .nav-in { gap: 14px; } .nav .btn { margin-left: auto; } }

/* ── hero ──────────────────────────────────────────────────────────────── */

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule-soft); }
.hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: .72; pointer-events: none;
}
/* keep the ground opaque under the headline column, let the chart read to the
   right of it, and settle it back into the page at the fold */
.hero-fade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right, var(--ink) 26%, rgba(10, 20, 32, .55) 52%, transparent 78%),
    linear-gradient(to bottom, var(--ink) 2%, transparent 22%, transparent 62%, var(--ink) 96%);
}
.hero-in { position: relative; padding-block: clamp(76px, 12vw, 148px) clamp(56px, 8vw, 96px); }
.hero h1 {
  font-size: clamp(2.55rem, 6.1vw, 4.4rem); font-weight: 800; letter-spacing: -.035em;
  max-width: 17ch; margin-block: 22px 24px;
}
.hero h1 span { color: var(--accent); }
.hero .lede { font-size: clamp(1.05rem, 1.7vw, 1.3rem); max-width: 60ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; margin-top: clamp(46px, 6vw, 72px);
  background: var(--rule-soft); border: 1px solid var(--rule-soft); border-radius: 6px; overflow: hidden;
}
.stat { background: var(--ink); padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; }
.stat b {
  font-size: clamp(1.5rem, 2.6vw, 1.95rem); font-weight: 800; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; color: var(--text);
}
.stat span { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ── cards ─────────────────────────────────────────────────────────────── */

.card {
  background: var(--panel); border: 1px solid var(--rule); border-radius: 6px;
  padding: 26px 24px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .18s ease, background .18s ease;
}
.card:hover { border-color: var(--accent-deep); background: var(--panel-hi); }
.card h3 { font-size: 1.16rem; }
.card p { color: var(--text-2); font-size: 15px; line-height: 1.58; }
.card .feats { display: flex; flex-direction: column; gap: 7px; margin-top: 2px; }
.card .feats li {
  position: relative; padding-left: 17px; font-size: 14px; color: var(--muted); line-height: 1.5;
}
.card .feats li::before {
  content: ""; position: absolute; left: 0; top: .58em; width: 7px; height: 1px; background: var(--accent);
}
.card-foot { margin-top: auto; padding-top: 6px; }
.card-link { font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; font-weight: 500; }

.tag {
  align-self: flex-start; font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; padding: 4px 9px; border-radius: 3px;
  border: 1px solid currentColor;
}
.tag-live     { color: var(--up); }
.tag-roadmap  { color: var(--roadmap); }
.tag-flag     { color: var(--muted); }

/* product row: a label column + the stack it contains */
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack + .stack { margin-top: 54px; }
.stack-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding-bottom: 4px; }
.stack-head h3 { font-size: 1.34rem; letter-spacing: -.025em; }
.stack-head p { color: var(--muted); font-size: 14.5px; }
.stack-rule { flex: 1 1 60px; height: 1px; background: var(--rule); min-width: 30px; }

/* ── screens ───────────────────────────────────────────────────────────── */

.shots { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 0; }
.shot {
  border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; background: var(--panel);
  display: flex; flex-direction: column; transition: border-color .18s ease; margin: 0;
}
.shot:hover { border-color: var(--accent-deep); }
.shot img {
  width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: top center;
  border-bottom: 1px solid var(--rule); background: var(--ink);
}
/* phone captures are portrait: show the whole screen rather than a cropped sliver */
.shot-tall img { object-fit: contain; padding: 10px; }
.shot figcaption {
  padding: 13px 16px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em;
  color: var(--muted); text-transform: uppercase;
}
@media (min-width: 620px) {
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shot-wide { grid-column: span 2; }
}
@media (min-width: 1000px) {
  .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── capacity panel ────────────────────────────────────────────────────── */

.panel {
  background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: clamp(20px, 3vw, 32px);
}
.chart-wrap { overflow-x: auto; }
.chart-note {
  font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .04em;
  margin-top: 14px; line-height: 1.65;
}
.tbl-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 6px; }
table.spec { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 640px; background: var(--panel); }
table.spec th {
  text-align: left; padding: 13px 16px; background: var(--ink-soft); color: var(--muted);
  font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  border-bottom: 1px solid var(--rule); white-space: nowrap;
}
table.spec td { padding: 13px 16px; border-bottom: 1px solid var(--rule-soft); color: var(--text-2); font-variant-numeric: tabular-nums; }
table.spec tr:last-child td { border-bottom: 0; }
table.spec td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
table.spec .ok { color: var(--up); font-family: var(--mono); font-size: 12.5px; }

/* ── catalog (plugins / modules) ───────────────────────────────────────── */

.cat { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 1px; background: var(--rule-soft); border: 1px solid var(--rule-soft); border-radius: 6px; overflow: hidden; }
.cat-item { background: var(--ink-soft); padding: 20px 21px; display: flex; flex-direction: column; gap: 8px; transition: background .18s ease; }
.cat-item:hover { background: var(--panel); }
.cat-item h4 { font-size: 15.5px; font-weight: 700; letter-spacing: -.015em; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.cat-item p { font-size: 13.8px; color: var(--muted); line-height: 1.55; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot-live { background: var(--up); }
.dot-port { background: var(--accent); }
.dot-road { background: var(--roadmap); }
.legend { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }

/* ── demo links ────────────────────────────────────────────────────────── */

.demos { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 14px; }
.demo {
  border: 1px solid var(--rule); border-radius: 6px; background: var(--panel); padding: 18px 20px;
  display: flex; flex-direction: column; gap: 6px; color: var(--text); transition: border-color .18s ease, transform .18s ease;
}
.demo:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--text); }
.demo-host { font-family: var(--mono); font-size: 11.5px; letter-spacing: .07em; color: var(--accent); }
.demo strong { font-size: 15.5px; font-weight: 700; }
.demo span { font-size: 13px; color: var(--muted); }
.demo code { font-family: var(--mono); font-size: 12px; color: var(--text-2); background: var(--ink); padding: 1px 6px; border-radius: 3px; border: 1px solid var(--rule); }

/* ── pricing ───────────────────────────────────────────────────────────── */

.bill {
  display: inline-flex; align-items: center; gap: 14px; margin-top: 8px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.bill .on { color: var(--text); }
.bill em { font-style: normal; color: var(--up); letter-spacing: .04em; }
.switch {
  width: 46px; height: 25px; border-radius: 13px; background: var(--panel-hi); border: 1px solid var(--rule);
  position: relative; cursor: pointer; padding: 0; flex: none; transition: background .2s ease, border-color .2s ease;
}
.switch[aria-checked="true"] { background: var(--accent-deep); border-color: var(--accent); }
.knob {
  position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%;
  background: var(--text); transition: transform .2s ease;
}
.switch[aria-checked="true"] .knob { transform: translateX(21px); }

.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(252px, 1fr)); gap: 16px; }
.price { background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; padding: 24px 22px; display: flex; flex-direction: column; gap: 9px; position: relative; }
.price-hot { border-color: var(--accent); background: var(--panel-hi); }
.price-badge {
  position: absolute; top: -10px; left: 22px; background: var(--accent); color: #04101F;
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 3px;
}
.price-name { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.price-amt { display: flex; align-items: baseline; gap: 6px; }
.price-amt b { font-size: clamp(1.6rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.price-amt span { font-size: 14px; color: var(--muted); }
.price-bill { font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: .04em; margin-top: -4px; }
.price-cap { font-size: 14.5px; color: var(--text-2); padding-block: 10px; border-block: 1px solid var(--rule-soft); }
.price-cap b { color: var(--accent); font-variant-numeric: tabular-nums; }
.price-setup { font-size: 12.5px; color: var(--muted); margin-top: -2px; }
.price ul { display: flex; flex-direction: column; gap: 7px; margin-block: 4px; }
.price li { font-size: 13.8px; color: var(--muted); padding-left: 16px; position: relative; line-height: 1.5; }
.price li::before { content: ""; position: absolute; left: 0; top: .58em; width: 7px; height: 1px; background: var(--accent); }
.price .btn { margin-top: auto; justify-content: center; }
.price-foot { font-size: 14px; color: var(--muted); max-width: 74ch; margin-top: 22px; line-height: 1.65; }

.addons { display: flex; flex-direction: column; }
.addon { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--rule-soft); font-size: 14.8px; }
.addon:last-child { border-bottom: 0; }
.addon span em { font-style: normal; color: var(--muted); font-size: 12.5px; }
.addon b { color: var(--accent); font-family: var(--mono); font-size: 13.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.claims { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.claim {
  flex: 1 1 320px; background: var(--panel); border: 1px solid var(--rule); border-radius: 6px;
  padding: 14px 18px; font-size: 14.2px; color: var(--text-2); text-align: left;
}
.claim b { color: var(--up); }

/* ── contact ───────────────────────────────────────────────────────────── */

.contact { background: var(--ink-soft); border-top: 1px solid var(--rule-soft); }
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 30px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(224px, 1fr)); gap: 14px; }
.form input, .form textarea, .form select {
  width: 100%; padding: 13px 15px; border-radius: 5px;
  background: var(--ink); border: 1px solid var(--rule); color: var(--text);
  font-family: var(--sans); font-size: 15px; transition: border-color .16s ease;
}
.form textarea { resize: vertical; min-height: 116px; line-height: 1.55; }
.form input::placeholder, .form textarea::placeholder { color: var(--muted); }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--accent); }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-msg { font-size: 14px; font-weight: 500; }
.form-msg.ok  { color: var(--up); }
.form-msg.err { color: var(--down); }
.fineprint { font-size: 13px; color: var(--muted); line-height: 1.6; }
.contact-side { display: flex; flex-direction: column; gap: 16px; }
.contact-side .row { display: flex; flex-direction: column; gap: 3px; }
.contact-side .row span { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact-side .row a, .contact-side .row strong { font-size: 15.5px; font-weight: 600; }
.split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ── footer ────────────────────────────────────────────────────────────── */

.foot { border-top: 1px solid var(--rule-soft); background: var(--ink); padding-block: 34px 40px; }
.foot-in { display: flex; justify-content: space-between; gap: 22px; flex-wrap: wrap; align-items: center; }
.foot p, .foot a { font-size: 13.5px; color: var(--muted); }
.foot a:hover { color: var(--text); }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ── decorative swing rail (wide viewports only) ───────────────────────── */

.rail { position: fixed; left: 18px; top: 0; height: 100vh; width: 44px; z-index: 1; pointer-events: none; opacity: .5; }
@media (max-width: 1480px) { .rail { display: none; } }
