/* FinLexPurple — site styles.
   Palette: ink + slate surfaces, teal primary, gold used sparingly.
   Green appears only next to the word "verified". */

:root {
  --ink: #0A0E16;
  --ink-raised: #0D121C;
  --surface: #131A26;
  --surface-2: #1A2332;
  --line: #222D3F;
  --line-strong: #2E3B51;

  --teal: #2DD4BF;
  --teal-light: #5EEAD4;
  --teal-soft: rgba(45, 212, 191, 0.12);
  --teal-glow: rgba(45, 212, 191, 0.18);
  --gold: #E4B95B;
  --gold-soft: rgba(228, 185, 91, 0.35);
  --green: #34D399;

  --text: #EAF1F5;
  --text-2: #C3CFDA;
  --muted: #94A3B8;

  --font-head: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --gutter: 16px;
  --container: 1120px;
  --header-h: 64px;
}

@media (min-width: 640px) {
  :root { --gutter: 32px; }
}

/* Base ------------------------------------------------------------------ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--teal-light); }

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

:not(pre) > code {
  font-size: 0.88em;
  padding: 0.12em 0.4em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  white-space: nowrap;
}

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

img, svg { display: block; }

ul, ol { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--teal);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--ink); }

/* Small shared bits ------------------------------------------------------ */

.soon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.6;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: 0.1em;
}
.soon::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.verified-word { color: var(--green); font-weight: 600; }

.kicker {
  margin-bottom: 14px;
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Header ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(34, 45, 63, 0.7);
  background: rgba(10, 14, 22, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }

.wordmark {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.site-nav a:hover { color: var(--text); background: var(--surface); }

.site-nav .nav-github {
  margin-left: 8px;
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.site-nav .nav-github .icon { width: 18px; height: 18px; }

@media (max-width: 640px) {
  .site-nav li:not(:last-child) { display: none; }
}

/* Hero ------------------------------------------------------------------ */

.hero {
  position: relative;
  isolation: isolate;
  padding-block: 72px 96px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 20%, transparent 75%);
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -260px;
  left: 50%;
  width: min(1100px, 140vw);
  height: 620px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side, rgba(45, 212, 191, 0.16), transparent 70%),
    radial-gradient(closest-side at 70% 60%, rgba(228, 185, 91, 0.05), transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.lockup-mark {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 10px 24px rgba(45, 212, 191, 0.28)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.lockup-word {
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.eyebrow {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(19, 26, 38, 0.7);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.eyebrow a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal);
  text-decoration: none;
}
.eyebrow a::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.eyebrow a:hover { color: var(--teal-light); text-decoration: underline; }
.eyebrow-sep {
  width: 1px;
  height: 14px;
  background: var(--line-strong);
}

.hero h1 {
  max-width: 15ch;
  font-size: clamp(42px, 7.4vw, 80px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero h1 .accent {
  background: linear-gradient(100deg, var(--teal-light) 0%, var(--teal) 50%, var(--gold) 115%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 60ch;
  margin-top: 24px;
  color: var(--text-2);
  font-size: clamp(17px, 2vw, 19px);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.cmd-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 14px 0 20px;
  border: 1px solid rgba(45, 212, 191, 0.45);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.1), rgba(45, 212, 191, 0.04)), var(--ink-raised);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.05), 0 12px 30px -12px rgba(45, 212, 191, 0.35);
  color: var(--text);
  font: 500 16px/1 var(--font-mono);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.cmd-button:hover {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.1), 0 14px 34px -12px rgba(45, 212, 191, 0.5);
}
.cmd-button:active { transform: translateY(1px); }
.cmd-button code {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
}
.cmd-prompt { color: var(--teal); }

.cmd-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-left: 4px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
}
.cmd-button:hover .cmd-icon { color: var(--text); }

.icon-done { display: none; }
[data-copied] .icon-copy { display: none; }
[data-copied] .icon-done { display: block; color: var(--teal); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button-ghost {
  border: 1px solid var(--line-strong);
  background: rgba(19, 26, 38, 0.6);
  color: var(--text);
}
.button-ghost:hover { border-color: var(--muted); background: var(--surface); color: var(--text); }

/* Terminal --------------------------------------------------------------- */

.terminal {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 64px 0 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--ink-raised), var(--ink));
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 40px 80px -30px rgba(0, 0, 0, 0.8),
    0 0 90px -30px var(--teal-glow);
  text-align: left;
}

/* Hairline highlight along the top edge: teal into a touch of gold. */
.terminal::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal) 35%, var(--gold) 65%, transparent);
  opacity: 0.8;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 10px 0 16px;
  border-bottom: 1px solid var(--line);
}

.terminal-lights { display: inline-flex; gap: 7px; }
.terminal-lights i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--line-strong);
}

.terminal-title {
  flex: 1;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: center;
}

