/* ============================================================
   Nostr × Cannabis — stylesheet
   Dark, premium, cannabis-green accents. No frameworks.
   ============================================================ */

:root {
  /* palette */
  --bg: #07090a;
  --bg-soft: #0c1011;
  --bg-card: #0f1413;
  --bg-card-hi: #131918;
  --border: rgba(255, 255, 255, 0.06);
  --border-hi: rgba(255, 255, 255, 0.12);
  --border-green: rgba(34, 197, 94, 0.25);

  --text: #e8ece9;
  --text-dim: #9aa6a0;
  --text-faint: #5d6863;

  --green: #22c55e;
  --green-bright: #34d399;
  --green-deep: #15803d;
  --gold: #f5b544;
  --red: #f87171;
  --blue: #60a5fa;

  /* gradients */
  --grad-green: linear-gradient(135deg, #34d399 0%, #22c55e 50%, #15803d 100%);
  --grad-gold: linear-gradient(135deg, #fbbf24 0%, #f5b544 50%, #d97706 100%);

  /* type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* layout */
  --maxw: 1180px;
  --radius: 14px;
  --radius-lg: 20px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* ---------- background fx ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(34, 197, 94, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 197, 94, 0.035) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
}
.bg-glow {
  position: fixed; z-index: -3; border-radius: 50%;
  filter: blur(120px); opacity: 0.5; pointer-events: none;
}
.bg-glow--1 {
  width: 600px; height: 600px; top: -200px; left: -150px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.35), transparent 70%);
}
.bg-glow--2 {
  width: 500px; height: 500px; top: 30vh; right: -150px;
  background: radial-gradient(circle, rgba(245, 181, 68, 0.18), transparent 70%);
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7, 9, 10, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s, background 0.3s;
}
.nav.scrolled { border-bottom-color: var(--border-hi); background: rgba(7, 9, 10, 0.88); }
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; letter-spacing: -0.02em; }
.nav__brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--grad-green); color: #042713; font-size: 18px; font-weight: 900;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}
.nav__brand-text .dim { color: var(--text-faint); margin: 0 2px; font-weight: 500; }
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  font-size: 13.5px; color: var(--text-dim); font-weight: 500;
  transition: color 0.2s; position: relative;
}
.nav__links a:hover { color: var(--text); }
.nav__links a.active { color: var(--green-bright); }
.nav__links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -22px; height: 2px;
  background: var(--grad-green); border-radius: 2px;
}
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px; border-radius: 10px; font-weight: 600; font-size: 14px;
  letter-spacing: -0.01em; transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  cursor: pointer; border: 1px solid transparent;
}
.btn--primary {
  background: var(--grad-green); color: #042713;
  box-shadow: 0 8px 28px -8px rgba(34, 197, 94, 0.55);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -8px rgba(34, 197, 94, 0.7); }
.btn--ghost { border-color: var(--border-hi); color: var(--text); background: rgba(255,255,255,0.02); }
.btn--ghost:hover { border-color: var(--border-green); background: rgba(34, 197, 94, 0.06); transform: translateY(-1px); }

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto; padding: 120px 24px 100px;
  text-align: center; position: relative;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px; border-radius: 999px;
  background: rgba(34, 197, 94, 0.08); border: 1px solid var(--border-green);
  font-size: 12px; font-weight: 500; color: var(--green-bright);
  letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 32px;
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green-bright);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.hero__title {
  font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 800; line-height: 1.04;
  letter-spacing: -0.04em; margin-bottom: 28px;
}
.grad {
  background: var(--grad-green); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.grad-2 {
  background: var(--grad-gold); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero__sub {
  max-width: 720px; margin: 0 auto 40px; font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-dim); line-height: 1.65; font-weight: 400;
}
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 72px; }
.hero__stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  max-width: 720px; margin: 0 auto;
}
.stat {
  padding: 22px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  transition: border-color 0.2s, transform 0.2s;
}
.stat:hover { border-color: var(--border-green); transform: translateY(-2px); }
.stat__num {
  font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; line-height: 1;
  background: var(--grad-green); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent; letter-spacing: -0.04em;
}
.stat__label { font-size: 12px; color: var(--text-faint); margin-top: 8px; font-weight: 500; letter-spacing: 0.02em; }

/* ---------- sections ---------- */
.section {
  max-width: var(--maxw); margin: 0 auto; padding: 90px 24px;
  position: relative;
}
.section--alt {
  max-width: none; padding-left: 0; padding-right: 0;
  background: linear-gradient(180deg, transparent, rgba(34, 197, 94, 0.02) 30%, transparent);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.section--alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }
