/* ==========================================================================
   Componente: botón (Framer "Primary Button")
   Reposo: relleno amarillo + texto negro. Hover: el relleno baja y sale,
   queda fondo negro con texto amarillo (variante secondary suma borde).
   ========================================================================== */

@layer components {
  .button {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 14px 32px;
    overflow: hidden;
    border-radius: var(--radius-pill);
    background-color: var(--color-bg);
    color: var(--color-text-inverse);
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    white-space: nowrap;
    transition: color var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out);

    /* "BG Fill" de Framer */
    &::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-accent) 100%);
      border-radius: inherit;
      transition: transform var(--duration) var(--ease-out);
    }

    &:hover,
    &:focus-visible {
      color: var(--color-accent);

      &::before {
        transform: translateY(105%);
      }
    }
  }

  .button__icon {
    flex: none;
    width: 24px;
    height: 24px;
  }

  .button--secondary {
    gap: 0;

    &:hover,
    &:focus-visible {
      box-shadow: inset 0 0 0 1px var(--color-accent);
    }
  }

  /* Variante clara (404: "Back To Homepage" de Framer) */
  .button--light {
    padding: 12px 28px;
    font-size: 15px;

    &::before {
      background: linear-gradient(180deg, var(--palette-white) 0%, var(--palette-mercury) 100%);
    }

    &:hover,
    &:focus-visible {
      color: var(--color-text);
      box-shadow: inset 0 0 0 1px var(--color-text-soft);
    }
  }

  .button--block {
    width: 100%;
  }
}
