/* Nexura — design tokens & shared UI primitives */

:root {
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --ink: #0b1220;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #ffffff;
  --mist: #f1f5f9;
  --mist-deep: #e2e8f0;

  --accent: #0f766e;
  --accent-hover: #0d9488;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --accent-glow: rgba(13, 148, 136, 0.35);

  --violet: #5b21b6;
  --violet-soft: rgba(91, 33, 182, 0.1);

  --danger: #dc2626;
  --success: #059669;
  --warn: #d97706;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.12);

  --focus: 0 0 0 3px var(--accent-glow);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--mist);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.display-font {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--mist);
  padding: 0.12em 0.38em;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
}

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

/* Buttons */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  border: none;
  padding: 0.55rem 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition:
    transform 0.08s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.btn-primary {
  background: linear-gradient(165deg, var(--accent-hover), var(--accent));
  color: #fff;
  box-shadow: var(--shadow-sm), 0 8px 20px var(--accent-soft);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-secondary {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--muted);
  background: var(--mist);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  background: var(--mist);
  color: var(--ink);
}

.btn-sm {
  padding: 0.38rem 0.72rem;
  font-size: 0.8125rem;
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 0.75rem 1.35rem;
  font-size: 1rem;
}

.btn[disabled],
.btn.disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Inputs */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-label {
  font-size: 0.78rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.input {
  font: inherit;
  padding: 0.62rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  width: 100%;
  transition:
    border-color 0.12s,
    box-shadow 0.12s;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus);
}

.input-sm {
  padding: 0.4rem 0.55rem;
  font-size: 0.875rem;
}

.textarea {
  resize: vertical;
  min-height: 88px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-muted {
  background: var(--mist);
  color: var(--muted);
}

.badge-soon {
  background: var(--mist-deep);
  color: var(--ink-soft);
}

.badge-ok {
  background: #d1fae5;
  color: #065f46;
}

.badge-bad {
  background: #fee2e2;
  color: #991b1b;
}

.banner {
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.banner-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.banner-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.card-surface {
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
