:root {
  --bg: #0b0f14;
  --bg-alt: #10161d;
  --surface: #151d26;
  --border: #233040;
  --text: #e6edf3;
  --muted: #8b9bab;
  --accent: #3ee6a8;
  --accent-ink: #062018;
  --warn: #f5b84a;
  --radius: 14px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
code { font-family: var(--mono); font-size: .9em; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.nav nav { display: flex; align-items: center; gap: 22px; }
.nav nav a:not(.btn) { color: var(--muted); font-size: .95rem; }
.nav nav a:not(.btn):hover { color: var(--text); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 20px; border-radius: 10px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #63f0bd; }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-small { padding: 7px 14px; font-size: .85rem; border-color: var(--border); color: var(--text); }
.btn-small:hover { border-color: var(--accent); color: var(--accent); }

/* Hero */
.hero {
  padding: 96px 0 88px;
  background:
    radial-gradient(600px 300px at 80% 20%, rgba(62, 230, 168, .12), transparent 70%),
    radial-gradient(500px 300px at 10% 90%, rgba(80, 140, 255, .08), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.eyebrow { color: var(--accent); font-family: var(--mono); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 14px; }
.accent { color: var(--accent); }
.lede { color: var(--muted); font-size: 1.12rem; max-width: 560px; margin: 0 0 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.card-visual { margin: 0; display: grid; grid-template-columns: auto auto; gap: 14px 18px; align-items: center; justify-content: center; font-family: var(--mono); }
.nfc-card {
  grid-column: 1 / -1; justify-self: center;
  position: relative; width: 300px; aspect-ratio: 1.586; border-radius: 16px;
  background: linear-gradient(135deg, #1b2733, #0f161e 60%, #13241f);
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .05);
  transform: rotate(-6deg);
}
.chip { position: absolute; left: 24px; top: 30px; width: 44px; height: 34px; border-radius: 6px; background: linear-gradient(135deg, #d6b56a, #8d7134); }
.waves { position: absolute; right: 26px; top: 26px; width: 40px; height: 40px; }
.waves span { position: absolute; inset: 0; border: 2px solid var(--accent); border-radius: 50%; clip-path: inset(0 0 0 50%); opacity: 0; animation: pulse 2.4s infinite; }
.waves span:nth-child(2) { animation-delay: .8s; }
.waves span:nth-child(3) { animation-delay: 1.6s; }
@keyframes pulse { 0% { transform: scale(.4); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.2); opacity: 0; } }
.card-label { position: absolute; left: 24px; bottom: 44px; color: var(--muted); font-size: .8rem; }
.card-hex { position: absolute; left: 24px; bottom: 20px; color: var(--accent); font-size: .95rem; }
.plus, .arrow { color: var(--muted); font-size: 1.4rem; text-align: center; }
.pw, .key { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 16px; text-align: center; }
.plus { grid-column: 1 / -1; }
.pw { grid-column: 1 / -1; justify-self: center; letter-spacing: .2em; }
.arrow { grid-column: 1 / -1; transform: rotate(90deg); }
.key { grid-column: 1 / -1; justify-self: center; color: var(--accent); border-color: rgba(62, 230, 168, .4); }

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-lede { color: var(--muted); font-size: 1.08rem; margin: 0 0 40px; }

.steps { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.steps p { color: var(--muted); margin: 0; }
.step-n {
  display: inline-grid; place-items: center; width: 32px; height: 32px; margin-bottom: 14px;
  border-radius: 50%; background: rgba(62, 230, 168, .12); color: var(--accent); font-family: var(--mono); font-weight: 500;
}

.code {
  margin: 0 0 32px; padding: 22px 24px; overflow-x: auto;
  background: #070a0e; border: 1px solid var(--border); border-radius: var(--radius);
  font: .9rem/1.7 var(--mono); color: #c9d4de;
}
.code .c { color: #5d7083; }

.props { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.props div { color: var(--muted); border-left: 2px solid var(--accent); padding-left: 16px; }
.props strong { color: var(--text); display: block; margin-bottom: 4px; }

/* Repos */
.repos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.repo {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
  transition: border-color .2s, transform .2s;
}
.repo:hover { border-color: #33475c; transform: translateY(-2px); }
.repo.featured { border-color: rgba(62, 230, 168, .35); background: linear-gradient(160deg, rgba(62, 230, 168, .07), var(--surface) 55%); }
.repo-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.repo p { color: var(--muted); margin: 0 0 18px; }
.repo p strong, .repo p em { color: var(--text); }
.badge {
  flex-shrink: 0; font-family: var(--mono); font-size: .75rem; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted);
}
.badge-soon { color: var(--accent); border-color: rgba(62, 230, 168, .4); }
.tags { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { font-size: .78rem; padding: 3px 10px; border-radius: 6px; background: rgba(255, 255, 255, .04); color: #aab7c4; }
.repo-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.meta { font-family: var(--mono); font-size: .8rem; color: var(--muted); }

/* Security */
.warning {
  border: 1px solid rgba(245, 184, 74, .35); background: rgba(245, 184, 74, .06);
  border-radius: var(--radius); padding: 32px;
}
.warning h2 { color: var(--warn); font-size: 1.5rem; }
.warning p { color: #cdd6df; margin: 0 0 12px; max-width: 820px; }
.warning p:last-child { margin: 0; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer p { margin: 0; }

/* 404 */
.notfound { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .card-visual { justify-self: center; }
  .steps, .props, .repos { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav nav a:not(.btn) { display: none; }
  .hero { padding: 64px 0; }
  .section { padding: 64px 0; }
  .nfc-card { width: 260px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
