/*
 * assets/css/utilities.css
 * Button styles (.btn, .btn--primary, .btn--outline) and single-purpose helpers
 * Source: MDN CSS, design patterns from ramp.com / pipe.com references
 *
 * LOAD ORDER: Must be loaded after variables.css (references all design tokens).
 *
 * USAGE:
 *   <a href="/contact.html" class="btn btn--primary">Book a Call</a>
 *   <button class="btn btn--outline">Learn More</button>
 *   <cta-button href="/contact.html" label="Book a Call"></cta-button>  (Web Component)
 *
 * COLOR NOTE: .btn--primary uses --color-navy-950 as text color (dark text on gold background).
 * Gold (#c9a84c) on navy (#0a0f1e) provides high contrast for CTA text.
 * Do NOT use gold as a text color on gold background.
 */

/* ==========================================================================
   BUTTON BASE
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--border-radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 100ms ease;
  border: 2px solid transparent;
  line-height: 1;
}


/* ==========================================================================
   BUTTON VARIANTS
   ========================================================================== */

/* Primary: gold background, dark text — used for primary CTAs */
.btn--primary {
  background-color: var(--color-accent-primary);
  color: var(--color-navy-950);
  border-color: var(--color-accent-primary);
}

.btn--primary:hover {
  background-color: var(--color-accent-primary-hover);
  border-color: var(--color-accent-primary-hover);
}

.btn--primary:active {
  background-color: var(--color-accent-primary-active);
  border-color: var(--color-accent-primary-active);
  transform: translateY(1px);
}

/* Outline: transparent background, gold border + text — secondary CTAs */
.btn--outline {
  background-color: transparent;
  color: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
}

.btn--outline:hover {
  background-color: var(--color-accent-primary);
  color: var(--color-navy-950);
  border-color: var(--color-accent-primary);
}

.btn--outline:active {
  background-color: var(--color-accent-primary-active);
  border-color: var(--color-accent-primary-active);
  color: var(--color-navy-950);
  transform: translateY(1px);
}


/* ==========================================================================
   ACCESSIBILITY UTILITIES
   ========================================================================== */

/* Visually hidden but accessible to screen readers */
.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;
}

/*
 * FOUC PREVENTION (optional):
 * Add this rule to prevent flash of unstyled Web Components while they register.
 * Hides unregistered custom elements until their connectedCallback() fires.
 *
 *   :not(:defined) { visibility: hidden; }
 *
 * Uncomment if FOUC is observed during testing (usually only on slow connections).
 */
