/* ============================================================================
   GARAGE GALS . BUTTONS + CTAs
   ----------------------------------------------------------------------------
   The tactile, glowing red action system, plus ghost, outline, and chrome
   variants. Designed to pair with the magnetic-button JS. Depends on tokens.css.
   ============================================================================ */

.btn {
  --btn-bg: var(--red-500);
  --btn-fg: var(--cream-50);
  --btn-pad-y: 0.85rem;
  --btn-pad-x: 1.5rem;
  --btn-radius: var(--r-pill);

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border-radius: var(--btn-radius);
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform var(--dur-2) var(--ease-out-back),
    box-shadow var(--dur-3) var(--ease-out-expo),
    color var(--dur-2) var(--ease-standard);
  will-change: transform;
}

/* The inner label sits above the sweep */
.btn > * { position: relative; z-index: 2; }

/* A diagonal flare sweep on hover (the "reveal") */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.32) 50%, transparent 100%);
  transform: translateX(-130%);
  transition: transform var(--dur-5) var(--ease-out-expo);
}
.btn:hover::before { transform: translateX(130%); }

/* ---- Primary (red, glowing) ---------------------------------------------- */
.btn-red {
  --btn-bg: var(--grad-red-flare);
  box-shadow: var(--shadow-3), var(--glow-red-md), var(--shadow-inset);
}
.btn-red:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-4), var(--glow-red-lg), var(--shadow-inset);
}
.btn-red:active { transform: translateY(0) scale(0.98); }

/* ---- Ghost (outlined, fills on hover) ------------------------------------ */
.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--fg-strong);
  border: 1.5px solid var(--rule-strong);
  box-shadow: none;
}
.btn-ghost::before { display: none; }
.btn-ghost:hover {
  --btn-fg: var(--cream-50);
  background: var(--ink-900);
  border-color: var(--ink-900);
  transform: translateY(-2px);
}
.btn-ghost-light {
  --btn-fg: var(--cream-50);
  border-color: rgba(245, 239, 228, 0.4);
}
.btn-ghost-light:hover {
  --btn-fg: var(--ink-900);
  background: var(--cream-50);
  border-color: var(--cream-50);
}

/* ---- Outline-accent ------------------------------------------------------ */
.btn-outline {
  --btn-bg: transparent;
  --btn-fg: var(--accent);
  border: 1.5px solid currentColor;
  box-shadow: none;
}
.btn-outline::before { display: none; }
.btn-outline:hover {
  --btn-fg: var(--cream-50);
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--glow-red-md);
}

/* ---- Chrome (brushed metal, premium) ------------------------------------- */
.btn-chrome {
  --btn-fg: var(--ink-850);
  --btn-bg: var(--grad-chrome);
  border: 1px solid var(--steel-200);
  box-shadow: var(--shadow-3), inset 0 1px 0 #fff;
}
.btn-chrome:hover { transform: translateY(-2px); box-shadow: var(--shadow-4), inset 0 1px 0 #fff; }

/* ---- Sizes --------------------------------------------------------------- */
.btn-sm  { --btn-pad-y: 0.6rem;  --btn-pad-x: 1.1rem; font-size: var(--fs-small); }
.btn-lg  { --btn-pad-y: 1.05rem; --btn-pad-x: 2rem;   font-size: var(--fs-lead); }
.btn-xl  { --btn-pad-y: 1.25rem; --btn-pad-x: 2.5rem; font-size: var(--fs-lead); font-weight: var(--weight-bold); }
.btn-block { display: flex; width: 100%; }

/* ---- Icon affordances ---------------------------------------------------- */
.btn-ico { display: inline-flex; font-size: 1.1em; line-height: 0; }
.btn .btn-arrow {
  transition: transform var(--dur-3) var(--ease-out-back);
}
.btn:hover .btn-arrow { transform: translateX(0.25rem); }

/* Round icon-only button */
.btn-circle {
  --btn-pad-y: 0; --btn-pad-x: 0;
  width: 3.25rem; height: 3.25rem;
  border-radius: 50%;
  font-size: 1.2rem;
}

/* ---- Magnetic wrapper (JS adds translate via custom props) --------------- */
.magnetic { display: inline-flex; will-change: transform; }

/* ---- Text/link button ---------------------------------------------------- */
.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: var(--weight-semi);
  color: var(--accent);
  background: none;
  padding: 0;
}
.btn-text .btn-arrow { transition: transform var(--dur-3) var(--ease-out-back); }
.btn-text:hover .btn-arrow { transform: translateX(0.3rem); }

/* ---- Disabled ------------------------------------------------------------ */
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.3);
}

/* ============================================================================
   GOLD CTA SYSTEM . metallic gold pills, matched exactly to nirvani.ai
   Overrides the red action styles above. Primary (.btn-red) = filled gold;
   ghost/outline = gold border that fills gold on hover; text links = gold.
   ============================================================================ */
:root {
  --grad-gold-cta: linear-gradient(135deg, #FFF5D2 0%, #F4D572 22%, #D4A843 48%, #F4D572 74%, #B68A2E 100%);
  --gold-edge: rgba(212, 168, 67, 0.55);
  --gold-ink: #0f0f0f;
}
.btn-red, .btn-outline, .btn-ghost, .btn-ghost-light {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
}
/* Primary . filled metallic gold */
.btn-red {
  --btn-bg: var(--grad-gold-cta);
  --btn-fg: var(--gold-ink);
  color: var(--gold-ink);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 245, 210, 0.85),
    inset 0 -1px 0 0 rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px var(--gold-edge),
    0 8px 22px rgba(182, 138, 46, 0.30);
}
.btn-red:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 245, 210, 0.9),
    inset 0 -1px 0 0 rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(212, 168, 67, 0.65),
    0 14px 34px rgba(182, 138, 46, 0.42);
}
.btn-red:active { transform: translateY(0) scale(0.98); }
/* Secondary . gold outline that fills gold on hover */
.btn-outline, .btn-ghost-light, .btn-ghost {
  --btn-bg: transparent;
  --btn-fg: #F2CF6B;
  color: #F2CF6B;
  border: 1.5px solid rgba(212, 168, 67, 0.72);
  box-shadow: none;
}
.btn-outline:hover, .btn-ghost-light:hover, .btn-ghost:hover {
  --btn-fg: var(--gold-ink);
  color: var(--gold-ink);
  background: var(--grad-gold-cta);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 245, 210, 0.85),
    inset 0 -1px 0 0 rgba(0, 0, 0, 0.5),
    0 10px 26px rgba(182, 138, 46, 0.32);
}
/* Text/link CTAs go gold */
.btn-text { color: #EBCB74; }
.btn-text:hover { color: #FFF5D2; }