.section__head { margin-bottom: 56px; max-width: 760px; }
.section__num {
  display: inline-block; font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  color: var(--green-bright); letter-spacing: 0.1em; margin-bottom: 14px;
  padding: 4px 10px; border: 1px solid var(--border-green); border-radius: 6px;
  background: rgba(34, 197, 94, 0.05);
}
.section__title {
  font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 700; line-height: 1.1;
  letter-spacing: -0.03em; margin-bottom: 18px;
}
.section__title em { font-style: italic; color: var(--green-bright); font-weight: 600; }
.section__lede { font-size: clamp(1rem, 1.8vw, 1.15rem); color: var(--text-dim); line-height: 1.65; }

/* ---------- grids ---------- */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- cards ---------- */
.card {
  padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-card); transition: border-color 0.25s, transform 0.25s, background 0.25s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.4), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.card:hover { border-color: var(--border-hi); transform: translateY(-3px); background: var(--bg-card-hi); }
.card:hover::before { opacity: 1; }
.card__icon { font-size: 30px; margin-bottom: 16px; line-height: 1; }
.card h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.02em; }
.card p { color: var(--text-dim); font-size: 14.5px; line-height: 1.6; }
.card__src {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); letter-spacing: 0.01em;
}

/* ---------- feature cards (why nostr) ---------- */
.feature {
  padding: 32px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-card); transition: all 0.25s; position: relative;
}
.feature:hover { border-color: var(--border-green); transform: translateY(-3px); }
.feature__num {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--green-bright);
  margin-bottom: 16px; letter-spacing: 0.1em;
}
.feature h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 12px; letter-spacing: -0.02em; }
.feature p { color: var(--text-dim); font-size: 14.5px; line-height: 1.65; }
.feature__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.feature__tags span {
  font-family: var(--font-mono); font-size: 11px; padding: 4px 9px; border-radius: 6px;
  background: rgba(34, 197, 94, 0.08); color: var(--green-bright); border: 1px solid var(--border-green);
}
.feature--highlight {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(34, 197, 94, 0.02));
  border-color: var(--border-green);
}
.feature--highlight .feature__num { color: var(--gold); }
.feature--highlight p { color: var(--text); }
.feature--highlight strong { color: var(--green-bright); font-weight: 600; }

/* ---------- gap articles ---------- */
.gap {
  padding: 40px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-card); margin-bottom: 28px;
  scroll-margin-top: 90px; transition: border-color 0.25s;
}
.gap:hover { border-color: var(--border-hi); }
.gap__head { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.gap__num {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-green); color: #042713; font-weight: 800; font-size: 1.5rem;
  box-shadow: 0 8px 24px -8px rgba(34, 197, 94, 0.5); font-family: var(--font-mono);
}
.gap__title { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 8px; }
.gap__tag {
  display: inline-block; font-size: 11.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px;
  letter-spacing: 0.02em;
}
.gap__tag--critical { background: rgba(248, 113, 113, 0.12); color: #fca5a5; border: 1px solid rgba(248, 113, 113, 0.25); }
.gap__tag--high { background: rgba(245, 181, 68, 0.12); color: var(--gold); border: 1px solid rgba(245, 181, 68, 0.25); }
.gap__tag--medium { background: rgba(96, 165, 250, 0.12); color: var(--blue); border: 1px solid rgba(96, 165, 250, 0.25); }

.gap__body { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 28px; }
.gap__col h4 { font-size: 12px; font-weight: 600; color: var(--green-bright); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.gap__col p { color: var(--text-dim); font-size: 15px; line-height: 1.7; }
.gap__col strong { color: var(--text); font-weight: 600; }

.gap__mech { margin-bottom: 28px; }
.gap__mech:last-child { margin-bottom: 0; }
.gap__mech h4 { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 14px; letter-spacing: -0.01em; }

/* chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-family: var(--font-mono); font-size: 12px; padding: 8px 12px; border-radius: 8px;
  background: var(--bg-soft); color: var(--text-dim); border: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--border-green); color: var(--green-bright); }

/* lists */
.list { display: flex; flex-direction: column; gap: 12px; }
.list li { position: relative; padding-left: 24px; color: var(--text-dim); font-size: 14.5px; line-height: 1.65; }
.list li::before {
  content: ''; position: absolute; left: 4px; top: 9px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}
.list li strong { color: var(--text); font-weight: 600; }
.list--ordered { counter-reset: step; }
.list--ordered li { padding-left: 40px; }
.list--ordered li::before {
  content: counter(step); counter-increment: step; width: auto; height: auto;
  background: var(--grad-green); color: #042713; font-family: var(--font-mono); font-size: 11px;
  font-weight: 700; border-radius: 50%; width: 22px; height: 22px; top: 2px;
  display: flex; align-items: center; justify-content: center; box-shadow: none;
}

/* code */
.code {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; overflow-x: auto; margin: 0;
}
.code code {
  font-family: var(--font-mono); font-size: 13px; line-height: 1.7; color: var(--text);
  white-space: pre;
}
.code .k { color: var(--green-bright); }
.code .s { color: var(--gold); }

/* caveat */
.gap__caveat {
  margin-top: 28px; padding: 22px 24px; border-radius: var(--radius);
  background: rgba(245, 181, 68, 0.06); border: 1px solid rgba(245, 181, 68, 0.22);
  color: var(--text-dim); font-size: 14px; line-height: 1.65;
}
.gap__caveat strong { color: var(--gold); font-weight: 600; }
.gap__caveat em { font-style: italic; color: var(--text); }

/* ---------- limits ---------- */
.limit {
  padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-card); transition: all 0.25s; position: relative;
  border-left: 3px solid var(--red);
}
.limit:hover { border-color: var(--border-hi); border-left-color: var(--red); transform: translateY(-2px); }
.limit__num {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: #fca5a5;
  margin-bottom: 14px; letter-spacing: 0.1em;
}
.limit h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 12px; letter-spacing: -0.02em; }
.limit p { color: var(--text-dim); font-size: 14.5px; line-height: 1.65; }

