/* agntmarket — early access */

:root {
  --bg: #000;
  --panel: #060606;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --fg: #f3f3f1;
  --muted: #8e8e8e;
  --dim: #565656;
  --green: #2fd53a;
  --green-hi: #e2ffe4;
  --green-lo: #138a1d;
  --green-a: rgba(47, 213, 58, 0.12);
  --green-b: rgba(47, 213, 58, 0.35);
  --red: #ff5f56;
  --sans: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
::selection { background: var(--green); color: #000; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ───────── CRT layer ───────── */

.crt i { position: fixed; pointer-events: none; z-index: 100; }

.crt-grain {
  inset: -120px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.075;
  animation: grain 0.8s steps(5) infinite;
}

.crt-lines {
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
}

.crt-vignette {
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-40px, 25px); }
  40%  { transform: translate(30px, -45px); }
  60%  { transform: translate(-20px, 50px); }
  80%  { transform: translate(45px, 15px); }
  100% { transform: translate(0, 0); }
}

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

.wrap {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: 0 16px;
  padding-bottom: env(safe-area-inset-bottom);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.top-brand { color: var(--fg); letter-spacing: 0.08em; text-transform: none; font-size: 13px; font-weight: 500; }

.top-status { display: inline-flex; align-items: center; gap: 8px; }

.live-dot {
  width: 6px; height: 6px;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse { 50% { opacity: 0.35; } }

/* ───────── logo ───────── */

.logo {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #fff;
  white-space: nowrap;
}

.logo-word {
  text-shadow: -0.02em 0 rgba(255, 50, 90, 0.45), 0.02em 0 rgba(50, 160, 255, 0.45);
}

.logo-cursor {
  display: inline-block;
  width: 0.92em;
  height: 0.92em;
  margin-left: 0.2em;
  vertical-align: -0.16em;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 6%),
    linear-gradient(90deg, var(--green-hi) 0 5%, #6fe878 9%, var(--green) 22%, #25c430 82%, var(--green-lo) 100%);
  box-shadow: 0.07em 0 0.16em rgba(47, 213, 58, 0.5);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.logo-hero {
  font-size: clamp(62px, 17vw, 108px);
  animation: crt-on 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.logo-hero .logo-word { display: inline-block; animation: jitter 7s infinite 2s; }

.logo-sm { font-size: 26px; }
.logo-sm .logo-cursor { animation: none; } /* solid on the pass so screenshots always show it */

@keyframes crt-on {
  0%   { opacity: 0; transform: scale(0.4, 0.01); filter: brightness(4); }
  45%  { opacity: 1; transform: scale(1.04, 0.02); filter: brightness(3); }
  100% { opacity: 1; transform: scale(1, 1); filter: brightness(1); }
}

@keyframes jitter {
  0%, 90%, 100% { transform: none; }
  91% { transform: translateX(-3px) skewX(-8deg); }
  92.5% { transform: translateX(3px); }
  94% { transform: translateX(-1px) skewX(4deg); }
  95% { transform: none; }
}

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

.hero { text-align: center; padding: 56px 0 40px; }

.hero h1 {
  margin-top: 30px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(22px, 5.4vw, 28px);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero-sub { margin-top: 10px; color: var(--muted); font-size: 13px; }

/* ───────── console ───────── */

.console {
  background: linear-gradient(180deg, #0a0a0a, var(--panel));
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 40px 90px -40px rgba(47, 213, 58, 0.18);
}

.console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.cmd { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-sigil { color: var(--green); }
.cmd-cursor {
  display: inline-block;
  width: 7px; height: 13px;
  margin-left: 4px;
  vertical-align: -2px;
  background: var(--green);
  animation: blink 1.1s steps(1) infinite;
}

.progress { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.progress-num b { color: var(--fg); font-weight: 500; }
.pips { display: inline-flex; gap: 4px; }
.pip {
  width: 8px; height: 8px;
  border: 1px solid var(--line-strong);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.pip.on { background: var(--green); border-color: var(--green); box-shadow: 0 0 8px var(--green-b); }

/* ───────── tasks ───────── */

.tasks { list-style: none; }

.task {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  column-gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  transition: opacity 0.35s, background 0.35s;
}

.task::before {
  content: "";
  position: absolute;
  left: 0; top: 16px; bottom: 16px;
  width: 2px;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  transform: scaleY(0);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.task[data-state="active"] { background: linear-gradient(90deg, rgba(47, 213, 58, 0.055), transparent 65%); }
.task[data-state="active"]::before { transform: scaleY(1); }
.task[data-state="locked"] { opacity: 0.36; }
.task[data-state="locked"] .btn { pointer-events: none; }

.task-idx {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border: 1px solid var(--line-strong);
  font-size: 11px;
  color: var(--dim);
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.task[data-state="active"] .task-idx { border-color: var(--green-b); color: var(--green); }
.task[data-state="done"] .task-idx {
  background: var(--green);
  border-color: var(--green);
  color: #000;
  font-size: 0;
  animation: pop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.task[data-state="done"] .task-idx::after { content: "✓"; font-size: 14px; font-weight: 700; }

@keyframes pop { 0% { transform: scale(0.6); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }

.task-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  line-height: 1.3;
}

.task-desc { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.task-desc em { font-style: normal; color: var(--fg); }

.task-actions { display: flex; gap: 8px; }

.task-extra { grid-column: 2 / -1; margin-top: 14px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #101010;
  color: var(--fg);
  font: 500 12.5px/1 var(--mono);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.1s;
}

.btn:hover { border-color: rgba(255, 255, 255, 0.36); background: #171717; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.btn .ext { color: var(--muted); }

.btn[data-s="pending"] { color: var(--muted); border-style: dashed; }

.btn[data-s="verifying"] { color: var(--green); border-color: var(--green-b); }
.btn[data-s="verifying"] .ext { display: none; }
.btn[data-s="verifying"]::before {
  content: "";
  width: 7px; height: 11px;
  background: var(--green);
  animation: blink 0.5s steps(1) infinite;
}

.btn[data-s="done"] {
  color: var(--green);
  background: var(--green-a);
  border-color: rgba(47, 213, 58, 0.28);
  pointer-events: none;
}
.btn[data-s="done"] .ext { display: none; }
.btn[data-s="done"]::before { content: "✓"; font-weight: 700; }

/* ───────── fields ───────── */

.field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #030303;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field:focus-within { border-color: rgba(47, 213, 58, 0.6); box-shadow: 0 0 0 3px rgba(47, 213, 58, 0.12); }
.field.invalid { border-color: rgba(255, 95, 86, 0.6); }
.field.invalid:focus-within { box-shadow: 0 0 0 3px rgba(255, 95, 86, 0.12); }
.field.valid { border-color: var(--green-b); }

.field-sigil { color: var(--green); font-weight: 700; }

.field input {
  flex: 1;
  min-width: 0;
  padding: 13px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg);
  font: 400 14.5px var(--mono);
}

.field input::placeholder { color: var(--dim); }

.hint { margin-top: 8px; font-size: 12px; color: var(--muted); min-height: 1.55em; }
.hint.ok { color: var(--green); }
.hint.err { color: var(--red); }

/* ───────── wallet ───────── */

.wallet { padding: 22px 18px 24px; }
.wallet fieldset { border: 0; min-width: 0; transition: opacity 0.35s; }
.wallet fieldset:disabled { opacity: 0.36; }

.label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.label-meta { color: var(--dim); }
fieldset:not(:disabled) .label-meta { color: var(--green); }

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-top: 14px;
  padding: 16px;
  border: 0;
  border-radius: 11px;
  background: var(--green);
  color: #000;
  font: 700 15px/1 var(--sans);
  letter-spacing: -0.005em;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(47, 213, 58, 0.5), 0 14px 40px -12px rgba(47, 213, 58, 0.65);
  transition: background 0.2s, box-shadow 0.2s, color 0.2s, transform 0.1s;
}

.btn-primary:hover:not(:disabled) { background: #3ee649; }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-primary:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.btn-primary:disabled { background: #131313; color: #4d4d4d; box-shadow: inset 0 0 0 1px var(--line); cursor: not-allowed; }

.btn-primary .sq { width: 10px; height: 10px; background: currentColor; animation: blink 1.1s steps(1) infinite; }
.btn-primary[data-loading] .sq { animation-duration: 0.35s; }

.form-error { margin-top: 12px; font-size: 12.5px; color: var(--red); text-align: center; }
.form-error:empty { display: none; }

.demo-note { margin-top: 12px; font-size: 11.5px; color: #c9a227; text-align: center; }
.demo-note code { font: inherit; color: var(--fg); }

/* ───────── pass ───────── */

.pass { text-align: center; }

.pass-card {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
  padding: 22px 22px 20px;
  text-align: left;
  border: 1px solid var(--green-b);
  border-radius: 18px;
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(47, 213, 58, 0.12), transparent 60%),
    #050505;
  box-shadow: 0 40px 100px -40px rgba(47, 213, 58, 0.45);
  animation: crt-on 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.pass-top { display: flex; align-items: center; justify-content: space-between; }

.pass-tag {
  padding: 5px 9px;
  border: 1px solid var(--green-b);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

.pass-no {
  margin: 26px 0 18px;
  font: 700 clamp(40px, 12vw, 52px)/1 var(--mono);
  letter-spacing: -0.03em;
  color: var(--green);
  text-shadow: 0 0 24px rgba(47, 213, 58, 0.35);
}

.pass-rows div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; font-size: 13px; }
.pass-rows div + div { border-top: 1px solid var(--line); }
.pass-rows dt { color: var(--muted); }
.pass-rows dd { color: var(--fg); text-align: right; overflow-wrap: anywhere; }

.pass-status { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--green) !important; }
.pass-status .dot { width: 7px; height: 7px; background: currentColor; box-shadow: 0 0 8px currentColor; }
.pass-status.demo { color: #c9a227 !important; }

.pass-perf {
  position: relative;
  margin: 18px -22px;
  border-top: 1px dashed rgba(255, 255, 255, 0.18);
}

.pass-perf::before, .pass-perf::after {
  content: "";
  position: absolute;
  top: -11px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--green-b);
}
.pass-perf::before { left: -12px; clip-path: inset(0 0 0 50%); }
.pass-perf::after { right: -12px; clip-path: inset(0 50% 0 0); }

.pass-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }

.barcode { display: flex; height: 38px; overflow: hidden; flex: 1; max-width: 230px; }
.barcode i { flex: none; height: 100%; background: rgba(255, 255, 255, 0.85); }

.pass-fine { font-size: 9.5px; line-height: 1.5; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); text-align: right; }

.pass-note { max-width: 380px; margin: 28px auto 0; font-size: 13px; color: var(--muted); }
.pass-note a { color: var(--green); text-decoration: none; }
.pass-note a:hover { text-decoration: underline; }

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

.foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 44px 0 28px;
  font-size: 11.5px;
  color: var(--dim);
}

.foot a { text-decoration: none; }
.foot a:hover { color: var(--fg); }

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

@media (max-width: 520px) {
  .hero { padding: 36px 0 30px; }
  .console-head { padding: 13px 14px; }
  .task { grid-template-columns: 28px 1fr; column-gap: 12px; padding: 16px 14px; }
  .task-idx { width: 28px; height: 28px; }
  .task-actions { grid-column: 2; margin-top: 12px; }
  .task-extra { grid-column: 2; }
  .wallet { padding: 20px 14px 22px; }
  .field input { font-size: 16px; } /* stops iOS zoom on focus */
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
