:root {
  --bg: #08090b;
  --bg2: #0e1013;
  --panel: rgba(255, 255, 255, .035);
  --line: rgba(255, 255, 255, .09);
  --line2: rgba(255, 255, 255, .16);
  --text: #f4f3ef;
  --dim: rgba(244, 243, 239, .58);
  --accent: #b9ff4a;
  --accent-ink: #0b1200;
  --bad: #ff6b5e;
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --r: 18px;
  --w: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 78% 8%, rgba(185, 255, 74, .07), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 4px);
  z-index: 0;
}
main, .nav, .foot { position: relative; z-index: 1; }
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
h2 { font-size: clamp(28px, 4.2vw, 48px); }
p { margin: 0; }
.mono { font-family: var(--mono); }
.small { font-size: 12px; }
.dim { color: var(--dim); }

.label {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 11px/1.2 var(--mono);
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--dim);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px;
  font: 600 15px/1 var(--body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .18s, background .18s, border-color .18s, box-shadow .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { box-shadow: 0 10px 30px -8px rgba(185, 255, 74, .55); }
.btn-ghost { background: rgba(255,255,255,.04); color: var(--text); border-color: var(--line2); }
.btn-ghost:hover { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.07); }
.btn-sm { padding: 9px 14px; font-size: 13px; }
.btn[disabled], .btn.is-soon { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn[hidden] { display: none; }

/* nav */
.nav {
  position: sticky; top: var(--bar, 0px); z-index: 20;
  display: flex; align-items: center; gap: 24px;
  max-width: var(--w); margin: 0 auto; padding: 14px 24px;
  background: rgba(8, 9, 11, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 16px var(--display); }
.brand img { border-radius: 8px; }
.links { display: flex; gap: 22px; margin-left: auto; }
.links a { text-decoration: none; color: var(--dim); font-size: 14px; transition: color .15s; }
.links a:hover { color: var(--text); }

section { max-width: var(--w); margin: 0 auto; padding: 0 24px; }

/* hero */
.hero {
  position: relative;
  display: grid; grid-template-columns: 1.3fr .7fr; align-items: center; gap: 32px;
  padding-top: 40px; padding-bottom: 36px;
  min-height: 0;
}
.cipher-bg {
  position: absolute; inset: 0; margin: 0;
  font: 12px/1.5 var(--mono); color: rgba(185, 255, 74, .07);
  white-space: pre-wrap; word-break: break-all; overflow: hidden;
  pointer-events: none; user-select: none;
  -webkit-mask-image: radial-gradient(ellipse at 70% 45%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at 70% 45%, #000 0%, transparent 70%);
}
.hero-copy { position: relative; container-type: inline-size; min-width: 0; }
.display { margin: 18px 0 20px; font-weight: 800; font-size: clamp(32px, 6.6cqi, 72px); line-height: 1.02; }
.display span { display: block; }
.accent { color: var(--accent); }
.lede { max-width: 540px; color: var(--dim); font-size: 18px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 26px 0 0; }
.chips li { font: 500 12px var(--mono); padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--dim); background: var(--panel); }

.hero-art { position: relative; display: grid; place-items: center; min-height: 360px; }
.hero-art::before {
  content: ""; position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(185, 255, 74, .22), transparent 65%);
  filter: blur(10px);
}
.hero-art img { position: relative; width: min(420px, 90%); }
.seal-toast {
  position: absolute; left: 0; bottom: 6%;
  display: grid; gap: 4px; max-width: 280px;
  padding: 12px 14px; border-radius: 14px;
  background: rgba(14, 16, 19, .9); border: 1px solid var(--line2);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,.6);
  animation: toast 4.5s ease-in-out infinite;
}
.seal-toast .small { color: var(--accent); }
.toast-cipher { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes toast { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* live strip */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 96px; }
.tile { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); display: grid; gap: 6px; min-width: 0; }
.tile b { font-size: 20px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* section heads */
.section-head { display: grid; gap: 12px; margin-bottom: 32px; max-width: 720px; }
.sub { color: var(--dim); font-size: 17px; }
.app, .demo, .lore, .how, .buy { margin-bottom: 110px; }

/* panels */
.panel {
  position: relative; min-width: 0;
  padding: 22px; border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
  border: 1px solid var(--line);
}
.panel-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.pill { font: 600 11px var(--mono); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line2); color: var(--dim); }
.pill.ok { color: var(--accent); border-color: rgba(185, 255, 74, .4); }
.pill[hidden] { display: none; }

