/* Javelin landing page — slate + indigo theme (from docs/javelin-design.md) */

:root {
  --app: #0E1116;
  --surface: #171B22;
  --raised: #1E232C;
  --border: #272D38;
  --text: #E6E9EF;
  --muted: #9BA3B2;
  --accent: #6366F1;
  --accent-hover: #7C7CF5;
  --accent-soft: rgba(99, 102, 241, 0.14);
  --str: #8be9a3;
  --radius: 14px;
  --wrap: 1120px;
  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--app);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }

/* ----------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, background .2s ease, border-color .2s ease;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 8px 16px; font-size: 14px; }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 6px 20px -8px var(--accent); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--accent); color: #fff; }

/* --------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 17, 22, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; }
.brand__mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  color: #fff; background: linear-gradient(135deg, var(--accent), #4f46e5);
  box-shadow: 0 4px 14px -4px var(--accent);
}
.nav__links { display: flex; align-items: center; gap: 28px; font-weight: 500; color: var(--muted); }
.nav__links a:hover { color: var(--text); }
.nav__links .btn { color: #fff; }
.nav__discord { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.nav__discord svg { display: block; }
.nav__discord:hover { color: #5865F2; }
.nav__toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; }

/* -------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; padding: 84px 0 72px; }
.hero__glow {
  position: absolute; inset: -20% 0 auto 0; height: 560px; pointer-events: none;
  background: radial-gradient(55% 60% at 75% 25%, rgba(99,102,241,0.30), transparent 70%);
  filter: blur(10px);
}
.hero__inner {
  position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 52px; align-items: center;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: .18em; font-size: 12.5px; font-weight: 700;
  color: var(--accent-hover); margin: 0 0 18px;
}
.hero__title { font-size: clamp(38px, 5.6vw, 62px); font-weight: 800; }
.hero__lede { max-width: 560px; color: var(--muted); font-size: clamp(16px, 2.2vw, 19px); margin: 22px 0 32px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* code window chrome, shared by the hero visual */
.window {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 30px 70px -34px rgba(0,0,0,0.85);
}

