/* ==================================================================
   Captra — brand layer.
   Loaded AFTER style.css. It redefines the design tokens that file
   already uses, so every existing page is rebranded without touching
   a single one of its class names. Remove the <link> to revert.

   Identity: an instrument, not an admin panel. Camera black, one live
   accent, viewfinder corners, measurement ticks, monospaced numerals.
   ================================================================== */

:root{
  /* --- surfaces: cooler, deeper, more separation between layers --- */
  --bg:        #04050a;
  --bg-soft:   #080a11;
  --card:      #0c0f18;
  --card-hi:   #121726;
  --line:      #1a2030;
  --line-soft: #12172333;

  /* --- type --- */
  --txt:       #eef1f8;
  --txt-dim:   #9aa4bc;
  --txt-mut:   #5f6a84;

  /* --- the brand accent: cyan, with a violet partner for gradients --- */
  --acc:       #00e5c7;
  --acc-2:     #7b5cff;
  --acc-3:     #ff4d8d;
  --acc-soft:  rgba(0,229,199,.10);

  --ok:        #3ddc84;  --ok-soft:   rgba(61,220,132,.12);
  --bad:       #ff4d6d;  --bad-soft:  rgba(255,77,109,.12);
  --warn:      #ffc24b;  --warn-soft: rgba(255,194,75,.12);

  --r-sm: 9px; --r: 13px; --r-lg: 19px;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 18px 48px rgba(0,0,0,.44);

  --mono:"JetBrains Mono",ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  --sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;

  /* motion: one long-out curve and one with overshoot, used everywhere */
  --ease:  cubic-bezier(.16,1,.3,1);
  --ease2: cubic-bezier(.34,1.56,.64,1);
}

/* ---------- atmosphere: depth without noise ---------- */
body{ position:relative; }
body::before{
  content:""; position:fixed; inset:0; z-index:0; pointer-events:none;
  background:
    radial-gradient(900px 620px at 10% -8%, rgba(0,229,199,.09), transparent 62%),
    radial-gradient(820px 600px at 92% 4%,  rgba(123,92,255,.09), transparent 62%),
    linear-gradient(rgba(255,255,255,.015) 1px, transparent 1px) 0 0/100% 48px,
    linear-gradient(90deg, rgba(255,255,255,.015) 1px, transparent 1px) 0 0/48px 100%;
  animation:zx-breathe 16s ease-in-out infinite alternate;
}
@keyframes zx-breathe{ to{ opacity:.5 } }
.wrap,.nav,.page-head,.docs{ position:relative; z-index:1 }

/* ---------- navigation ---------- */
.nav{
  backdrop-filter:blur(14px) saturate(140%);
  background:rgba(4,5,10,.72);
  border-bottom:1px solid var(--line);
  animation:zx-drop .8s var(--ease) both;
}
@keyframes zx-drop{ from{ opacity:0; transform:translateY(-12px) } }
.brand{ letter-spacing:.02em; font-weight:700 }
.brand .logo{
  display:inline-grid; place-items:center; width:30px; height:30px; border-radius:8px;
  background:linear-gradient(145deg,var(--acc),var(--acc-2));
  color:#04121a; font:800 14px/1 var(--mono); font-style:normal;
  box-shadow:0 0 0 1px rgba(255,255,255,.1), 0 6px 22px rgba(0,229,199,.3);
}
.nav .links a{ position:relative; transition:color .22s }
.nav .links a::after{
  content:""; position:absolute; left:0; right:0; bottom:-6px; height:1.5px;
  background:linear-gradient(90deg,var(--acc),var(--acc-2));
  transform:scaleX(0); transform-origin:left; transition:transform .35s var(--ease);
}
.nav .links a:hover{ color:var(--txt) }
.nav .links a:hover::after{ transform:scaleX(1) }

/* ---------- buttons ---------- */
.btn{
  position:relative; overflow:hidden; border-radius:10px; font-weight:600;
  background:linear-gradient(135deg,var(--acc),var(--acc-2)); color:#04121a;
  border:0; transition:transform .24s var(--ease), box-shadow .3s;
}
.btn:hover{ transform:translateY(-2px); box-shadow:0 10px 30px rgba(0,229,199,.26) }
.btn.ghost{
  background:transparent; color:var(--txt-dim);
  border:1px solid var(--line); box-shadow:none;
}
.btn.ghost:hover{ color:var(--txt); border-color:var(--acc); box-shadow:0 8px 24px rgba(0,0,0,.4) }

