/* NexGuard — design system
   Concept: the hash ledger. NexGuard's entire mechanism is an exact-match
   lookup against a maintained list — so the site reads like a verification
   report, not a marketing gradient. Monospace carries headlines and data;
   serif carries prose. Two muted accents: brass for structure, verified
   sage-green for confirmed/positive states. */

:root {
  --ink: #12151c;
  --surface: #1a1e27;
  --surface-raised: #1f2430;
  --rule: #2a303d;
  --paper: #ede9e3;
  --paper-dim: #a6a49c;
  --brass: #c99a4e;
  --brass-dim: #9c7a3f;
  --verified: #6fa88a;
  --verified-dim: #547f68;
  --flagged: #c0614a;

  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-serif: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;

  --max-w: 46rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--verified);
  text-decoration-color: var(--verified-dim);
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-color: var(--verified); }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--paper);
  margin: 0 0 0.6em;
}

p { margin: 0 0 1.1em; }

code, .mono {
  font-family: var(--font-mono);
}

/* ---- structure ---- */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.5rem var(--pad) 0;
  max-width: var(--max-w);
  margin: 0 auto;
}

.brand {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--paper);
  text-decoration: none;
}
.brand:hover { color: var(--paper); text-decoration: none; }
.brand .dot { color: var(--verified); }

.topbar nav {
  display: flex;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.topbar nav a { color: var(--paper-dim); text-decoration: none; }
.topbar nav a:hover { color: var(--paper); }

.section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--rule);
}
.section:first-of-type { border-top: none; }

.label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 1rem;
}

.section h2 {
  font-size: 1.4rem;
  margin-bottom: 1.1rem;
}

.lede {
  font-size: 1.12rem;
  color: var(--paper);
}

.dim { color: var(--paper-dim); }

footer {
  border-top: 1px solid var(--rule);
  padding: 2.5rem var(--pad) 3rem;
  max-width: var(--max-w);
  margin: 0 auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--paper-dim);
}
footer a { color: var(--paper-dim); }
footer a:hover { color: var(--verified); }

/* ---- hero / hash demo ---- */

.hero {
  padding: 3.5rem 0 3rem;
}
.hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.15;
  max-width: 16ch;
}
.hero .lede {
  max-width: 46ch;
  margin-bottom: 2rem;
}

.ledger {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.25rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  margin-bottom: 2.2rem;
}
.ledger-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.35rem 0;
  flex-wrap: wrap;
}
.ledger-row + .ledger-row { border-top: 1px solid var(--rule); }
.ledger-file { color: var(--paper-dim); min-width: 9ch; }
.ledger-hash {
  color: var(--paper);
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid transparent;
}
.ledger-hash.typing {
  animation: reveal 1.6s steps(64, end) 1 both,
             caret 0.8s step-end infinite;
}
.ledger-verdict {
  margin-left: auto;
  font-weight: 600;
  opacity: 0;
  animation: appear 0.4s ease-out 1.9s 1 forwards;
}
.ledger-verdict.clean { color: var(--verified); }
.ledger-verdict.flagged { color: var(--flagged); }

@keyframes reveal {
  from { width: 0; border-right-color: var(--brass); }
  to { width: 100%; border-right-color: transparent; }
}
@keyframes caret {
  50% { border-right-color: transparent; }
}
@keyframes appear {
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ledger-hash.typing { animation: none; width: 100%; }
  .ledger-verdict { animation: none; opacity: 1; }
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---- buttons / forms ---- */

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.7rem 1.3rem;
  border-radius: 3px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--verified);
  color: var(--ink);
}
.btn-primary:hover { background: #7fb99a; text-decoration: none; }
.btn-secondary {
  background: transparent;
  color: var(--paper);
  border-color: var(--rule);
}
.btn-secondary:hover { border-color: var(--brass); text-decoration: none; }
.btn-block { display: block; width: 100%; text-align: center; }

form { max-width: 24rem; }
.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin-bottom: 0.4rem;
}
input[type="email"], input[type="password"] {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 1rem;
  padding: 0.65rem 0.8rem;
}
input[type="email"]:focus, input[type="password"]:focus {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
  border-color: var(--brass);
}

.error-banner {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--flagged);
  border: 1px solid var(--flagged);
  border-radius: 3px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 1.3rem;
}

/* ---- comparison table (what nexguard is / isn't) ---- */

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.75rem;
}
.compare-col h3 {
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
}
.compare-col.does h3 { color: var(--verified); }
.compare-col.not h3 { color: var(--flagged); }
.compare-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.compare-col li {
  padding: 0.5rem 0;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
}
.compare-col li:first-of-type { border-top: none; }

@media (max-width: 30rem) {
  .compare { grid-template-columns: 1fr; gap: 1.5rem 0; }
}

/* ---- tier / manifest rows ---- */

.tier {
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.25rem;
}
.tier-name {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.9rem;
}
.tier-name .price { color: var(--brass); font-weight: 400; font-size: 0.85rem; }
.tier ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}
.tier li {
  padding: 0.4rem 0;
  color: var(--paper-dim);
}
.tier li.included { color: var(--paper); }
.tier li.included::before { content: '✓ '; color: var(--verified); font-family: var(--font-mono); }
.tier li.soon::after { content: ' — coming soon'; color: var(--brass-dim); font-size: 0.85em; }

/* ---- dashboard manifest rows ---- */

.manifest-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.92rem;
}
.manifest-row:first-of-type { border-top: none; }
.manifest-row .k { color: var(--paper-dim); }
.manifest-row .v { color: var(--paper); text-align: right; }
.manifest-row .v.status-active { color: var(--verified); }
.manifest-row .v.status-none { color: var(--paper-dim); }
.manifest-row code {
  background: var(--surface);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.85rem;
}

.hint {
  font-size: 0.9rem;
  color: var(--paper-dim);
  margin-top: -0.4rem;
}

.logout-form { margin: 0; max-width: none; }
.logout-form button {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--paper-dim);
  cursor: pointer;
  padding: 0;
}
.logout-form button:hover { color: var(--flagged); }
