/* Scanduit marketing site. The scanner owns the whole left side and is the
   only complexity on the page; the right side is plain prose. Grayscale
   everything, the beam is the only color. System mono throughout, on purpose. */

:root {
  --bg: #08090b;
  --bg2: #0d0f13;
  --ink: #dfe3e8;
  --bright: #ffffff;
  --muted: #79818c;
  --rule: #1c2027;
  --beam: #a98fd6;      /* the one color: laser + scan reveal only */
  --beam-hot: #ede4fa;
  --chip: #e9ebee;
  --chip-ink: #15171a;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --scanner-w: min(380px, 40vw);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ink); color: var(--bg); }

code {
  color: var(--bright);
  background: var(--bg2);
  padding: 0.1em 0.35em;
  font-family: var(--mono);
  font-size: 0.95em;
}

a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* ---- barcode primitive (bars injected by main.js) ---- */

.barcode {
  display: inline-flex;
  align-items: stretch;
  height: 1em;
  color: var(--ink);
}
.barcode i { background: currentColor; }

/* ---- scanner: the whole left side ---- */

.scanner-col {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: var(--scanner-w);
  border-right: 1px solid var(--rule);
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.012) 3px 4px),
    var(--bg2);
}

/* crop marks */
.tick { position: absolute; width: 14px; height: 14px; z-index: 5; }
.tick.tl { top: 8px; left: 8px; border-top: 1px solid var(--muted); border-left: 1px solid var(--muted); }
.tick.tr { top: 8px; right: 8px; border-top: 1px solid var(--muted); border-right: 1px solid var(--muted); }
.tick.bl { bottom: 8px; left: 8px; border-bottom: 1px solid var(--muted); border-left: 1px solid var(--muted); }
.tick.br { bottom: 8px; right: 8px; border-bottom: 1px solid var(--muted); border-right: 1px solid var(--muted); }

.scanfield { position: absolute; inset: 0; overflow: hidden; }

.beam {
  position: absolute;
  top: 0; bottom: 0;
  left: 58%;
  width: 2px;
  z-index: 3;
  background: linear-gradient(180deg,
    transparent, var(--beam) 8%, var(--beam-hot) 50%, var(--beam) 92%, transparent);
  box-shadow:
    0 0 6px 1px rgba(169, 143, 214, 0.9),
    0 0 28px 8px rgba(169, 143, 214, 0.35);
}
.beam::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 10px; height: 90px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(237, 228, 250, 0.9), transparent);
}

.agent {
  position: absolute;
  left: 0;
  margin: 0;
  width: 120px;
  text-align: center;
  will-change: transform;
}

.brainbox { position: relative; display: block; margin-bottom: 0.5rem; }

.ghost, .lit { display: block; width: 100%; }
.ghost { color: #79828d; }
.lit {
  position: absolute;
  inset: 0;
  color: var(--beam);
  filter: drop-shadow(0 0 4px rgba(169, 143, 214, 0.9));
  /* revealed left of the beam as the brain passes through it (main.js) */
  clip-path: inset(0 100% 0 0);
}

/* barcode identity chip under each brain */
.chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  background: var(--chip);
  color: var(--chip-ink);
  padding: 0.35rem 0.5rem 0.3rem;
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  line-height: 1.5;
}
.chip .barcode { color: var(--chip-ink); height: 0.9rem; margin-bottom: 0.2rem; }
.chip b { letter-spacing: 0.18em; }
.chip span:last-child { color: #4b525b; white-space: nowrap; }

/* ---- the copy: dead simple ---- */

.copy {
  margin-left: var(--scanner-w);
  padding: clamp(3rem, 10vh, 7rem) clamp(2rem, 6vw, 5.5rem) 4rem;
  max-width: calc(var(--scanner-w) + 50rem);
}

h1 {
  margin: 0 0 2rem;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.copy p { max-width: 40rem; margin: 0 0 1.5rem; color: var(--muted); }
.copy p code { color: var(--ink); }

.diff {
  border: 1px solid var(--rule);
  background: var(--bg2);
  padding: 1.2rem 1.4rem;
  margin: 0 0 1.5rem;
  max-width: 40rem;
  overflow-x: auto;
}
.diff pre { margin: 0; font-size: 0.85rem; line-height: 2; }
.d-del { color: var(--muted); text-decoration: line-through; }
.d-add { color: var(--bright); font-weight: 700; }

/* ---- subscribe ---- */

.subscribe {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 40rem;
  margin-top: 2rem;
}

.field {
  position: relative;
  flex: 1 1 16rem;
  display: block;
  overflow: hidden;
}

.subscribe input {
  width: 100%;
  padding: 0.85em 1em;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--chip-ink);
  background: var(--chip);
  border: none;
  outline: none;
}
.subscribe input::placeholder { color: #7d848d; }
.subscribe input:focus { box-shadow: inset 0 -2px 0 var(--chip-ink); }

/* the email scanner: part of the beam, keeps the color */
.field-laser {
  position: absolute;
  top: 0; bottom: 0;
  left: -6px;
  width: 3px;
  background: var(--beam);
  box-shadow: 0 0 10px 2px rgba(169, 143, 214, 0.8);
  opacity: 0;
}
.subscribe.scanning .field-laser { animation: fieldscan 0.9s ease-in-out; }

@keyframes fieldscan {
  0%   { opacity: 1; left: -2%; }
  100% { opacity: 1; left: 101%; }
}

.btn {
  padding: 0.7em 1.3em;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--ink); color: var(--bg); }

.subscribe-result {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 2.2em;
  margin-top: 1.1rem;
  font-size: 0.8rem;
  color: var(--ink);
  letter-spacing: 0.1em;
}
.subscribe-result .barcode { color: var(--ink); height: 1.1em; }
.subscribe-result.err { color: var(--bright); }

/* ---- footer line ---- */

.copy .foot-line {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin: 4rem 0 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}
.foot-code { color: var(--muted); }
.foot-line a { margin-left: auto; }

/* ---- small screens: scanner on top, copy below ---- */

@media (max-width: 860px) {
  .scanner-col {
    position: relative;
    width: 100%;
    height: 360px;
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
  .copy { margin-left: 0; padding: 2.5rem 1.5rem 3rem; max-width: none; }
}

/* ---- reduced motion: static belt built by main.js ---- */

@media (prefers-reduced-motion: reduce) {
  .subscribe.scanning .field-laser { animation: none; }
}
