/* ══ NEST button system ══════════════════════════════════════════════════════
   One definition for every page. Three tiers:
     .btn.btn-primary    Book a free call only. One per screen.
     .btn.btn-secondary  Take the assessment, and every form's main action.
     .btn-tertiary       Underlined text link: Log in, Book a call in the nav, minor actions.
   Most sections are black, so the dark-surface colours are the default. Inside a cream
   panel (.ivory, .on-light, .surface-light) the buttons switch to ink on cream.
   Colours are brand values only: ink #1A1612, ivory #F0EBE0, copper #B87333, white,
   black. Contrast: see the PR description.
   ══════════════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Barlow';
  src: url('../fonts/barlow-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --btn-ink: #1A1612;
  --btn-ivory: #F0EBE0;
  --btn-copper: #B87333;
}

/* Primary and secondary share one shape. Dark-surface primary by default. */
.btn {
  --btn-bg: var(--btn-ivory);
  --btn-fg: var(--btn-ink);
  --btn-bd: var(--btn-ivory);
  --btn-bg-hover: #FFFFFF;
  --btn-fg-hover: var(--btn-ink);
  --btn-bd-hover: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-height: 48px;
  padding: 0 24px;
  border: 1.5px solid var(--btn-bd);
  border-radius: 3px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: 'Barlow', var(--sans, sans-serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.btn-secondary {
  --btn-bg: transparent;
  --btn-fg: var(--btn-ivory);
  --btn-bd: var(--btn-ivory);
  --btn-bg-hover: transparent;
  --btn-fg-hover: #FFFFFF;
  --btn-bd-hover: #FFFFFF;
}

/* Cream panels: the brief's spec as written. */
.ivory .btn,
.on-light .btn,
.surface-light .btn {
  --btn-bg: var(--btn-ink);
  --btn-fg: var(--btn-ivory);
  --btn-bd: var(--btn-ink);
  --btn-bg-hover: #000000;
  --btn-fg-hover: var(--btn-ivory);
  --btn-bd-hover: #000000;
}

.ivory .btn-secondary,
.on-light .btn-secondary,
.surface-light .btn-secondary {
  --btn-bg: transparent;
  --btn-fg: var(--btn-ink);
  --btn-bd: var(--btn-ink);
  --btn-bg-hover: transparent;
  --btn-fg-hover: #000000;
  --btn-bd-hover: #000000;
}

.btn:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-fg-hover);
  border-color: var(--btn-bd-hover);
}

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

.btn-arrow {
  display: inline-block;
  transition: transform 150ms ease;
}

.btn:hover .btn-arrow { transform: translateX(4px); }

/* Tertiary: an underlined text link with a full 44px touch target. */
.btn-tertiary {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  min-height: 44px;
  min-width: 44px;
  color: var(--btn-ivory);
  font-family: 'Barlow', var(--sans, sans-serif);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 150ms ease;
}

.btn-tertiary:hover { color: #FFFFFF; }

button.btn-tertiary {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.ivory .btn-tertiary,
.on-light .btn-tertiary,
.surface-light .btn-tertiary { color: var(--btn-ink); }

.ivory .btn-tertiary:hover,
.on-light .btn-tertiary:hover,
.surface-light .btn-tertiary:hover { color: #000000; }

/* Every interactive element gets the same ring. :where() keeps specificity at zero. */
:where(a[href], button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 2px solid var(--btn-copper);
  outline-offset: 3px;
}

.btn:focus-visible,
.btn-tertiary:focus-visible {
  outline: 2px solid var(--btn-copper);
  outline-offset: 3px;
}

@media (max-width: 479px) {
  .hero .btn-primary { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn-arrow,
  .btn-tertiary { transition: none; }
}
