/**
 * StreamVerse — Buttons
 * Design System v1.1, Section 5.
 * Shared by Header (.btn--secondary .btn--small) and Hero (.btn--primary .btn--medium).
 * BEM naming per Section 17.
 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: var(--radius-md);
  white-space: nowrap;
  transition:
    background-color var(--duration-micro) var(--ease-standard),
    border-color var(--duration-micro) var(--ease-standard),
    color var(--duration-micro) var(--ease-standard),
    box-shadow var(--duration-micro) var(--ease-standard),
    transform var(--duration-micro) var(--ease-standard);
}

/* ------------------------------------------------------------------
 * Sizing (Section 5 sizing table)
 * ------------------------------------------------------------------ */

.btn--large {
  height: 56px;
  padding-inline: 32px;
  font-size: var(--text-body-lg);
}

.btn--medium {
  height: 48px;
  padding-inline: 24px;
  font-size: var(--text-body);
}

.btn--small {
  height: 40px;
  padding-inline: 18px;
  font-size: var(--text-body-sm);
}

/* ------------------------------------------------------------------
 * Primary — main CTA ("Start Free Trial", "Subscribe")
 * ------------------------------------------------------------------ */

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-text-on-accent);
  box-shadow: var(--shadow-cta-glow);
}

.btn--primary:hover {
  background-color: var(--color-accent-hover);
  box-shadow: 0 0 32px var(--color-accent-glow);
  transform: translateY(-2px);
}

.btn--primary:active {
  box-shadow: var(--shadow-cta-glow);
  transform: translateY(0);
}

.btn--primary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------
 * Secondary — quieter actions ("See Pricing", "Learn More", Header CTA)
 * No glow — restraint keeps this feeling premium rather than gimmicky.
 * ------------------------------------------------------------------ */

.btn--secondary {
  background-color: transparent;
  border: 1px solid var(--color-border-strong);
  color: var(--color-text-primary);
}

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

.btn--secondary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------
 * Ghost / Tertiary — nav-styled links, low-emphasis actions
 * ------------------------------------------------------------------ */

.btn--ghost {
  background-color: transparent;
  color: var(--color-text-secondary);
}

.btn--ghost:hover {
  color: var(--color-text-primary);
}

/* ------------------------------------------------------------------
 * Disabled state (Section 16)
 * ------------------------------------------------------------------ */

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Minimum 44x44px tappable area (Section 5 rule + Section 18.8) for any
   button rendered visually smaller than that — extends the invisible hit
   area without altering the visible size. Applied per-instance where a
   button is below 44px (e.g. Header's 40px Small CTA — see header.css). */
.btn--hit-area-44 {
  position: relative;
}

.btn--hit-area-44::before {
  content: "";
  position: absolute;
  inset: -2px; /* 40px visible + 2px each edge = 44px hit area */
}