.app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; margin-bottom: 10px; }
.field span { font-size: 13px; color: var(--dim); }
input, textarea {
  width: 100%; padding: 13px 14px; border-radius: 12px;
  background: rgba(0,0,0,.35); border: 1px solid var(--line2); color: var(--text);
  font: 14px/1.5 var(--mono); resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus { outline: none; border-color: rgba(185, 255, 74, .6); box-shadow: 0 0 0 3px rgba(185, 255, 74, .12); }
.status { min-height: 20px; margin: 2px 0 14px; font-size: 13px; color: var(--dim); overflow-wrap: anywhere; }
.status.ok { color: var(--accent); }
.status.bad { color: var(--bad); }
.status a { color: var(--accent); }
.compose-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sent-box { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 14px; }
.sent-box summary { cursor: pointer; font-size: 13px; color: var(--dim); }

.msg-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; max-height: 420px; overflow-y: auto; }
.msg {
  padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.28);
  animation: rise .4s ease both;
}
.msg-head { display: flex; justify-content: space-between; gap: 10px; font: 12px var(--mono); color: var(--dim); margin-bottom: 6px; flex-wrap: wrap; }
.msg-head a { color: var(--dim); }
.msg-head a:hover { color: var(--accent); }
.msg-body { overflow-wrap: anywhere; white-space: pre-wrap; }
.msg.sealed { border-color: rgba(185, 255, 74, .3); }
.msg.sealed .tag { color: var(--accent); }
.msg.knock .tag { color: #ffd166; }
.empty { color: var(--dim); font-size: 14px; padding: 6px 0; }

.locked { display: grid; gap: 16px; justify-items: start; }
.lock-art { width: 64px; color: var(--accent); filter: drop-shadow(0 0 18px rgba(185,255,74,.35)); }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--dim); }
.steps b { color: var(--text); font-weight: 600; }
.key-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.key-row > div { display: grid; gap: 4px; min-width: 0; }
.key-row b { font-size: 13px; overflow-wrap: anywhere; }
.inbox-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* demo */
.demo-grid { display: grid; grid-template-columns: 1fr auto 1.2fr auto 1fr; gap: 12px; align-items: stretch; }
.demo-grid .panel { display: grid; gap: 12px; align-content: start; }
.flow-arrow { align-self: center; color: var(--accent); font: 700 22px var(--mono); }
.panel-chain { border-style: dashed; }
.cipher { margin: 0; font-size: 12px; line-height: 1.55; color: rgba(185, 255, 74, .8); overflow-wrap: anywhere; max-height: 170px; overflow: hidden; }
.opener { display: grid; gap: 4px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); }
.opener span { font-size: 12px; color: var(--dim); }
.opener b { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.opener.ok { border-color: rgba(185, 255, 74, .35); }
.opener.ok b { color: var(--accent); }
.opener.bad b { color: var(--bad); }

/* lore */
.lore { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.lore-text { display: grid; gap: 16px; }
.lore-text p:not(.label) { color: var(--dim); font-size: 17px; max-width: 560px; }
.lore-text .kicker { color: var(--text) !important; font-weight: 600; }
.ledger { list-style: none; padding: 0; margin: 16px 0 0; }
.ledger li { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.ledger li:last-child { border-bottom: 0; }
.ledger b { font: 600 12px var(--mono); text-align: right; }
.pub { color: var(--dim); }
.priv { color: var(--accent); }

/* how */
.flow { list-style: none; padding: 0; margin: 0 0 40px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; counter-reset: s; }
.flow li { position: relative; padding: 20px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); display: grid; gap: 8px; align-content: start; transition: border-color .2s, transform .2s; }
.flow li:hover { border-color: rgba(185, 255, 74, .4); transform: translateY(-3px); }
.flow .n { font: 600 12px var(--mono); color: var(--accent); }
.flow b { font: 700 16px var(--display); }
.flow p { color: var(--dim); font-size: 14px; }
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: var(--panel); }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin-top: 10px; color: var(--dim); }

/* buy */
.buy { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: center; }
.buy-art { display: grid; place-items: center; }
.buy-art img { width: min(340px, 80%); }
.buy-copy { display: grid; gap: 16px; min-width: 0; }
.ca-box { padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line2); background: rgba(0,0,0,.35); display: grid; gap: 10px; }
.ca-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.ca-row code { font: 14px var(--mono); overflow-wrap: anywhere; min-width: 0; }

.foot { max-width: var(--w); margin: 0 auto; padding: 28px 24px 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; }

/* reveal: always ends visible, even if the observer never runs */
.reveal { animation: showAnyway 0s linear 1.5s forwards; opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s ease; animation: none; }
@keyframes showAnyway { to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; animation: none; } .seal-toast { animation: none; } }

/* responsive */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 24px; }
  .hero-art { min-height: 0; order: -1; max-width: 300px; margin: 0 auto; width: 100%; }
  .seal-toast { left: -8px; bottom: -6px; max-width: 220px; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .app-grid, .lore, .buy { grid-template-columns: 1fr; }
  .demo-grid { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); justify-self: center; }
  .flow { grid-template-columns: 1fr 1fr; }
  .buy-art { order: -1; }
}
@media (max-width: 760px) {
  .links { display: none; }
  .nav { justify-content: space-between; padding: 12px 16px; }
  section { padding: 0 16px; }
  .lede { font-size: 16px; }
  .flow { grid-template-columns: 1fr; }
  .tile b { font-size: 17px; }
  .app, .demo, .lore, .how, .buy { margin-bottom: 80px; }
  .strip { margin-bottom: 72px; }
  .panel { padding: 18px; }
}
