/* ──────────────────────────────────────────────────────────────────────
   COMPONENTS — reusable UI parts. Style the THING, not the page.
   Use these on every page; never restyle them per-page.
   ────────────────────────────────────────────────────────────────────── */

/* ── Typography components ──────────────────────────────────────── */
.display {
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  color: var(--color-ink-soft);
  line-height: 1.1;
}
.display--xl { font-size: var(--text-8xl); line-height: 80px; }
.display--lg { font-size: var(--text-6xl); }
.display--md { font-size: var(--text-5xl); }
.display--sm { font-size: var(--text-4xl); }
.display--xs { font-size: var(--text-2xl); }

.eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-amber-900);
}

.lede {
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
  color: var(--color-text-subtle);
  line-height: 30px;
}

.text-muted { color: var(--color-text-subtle); font-weight: var(--weight-medium); }
.text-body  { color: var(--color-text-muted); font-weight: var(--weight-medium); line-height: 24px; }
.link {
  color: var(--color-amber-400);
  text-decoration: underline;
  cursor: pointer;
  font-weight: var(--weight-medium);
}

/* The wordmark — used in nav and anywhere the brand appears. */
.wordmark {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: var(--weight-regular);
  font-variant: small-caps;
  letter-spacing: 0.05em;
  color: var(--color-ink);
}

/* ── Badge / tag ───────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: var(--space-1) 14px;
  border-radius: var(--radius-pill);
  background: var(--color-amber-100);
  border: 1px solid var(--color-amber-50);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-amber-900);
}
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--color-amber-100);
  color: var(--color-amber-900);
  border: 1px solid var(--color-amber-50);
}

/* ── Button ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
  border-radius: var(--radius-lg);
  white-space: nowrap;
  transition: transform var(--ease-quick), box-shadow var(--ease-quick);
}

/* Sizes */
.btn--sm { height: 40px; padding: 0 18px; font-size: var(--text-base); font-weight: var(--weight-medium); }
.btn--md { height: 46px; padding: 0 22px; font-size: var(--text-base); font-weight: var(--weight-bold); }
.btn--lg { height: 56px; padding: 0 36px; font-size: var(--text-lg); font-weight: var(--weight-bold); }
.btn--xl { height: 56px; padding: 0 48px; font-size: var(--text-lg); font-weight: var(--weight-bold); }

/* Variants */
.btn--ghost {
  background: transparent;
  color: var(--color-text);
  font-weight: var(--weight-medium);
}
.btn--secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border-input);
  box-shadow: var(--shadow-xs);
  font-weight: var(--weight-medium);
}
.btn--primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-cta);
}
.btn--primary-flat {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-cta-flat);
}
.btn--cta {
  background: var(--gradient-cta);
  color: #fff;
  border: 1px solid var(--color-amber-50);
  box-shadow: var(--shadow-inset-cta);
  font-weight: var(--weight-medium);
}

/* ── Card ───────────────────────────────────────────────────────── */
.card {
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.card--interactive { cursor: pointer; }

/* ── Input ──────────────────────────────────────────────────────── */
.input {
  height: 46px;
  padding: 0 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-input);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-ink-soft);
  outline: none;
  transition: border-color var(--ease-quick), box-shadow var(--ease-quick);
  width: 100%;
}
.input:focus {
  border-color: var(--color-amber-500);
  box-shadow: 0 0 0 3px rgba(246, 177, 65, 0.18);
}

/* ── Nav (top bar primitive) ────────────────────────────────────── */
.nav {
  height: 76px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-padding-x);
}
.nav-link {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  cursor: pointer;
}

/* ── Modal ──────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(3px);
}
.modal-box {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  width: 460px;
  max-width: 90vw;
  box-shadow: var(--shadow-modal);
}
.modal-box h3 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-regular);
  color: var(--color-ink-soft);
  margin-bottom: var(--space-1);
}
.modal-box p {
  font-size: 14px;
  font-weight: var(--weight-medium);
  color: var(--color-text-subtle);
  margin-bottom: 28px;
}
.modal-form {
  display: flex;
  gap: 10px;
}
.modal-form .input { flex: 1; }
.modal-close {
  float: right;
  background: none;
  border: none;
  font-size: 22px;
  color: #AAB;
  cursor: pointer;
  line-height: 1;
  margin: -8px -8px var(--space-3) 0;
}
.modal-success {
  text-align: center;
  padding: var(--space-4) 0 var(--space-1);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
}
.modal-success strong { color: var(--color-amber-900); }