/* ---------- hero: title-card motion ---------- */
.hero h1{
  font-size:clamp(42px,6.6vw,84px); line-height:.96; letter-spacing:-.045em; font-weight:760;
}
/* each word rises out of its own mask — the AE reveal */
.zx-w{ display:inline-block; overflow:hidden; vertical-align:top; padding-bottom:.09em }
.zx-w > i{
  display:inline-block; font-style:normal; transform:translateY(104%);
  animation:zx-rise 1.05s var(--ease) both;
}
@keyframes zx-rise{ to{ transform:none } }
.zx-grad{
  background:linear-gradient(100deg,var(--acc) 0%,var(--acc-2) 48%,var(--acc-3) 100%);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.hero p{ animation:zx-fade 1s var(--ease) .5s both; max-width:62ch; line-height:1.68 }
.hero .cta{ animation:zx-fade 1s var(--ease) .65s both }
@keyframes zx-fade{ from{ opacity:0; transform:translateY(16px) } }

.badge-live{
  border:1px solid rgba(0,229,199,.3); background:rgba(0,229,199,.06); color:var(--acc);
  border-radius:999px; font:600 10.5px/1 var(--mono); letter-spacing:.18em; text-transform:uppercase;
  animation:zx-fade .9s var(--ease) .25s both;
}
.badge-live .dot{ background:var(--acc); animation:zx-ping 2.6s var(--ease) infinite }
@keyframes zx-ping{
  0%{ box-shadow:0 0 0 0 rgba(0,229,199,.6) }
  70%{ box-shadow:0 0 0 9px rgba(0,229,199,0) }
  100%{ box-shadow:0 0 0 0 rgba(0,229,199,0) }
}

/* ---------- cards & stat tiles ---------- */
.card,.feature,.stat,.auth-card{
  background:linear-gradient(170deg,var(--card),var(--bg-soft));
  border:1px solid var(--line); border-radius:var(--r-lg);
  transition:transform .35s var(--ease), border-color .25s, box-shadow .4s;
}
.card:hover,.feature:hover{ transform:translateY(-3px); box-shadow:var(--shadow) }

/* viewfinder corners — the brand motif */
.stat,.feature{ position:relative; overflow:hidden }
.stat::before,.feature::before{
  content:""; position:absolute; top:10px; left:10px; width:12px; height:12px;
  border:1.5px solid var(--acc); border-right:0; border-bottom:0; border-radius:4px 0 0 0;
  opacity:0; transition:opacity .3s;
}
.stat:hover::before,.feature:hover::before{ opacity:.7 }

/* one light sweep across tiles on first paint */
.stat::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(110deg,transparent 40%,rgba(255,255,255,.055) 50%,transparent 60%);
  transform:translateX(-120%); animation:zx-wipe 1.8s var(--ease) .8s both;
}
@keyframes zx-wipe{ to{ transform:translateX(120%) } }

.stat .value{
  font-family:var(--mono); font-weight:700; letter-spacing:-.035em;
  font-variant-numeric:tabular-nums;
}
.stat .label{
  font:600 9.5px/1 var(--sans); letter-spacing:.15em; text-transform:uppercase; color:var(--txt-mut);
}
.feature .ico{
  font-size:0; width:38px; height:38px; border-radius:10px; display:grid; place-items:center;
  background:linear-gradient(145deg,var(--acc-soft),transparent);
  border:1px solid var(--line);
}
.feature .ico::after{
  content:""; width:13px; height:13px; border:2px solid var(--acc); border-radius:3px;
  box-shadow:0 0 14px rgba(0,229,199,.55);
}

/* ---------- data: numbers read like instruments ---------- */
table td.num,table th.num,.meter,.pill,.chip,code,pre{ font-family:var(--mono) }
table td.num{ font-variant-numeric:tabular-nums }
table tbody tr{ transition:background .2s }
table tbody tr:hover{ background:var(--acc-soft) }
.chip{
  background:var(--acc-soft); border:1px solid rgba(0,229,199,.2); color:var(--acc);
  border-radius:6px; padding:2px 8px;
}
pre{
  background:#06080e; border:1px solid var(--line); border-radius:var(--r);
  position:relative; overflow:auto;
}
.ok{ color:var(--ok) } .bad{ color:var(--bad) } .warn{ color:var(--warn) }

/* bars in the 24h chart grow from the baseline */
.bar{ transition:height .9s var(--ease) }

/* ---------- scroll reveal, driven by brand.js ---------- */
.zx-up{ opacity:0; transform:translateY(30px) scale(.985);
  transition:opacity .85s var(--ease), transform .85s var(--ease) }
.zx-up.zx-in{ opacity:1; transform:none }

/* ---------- section rules ---------- */
h2{ letter-spacing:-.03em; font-weight:720 }

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{ animation:none !important; transition:none !important }
  .zx-up{ opacity:1; transform:none }
  .zx-w > i{ transform:none }
}
