/* ONYX Academy · shared design tokens + primitives (landing + app + admin) */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=Instrument+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg: #0a0b0e;
  --bg-2: #101217;
  --panel: #14171d;
  --panel-2: #1a1e26;
  --line: #262a33;
  --line-2: #323744;
  --text: #ebe9e4;
  --muted: #8d93a0;
  --dim: #5f6572;
  --amber: #ffb224;
  --amber-ink: #1a1203;
  --amber-glow: rgba(255, 178, 36, .16);
  --r: #ff5a5f;
  --g: #3fe08a;
  --b: #5a9bff;
  --ok: #3fe08a;
  --warn: #ffb224;
  --bad: #ff5a5f;
  --radius: 12px;
  --radius-sm: 8px;
  --f-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.22, .8, .28, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--amber); color: var(--amber-ink); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  background: var(--amber); color: var(--amber-ink); font-weight: 700; border: 0; cursor: pointer;
  padding: .75em 1.3em; border-radius: var(--radius-sm); text-decoration: none; min-height: 44px;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s;
  box-shadow: 0 0 0 0 var(--amber-glow);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 8px 28px -6px rgba(255, 178, 36, .45); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); box-shadow: none; }
.btn.ghost:hover { border-color: var(--amber); color: var(--amber); }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid #4b2427; box-shadow: none; }
.btn.sm { min-height: 34px; padding: .35em .8em; font-size: .88rem; }
.btn.lg { min-height: 54px; padding: .9em 1.8em; font-size: 1.08rem; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.chip { display: inline-flex; align-items: center; gap: .4em; padding: .15em .65em; border-radius: 99px; font-size: .78rem; font-weight: 600; border: 1px solid var(--line-2); color: var(--muted); background: var(--bg-2); }
.chip.amber { color: var(--amber); border-color: rgba(255, 178, 36, .4); background: var(--amber-glow); }
.chip.ok { color: var(--ok); border-color: rgba(63, 224, 138, .35); }
.chip.bad { color: var(--bad); border-color: rgba(255, 90, 95, .35); }

.field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.field > label { font-size: .86rem; color: var(--muted); font-weight: 600; }
.in, select.in, textarea.in {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: .7em .9em; min-height: 44px; transition: border-color .15s, box-shadow .15s;
}
.in:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-glow); }
.in.bad { border-color: var(--bad); }
.hint { font-size: .82rem; color: var(--dim); }
.err { color: var(--bad); font-size: .9rem; }

code, kbd, .cmd { font-family: var(--f-mono); font-size: .88em; }
code { background: var(--bg-2); border: 1px solid var(--line); padding: .08em .4em; border-radius: 5px; color: #ffd98a; }
kbd { background: var(--panel-2); border: 1px solid var(--line-2); border-bottom-width: 2px; padding: .08em .45em; border-radius: 5px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.6rem 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
