/* Shared design tokens — type scale, spacing, buttons */

:root {
  /* Typography — 1.333 ratio, 16px base */
  --text-xs: 0.75rem;   /* 12px */
  --text-sm: 1rem;      /* 16px */
  --text-md: 1.3125rem; /* 21px */
  --text-lg: 1.75rem;   /* 28px */
  --text-xl: 2.3125rem; /* 37px */
  --text-2xl: 3.125rem; /* 50px */
  --leading-heading: 1.2;
  --leading-body: 1.5;
  --weight-heading: 700;
  --weight-body: 400;

  /* Spacing — 8px unit scale */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;

  /* Aliases for existing section spacing */
  --space-section: clamp(var(--space-5), 12vh, var(--space-6));
  --space-block: clamp(var(--space-4), 5vw, var(--space-5));

  --radius-btn: 4px;
  --gray-readable: #666;
  --gray-muted: #555;
}

/* Base typography (pages may override font-family) */
body {
  font-size: var(--text-sm);
  line-height: var(--leading-body);
  font-weight: var(--weight-body);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-heading);
  line-height: var(--leading-heading);
}

/* Minimum readable mono label size */
.label-mono,
.mono-label {
  font-size: var(--text-xs);
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-btn);
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  min-height: 44px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--primary {
  background: var(--red, #ff3000);
  color: #fff;
  padding: 12px 24px;
  border-color: var(--red, #ff3000);
}

.btn--primary:hover {
  background: #e02800;
  border-color: #e02800;
  color: #fff;
}

.btn--secondary {
  background: #fff;
  color: var(--red, #ff3000);
  padding: 12px 24px;
  border: 2px solid var(--red, #ff3000);
}

.btn--secondary:hover {
  background: var(--red, #ff3000);
  color: #fff;
}

.btn--tertiary {
  background: transparent;
  color: var(--red, #ff3000);
  padding: 12px 24px;
  border-color: transparent;
}

.btn--tertiary:hover {
  background: rgba(255, 48, 0, 0.08);
}

/* Dark surface variants */
.btn--secondary-on-dark {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.btn--secondary-on-dark:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn--tertiary-on-dark {
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  border-color: transparent;
}

.btn--tertiary-on-dark:hover {
  color: #fff;
}

/* Blue accent (B2B vertical on homepage) */
.btn--primary-blue {
  background: var(--blue, #1b4fe4);
  color: #fff;
  padding: 12px 24px;
  border-color: var(--blue, #1b4fe4);
}

.btn--primary-blue:hover {
  background: var(--ink, #000);
  border-color: var(--ink, #000);
  color: #fff;
}

.btn--secondary-blue {
  background: transparent;
  color: var(--blue, #1b4fe4);
  padding: 12px 24px;
  border: 2px solid var(--blue, #1b4fe4);
}

.btn--secondary-blue:hover {
  background: var(--blue, #1b4fe4);
  color: #fff;
}

/* Featured pricing card on dark bg */
.price-card.featured .btn--secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.price-card.featured .btn--secondary:hover {
  background: var(--red, #ff3000);
  border-color: var(--red, #ff3000);
  color: #fff;
}

/* ——— Form primitives ——— */
.form-field label,
.field label {
  display: block;
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  color: var(--ink, #000);
  margin-bottom: var(--space-1);
}

.form-field input,
.form-field select,
.form-field textarea,
.field input,
.field select,
.field textarea {
  width: 100%;
  font-size: var(--text-sm);
  line-height: var(--leading-body);
  padding: var(--space-1) 12px;
  border: 2px solid var(--ink, #000);
  border-radius: var(--radius-btn);
  background: var(--paper, #fff);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  box-shadow: inset 0 -2px 0 var(--red, #ff3000);
}

fieldset.form-group {
  border: none;
  padding: 0;
  margin: 0 0 var(--space-3);
}

fieldset.form-group legend {
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-readable, #666);
  margin-bottom: var(--space-2);
  padding: 0;
}

@media (max-width: 760px) {
  .btn-stack .btn,
  .work-cta .btn,
  .form-actions .btn,
  .acta-left .btn,
  .acta-right .btn,
  .price-card .btn {
    width: 100%;
    text-align: center;
  }
}