.terminal-replay {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.terminal-replay[hidden] { display: none; }
.terminal-replay:hover { background: var(--surface-2); color: var(--text); }
.terminal-replay .icon { width: 17px; height: 17px; }

/* Keep the bar balanced when the replay button is absent. */
.terminal-bar::after {
  content: "";
  width: 47px;
}
.terminal-bar:has(.terminal-replay:not([hidden]))::after { display: none; }

.terminal-body {
  margin: 0;
  padding: 20px 22px 24px;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (min-width: 640px) {
  .terminal-body { padding: 24px 28px 28px; }
}

.t-line { transition: opacity 0.18s ease; }
.t-gap { display: inline-block; height: 0.6em; }
.t-ps { color: var(--teal); font-weight: 700; }
.t-cmd .t-typed { color: var(--text); }
.t-strong { color: var(--teal); font-weight: 700; }
.t-verified { color: var(--green); font-weight: 700; }
.t-reported { color: var(--muted); font-weight: 700; }
.t-dim { color: var(--muted); }
.t-hash { color: var(--gold); }

/* While the animation plays, lines appear one by one; untyped command text
   keeps its space (visibility) so nothing below shifts. */
.is-playing .t-line:not(.is-shown) { opacity: 0; }
.t-pending { visibility: hidden; }

.t-cursor,
.t-caret::after {
  display: inline-block;
  width: 0.6em;
  height: 1.15em;
  vertical-align: -0.2em;
  background: var(--teal);
  animation: blink 1.1s steps(1, end) infinite;
}
.t-cursor { margin-left: -0.1em; }
.t-caret::after {
  content: "";
  margin-right: -0.6em;
  animation: none;
}

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

.terminal-caption {
  padding: 14px 22px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

/* Sections --------------------------------------------------------------- */

.section {
  padding-block: 80px;
}

@media (min-width: 900px) {
  .section { padding-block: 120px; }
}

.section-alt {
  border-block: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 50% at 0% 0%, rgba(45, 212, 191, 0.05), transparent 70%),
    linear-gradient(180deg, var(--ink-raised), var(--ink));
}

.section-head { max-width: 720px; }

.section-head h2 {
  font-size: clamp(32px, 4.6vw, 50px);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.section-lede {
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
}

/* Pillars */

.pillars {
  display: grid;
  gap: 16px;
  margin-top: 56px;
}

@media (min-width: 900px) {
  .pillars { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

.pillar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), rgba(19, 26, 38, 0.4));
  transition: border-color 0.2s ease;
}
.pillar:hover { border-color: rgba(45, 212, 191, 0.35); }

.pillar-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 6px;
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-radius: 12px;
  background: var(--teal-soft);
  color: var(--teal);
}
.pillar-icon .icon { width: 24px; height: 24px; }

.pillar h3 { font-size: 21px; }
.pillar p { color: var(--muted); font-size: 16px; }

.pillar-note {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
}
.pillar-note .soon { margin-right: 6px; }

/* Steps */

.steps {
  display: grid;
  gap: 16px;
  margin-top: 56px;
  counter-reset: none;
}

.step {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(19, 26, 38, 0.65);
}

@media (min-width: 720px) {
  .step { grid-template-columns: 72px 1fr; gap: 20px; padding: 28px; }
}

.step-num {
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 2;
}

.step h3 { font-size: 21px; }
.step p { margin-top: 6px; color: var(--muted); font-size: 16px; }
.step-body { min-width: 0; }

.codeblock {
  position: relative;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ink);
}

.codeblock pre {
  margin: 0;
  padding: 16px 60px 16px 18px;
  overflow-x: auto;
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}
.c-ps { color: var(--teal); user-select: none; }

.copy-button {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.copy-button:hover { border-color: var(--muted); color: var(--text); }
.copy-button .icon { width: 18px; height: 18px; }

.callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 24px;
  padding: 20px 22px;
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
  background: rgba(228, 185, 91, 0.05);
  color: var(--text-2);
  font-size: 16px;
}
.callout .icon { width: 22px; height: 22px; margin-top: 2px; color: var(--gold); }
.callout strong { color: var(--text); }

/* Install counter */

.counter-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 900px) {
  .counter-grid { grid-template-columns: 1.1fr 1fr; gap: 64px; }
}

.privacy-points {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}
.privacy-points li {
  position: relative;
  padding-left: 26px;
  color: var(--text-2);
  font-size: 16px;
}
.privacy-points li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--teal);
  transform: rotate(45deg);
}

.stat {
  position: relative;
  padding: 40px 32px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background:
    radial-gradient(ellipse 80% 70% at 50% 0%, rgba(45, 212, 191, 0.12), transparent 70%),
    var(--surface);
  text-align: center;
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.7;
}

.stat-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stat-value {
  margin-top: 10px;
  color: var(--text);
  font-family: var(--font-head);
  font-size: clamp(72px, 11vw, 124px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat:not([data-state="live"]) .stat-value { color: #4A5A73; }

.stat-status {
  max-width: 34ch;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 15px;
}
.stat-status .soon { margin-right: 6px; }

/* Footer ----------------------------------------------------------------- */

.site-footer {
  padding-block: 56px 48px;
  border-top: 1px solid var(--line);
  background: var(--ink-raised);
}

.footer-inner {
  display: grid;
  gap: 28px;
}

@media (min-width: 760px) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
  .legal { grid-column: 1 / -1; }
}

.footer-brand .wordmark { font-size: 17px; }

.footer-license {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
}

.footer-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.footer-links a {
  color: var(--text-2);
  font-size: 15px;
  text-decoration: none;
}
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.link-soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 15px;
}

.legal {
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  max-width: none;
}

/* Motion preferences ------------------------------------------------------ */

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