/* ------------------------------------------------------- code blocks */
.codebar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px; background: var(--raised); border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; background: #3a4150; }
.dot:nth-child(1) { background: #ff5f57; } .dot:nth-child(2) { background: #febc2e; } .dot:nth-child(3) { background: #28c840; }
.codebar__name { margin-left: 10px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

.code { margin: 0; padding: 18px 20px; font-family: var(--mono); overflow-x: auto;
  font-size: 13px; line-height: 1.7; color: #cdd3de; background: var(--surface); }
.code--sm { font-size: 12.5px; line-height: 1.75; }
.t-mut { color: var(--muted); } .t-acc { color: var(--accent-hover); } .t-str { color: var(--str); }
.t-arrow { color: var(--accent); font-style: normal; }

/* syntax highlighting tokens, themed to the indigo palette */
.tok-key { color: #7C7CF5; }              /* keywords — indigo accent */
.tok-typ { color: #C7D2FE; }              /* types — light indigo */
.tok-str { color: var(--str); }           /* strings — green */
.tok-num { color: #E3B341; }              /* numbers — amber */
.tok-com { color: #6B7384; font-style: italic; } /* comments — muted */

/* ------------------------------------------------------------- stats */
.stats { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; }
.stat { padding: 34px 20px; text-align: center; }
.stat__num { display: block; font-size: 42px; font-weight: 800; color: #fff; letter-spacing: -0.03em; }
.stat__plus { color: #fff; }
.stat__label { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }

/* ----------------------------------------------------------- sections */
.section { padding: 84px 0; scroll-margin-top: 72px; }
.section--alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section__head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.section__head p { color: var(--muted); font-size: 17px; margin: 14px 0 0; }

/* ---------------------------------------------------------- features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: transform .15s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card__icon {
  width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-hover); margin-bottom: 16px;
}
.card__icon svg { width: 23px; height: 23px; }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* -------------------------------------------------------------- demo */
.demo { max-width: 920px; margin: 0 auto; }
.demo__tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--raised); border: 1px solid var(--border); border-radius: 11px; margin-bottom: 18px; }
.demo__tab {
  border: 0; background: none; color: var(--muted); font-family: inherit; font-weight: 600;
  font-size: 14px; padding: 8px 18px; border-radius: 8px; cursor: pointer; transition: all .15s ease;
}
.demo__tab.is-active { background: var(--accent); color: #fff; }
.demo__panel { display: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.demo__panel.is-active { display: block; }

/* ----------------------------------------------------------- pricing */
.pricing { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; align-items: start; max-width: 760px; margin: 0 auto; }
.plan {
  background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; display: flex; flex-direction: column;
}
.plan--featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 24px 50px -28px var(--accent); position: relative; }
.plan__badge {
  position: absolute; top: -12px; left: 26px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; margin: 0;
}
.plan__name { font-size: 20px; }
.plan__price { margin: 14px 0 4px; }
.plan__amt { font-size: 40px; font-weight: 800; color: #fff; letter-spacing: -0.03em; }
.plan__per { color: var(--muted); font-size: 15px; margin-left: 6px; }
.plan__note { color: var(--muted); font-size: 13.5px; margin: 0 0 20px; }
.plan__list { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 11px; }
.plan__list li { position: relative; padding-left: 26px; color: var(--text); font-size: 14.5px; }
.plan__list li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 15px; height: 9px;
  border-left: 2px solid var(--accent-hover); border-bottom: 2px solid var(--accent-hover);
  transform: rotate(-45deg);
}
.plan__cta { margin-top: auto; width: 100%; }

/* ------------------------------------------------------------ footer */
.footer { border-top: 1px solid var(--border); padding: 44px 0; }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.footer__line { color: var(--muted); margin: 0; }
.footer__copy { color: var(--muted); font-size: 13px; margin: 0; opacity: .8; }

/* -------------------------------------------------------- login page */
.auth { min-height: 100vh; display: flex; flex-direction: column; }
.auth__top { padding: 20px 0; border-bottom: 1px solid var(--border); }
.auth__main {
  flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 24px;
}
.auth__card {
  width: 100%; max-width: 400px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 34px 30px 30px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8);
}
.auth__title { font-size: 24px; }
.auth__sub { color: var(--muted); font-size: 14.5px; margin: 7px 0 24px; }
.auth__back { display: inline-block; margin-top: 20px; color: var(--muted); font-size: 14px; }
.auth__back:hover { color: var(--text); }

/* --------------------------------------------------------- login form */
.loginform { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field__label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field__input {
  width: 100%; padding: 11px 13px; font-size: 15px; font-family: inherit;
  color: var(--text); background: var(--app); border: 1px solid var(--border);
  border-radius: 10px; transition: border-color .2s ease, box-shadow .2s ease;
}
.field__input::placeholder { color: #5C6475; }
.field__input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.loginform__submit { width: 100%; margin-top: 4px; }
.loginform__submit[disabled] { opacity: .65; cursor: default; }
.loginform__msg {
  margin: 0; font-size: 14px; padding: 10px 12px; border-radius: 9px;
  background: var(--raised); border: 1px solid var(--border); color: var(--muted);
}
.loginform__msg[hidden] { display: none; }
.loginform__msg.is-error { border-color: #D9607A; color: #F0A9B8; }

/* ------------------------------------------------------------- toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--raised); color: var(--text); border: 1px solid var(--accent);
  padding: 13px 20px; border-radius: 11px; font-size: 14.5px; font-weight: 500;
  box-shadow: 0 20px 40px -18px rgba(0,0,0,0.9); opacity: 0; pointer-events: none;
  transition: opacity .22s ease, transform .22s ease; z-index: 80; max-width: calc(100vw - 32px);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------- responsive */
@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; gap: 36px; }
  .hero__visual { order: 2; }
  .features, .pricing { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .plan--featured { order: -1; }
}

@media (max-width: 680px) {
  .nav__links {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 0;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 14px 24px; }
  .nav__links .btn { margin: 8px 24px; }
  .nav__toggle { display: inline-flex; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 60px 0; }
}

/* Javelin is a dark-themed brand (it matches the app's dark FlatLaf theme), so the
   page keeps its dark palette in every OS theme. The :root tokens above are the one
   source of truth; change them there to retheme. */
:root { color-scheme: dark; }
