/* ============================================================
   Luafy — shared design system
   Dark, minimal, editorial. Green accent + lemon mark.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg:       #0a0a0b;
  --bg-1:     #101012;
  --bg-2:     #16161a;
  --bg-3:     #1d1d22;
  --line:     rgba(255,255,255,.08);
  --line-2:   rgba(255,255,255,.14);

  --text:     #f4f4f1;
  --muted:    #a0a09b;
  --faint:    #6a6a66;

  --green:    #8b6cff;   /* brand accent (violet) */
  --green-2:  #7a57f5;
  --green-ink:#0c0a1a;   /* dark ink for text on accent */
  --lemon:    #b9a3ff;   /* pale moon highlight */
  --glow:     rgba(139,108,255,.55);

  --sans: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1180px;
  --radius: 16px;
  --radius-lg: 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--green); color: var(--green-ink); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

.serif-it { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  letter-spacing: -0.01em;
  padding: 11px 18px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, opacity .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 6px 20px -8px var(--glow); }
.btn-green:hover { background: #9a7eff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--bg-2); border-color: var(--line-2); }
.btn-soft { background: var(--bg-2); color: var(--text); border-color: var(--line); }
.btn-soft:hover { background: var(--bg-3); }
.btn-lg { padding: 14px 24px; font-size: 16px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,11,.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 28px;
  height: 66px; display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 11px; }
/* crescent-moon mark — "Lua" = moon */
.brand .lemon {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(150deg, #7a57f5, #5b3ee0);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 12px -3px var(--glow);
  position: relative; overflow: hidden;
}
.brand .lemon::before { /* moon disc */
  content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%;
  top: 7px; left: 6px; background: #f1ecff;
}
.brand .lemon::after { /* carve crescent with tile-colored disc */
  content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%;
  top: 4px; left: 10px; background: #6a48ec;
}
.brand .name { font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
.tag {
  font-size: 11px; font-weight: 600; color: var(--faint);
  border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px;
  text-transform: lowercase; letter-spacing: 0;
}
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-links a {
  color: var(--muted); font-size: 15px; font-weight: 500;
  padding: 8px 13px; border-radius: 9px; transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--bg-2); }
.nav-links a.active { color: var(--text); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; border: 1px solid var(--line-2); flex: none; }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* striped image placeholder */
.ph {
  position: relative; overflow: hidden; border-radius: 12px;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 10px, transparent 10px 20px),
    var(--bg-2);
  border: 1px solid var(--line);
  display: grid; place-items: center;
}
.ph span { font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: 0; padding: 4px 8px; text-align: center; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 120px; }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 56px 28px;
  display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between;
}
.footer .brand .name { font-size: 18px; }
.footer-col h4 { font-size: 13px; color: var(--faint); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.footer-col a { display: block; color: var(--muted); font-size: 15px; padding: 5px 0; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--line); }
.footer-bottom .wrap { display: flex; justify-content: space-between; padding-top: 22px; padding-bottom: 22px; color: var(--faint); font-size: 13px; }

/* ---------- generic section ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--green);
  letter-spacing: .04em; text-transform: uppercase; margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.05; font-weight: 800; }

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

/* ---------- discord pill (shared) ---------- */
.discord {
  display: inline-flex; align-items: center; gap: 11px;
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 11px 16px; border-radius: 14px; transition: background .15s, border-color .15s;
}
.discord:hover { background: var(--bg-3); border-color: var(--line-2); }
.discord .d-ico { width: 30px; height: 30px; border-radius: 8px; background: #5865f2; display: grid; place-items: center; color: #fff; flex: none; }
.discord .d-t { font-size: 14px; font-weight: 700; line-height: 1.2; }
.discord .d-s { font-size: 12px; color: var(--muted); }

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Luau syntax highlighting ---------- */
.c-kw  { color: #c4b0ff; font-weight: 600; }
.c-str { color: #8fe3b0; }
.c-com { color: #6a6a78; font-style: italic; }
.c-num { color: #79c7ff; }
.c-fn  { color: #ffd479; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-links { display: none; }
}
