/* button.css — THE BUTTON LAW, a verbatim copy of the block in site/styles.css.
 *
 * WHY THIS FILE EXISTS. Founder 2026-08-04: "the add to cart button is not correct ... you
 * violated the rule of buttons fucking yet again. why does it keep fucking happening."
 *
 * Because /templates/ never loaded styles.css. It links catalogue.css, variants.css and
 * standfirst.css and nothing else, so `.btn` and `.btn-primary` are UNDEFINED on the page
 * that sells the templates. Every button there is bespoke by construction, and the card's buy
 * control was duly minted as its own class with its own geometry, hover and transition -
 * which is also what kept magnetic.js's spring from running on it, since a second
 * `transition` on the element fights the inline transform the spring writes.
 *
 * The obvious fix, moving the block out of styles.css, is WRONG: 275 files under site/demos/
 * and ~20 other pages take `.btn` from styles.css and are stamped with nothing. Moving it
 * silently unstyles every sold template's demo.
 *
 * So the block lives in both places and scripts/site/check-button-law.mjs fails the build if
 * they differ by a byte. Two copies with a gate is honest. Two copies without one is how this
 * happened.
 *
 * DO NOT EDIT THIS FILE BY HAND. Edit site/styles.css and run
 * `node scripts/site/check-button-law.mjs --write`.
 */
.btn {
  font-family: var(--body);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-button);
  padding: 13px 25px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid transparent;
  text-align: center;
  /* the funnel's recipe: colours ease, the TRANSFORM springs past its target and
     settles back. .3s is the funnel's duration — long enough to see the overshoot. */
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    color 0.2s ease,
    transform 0.3s var(--spring);
}
.btn:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}
/* The arrow inside a button slides on hover, the way the funnel's Next chevron does.
   Named classes ONLY, never a bare `.btn svg`: the plumb-line CTA hangs a whole drawn
   SVG off its own button, and a blanket rule shoved that sideways on hover. */
.btn .chev-n,
.btn .btn-arw,
.btn .btn-arw-down {
  transition: transform 0.4s var(--flow);
}
.btn:hover .chev-n,
.btn:hover .btn-arw {
  transform: translateX(3px);
}
.btn:hover .btn-arw-down {
  transform: translateY(3px);
} /* a down arrow nudges down */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn .chev-n,
  .btn .btn-arw,
  .btn .btn-arw-down,
  .nav-cta {
    transition: none;
  }
  .btn:hover,
  .btn:active,
  .nav-cta:hover,
  .nav-cta:active {
    transform: none;
  }
  .btn:hover .chev-n,
  .btn:hover .btn-arw,
  .btn:hover .btn-arw-down {
    transform: none;
  }
}
.btn-primary {
  background: var(--accent-btn);
  color: var(--accent-btn-ink);
  border-color: var(--accent-btn);
  box-shadow: 0 8px 20px -10px
    color-mix(in srgb, var(--accent-btn) 55%, transparent);
}
.btn-primary:hover {
  background: var(--accent-btn-lift);
  border-color: var(--accent-btn-lift);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -10px
    color-mix(in srgb, var(--accent-btn) 60%, transparent);
}
.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 6px 14px -10px
    color-mix(in srgb, var(--accent-btn) 50%, transparent);
}
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-text);
  transform: translateY(-1px);
}
.btn-ghost:active {
  transform: translateY(1px);
}
