/**
 * OPEX base — typography, links, forms, utilities
 * Display: Archivo · Body: Source Sans 3 · Mono: IBM Plex Mono
 */
html {
  font-size: 16px;
}

body {
  font-family: var(--opex-font);
  font-weight: 400;
  font-size: var(--opex-text-base);
  line-height: 1.6;
  color: var(--opex-text);
  background: var(--opex-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1, 'liga' 1;
  overflow-x: clip;
}

h1,
h2,
h3,
h4 {
  font-family: var(--opex-font-display);
  font-weight: 700;
  line-height: 1.12;
  color: var(--opex-black);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h1 {
  font-size: var(--opex-text-4xl);
  font-weight: 800;
  letter-spacing: -0.045em;
}

h2 {
  font-size: var(--opex-text-3xl);
  font-weight: 700;
}

h3 {
  font-size: var(--opex-text-2xl);
  font-weight: 700;
}

h4 {
  font-size: var(--opex-text-xl);
  font-weight: 600;
  letter-spacing: -0.025em;
}

p {
  max-width: 65ch;
}

p + p {
  margin-top: var(--opex-space-4);
}

a:hover {
  color: var(--opex-black);
}

strong,
b {
  font-weight: 600;
}

small {
  font-size: var(--opex-text-sm);
}

hr {
  border: 0;
  border-top: 1px solid var(--opex-border);
  margin: var(--opex-space-8) 0;
}

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--opex-space-2);
}

.field__label {
  font-size: var(--opex-text-sm);
  font-weight: 500;
  color: var(--opex-text);
}

.field__hint {
  font-size: var(--opex-text-xs);
  color: var(--opex-muted);
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--opex-border);
  border-radius: var(--opex-radius-sm);
  background: var(--opex-surface);
  color: var(--opex-text);
  transition: border-color var(--opex-transition);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: #c8c8c2;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--opex-accent);
  outline: 2px solid var(--opex-accent-soft);
  outline-offset: 1px;
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

/* Utilities */
.u-muted {
  color: var(--opex-muted);
}

.u-accent {
  color: var(--opex-accent);
}

.u-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.u-text-center {
  text-align: center;
}

.u-nowrap {
  white-space: nowrap;
}
