/* Base layer — reset, typography defaults, and shared primitives
   (buttons, inputs, pills, mono-eyebrows). Built on tokens.css. */

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-text);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
}

a {
  color: var(--pine);
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

/* Mono eyebrow — metadata, statuslabels, gesprekstype */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow--brass {
  color: var(--brass);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.7em 1.25em;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-text);
  font-weight: 600;
  font-size: var(--text-sm);
  line-height: 1;
  transition: background var(--duration-fast) var(--ease-out-expo),
    border-color var(--duration-fast) var(--ease-out-expo),
    transform var(--duration-fast) var(--ease-out-expo),
    box-shadow var(--duration-fast) var(--ease-out-expo);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--pine);
  color: var(--surface);
}

.btn--primary:hover {
  background: var(--pine-soft);
}

.btn--ghost {
  background: transparent;
  color: var(--pine);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  background: var(--surface-warm);
  border-color: var(--pine-soft);
}

/* Brass button — reserved for the signing/sealing moment only */
.btn--seal {
  background: var(--brass);
  color: var(--surface);
  box-shadow: 0 6px 18px var(--brass-glow);
}

.btn--seal:hover {
  background: var(--brass-soft);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn--text {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0.25em 0.5em;
  font-size: var(--text-sm);
}

.btn--text:hover {
  color: var(--pine);
}

/* Inputs */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field > label {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.7em 0.85em;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font-text);
  font-size: var(--text-base);
  color: var(--ink);
  transition: border-color var(--duration-fast) var(--ease-out-expo),
    box-shadow var(--duration-fast) var(--ease-out-expo);
}

.textarea {
  min-height: 7rem;
  resize: vertical;
  line-height: 1.55;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--pine-soft);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--pine);
  box-shadow: 0 0 0 3px rgba(30, 58, 48, 0.12);
}

/* Status pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.3em 0.7em;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--sage);
  color: var(--pine);
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.pill--planned { background: #EFEBE2; color: var(--status-planned); }
.pill--filled { background: var(--sage); color: var(--status-filled); }
.pill--signed { background: #F3E7CF; color: var(--status-signed); }
.pill--registered { background: #E4EAE2; color: var(--status-registered); }

/* Tag (afdeling / mono chip) */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25em 0.6em;
  border-radius: var(--radius-sm);
  background: var(--surface-warm);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Focus-visible — keyboard focus in brass */
:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Visually hidden but available to screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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