/* ---------- roadmap ---------- */
.roadmap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 48px; }
.roadmap__phase {
  padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-card); transition: all 0.25s; position: relative;
}
.roadmap__phase:hover { border-color: var(--border-green); transform: translateY(-3px); }
.roadmap__phase-head { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.roadmap__phase-num {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--green-bright);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.roadmap__phase-head h3 { font-size: 1.3rem; font-weight: 700; margin: 8px 0 10px; letter-spacing: -0.02em; }
.roadmap__phase-tag {
  display: inline-block; font-size: 11.5px; font-weight: 500; color: var(--text-faint);
  font-family: var(--font-mono);
}

.callout {
  display: flex; gap: 24px; align-items: flex-start;
  padding: 32px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.02));
  border: 1px solid var(--border-green);
}
.callout__icon {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-green); color: #042713; font-size: 28px; font-weight: 900;
}
.callout h4 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.02em; }
.callout p { color: var(--text); font-size: 15px; line-height: 1.65; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); }
.table { width: 100%; border-collapse: collapse; min-width: 600px; }
.table th {
  text-align: left; padding: 18px 22px; font-size: 12px; font-weight: 600;
  color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-hi); background: var(--bg-soft);
}
.table td {
  padding: 16px 22px; font-size: 14px; color: var(--text-dim);
  border-bottom: 1px solid var(--border); vertical-align: top;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(34, 197, 94, 0.025); }
.table td:first-child { color: var(--text); font-weight: 500; }
.table code { font-family: var(--font-mono); font-size: 12.5px; color: var(--green-bright); background: rgba(34, 197, 94, 0.08); padding: 2px 7px; border-radius: 5px; }
.table--nips td:nth-child(4) { color: var(--text-dim); }
.win { font-weight: 600; font-size: 13px; }
.win--nostr { color: var(--green-bright); }
.win--incumbent { color: var(--gold); }
.win--both { color: var(--blue); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 56px 24px; margin-top: 40px; background: var(--bg-soft); }
.footer__inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: start; }
.footer__brand { display: flex; gap: 16px; align-items: center; }
.footer__mark {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-green); color: #042713; font-size: 24px; font-weight: 900;
}
.footer__title { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; }
.footer__sub { color: var(--text-dim); font-size: 13px; margin-top: 4px; }
.footer__note p { color: var(--text-faint); font-size: 13px; line-height: 1.6; }
.footer__meta { margin-top: 14px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); opacity: 0.7; }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .roadmap { grid-template-columns: 1fr; }
  .gap__body { grid-template-columns: 1fr; gap: 24px; }
  .footer__inner { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav__links {
    position: fixed; top: 60px; left: 0; right: 0; flex-direction: column;
    background: rgba(7, 9, 10, 0.98); backdrop-filter: blur(14px);
    padding: 24px; gap: 18px; border-bottom: 1px solid var(--border);
    transform: translateY(-120%); transition: transform 0.3s; z-index: 99;
  }
  .nav__links.open { transform: translateY(0); }
  .nav__toggle { display: flex; }
  .hero { padding: 80px 20px 60px; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 64px 20px; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .gap { padding: 24px; }
  .gap__head { flex-direction: column; gap: 14px; }
  .gap__num { width: 48px; height: 48px; font-size: 1.25rem; }
  .callout { flex-direction: column; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
